@kabmo-labs/kabmo 0.49.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +601 -557
  3. package/dist/client/static/js/{Body-9h5hd351.js → Body-pd3nt4xa.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-s05k1q18.js → CsvGrid-eksmqv8f.js} +2 -2
  5. package/dist/client/static/js/{DocxView-x6sjw5ht.js → DocxView-xfx1kt8x.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-jashn8sf.js → DrawioView-2xyqg9bv.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-eygzgtyc.js → HtmlPreview-ps3f0aa5.js} +1 -1
  8. package/dist/client/static/js/ImageView-7vse3k6x.js +1 -0
  9. package/dist/client/static/js/{LayoutWrapper-tag0qpts.js → LayoutWrapper-qdp83fps.js} +2 -2
  10. package/dist/client/static/js/MergeDiffView-hzsccppq.js +1 -0
  11. package/dist/client/static/js/Modal-zw9x5b6f.js +60 -0
  12. package/dist/client/static/js/{PdfView-syhjmyqf.js → PdfView-8fp08jym.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-2r1grxxs.js → SessionsView-qmgg03fv.js} +1 -1
  14. package/dist/client/static/js/{SheetView-26r0e506.js → SheetView-g7mstjdp.js} +22 -22
  15. package/dist/client/static/js/{SvgPreview-2fk85jzz.js → SvgPreview-wsv4h6c6.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-fdka7pxr.js → abnfDiagram-O67JEVCF-1kgm1049.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +1 -0
  18. package/dist/client/static/js/architectureDiagram-NJMV4G6O-mtm210rw.js +36 -0
  19. package/dist/client/static/js/{astro-rn2bvwpm.js → astro-dszrfwwn.js} +1 -1
  20. package/dist/client/static/js/bash-z5pe89pt.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-vpcmd3vx.js → blockDiagram-BEXU5L5S-s474vn2w.js} +8 -8
  22. package/dist/client/static/js/c-fy0fysfw.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-1rgpdnbq.js → c4Diagram-YGBWAQC7-s68v6tc8.js} +3 -3
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fbsejvb9.js → classDiagram-v2-NBCMYWYE-291va3yk.js} +10 -10
  25. package/dist/client/static/js/cose-bilkent-JH36ORCC-0zg7crdw.js +1 -0
  26. package/dist/client/static/js/cpp-wam8dze6.js +1 -0
  27. package/dist/client/static/js/css-ke51m4kc.js +1 -0
  28. package/dist/client/static/js/css-yryw442h.js +1 -0
  29. package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +1 -0
  30. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-7ta5vbrw.js → cynefinDiagram-VND7K2PF-4gnmn3yc.js} +2 -2
  31. package/dist/client/static/js/{dagre-6A5THRUB-b8gtt32x.js → dagre-6A5THRUB-nxmj6bkg.js} +2 -2
  32. package/dist/client/static/js/{diagram-22UHCM2B-7emepy7h.js → diagram-22UHCM2B-3171dabw.js} +25 -25
  33. package/dist/client/static/js/{diagram-3UASUU5V-06nptkzc.js → diagram-3UASUU5V-9h1pd6h8.js} +2 -2
  34. package/dist/client/static/js/{diagram-ATOU4E4O-t113exk3.js → diagram-ATOU4E4O-ywfrbd6m.js} +3 -3
  35. package/dist/client/static/js/{diagram-CDSNMT55-pyj3x97y.js → diagram-CDSNMT55-t87b4wbk.js} +3 -3
  36. package/dist/client/static/js/{diagram-MLGK6HIB-183sgpjh.js → diagram-MLGK6HIB-bzv52p97.js} +2 -2
  37. package/dist/client/static/js/{diagram-MPIPVDR6-fmbj4hcx.js → diagram-MPIPVDR6-8f66rp0a.js} +2 -2
  38. package/dist/client/static/js/{dockerfile-qay672za.js → dockerfile-z3v0km9v.js} +1 -1
  39. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-eafvfws2.js → ebnfDiagram-ZINNZB2B-3y4w2j6t.js} +1 -1
  40. package/dist/client/static/js/{elixir-t8bep87c.js → elixir-c701n0qg.js} +1 -1
  41. package/dist/client/static/js/{elk-276RUBZZ-573f1vfs.js → elk-276RUBZZ-d9d23jch.js} +1 -1
  42. package/dist/client/static/js/{erDiagram-OPXOYQCR-4z1r88ej.js → erDiagram-OPXOYQCR-w4z3501c.js} +12 -12
  43. package/dist/client/static/js/{erlang-261km7r1.js → erlang-cpw5s1f9.js} +1 -1
  44. package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +1 -0
  45. package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +1 -0
  46. package/dist/client/static/js/ganttDiagram-FUAMR5RP-7wcxk4bm.js +292 -0
  47. package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +1 -0
  48. package/dist/client/static/js/gitGraphDiagram-X574FWY7-sdh1hsb1.js +106 -0
  49. package/dist/client/static/js/graphql-0yv8dc1v.js +1 -0
  50. package/dist/client/static/js/html-zk3m0az9.js +1 -0
  51. package/dist/client/static/js/{index-c3whkrwa.js → index-09ap9ncj.js} +30 -30
  52. package/dist/client/static/js/index-0ff2x5g9.js +1 -0
  53. package/dist/client/static/js/{index-gg910gpv.js → index-0q39ajgh.js} +2 -2
  54. package/dist/client/static/js/{index-tb35a328.js → index-144aknp3.js} +2 -2
  55. package/dist/client/static/js/index-17jy16v3.js +314 -0
  56. package/dist/client/static/js/{index-j37m7pn9.js → index-1adfks1n.js} +1 -1
  57. package/dist/client/static/js/{index-4dnc1kys.js → index-1d8v3bvm.js} +2 -2
  58. package/dist/client/static/js/index-1dx4dqzy.js +4 -0
  59. package/dist/client/static/js/{index-a4636gt1.js → index-1ec33b1j.js} +2 -2
  60. package/dist/client/static/js/{index-gr8sqjpz.js → index-1jx4nt2f.js} +1 -1
  61. package/dist/client/static/js/{index-80fjn77c.js → index-1kjgdyfk.js} +2 -2
  62. package/dist/client/static/js/{index-h8hjcdj1.js → index-1vfej0gk.js} +2 -2
  63. package/dist/client/static/js/{index-wbsvg1d9.js → index-2g1ey1c9.js} +2 -2
  64. package/dist/client/static/js/{index-bmaktvm2.js → index-3rhk4apq.js} +1 -1
  65. package/dist/client/static/js/{index-2yzt8h3d.js → index-4vaxdt8a.js} +2 -2
  66. package/dist/client/static/js/{index-fbg5vhhw.js → index-4z3qtazf.js} +2 -2
  67. package/dist/client/static/js/{index-taev57jw.js → index-56319bht.js} +2 -2
  68. package/dist/client/static/js/{index-yg083mk0.js → index-5qwgexg6.js} +6 -6
  69. package/dist/client/static/js/index-779rptb2.js +1 -0
  70. package/dist/client/static/js/{index-4z5ram7g.js → index-7jdz4jr4.js} +2 -2
  71. package/dist/client/static/js/{index-2bf0txsp.js → index-7xn7gxgw.js} +2 -2
  72. package/dist/client/static/js/{index-ykc14gez.js → index-8fk7h2me.js} +5 -5
  73. package/dist/client/static/js/{index-dh060b7r.js → index-971stdh4.js} +2 -2
  74. package/dist/client/static/js/{index-t522tpxt.js → index-9jrej3ht.js} +3 -3
  75. package/dist/client/static/js/index-9ydvkxz1.css +1 -0
  76. package/dist/client/static/js/{index-473hk8nb.js → index-ajdzvegm.js} +9 -9
  77. package/dist/client/static/js/{index-nzvte8s5.js → index-ajqmcds5.js} +2 -2
  78. package/dist/client/static/js/{index-5p8dwr4y.js → index-ap6hv7s7.js} +1 -1
  79. package/dist/client/static/js/{index-0857zpr0.js → index-aqqj4xxy.js} +2 -2
  80. package/dist/client/static/js/index-bczhbk01.js +2 -0
  81. package/dist/client/static/js/{index-z6y8j93w.js → index-bggz63br.js} +7 -7
  82. package/dist/client/static/js/{index-qwxawph7.js → index-c2mqr5fh.js} +2 -2
  83. package/dist/client/static/js/{index-4ccs971z.js → index-cm8pa783.js} +2 -2
  84. package/dist/client/static/js/{index-7rmps91t.js → index-dgkpbrdr.js} +2 -2
  85. package/dist/client/static/js/{index-epzvftkq.js → index-e471eprg.js} +1 -1
  86. package/dist/client/static/js/{index-14dgbjsm.js → index-evvmkk2f.js} +1 -1
  87. package/dist/client/static/js/{index-rz0tz4hg.js → index-frhxbqhg.js} +1 -1
  88. package/dist/client/static/js/{index-1p880x6e.js → index-gcgsjd3c.js} +2 -2
  89. package/dist/client/static/js/{index-s5vegk6q.js → index-grkacfv3.js} +2 -2
  90. package/dist/client/static/js/{index-7ff9scbm.js → index-gws4prmg.js} +2 -2
  91. package/dist/client/static/js/index-hqhz4eam.js +1 -0
  92. package/dist/client/static/js/{index-pv4z2mp2.js → index-jr6q69r3.js} +181 -179
  93. package/dist/client/static/js/{index-dmc82cxb.js → index-jxxewcat.js} +2 -2
  94. package/dist/client/static/js/{index-gz7kvpnm.js → index-k3vvk28c.js} +1 -1
  95. package/dist/client/static/js/{index-yyjw1ty9.js → index-k66w6d9b.js} +2 -2
  96. package/dist/client/static/js/{index-1yq96wpa.js → index-kce86cnw.js} +2 -2
  97. package/dist/client/static/js/{index-zp40g8ah.js → index-n54jd3aw.js} +12 -12
  98. package/dist/client/static/js/{index-pygy21w5.js → index-nnqyew8n.js} +2 -2
  99. package/dist/client/static/js/index-qaxjp73x.js +2 -0
  100. package/dist/client/static/js/{index-5dn4159w.js → index-qxzyvye9.js} +2 -2
  101. package/dist/client/static/js/{index-5ztdqm1w.js → index-r2z0a118.js} +2 -2
  102. package/dist/client/static/js/{index-7dqq7cjp.js → index-r6bm9sth.js} +7 -7
  103. package/dist/client/static/js/{index-e8mt8rag.js → index-ratbr10x.js} +2 -2
  104. package/dist/client/static/js/{index-xw1bptp5.js → index-rgneq3zt.js} +2 -2
  105. package/dist/client/static/js/{index-nbm5r9g1.js → index-svx6rnfs.js} +2 -2
  106. package/dist/client/static/js/{index-3v8k8ms3.js → index-tew3rd6t.js} +1 -1
  107. package/dist/client/static/js/index-tfwsch7a.js +4 -0
  108. package/dist/client/static/js/{index-qs4n116g.js → index-vgwjn4de.js} +2 -2
  109. package/dist/client/static/js/{index-mbtenbyc.js → index-vn495w82.js} +6 -6
  110. package/dist/client/static/js/{index-tcfpzqb9.js → index-wbma8kqw.js} +33 -33
  111. package/dist/client/static/js/{index-gaqjrzdb.js → index-xgbcn89g.js} +2 -2
  112. package/dist/client/static/js/{index-tc6k8qt7.js → index-xrn2reb5.js} +2 -2
  113. package/dist/client/static/js/{index-0w4jqzqk.js → index-zhnfq8br.js} +2 -2
  114. package/dist/client/static/js/index-zsx5vs3j.js +2 -0
  115. package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +1 -0
  116. package/dist/client/static/js/{infoDiagram-VRGFBTTK-xsar9j6v.js → infoDiagram-VRGFBTTK-gtdp0z6p.js} +1 -1
  117. package/dist/client/static/js/ini-apj95p59.js +1 -0
  118. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-g2rvt9jp.js → ishikawaDiagram-OU5B5YK6-c05m0sqq.js} +3 -3
  119. package/dist/client/static/js/java-khk2v3g4.js +1 -0
  120. package/dist/client/static/js/javascript-gez6yppm.js +1 -0
  121. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-q95v18zc.js → journeyDiagram-ZHPQQLJL-kgk5ygm2.js} +6 -6
  122. package/dist/client/static/js/json-r78y6e80.js +1 -0
  123. package/dist/client/static/js/jsx-h7hfj8cz.js +1 -0
  124. package/dist/client/static/js/{julia-pe5vpc2m.js → julia-w13bz4s1.js} +1 -1
  125. package/dist/client/static/js/{kanban-definition-PNTS6WVX-2e7m7ds3.js → kanban-definition-PNTS6WVX-q1w9w68s.js} +6 -6
  126. package/dist/client/static/js/lua-pat2bzg3.js +1 -0
  127. package/dist/client/static/js/markdown-545zn05v.js +1 -0
  128. package/dist/client/static/js/{mermaid.core-dzajkp0g.js → mermaid.core-1rz62j9g.js} +7 -7
  129. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-banecvf8.js → mindmap-definition-NLK3R4M7-3m3w6bnb.js} +8 -8
  130. package/dist/client/static/js/one-dark-pro-7c942tnw.js +1 -0
  131. package/dist/client/static/js/one-light-tp8y6c5g.js +1 -0
  132. package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +1 -0
  133. package/dist/client/static/js/{pegDiagram-GJSIUBJH-6erykm1c.js → pegDiagram-GJSIUBJH-svd3ex4e.js} +1 -1
  134. package/dist/client/static/js/{perl-cc2eqye8.js → perl-hcg3hacf.js} +1 -1
  135. package/dist/client/static/js/{php-p9bvnpsv.js → php-q6hhp84p.js} +1 -1
  136. package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +1 -0
  137. package/dist/client/static/js/{pieDiagram-5QR66LMP-jn1d905q.js → pieDiagram-5QR66LMP-2nrkw034.js} +3 -3
  138. package/dist/client/static/js/properties-9f76xngb.js +1 -0
  139. package/dist/client/static/js/python-nwerpkfq.js +1 -0
  140. package/dist/client/static/js/quadrantDiagram-O4NWA36T-4895d1aq.js +7 -0
  141. package/dist/client/static/js/r-39k5dr2p.js +1 -0
  142. package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +1 -0
  143. package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +1 -0
  144. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +1 -0
  145. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +1 -0
  146. package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +1 -0
  147. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ewzhhth2.js → railroadDiagram-XR7U4H2S-zj3g9yne.js} +1 -1
  148. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-fcs3xd42.js → requirementDiagram-PLB6GJNP-727yjvs8.js} +6 -6
  149. package/dist/client/static/js/{ruby-65s2ca5d.js → ruby-wzqz8vw6.js} +1 -1
  150. package/dist/client/static/js/{rust-ec1j2hwy.js → rust-r94pgqvf.js} +1 -1
  151. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2r829rjf.js → sankeyDiagram-IPEJSGJF-17c7p2pe.js} +5 -5
  152. package/dist/client/static/js/{sass-p6cssgq8.js → sass-xb3van7h.js} +1 -1
  153. package/dist/client/static/js/{scss-qfx8wt3b.js → scss-ddg6t3x4.js} +1 -1
  154. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3mnte9tv.js → sequenceDiagram-PO4LG4MO-wcmbpckr.js} +21 -21
  155. package/dist/client/static/js/{sizeCapture-INFHLROL-r6hf9265.js → sizeCapture-INFHLROL-nkr57cd6.js} +1 -1
  156. package/dist/client/static/js/sql-4dcrp3sw.js +1 -0
  157. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-hm2f0wdb.js → stateDiagram-v2-GCMORJYK-vd7r8s78.js} +6 -6
  158. package/dist/client/static/js/{svelte-jz3a190v.js → svelte-wzaxz546.js} +1 -1
  159. package/dist/client/static/js/{swimlanes-2SLR337P-s58xzqhw.js → swimlanes-2SLR337P-zhxm05ak.js} +1 -1
  160. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +8 -0
  161. package/dist/client/static/js/timeline-definition-EJHVYXUP-n7gbzhzd.js +120 -0
  162. package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +1 -0
  163. package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +1 -0
  164. package/dist/client/static/js/tsx-dk8rpgtw.js +1 -0
  165. package/dist/client/static/js/typescript-q0493nmw.js +1 -0
  166. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ryvgs5ac.js → usecaseDiagram-POWQR4AR-davsnwkf.js} +82 -82
  167. package/dist/client/static/js/vennDiagram-UO4OBE2U-gb54bh5k.js +34 -0
  168. package/dist/client/static/js/{vue-rv4pea8r.js → vue-6zhfw7zx.js} +1 -1
  169. package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +1 -0
  170. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1kt8q8a4.js → wardleyDiagram-VNRHLVJA-sf98cg9t.js} +4 -4
  171. package/dist/client/static/js/xml-91sb3gt9.js +1 -0
  172. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-q39bbgq4.js → xychartDiagram-PMCCYNJV-9nn09k40.js} +4 -4
  173. package/dist/client/static/js/yaml-ghx4mjw1.js +1 -0
  174. package/package.json +1 -1
  175. package/src/client/components/common/header-button/index.tsx +10 -2
  176. package/src/client/components/settings/apply-side-effects.test.ts +16 -0
  177. package/src/client/components/settings/apply-side-effects.ts +8 -0
  178. package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
  179. package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
  180. package/src/client/components/settings/categories/HarnessSettings.tsx +8 -0
  181. package/src/client/components/settings/categories/TokenUsageSettings.tsx +26 -3
  182. package/src/client/components/settings/categories/appearance-settings/RightSideSection.test.tsx +97 -0
  183. package/src/client/components/settings/categories/appearance-settings/RightSideSection.tsx +94 -0
  184. package/src/client/components/settings/categories/appearance-settings/groups.ts +4 -3
  185. package/src/client/components/settings/categories/harness-settings/AccountLoginPanel.tsx +224 -0
  186. package/src/client/components/settings/categories/harness-settings/AccountsPanel.test.tsx +139 -0
  187. package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +349 -0
  188. package/src/client/components/settings/categories/harness-settings/AddAccountForm.tsx +58 -0
  189. package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +33 -0
  190. package/src/client/components/settings/categories/token-usage-settings/HarnessFilter.tsx +59 -0
  191. package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +37 -0
  192. package/src/client/components/settings/categories/usage-settings/limit-groups.test.ts +10 -0
  193. package/src/client/components/settings/categories/usage-settings/limit-groups.ts +4 -1
  194. package/src/client/components/settings/categories/usage-settings/providers.ts +28 -0
  195. package/src/client/components/settings/categories/usage-settings/usage-visibility.test.ts +60 -0
  196. package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +40 -0
  197. package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +8 -2
  198. package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +52 -21
  199. package/src/client/components/workspace/usage-panel/index.test.tsx +92 -12
  200. package/src/client/components/workspace/usage-panel/index.tsx +48 -12
  201. package/src/client/data/mock/token-usage.ts +53 -10
  202. package/src/client/hooks/chat/timeline/reader-input.ts +53 -1
  203. package/src/client/hooks/chat/timeline/scroll-activity.test.ts +103 -0
  204. package/src/client/hooks/chat/timeline/scroll-geometry.ts +9 -4
  205. package/src/client/hooks/chat/timeline/scroll.ts +19 -2
  206. package/src/client/hooks/models/harness-accounts.ts +143 -0
  207. package/src/client/hooks/models/harness-catalog.ts +9 -2
  208. package/src/client/hooks/models/use-harnesses-controller.ts +12 -0
  209. package/src/client/hooks/models/use-harnesses.ts +14 -0
  210. package/src/client/hooks/settings/hide-empty-providers.test.ts +132 -0
  211. package/src/client/hooks/settings/hide-empty-providers.ts +49 -0
  212. package/src/client/hooks/settings/useTokenUsage.ts +7 -2
  213. package/src/client/hooks/workspace/panel-tabs.ts +1 -1
  214. package/src/client/hooks/workspace/right-side.test.ts +75 -1
  215. package/src/client/hooks/workspace/right-side.ts +71 -10
  216. package/src/server/lib/antigravity/home.server.ts +27 -0
  217. package/src/server/lib/db/schema.ts +5 -1
  218. package/src/server/lib/harness/account-identity.server.ts +163 -0
  219. package/src/server/lib/harness/account-login.server.test.ts +151 -0
  220. package/src/server/lib/harness/account-login.server.ts +232 -0
  221. package/src/server/lib/harness/accounts.server.ts +339 -0
  222. package/src/server/lib/harness/accounts.test.ts +147 -0
  223. package/src/server/lib/harness/acp/background-probe.test.ts +314 -0
  224. package/src/server/lib/harness/acp/background-probe.ts +288 -0
  225. package/src/server/lib/harness/acp/background-replay.test.ts +1 -1
  226. package/src/server/lib/harness/acp/background-work.test.ts +4 -194
  227. package/src/server/lib/harness/acp/background-work.ts +4 -207
  228. package/src/server/lib/harness/acp/client.ts +3 -0
  229. package/src/server/lib/harness/acp/commands.ts +2 -2
  230. package/src/server/lib/harness/acp/one-shot.server.ts +4 -2
  231. package/src/server/lib/harness/acp/prewarm.server.ts +21 -16
  232. package/src/server/lib/harness/acp/session-background.test.ts +2 -1
  233. package/src/server/lib/harness/acp/session-intake.test.ts +8 -0
  234. package/src/server/lib/harness/acp/session-intake.ts +12 -3
  235. package/src/server/lib/harness/acp/session-options.ts +2 -0
  236. package/src/server/lib/harness/acp/session-process.ts +1 -0
  237. package/src/server/lib/harness/acp/session-wiring.test.ts +2 -0
  238. package/src/server/lib/harness/acp/session-wiring.ts +22 -0
  239. package/src/server/lib/harness/acp/session.ts +3 -3
  240. package/src/server/lib/harness/acp/stdio.test.ts +52 -0
  241. package/src/server/lib/harness/acp/stdio.ts +7 -1
  242. package/src/server/lib/harness/auto-probe.server.ts +2 -2
  243. package/src/server/lib/harness/launch-table.ts +6 -1
  244. package/src/server/lib/harness/launch.ts +1 -0
  245. package/src/server/lib/harness/schema.server.ts +37 -0
  246. package/src/server/lib/harness/session-delete.server.ts +4 -2
  247. package/src/server/lib/harness/session-import.server.ts +21 -7
  248. package/src/server/lib/harness/session-store.server.test.ts +12 -0
  249. package/src/server/lib/harness/session-store.server.ts +21 -6
  250. package/src/server/lib/harness/session-transcript.server.ts +2 -1
  251. package/src/server/lib/harness/spawn.server.ts +27 -6
  252. package/src/server/lib/models/provider-icon-fetch.test.ts +57 -3
  253. package/src/server/lib/models/provider-icon-fetch.ts +9 -1
  254. package/src/server/lib/models/provider-icon-store.server.ts +61 -0
  255. package/src/server/lib/models/provider-icon-store.test.ts +55 -0
  256. package/src/server/lib/models/provider-icon-svg.ts +57 -0
  257. package/src/server/lib/schedule/runtime.server.ts +4 -1
  258. package/src/server/lib/sessions/dispatch.server.ts +4 -1
  259. package/src/server/lib/sessions/fork.server.ts +2 -0
  260. package/src/server/lib/sessions/resolve.server.ts +4 -0
  261. package/src/server/lib/sessions/spawn.server.ts +4 -2
  262. package/src/server/lib/tts/engines/adapters.test.ts +33 -0
  263. package/src/server/lib/tts/engines/elevenlabs.ts +6 -0
  264. package/src/server/lib/tts/engines/gemini.ts +116 -0
  265. package/src/server/lib/tts/engines/index.ts +3 -0
  266. package/src/server/lib/tts/engines/openai.ts +21 -4
  267. package/src/server/lib/usage/antigravity-quota.test.ts +249 -0
  268. package/src/server/lib/usage/antigravity-quota.ts +197 -0
  269. package/src/server/lib/usage/antigravity.test.ts +20 -0
  270. package/src/server/lib/usage/antigravity.ts +267 -0
  271. package/src/server/lib/usage/index-harness.test.ts +162 -0
  272. package/src/server/lib/usage/index-parse.test.ts +1 -0
  273. package/src/server/lib/usage/index-parse.ts +12 -4
  274. package/src/server/lib/usage/index-query.server.ts +64 -2
  275. package/src/server/lib/usage/index-scan.server.ts +68 -152
  276. package/src/server/lib/usage/index-schema.server.ts +24 -8
  277. package/src/server/lib/usage/index-schema.test.ts +54 -0
  278. package/src/server/lib/usage/index-sources.server.ts +54 -0
  279. package/src/server/lib/usage/providers.server.test.ts +67 -1
  280. package/src/server/lib/usage/providers.server.ts +82 -3
  281. package/src/server/lib/usage/sources/claude.server.ts +187 -0
  282. package/src/server/lib/usage/sources/claude.test.ts +86 -0
  283. package/src/server/lib/usage/sources/codex.server.ts +155 -0
  284. package/src/server/lib/usage/sources/codex.test.ts +53 -0
  285. package/src/server/lib/usage/sources/dsh.server.ts +120 -0
  286. package/src/server/lib/usage/sources/dsh.test.ts +49 -0
  287. package/src/server/lib/usage/sources/helpers.ts +191 -0
  288. package/src/server/lib/usage/sources/jsonl.server.ts +78 -0
  289. package/src/server/lib/usage/sources/jsonl.test.ts +72 -0
  290. package/src/server/lib/usage/sources/omp.server.ts +124 -0
  291. package/src/server/lib/usage/sources/opencode.server.ts +203 -0
  292. package/src/server/lib/usage/sources/opencode.test.ts +104 -0
  293. package/src/server/lib/usage/sources/qwen.server.ts +122 -0
  294. package/src/server/lib/usage/sources/qwen.test.ts +62 -0
  295. package/src/server/lib/usage/sources/types.ts +53 -0
  296. package/src/server/lib/usage/sources/zcode.server.ts +131 -0
  297. package/src/server/lib/usage/sources/zcode.test.ts +87 -0
  298. package/src/server/routes/agent/harness-command.ts +2 -0
  299. package/src/server/routes/agent/prewarm.ts +7 -2
  300. package/src/server/routes/harness/accounts.test.ts +99 -0
  301. package/src/server/routes/harness/accounts.ts +106 -0
  302. package/src/server/routes/harness/root.ts +13 -1
  303. package/src/server/routes/sessions/local-image.ts +2 -2
  304. package/src/server/routes/telemetry/tokens.test.ts +20 -0
  305. package/src/server/routes/telemetry/tokens.ts +12 -3
  306. package/src/server/routes/tts/speak.test.ts +40 -0
  307. package/src/shared/lib/harness/accounts.test.ts +41 -0
  308. package/src/shared/lib/harness/accounts.ts +175 -0
  309. package/src/shared/lib/icons/tint-hues.generated.ts +26 -25
  310. package/src/shared/lib/markdown/ascii-art.test.ts +154 -0
  311. package/src/shared/lib/markdown/ascii-art.ts +158 -0
  312. package/src/shared/lib/markdown/marked.ts +24 -2
  313. package/src/shared/lib/models/provider/identity.test.ts +34 -0
  314. package/src/shared/lib/models/provider/identity.ts +28 -0
  315. package/src/shared/lib/settings/defaults.ts +2 -0
  316. package/src/shared/lib/tts/engines.test.ts +12 -0
  317. package/src/shared/lib/tts/engines.ts +58 -57
  318. package/src/shared/lib/tts/settings.ts +1 -1
  319. package/src/shared/lib/tts/voices.ts +98 -0
  320. package/src/shared/lib/workspace/right-side-hidden.ts +57 -0
  321. package/src/shared/lib/workspace/session-state/store.ts +7 -5
  322. package/src/shared/types/harness.ts +5 -0
  323. package/src/shared/types/settings/state.ts +12 -0
  324. package/src/shared/types/tokenUsage.ts +21 -0
  325. package/src/test-support/preload.ts +9 -0
  326. package/dist/client/static/js/ImageView-g50pk5pt.js +0 -1
  327. package/dist/client/static/js/MergeDiffView-c4mb8m1w.js +0 -1
  328. package/dist/client/static/js/Modal-pf9p6m1k.js +0 -59
  329. package/dist/client/static/js/architecture-7GRP2DOG-ee9wjsht.js +0 -1
  330. package/dist/client/static/js/architectureDiagram-NJMV4G6O-278nx8rt.js +0 -36
  331. package/dist/client/static/js/bash-36shcpcw.js +0 -1
  332. package/dist/client/static/js/c-kxeqssf9.js +0 -1
  333. package/dist/client/static/js/cose-bilkent-JH36ORCC-ydq7mvy0.js +0 -1
  334. package/dist/client/static/js/cpp-wtk1s3d7.js +0 -1
  335. package/dist/client/static/js/css-0a0r6rp3.js +0 -1
  336. package/dist/client/static/js/css-xhnrhg4e.js +0 -1
  337. package/dist/client/static/js/cynefin-OW5HDTMX-gs16zjqa.js +0 -1
  338. package/dist/client/static/js/eventmodeling-NTZA5JFV-ftz7zrz5.js +0 -1
  339. package/dist/client/static/js/flowDiagram-KWPJA3E3-ax0qfmp3.js +0 -1
  340. package/dist/client/static/js/ganttDiagram-FUAMR5RP-49jd7msz.js +0 -292
  341. package/dist/client/static/js/gitGraph-4MIJSDKK-3rtkds4s.js +0 -1
  342. package/dist/client/static/js/gitGraphDiagram-X574FWY7-5p9mgq7n.js +0 -106
  343. package/dist/client/static/js/graphql-w9ajhndp.js +0 -1
  344. package/dist/client/static/js/html-krfbq5wp.js +0 -1
  345. package/dist/client/static/js/index-05n22cg9.js +0 -4
  346. package/dist/client/static/js/index-2jgx68m0.js +0 -1
  347. package/dist/client/static/js/index-333rq9yy.js +0 -1
  348. package/dist/client/static/js/index-38g2eevc.js +0 -314
  349. package/dist/client/static/js/index-9wc36am3.css +0 -1
  350. package/dist/client/static/js/index-bvpzzhn2.js +0 -4
  351. package/dist/client/static/js/index-e19dbqd3.js +0 -2
  352. package/dist/client/static/js/index-yr3exz70.js +0 -2
  353. package/dist/client/static/js/index-zdw8bd5t.js +0 -2
  354. package/dist/client/static/js/index-zyefab6q.js +0 -1
  355. package/dist/client/static/js/info-A6RAGUB7-vr5mxm6f.js +0 -1
  356. package/dist/client/static/js/ini-zx7x1jj1.js +0 -1
  357. package/dist/client/static/js/java-bbw6kdcr.js +0 -1
  358. package/dist/client/static/js/javascript-p2a8rbpw.js +0 -1
  359. package/dist/client/static/js/json-zh7m2fyg.js +0 -1
  360. package/dist/client/static/js/jsx-3zyyt0eh.js +0 -1
  361. package/dist/client/static/js/lua-d656k76a.js +0 -1
  362. package/dist/client/static/js/markdown-b5w681mm.js +0 -1
  363. package/dist/client/static/js/one-dark-pro-z965dedc.js +0 -1
  364. package/dist/client/static/js/one-light-capdx801.js +0 -1
  365. package/dist/client/static/js/packet-AYTQ26CC-ncb5xxtn.js +0 -1
  366. package/dist/client/static/js/pie-WAS4IAKB-ff8fpvc4.js +0 -1
  367. package/dist/client/static/js/properties-3c6rmnqp.js +0 -1
  368. package/dist/client/static/js/python-a3x3zpv1.js +0 -1
  369. package/dist/client/static/js/quadrantDiagram-O4NWA36T-sz4afnp1.js +0 -7
  370. package/dist/client/static/js/r-7h3gwype.js +0 -1
  371. package/dist/client/static/js/radar-RG4KPBEZ-gbj4b1hf.js +0 -1
  372. package/dist/client/static/js/railroad-74A4TZTK-ndv5tqgr.js +0 -1
  373. package/dist/client/static/js/railroad-abnf-HS5TGJTU-yjzj09s1.js +0 -1
  374. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e6pw7e5z.js +0 -1
  375. package/dist/client/static/js/railroad-peg-WCYAUIDC-9734dxy4.js +0 -1
  376. package/dist/client/static/js/sql-7a5vavm0.js +0 -1
  377. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-z4pt2kn1.js +0 -8
  378. package/dist/client/static/js/timeline-definition-EJHVYXUP-ezm1c4pz.js +0 -120
  379. package/dist/client/static/js/treeView-Q6P3EWNA-rs10d4p5.js +0 -1
  380. package/dist/client/static/js/treemap-WGGIJYW6-ey6c5x9f.js +0 -1
  381. package/dist/client/static/js/tsx-4a9b8tqf.js +0 -1
  382. package/dist/client/static/js/typescript-kas107wb.js +0 -1
  383. package/dist/client/static/js/vennDiagram-UO4OBE2U-rd5prsf1.js +0 -34
  384. package/dist/client/static/js/wardley-WFR3VGLG-kd9swrdr.js +0 -1
  385. package/dist/client/static/js/xml-3g4bdtpa.js +0 -1
  386. package/dist/client/static/js/yaml-ktxjn917.js +0 -1
@@ -0,0 +1,314 @@
1
+ import{jt}from"./index-jr6q69r3.js";import{vn,Fn}from"./index-4vaxdt8a.js";var jp=Fn(function(oa,sa){(function(r,e){typeof oa=="object"&&typeof sa<"u"?sa.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(oa,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",h="hour",n="day",u="week",d="month",c="quarter",f="year",p="date",x="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(st){var N=["th","st","nd","rd"],K=st%100;return"["+st+(N[(K-20)%10]||N[K]||N[0])+"]"}},_=function(st,N,K){var et=String(st);return!et||et.length>=N?st:""+Array(N+1-et.length).join(K)+st},v={s:_,z:function(st){var N=-st.utcOffset(),K=Math.abs(N),et=Math.floor(K/60),U=K%60;return(N<=0?"+":"-")+_(et,2,"0")+":"+_(U,2,"0")},m:function st(N,K){if(N.date()<K.date())return-st(K,N);var et=12*(K.year()-N.year())+(K.month()-N.month()),U=N.clone().add(et,d),ut=K-U<0,nt=N.clone().add(et+(ut?-1:1),d);return+(-(et+(K-U)/(ut?U-nt:nt-U))||0)},a:function(st){return st<0?Math.ceil(st)||0:Math.floor(st)},p:function(st){return{M:d,y:f,w:u,d:n,D:p,h,m:a,s:o,ms:s,Q:c}[st]||String(st||"").toLowerCase().replace(/s$/,"")},u:function(st){return st===void 0}},E="en",D={};D[E]=B;var P="$isDayjsObject",Z=function(st){return st instanceof ft||!(!st||!st[P])},Q=function st(N,K,et){var U;if(!N)return E;if(typeof N=="string"){var ut=N.toLowerCase();D[ut]&&(U=ut),K&&(D[ut]=K,U=ut);var nt=N.split("-");if(!U&&nt.length>1)return st(nt[0])}else{var _t=N.name;D[_t]=N,U=_t}return!et&&U&&(E=U),U||!et&&E},tt=function(st,N){if(Z(st))return st.clone();var K=typeof N=="object"?N:{};return K.date=st,K.args=arguments,new ft(K)},it=v;it.l=Q,it.i=Z,it.w=function(st,N){return tt(st,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var ft=function(){function st(K){this.$L=Q(K.locale,null,!0),this.parse(K),this.$x=this.$x||K.x||{},this[P]=!0}var N=st.prototype;return N.parse=function(K){this.$d=function(et){var{date:U,utc:ut}=et;if(U===null)return new Date(NaN);if(it.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var nt=U.match(S);if(nt){var _t=nt[2]-1||0,Lt=(nt[7]||"0").substring(0,3);return ut?new Date(Date.UTC(nt[1],_t,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,Lt)):new Date(nt[1],_t,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,Lt)}}return new Date(U)}(K),this.init()},N.init=function(){var K=this.$d;this.$y=K.getFullYear(),this.$M=K.getMonth(),this.$D=K.getDate(),this.$W=K.getDay(),this.$H=K.getHours(),this.$m=K.getMinutes(),this.$s=K.getSeconds(),this.$ms=K.getMilliseconds()},N.$utils=function(){return it},N.isValid=function(){return this.$d.toString()!==x},N.isSame=function(K,et){var U=tt(K);return this.startOf(et)<=U&&U<=this.endOf(et)},N.isAfter=function(K,et){return tt(K)<this.startOf(et)},N.isBefore=function(K,et){return this.endOf(et)<tt(K)},N.$g=function(K,et,U){return it.u(K)?this[et]:this.set(U,K)},N.unix=function(){return Math.floor(this.valueOf()/1000)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(K,et){var U=this,ut=!!it.u(et)||et,nt=it.p(K),_t=function(Wt,Gt){var zt=it.w(U.$u?Date.UTC(U.$y,Gt,Wt):new Date(U.$y,Gt,Wt),U);return ut?zt:zt.endOf(n)},Lt=function(Wt,Gt){return it.w(U.toDate()[Wt].apply(U.toDate("s"),(ut?[0,0,0,0]:[23,59,59,999]).slice(Gt)),U)},Ut=this.$W,Xt=this.$M,Qt=this.$D,re="set"+(this.$u?"UTC":"");switch(nt){case f:return ut?_t(1,0):_t(31,11);case d:return ut?_t(1,Xt):_t(0,Xt+1);case u:var It=this.$locale().weekStart||0,Mt=(Ut<It?Ut+7:Ut)-It;return _t(ut?Qt-Mt:Qt+(6-Mt),Xt);case n:case p:return Lt(re+"Hours",0);case h:return Lt(re+"Minutes",1);case a:return Lt(re+"Seconds",2);case o:return Lt(re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(K){return this.startOf(K,!1)},N.$set=function(K,et){var U,ut=it.p(K),nt="set"+(this.$u?"UTC":""),_t=(U={},U[n]=nt+"Date",U[p]=nt+"Date",U[d]=nt+"Month",U[f]=nt+"FullYear",U[h]=nt+"Hours",U[a]=nt+"Minutes",U[o]=nt+"Seconds",U[s]=nt+"Milliseconds",U)[ut],Lt=ut===n?this.$D+(et-this.$W):et;if(ut===d||ut===f){var Ut=this.clone().set(p,1);Ut.$d[_t](Lt),Ut.init(),this.$d=Ut.set(p,Math.min(this.$D,Ut.daysInMonth())).$d}else _t&&this.$d[_t](Lt);return this.init(),this},N.set=function(K,et){return this.clone().$set(K,et)},N.get=function(K){return this[it.p(K)]()},N.add=function(K,et){var U,ut=this;K=Number(K);var nt=it.p(et),_t=function(Xt){var Qt=tt(ut);return it.w(Qt.date(Qt.date()+Math.round(Xt*K)),ut)};if(nt===d)return this.set(d,this.$M+K);if(nt===f)return this.set(f,this.$y+K);if(nt===n)return _t(1);if(nt===u)return _t(7);var Lt=(U={},U[a]=e,U[h]=i,U[o]=r,U)[nt]||1,Ut=this.$d.getTime()+K*Lt;return it.w(Ut,this)},N.subtract=function(K,et){return this.add(-1*K,et)},N.format=function(K){var et=this,U=this.$locale();if(!this.isValid())return U.invalidDate||x;var ut=K||"YYYY-MM-DDTHH:mm:ssZ",nt=it.z(this),_t=this.$H,Lt=this.$m,Ut=this.$M,{weekdays:Xt,months:Qt,meridiem:re}=U,It=function(Gt,zt,he,le){return Gt&&(Gt[zt]||Gt(et,ut))||he[zt].slice(0,le)},Mt=function(Gt){return it.s(_t%12||12,Gt,"0")},Wt=re||function(Gt,zt,he){var le=Gt<12?"AM":"PM";return he?le.toLowerCase():le};return ut.replace(T,function(Gt,zt){return zt||function(he){switch(he){case"YY":return String(et.$y).slice(-2);case"YYYY":return it.s(et.$y,4,"0");case"M":return Ut+1;case"MM":return it.s(Ut+1,2,"0");case"MMM":return It(U.monthsShort,Ut,Qt,3);case"MMMM":return It(Qt,Ut);case"D":return et.$D;case"DD":return it.s(et.$D,2,"0");case"d":return String(et.$W);case"dd":return It(U.weekdaysMin,et.$W,Xt,2);case"ddd":return It(U.weekdaysShort,et.$W,Xt,3);case"dddd":return Xt[et.$W];case"H":return String(_t);case"HH":return it.s(_t,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return Wt(_t,Lt,!0);case"A":return Wt(_t,Lt,!1);case"m":return String(Lt);case"mm":return it.s(Lt,2,"0");case"s":return String(et.$s);case"ss":return it.s(et.$s,2,"0");case"SSS":return it.s(et.$ms,3,"0");case"Z":return nt}return null}(Gt)||nt.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(K,et,U){var ut,nt=this,_t=it.p(et),Lt=tt(K),Ut=(Lt.utcOffset()-this.utcOffset())*e,Xt=this-Lt,Qt=function(){return it.m(nt,Lt)};switch(_t){case f:ut=Qt()/12;break;case d:ut=Qt();break;case c:ut=Qt()/3;break;case u:ut=(Xt-Ut)/604800000;break;case n:ut=(Xt-Ut)/86400000;break;case h:ut=Xt/i;break;case a:ut=Xt/e;break;case o:ut=Xt/r;break;default:ut=Xt}return U?ut:it.a(ut)},N.daysInMonth=function(){return this.endOf(d).$D},N.$locale=function(){return D[this.$L]},N.locale=function(K,et){if(!K)return this.$L;var U=this.clone(),ut=Q(K,et,!0);return ut&&(U.$L=ut),U},N.clone=function(){return it.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},st}(),dt=ft.prototype;return tt.prototype=dt,[["$ms",s],["$s",o],["$m",a],["$H",h],["$W",n],["$M",d],["$y",f],["$D",p]].forEach(function(st){dt[st[1]]=function(N){return this.$g(N,st[0],st[1])}}),tt.extend=function(st,N){return st.$i||(st(N,ft,tt),st.$i=!0),tt},tt.locale=Q,tt.isDayjs=Z,tt.unix=function(st){return tt(1000*st)},tt.en=D[E],tt.Ls=D,tt.p={},tt})});var sf=Fn(function(rf){Object.defineProperty(rf,"__esModule",{value:!0});rf.BLANK_URL=rf.relativeFirstCharacters=rf.whitespaceEscapeCharsRegex=rf.urlSchemeRegex=rf.ctrlCharactersRegex=rf.htmlCtrlEntityRegex=rf.htmlEntitiesRegex=rf.invalidProtocolRegex=void 0;rf.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;rf.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;rf.htmlCtrlEntityRegex=/&(newline|tab);/gi;rf.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;rf.urlSchemeRegex=/^.+(:|&colon;)/gim;rf.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;rf.relativeFirstCharacters=[".","/"];rf.BLANK_URL="about:blank"});var dl=Fn(function(nf){Object.defineProperty(nf,"__esModule",{value:!0});nf.sanitizeUrl=vb;var ve=sf();function Tb(r){return ve.relativeFirstCharacters.indexOf(r[0])>-1}function Bb(r){var e=r.replace(ve.ctrlCharactersRegex,"");return e.replace(ve.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function _b(r){return URL.canParse(r)}function af(r){try{return decodeURIComponent(r)}catch(e){return r}}function vb(r){if(!r)return ve.BLANK_URL;var e,i=af(r.trim());do i=Bb(i).replace(ve.htmlCtrlEntityRegex,"").replace(ve.ctrlCharactersRegex,"").replace(ve.whitespaceEscapeCharsRegex,"").trim(),i=af(i),e=i.match(ve.ctrlCharactersRegex)||i.match(ve.htmlEntitiesRegex)||i.match(ve.htmlCtrlEntityRegex)||i.match(ve.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return ve.BLANK_URL;if(Tb(s))return s;var o=s.trimStart(),a=o.match(ve.urlSchemeRegex);if(!a)return s;var h=a[0].toLowerCase().trim();if(ve.invalidProtocolRegex.test(h))return ve.BLANK_URL;var n=o.replace(/\\/g,"/");if(h==="mailto:"||h.includes("://"))return n;if(h==="http:"||h==="https:"){if(!_b(n))return ve.BLANK_URL;var u=new URL(n);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return n}});var Mc=Object.defineProperty,t=(r,e)=>Mc(r,"name",{value:e,configurable:!0}),xo=(r,e)=>{for(var i in e)Mc(r,i,{get:e[i],enumerable:!0})};var Ec=vn(jp(),1),or={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},cd=t(function(r="fatal"){let e=or.fatal;if(typeof r==="string"){if(r.toLowerCase()in or)e=or[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=or.fatal)l.fatal=console.error?console.error.bind(console,Oe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Oe("FATAL"));if(e<=or.error)l.error=console.error?console.error.bind(console,Oe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Oe("ERROR"));if(e<=or.warn)l.warn=console.warn?console.warn.bind(console,Oe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Oe("WARN"));if(e<=or.info)l.info=console.info?console.info.bind(console,Oe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Oe("INFO"));if(e<=or.debug)l.debug=console.debug?console.debug.bind(console,Oe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Oe("DEBUG"));if(e<=or.trace)l.trace=console.debug?console.debug.bind(console,Oe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Oe("TRACE"))},"setLogLevel"),Oe=t((r)=>`%c${Ec.default().format("ss.SSS")} : ${r} : `,"format");var qo={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return qo.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return qo.hue2rgb(a,o,r)*255;case"b":return qo.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),h=(o+a)/2;if(s==="l")return h*100;if(o===a)return 0;let n=o-a,u=h>0.5?n/(2-o-a):n/(o+a);if(s==="s")return u*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},$c=qo;var vy={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Ic=vy;var Ly={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Oc=Ly;var Fy={channel:$c,lang:Ic,unit:Oc},qt=Fy;var sr={};for(let r=0;r<=255;r++)sr[r]=qt.unit.dec2hex(r);var ye={ALL:0,RGB:1,HSL:2};class Dc{constructor(){this.type=ye.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=ye.ALL}is(r){return this.type===r}}var Pc=Dc;class Rc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Pc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=ye.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=qt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=qt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=qt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=qt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=qt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=qt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(ye.HSL)&&e!==void 0)return e;return this._ensureHSL(),qt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(ye.HSL)&&e!==void 0)return e;return this._ensureHSL(),qt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(ye.HSL)&&e!==void 0)return e;return this._ensureHSL(),qt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(ye.RGB)&&e!==void 0)return e;return this._ensureRGB(),qt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(ye.RGB)&&e!==void 0)return e;return this._ensureRGB(),qt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(ye.RGB)&&e!==void 0)return e;return this._ensureRGB(),qt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(ye.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(ye.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(ye.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(ye.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(ye.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(ye.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var qc=Rc;var My=new qc({r:0,g:0,b:0,a:0},"transparent"),gr=My;var Wc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Wc.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,h=o>4,n=h?1:17,u=h?8:4,d=a?0:-1,c=h?255:15;return gr.set({r:(s>>u*(d+3)&c)*n,g:(s>>u*(d+2)&c)*n,b:(s>>u*(d+1)&c)*n,a:a?(s&c)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${sr[Math.round(e)]}${sr[Math.round(i)]}${sr[Math.round(s)]}${sr[Math.round(o*255)]}`;else return`#${sr[Math.round(e)]}${sr[Math.round(i)]}${sr[Math.round(s)]}`}},Tr=Wc;var Wo={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:(r)=>{let e=r.match(Wo.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return qt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return qt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return qt.channel.clamp.h(parseFloat(i)*360)}}return qt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Wo.re);if(!i)return;let[,s,o,a,h,n]=i;return gr.set({h:Wo._hue2deg(s),s:qt.channel.clamp.s(parseFloat(o)),l:qt.channel.clamp.l(parseFloat(a)),a:h?qt.channel.clamp.a(n?parseFloat(h)/100:parseFloat(h)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${qt.lang.round(e)}, ${qt.lang.round(i)}%, ${qt.lang.round(s)}%, ${o})`;else return`hsl(${qt.lang.round(e)}, ${qt.lang.round(i)}%, ${qt.lang.round(s)}%)`}},Fi=Wo;var No={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:(r)=>{r=r.toLowerCase();let e=No.colors[r];if(!e)return;return Tr.parse(e)},stringify:(r)=>{let e=Tr.stringify(r);for(let i in No.colors)if(No.colors[i]===e)return i;return}},aa=No;var Nc={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Nc.re);if(!i)return;let[,s,o,a,h,n,u,d,c]=i;return gr.set({r:qt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:qt.channel.clamp.g(h?parseFloat(a)*2.55:parseFloat(a)),b:qt.channel.clamp.b(u?parseFloat(n)*2.55:parseFloat(n)),a:d?qt.channel.clamp.a(c?parseFloat(d)/100:parseFloat(d)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${qt.lang.round(e)}, ${qt.lang.round(i)}, ${qt.lang.round(s)}, ${qt.lang.round(o)})`;else return`rgb(${qt.lang.round(e)}, ${qt.lang.round(i)}, ${qt.lang.round(s)})`}},Mi=Nc;var Ay={format:{keyword:aa,hex:Tr,rgb:Mi,rgba:Mi,hsl:Fi,hsla:Fi},parse:(r)=>{if(typeof r!=="string")return r;let e=Tr.parse(r)||Mi.parse(r)||Fi.parse(r)||aa.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(ye.HSL)||r.data.r===void 0)return Fi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return Mi.stringify(r);else return Tr.stringify(r)}},xe=Ay;var Ey=(r,e)=>{let i=xe.parse(r);for(let s in e)i[s]=qt.channel.clamp[s](e[s]);return xe.stringify(i)},zo=Ey;var $y=(r,e,i=0,s=1)=>{if(typeof r!=="number")return zo(r,{a:e});let o=gr.set({r:qt.channel.clamp.r(r),g:qt.channel.clamp.g(e),b:qt.channel.clamp.b(i),a:qt.channel.clamp.a(s)});return xe.stringify(o)},ht=$y;var Iy=(r,e)=>qt.lang.round(xe.parse(r)[e]),ba=Iy;var Oy=(r)=>{let{r:e,g:i,b:s}=xe.parse(r),o=0.2126*qt.channel.toLinear(e)+0.7152*qt.channel.toLinear(i)+0.0722*qt.channel.toLinear(s);return qt.lang.round(o)},zc=Oy;var Dy=(r)=>zc(r)>=0.5,Hc=Dy;var Py=(r)=>!Hc(r),Te=Py;var Ry=(r,e,i)=>{let s=xe.parse(r),o=s[e],a=qt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return xe.stringify(s)},cc=Ry;var qy=(r,e)=>cc(r,"l",e),g=qy;var Wy=(r,e)=>cc(r,"l",-e),A=Wy;var Ny=(r,e)=>{let i=xe.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return zo(r,s)},M=Ny;var zy=(r,e,i=50)=>{let{r:s,g:o,b:a,a:h}=xe.parse(r),{r:n,g:u,b:d,a:c}=xe.parse(e),f=i/100,p=f*2-1,x=h-c,T=((p*x===-1?p:(p+x)/(1+p*x))+1)/2,B=1-T,_=s*T+n*B,v=o*T+u*B,E=a*T+d*B,D=h*f+c*(1-f);return ht(_,v,E,D)},Yc=zy;var Hy=(r,e=100)=>{let i=xe.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Yc(i,r,e)},J=Hy;var _g=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,zr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Yy=/\s/,jy=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
2
+ `,o);if(a===-1)break;let h=o;while(h>i&&Yy.test(r[h-1]))h--;e+=r.slice(i,h)+`
3
+ `,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),Sg=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Ki={},uc=t(function(r,e){r=jy(r.replace(_g,"").replace(zr,""));for(let[i,{detector:s}]of Object.entries(Ki))if(s(r,e))return i;throw new Sg(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Hp=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)Vc(e,i,s)},"registerLazyLoadedDiagrams"),Vc=t((r,e,i)=>{if(Ki[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);Ki[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),VA=t((r)=>Ki[r].loader,"getDiagramLoader"),na=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>na(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([a,h])=>{if(typeof h==="object"){if(h===null)return;if(!Object.hasOwn(r,a))Object.defineProperty(r,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[a]===void 0)o[a]=Array.isArray(h)?[]:{};if(typeof o[a]==="object")o[a]=na(o[a],h,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=h;else Object.defineProperty(r,a,{value:h,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),at=na,je="#ffffff",Ue="#f2f2f2",Kt=t((r,e)=>e?M(r,{s:-40,l:10}):M(r,{s:-40,l:-10}),"mkBorder"),Uy=class{static{t(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||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Kt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Kt(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?A(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(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||g(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||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10);else this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,5);if(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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||M(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||M(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(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||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(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??M(this.primaryColor,{l:-30}),this.venn2=this.venn2??M(this.secondaryColor,{l:-30}),this.venn3=this.venn3??M(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??M(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??M(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??M(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??M(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??M(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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?A(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||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},Xy=t((r)=>{let e=new Uy;return e.calculate(r),e},"getThemeVariables"),Gy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Kt(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=g(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ht(255,255,255,0.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=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=ht(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ht(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||g(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(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=g(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=g(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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=g(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||M(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||M(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??g(this["cScale"+r],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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=g(this.secondaryColor,20),this.git1=g(this.pie2||this.secondaryColor,20),this.git2=g(this.pie3||this.tertiaryColor,20),this.git3=g(this.pie4||M(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||M(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||M(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||M(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||M(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||g("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||g("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||g("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||g("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||g(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||g(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||g(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||g(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Vy=t((r)=>{let e=new Gy;return e.calculate(r),e},"getThemeVariables"),Ky=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=M(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Kt(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=Kt(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=ht(102,102,255,0.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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||M(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||M(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||M(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||g(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||M(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||M(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||M(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??M(this.primaryColor,{l:-30}),this.venn2=this.venn2??M(this.secondaryColor,{l:-30}),this.venn3=this.venn3??M(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??M(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??M(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??M(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??M(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??M(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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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,legendTextColor:this.xyChart?.legendTextColor||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||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Vt=t((r)=>{let e=new Ky;return e.calculate(r),e},"getThemeVariables"),Zy=class{static{t(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=g("#cde498",10),this.primaryBorderColor=Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Kt(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=A(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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||M(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||M(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||M(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(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||M(this.primaryColor,{l:-30}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||M(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??M(this.primaryColor,{l:-30}),this.venn2=this.venn2??M(this.secondaryColor,{l:-30}),this.venn3=this.venn3??M(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??M(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??M(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??M(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??M(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??M(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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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,legendTextColor:this.xyChart?.legendTextColor||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||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Qy=t((r)=>{let e=new Zy;return e.calculate(r),e},"getThemeVariables"),Jy=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Kt(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||g(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=g(this.contrast,55),this.border2=this.contrast,this.actorBorder=g(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||M(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||M(this.mainBkg,{l:-(8+r*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=g(this.contrast,30),this.sectionBkgColor2=g(this.contrast,30),this.taskBorderColor=A(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=g(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||M(this.primaryColor,{h:-30}),this.git4=this.pie5||M(this.primaryColor,{h:-60}),this.git5=this.pie6||M(this.primaryColor,{h:-90}),this.git6=this.pie7||M(this.primaryColor,{h:60}),this.git7=this.pie8||M(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=class{static{t(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=Kt(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||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Kt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Kt(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Te(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=M(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||M(r,{h:30}),this.cScale4=this.cScale4||M(r,{h:60}),this.cScale5=this.cScale5||M(r,{h:90}),this.cScale6=this.cScale6||M(r,{h:120}),this.cScale7=this.cScale7||M(r,{h:150}),this.cScale8=this.cScale8||M(r,{h:210,l:150}),this.cScale9=this.cScale9||M(r,{h:270}),this.cScale10=this.cScale10||M(r,{h:300}),this.cScale11=this.cScale11||M(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||M(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||M(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||M(r,{h:64}),this.fillType3=this.fillType3||M(e,{h:64}),this.fillType4=this.fillType4||M(r,{h:-64}),this.fillType5=this.fillType5||M(e,{h:-64}),this.fillType6=this.fillType6||M(r,{h:128}),this.fillType7=this.fillType7||M(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||M(r,{l:-10}),this.pie5=this.pie5||M(e,{l:-10}),this.pie6=this.pie6||M(i,{l:-10}),this.pie7=this.pie7||M(r,{h:60,l:-10}),this.pie8=this.pie8||M(r,{h:-60,l:-10}),this.pie9=this.pie9||M(r,{h:120,l:0}),this.pie10=this.pie10||M(r,{h:60,l:-20}),this.pie11=this.pie11||M(r,{h:-60,l:-20}),this.pie12=this.pie12||M(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||M(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||M(r,{h:-30}),this.git4=this.git4||M(r,{h:-60}),this.git5=this.git5||M(r,{h:-90}),this.git6=this.git6||M(r,{h:60}),this.git7=this.git7||M(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},rx=t((r)=>{let e=new ex;return e.calculate(r),e},"getThemeVariables"),ix=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Kt(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=g(J("#323D47"),10),this.border1="#ccc",this.border2=ht(255,255,255,0.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||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Kt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Kt(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||M(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||M(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(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||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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?A(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=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}};var ox=t((r)=>{let e=new ix;return e.calculate(r),e},"getThemeVariables"),sx=class{static{t(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=Kt("#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||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Kt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Kt(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Te(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=M(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||M(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||M(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||M(r,{h:64}),this.fillType3=this.fillType3||M(e,{h:64}),this.fillType4=this.fillType4||M(r,{h:-64}),this.fillType5=this.fillType5||M(e,{h:-64}),this.fillType6=this.fillType6||M(r,{h:128}),this.fillType7=this.fillType7||M(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||M(r,{l:-10}),this.pie5=this.pie5||M(e,{l:-10}),this.pie6=this.pie6||M(i,{l:-10}),this.pie7=this.pie7||M(r,{h:60,l:-10}),this.pie8=this.pie8||M(r,{h:-60,l:-10}),this.pie9=this.pie9||M(r,{h:120,l:0}),this.pie10=this.pie10||M(r,{h:60,l:-20}),this.pie11=this.pie11||M(r,{h:-60,l:-20}),this.pie12=this.pie12||M(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||M(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||M(r,{h:-30}),this.git4=this.git4||M(r,{h:-60}),this.git5=this.git5||M(r,{h:-90}),this.git6=this.git6||M(r,{h:60}),this.git7=this.git7||M(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ax=t((r)=>{let e=new sx;return e.calculate(r),e},"getThemeVariables"),nx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Kt(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=g(J("#323D47"),10),this.border1="#ccc",this.border2=ht(255,255,255,0.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||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Kt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Kt(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||M(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||M(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(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||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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?A(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||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},lx=t((r)=>{let e=new nx;return e.calculate(r),e},"getThemeVariables"),hx=class{static{t(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=Kt("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Kt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Kt(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Te(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=M(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||M(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||M(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];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 o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||M(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||M(r,{h:-30}),this.git4=this.git4||M(r,{h:-60}),this.git5=this.git5||M(r,{h:-90}),this.git6=this.git6||M(r,{h:60}),this.git7=this.git7||M(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},cx=t((r)=>{let e=new hx;return e.calculate(r),e},"getThemeVariables"),ux=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Kt(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=g(J("#323D47"),10),this.border1="#ccc",this.border2=ht(255,255,255,0.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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Kt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Kt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Kt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Kt(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(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.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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||J(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||g(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||A(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=A(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||M(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||M(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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?A(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||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},dx=t((r)=>{let e=new ux;return e.calculate(r),e},"getThemeVariables"),wo={base:{getThemeVariables:Xy},dark:{getThemeVariables:Vy},default:{getThemeVariables:Vt},forest:{getThemeVariables:Qy},neutral:{getThemeVariables:tx},neo:{getThemeVariables:rx},"neo-dark":{getThemeVariables:ox},redux:{getThemeVariables:ax},"redux-dark":{getThemeVariables:lx},"redux-color":{getThemeVariables:cx},"redux-dark-color":{getThemeVariables:dx}},me={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:0.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:0.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:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",maxTextSize:50000,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},Kc={...me,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:wo.default.getThemeVariables(),sequence:{...me.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:me.class?.theme,look:me.class?.look,layout:me.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...me.gantt,tickInterval:void 0,useWidth:void 0},c4:{...me.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...me.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...me.pie,useWidth:984},xyChart:{...me.xyChart,useWidth:void 0},requirement:{...me.requirement,useWidth:void 0},packet:{...me.packet},eventmodeling:{...me.eventmodeling},treeView:{...me.treeView,useWidth:void 0},radar:{...me.radar},usecase:{...me.usecase},railroad:{...me.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:{...me.ishikawa},sankey:{...me.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:{...me.venn},cynefin:{...me.cynefin}},Zc=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...Zc(r[s],"")];return[...i,e+s]},[]),"keyify"),fx=new Set(Zc(Kc,"")),Y=Kc,px={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},gx=t((r)=>px[r]??r,"getDiagramConfigKey"),mx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},yx=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))l.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),$i=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>$i(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!fx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=mx[e];if(s)yx(r[e],s);else l.debug("sanitizing object",e),$i(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))l.debug("sanitizing css option",e),r[e]=Tg(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}l.debug("After sanitization",r)},"sanitizeDirective"),Tg=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),oi=Object.freeze(Y),xx=["theme","look","layout"],Cx=new Set(["classic","handDrawn","neo"]),bx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(wo,e);return r!=="look"||Cx.has(e)},"isUsableAppearance"),kx=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&bx(i,o))},"readAppearance"),Jr=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Le=at({},oi),jo,Uo={},ar=[],Ai=at({},oi),Ei,wx=t((r,e)=>{if(!Ei)return;let i=[e,...[...ar].reverse(),Uo,oi],s=r[Ei];for(let o of xx)for(let a of i){let h=kx(a,Ei,o);if(h===void 0)continue;if(r[o]=h,s?.[o]!==void 0)s[o]=h;break}},"resolveAppearance"),Hr=t((r,e)=>{let i=at({},r),s={};for(let a of e)Qc(a),s=at(s,a);if(i=at(i,s),wx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(wo,i.theme)){let a=at({},jo),h=at(a.themeVariables||{},s.themeVariables);i.themeVariables=wo[i.theme].getThemeVariables(h)}return Ai=i,Tx(Ai),Ai},"updateCurrentConfig"),qp=t((r)=>{Ei=r===void 0?void 0:gx(r),Hr(Le,ar)},"setDiagramConfigScope"),YA=t((r)=>{if(Le=at({},oi),Le=at(Le,r),Uo=at({},r),r.theme&&Object.hasOwn(wo,r.theme))Le.themeVariables=wo[r.theme].getThemeVariables(r.themeVariables);return Hr(Le,ar),Le},"setSiteConfig"),JA=t((r)=>{jo=at({},r)},"saveConfigFromInitialize"),ZA=t((r)=>(Le=at(Le,r),Uo=at(Uo,r),Hr(Le,ar),Le),"updateSiteConfig"),Dg=t(()=>at({},Le),"getSiteConfig"),Ng=t((r)=>(Hr(Ai,[r]),C()),"setConfig"),C=t(()=>at({},Ai),"getConfig"),Qc=t((r)=>{if(!r)return;["secure",...Le.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))l.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")Qc(r[e])})},"sanitize"),XA=t((r)=>{if($i(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};ar.push(r),Hr(Le,ar)},"addDirective"),ud=t((r=Le)=>{ar=[],Ei=void 0,Hr(r,ar)},"reset"),Sx={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."},jc={},Jc=t((r)=>{if(jc[r])return;l.warn(Sx[r]),jc[r]=!0},"issueWarning"),Tx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)Jc("LAZY_LOAD_DEPRECATED")},"checkConfig"),eh=t(()=>{let r={};if(jo)r=at(r,jo);for(let e of ar)r=at(r,e);return r},"getUserDefinedConfig"),Yt=t((r)=>{if(r.flowchart?.htmlLabels!=null)Jc("FLOWCHART_HTML_LABELS_DEPRECATED");return Jr(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),ll=/<\/?br\s*\/?>/gi,Bx=new RegExp(ll.source,"i"),_x=t((r)=>{if(!r)return[""];return ru(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),vx=(()=>{let r=!1;return()=>{if(!r)tu(),r=!0}})();function tu(){jt.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),jt.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(tu,"setupDompurifyHooks");var eu=t((r)=>(vx(),jt.sanitize(r)),"removeScript"),Uc=t((r,e)=>{if(Yt(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=eu(r);else if(i!=="loose")r=ru(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Ax(r)}return r},"sanitizeMore"),ee=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=jt.sanitize(Uc(r,e),e.dompurifyConfig).toString();else r=jt.sanitize(Uc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),Lx=t((r,e)=>{if(typeof r==="string")return ee(r,e);return r.flat().map((i)=>ee(i,e))},"sanitizeTextOrArray"),Fx=t((r)=>Bx.test(r),"hasBreaks"),Mx=t((r)=>r.split(ll),"splitBreaks"),Ax=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ru=t((r)=>r.replace(ll,"#br#"),"breakToPlaceholder"),Qg=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Ex=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),$x=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),Co=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let a=e[s-1],h=e[s+1];if(Ix(a,h))o=a+","+h,s++,i.pop()}i.push(Ox(o))}return i.join("")},"parseGenericTypes"),la=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Ix=t((r,e)=>{let i=la(r,"~"),s=la(e,"~");return i===1&&s===1},"shouldCombineSets"),Ox=t((r)=>{let e=la(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),a=s.lastIndexOf("~");while(o!==-1&&a!==-1&&o!==a)s[o]="<",s[a]=">",o=s.indexOf("~"),a=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),Xc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ho=/\$\$(.*?)\$\$/g,Dt=t((r)=>(r.match(Ho)?.length??0)>0,"hasKatex"),dc=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await pc(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),Dx=t(async(r,e)=>{if(!Dt(r))return r;if(!(Xc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Ho,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Xc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(ll).map((o)=>Dt(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Ho,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Ho,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),pc=t(async(r,e)=>ee(await Dx(r,e),e),"renderKatexSanitized"),w={getRows:_x,sanitizeText:ee,sanitizeTextOrArray:Lx,hasBreaks:Fx,splitBreaks:Mx,lineBreakRegex:ll,removeScript:eu,getUrl:Qg,evaluate:Jr,getMax:Ex,getMin:$x},Px=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Rx=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),te=t(function(r,e,i,s){let o=Rx(e,i,s);Px(r,o)},"configureSvgSize"),Zr=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:h}=o;l.info(`SVG bounds: ${a}x${h}`,o);let n=0,u=0;l.info(`Graph bounds: ${n}x${u}`,r),n=a+i*2,u=h+i*2,l.info(`Calculated bounds: ${n}x${u}`),te(e,u,n,s);let d=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",d)},"setupGraphViewbox"),Yo={};function Wp(r){return[...r.cssRules].map((e)=>e.cssText).join(`
4
+ `)}t(Wp,"cssStyleSheetToString");var qx=t((r,e,i,s)=>{let o="";if(r in Yo&&Yo[r])o=Yo[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
5
+ font-family: ${i.fontFamily};
6
+ font-size: ${i.fontSize};
7
+ fill: ${i.textColor}
8
+ }
9
+ @keyframes edge-animation-frame {
10
+ from {
11
+ stroke-dashoffset: 0;
12
+ }
13
+ }
14
+ @keyframes dash {
15
+ to {
16
+ stroke-dashoffset: 0;
17
+ }
18
+ }
19
+ & .edge-animation-slow {
20
+ stroke-dasharray: 9,5 !important;
21
+ stroke-dashoffset: 900;
22
+ animation: dash 50s linear infinite;
23
+ stroke-linecap: round;
24
+ }
25
+ & .edge-animation-fast {
26
+ stroke-dasharray: 9,5 !important;
27
+ stroke-dashoffset: 900;
28
+ animation: dash 20s linear infinite;
29
+ stroke-linecap: round;
30
+ }
31
+ /* Classes common for multiple diagrams */
32
+
33
+ & .error-icon {
34
+ fill: ${i.errorBkgColor};
35
+ }
36
+ & .error-text {
37
+ fill: ${i.errorTextColor};
38
+ stroke: ${i.errorTextColor};
39
+ }
40
+
41
+ & .edge-thickness-normal {
42
+ stroke-width: ${i.strokeWidth??1}px;
43
+ }
44
+ & .edge-thickness-thick {
45
+ stroke-width: 3.5px
46
+ }
47
+ & .edge-pattern-solid {
48
+ stroke-dasharray: 0;
49
+ }
50
+ & .edge-thickness-invisible {
51
+ stroke-width: 0;
52
+ fill: none;
53
+ }
54
+ & .edge-pattern-dashed{
55
+ stroke-dasharray: 3;
56
+ }
57
+ .edge-pattern-dotted {
58
+ stroke-dasharray: 2;
59
+ }
60
+
61
+ & .marker {
62
+ fill: ${i.lineColor};
63
+ stroke: ${i.lineColor};
64
+ }
65
+ & .marker.cross {
66
+ stroke: ${i.lineColor};
67
+ }
68
+
69
+ & svg {
70
+ font-family: ${i.fontFamily};
71
+ font-size: ${i.fontSize};
72
+ }
73
+ & p {
74
+ margin: 0
75
+ }
76
+
77
+ ${o}
78
+ .node .neo-node {
79
+ stroke: ${i.nodeBorder};
80
+ }
81
+
82
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
83
+ stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
84
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
85
+ }
86
+ [data-look="neo"].swimlane.cluster rect {
87
+ filter: none;
88
+ }
89
+
90
+
91
+ [data-look="neo"].node path {
92
+ stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
93
+ stroke-width: ${i.strokeWidth??1}px;
94
+ }
95
+
96
+ [data-look="neo"].node .outer-path {
97
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
98
+ }
99
+
100
+ [data-look="neo"].node .neo-line path {
101
+ stroke: ${i.nodeBorder};
102
+ filter: none;
103
+ }
104
+
105
+ [data-look="neo"].node circle{
106
+ stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
107
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
108
+ }
109
+
110
+ [data-look="neo"].node circle .state-start{
111
+ fill: #000000;
112
+ }
113
+
114
+ [data-look="neo"].icon-shape .icon {
115
+ fill: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
116
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
117
+ }
118
+
119
+ [data-look="neo"].icon-shape .icon-neo path {
120
+ stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
121
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
122
+ }
123
+
124
+ ${e}
125
+ `},"getStyles"),Wx=t((r,e)=>{if(e!==void 0)Yo[r]=e},"addStylesForDiagram"),th=qx,Kp={};xo(Kp,{clear:()=>F,getAccDescription:()=>j,getAccTitle:()=>G,getDiagramTitle:()=>H,setAccDescription:()=>z,setAccTitle:()=>O,setDiagramTitle:()=>q});var ha="",ca="",ua="",da=t((r)=>ee(r,C()),"sanitizeText"),F=t(()=>{ha="",ua="",ca=""},"clear"),O=t((r)=>{ha=da(r).replace(/^\s+/g,"")},"setAccTitle"),G=t(()=>ha,"getAccTitle"),z=t((r)=>{ua=da(r).replace(/\n\s+/g,`
126
+ `)},"setAccDescription"),j=t(()=>ua,"getAccDescription"),q=t((r)=>{ca=da(r)},"setDiagramTitle"),H=t(()=>ca,"getDiagramTitle"),Gc=l,Nx=cd,m=C,ya=Ng,Vi=oi,Go=t((r)=>ee(r,m()),"sanitizeText"),mc=Zr,zx=t(()=>Kp,"getCommonDb"),Xo={},dd=t((r,e,i)=>{if(Xo[r])Gc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(Xo[r]=e,i)Vc(r,i);Wx(r,e.styles),e.injectUtils?.(Gc,Nx,m,Go,mc,zx(),()=>{})},"registerDiagram"),Vp=t((r)=>{if(r in Xo)return Xo[r];throw new Hx(r)},"getDiagram"),Hx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class Ii extends Map{constructor(r,e=Ux){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(iu(this,r))}has(r){return super.has(iu(this,r))}set(r,e){return super.set(Yx(this,r),e)}delete(r){return super.delete(jx(this,r))}}function iu({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Yx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function jx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Ux(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Xx={value:()=>{}};function su(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new Vo(i)}function Vo(r){this._=r}function Gx(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}Vo.prototype=su.prototype={constructor:Vo,on:function(r,e){var i=this._,s=Gx(r+"",i),o,a=-1,h=s.length;if(arguments.length<2){while(++a<h)if((o=(r=s[a]).type)&&(o=Vx(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<h)if(o=(r=s[a]).type)i[o]=ou(i[o],r.name,e);else if(e==null)for(o in i)i[o]=ou(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Vo(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function Vx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function ou(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Xx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var fa=su;var Ko="http://www.w3.org/1999/xhtml",pa={svg:"http://www.w3.org/2000/svg",xhtml:Ko,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xe(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return pa.hasOwnProperty(e)?{space:pa[e],local:r}:r}function Kx(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Ko&&e.documentElement.namespaceURI===Ko?e.createElement(r):e.createElementNS(i,r)}}function Zx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Oi(r){var e=Xe(r);return(e.local?Zx:Kx)(e)}function Qx(){}function yr(r){return r==null?Qx:function(){return this.querySelector(r)}}function ga(r){if(typeof r!=="function")r=yr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=Array(h),u,d,c=0;c<h;++c)if((u=a[c])&&(d=r.call(u,u.__data__,c,a))){if("__data__"in u)d.__data__=u.__data__;n[c]=d}return new fe(s,this._parents)}function ma(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function Jx(){return[]}function Yr(r){return r==null?Jx:function(){return this.querySelectorAll(r)}}function t0(r){return function(){return ma(r.apply(this,arguments))}}function Ca(r){if(typeof r==="function")r=t0(r);else r=Yr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var h=e[a],n=h.length,u,d=0;d<n;++d)if(u=h[d])s.push(r.call(u,u.__data__,d,h)),o.push(u);return new fe(s,o)}function jr(r){return function(){return this.matches(r)}}function Zo(r){return function(e){return e.matches(r)}}var e0=Array.prototype.find;function r0(r){return function(){return e0.call(this.children,r)}}function i0(){return this.firstElementChild}function Sa(r){return this.select(r==null?i0:r0(typeof r==="function"?r:Zo(r)))}var o0=Array.prototype.filter;function s0(){return Array.from(this.children)}function a0(r){return function(){return o0.call(this.children,r)}}function Ta(r){return this.selectAll(r==null?s0:a0(typeof r==="function"?r:Zo(r)))}function Ba(r){if(typeof r!=="function")r=jr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=[],u,d=0;d<h;++d)if((u=a[d])&&r.call(u,u.__data__,d,a))n.push(u);return new fe(s,this._parents)}function Di(r){return Array(r.length)}function _a(){return new fe(this._enter||this._groups.map(Di),this._parents)}function Pi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Pi.prototype={constructor:Pi,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function La(r){return function(){return r}}function n0(r,e,i,s,o,a){var h=0,n,u=e.length,d=a.length;for(;h<d;++h)if(n=e[h])n.__data__=a[h],s[h]=n;else i[h]=new Pi(r,a[h]);for(;h<u;++h)if(n=e[h])o[h]=n}function l0(r,e,i,s,o,a,h){var n,u,d=new Map,c=e.length,f=a.length,p=Array(c),x;for(n=0;n<c;++n)if(u=e[n])if(p[n]=x=h.call(u,u.__data__,n,e)+"",d.has(x))o[n]=u;else d.set(x,u);for(n=0;n<f;++n)if(x=h.call(r,a[n],n,a)+"",u=d.get(x))s[n]=u,u.__data__=a[n],d.delete(x);else i[n]=new Pi(r,a[n]);for(n=0;n<c;++n)if((u=e[n])&&d.get(p[n])===u)o[n]=u}function h0(r){return r.__data__}function Fa(r,e){if(!arguments.length)return Array.from(this,h0);var i=e?l0:n0,s=this._parents,o=this._groups;if(typeof r!=="function")r=La(r);for(var a=o.length,h=Array(a),n=Array(a),u=Array(a),d=0;d<a;++d){var c=s[d],f=o[d],p=f.length,x=c0(r.call(c,c&&c.__data__,d,s)),S=x.length,T=n[d]=Array(S),B=h[d]=Array(S),_=u[d]=Array(p);i(c,f,T,B,_,x,e);for(var v=0,E=0,D,P;v<S;++v)if(D=T[v]){if(v>=E)E=v+1;while(!(P=B[E])&&++E<S);D._next=P||null}}return h=new fe(h,s),h._enter=n,h._exit=u,h}function c0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Ma(){return new fe(this._exit||this._groups.map(Di),this._parents)}function Aa(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function Ea(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,h=Math.min(o,a),n=Array(o),u=0;u<h;++u)for(var d=i[u],c=s[u],f=d.length,p=n[u]=Array(f),x,S=0;S<f;++S)if(x=d[S]||c[S])p[S]=x;for(;u<o;++u)n[u]=i[u];return new fe(n,this._parents)}function $a(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],h;--o>=0;)if(h=s[o]){if(a&&h.compareDocumentPosition(a)^4)a.parentNode.insertBefore(h,a);a=h}return this}function Ia(r){if(!r)r=u0;function e(f,p){return f&&p?r(f.__data__,p.__data__):!f-!p}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var h=i[a],n=h.length,u=o[a]=Array(n),d,c=0;c<n;++c)if(d=h[c])u[c]=d;u.sort(e)}return new fe(o,this._parents).order()}function u0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function Oa(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Da(){return Array.from(this)}function Pa(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var h=s[o];if(h)return h}return null}function Ra(){let r=0;for(let e of this)++r;return r}function qa(){return!this.node()}function Wa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,h=o.length,n;a<h;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function d0(r){return function(){this.removeAttribute(r)}}function f0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function p0(r,e){return function(){this.setAttribute(r,e)}}function g0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function m0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function y0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function Na(r,e){var i=Xe(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?f0:d0:typeof e==="function"?i.local?y0:m0:i.local?g0:p0)(i,e))}function Ri(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function x0(r){return function(){this.style.removeProperty(r)}}function C0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function b0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function za(r,e,i){return arguments.length>1?this.each((e==null?x0:typeof e==="function"?b0:C0)(r,e,i==null?"":i)):xr(this.node(),r)}function xr(r,e){return r.style.getPropertyValue(e)||Ri(r).getComputedStyle(r,null).getPropertyValue(e)}function k0(r){return function(){delete this[r]}}function w0(r,e){return function(){this[r]=e}}function S0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ha(r,e){return arguments.length>1?this.each((e==null?k0:typeof e==="function"?S0:w0)(r,e)):this.node()[r]}function au(r){return r.trim().split(/^|\s+/)}function Ya(r){return r.classList||new nu(r)}function nu(r){this._node=r,this._names=au(r.getAttribute("class")||"")}nu.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function lu(r,e){var i=Ya(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function hu(r,e){var i=Ya(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function T0(r){return function(){lu(this,r)}}function B0(r){return function(){hu(this,r)}}function _0(r,e){return function(){(e.apply(this,arguments)?lu:hu)(this,r)}}function ja(r,e){var i=au(r+"");if(arguments.length<2){var s=Ya(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?_0:e?T0:B0)(i,e))}function v0(){this.textContent=""}function L0(r){return function(){this.textContent=r}}function F0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ua(r){return arguments.length?this.each(r==null?v0:(typeof r==="function"?F0:L0)(r)):this.node().textContent}function M0(){this.innerHTML=""}function A0(r){return function(){this.innerHTML=r}}function E0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function Xa(r){return arguments.length?this.each(r==null?M0:(typeof r==="function"?E0:A0)(r)):this.node().innerHTML}function $0(){if(this.nextSibling)this.parentNode.appendChild(this)}function Ga(){return this.each($0)}function I0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Va(){return this.each(I0)}function Ka(r){var e=typeof r==="function"?r:Oi(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function O0(){return null}function Qa(r,e){var i=typeof r==="function"?r:Oi(r),s=e==null?O0:typeof e==="function"?e:yr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function D0(){var r=this.parentNode;if(r)r.removeChild(this)}function tn(){return this.each(D0)}function P0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function R0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function en(r){return this.select(r?R0:P0)}function rn(r){return arguments.length?this.property("__data__",r):this.node().__data__}function q0(r){return function(e){r.call(this,e,this.__data__)}}function W0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function N0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function z0(r,e,i){return function(){var s=this.__on,o,a=q0(e);if(s){for(var h=0,n=s.length;h<n;++h)if((o=s[h]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function on(r,e,i){var s=W0(r+""),o,a=s.length,h;if(arguments.length<2){var n=this.node().__on;if(n){for(var u=0,d=n.length,c;u<d;++u)for(o=0,c=n[u];o<a;++o)if((h=s[o]).type===c.type&&h.name===c.name)return c.value}return}n=e?z0:N0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function cu(r,e,i){var s=Ri(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function H0(r,e){return function(){return cu(this,r,e)}}function Y0(r,e){return function(){return cu(this,r,e.apply(this,arguments))}}function sn(r,e){return this.each((typeof e==="function"?Y0:H0)(r,e))}function*an(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,h;o<a;++o)if(h=s[o])yield h}var nn=[null];function fe(r,e){this._groups=r,this._parents=e}function uu(){return new fe([[document.documentElement]],nn)}function j0(){return this}fe.prototype=uu.prototype={constructor:fe,select:ga,selectAll:Ca,selectChild:Sa,selectChildren:Ta,filter:Ba,data:Fa,enter:_a,exit:Ma,join:Aa,merge:Ea,selection:j0,order:$a,sort:Ia,call:Oa,nodes:Da,node:Pa,size:Ra,empty:qa,each:Wa,attr:Na,style:za,property:Ha,classed:ja,text:Ua,html:Xa,raise:Ga,lower:Va,append:Ka,insert:Qa,remove:tn,clone:en,datum:rn,on,dispatch:sn,[Symbol.iterator]:an};var nr=uu;function b(r){return typeof r==="string"?new fe([[document.querySelector(r)]],[document.documentElement]):new fe([[r]],nn)}function Yi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function fc(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Ji(){}var qi=0.7,ts=1/qi,Ur="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",U0=/^#([0-9a-f]{3,8})$/,X0=new RegExp(`^rgb\\(${Ur},${Ur},${Ur}\\)$`),G0=new RegExp(`^rgb\\(${Ge},${Ge},${Ge}\\)$`),V0=new RegExp(`^rgba\\(${Ur},${Ur},${Ur},${Wi}\\)$`),K0=new RegExp(`^rgba\\(${Ge},${Ge},${Ge},${Wi}\\)$`),Z0=new RegExp(`^hsl\\(${Wi},${Ge},${Ge}\\)$`),Q0=new RegExp(`^hsla\\(${Wi},${Ge},${Ge},${Wi}\\)$`),du={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};Yi(Ji,Ja,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:fu,formatHex:fu,formatHex8:J0,formatHsl:tC,formatRgb:pu,toString:pu});function fu(){return this.rgb().formatHex()}function J0(){return this.rgb().formatHex8()}function tC(){return bu(this).formatHsl()}function pu(){return this.rgb().formatRgb()}function Ja(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=U0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?gu(e):i===3?new $n(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=X0.exec(r))?new $n(e[1],e[2],e[3],1):(e=G0.exec(r))?new $n(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=V0.exec(r))?Qo(e[1],e[2],e[3],e[4]):(e=K0.exec(r))?Qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Z0.exec(r))?xu(e[1],e[2]/100,e[3]/100,1):(e=Q0.exec(r))?xu(e[1],e[2]/100,e[3]/100,e[4]):du.hasOwnProperty(r)?gu(du[r]):r==="transparent"?new $n(NaN,NaN,NaN,0):null}function gu(r){return new $n(r>>16&255,r>>8&255,r&255,1)}function Qo(r,e,i,s){if(s<=0)r=e=i=NaN;return new $n(r,e,i,s)}function Rg(r){if(!(r instanceof Ji))r=Ja(r);if(!r)return new $n;return r=r.rgb(),new $n(r.r,r.g,r.b,r.opacity)}function Gr(r,e,i,s){return arguments.length===1?Rg(r):new $n(r,e,i,s==null?1:s)}function $n(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Yi($n,Gr,fc(Ji,{brighter(r){return r=r==null?ts:Math.pow(ts,r),new $n(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?qi:Math.pow(qi,r),new $n(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new $n(_r(this.r),_r(this.g),_r(this.b),rs(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:mu,formatHex:mu,formatHex8:eC,formatRgb:yu,toString:yu}));function mu(){return`#${Br(this.r)}${Br(this.g)}${Br(this.b)}`}function eC(){return`#${Br(this.r)}${Br(this.g)}${Br(this.b)}${Br((isNaN(this.opacity)?1:this.opacity)*255)}`}function yu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${_r(this.r)}, ${_r(this.g)}, ${_r(this.b)}${r===1?")":`, ${r})`}`}function rs(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function _r(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Br(r){return r=_r(r),(r<16?"0":"")+r.toString(16)}function xu(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new Re(r,e,i,s)}function bu(r){if(r instanceof Re)return new Re(r.h,r.s,r.l,r.opacity);if(!(r instanceof Ji))r=Ja(r);if(!r)return new Re;if(r instanceof Re)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),h=NaN,n=a-o,u=(a+o)/2;if(n){if(e===a)h=(i-s)/n+(i<s)*6;else if(i===a)h=(s-e)/n+2;else h=(e-i)/n+4;n/=u<0.5?a+o:2-a-o,h*=60}else n=u>0&&u<1?0:h;return new Re(h,n,u,r.opacity)}function ku(r,e,i,s){return arguments.length===1?bu(r):new Re(r,e,i,s==null?1:s)}function Re(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Yi(Re,ku,fc(Ji,{brighter(r){return r=r==null?ts:Math.pow(ts,r),new Re(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?qi:Math.pow(qi,r),new Re(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new $n(ln(r>=240?r-240:r+120,o,s),ln(r,o,s),ln(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Re(Cu(this.h),Jo(this.s),Jo(this.l),rs(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(){let r=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${Cu(this.h)}, ${Jo(this.s)*100}%, ${Jo(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Cu(r){return r=(r||0)%360,r<0?r+360:r}function Jo(r){return Math.max(0,Math.min(1,r||0))}function ln(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function hn(r,e,i,s,o){var a=r*r,h=a*r;return((1-3*r+3*a-h)*e+(4-6*a+3*h)*i+(1+3*r+3*a-3*h)*s+h*o)/6}function cn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],h=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return hn((i-s/e)*e,h,o,a,n)}}function un(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],h=r[(s+1)%e],n=r[(s+2)%e];return hn((i-s/e)*e,o,a,h,n)}}var gc=(r)=>()=>r;function wu(r,e){return function(i){return r+i*e}}function rC(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function nh(r,e){var i=e-r;return i?wu(r,i>180||i<-180?i-360*Math.round(i/360):i):gc(isNaN(r)?e:r)}function Su(r){return(r=+r)===1?ii:function(e,i){return i-e?rC(e,i,r):gc(isNaN(e)?i:e)}}function ii(r,e){var i=e-r;return i?wu(r,i):gc(isNaN(r)?e:r)}var cl=function r(e){var i=Su(e);function s(o,a){var h=i((o=Gr(o)).r,(a=Gr(a)).r),n=i(o.g,a.g),u=i(o.b,a.b),d=ii(o.opacity,a.opacity);return function(c){return o.r=h(c),o.g=n(c),o.b=u(c),o.opacity=d(c),o+""}}return s.gamma=r,s}(1);function Tu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),h,n;for(h=0;h<i;++h)n=Gr(e[h]),s[h]=n.r||0,o[h]=n.g||0,a[h]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(u){return n.r=s(u),n.g=o(u),n.b=a(u),n+""}}}var iC=Tu(cn),oC=Tu(un);function Rn(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var fn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dn=new RegExp(fn.source,"g");function sC(r){return function(){return r}}function aC(r){return function(e){return r(e)+""}}function Ac(r,e){var i=fn.lastIndex=dn.lastIndex=0,s,o,a,h=-1,n=[],u=[];r=r+"",e=e+"";while((s=fn.exec(r))&&(o=dn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[h])n[h]+=a;else n[++h]=a;if((s=s[0])===(o=o[0]))if(n[h])n[h]+=o;else n[++h]=o;else n[++h]=null,u.push({i:h,x:Rn(s,o)});i=dn.lastIndex}if(i<e.length)if(a=e.slice(i),n[h])n[h]+=a;else n[++h]=a;return n.length<2?u[0]?aC(u[0].x):sC(e):(e=u.length,function(d){for(var c=0,f;c<e;++c)n[(f=u[c]).i]=f.x(d);return n.join("")})}var Bu=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var h,n,u;if(h=Math.sqrt(r*r+e*e))r/=h,e/=h;if(u=r*i+e*s)i-=r*u,s-=e*u;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,u/=n;if(r*s<e*i)r=-r,e=-e,u=-u,h=-h;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*Bu,skewX:Math.atan(u)*Bu,scaleX:h,scaleY:n}}var ss;function _u(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function vu(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Lu(r,e,i,s){function o(d){return d.length?d.pop()+" ":""}function a(d,c,f,p,x,S){if(d!==f||c!==p){var T=x.push("translate(",null,e,null,i);S.push({i:T-4,x:Rn(d,f)},{i:T-2,x:Rn(c,p)})}else if(f||p)x.push("translate("+f+e+p+i)}function h(d,c,f,p){if(d!==c){if(d-c>180)c+=360;else if(c-d>180)d+=360;p.push({i:f.push(o(f)+"rotate(",null,s)-2,x:Rn(d,c)})}else if(c)f.push(o(f)+"rotate("+c+s)}function n(d,c,f,p){if(d!==c)p.push({i:f.push(o(f)+"skewX(",null,s)-2,x:Rn(d,c)});else if(c)f.push(o(f)+"skewX("+c+s)}function u(d,c,f,p,x,S){if(d!==f||c!==p){var T=x.push(o(x)+"scale(",null,",",null,")");S.push({i:T-4,x:Rn(d,f)},{i:T-2,x:Rn(c,p)})}else if(f!==1||p!==1)x.push(o(x)+"scale("+f+","+p+")")}return function(d,c){var f=[],p=[];return d=r(d),c=r(c),a(d.translateX,d.translateY,c.translateX,c.translateY,f,p),h(d.rotate,c.rotate,f,p),n(d.skewX,c.skewX,f,p),u(d.scaleX,d.scaleY,c.scaleX,c.scaleY,f,p),d=c=null,function(x){var S=-1,T=p.length,B;while(++S<T)f[(B=p[S]).i]=B.x(x);return f.join("")}}}var pn=Lu(_u,"px, ","px)","deg)"),mn=Lu(vu,", ",")",")");var Vr=0,zi=0,Ni=0,Mu=1000,as,Hi,ns=0,vr=0,ls=0,ji=typeof performance==="object"&&performance.now?performance:Date,Au=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Gi(){return vr||(Au(nC),vr=ji.now()+ls)}function nC(){vr=0}function Ui(){this._call=this._time=this._next=null}Ui.prototype=hs.prototype={constructor:Ui,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Gi():+i)+(e==null?0:+e),!this._next&&Hi!==this){if(Hi)Hi._next=this;else as=this;Hi=this}this._call=r,this._time=i,yn()},stop:function(){if(this._call)this._call=null,this._time=1/0,yn()}};function hs(r,e,i){var s=new Ui;return s.restart(r,e,i),s}function Eu(){Gi(),++Vr;var r=as,e;while(r){if((e=vr-r._time)>=0)r._call.call(void 0,e);r=r._next}--Vr}function Fu(){vr=(ns=ji.now())+ls,Vr=zi=0;try{Eu()}finally{Vr=0,hC(),vr=0}}function lC(){var r=ji.now(),e=r-ns;if(e>Mu)ls-=e,ns=r}function hC(){var r,e=as,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:as=i;Hi=r,yn(s)}function yn(r){if(Vr)return;if(zi)zi=clearTimeout(zi);var e=r-vr;if(e>24){if(r<1/0)zi=setTimeout(Fu,r-ji.now()-ls);if(Ni)Ni=clearInterval(Ni)}else{if(!Ni)ns=ji.now(),Ni=setInterval(lC,Mu);Vr=1,Au(Fu)}}function Qi(r,e,i){var s=new Ui;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var cC=fa("start","end","cancel","interrupt"),uC=[],Ou=0,$u=1,us=2,cs=3,Iu=4,ds=5,to=6;function lr(r,e,i,s,o,a){var h=r.__transition;if(!h)r.__transition={};else if(i in h)return;dC(r,i,{name:e,index:s,group:o,on:cC,tween:uC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ou})}function eo(r,e){var i=Ce(r,e);if(i.state>Ou)throw Error("too late; already scheduled");return i}function ke(r,e){var i=Ce(r,e);if(i.state>cs)throw Error("too late; already running");return i}function Ce(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function dC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(d){if(i.state=$u,i.timer.restart(h,i.delay,i.time),i.delay<=d)h(d-i.delay)}function h(d){var c,f,p,x;if(i.state!==$u)return u();for(c in s){if(x=s[c],x.name!==i.name)continue;if(x.state===cs)return Qi(h);if(x.state===Iu)x.state=to,x.timer.stop(),x.on.call("interrupt",r,r.__data__,x.index,x.group),delete s[c];else if(+c<e)x.state=to,x.timer.stop(),x.on.call("cancel",r,r.__data__,x.index,x.group),delete s[c]}if(Qi(function(){if(i.state===cs)i.state=Iu,i.timer.restart(n,i.delay,i.time),n(d)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(p=i.tween.length);for(c=0,f=-1;c<p;++c)if(x=i.tween[c].value.call(r,r.__data__,i.index,i.group))o[++f]=x;o.length=f+1}function n(d){var c=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(u),i.state=ds,1),f=-1,p=o.length;while(++f<p)o[f].call(r,c);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),u()}function u(){i.state=to,i.timer.stop(),delete s[e];for(var d in s)return;delete r.__transition}}function ro(r,e){var i=r.__transition,s,o,a=!0,h;if(!i)return;e=e==null?null:e+"";for(h in i){if((s=i[h]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=to,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[h]}if(a)delete r.__transition}function xn(r){return this.each(function(){ro(this,r)})}function fC(r,e){var i,s;return function(){var o=ke(this,r),a=o.tween;if(a!==i){s=i=a;for(var h=0,n=s.length;h<n;++h)if(s[h].name===e){s=s.slice(),s.splice(h,1);break}}o.tween=s}}function pC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=ke(this,r),h=a.tween;if(h!==s){o=(s=h).slice();for(var n={name:e,value:i},u=0,d=o.length;u<d;++u)if(o[u].name===e){o[u]=n;break}if(u===d)o.push(n)}a.tween=o}}function Cn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=Ce(this.node(),i).tween;for(var o=0,a=s.length,h;o<a;++o)if((h=s[o]).name===r)return h.value;return null}return this.each((e==null?fC:pC)(i,r,e))}function Kr(r,e,i){var s=r._id;return r.each(function(){var o=ke(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return Ce(o,s).value[e]}}function io(r,e){var i;return(typeof e==="number"?Rn:e instanceof Ja?cl:(i=Ja(e))?(e=i,cl):Ac)(r,e)}function gC(r){return function(){this.removeAttribute(r)}}function mC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function yC(r,e,i){var s,o=i+"",a;return function(){var h=this.getAttribute(r);return h===o?null:h===s?a:a=e(s=h,i)}}function xC(r,e,i){var s,o=i+"",a;return function(){var h=this.getAttributeNS(r.space,r.local);return h===o?null:h===s?a:a=e(s=h,i)}}function CC(r,e,i){var s,o,a;return function(){var h,n=i(this),u;if(n==null)return void this.removeAttribute(r);return h=this.getAttribute(r),u=n+"",h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function bC(r,e,i){var s,o,a;return function(){var h,n=i(this),u;if(n==null)return void this.removeAttributeNS(r.space,r.local);return h=this.getAttributeNS(r.space,r.local),u=n+"",h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function bn(r,e){var i=Xe(r),s=i==="transform"?mn:io;return this.attrTween(r,typeof e==="function"?(i.local?bC:CC)(i,s,Kr(this,"attr."+r,e)):e==null?(i.local?mC:gC)(i):(i.local?xC:yC)(i,s,e))}function kC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function wC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function SC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&wC(r,a);return i}return o._value=e,o}function TC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&kC(r,a);return i}return o._value=e,o}function kn(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Xe(r);return this.tween(i,(s.local?SC:TC)(s,e))}function BC(r,e){return function(){eo(this,r).delay=+e.apply(this,arguments)}}function _C(r,e){return e=+e,function(){eo(this,r).delay=e}}function wn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?BC:_C)(e,r)):Ce(this.node(),e).delay}function vC(r,e){return function(){ke(this,r).duration=+e.apply(this,arguments)}}function LC(r,e){return e=+e,function(){ke(this,r).duration=e}}function Sn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?vC:LC)(e,r)):Ce(this.node(),e).duration}function FC(r,e){if(typeof e!=="function")throw Error();return function(){ke(this,r).ease=e}}function Tn(r){var e=this._id;return arguments.length?this.each(FC(e,r)):Ce(this.node(),e).ease}function MC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();ke(this,r).ease=i}}function Bn(r){if(typeof r!=="function")throw Error();return this.each(MC(this._id,r))}function _n(r){if(typeof r!=="function")r=jr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=[],u,d=0;d<h;++d)if((u=a[d])&&r.call(u,u.__data__,d,a))n.push(u);return new Fe(s,this._parents,this._name,this._id)}function Mn(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),h=Array(s),n=0;n<a;++n)for(var u=e[n],d=i[n],c=u.length,f=h[n]=Array(c),p,x=0;x<c;++x)if(p=u[x]||d[x])f[x]=p;for(;n<s;++n)h[n]=e[n];return new Fe(h,this._parents,this._name,this._id)}function AC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function EC(r,e,i){var s,o,a=AC(e)?eo:ke;return function(){var h=a(this,r),n=h.on;if(n!==s)(o=(s=n).copy()).on(e,i);h.on=o}}function An(r,e){var i=this._id;return arguments.length<2?Ce(this.node(),i).on.on(r):this.each(EC(i,r,e))}function $C(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function En(){return this.on("end.remove",$C(this._id))}function In(r){var e=this._name,i=this._id;if(typeof r!=="function")r=yr(r);for(var s=this._groups,o=s.length,a=Array(o),h=0;h<o;++h)for(var n=s[h],u=n.length,d=a[h]=Array(u),c,f,p=0;p<u;++p)if((c=n[p])&&(f=r.call(c,c.__data__,p,n))){if("__data__"in c)f.__data__=c.__data__;d[p]=f,lr(d[p],e,i,p,d,Ce(c,i))}return new Fe(a,this._parents,e,i)}function On(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Yr(r);for(var s=this._groups,o=s.length,a=[],h=[],n=0;n<o;++n)for(var u=s[n],d=u.length,c,f=0;f<d;++f)if(c=u[f]){for(var p=r.call(c,c.__data__,f,u),x,S=Ce(c,i),T=0,B=p.length;T<B;++T)if(x=p[T])lr(x,e,i,T,p,S);a.push(p),h.push(c)}return new Fe(a,h,e,i)}var IC=nr.prototype.constructor;function Dn(){return new IC(this._groups,this._parents)}function OC(r,e){var i,s,o;return function(){var a=xr(this,r),h=(this.style.removeProperty(r),xr(this,r));return a===h?null:a===i&&h===s?o:o=e(i=a,s=h)}}function Du(r){return function(){this.style.removeProperty(r)}}function DC(r,e,i){var s,o=i+"",a;return function(){var h=xr(this,r);return h===o?null:h===s?a:a=e(s=h,i)}}function PC(r,e,i){var s,o,a;return function(){var h=xr(this,r),n=i(this),u=n+"";if(n==null)u=n=(this.style.removeProperty(r),xr(this,r));return h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function RC(r,e){var i,s,o,a="style."+e,h="end."+a,n;return function(){var u=ke(this,r),d=u.on,c=u.value[a]==null?n||(n=Du(e)):void 0;if(d!==i||o!==c)(s=(i=d).copy()).on(h,o=c);u.on=s}}function Pn(r,e,i){var s=(r+="")==="transform"?pn:io;return e==null?this.styleTween(r,OC(r,s)).on("end.style."+r,Du(r)):typeof e==="function"?this.styleTween(r,PC(r,s,Kr(this,"style."+r,e))).each(RC(this._id,r)):this.styleTween(r,DC(r,s,e),i).on("end.style."+r,null)}function qC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function WC(r,e,i){var s,o;function a(){var h=e.apply(this,arguments);if(h!==o)s=(o=h)&&qC(r,h,i);return s}return a._value=e,a}function qn(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,WC(r,e,i==null?"":i))}function NC(r){return function(){this.textContent=r}}function zC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Wn(r){return this.tween("text",typeof r==="function"?zC(Kr(this,"text",r)):NC(r==null?"":r+""))}function HC(r){return function(e){this.textContent=r.call(this,e)}}function YC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&HC(o);return e}return s._value=r,s}function Nn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,YC(r))}function Hn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var h=s[a],n=h.length,u,d=0;d<n;++d)if(u=h[d]){var c=Ce(u,e);lr(u,r,i,d,h,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Fe(s,this._parents,r,i)}function Yn(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,h){var n={value:h},u={value:function(){if(--o===0)a()}};if(i.each(function(){var d=ke(this,s),c=d.on;if(c!==r)e=(r=c).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(u);d.on=e}),o===0)a()})}var jC=0;function Fe(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Pu(r){return nr().transition(r)}function fs(){return++jC}var hr=nr.prototype;Fe.prototype=Pu.prototype={constructor:Fe,select:In,selectAll:On,selectChild:hr.selectChild,selectChildren:hr.selectChildren,filter:_n,merge:Mn,selection:Dn,transition:Hn,call:hr.call,nodes:hr.nodes,node:hr.node,size:hr.size,empty:hr.empty,each:hr.each,on:An,attr:bn,attrTween:kn,style:Pn,styleTween:qn,text:Wn,textTween:Nn,remove:En,tween:Cn,delay:wn,duration:Sn,ease:Tn,easeVarying:Bn,end:Yn,[Symbol.iterator]:hr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var UC={time:null,delay:0,duration:250,ease:ps};function XC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function jn(r){var e,i;if(r instanceof Fe)e=r._id,r=r._name;else e=fs(),(i=UC).time=Gi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var h=s[a],n=h.length,u,d=0;d<n;++d)if(u=h[d])lr(u,r,e,d,h,i||XC(u,e));return new Fe(s,this._parents,r,e)}nr.prototype.interrupt=xn;nr.prototype.transition=jn;var{abs:sF,max:aF,min:nF}=Math;function Ru(r){return[+r[0],+r[1]]}function GC(r){return[Ru(r[0]),Ru(r[1])]}var lF={name:"x",handles:["w","e"].map(Gn),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},hF={name:"y",handles:["n","s"].map(Gn),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},cF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Gn),input:function(r){return r==null?null:GC(r)},output:function(r){return r}};function Gn(r){return{type:r}}var Vn=Math.PI,Kn=2*Vn;var VC=Kn-0.000001;function qu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function KC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return qu;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Qr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?qu:KC(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,h=this._y1,n=i-r,u=s-e,d=a-r,c=h-e,f=d*d+c*c;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(f>0.000001));else if(!(Math.abs(c*n-u*d)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let p=i-a,x=s-h,S=n*n+u*u,T=p*p+x*x,B=Math.sqrt(S),_=Math.sqrt(f),v=o*Math.tan((Vn-Math.acos((S+f-T)/(2*B*_)))/2),E=v/_,D=v/B;if(Math.abs(E-1)>0.000001)this._append`L${r+E*d},${e+E*c}`;this._append`A${o},${o},0,0,${+(c*p>d*x)},${this._x1=r+D*n},${this._y1=e+D*u}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let h=i*Math.cos(s),n=i*Math.sin(s),u=r+h,d=e+n,c=1^a,f=a?s-o:o-s;if(this._x1===null)this._append`M${u},${d}`;else if(Math.abs(this._x1-u)>0.000001||Math.abs(this._y1-d)>0.000001)this._append`L${u},${d}`;if(!i)return;if(f<0)f=f%Kn+Kn;if(f>VC)this._append`A${i},${i},0,1,${c},${r-h},${e-n}A${i},${i},0,1,${c},${this._x1=u},${this._y1=d}`;else if(f>0.000001)this._append`A${i},${i},0,${+(f>=Vn)},${c},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Wu(){return new Qr}Wu.prototype=Qr.prototype;function Eo(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var Qn=Symbol("implicit");function Zn(){var r=new Ii,e=[],i=[],s=Qn;function o(a){let h=r.get(a);if(h===void 0){if(s!==Qn)return s;r.set(a,h=e.push(a)-1)}return i[h%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new Ii;for(let h of a){if(r.has(h))continue;r.set(h,e.push(h)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return Zn(e,i).unknown(s)},Eo.apply(o,arguments),o}function Ct(r){return function(){return r}}var{abs:Jn,atan2:we,cos:Cr,max:Nu,min:gs,sin:qe,sqrt:Lr}=Math,be=0.000000000001,ti=Math.PI,oo=ti/2,hc=2*ti;function zu(r){return r>1?0:r<-1?ti:Math.acos(r)}function tl(r){return r>=1?oo:r<=-1?-oo:Math.asin(r)}function ms(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Qr(e)}function ZC(r){return r.innerRadius}function QC(r){return r.outerRadius}function JC(r){return r.startAngle}function tb(r){return r.endAngle}function eb(r){return r&&r.padAngle}function rb(r,e,i,s,o,a,h,n){var u=i-r,d=s-e,c=h-o,f=n-a,p=f*u-c*d;if(p*p<be)return;return p=(c*(e-a)-f*(r-o))/p,[r+p*u,e+p*d]}function ys(r,e,i,s,o,a,h){var n=r-i,u=e-s,d=(h?a:-a)/Lr(n*n+u*u),c=d*u,f=-d*n,p=r+c,x=e+f,S=i+c,T=s+f,B=(p+S)/2,_=(x+T)/2,v=S-p,E=T-x,D=v*v+E*E,P=o-a,Z=p*T-S*x,Q=(E<0?-1:1)*Lr(Nu(0,P*P*D-Z*Z)),tt=(Z*E-v*Q)/D,it=(-Z*v-E*Q)/D,ft=(Z*E+v*Q)/D,dt=(-Z*v+E*Q)/D,st=tt-B,N=it-_,K=ft-B,et=dt-_;if(st*st+N*N>K*K+et*et)tt=ft,it=dt;return{cx:tt,cy:it,x01:-c,y01:-f,x11:tt*(o/P-1),y11:it*(o/P-1)}}function Xr(){var r=ZC,e=QC,i=Ct(0),s=null,o=JC,a=tb,h=eb,n=null,u=ms(d);function d(){var c,f,p=+r.apply(this,arguments),x=+e.apply(this,arguments),S=o.apply(this,arguments)-oo,T=a.apply(this,arguments)-oo,B=Jn(T-S),_=T>S;if(!n)n=c=u();if(x<p)f=x,x=p,p=f;if(!(x>be))n.moveTo(0,0);else if(B>hc-be){if(n.moveTo(x*Cr(S),x*qe(S)),n.arc(0,0,x,S,T,!_),p>be)n.moveTo(p*Cr(T),p*qe(T)),n.arc(0,0,p,T,S,_)}else{var v=S,E=T,D=S,P=T,Z=B,Q=B,tt=h.apply(this,arguments)/2,it=tt>be&&(s?+s.apply(this,arguments):Lr(p*p+x*x)),ft=gs(Jn(x-p)/2,+i.apply(this,arguments)),dt=ft,st=ft,N,K;if(it>be){var et=tl(it/p*qe(tt)),U=tl(it/x*qe(tt));if((Z-=et*2)>be)et*=_?1:-1,D+=et,P-=et;else Z=0,D=P=(S+T)/2;if((Q-=U*2)>be)U*=_?1:-1,v+=U,E-=U;else Q=0,v=E=(S+T)/2}var ut=x*Cr(v),nt=x*qe(v),_t=p*Cr(P),Lt=p*qe(P);if(ft>be){var Ut=x*Cr(E),Xt=x*qe(E),Qt=p*Cr(D),re=p*qe(D),It;if(B<ti)if(It=rb(ut,nt,Qt,re,Ut,Xt,_t,Lt)){var Mt=ut-It[0],Wt=nt-It[1],Gt=Ut-It[0],zt=Xt-It[1],he=1/qe(zu((Mt*Gt+Wt*zt)/(Lr(Mt*Mt+Wt*Wt)*Lr(Gt*Gt+zt*zt)))/2),le=Lr(It[0]*It[0]+It[1]*It[1]);dt=gs(ft,(p-le)/(he-1)),st=gs(ft,(x-le)/(he+1))}else dt=st=0}if(!(Q>be))n.moveTo(ut,nt);else if(st>be)if(N=ys(Qt,re,ut,nt,x,st,_),K=ys(Ut,Xt,_t,Lt,x,st,_),n.moveTo(N.cx+N.x01,N.cy+N.y01),st<ft)n.arc(N.cx,N.cy,st,we(N.y01,N.x01),we(K.y01,K.x01),!_);else n.arc(N.cx,N.cy,st,we(N.y01,N.x01),we(N.y11,N.x11),!_),n.arc(0,0,x,we(N.cy+N.y11,N.cx+N.x11),we(K.cy+K.y11,K.cx+K.x11),!_),n.arc(K.cx,K.cy,st,we(K.y11,K.x11),we(K.y01,K.x01),!_);else n.moveTo(ut,nt),n.arc(0,0,x,v,E,!_);if(!(p>be)||!(Z>be))n.lineTo(_t,Lt);else if(dt>be)if(N=ys(_t,Lt,Ut,Xt,p,-dt,_),K=ys(ut,nt,Qt,re,p,-dt,_),n.lineTo(N.cx+N.x01,N.cy+N.y01),dt<ft)n.arc(N.cx,N.cy,dt,we(N.y01,N.x01),we(K.y01,K.x01),!_);else n.arc(N.cx,N.cy,dt,we(N.y01,N.x01),we(N.y11,N.x11),!_),n.arc(0,0,p,we(N.cy+N.y11,N.cx+N.x11),we(K.cy+K.y11,K.cx+K.x11),_),n.arc(K.cx,K.cy,dt,we(K.y11,K.x11),we(K.y01,K.x01),!_);else n.arc(0,0,p,P,D,_)}if(n.closePath(),c)return n=null,c+""||null}return d.centroid=function(){var c=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[Cr(f)*c,qe(f)*c]},d.innerRadius=function(c){return arguments.length?(r=typeof c==="function"?c:Ct(+c),d):r},d.outerRadius=function(c){return arguments.length?(e=typeof c==="function"?c:Ct(+c),d):e},d.cornerRadius=function(c){return arguments.length?(i=typeof c==="function"?c:Ct(+c),d):i},d.padRadius=function(c){return arguments.length?(s=c==null?null:typeof c==="function"?c:Ct(+c),d):s},d.startAngle=function(c){return arguments.length?(o=typeof c==="function"?c:Ct(+c),d):o},d.endAngle=function(c){return arguments.length?(a=typeof c==="function"?c:Ct(+c),d):a},d.padAngle=function(c){return arguments.length?(h=typeof c==="function"?c:Ct(+c),d):h},d.context=function(c){return arguments.length?(n=c==null?null:c,d):n},d}var HF=Array.prototype.slice;function pd(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Hu(r){this._context=r}Hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function va(r){return new Hu(r)}function Yu(r){return r[0]}function ju(r){return r[1]}function ul(r,e){var i=Ct(!0),s=null,o=va,a=null,h=ms(n);r=typeof r==="function"?r:r===void 0?Yu:Ct(r),e=typeof e==="function"?e:e===void 0?ju:Ct(e);function n(u){var d,c=(u=pd(u)).length,f,p=!1,x;if(s==null)a=o(x=h());for(d=0;d<=c;++d){if(!(d<c&&i(f=u[d],d,u))===p)if(p=!p)a.lineStart();else a.lineEnd();if(p)a.point(+r(f,d,u),+e(f,d,u))}if(x)return a=null,x+""||null}return n.x=function(u){return arguments.length?(r=typeof u==="function"?u:Ct(+u),n):r},n.y=function(u){return arguments.length?(e=typeof u==="function"?u:Ct(+u),n):e},n.defined=function(u){return arguments.length?(i=typeof u==="function"?u:Ct(!!u),n):i},n.curve=function(u){return arguments.length?(o=u,s!=null&&(a=o(s)),n):o},n.context=function(u){return arguments.length?(u==null?s=a=null:a=o(s=u),n):s},n}class el{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function so(r){return new el(r,!0)}function ao(r){return new el(r,!1)}function $e(){}function ei(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function no(r){this._context=r}no.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:ei(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Fr(r){return new no(r)}function Uu(r){this._context=r}Uu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new Uu(r)}function Xu(r){this._context=r}Xu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Xu(r)}function Gu(r,e){this._basis=new no(r),this._beta=e}Gu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,h=e[i]-o,n=-1,u;while(++n<=i)u=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+u*a),this._beta*e[n]+(1-this._beta)*(o+u*h))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var rl=function r(e){function i(s){return e===1?new no(s):new Gu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function bs(r,e){this._context=r,this._k=(1-e)/6}bs.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:ri(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var lo=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var il=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,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:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ol=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ho(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:h}=r;if(r._l01_a>be){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,u=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/u,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/u}if(r._l23_a>be){var d=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,c=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*d+r._x1*r._l23_2a-e*r._l12_2a)/c,h=(h*d+r._y1*r._l23_2a-i*r._l12_2a)/c}r._context.bezierCurveTo(s,o,a,h,r._x2,r._y2)}function Vu(r,e){this._context=r,this._alpha=e}Vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ho(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var co=function r(e){function i(s){return e?new Vu(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ku(r,e){this._context=r,this._alpha=e}Ku.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ho(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var sl=function r(e){function i(s){return e?new Ku(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Zu(r,e){this._context=r,this._alpha=e}Zu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ho(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var al=function r(e){function i(s){return e?new Zu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Qu(r){this._context=r}Qu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Ss(r){return new Qu(r)}function Ju(r){return r<0?-1:1}function td(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),h=(i-r._y1)/(o||s<0&&-0),n=(a*o+h*s)/(s+o);return(Ju(a)+Ju(h))*Math.min(Math.abs(a),Math.abs(h),0.5*Math.abs(n))||0}function ed(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function nl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:h}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,h-n*i,a,h)}function Ts(r){this._context=r}Ts.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:nl(this,this._t0,ed(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,nl(this,ed(this,i=td(this,r,e)),i);break;default:nl(this,this._t0,i=td(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function rd(r){this._context=new id(r)}(rd.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function id(r){this._context=r}id.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function uo(r){return new Ts(r)}function fo(r){return new rd(r)}function sd(r){this._context=r}sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=od(r),o=od(e);for(var a=0,h=1;h<i;++a,++h)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[h],e[h])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function od(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),h=Array(i);o[0]=0,a[0]=2,h[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,h[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,h[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,h[e]-=s*h[e-1];o[i-1]=h[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(h[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function ai(r){return new sd(r)}function Bs(r,e){this._context=r,this._t=e}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function ni(r){return new Bs(r,0.5)}function po(r){return new Bs(r,0)}function go(r){return new Bs(r,1)}function br(r,e,i){this.k=r,this.x=e,this.y=i}br.prototype={constructor:br,scale:function(r){return r===1?this:new br(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new br(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var hl=new br(1,0,0);gl.prototype=br.prototype;function gl(r){while(!r.__zoom)if(!(r=r.parentNode))return hl;return r.__zoom}var ge=t((r)=>{let{securityLevel:e}=m(),i=b("body");if(e==="sandbox"){let a=b(`#i${r}`).node()?.contentDocument??document;i=b(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Nd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Nd,"getDefaultExportFromCjs");var Be={},_s={},kr={},ad;function hi(){if(ad)return kr;ad=1;function r(h){return typeof h>"u"||h===null}t(r,"isNothing");function e(h){return typeof h==="object"&&h!==null}t(e,"isObject");function i(h){if(Array.isArray(h))return h;else if(r(h))return[];return[h]}t(i,"toArray");function s(h,n){if(n){let u=Object.keys(n);for(let d=0,c=u.length;d<c;d+=1){let f=u[d];h[f]=n[f]}}return h}t(s,"extend");function o(h,n){let u="";for(let d=0;d<n;d+=1)u+=h;return u}t(o,"repeat");function a(h){return h===0&&Number.NEGATIVE_INFINITY===1/h}return t(a,"isNegativeZero"),kr.isNothing=r,kr.isObject=e,kr.toArray=i,kr.repeat=o,kr.isNegativeZero=a,kr.extend=s,kr}t(hi,"requireCommon");var yl,nd;function ci(){if(nd)return yl;nd=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
127
+
128
+ `+i.mark.snippet;return a+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),yl=e,yl}t(ci,"requireException");var xl,ld;function zd(){if(ld)return xl;ld=1;let r=hi();function e(o,a,h,n,u){let d="",c="",f=Math.floor(u/2)-1;if(n-a>f)d=" ... ",a=n-f+d.length;if(h-n>f)c=" ...",h=n+f-c.length;return{str:d+o.slice(a,h).replace(/\t/g,"→")+c,pos:n-a+d.length}}t(e,"getLine");function i(o,a){return r.repeat(" ",a-o.length)+o}t(i,"padStart");function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;if(!a.maxLength)a.maxLength=79;if(typeof a.indent!=="number")a.indent=1;if(typeof a.linesBefore!=="number")a.linesBefore=3;if(typeof a.linesAfter!=="number")a.linesAfter=2;let h=/\r?\n|\r|\0/g,n=[0],u=[],d,c=-1;while(d=h.exec(o.buffer))if(u.push(d.index),n.push(d.index+d[0].length),o.position<=d.index&&c<0)c=n.length-2;if(c<0)c=n.length-1;let f="",p=Math.min(o.line+a.linesAfter,u.length).toString().length,x=a.maxLength-(a.indent+p+3);for(let T=1;T<=a.linesBefore;T++){if(c-T<0)break;let B=e(o.buffer,n[c-T],u[c-T],o.position-(n[c]-n[c-T]),x);f=r.repeat(" ",a.indent)+i((o.line-T+1).toString(),p)+" | "+B.str+`
129
+ `+f}let S=e(o.buffer,n[c],u[c],o.position,x);f+=r.repeat(" ",a.indent)+i((o.line+1).toString(),p)+" | "+S.str+`
130
+ `,f+=r.repeat("-",a.indent+p+3+S.pos)+`^
131
+ `;for(let T=1;T<=a.linesAfter;T++){if(c+T>=u.length)break;let B=e(o.buffer,n[c+T],u[c+T],o.position-(n[c]-n[c+T]),x);f+=r.repeat(" ",a.indent)+i((o.line+T+1).toString(),p)+" | "+B.str+`
132
+ `}return f.replace(/\n$/,"")}return t(s,"makeSnippet"),xl=s,xl}t(zd,"requireSnippet");var Cl,yd;function _e(){if(yd)return Cl;yd=1;let r=ci(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let h={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(u){h[String(u)]=n})});return h}t(s,"compileStyleAliases");function o(a,h){if(h=h||{},Object.keys(h).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=h,this.tag=a,this.kind=h.kind||null,this.resolve=h.resolve||function(){return!0},this.construct=h.construct||function(n){return n},this.instanceOf=h.instanceOf||null,this.predicate=h.predicate||null,this.represent=h.represent||null,this.representName=h.representName||null,this.defaultStyle=h.defaultStyle||null,this.multi=h.multi||!1,this.styleAliases=s(h.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),Cl=o,Cl}t(_e,"requireType");var bl,xd;function ql(){if(xd)return bl;xd=1;let r=ci(),e=_e();function i(a,h){let n=[];return a[h].forEach(function(u){let d=n.length;n.forEach(function(c,f){if(c.tag===u.tag&&c.kind===u.kind&&c.multi===u.multi)d=f}),n[d]=u}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function h(n){if(n.multi)a.multi[n.kind].push(n),a.multi.fallback.push(n);else a[n.kind][n.tag]=a.fallback[n.tag]=n}t(h,"collectType");for(let n=0,u=arguments.length;n<u;n+=1)arguments[n].forEach(h);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(h){let n=[],u=[];if(h instanceof e)u.push(h);else if(Array.isArray(h))u=u.concat(h);else if(h&&(Array.isArray(h.implicit)||Array.isArray(h.explicit))){if(h.implicit)n=n.concat(h.implicit);if(h.explicit)u=u.concat(h.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(c){if(!(c instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&c.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(c){if(!(c instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let d=Object.create(o.prototype);return d.implicit=(this.implicit||[]).concat(n),d.explicit=(this.explicit||[]).concat(u),d.compiledImplicit=i(d,"implicit"),d.compiledExplicit=i(d,"explicit"),d.compiledTypeMap=s(d.compiledImplicit,d.compiledExplicit),d},"extend"),bl=o,bl}t(ql,"requireSchema");var kl,Cd;function Wl(){if(Cd)return kl;return Cd=1,kl=new(_e())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),kl}t(Wl,"requireStr");var wl,kd;function Nl(){if(kd)return wl;return kd=1,wl=new(_e())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),wl}t(Nl,"requireSeq");var Sl,wd;function zl(){if(wd)return Sl;return wd=1,Sl=new(_e())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Sl}t(zl,"requireMap");var Tl,Sd;function Hl(){if(Sd)return Tl;return Sd=1,Tl=new(ql())({explicit:[Wl(),Nl(),zl()]}),Tl}t(Hl,"requireFailsafe");var Bl,Td;function Yl(){if(Td)return Bl;Td=1;let r=_e();function e(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Bl=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Bl}t(Yl,"require_null");var _l,Bd;function jl(){if(Bd)return _l;Bd=1;let r=_e();function e(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),_l=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),_l}t(jl,"requireBool");var vl,_d;function Ul(){if(_d)return vl;_d=1;let r=hi(),e=_e();function i(d){return d>=48&&d<=57||d>=65&&d<=70||d>=97&&d<=102}t(i,"isHexCode");function s(d){return d>=48&&d<=55}t(s,"isOctCode");function o(d){return d>=48&&d<=57}t(o,"isDecCode");function a(d){if(d===null)return!1;let c=d.length,f=0,p=!1;if(!c)return!1;let x=d[f];if(x==="-"||x==="+")x=d[++f];if(x==="0"){if(f+1===c)return!0;if(x=d[++f],x==="b"){f++;for(;f<c;f++){if(x=d[f],x!=="0"&&x!=="1")return!1;p=!0}return p&&isFinite(h(d))}if(x==="x"){f++;for(;f<c;f++){if(!i(d.charCodeAt(f)))return!1;p=!0}return p&&isFinite(h(d))}if(x==="o"){f++;for(;f<c;f++){if(!s(d.charCodeAt(f)))return!1;p=!0}return p&&isFinite(h(d))}}for(;f<c;f++){if(!o(d.charCodeAt(f)))return!1;p=!0}if(!p)return!1;return isFinite(h(d))}t(a,"resolveYamlInteger");function h(d){let c=d,f=1,p=c[0];if(p==="-"||p==="+"){if(p==="-")f=-1;c=c.slice(1),p=c[0]}if(c==="0")return 0;if(p==="0"){if(c[1]==="b")return f*parseInt(c.slice(2),2);if(c[1]==="x")return f*parseInt(c.slice(2),16);if(c[1]==="o")return f*parseInt(c.slice(2),8)}return f*parseInt(c,10)}t(h,"parseYamlInteger");function n(d){return h(d)}t(n,"constructYamlInteger");function u(d){return Object.prototype.toString.call(d)==="[object Number]"&&(d%1===0&&!r.isNegativeZero(d))}return t(u,"isInteger"),vl=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:u,represent:{binary:t(function(d){return d>=0?"0b"+d.toString(2):"-0b"+d.toString(2).slice(1)},"binary"),octal:t(function(d){return d>=0?"0o"+d.toString(8):"-0o"+d.toString(8).slice(1)},"octal"),decimal:t(function(d){return d.toString(10)},"decimal"),hexadecimal:t(function(d){return d>=0?"0x"+d.toString(16).toUpperCase():"-0x"+d.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl}t(Ul,"requireInt");var Ll,vd;function Xl(){if(vd)return Ll;vd=1;let r=hi(),e=_e(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(d){if(d===null)return!1;if(!i.test(d))return!1;if(isFinite(parseFloat(d,10)))return!0;return s.test(d)}t(o,"resolveYamlFloat");function a(d){let c=d.toLowerCase(),f=c[0]==="-"?-1:1;if("+-".indexOf(c[0])>=0)c=c.slice(1);if(c===".inf")return f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(c===".nan")return NaN;return f*parseFloat(c,10)}t(a,"constructYamlFloat");let h=/^[-+]?[0-9]+e/;function n(d,c){if(isNaN(d))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===d)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===d)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(d))return"-0.0";let f=d.toString(10);return h.test(f)?f.replace("e",".e"):f}t(n,"representYamlFloat");function u(d){return Object.prototype.toString.call(d)==="[object Number]"&&(d%1!==0||r.isNegativeZero(d))}return t(u,"isFloat"),Ll=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:u,represent:n,defaultStyle:"lowercase"}),Ll}t(Xl,"requireFloat");var Fl,Ld;function Gl(){if(Ld)return Fl;return Ld=1,Fl=Hl().extend({implicit:[Yl(),jl(),Ul(),Xl()]}),Fl}t(Gl,"requireJson");var Ml,Fd;function Vl(){if(Fd)return Ml;return Fd=1,Ml=Gl(),Ml}t(Vl,"requireCore");var Al,Md;function Kl(){if(Md)return Al;Md=1;let r=_e(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=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 s(h){if(h===null)return!1;if(e.exec(h)!==null)return!0;if(i.exec(h)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(h){let n=0,u=null,d=e.exec(h);if(d===null)d=i.exec(h);if(d===null)throw Error("Date resolve error");let c=+d[1],f=+d[2]-1,p=+d[3];if(!d[4])return new Date(Date.UTC(c,f,p));let x=+d[4],S=+d[5],T=+d[6];if(d[7]){n=d[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(d[9]){let _=+d[10],v=+(d[11]||0);if(u=(_*60+v)*60000,d[9]==="-")u=-u}let B=new Date(Date.UTC(c,f,p,x,S,T,n));if(u)B.setTime(B.getTime()-u);return B}t(o,"constructYamlTimestamp");function a(h){return h.toISOString()}return t(a,"representYamlTimestamp"),Al=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Al}t(Kl,"requireTimestamp");var El,Ed;function Zl(){if(Ed)return El;Ed=1;let r=_e();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),El=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),El}t(Zl,"requireMerge");var $l,$d;function Ql(){if($d)return $l;$d=1;let r=_e(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
133
+ \r`;function i(h){if(h===null)return!1;let n=0,u=h.length,d=e;for(let c=0;c<u;c++){let f=d.indexOf(h.charAt(c));if(f>64)continue;if(f<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(h){let n=h.replace(/[\r\n=]/g,""),u=n.length,d=e,c=0,f=[];for(let x=0;x<u;x++){if(x%4===0&&x)f.push(c>>16&255),f.push(c>>8&255),f.push(c&255);c=c<<6|d.indexOf(n.charAt(x))}let p=u%4*6;if(p===0)f.push(c>>16&255),f.push(c>>8&255),f.push(c&255);else if(p===18)f.push(c>>10&255),f.push(c>>2&255);else if(p===12)f.push(c>>4&255);return new Uint8Array(f)}t(s,"constructYamlBinary");function o(h){let n="",u=0,d=h.length,c=e;for(let p=0;p<d;p++){if(p%3===0&&p)n+=c[u>>18&63],n+=c[u>>12&63],n+=c[u>>6&63],n+=c[u&63];u=(u<<8)+h[p]}let f=d%3;if(f===0)n+=c[u>>18&63],n+=c[u>>12&63],n+=c[u>>6&63],n+=c[u&63];else if(f===2)n+=c[u>>10&63],n+=c[u>>4&63],n+=c[u<<2&63],n+=c[64];else if(f===1)n+=c[u>>2&63],n+=c[u<<4&63],n+=c[64],n+=c[64];return n}t(o,"representYamlBinary");function a(h){return Object.prototype.toString.call(h)==="[object Uint8Array]"}return t(a,"isBinary"),$l=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),$l}t(Ql,"requireBinary");var Il,Id;function Jl(){if(Id)return Il;Id=1;let r=_e(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let h=[],n=a;for(let u=0,d=n.length;u<d;u+=1){let c=n[u],f=!1;if(i.call(c)!=="[object Object]")return!1;let p;for(p in c)if(e.call(c,p))if(!f)f=!0;else return!1;if(!f)return!1;if(h.indexOf(p)===-1)h.push(p);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Il=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Il}t(Jl,"requireOmap");var Ol,Od;function hh(){if(Od)return Ol;Od=1;let r=_e(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,h=Array(a.length);for(let n=0,u=a.length;n<u;n+=1){let d=a[n];if(e.call(d)!=="[object Object]")return!1;let c=Object.keys(d);if(c.length!==1)return!1;h[n]=[c[0],d[c[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,h=Array(a.length);for(let n=0,u=a.length;n<u;n+=1){let d=a[n],c=Object.keys(d);h[n]=[c[0],d[c[0]]]}return h}return t(s,"constructYamlPairs"),Ol=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Ol}t(hh,"requirePairs");var Dl,Dd;function ch(){if(Dd)return Dl;Dd=1;let r=_e(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let h in a)if(e.call(a,h)){if(a[h]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Dl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Dl}t(ch,"requireSet");var Pl,Pd;function vs(){if(Pd)return Pl;return Pd=1,Pl=Vl().extend({implicit:[Kl(),Zl()],explicit:[Ql(),Jl(),hh(),ch()]}),Pl}t(vs,"require_default");var Rd;function Hd(){if(Rd)return _s;Rd=1;let r=hi(),e=ci(),i=zd(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,h=2,n=3,u=4,d=1,c=2,f=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,x=/[\x85\u2028\u2029]/,S=/[,\[\]{}]/,T=/^(?:!|!!|![0-9A-Za-z-]+!)$/,B=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(k){return Object.prototype.toString.call(k)}t(_,"_class");function v(k){return k===10||k===13}t(v,"isEol");function E(k){return k===9||k===32}t(E,"isWhiteSpace");function D(k){return k===9||k===32||k===10||k===13}t(D,"isWsOrEol");function P(k){return k===44||k===91||k===93||k===123||k===125}t(P,"isFlowIndicator");function Z(k){if(k>=48&&k<=57)return k-48;let rt=k|32;if(rt>=97&&rt<=102)return rt-97+10;return-1}t(Z,"fromHexCode");function Q(k){if(k===120)return 2;if(k===117)return 4;if(k===85)return 8;return 0}t(Q,"escapedHexLen");function tt(k){if(k>=48&&k<=57)return k-48;return-1}t(tt,"fromDecimalCode");function it(k){switch(k){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
134
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(it,"simpleEscapeSequence");function ft(k){if(k<=65535)return String.fromCharCode(k);return String.fromCharCode((k-65536>>10)+55296,(k-65536&1023)+56320)}t(ft,"charFromCodepoint");function dt(k,rt,gt){if(rt==="__proto__")Object.defineProperty(k,rt,{configurable:!0,enumerable:!0,writable:!0,value:gt});else k[rt]=gt}t(dt,"setProperty");let st=Array(256),N=Array(256);for(let k=0;k<256;k++)st[k]=it(k)?1:0,N[k]=it(k);function K(k,rt){this.input=k,this.filename=rt.filename||null,this.schema=rt.schema||s,this.onWarning=rt.onWarning||null,this.legacy=rt.legacy||!1,this.json=rt.json||!1,this.listener=rt.listener||null,this.maxDepth=typeof rt.maxDepth==="number"?rt.maxDepth:100,this.maxTotalMergeKeys=typeof rt.maxTotalMergeKeys==="number"?rt.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=k.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}t(K,"State");function et(k,rt){let gt={name:k.filename,buffer:k.input.slice(0,-1),position:k.position,line:k.line,column:k.position-k.lineStart};return gt.snippet=i(gt),new e(rt,gt)}t(et,"generateError");function U(k,rt){throw et(k,rt)}t(U,"throwError");function ut(k,rt){if(k.onWarning)k.onWarning.call(null,et(k,rt))}t(ut,"throwWarning");function nt(k,rt,gt){let kt=k.anchorMapTransactions;if(kt.length!==0){let pt=kt[kt.length-1];if(!o.call(pt,rt))pt[rt]={existed:o.call(k.anchorMap,rt),value:k.anchorMap[rt]}}k.anchorMap[rt]=gt}t(nt,"storeAnchor");function _t(k){k.anchorMapTransactions.push(Object.create(null))}t(_t,"beginAnchorTransaction");function Lt(k){let rt=k.anchorMapTransactions.pop(),gt=k.anchorMapTransactions;if(gt.length===0)return;let kt=gt[gt.length-1],pt=Object.keys(rt);for(let Bt=0,I=pt.length;Bt<I;Bt+=1){let ot=pt[Bt];if(!o.call(kt,ot))kt[ot]=rt[ot]}}t(Lt,"commitAnchorTransaction");function Ut(k){let rt=k.anchorMapTransactions.pop(),gt=Object.keys(rt);for(let kt=gt.length-1;kt>=0;kt-=1){let pt=rt[gt[kt]];if(pt.existed)k.anchorMap[gt[kt]]=pt.value;else delete k.anchorMap[gt[kt]]}}t(Ut,"rollbackAnchorTransaction");function Xt(k){return{position:k.position,line:k.line,lineStart:k.lineStart,lineIndent:k.lineIndent,firstTabInLine:k.firstTabInLine,tag:k.tag,anchor:k.anchor,kind:k.kind,result:k.result}}t(Xt,"snapshotState");function Qt(k,rt){k.position=rt.position,k.line=rt.line,k.lineStart=rt.lineStart,k.lineIndent=rt.lineIndent,k.firstTabInLine=rt.firstTabInLine,k.tag=rt.tag,k.anchor=rt.anchor,k.kind=rt.kind,k.result=rt.result}t(Qt,"restoreState");let re={YAML:t(function(rt,gt,kt){if(rt.version!==null)U(rt,"duplication of %YAML directive");if(kt.length!==1)U(rt,"YAML directive accepts exactly one argument");let pt=/^([0-9]+)\.([0-9]+)$/.exec(kt[0]);if(pt===null)U(rt,"ill-formed argument of the YAML directive");let Bt=parseInt(pt[1],10),I=parseInt(pt[2],10);if(Bt!==1)U(rt,"unacceptable YAML version of the document");if(rt.version=kt[0],rt.checkLineBreaks=I<2,I!==1&&I!==2)ut(rt,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(rt,gt,kt){let pt;if(kt.length!==2)U(rt,"TAG directive accepts exactly two arguments");let Bt=kt[0];if(pt=kt[1],!T.test(Bt))U(rt,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(rt.tagMap,Bt))U(rt,'there is a previously declared suffix for "'+Bt+'" tag handle');if(!B.test(pt))U(rt,"ill-formed tag prefix (second argument) of the TAG directive");try{pt=decodeURIComponent(pt)}catch(I){U(rt,"tag prefix is malformed: "+pt)}rt.tagMap[Bt]=pt},"handleTagDirective")};function It(k,rt,gt,kt){if(rt<gt){let pt=k.input.slice(rt,gt);if(kt)for(let Bt=0,I=pt.length;Bt<I;Bt+=1){let ot=pt.charCodeAt(Bt);if(!(ot===9||ot>=32&&ot<=1114111))U(k,"expected valid JSON character")}else if(p.test(pt))U(k,"the stream contains non-printable characters");k.result+=pt}}t(It,"captureSegment");function Mt(k,rt,gt,kt){if(!r.isObject(gt))U(k,"cannot merge mappings; the provided source object is unacceptable");let pt=Object.keys(gt);for(let Bt=0,I=pt.length;Bt<I;Bt+=1){let ot=pt[Bt];if(k.maxTotalMergeKeys!==-1&&++k.totalMergeKeys>k.maxTotalMergeKeys)U(k,"merge keys exceeded maxTotalMergeKeys ("+k.maxTotalMergeKeys+")");if(!o.call(rt,ot))dt(rt,ot,gt[ot]),kt[ot]=!0}}t(Mt,"mergeMappings");function Wt(k,rt,gt,kt,pt,Bt,I,ot,St){if(Array.isArray(pt)){pt=Array.prototype.slice.call(pt);for(let mt=0,xt=pt.length;mt<xt;mt+=1){if(Array.isArray(pt[mt]))U(k,"nested arrays are not supported inside keys");if(typeof pt==="object"&&_(pt[mt])==="[object Object]")pt[mt]="[object Object]"}}if(typeof pt==="object"&&_(pt)==="[object Object]")pt="[object Object]";if(pt=String(pt),rt===null)rt={};if(kt==="tag:yaml.org,2002:merge")if(Array.isArray(Bt))for(let mt=0,xt=Bt.length;mt<xt;mt+=1)Mt(k,rt,Bt[mt],gt);else Mt(k,rt,Bt,gt);else{if(!k.json&&!o.call(gt,pt)&&o.call(rt,pt))k.line=I||k.line,k.lineStart=ot||k.lineStart,k.position=St||k.position,U(k,"duplicated mapping key");dt(rt,pt,Bt),delete gt[pt]}return rt}t(Wt,"storeMappingPair");function Gt(k){let rt=k.input.charCodeAt(k.position);if(rt===10)k.position++;else if(rt===13){if(k.position++,k.input.charCodeAt(k.position)===10)k.position++}else U(k,"a line break is expected");k.line+=1,k.lineStart=k.position,k.firstTabInLine=-1}t(Gt,"readLineBreak");function zt(k,rt,gt){let kt=0,pt=k.input.charCodeAt(k.position);while(pt!==0){while(E(pt)){if(pt===9&&k.firstTabInLine===-1)k.firstTabInLine=k.position;pt=k.input.charCodeAt(++k.position)}if(rt&&pt===35)do pt=k.input.charCodeAt(++k.position);while(pt!==10&&pt!==13&&pt!==0);if(v(pt)){Gt(k),pt=k.input.charCodeAt(k.position),kt++,k.lineIndent=0;while(pt===32)k.lineIndent++,pt=k.input.charCodeAt(++k.position)}else break}if(gt!==-1&&kt!==0&&k.lineIndent<gt)ut(k,"deficient indentation");return kt}t(zt,"skipSeparationSpace");function he(k){let rt=k.position,gt=k.input.charCodeAt(rt);if((gt===45||gt===46)&&gt===k.input.charCodeAt(rt+1)&&gt===k.input.charCodeAt(rt+2)){if(rt+=3,gt=k.input.charCodeAt(rt),gt===0||D(gt))return!0}return!1}t(he,"testDocumentSeparator");function le(k,rt){if(rt===1)k.result+=" ";else if(rt>1)k.result+=r.repeat(`
135
+ `,rt-1)}t(le,"writeFoldedLines");function ir(k,rt,gt){let kt,pt,Bt,I,ot,St,{kind:mt,result:xt}=k,Tt=k.input.charCodeAt(k.position);if(D(Tt)||P(Tt)||Tt===35||Tt===38||Tt===42||Tt===33||Tt===124||Tt===62||Tt===39||Tt===34||Tt===37||Tt===64||Tt===96)return!1;if(Tt===63||Tt===45){let wt=k.input.charCodeAt(k.position+1);if(D(wt)||gt&&P(wt))return!1}k.kind="scalar",k.result="",kt=pt=k.position,Bt=!1;while(Tt!==0){if(Tt===58){let wt=k.input.charCodeAt(k.position+1);if(D(wt)||gt&&P(wt))break}else if(Tt===35){let wt=k.input.charCodeAt(k.position-1);if(D(wt))break}else if(k.position===k.lineStart&&he(k)||gt&&P(Tt))break;else if(v(Tt))if(I=k.line,ot=k.lineStart,St=k.lineIndent,zt(k,!1,-1),k.lineIndent>=rt){Bt=!0,Tt=k.input.charCodeAt(k.position);continue}else{k.position=pt,k.line=I,k.lineStart=ot,k.lineIndent=St;break}if(Bt)It(k,kt,pt,!1),le(k,k.line-I),kt=pt=k.position,Bt=!1;if(!E(Tt))pt=k.position+1;Tt=k.input.charCodeAt(++k.position)}if(It(k,kt,pt,!1),k.result)return!0;return k.kind=mt,k.result=xt,!1}t(ir,"readPlainScalar");function Dr(k,rt){let gt,kt,pt=k.input.charCodeAt(k.position);if(pt!==39)return!1;k.kind="scalar",k.result="",k.position++,gt=kt=k.position;while((pt=k.input.charCodeAt(k.position))!==0)if(pt===39)if(It(k,gt,k.position,!0),pt=k.input.charCodeAt(++k.position),pt===39)gt=k.position,k.position++,kt=k.position;else return!0;else if(v(pt))It(k,gt,kt,!0),le(k,zt(k,!1,rt)),gt=kt=k.position;else if(k.position===k.lineStart&&he(k))U(k,"unexpected end of the document within a single quoted scalar");else if(k.position++,!E(pt))kt=k.position;U(k,"unexpected end of the stream within a single quoted scalar")}t(Dr,"readSingleQuotedScalar");function He(k,rt){let gt,kt,pt,Bt=k.input.charCodeAt(k.position);if(Bt!==34)return!1;k.kind="scalar",k.result="",k.position++,gt=kt=k.position;while((Bt=k.input.charCodeAt(k.position))!==0)if(Bt===34)return It(k,gt,k.position,!0),k.position++,!0;else if(Bt===92){if(It(k,gt,k.position,!0),Bt=k.input.charCodeAt(++k.position),v(Bt))zt(k,!1,rt);else if(Bt<256&&st[Bt])k.result+=N[Bt],k.position++;else if((pt=Q(Bt))>0){let I=pt,ot=0;for(;I>0;I--)if(Bt=k.input.charCodeAt(++k.position),(pt=Z(Bt))>=0)ot=(ot<<4)+pt;else U(k,"expected hexadecimal character");k.result+=ft(ot),k.position++}else U(k,"unknown escape sequence");gt=kt=k.position}else if(v(Bt))It(k,gt,kt,!0),le(k,zt(k,!1,rt)),gt=kt=k.position;else if(k.position===k.lineStart&&he(k))U(k,"unexpected end of the document within a double quoted scalar");else if(k.position++,!E(Bt))kt=k.position;U(k,"unexpected end of the stream within a double quoted scalar")}t(He,"readDoubleQuotedScalar");function ki(k,rt){let gt=!0,kt,pt,Bt,I=k.tag,ot,St=k.anchor,mt,xt,Tt,wt,At=Object.create(null),Ft,Rt,Nt,oe=k.input.charCodeAt(k.position);if(oe===91)mt=93,wt=!1,ot=[];else if(oe===123)mt=125,wt=!0,ot={};else return!1;if(k.anchor!==null)nt(k,k.anchor,ot);oe=k.input.charCodeAt(++k.position);while(oe!==0){if(zt(k,!0,rt),oe=k.input.charCodeAt(k.position),oe===mt)return k.position++,k.tag=I,k.anchor=St,k.kind=wt?"mapping":"sequence",k.result=ot,!0;else if(!gt)U(k,"missed comma between flow collection entries");else if(oe===44)U(k,"expected the node content, but found ','");if(Rt=Ft=Nt=null,xt=Tt=!1,oe===63){let ce=k.input.charCodeAt(k.position+1);if(D(ce))xt=Tt=!0,k.position++,zt(k,!0,rt)}if(kt=k.line,pt=k.lineStart,Bt=k.position,Pe(k,rt,a,!1,!0),Rt=k.tag,Ft=k.result,zt(k,!0,rt),oe=k.input.charCodeAt(k.position),(Tt||k.line===kt)&&oe===58)xt=!0,oe=k.input.charCodeAt(++k.position),zt(k,!0,rt),Pe(k,rt,a,!1,!0),Nt=k.result;if(wt)Wt(k,ot,At,Rt,Ft,Nt,kt,pt,Bt);else if(xt)ot.push(Wt(k,null,At,Rt,Ft,Nt,kt,pt,Bt));else ot.push(Ft);if(zt(k,!0,rt),oe=k.input.charCodeAt(k.position),oe===44)gt=!0,oe=k.input.charCodeAt(++k.position);else gt=!1}U(k,"unexpected end of the stream within a flow collection")}t(ki,"readFlowCollection");function wi(k,rt){let gt,kt=d,pt=!1,Bt=!1,I=rt,ot=0,St=!1,mt,xt=k.input.charCodeAt(k.position);if(xt===124)gt=!1;else if(xt===62)gt=!0;else return!1;k.kind="scalar",k.result="";while(xt!==0)if(xt=k.input.charCodeAt(++k.position),xt===43||xt===45)if(d===kt)kt=xt===43?f:c;else U(k,"repeat of a chomping mode identifier");else if((mt=tt(xt))>=0)if(mt===0)U(k,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Bt)I=rt+mt-1,Bt=!0;else U(k,"repeat of an indentation width identifier");else break;if(E(xt)){do xt=k.input.charCodeAt(++k.position);while(E(xt));if(xt===35)do xt=k.input.charCodeAt(++k.position);while(!v(xt)&&xt!==0)}while(xt!==0){Gt(k),k.lineIndent=0,xt=k.input.charCodeAt(k.position);while((!Bt||k.lineIndent<I)&&xt===32)k.lineIndent++,xt=k.input.charCodeAt(++k.position);if(!Bt&&k.lineIndent>I)I=k.lineIndent;if(v(xt)){ot++;continue}if(!Bt&&I===0)U(k,"missing indentation for block scalar");if(k.lineIndent<I){if(kt===f)k.result+=r.repeat(`
136
+ `,pt?1+ot:ot);else if(kt===d){if(pt)k.result+=`
137
+ `}break}if(gt)if(E(xt))St=!0,k.result+=r.repeat(`
138
+ `,pt?1+ot:ot);else if(St)St=!1,k.result+=r.repeat(`
139
+ `,ot+1);else if(ot===0){if(pt)k.result+=" "}else k.result+=r.repeat(`
140
+ `,ot);else k.result+=r.repeat(`
141
+ `,pt?1+ot:ot);pt=!0,Bt=!0,ot=0;let Tt=k.position;while(!v(xt)&&xt!==0)xt=k.input.charCodeAt(++k.position);It(k,Tt,k.position,!1)}return!0}t(wi,"readBlockScalar");function Ye(k,rt){let{tag:gt,anchor:kt}=k,pt=[],Bt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)nt(k,k.anchor,pt);let I=k.input.charCodeAt(k.position);while(I!==0){if(k.firstTabInLine!==-1)k.position=k.firstTabInLine,U(k,"tab characters must not be used in indentation");if(I!==45)break;let ot=k.input.charCodeAt(k.position+1);if(!D(ot))break;if(Bt=!0,k.position++,zt(k,!0,-1)){if(k.lineIndent<=rt){pt.push(null),I=k.input.charCodeAt(k.position);continue}}let St=k.line;if(Pe(k,rt,n,!1,!0),pt.push(k.result),zt(k,!0,-1),I=k.input.charCodeAt(k.position),(k.line===St||k.lineIndent>rt)&&I!==0)U(k,"bad indentation of a sequence entry");else if(k.lineIndent<rt)break}if(Bt)return k.tag=gt,k.anchor=kt,k.kind="sequence",k.result=pt,!0;return!1}t(Ye,"readBlockSequence");function Pr(k,rt,gt){let kt,pt,Bt,I,{tag:ot,anchor:St}=k,mt={},xt=Object.create(null),Tt=null,wt=null,At=null,Ft=!1,Rt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)nt(k,k.anchor,mt);let Nt=k.input.charCodeAt(k.position);while(Nt!==0){if(!Ft&&k.firstTabInLine!==-1)k.position=k.firstTabInLine,U(k,"tab characters must not be used in indentation");let oe=k.input.charCodeAt(k.position+1),ce=k.line;if((Nt===63||Nt===58)&&D(oe)){if(Nt===63){if(Ft)Wt(k,mt,xt,Tt,wt,null,pt,Bt,I),Tt=wt=At=null;Rt=!0,Ft=!0,kt=!0}else if(Ft)Ft=!1,kt=!0;else U(k,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");k.position+=1,Nt=oe}else{if(pt=k.line,Bt=k.lineStart,I=k.position,!Pe(k,gt,h,!1,!0))break;if(k.line===ce){Nt=k.input.charCodeAt(k.position);while(E(Nt))Nt=k.input.charCodeAt(++k.position);if(Nt===58){if(Nt=k.input.charCodeAt(++k.position),!D(Nt))U(k,"a whitespace character is expected after the key-value separator within a block mapping");if(Ft)Wt(k,mt,xt,Tt,wt,null,pt,Bt,I),Tt=wt=At=null;Rt=!0,Ft=!1,kt=!1,Tt=k.tag,wt=k.result}else if(Rt)U(k,"can not read an implicit mapping pair; a colon is missed");else return k.tag=ot,k.anchor=St,!0}else if(Rt)U(k,"can not read a block mapping entry; a multiline key may not be an implicit key");else return k.tag=ot,k.anchor=St,!0}if(k.line===ce||k.lineIndent>rt){if(Ft)pt=k.line,Bt=k.lineStart,I=k.position;if(Pe(k,rt,u,!0,kt))if(Ft)wt=k.result;else At=k.result;if(!Ft)Wt(k,mt,xt,Tt,wt,At,pt,Bt,I),Tt=wt=At=null;zt(k,!0,-1),Nt=k.input.charCodeAt(k.position)}if((k.line===ce||k.lineIndent>rt)&&Nt!==0)U(k,"bad indentation of a mapping entry");else if(k.lineIndent<rt)break}if(Ft)Wt(k,mt,xt,Tt,wt,null,pt,Bt,I);if(Rt)k.tag=ot,k.anchor=St,k.kind="mapping",k.result=mt;return Rt}t(Pr,"readBlockMapping");function Si(k){let rt=!1,gt=!1,kt,pt,Bt=k.input.charCodeAt(k.position);if(Bt!==33)return!1;if(k.tag!==null)U(k,"duplication of a tag property");if(Bt=k.input.charCodeAt(++k.position),Bt===60)rt=!0,Bt=k.input.charCodeAt(++k.position);else if(Bt===33)gt=!0,kt="!!",Bt=k.input.charCodeAt(++k.position);else kt="!";let I=k.position;if(rt){do Bt=k.input.charCodeAt(++k.position);while(Bt!==0&&Bt!==62);if(k.position<k.length)pt=k.input.slice(I,k.position),Bt=k.input.charCodeAt(++k.position);else U(k,"unexpected end of the stream within a verbatim tag")}else{while(Bt!==0&&!D(Bt)){if(Bt===33)if(!gt){if(kt=k.input.slice(I-1,k.position+1),!T.test(kt))U(k,"named tag handle cannot contain such characters");gt=!0,I=k.position+1}else U(k,"tag suffix cannot contain exclamation marks");Bt=k.input.charCodeAt(++k.position)}if(pt=k.input.slice(I,k.position),S.test(pt))U(k,"tag suffix cannot contain flow indicator characters")}if(pt&&!B.test(pt))U(k,"tag name cannot contain such characters: "+pt);try{pt=decodeURIComponent(pt)}catch(ot){U(k,"tag name is malformed: "+pt)}if(rt)k.tag=pt;else if(o.call(k.tagMap,kt))k.tag=k.tagMap[kt]+pt;else if(kt==="!")k.tag="!"+pt;else if(kt==="!!")k.tag="tag:yaml.org,2002:"+pt;else U(k,'undeclared tag handle "'+kt+'"');return!0}t(Si,"readTagProperty");function Rr(k){let rt=k.input.charCodeAt(k.position);if(rt!==38)return!1;if(k.anchor!==null)U(k,"duplication of an anchor property");rt=k.input.charCodeAt(++k.position);let gt=k.position;while(rt!==0&&!D(rt)&&!P(rt))rt=k.input.charCodeAt(++k.position);if(k.position===gt)U(k,"name of an anchor node must contain at least one character");return k.anchor=k.input.slice(gt,k.position),!0}t(Rr,"readAnchorProperty");function qr(k){let rt=k.input.charCodeAt(k.position);if(rt!==42)return!1;rt=k.input.charCodeAt(++k.position);let gt=k.position;while(rt!==0&&!D(rt)&&!P(rt))rt=k.input.charCodeAt(++k.position);if(k.position===gt)U(k,"name of an alias node must contain at least one character");let kt=k.input.slice(gt,k.position);if(!o.call(k.anchorMap,kt))U(k,'unidentified alias "'+kt+'"');return k.result=k.anchorMap[kt],zt(k,!0,-1),!0}t(qr,"readAlias");function Ti(k,rt,gt,kt){let pt=Xt(k);if(_t(k),Qt(k,rt),k.tag=null,k.anchor=null,k.kind=null,k.result=null,Pr(k,gt,kt)&&k.kind==="mapping")return Lt(k),!0;return Ut(k),Qt(k,pt),!1}t(Ti,"tryReadBlockMappingFromProperty");function Pe(k,rt,gt,kt,pt){let Bt,I,ot=1,St=!1,mt=!1,xt=null,Tt,wt,At;if(k.depth>=k.maxDepth)U(k,"nesting exceeded maxDepth ("+k.maxDepth+")");if(k.depth+=1,k.listener!==null)k.listener("open",k);k.tag=null,k.anchor=null,k.kind=null,k.result=null;let Ft=Bt=I=u===gt||n===gt;if(kt){if(zt(k,!0,-1)){if(St=!0,k.lineIndent>rt)ot=1;else if(k.lineIndent===rt)ot=0;else if(k.lineIndent<rt)ot=-1}}if(ot===1)while(!0){let Rt=k.input.charCodeAt(k.position),Nt=Xt(k);if(St&&(Rt===33&&k.tag!==null||Rt===38&&k.anchor!==null))break;if(!Si(k)&&!Rr(k))break;if(xt===null)xt=Nt;if(zt(k,!0,-1)){if(St=!0,I=Ft,k.lineIndent>rt)ot=1;else if(k.lineIndent===rt)ot=0;else if(k.lineIndent<rt)ot=-1}else I=!1}if(I)I=St||pt;if(ot===1||u===gt){if(a===gt||h===gt)wt=rt;else wt=rt+1;if(At=k.position-k.lineStart,ot===1)if(I&&(Ye(k,At)||Pr(k,At,wt))||ki(k,wt))mt=!0;else{let Rt=k.input.charCodeAt(k.position);if(xt!==null&&Ft&&!I&&Rt!==124&&Rt!==62&&Ti(k,xt,xt.position-xt.lineStart,wt))mt=!0;else if(Bt&&wi(k,wt)||Dr(k,wt)||He(k,wt))mt=!0;else if(qr(k)){if(mt=!0,k.tag!==null||k.anchor!==null)U(k,"alias node should not have any properties")}else if(ir(k,wt,a===gt)){if(mt=!0,k.tag===null)k.tag="?"}if(k.anchor!==null)nt(k,k.anchor,k.result)}else if(ot===0)mt=I&&Ye(k,At)}if(k.tag===null){if(k.anchor!==null)nt(k,k.anchor,k.result)}else if(k.tag==="?"){if(k.result!==null&&k.kind!=="scalar")U(k,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+k.kind+'"');for(let Rt=0,Nt=k.implicitTypes.length;Rt<Nt;Rt+=1)if(Tt=k.implicitTypes[Rt],Tt.resolve(k.result)){if(k.result=Tt.construct(k.result),k.tag=Tt.tag,k.anchor!==null)nt(k,k.anchor,k.result);break}}else if(k.tag!=="!"){if(o.call(k.typeMap[k.kind||"fallback"],k.tag))Tt=k.typeMap[k.kind||"fallback"][k.tag];else{Tt=null;let Rt=k.typeMap.multi[k.kind||"fallback"];for(let Nt=0,oe=Rt.length;Nt<oe;Nt+=1)if(k.tag.slice(0,Rt[Nt].tag.length)===Rt[Nt].tag){Tt=Rt[Nt];break}}if(!Tt)U(k,"unknown tag !<"+k.tag+">");if(k.result!==null&&Tt.kind!==k.kind)U(k,"unacceptable node kind for !<"+k.tag+'> tag; it should be "'+Tt.kind+'", not "'+k.kind+'"');if(!Tt.resolve(k.result,k.tag))U(k,"cannot resolve a node with !<"+k.tag+"> explicit tag");else if(k.result=Tt.construct(k.result,k.tag),k.anchor!==null)nt(k,k.anchor,k.result)}if(k.listener!==null)k.listener("close",k);return k.depth-=1,k.tag!==null||k.anchor!==null||mt}t(Pe,"composeNode");function Bi(k){let rt=k.position,gt=!1,kt;k.version=null,k.checkLineBreaks=k.legacy,k.tagMap=Object.create(null),k.anchorMap=Object.create(null);while((kt=k.input.charCodeAt(k.position))!==0){if(zt(k,!0,-1),kt=k.input.charCodeAt(k.position),k.lineIndent>0||kt!==37)break;gt=!0,kt=k.input.charCodeAt(++k.position);let pt=k.position;while(kt!==0&&!D(kt))kt=k.input.charCodeAt(++k.position);let Bt=k.input.slice(pt,k.position),I=[];if(Bt.length<1)U(k,"directive name must not be less than one character in length");while(kt!==0){while(E(kt))kt=k.input.charCodeAt(++k.position);if(kt===35){do kt=k.input.charCodeAt(++k.position);while(kt!==0&&!v(kt));break}if(v(kt))break;pt=k.position;while(kt!==0&&!D(kt))kt=k.input.charCodeAt(++k.position);I.push(k.input.slice(pt,k.position))}if(kt!==0)Gt(k);if(o.call(re,Bt))re[Bt](k,Bt,I);else ut(k,'unknown document directive "'+Bt+'"')}if(zt(k,!0,-1),k.lineIndent===0&&k.input.charCodeAt(k.position)===45&&k.input.charCodeAt(k.position+1)===45&&k.input.charCodeAt(k.position+2)===45)k.position+=3,zt(k,!0,-1);else if(gt)U(k,"directives end mark is expected");if(Pe(k,k.lineIndent-1,u,!1,!0),zt(k,!0,-1),k.checkLineBreaks&&x.test(k.input.slice(rt,k.position)))ut(k,"non-ASCII line breaks are interpreted as content");if(k.documents.push(k.result),k.position===k.lineStart&&he(k)){if(k.input.charCodeAt(k.position)===46)k.position+=3,zt(k,!0,-1);return}if(k.position<k.length-1)U(k,"end of the stream or a document separator is expected")}t(Bi,"readDocument");function Wr(k,rt){if(k=String(k),rt=rt||{},k.length!==0){if(k.charCodeAt(k.length-1)!==10&&k.charCodeAt(k.length-1)!==13)k+=`
142
+ `;if(k.charCodeAt(0)===65279)k=k.slice(1)}let gt=new K(k,rt),kt=k.indexOf("\x00");if(kt!==-1)gt.position=kt,U(gt,"null byte is not allowed in input");gt.input+="\x00";while(gt.input.charCodeAt(gt.position)===32)gt.lineIndent+=1,gt.position+=1;while(gt.position<gt.length-1)Bi(gt);return gt.documents}t(Wr,"loadDocuments");function Nr(k,rt,gt){if(rt!==null&&typeof rt==="object"&&typeof gt>"u")gt=rt,rt=null;let kt=Wr(k,gt);if(typeof rt!=="function")return kt;for(let pt=0,Bt=kt.length;pt<Bt;pt+=1)rt(kt[pt])}t(Nr,"loadAll2");function _i(k,rt){let gt=Wr(k,rt);if(gt.length===0)return;else if(gt.length===1)return gt[0];throw new e("expected a single document in the stream, but found more")}return t(_i,"load2"),_s.loadAll=Nr,_s.load=_i,_s}t(Hd,"requireLoader");var Rl={},qd;function Yd(){if(qd)return Rl;qd=1;let r=hi(),e=ci(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,h=9,n=10,u=13,d=32,c=33,f=34,p=35,x=37,S=38,T=39,B=42,_=44,v=45,E=58,D=61,P=62,Z=63,Q=64,tt=91,it=93,ft=96,dt=123,st=124,N=125,K={};K[0]="\\0",K[7]="\\a",K[8]="\\b",K[9]="\\t",K[10]="\\n",K[11]="\\v",K[12]="\\f",K[13]="\\r",K[27]="\\e",K[34]="\\\"",K[92]="\\\\",K[133]="\\N",K[160]="\\_",K[8232]="\\L",K[8233]="\\P";let et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],U=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ut(I,ot){if(ot===null)return{};let St={},mt=Object.keys(ot);for(let xt=0,Tt=mt.length;xt<Tt;xt+=1){let wt=mt[xt],At=String(ot[wt]);if(wt.slice(0,2)==="!!")wt="tag:yaml.org,2002:"+wt.slice(2);let Ft=I.compiledTypeMap.fallback[wt];if(Ft&&o.call(Ft.styleAliases,At))At=Ft.styleAliases[At];St[wt]=At}return St}t(ut,"compileStyleMap");function nt(I){let ot,St,mt=I.toString(16).toUpperCase();if(I<=255)ot="x",St=2;else if(I<=65535)ot="u",St=4;else if(I<=4294967295)ot="U",St=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+ot+r.repeat("0",St-mt.length)+mt}t(nt,"encodeHex");let _t=1,Lt=2;function Ut(I){this.schema=I.schema||i,this.indent=Math.max(1,I.indent||2),this.noArrayIndent=I.noArrayIndent||!1,this.skipInvalid=I.skipInvalid||!1,this.flowLevel=r.isNothing(I.flowLevel)?-1:I.flowLevel,this.styleMap=ut(this.schema,I.styles||null),this.sortKeys=I.sortKeys||!1,this.lineWidth=I.lineWidth||80,this.noRefs=I.noRefs||!1,this.noCompatMode=I.noCompatMode||!1,this.condenseFlow=I.condenseFlow||!1,this.quotingType=I.quotingType==='"'?Lt:_t,this.forceQuotes=I.forceQuotes||!1,this.replacer=typeof I.replacer==="function"?I.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Ut,"State");function Xt(I,ot){let St=r.repeat(" ",ot),mt=0,xt="",Tt=I.length;while(mt<Tt){let wt,At=I.indexOf(`
143
+ `,mt);if(At===-1)wt=I.slice(mt),mt=Tt;else wt=I.slice(mt,At+1),mt=At+1;if(wt.length&&wt!==`
144
+ `)xt+=St;xt+=wt}return xt}t(Xt,"indentString");function Qt(I,ot){return`
145
+ `+r.repeat(" ",I.indent*ot)}t(Qt,"generateNextLine");function re(I,ot){for(let St=0,mt=I.implicitTypes.length;St<mt;St+=1)if(I.implicitTypes[St].resolve(ot))return!0;return!1}t(re,"testImplicitResolving");function It(I){return I===d||I===h}t(It,"isWhitespace");function Mt(I){return I>=32&&I<=126||I>=161&&I<=55295&&I!==8232&&I!==8233||I>=57344&&I<=65533&&I!==a||I>=65536&&I<=1114111}t(Mt,"isPrintable");function Wt(I){return Mt(I)&&I!==a&&I!==u&&I!==n}t(Wt,"isNsCharOrWhitespace");function Gt(I,ot,St){let mt=Wt(I),xt=mt&&!It(I);return(St?mt:mt&&I!==_&&I!==tt&&I!==it&&I!==dt&&I!==N)&&I!==p&&!(ot===E&&!xt)||Wt(ot)&&!It(ot)&&I===p||ot===E&&xt}t(Gt,"isPlainSafe");function zt(I){return Mt(I)&&I!==a&&!It(I)&&I!==v&&I!==Z&&I!==E&&I!==_&&I!==tt&&I!==it&&I!==dt&&I!==N&&I!==p&&I!==S&&I!==B&&I!==c&&I!==st&&I!==D&&I!==P&&I!==T&&I!==f&&I!==x&&I!==Q&&I!==ft}t(zt,"isPlainSafeFirst");function he(I){return!It(I)&&I!==E}t(he,"isPlainSafeLast");function le(I,ot){let St=I.charCodeAt(ot),mt;if(St>=55296&&St<=56319&&ot+1<I.length){if(mt=I.charCodeAt(ot+1),mt>=56320&&mt<=57343)return(St-55296)*1024+mt-56320+65536}return St}t(le,"codePointAt");function ir(I){return/^\n* /.test(I)}t(ir,"needIndentIndicator");let Dr=1,He=2,ki=3,wi=4,Ye=5;function Pr(I,ot,St,mt,xt,Tt,wt,At){let Ft,Rt=0,Nt=null,oe=!1,ce=!1,Fc=mt!==-1,vi=-1,Li=zt(le(I,0))&&he(le(I,I.length-1));if(ot||wt)for(Ft=0;Ft<I.length;Rt>=65536?Ft+=2:Ft++){if(Rt=le(I,Ft),!Mt(Rt))return Ye;Li=Li&&Gt(Rt,Nt,At),Nt=Rt}else{for(Ft=0;Ft<I.length;Rt>=65536?Ft+=2:Ft++){if(Rt=le(I,Ft),Rt===n){if(oe=!0,Fc)ce=ce||Ft-vi-1>mt&&I[vi+1]!==" ",vi=Ft}else if(!Mt(Rt))return Ye;Li=Li&&Gt(Rt,Nt,At),Nt=Rt}ce=ce||Fc&&(Ft-vi-1>mt&&I[vi+1]!==" ")}if(!oe&&!ce){if(Li&&!wt&&!xt(I))return Dr;return Tt===Lt?Ye:He}if(St>9&&ir(I))return Ye;if(!wt)return ce?wi:ki;return Tt===Lt?Ye:He}t(Pr,"chooseScalarStyle");function Si(I,ot,St,mt,xt){I.dump=function(){if(ot.length===0)return I.quotingType===Lt?'""':"''";if(!I.noCompatMode){if(et.indexOf(ot)!==-1||U.test(ot))return I.quotingType===Lt?'"'+ot+'"':"'"+ot+"'"}let Tt=I.indent*Math.max(1,St),wt=I.lineWidth===-1?-1:Math.max(Math.min(I.lineWidth,40),I.lineWidth-Tt),At=mt||I.flowLevel>-1&&St>=I.flowLevel;function Ft(Rt){return re(I,Rt)}switch(t(Ft,"testAmbiguity"),Pr(ot,At,I.indent,wt,Ft,I.quotingType,I.forceQuotes&&!mt,xt)){case Dr:return ot;case He:return"'"+ot.replace(/'/g,"''")+"'";case ki:return"|"+Rr(ot,I.indent)+qr(Xt(ot,Tt));case wi:return">"+Rr(ot,I.indent)+qr(Xt(Ti(ot,wt),Tt));case Ye:return'"'+Bi(ot)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Si,"writeScalar");function Rr(I,ot){let St=ir(I)?String(ot):"",mt=I[I.length-1]===`
146
+ `,Tt=mt&&(I[I.length-2]===`
147
+ `||I===`
148
+ `)?"+":mt?"":"-";return St+Tt+`
149
+ `}t(Rr,"blockHeader");function qr(I){return I[I.length-1]===`
150
+ `?I.slice(0,-1):I}t(qr,"dropEndingNewline");function Ti(I,ot){let St=/(\n+)([^\n]*)/g,mt=function(){let At=I.indexOf(`
151
+ `);return At=At!==-1?At:I.length,St.lastIndex=At,Pe(I.slice(0,At),ot)}(),xt=I[0]===`
152
+ `||I[0]===" ",Tt,wt;while(wt=St.exec(I)){let At=wt[1],Ft=wt[2];Tt=Ft[0]===" ",mt+=At+(!xt&&!Tt&&Ft!==""?`
153
+ `:"")+Pe(Ft,ot),xt=Tt}return mt}t(Ti,"foldString");function Pe(I,ot){if(I===""||I[0]===" ")return I;let St=/ [^ ]/g,mt,xt=0,Tt,wt=0,At=0,Ft="";while(mt=St.exec(I)){if(At=mt.index,At-xt>ot)Tt=wt>xt?wt:At,Ft+=`
154
+ `+I.slice(xt,Tt),xt=Tt+1;wt=At}if(Ft+=`
155
+ `,I.length-xt>ot&&wt>xt)Ft+=I.slice(xt,wt)+`
156
+ `+I.slice(wt+1);else Ft+=I.slice(xt);return Ft.slice(1)}t(Pe,"foldLine");function Bi(I){let ot="",St=0;for(let mt=0;mt<I.length;St>=65536?mt+=2:mt++){St=le(I,mt);let xt=K[St];if(!xt&&Mt(St)){if(ot+=I[mt],St>=65536)ot+=I[mt+1]}else ot+=xt||nt(St)}return ot}t(Bi,"escapeString");function Wr(I,ot,St){let mt="",xt=I.tag;for(let Tt=0,wt=St.length;Tt<wt;Tt+=1){let At=St[Tt];if(I.replacer)At=I.replacer.call(St,String(Tt),At);if(gt(I,ot,At,!1,!1)||typeof At>"u"&&gt(I,ot,null,!1,!1)){if(mt!=="")mt+=","+(!I.condenseFlow?" ":"");mt+=I.dump}}I.tag=xt,I.dump="["+mt+"]"}t(Wr,"writeFlowSequence");function Nr(I,ot,St,mt){let xt="",Tt=I.tag;for(let wt=0,At=St.length;wt<At;wt+=1){let Ft=St[wt];if(I.replacer)Ft=I.replacer.call(St,String(wt),Ft);if(gt(I,ot+1,Ft,!0,!0,!1,!0)||typeof Ft>"u"&&gt(I,ot+1,null,!0,!0,!1,!0)){if(!mt||xt!=="")xt+=Qt(I,ot);if(I.dump&&n===I.dump.charCodeAt(0))xt+="-";else xt+="- ";xt+=I.dump}}I.tag=Tt,I.dump=xt||"[]"}t(Nr,"writeBlockSequence");function _i(I,ot,St){let mt="",xt=I.tag,Tt=Object.keys(St);for(let wt=0,At=Tt.length;wt<At;wt+=1){let Ft="";if(mt!=="")Ft+=", ";if(I.condenseFlow)Ft+='"';let Rt=Tt[wt],Nt=St[Rt];if(I.replacer)Nt=I.replacer.call(St,Rt,Nt);if(!gt(I,ot,Rt,!1,!1))continue;if(I.dump.length>1024)Ft+="? ";if(Ft+=I.dump+(I.condenseFlow?'"':"")+":"+(I.condenseFlow?"":" "),!gt(I,ot,Nt,!1,!1))continue;Ft+=I.dump,mt+=Ft}I.tag=xt,I.dump="{"+mt+"}"}t(_i,"writeFlowMapping");function k(I,ot,St,mt){let xt="",Tt=I.tag,wt=Object.keys(St);if(I.sortKeys===!0)wt.sort();else if(typeof I.sortKeys==="function")wt.sort(I.sortKeys);else if(I.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let At=0,Ft=wt.length;At<Ft;At+=1){let Rt="";if(!mt||xt!=="")Rt+=Qt(I,ot);let Nt=wt[At],oe=St[Nt];if(I.replacer)oe=I.replacer.call(St,Nt,oe);if(!gt(I,ot+1,Nt,!0,!0,!0))continue;let ce=I.tag!==null&&I.tag!=="?"||I.dump&&I.dump.length>1024;if(ce)if(I.dump&&n===I.dump.charCodeAt(0))Rt+="?";else Rt+="? ";if(Rt+=I.dump,ce)Rt+=Qt(I,ot);if(!gt(I,ot+1,oe,!0,ce))continue;if(I.dump&&n===I.dump.charCodeAt(0))Rt+=":";else Rt+=": ";Rt+=I.dump,xt+=Rt}I.tag=Tt,I.dump=xt||"{}"}t(k,"writeBlockMapping");function rt(I,ot,St){let mt=St?I.explicitTypes:I.implicitTypes;for(let xt=0,Tt=mt.length;xt<Tt;xt+=1){let wt=mt[xt];if((wt.instanceOf||wt.predicate)&&(!wt.instanceOf||typeof ot==="object"&&ot instanceof wt.instanceOf)&&(!wt.predicate||wt.predicate(ot))){if(St)if(wt.multi&&wt.representName)I.tag=wt.representName(ot);else I.tag=wt.tag;else I.tag="?";if(wt.represent){let At=I.styleMap[wt.tag]||wt.defaultStyle,Ft;if(s.call(wt.represent)==="[object Function]")Ft=wt.represent(ot,At);else if(o.call(wt.represent,At))Ft=wt.represent[At](ot,At);else throw new e("!<"+wt.tag+'> tag resolver accepts not "'+At+'" style');I.dump=Ft}return!0}}return!1}t(rt,"detectType");function gt(I,ot,St,mt,xt,Tt,wt){if(I.tag=null,I.dump=St,!rt(I,St,!1))rt(I,St,!0);let At=s.call(I.dump),Ft=mt;if(mt)mt=I.flowLevel<0||I.flowLevel>ot;let Rt=At==="[object Object]"||At==="[object Array]",Nt,oe;if(Rt)Nt=I.duplicates.indexOf(St),oe=Nt!==-1;if(I.tag!==null&&I.tag!=="?"||oe||I.indent!==2&&ot>0)xt=!1;if(oe&&I.usedDuplicates[Nt])I.dump="*ref_"+Nt;else{if(Rt&&oe&&!I.usedDuplicates[Nt])I.usedDuplicates[Nt]=!0;if(At==="[object Object]"){if(mt&&Object.keys(I.dump).length!==0){if(k(I,ot,I.dump,xt),oe)I.dump="&ref_"+Nt+I.dump}else if(_i(I,ot,I.dump),oe)I.dump="&ref_"+Nt+" "+I.dump}else if(At==="[object Array]"){if(mt&&I.dump.length!==0){if(I.noArrayIndent&&!wt&&ot>0)Nr(I,ot-1,I.dump,xt);else Nr(I,ot,I.dump,xt);if(oe)I.dump="&ref_"+Nt+I.dump}else if(Wr(I,ot,I.dump),oe)I.dump="&ref_"+Nt+" "+I.dump}else if(At==="[object String]"){if(I.tag!=="?")Si(I,I.dump,ot,Tt,Ft)}else if(At==="[object Undefined]")return!1;else{if(I.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+At)}if(I.tag!==null&&I.tag!=="?"){let ce=encodeURI(I.tag[0]==="!"?I.tag.slice(1):I.tag).replace(/!/g,"%21");if(I.tag[0]==="!")ce="!"+ce;else if(ce.slice(0,18)==="tag:yaml.org,2002:")ce="!!"+ce.slice(18);else ce="!<"+ce+">";I.dump=ce+" "+I.dump}}return!0}t(gt,"writeNode");function kt(I,ot){let St=[],mt=[];pt(I,St,mt);let xt=mt.length;for(let Tt=0;Tt<xt;Tt+=1)ot.duplicates.push(St[mt[Tt]]);ot.usedDuplicates=Array(xt)}t(kt,"getDuplicateReferences");function pt(I,ot,St){if(I!==null&&typeof I==="object"){let mt=ot.indexOf(I);if(mt!==-1){if(St.indexOf(mt)===-1)St.push(mt)}else if(ot.push(I),Array.isArray(I))for(let xt=0,Tt=I.length;xt<Tt;xt+=1)pt(I[xt],ot,St);else{let xt=Object.keys(I);for(let Tt=0,wt=xt.length;Tt<wt;Tt+=1)pt(I[xt[Tt]],ot,St)}}}t(pt,"inspectNode");function Bt(I,ot){ot=ot||{};let St=new Ut(ot);if(!St.noRefs)kt(I,St);let mt=I;if(St.replacer)mt=St.replacer.call({"":mt},"",mt);if(gt(St,0,mt,!0,!0))return St.dump+`
157
+ `;return""}return t(Bt,"dump2"),Rl.dump=Bt,Rl}t(Yd,"requireDumper");var Wd;function jd(){if(Wd)return Be;Wd=1;let r=Hd(),e=Yd();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),Be.Type=_e(),Be.Schema=ql(),Be.FAILSAFE_SCHEMA=Hl(),Be.JSON_SCHEMA=Gl(),Be.CORE_SCHEMA=Vl(),Be.DEFAULT_SCHEMA=vs(),Be.load=r.load,Be.loadAll=r.loadAll,Be.dump=e.dump,Be.YAMLException=ci(),Be.types={binary:Ql(),float:Xl(),map:zl(),null:Yl(),pairs:hh(),set:ch(),timestamp:Kl(),bool:jl(),int:Ul(),merge:Zl(),omap:Jl(),seq:Nl(),str:Wl()},Be.safeLoad=i("safeLoad","load"),Be.safeLoadAll=i("safeLoadAll","loadAll"),Be.safeDump=i("safeDump","dump"),Be}t(jd,"requireJsYaml");var ib=jd(),ob=Nd(ib),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:pr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:mr,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=ob;var Yp=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:h}=s??{},n=r.attr("id"),u=i?.includes("dark")?"#FFFFFF":"#000000",d=t((f,p,x)=>r.append("defs").append("filter").attr("id",f).attr("height",p).attr("width",p).append("feDropShadow").attr("dx",x).attr("dy",x).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",u),"dropShadow");if(d(`${n}-drop-shadow`,"130%","4"),d(`${n}-drop-shadow-small`,"150%","2"),!o)return;let c=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)},"insertLookDefs");var Ud=t((r)=>{let{handDrawnSeed:e}=m();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),sb=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ve=t((r)=>{let e=ab([...r.cssCompiledStyles||[],...r.cssStyles||[],...sb(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),ab=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),md=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),L=t((r)=>{let{stylesArray:e}=Ve(r),i=[],s=[],o=[],a=[];return e.forEach((h)=>{let n=h[0];if(md(n))i.push(h.join(":")+" !important");else{if(s.push(h.join(":")+" !important"),n.includes("stroke"))o.push(h.join(":")+" !important");if(n==="fill")a.push(h.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),vt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=m(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:h}=Ve(r);return Object.assign({roughness:0.7,fill:h.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:h.get("stroke")||o,seed:s,strokeWidth:h.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:nb(h.get("stroke-dasharray"))},e)},"userNodeOverrides"),nb=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var uh=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let n=o.pop(),u=o.pop(),d={provider:o.length>0?o[0]:s,prefix:u,name:n};return e&&!Ls(d)?null:d}let a=o[0],h=a.split("-");if(h.length>1){let n={provider:s,prefix:h.shift(),name:h.join("-")};return e&&!Ls(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!Ls(n,i)?null:n}return null},Ls=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var lb=Object.freeze({left:0,top:0,width:16,height:16}),ui=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),dh=Object.freeze({...lb,...ui}),Xd=Object.freeze({...dh,body:"",hidden:!1});function Gd(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function fh(r,e){let i=Gd(r,e);for(let s in Xd)if(s in ui){if(s in r&&!(s in i))i[s]=ui[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Vd(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(h){if(i[h])return o[h]=[];if(!(h in o)){o[h]=null;let n=s[h]&&s[h].parent,u=n&&a(n);if(u)o[h]=[n].concat(u)}return o[h]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function Kd(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function h(n){a=fh(s[n]||o[n],a)}return h(e),i.forEach(h),fh(r,a)}function ph(r,e){if(r.icons[e])return Kd(r,e,[]);let i=Vd(r,[e])[e];return i?Kd(r,e,i):null}var hb=Object.freeze({width:null,height:null}),Zd=Object.freeze({...hb,...ui});var cb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ub=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function gh(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(cb);if(s===null||!s.length)return r;let o=[],a=s.shift(),h=ub.test(a);while(!0){if(h){let n=parseFloat(a);if(isNaN(n))o.push(a);else o.push(Math.ceil(n*e*i)/i)}else o.push(a);if(a=s.shift(),a===void 0)return o.join("");h=!h}}function db(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),a=r.indexOf("</"+e);if(o===-1||a===-1)break;let h=r.indexOf(">",a);if(h===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(h+1)}return{defs:i,content:r}}function fb(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Qd(r,e,i){let s=db(r);return fb(s.defs,e+s.content+i)}var pb=(r)=>r==="unset"||r==="undefined"||r==="none";function mh(r,e){let i={...dh,...r},s={...Zd,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((T)=>{let B=[],{hFlip:_,vFlip:v,rotate:E}=T;if(_)if(v)E+=2;else B.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),B.push("scale(-1 1)"),o.top=o.left=0;else if(v)B.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),B.push("scale(1 -1)"),o.top=o.left=0;let D;if(E<0)E-=Math.floor(E/4)*4;switch(E=E%4,E){case 1:D=o.height/2+o.top,B.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:D=o.width/2+o.left,B.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}if(E%2===1){if(o.left!==o.top)D=o.left,o.left=o.top,o.top=D;if(o.width!==o.height)D=o.width,o.width=o.height,o.height=D}if(B.length)a=Qd(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:h,height:n}=s,{width:u,height:d}=o,c,f;if(h===null)f=n===null?"1em":n==="auto"?d:n,c=gh(f,u/d);else c=h==="auto"?u:h,f=n===null?gh(c,d/u):n==="auto"?d:n;let p={},x=(T,B)=>{if(!pb(B))p[T]=B.toString()};x("width",c),x("height",f);let S=[o.left,o.top,u,d];return p.viewBox=S.join(" "),{attributes:p,viewBox:S,body:a}}var gb=/\sid="(\S+)"/g,Jd=new Map;function mb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=Jd.get(r)||0;return Jd.set(r,e+1),e?`${r}${e}`:r}function yh(r){let e=[],i;while(i=gb.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let a=mb(o),h=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+h+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function xh(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var Lg={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},Ch=new Map,tf=new Map,Zi=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(l.debug("Registering icon pack:",e.name),"loader"in e)tf.set(e.name,e.loader);else if("icons"in e)Ch.set(e.name,e.icons);else throw l.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),ef=t(async(r,e)=>{let i=uh(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=Ch.get(s);if(!o){let h=tf.get(s);if(!h)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await h(),prefix:s},Ch.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=ph(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Fs=t(async(r)=>{try{return await ef(r),!0}catch{return!1}},"isIconAvailable"),fr=t(async(r,e,i)=>{let s;try{s=await ef(r,e?.fallbackPrefix)}catch(h){l.error(h),s=Lg}let o=mh(s,e),a=xh(yh(o.body),{...o.attributes,...i});return ee(a,C())},"getIconSVG");var xf=vn(dl(),1);function Mr(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],a=i.cache;if(a.has(o))return a.get(o);let h=r.apply(this,s);return i.cache=a.set(o,h)||a,h};return i.cache=new(Mr.Cache||Map),i}Mr.Cache=Map;function Xi(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function si(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var Jp="[object RegExp]",bc="[object String]",yc="[object Number]",vc="[object Boolean]",kc="[object Arguments]",Zp="[object Symbol]",Xp="[object Date]",em="[object Map]",tm="[object Set]",nm="[object Array]";var rm="[object ArrayBuffer]",am="[object Object]";var om="[object DataView]",im="[object Uint8Array]",sm="[object Uint8ClampedArray]",lm="[object Uint16Array]",cm="[object Uint32Array]";var um="[object Int8Array]",dm="[object Int16Array]",pm="[object Int32Array]";var mm="[object Float32Array]",fm="[object Float64Array]";function di(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function li(r){return di(r)}function lf(){}function hf(r){if(Xi(r))return r;if(Array.isArray(r)||di(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function Ms(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var bh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function xc(r){return typeof bh.Buffer<"u"&&bh.Buffer.isBuffer(r)}function cf(r){return r==="__proto__"}function As(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function uf(r,e){return fi(r,void 0,r,new Map,e)}function fi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(Xi(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let h=Array(r.length);s.set(r,h);for(let n=0;n<r.length;n++)h[n]=fi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))h.index=r.index;if(Object.hasOwn(r,"input"))h.input=r.input;return h}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let h=new RegExp(r.source,r.flags);return h.lastIndex=r.lastIndex,h}if(r instanceof Map){let h=new Map;s.set(r,h);for(let[n,u]of r)h.set(n,fi(u,n,i,s,o));return h}if(r instanceof Set){let h=new Set;s.set(r,h);for(let n of r)h.add(fi(n,void 0,i,s,o));return h}if(xc(r))return r.subarray();if(di(r)){let h=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,h);for(let n=0;n<r.length;n++)h[n]=fi(r[n],n,i,s,o);return h}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let h=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,h),De(h,r,i,s,o),h}if(typeof File<"u"&&r instanceof File){let h=new File([r],r.name,{type:r.type});return s.set(r,h),De(h,r,i,s,o),h}if(typeof Blob<"u"&&r instanceof Blob){let h=new Blob([r],{type:r.type});return s.set(r,h),De(h,r,i,s,o),h}if(r instanceof Error){let h=structuredClone(r);return s.set(r,h),h.message=r.message,h.name=r.name,h.stack=r.stack,h.cause=r.cause,h.constructor=r.constructor,De(h,r,i,s,o),h}if(r instanceof Boolean){let h=new Boolean(r.valueOf());return s.set(r,h),De(h,r,i,s,o),h}if(r instanceof Number){let h=new Number(r.valueOf());return s.set(r,h),De(h,r,i,s,o),h}if(r instanceof String){let h=new String(r.valueOf());return s.set(r,h),De(h,r,i,s,o),h}if(typeof r==="object"&&Fb(r)){let h=Object.create(Object.getPrototypeOf(r));return s.set(r,h),De(h,r,i,s,o),h}return r}function De(r,e,i=r,s,o){let a=[...Object.keys(e),...Ms(e)];for(let h=0;h<a.length;h++){let n=a[h],u=Object.getOwnPropertyDescriptor(r,n);if(u==null||u.writable)r[n]=fi(e[n],n,i,s,o)}}function Fb(r){switch(si(r)){case kc:case nm:case rm:case om:case vc:case Xp:case mm:case fm:case um:case dm:case pm:case em:case yc:case am:case Jp:case tm:case bc:case Zp:case im:case sm:case lm:case cm:return!0;default:return!1}}function df(r,e){return uf(r,(i,s,o,a)=>{let h=e?.(i,s,o,a);if(h!==void 0)return h;if(typeof r!=="object")return;if(si(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),De(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case yc:case bc:case vc:{let n=new r.constructor(r?.valueOf());return De(n,r),n}case kc:{let n={};return De(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function kh(r){return df(r)}function fd(r){return r!==null&&typeof r==="object"&&si(r)==="[object Arguments]"}function mo(r){return typeof r==="object"&&r!==null}function ff(r){return Number.isSafeInteger(r)&&r>=0}function gm(r){return r!=null&&typeof r!=="function"&&ff(r.length)}function pf(r){return mo(r)&&gm(r)}function gf(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let h=i[a];o=Es(o,h,s,new Map)}return o}function Es(r,e,i,s){if(Xi(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return hf(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let a=0;a<e.length;a++)if(!(a in e))e[a]=void 0}let o=[...Object.keys(e),...Ms(e)];for(let a=0;a<o.length;a++){let h=o[a];if(cf(h))continue;let n=e[h],u=r[h];if(fd(n))n={...n};if(fd(u))u={...u};if(xc(n))n=kh(n);if(Array.isArray(n))if(Array.isArray(u)){let c=[],f=Reflect.ownKeys(u);for(let p=0;p<f.length;p++){let x=f[p];c[x]=u[x]}u=c}else if(pf(u)){let c=[];for(let f=0;f<u.length;f++)c[f]=u[f];u=c}else u=[];let d=i(u,n,h,r,e,s);if(d!==void 0)r[h]=d;else if(Array.isArray(n))r[h]=Es(u,n,i,s);else if(mo(u)&&mo(n)&&(As(u)||As(n)||li(u)||li(n)))r[h]=Es(u,n,i,s);else if(u==null&&As(n))r[h]=Es({},n,i,s);else if(u==null&&li(n))r[h]=kh(n);else if(u===void 0||n!==void 0)r[h]=n}return r}function wh(r,...e){return gf(r,...e,lf)}var Mg="​",Mb={curveBasis:Fr,curveBasisClosed:xs,curveBasisOpen:Cs,curveBumpX:so,curveBumpY:ao,curveBundle:rl,curveCardinalClosed:il,curveCardinalOpen:ol,curveCardinal:lo,curveCatmullRomClosed:sl,curveCatmullRomOpen:al,curveCatmullRom:co,curveLinear:va,curveLinearClosed:Ss,curveMonotoneX:uo,curveMonotoneY:fo,curveNatural:ai,curveStep:ni,curveStepAfter:go,curveStepBefore:po},Ab=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Eb=t(function(r,e){let i=Cf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let h=i.map((n)=>n.args);$i(h),s=at(s,[...h])}else s=i.args;if(!s)return;let o=uc(r,e),a="config";if(s[a]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[a],delete s[a]}return s},"detectInit"),Cf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Ab.source})(?=[}][%]{2}).*
158
+ `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=zr.exec(r))!==null){if(s.index===zr.lastIndex)zr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],h=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:h})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),rh=t(function(r){return r.replace(zr,"")},"removeDirectives"),$b=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Is(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Mb[i]??e}t(Is,"interpolateToCurve");function bf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return xf.sanitizeUrl(i);return i}t(bf,"formatUrl");var Ib=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let h=0;h<s;h++)if(a=a[i[h]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function Sh(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(Sh,"distance");function kf(r){let e,i=0;r.forEach((o)=>{i+=Sh(o,e),e=o});let s=i/2;return Th(r,s)}t(kf,"traverseEdge");function wf(r){if(r.length===1)return r[0];return kf(r)}t(wf,"calcLabelPosition");var mf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),Th=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=Sh(o,i);if(a===0)return i;if(a<s)s-=a;else{let h=s/a;if(h<=0)return i;if(h>=1)return{x:o.x,y:o.y};if(h>0&&h<1)return{x:mf((1-h)*i.x+h*o.x,5),y:mf((1-h)*i.y+h*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ob=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=Th(e,25),a=r?10:5,h=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(h)*a+(e[0].x+o.x)/2,n.y=-Math.cos(h)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function Sf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=Th(s,o),h=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),u={x:0,y:0};if(e==="start_left")u.x=Math.sin(n+Math.PI)*h+(s[0].x+a.x)/2,u.y=-Math.cos(n+Math.PI)*h+(s[0].y+a.y)/2;else if(e==="end_right")u.x=Math.sin(n-Math.PI)*h+(s[0].x+a.x)/2-5,u.y=-Math.cos(n-Math.PI)*h+(s[0].y+a.y)/2-5;else if(e==="end_left")u.x=Math.sin(n)*h+(s[0].x+a.x)/2-5,u.y=-Math.cos(n)*h+(s[0].y+a.y)/2-5;else u.x=Math.sin(n)*h+(s[0].x+a.x)/2,u.y=-Math.cos(n)*h+(s[0].y+a.y)/2;return u}t(Sf,"calcTerminalLabelPosition");function Am(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(Am,"getStylesFromArray");var yf=0,Fg=t(()=>(yf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+yf),"generateId");function Tf(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(Tf,"makeRandomHex");var Pg=t((r)=>Tf(r.length),"random"),Db=t(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"),Pb=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=zn(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),es=Mr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),w.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((h,n)=>{let u=Xn(`${h} `,i),d=Xn(a,i);if(u>e){let{hyphenatedStrings:p,remainingWord:x}=Rb(h,e,"-",i);o.push(a,...p),a=x}else if(d+u>=e)o.push(a),a=h;else a=[a,h].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((h)=>h!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Rb=Mr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],h="";return o.forEach((n,u)=>{let d=`${h}${n}`;if(Xn(d,s)>=e){let f=u+1,p=o.length===f,x=`${d}${i}`;a.push(p?d:x),h=""}else h=d}),{hyphenatedStrings:a,remainingWord:h}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function gd(r,e){return Ad(r,e).height}t(gd,"calculateTextHeight");function Xn(r,e){return Ad(r,e).width}t(Xn,"calculateTextWidth");var Ad=Mr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=zn(i),h=["sans-serif",s],n=r.split(w.lineBreakRegex),u=[],d=b("body");if(!d.remove)return{width:0,height:0,lineHeight:0};let c=d.append("svg");for(let p of h){let x=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Db();B.text=T||Mg;let _=Pb(c,B).style("font-size",a).style("font-weight",o).style("font-family",p),v=(_._groups||_)[0][0].getBBox();if(v.width===0&&v.height===0)throw Error("svg element not in render tree");S.width=Math.round(Math.max(S.width,v.width)),x=Math.round(v.height),S.height+=x,S.lineHeight=Math.round(Math.max(S.lineHeight,x))}u.push(S)}c.remove();let f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),qb=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},$s,Wb=t(function(r){return $s=$s||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$s.innerHTML=r,unescape($s.textContent)},"entityDecode");function hm(r){return"str"in r}t(hm,"isDetailedError");var Nb=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),zn=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function ie(r,e){return wh({},r,e)}t(ie,"cleanAndMerge");var V={assignWithDepth:at,wrapLabel:es,calculateTextHeight:gd,calculateTextWidth:Xn,calculateTextDimensions:Ad,cleanAndMerge:ie,detectInit:Eb,detectDirective:Cf,isSubstringInArray:$b,interpolateToCurve:Is,calcLabelPosition:wf,calcCardinalityPosition:Ob,calcTerminalLabelPosition:Sf,formatUrl:bf,getStylesFromArray:Am,generateId:Fg,random:Pg,runFunc:Ib,entityDecode:Wb,insertTitle:Nb,isLabelCoordinateInPath:Bf,parseFontSize:zn,InitIDGenerator:qb},ah=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),Za=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Ln=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function de(r){return r??null}t(de,"handleUndefinedAttr");function Bf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(Bf,"isLabelCoordinateInPath");function _h(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Er=_h();function Ef(r){Er=r}var So={exec:()=>null};function ae(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let h=typeof a=="string"?a:a.source;return h=h.replace(Me.caret,"$1"),i=i.replace(o,h),s},getRegex:()=>new RegExp(i,e)};return s}var zb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Me={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Hb=/^(?:[ \t]*(?:\n|$))+/,Yb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,To=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ub=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vh=/(?:[*+-]|\d{1,9}[.)])/,$f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,If=ae($f).replace(/bull/g,vh).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(),Xb=ae($f).replace(/bull/g,vh).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(),Lh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gb=/^[^\n]+/,Fh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Vb=ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Kb=ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vh).getRegex(),qs="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",Mh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zb=ae("^ {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",Mh).replace("tag",qs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Of=ae(Lh).replace("hr",To).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",qs).getRegex(),Qb=ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Of).getRegex(),Ah={blockquote:Qb,code:Yb,def:Vb,fences:jb,heading:Ub,hr:To,html:Zb,lheading:If,list:Kb,newline:Hb,paragraph:Of,table:So,text:Gb},_f=ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",To).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",qs).getRegex(),Jb={...Ah,lheading:Xb,table:_f,paragraph:ae(Lh).replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_f).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",qs).getRegex()},tk={...Ah,html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Mh).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:So,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ae(Lh).replace("hr",To).replace("heading",` *#{1,6} *[^
159
+ ]`).replace("lheading",If).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ek=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Df=/^( {2,}|\\)\n(?!\s*$)/,ik=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ws=/[\p{P}\p{S}]/u,Eh=/[\s\p{P}\p{S}]/u,Pf=/[^\s\p{P}\p{S}]/u,ok=ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Eh).getRegex(),Rf=/(?!~)[\p{P}\p{S}]/u,sk=/(?!~)[\s\p{P}\p{S}]/u,ak=/(?:[^\s\p{P}\p{S}]|~)/u,nk=ae(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",zb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,lk=ae(qf,"u").replace(/punct/g,Ws).getRegex(),hk=ae(qf,"u").replace(/punct/g,Rf).getRegex(),Wf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ck=ae(Wf,"gu").replace(/notPunctSpace/g,Pf).replace(/punctSpace/g,Eh).replace(/punct/g,Ws).getRegex(),uk=ae(Wf,"gu").replace(/notPunctSpace/g,ak).replace(/punctSpace/g,sk).replace(/punct/g,Rf).getRegex(),dk=ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pf).replace(/punctSpace/g,Eh).replace(/punct/g,Ws).getRegex(),fk=ae(/\\(punct)/,"gu").replace(/punct/g,Ws).getRegex(),pk=ae(/^<(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(),gk=ae(Mh).replace("(?:-->|$)","-->").getRegex(),mk=ae("^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",gk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,yk=ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nf=ae(/^!?\[(label)\]\[(ref)\]/).replace("label",Ds).replace("ref",Fh).getRegex(),zf=ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fh).getRegex(),xk=ae("reflink|nolink(?!\\()","g").replace("reflink",Nf).replace("nolink",zf).getRegex(),vf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$h={_backpedal:So,anyPunctuation:fk,autolink:pk,blockSkip:nk,br:Df,code:rk,del:So,emStrongLDelim:lk,emStrongRDelimAst:ck,emStrongRDelimUnd:dk,escape:ek,link:yk,nolink:zf,punctuation:ok,reflink:Nf,reflinkSearch:xk,tag:mk,text:ik,url:So},Ck={...$h,link:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",Ds).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ds).getRegex()},Bh={...$h,emStrongRDelimAst:uk,emStrongLDelim:hk,url:ae(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vf).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:ae(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vf).getRegex()},bk={...Bh,br:ae(Df).replace("{2,}","*").getRegex(),text:ae(Bh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Os={normal:Ah,gfm:Jb,pedantic:tk},yo={normal:$h,gfm:Bh,breaks:bk,pedantic:Ck},kk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lf=(r)=>kk[r];function Ke(r,e){if(e){if(Me.escapeTest.test(r))return r.replace(Me.escapeReplace,Lf)}else if(Me.escapeTestNoEncode.test(r))return r.replace(Me.escapeReplaceNoEncode,Lf);return r}function Ff(r){try{r=encodeURI(r).replace(Me.percentDecode,"%")}catch{return null}return r}function Mf(r,e){let i=r.replace(Me.findPipe,(a,h,n)=>{let u=!1,d=h;for(;--d>=0&&n[d]==="\\";)u=!u;return u?"|":" |"}),s=i.split(Me.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Me.slashPipe,"|");return s}function bo(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let a=r.charAt(s-o-1);if(a===e&&!i)o++;else if(a!==e&&i)o++;else break}return r.slice(0,s-o)}function wk(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function Af(r,e,i,s,o){let a=e.href,h=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:h,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,u}function Sk(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
160
+ `).map((a)=>{let h=a.match(i.other.beginningSpace);if(h===null)return a;let[n]=h;return n.length>=o.length?a.slice(o.length):a}).join(`
161
+ `)}var Ps=class{options;rules;lexer;constructor(r){this.options=r||Er}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:bo(i,`
162
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=Sk(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=bo(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:bo(e[0],`
163
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=bo(e[0],`
164
+ `).split(`
165
+ `),s="",o="",a=[];for(;i.length>0;){let h=!1,n=[],u;for(u=0;u<i.length;u++)if(this.rules.other.blockquoteStart.test(i[u]))n.push(i[u]),h=!0;else if(!h)n.push(i[u]);else break;i=i.slice(u);let d=n.join(`
166
+ `),c=d.replace(this.rules.other.blockquoteSetextReplace,`
167
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
168
+ ${d}`:d,o=o?`${o}
169
+ ${c}`:c;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=f,i.length===0)break;let p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let x=p,S=x.raw+`
170
+ `+i.join(`
171
+ `),T=this.blockquote(S);a[a.length-1]=T,s=s.substring(0,s.length-x.raw.length)+T.raw,o=o.substring(0,o.length-x.text.length)+T.text;break}else if(p?.type==="list"){let x=p,S=x.raw+`
172
+ `+i.join(`
173
+ `),T=this.list(S);a[a.length-1]=T,s=s.substring(0,s.length-p.raw.length)+T.raw,o=o.substring(0,o.length-x.raw.length)+T.raw,i=S.substring(a.at(-1).raw.length).split(`
174
+ `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),h=!1;for(;r;){let u=!1,d="",c="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;d=e[0],r=r.substring(d.length);let f=e[2].split(`
175
+ `,1)[0].replace(this.rules.other.listReplaceTabs,(_)=>" ".repeat(3*_.length)),p=r.split(`
176
+ `,1)[0],x=!f.trim(),S=0;if(this.options.pedantic?(S=2,c=f.trimStart()):x?S=e[1].length+1:(S=e[2].search(this.rules.other.nonSpaceChar),S=S>4?1:S,c=f.slice(S),S+=e[1].length),x&&this.rules.other.blankLine.test(p)&&(d+=p+`
177
+ `,r=r.substring(p.length+1),u=!0),!u){let _=this.rules.other.nextBulletRegex(S),v=this.rules.other.hrRegex(S),E=this.rules.other.fencesBeginRegex(S),D=this.rules.other.headingBeginRegex(S),P=this.rules.other.htmlBeginRegex(S);for(;r;){let Z=r.split(`
178
+ `,1)[0],Q;if(p=Z,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),Q=p):Q=p.replace(this.rules.other.tabCharGlobal," "),E.test(p)||D.test(p)||P.test(p)||_.test(p)||v.test(p))break;if(Q.search(this.rules.other.nonSpaceChar)>=S||!p.trim())c+=`
179
+ `+Q.slice(S);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(f)||D.test(f)||v.test(f))break;c+=`
180
+ `+p}!x&&!p.trim()&&(x=!0),d+=Z+`
181
+ `,r=r.substring(Z.length+1),f=Q.slice(S)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(h=!0));let T=null,B;this.options.gfm&&(T=this.rules.other.listIsTask.exec(c),T&&(B=T[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!T,checked:B,loose:!1,text:c,tokens:[]}),o.raw+=d}let n=o.items.at(-1);if(n)n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let u=0;u<o.items.length;u++)if(this.lexer.state.top=!1,o.items[u].tokens=this.lexer.blockTokens(o.items[u].text,[]),!o.loose){let d=o.items[u].tokens.filter((f)=>f.type==="space"),c=d.length>0&&d.some((f)=>this.rules.other.anyLine.test(f.raw));o.loose=c}if(o.loose)for(let u=0;u<o.items.length;u++)o.items[u].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=Mf(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
182
+ `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let h of s)this.rules.other.tableAlignRight.test(h)?a.align.push("right"):this.rules.other.tableAlignCenter.test(h)?a.align.push("center"):this.rules.other.tableAlignLeft.test(h)?a.align.push("left"):a.align.push(null);for(let h=0;h<i.length;h++)a.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:a.align[h]});for(let h of o)a.rows.push(Mf(h,a.header.length).map((n,u)=>({text:n,tokens:this.lexer.inline(n),header:!1,align:a.align[u]})));return a}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let i=e[1].charAt(e[1].length-1)===`
183
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=bo(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=wk(e[2],"()");if(a===-2)return;if(a>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Af(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return Af(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,a,h,n=o,u=0,d=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*r.length+o);(s=d.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(h=[...a].length,s[3]||s[4]){n+=h;continue}else if((s[5]||s[6])&&o%3&&!((o+h)%3)){u+=h;continue}if(n-=h,n>0)continue;h=Math.min(h,h+n+u);let c=[...s[0]][0].length,f=r.slice(0,o+s.index+c+h);if(Math.min(o,h)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},We=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Er,this.options.tokenizer=this.options.tokenizer||new Ps,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:Me,block:Os.normal,inline:yo.normal};this.options.pedantic?(i.block=Os.pedantic,i.inline=yo.pedantic):this.options.gfm&&(i.block=Os.gfm,this.options.breaks?i.inline=yo.breaks:i.inline=yo.gfm),this.tokenizer.rules=i}static get rules(){return{block:Os,inline:yo}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(Me.carriageReturn,`
184
+ `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(Me.tabCharGlobal," ").replace(Me.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((h)=>(o=h.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let h=i.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
185
+ `:i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let h=i.at(-1);h?.type==="paragraph"||h?.type==="text"?(h.raw+=(h.raw.endsWith(`
186
+ `)?"":`
187
+ `)+o.raw,h.text+=`
188
+ `+o.text,this.inlineQueue.at(-1).src=h.text):i.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let h=i.at(-1);h?.type==="paragraph"||h?.type==="text"?(h.raw+=(h.raw.endsWith(`
189
+ `)?"":`
190
+ `)+o.raw,h.text+=`
191
+ `+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},i.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),i.push(o);continue}let a=e;if(this.options.extensions?.startBlock){let h=1/0,n=e.slice(1),u;this.options.extensions.startBlock.forEach((d)=>{u=d.call({lexer:this},n),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(a=e.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){let h=i.at(-1);s&&h?.type==="paragraph"?(h.raw+=(h.raw.endsWith(`
192
+ `)?"":`
193
+ `)+o.raw,h.text+=`
194
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):i.push(o),s=a.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let h=i.at(-1);h?.type==="text"?(h.raw+=(h.raw.endsWith(`
195
+ `)?"":`
196
+ `)+o.raw,h.text+=`
197
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):i.push(o);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw Error(h)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)a=o[2]?o[2].length:0,s=s.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let h=!1,n="";for(;e;){h||(n=""),h=!1;let u;if(this.options.extensions?.inline?.some((c)=>(u=c.call({lexer:this},e,i))?(e=e.substring(u.raw.length),i.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let c=i.at(-1);u.type==="text"&&c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(u=this.tokenizer.emStrong(e,s,n)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),i.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),i.push(u);continue}let d=e;if(this.options.extensions?.startInline){let c=1/0,f=e.slice(1),p;this.options.extensions.startInline.forEach((x)=>{p=x.call({lexer:this},f),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(d=e.substring(0,c+1))}if(u=this.tokenizer.inlineText(d)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(n=u.raw.slice(-1)),h=!0;let c=i.at(-1);c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return i}},Rs=class{options;parser;constructor(r){this.options=r||Er}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Me.notSpaceStart)?.[0],o=r.replace(Me.endingNewline,"")+`
198
+ `;return s?'<pre><code class="language-'+Ke(s)+'">'+(i?o:Ke(o,!0))+`</code></pre>
199
+ `:"<pre><code>"+(i?o:Ke(o,!0))+`</code></pre>
200
+ `}blockquote({tokens:r}){return`<blockquote>
201
+ ${this.parser.parse(r)}</blockquote>
202
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
203
+ `}hr(r){return`<hr>
204
+ `}list(r){let{ordered:e,start:i}=r,s="";for(let h=0;h<r.items.length;h++){let n=r.items[h];s+=this.listitem(n)}let o=e?"ol":"ul",a=e&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
205
+ `+s+"</"+o+`>
206
+ `}listitem(r){let e="";if(r.task){let i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+Ke(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
207
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
208
+ `}table(r){let e="",i="";for(let o=0;o<r.header.length;o++)i+=this.tablecell(r.header[o]);e+=this.tablerow({text:i});let s="";for(let o=0;o<r.rows.length;o++){let a=r.rows[o];i="";for(let h=0;h<a.length;h++)i+=this.tablecell(a[h]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
209
+ <thead>
210
+ `+e+`</thead>
211
+ `+s+`</table>
212
+ `}tablerow({text:r}){return`<tr>
213
+ ${r}</tr>
214
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
215
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Ke(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=Ff(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ke(e)+'"'),a+=">"+s+"</a>",a}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Ff(r);if(o===null)return Ke(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ke(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ke(r.text)}},Ih=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Ne=class r{options;renderer;textRenderer;constructor(e){this.options=e||Er,this.options.renderer=this.options.renderer||new Rs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ih}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=a,u=this.options.extensions.renderers[n.type].call({parser:this},n);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=u||"";continue}}let h=a;switch(h.type){case"space":{s+=this.renderer.space(h);continue}case"hr":{s+=this.renderer.hr(h);continue}case"heading":{s+=this.renderer.heading(h);continue}case"code":{s+=this.renderer.code(h);continue}case"table":{s+=this.renderer.table(h);continue}case"blockquote":{s+=this.renderer.blockquote(h);continue}case"list":{s+=this.renderer.list(h);continue}case"html":{s+=this.renderer.html(h);continue}case"def":{s+=this.renderer.def(h);continue}case"paragraph":{s+=this.renderer.paragraph(h);continue}case"text":{let n=h,u=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],u+=`
216
+ `+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):s+=u;continue}default:{let n='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=this.options.extensions.renderers[a.type].call({parser:this},a);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=n||"";continue}}let h=a;switch(h.type){case"escape":{s+=i.text(h);break}case"html":{s+=i.html(h);break}case"link":{s+=i.link(h);break}case"image":{s+=i.image(h);break}case"strong":{s+=i.strong(h);break}case"em":{s+=i.em(h);break}case"codespan":{s+=i.codespan(h);break}case"br":{s+=i.br(h);break}case"del":{s+=i.del(h);break}case"text":{s+=i.text(h);break}default:{let n='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},ko=class{options;block;constructor(r){this.options=r||Er}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?We.lex:We.lexInline}provideParser(){return this.block?Ne.parse:Ne.parseInline}},Tk=class{defaults=_h();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ne;Renderer=Rs;TextRenderer=Ih;Lexer=We;Tokenizer=Ps;Hooks=ko;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let h of a)i=i.concat(this.walkTokens(h.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((a)=>{let h=o[a].flat(1/0);i=i.concat(this.walkTokens(h,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let a=e.renderers[o.name];a?e.renderers[o.name]=function(...h){let n=o.renderer.apply(this,h);return n===!1&&(n=a.apply(this,h)),n}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let a=e[o.level];a?a.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Rs(this.defaults);for(let a in i.renderer){if(!(a in o))throw Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let h=a,n=i.renderer[h],u=o[h];o[h]=(...d)=>{let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ps(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let h=a,n=i.tokenizer[h],u=o[h];o[h]=(...d)=>{let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ko;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let h=a,n=i.hooks[h],u=o[h];ko.passThroughHooks.has(a)?o[h]=(d)=>{if(this.defaults.async&&ko.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await n.call(o,d);return u.call(o,f)})();let c=n.call(o,d);return u.call(o,c)}:o[h]=(...d)=>{if(this.defaults.async)return(async()=>{let f=await n.apply(o,d);return f===!1&&(f=await u.apply(o,d)),f})();let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(h){let n=[];return n.push(a.call(this,h)),o&&(n=n.concat(o.call(this,h))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return We.lex(r,e??this.defaults)}parser(r,e){return Ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?We.lex:We.lexInline)(h,o),u=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(u,o.walkTokens));let d=await(o.hooks?await o.hooks.provideParser():r?Ne.parse:Ne.parseInline)(u,o);return o.hooks?await o.hooks.postprocess(d):d})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let h=(o.hooks?o.hooks.provideLexer():r?We.lex:We.lexInline)(e,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?Ne.parse:Ne.parseInline)(h,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(h){return a(h)}}}onError(r,e){return(i)=>{if(i.message+=`
217
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Ke(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Ar=new Tk;function ne(r,e){return Ar.parse(r,e)}ne.options=ne.setOptions=function(r){return Ar.setOptions(r),ne.defaults=Ar.defaults,Ef(ne.defaults),ne};ne.getDefaults=_h;ne.defaults=Er;ne.use=function(...r){return Ar.use(...r),ne.defaults=Ar.defaults,Ef(ne.defaults),ne};ne.walkTokens=function(r,e){return Ar.walkTokens(r,e)};ne.parseInline=Ar.parseInline;ne.Parser=Ne;ne.parser=Ne.parse;ne.Renderer=Rs;ne.TextRenderer=Ih;ne.Lexer=We;ne.lexer=We.lex;ne.Tokenizer=Ps;ne.Hooks=ko;ne.parse=ne;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=ne;var Cz=Ne.parse,bz=We.lex;function bm(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(n,u){var d=u.match(/\n([\t ]+|(?!\s).)/g);if(d)return n.concat(d.map(function(c){var f,p;return(p=(f=c.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&p!==void 0?p:0}));return n},[]);if(o.length){var a=new RegExp(`
218
+ [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");s=s.map(function(n){return n.replace(a,`
219
+ `)})}s[0]=s[0].replace(/^\r?\n/,"");var h=s[0];return e.forEach(function(n,u){var d=h.match(/(?:^|\n)( *)$/),c=d?d[1]:"",f=n;if(typeof n==="string"&&n.includes(`
220
+ `))f=String(n).split(`
221
+ `).map(function(p,x){return x===0?p:"".concat(c).concat(p)}).join(`
222
+ `);h+=f+s[u+1]}),h}var Dh=typeof performance<"u"&&typeof performance.now==="function",pi=t(()=>Dh?performance.now():0,"now"),Oh="\uD83E\uDDDC ",Bk="Mermaid render",_k="Mermaid",vk={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},$z=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=pi();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(pi()-i)}}async tick(r,e){if(!this.enabled)return e();let i=pi();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(pi()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:pi(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),Dh&&typeof performance.mark==="function")try{performance.mark(`${Oh}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=pi();if(r.duration=e-r.start,Dh&&typeof performance.measure==="function")try{performance.measure(`${Oh}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:Bk,trackGroup:_k,color:vk[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],a=t((n,u)=>{let d=" ".repeat(u),c=n.duration.toFixed(1).padStart(8),f=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${c} ${f} ${d}${n.name}`);for(let p of n.children)a(p,u+1);if(n.children.length>0){let p=n.children.reduce((S,T)=>S+T.duration,0),x=n.duration-p;if(x>0.5){let S=x.toFixed(1).padStart(8);o.push(`${S} ${d} (self)`)}}},"walk");a(r,0);let h=Object.keys(this.buckets);if(h.length>0){o.push("—— buckets (summed) ——");for(let n of h)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Oh}mermaid render profile · ${s}
223
+ ${o.join(`
224
+ `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Yf(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
225
+ `).replace(/\n{2,}/g,`
226
+ `);return bm(s)}t(Yf,"preprocessMarkdown");function jf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(jf,"nonMarkdownToLines");function ym(r,e={}){let i=Yf(r,e),s=ne.lexer(i),o=[[]],a=0;function h(n,u="normal"){if(n.type==="text")n.text.split(`
227
+ `).forEach((c,f)=>{if(f!==0)a++,o.push([]);c.split(" ").forEach((p)=>{if(p=p.replace(/&#39;/g,"'"),p)o[a].push({content:p,type:u})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((d)=>{h(d,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(h,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((u)=>{h(u)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(ym,"markdownToLines");function Uf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Uf,"nonMarkdownToHTML");function Xf(r,{markdownAutoWrap:e}={}){let i=ne.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return l.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Xf,"markdownToHTML");var Lk=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(d){return setTimeout(d,16)};function s(){var d=this;d.reads=[],d.writes=[],d.raf=i.bind(r),e("initialized",d)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(d){e("run tasks");var c;while(c=d.shift())c()},"runTasks"),measure:t(function(d,c){e("measure");var f=!c?d:d.bind(c);return this.reads.push(f),o(this),f},"measure"),mutate:t(function(d,c){e("mutate");var f=!c?d:d.bind(c);return this.writes.push(f),o(this),f},"mutate"),clear:t(function(d){return e("clear",d),h(this.reads,d)||h(this.writes,d)},"clear"),extend:t(function(d){if(e("extend",d),typeof d!="object")throw Error("expected object");var c=Object.create(this);if(n(c,d),c.fastdom=this,c.initialize)c.initialize();return c},"extend"),catch:null};function o(d){if(!d.scheduled)d.scheduled=!0,d.raf(a.bind(null,d)),e("flush scheduled")}t(o,"scheduleFlush");function a(d){e("flush");var{writes:c,reads:f}=d,p;try{e("flushing reads",f.length),d.runTasks(f),e("flushing writes",c.length),d.runTasks(c)}catch(x){p=x}if(d.scheduled=!1,f.length||c.length)o(d);if(p)if(e("task errored",p.message),d.catch)d.catch(p);else throw p}t(a,"flush");function h(d,c){var f=d.indexOf(c);return!!~f&&!!d.splice(f,1)}t(h,"remove");function n(d,c){for(var f in c)if(c.hasOwnProperty(f))d[f]=c[f]}t(n,"mixin");var u=r.fastdom=r.fastdom||new s;return u}(typeof window<"u"?window:globalThis),Gf={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Ph(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Ph(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function Ph(r,e,i,s){var{_tasks:o,fastdom:a}=r,h,n=new Promise(function(u,d){h=a[e](function(){o.delete(n);try{u(s?i.call(s):i())}catch(c){d(c)}},s)});return o.set(n,h),n}t(Ph,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Gf,Fk=Gf,Mk=Lk.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Fk),cr=Mk;function Vf(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Vf,"splitTextToChars");function Kf(r,e){let i=Vf(e.content);return Wh(r,[],i,e.type)}t(Kf,"splitWordToFitWidth");function Wh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,h=[...e,o];if(r([{content:h.join(""),type:s}]))return Wh(r,h,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Wh,"splitWordToFitWidthRecursion");function Zf(r,e){if(r.some(({content:i})=>i.includes(`
228
+ `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Ns(r,e)}t(Zf,"splitLineToFitWidth");function Ns(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let a=r.shift()??{content:" ",type:"normal"},h=[...s];if(o!=="")h.push({content:o,type:"normal"});if(h.push(a),e(h))return Ns(r,e,i,h);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,u]=Kf(e,a);if(i.push([n]),u.content)r.unshift(u)}return Ns(r,e,i)}t(Ns,"splitLineToFitWidthRecursion");function Rh(r,e){if(e)r.attr("style",e)}t(Rh,"applyStyle");var Hf=16384;async function Qf(r,e,i,s,o=!1,a=C(),h=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Hf)}px`),n.attr("height",`${Math.min(10*i,Hf)}px`);let u=n.append("xhtml:div"),d=Dt(e.label)?await pc(e.label.replace(w.lineBreakRegex,`
229
+ `),a):ee(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",f=u.append("span");if(f.html(d),Rh(f,e.labelStyle),f.attr("class",`${c} ${s}`),Rh(u,e.labelStyle),u.style("display","table-cell"),u.style("white-space","nowrap"),u.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)u.style("max-width",i+"px"),u.style("text-align","center");if(u.attr("xmlns","http://www.w3.org/1999/xhtml"),o)u.attr("class","labelBkg");let p=await cr.measure(()=>u.node().getBoundingClientRect());if(p.width===i)u.style("display","table"),u.style("white-space","break-spaces"),u.style("width",i+"px");else if(p.width<h)u.style("display","table"),u.style("width",h+"px"),u.style("text-align","center");return n.node()}t(Qf,"addHtmlSpan");function zs(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(zs,"createTspan");function Jf(r,e,i){let s=r.append("text"),o=zs(s,1,e);Hs(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(Jf,"computeWidthOfText");function Og(r,e,i){let s=r.append("text"),o=zs(s,1,e);Hs(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(Og,"computeDimensionOfText");function tp(r,e,i,s=!1,o=!1){let h=e.append("g"),n=h.insert("rect").attr("class","background").attr("style","stroke: none"),u=h.append("text").attr("y","-10.1");if(o)u.attr("text-anchor","middle");let d=0;for(let c of i){let f=t((x)=>Jf(h,1.1,x)<=r,"checkWidth"),p=f(c)?[c]:Zf(c,f);for(let x of p){let S=zs(u,d,1.1,o);Hs(S,x),d++}}if(s){let c=u.node().getBBox(),f=2;return n.attr("x",c.x-2).attr("y",c.y-2).attr("width",c.width+4).attr("height",c.height+4),h.node()}else return u.node()}t(tp,"createFormattedText");function qh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(qh,"decodeHTMLEntities");function Hs(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(qh(i.content));else o.text(" "+qh(i.content))})}t(Hs,"updateTextContentAndStyles");async function ep(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,h)=>(i.push((async()=>{let n=`${a}:${h}`;if(await Fs(n))return await fr(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ep,"replaceIconSubstring");var gn=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:h=!0,isNode:n=!0,width:u=200,minWidth:d=0,addSvgBackground:c=!1}={},f)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",c),a){let p=h?Xf(e,f):Uf(e),x=await ep(Za(p),f),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:Dt(e)?S:x,labelStyle:i.replace("fill:","color:")};return await Qf(r,T,u,o,c,f,d)}else{let p=Za(e.replace(/<br\s*\/?>/g,"<br/>")),x=h?ym(p.replace("<br>","<br/>"),f):jf(p),S=tp(u,r,x,e?c:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");b(S).select("rect").attr("style",T.replace(/background:/g,"fill:"));let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(S).select("text").attr("style",B)}if(s)b(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else b(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var hd=new Set(["redux-color","redux-dark-color"]),Ak=12,Ek=64,bt=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),lt=t((r,e)=>r!=null&&hd.has(r)&&bt(e),"isColorTheme"),$k=/^[\w-]+$/,ct=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return $k.test(e)?e:"classic"},"safeLook"),ea=t((r)=>bt(r)?r.length:0,"paletteSlotCount"),er=t((r,e)=>{if(bt(e))return ea(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Ek?r:Ak},"colorSlotCount"),tr=t((r,e,i,s)=>{if(e===void 0||!lt(i,s))return;let o=e%ea(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Nh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,h=Math.cos(a),n=Math.sin(a);for(let u of r){let[d,c]=u;u[0]=(d-s)*h-(c-o)*n+s,u[1]=(d-s)*n+(c-o)*h+o}}}function Ik(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ok(r,e,i,s=1){let o=i,a=Math.max(e,0.1),h=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let d of h)Nh(d,n,o);let u=function(d,c,f){let p=[];for(let v of d){let E=[...v];Ik(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&p.push(E)}let x=[];c=Math.max(c,0.1);let S=[];for(let v of p)for(let E=0;E<v.length-1;E++){let D=v[E],P=v[E+1];if(D[1]!==P[1]){let Z=Math.min(D[1],P[1]);S.push({ymin:Z,ymax:Math.max(D[1],P[1]),x:Z===D[1]?D[0]:P[0],islope:(P[0]-D[0])/(P[1]-D[1])})}}if(S.sort((v,E)=>v.ymin<E.ymin?-1:v.ymin>E.ymin?1:v.x<E.x?-1:v.x>E.x?1:v.ymax===E.ymax?0:(v.ymax-E.ymax)/Math.abs(v.ymax-E.ymax)),!S.length)return x;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let E=0;E<S.length&&!(S[E].ymin>B);E++)v=E;S.splice(0,v+1).forEach((E)=>{T.push({s:B,edge:E})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,E)=>v.edge.x===E.edge.x?0:(v.edge.x-E.edge.x)/Math.abs(v.edge.x-E.edge.x)),(f!==1||_%c==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let E=v+1;if(E>=T.length)break;let D=T[v].edge,P=T[E].edge;x.push([[Math.round(D.x),B],[Math.round(P.x),B]])}B+=f,T.forEach((v)=>{v.edge.x=v.edge.x+f*v.edge.islope}),_++}return x}(h,a,s);if(o){for(let d of h)Nh(d,n,-o);(function(d,c,f){let p=[];d.forEach((x)=>p.push(...x)),Nh(p,c,f)})(u,n,-o)}return u}function Fo(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),Ok(r,o,s,a||1)}class Qs{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=Fo(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function Js(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class cp extends Qs{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=Fo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],h=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[u,d]of s)Js([u,d])&&a.push([[u[0]-h,u[1]+n],[...d]],[[u[0]+h,u[1]-n],[...d]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class up extends Qs{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class dp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Fo(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let h of r){let n=Js(h),u=n/s,d=Math.ceil(u)-1,c=n-d*s,f=(h[0][0]+h[1][0])/2-s/4,p=Math.min(h[0][1],h[1][1]);for(let x=0;x<d;x++){let S=p+c+x*s,T=f-a+2*Math.random()*a,B=S-a+2*Math.random()*a,_=this.helper.ellipse(T,B,o,o,e);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}class fp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Fo(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let h=Js(a),n=Math.floor(h/(i+s)),u=(h+s-n*(i+s))/2,d=a[0],c=a[1];d[0]>c[0]&&(d=a[1],c=a[0]);let f=Math.atan((c[1]-d[1])/(c[0]-d[0]));for(let p=0;p<n;p++){let x=p*(i+s),S=x+i,T=[d[0]+x*Math.cos(f)+u*Math.cos(f),d[1]+x*Math.sin(f)+u*Math.sin(f)],B=[d[0]+S*Math.cos(f)+u*Math.cos(f),d[1]+S*Math.sin(f)+u*Math.sin(f)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class pp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=Fo(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=Js(o),h=Math.round(a/(2*e)),n=o[0],u=o[1];n[0]>u[0]&&(n=o[1],u=o[0]);let d=Math.atan((u[1]-n[1])/(u[0]-n[0]));for(let c=0;c<h;c++){let f=2*c*e,p=2*(c+1)*e,x=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+f*Math.cos(d),n[1]+f*Math.sin(d)],T=[n[0]+p*Math.cos(d),n[1]+p*Math.sin(d)],B=[S[0]+x*Math.cos(d+Math.PI/4),S[1]+x*Math.sin(d+Math.PI/4)];s.push(...this.helper.doubleLineOps(S[0],S[1],B[0],B[1],i),...this.helper.doubleLineOps(B[0],B[1],T[0],T[1],i))}}),s}}var Ae={};class gp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Dk=0,zh=1,rp=2,Ys={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 Hh(r,e){return r.type===e}function Vh(r){let e=[],i=function(h){let n=[];for(;h!=="";)if(h.match(/^([ \t\r\n,]+)/))h=h.substr(RegExp.$1.length);else if(h.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Dk,text:RegExp.$1},h=h.substr(RegExp.$1.length);else{if(!h.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:zh,text:`${parseFloat(RegExp.$1)}`},h=h.substr(RegExp.$1.length)}return n[n.length]={type:rp,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Hh(a,rp);){let h=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return Vh("M0,0"+r);o++,h=Ys[a.text],s=a.text}else Hh(a,zh)?h=Ys[s]:(o++,h=Ys[a.text],s=a.text);if(!(o+h<i.length))throw Error("Path data ended short");for(let u=o;u<o+h;u++){let d=i[u];if(!Hh(d,zh))throw Error("Param not a number: "+s+","+d.text);n[n.length]=+d.text}if(typeof Ys[s]!="number")throw Error("Bad segment: "+s);{let u={key:s,data:n};e.push(u),o+=h,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function mp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:h,data:n}of r)switch(h){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"C",data:u}),e=u[4],i=u[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"Q",data:u}),e=u[2],i=u[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"S",data:u}),e=u[2],i=u[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function yp(r){let e=[],i="",s=0,o=0,a=0,h=0,n=0,u=0;for(let{key:d,data:c}of r){switch(d){case"M":e.push({key:"M",data:[...c]}),[s,o]=c,[a,h]=c;break;case"C":e.push({key:"C",data:[...c]}),s=c[4],o=c[5],n=c[2],u=c[3];break;case"L":e.push({key:"L",data:[...c]}),[s,o]=c;break;case"H":s=c[0],e.push({key:"L",data:[s,o]});break;case"V":o=c[0],e.push({key:"L",data:[s,o]});break;case"S":{let f=0,p=0;i==="C"||i==="S"?(f=s+(s-n),p=o+(o-u)):(f=s,p=o),e.push({key:"C",data:[f,p,...c]}),n=c[0],u=c[1],s=c[2],o=c[3];break}case"T":{let[f,p]=c,x=0,S=0;i==="Q"||i==="T"?(x=s+(s-n),S=o+(o-u)):(x=s,S=o);let T=s+2*(x-s)/3,B=o+2*(S-o)/3,_=f+2*(x-f)/3,v=p+2*(S-p)/3;e.push({key:"C",data:[T,B,_,v,f,p]}),n=x,u=S,s=f,o=p;break}case"Q":{let[f,p,x,S]=c,T=s+2*(f-s)/3,B=o+2*(p-o)/3,_=x+2*(f-x)/3,v=S+2*(p-S)/3;e.push({key:"C",data:[T,B,_,v,x,S]}),n=f,u=p,s=x,o=S;break}case"A":{let f=Math.abs(c[0]),p=Math.abs(c[1]),x=c[2],S=c[3],T=c[4],B=c[5],_=c[6];if(f===0||p===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)xp(s,o,B,_,f,p,x,S,T).forEach(function(v){e.push({key:"C",data:v})}),s=B,o=_;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=h}i=d}return e}function _o(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function xp(r,e,i,s,o,a,h,n,u,d){let c=(f=h,Math.PI*f/180);var f;let p=[],x=0,S=0,T=0,B=0;if(d)[x,S,T,B]=d;else{[r,e]=_o(r,e,-c),[i,s]=_o(i,s,-c);let N=(r-i)/2,K=(e-s)/2,et=N*N/(o*o)+K*K/(a*a);et>1&&(et=Math.sqrt(et),o*=et,a*=et);let U=o*o,ut=a*a,nt=U*ut-U*K*K-ut*N*N,_t=U*K*K+ut*N*N,Lt=(n===u?-1:1)*Math.sqrt(Math.abs(nt/_t));T=Lt*o*K/a+(r+i)/2,B=Lt*-a*N/o+(e+s)/2,x=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(x=Math.PI-x),i<T&&(S=Math.PI-S),x<0&&(x=2*Math.PI+x),S<0&&(S=2*Math.PI+S),u&&x>S&&(x-=2*Math.PI),!u&&S>x&&(S-=2*Math.PI)}let _=S-x;if(Math.abs(_)>120*Math.PI/180){let N=S,K=i,et=s;S=u&&S>x?x+120*Math.PI/180*1:x+120*Math.PI/180*-1,p=xp(i=T+o*Math.cos(S),s=B+a*Math.sin(S),K,et,o,a,h,0,u,[S,N,T,B])}_=S-x;let v=Math.cos(x),E=Math.sin(x),D=Math.cos(S),P=Math.sin(S),Z=Math.tan(_/4),Q=1.3333333333333333*o*Z,tt=1.3333333333333333*a*Z,it=[r,e],ft=[r+Q*E,e-tt*v],dt=[i+Q*P,s-tt*D],st=[i,s];if(ft[0]=2*it[0]-ft[0],ft[1]=2*it[1]-ft[1],d)return[ft,dt,st].concat(p);{p=[ft,dt,st].concat(p);let N=[];for(let K=0;K<p.length;K+=3){let et=_o(p[K][0],p[K][1],c),U=_o(p[K+1][0],p[K+1][1],c),ut=_o(p[K+2][0],p[K+2][1],c);N.push([et[0],et[1],U[0],U[1],ut[0],ut[1]])}return N}}var Pk={randOffset:function(r,e){return Ht(r,e)},randOffsetWithRange:function(r,e,i){return Vs(r,e,i)},ellipse:function(r,e,i,s,o){let a=bp(i,s,o);return Uh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return wr(r,e,i,s,o,!0)}};function Cp(r,e,i,s,o){return{type:"path",ops:wr(r,e,i,s,o)}}function Xs(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...wr(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...wr(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Cp(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Rk(r,e,i,s,o){return function(a,h){return Xs(a,!0,h)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function ip(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=js(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:js(i[0],1.5*(1+0.22*e.roughness),ap(e));for(let a=1;a<i.length;a++){let h=i[a];if(h.length){let n=js(h,1*(1+0.2*e.roughness),e),u=e.disableMultiStroke?[]:js(h,1.5*(1+0.22*e.roughness),ap(e));for(let d of n)d.op!=="move"&&s.push(d);for(let d of u)d.op!=="move"&&o.push(d)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function bp(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,h=Math.abs(r/2),n=Math.abs(e/2),u=1-i.curveFitting;return h+=Ht(h*u,i),n+=Ht(n*u,i),{increment:a,rx:h,ry:n}}function Uh(r,e,i,s){let[o,a]=np(s.increment,r,e,s.rx,s.ry,1,s.increment*Vs(0.1,Vs(0.4,1,i),i),i),h=Ks(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=np(s.increment,r,e,s.rx,s.ry,1.5,0,i),u=Ks(n,null,i);h=h.concat(u)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function op(r,e,i,s,o,a,h,n,u){let d=r,c=e,f=Math.abs(i/2),p=Math.abs(s/2);f+=Ht(0.01*f,u),p+=Ht(0.01*p,u);let x=o,S=a;for(;x<0;)x+=2*Math.PI,S+=2*Math.PI;S-x>2*Math.PI&&(x=0,S=2*Math.PI);let T=2*Math.PI/u.curveStepCount,B=Math.min(T/2,(S-x)/2),_=lp(B,d,c,f,p,x,S,1,u);if(!u.disableMultiStroke){let v=lp(B,d,c,f,p,x,S,1.5,u);_.push(...v)}return h&&(n?_.push(...wr(d,c,d+f*Math.cos(x),c+p*Math.sin(x),u),...wr(d,c,d+f*Math.cos(S),c+p*Math.sin(S),u)):_.push({op:"lineTo",data:[d,c]},{op:"lineTo",data:[d+f*Math.cos(x),c+p*Math.sin(x)]})),{type:"path",ops:_}}function sp(r,e){let i=yp(mp(Vh(r))),s=[],o=[0,0],a=[0,0];for(let{key:h,data:n}of i)switch(h){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...wr(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[u,d,c,f,p,x]=n;s.push(...qk(u,d,c,f,p,x,a,e)),a=[p,x];break}case"Z":s.push(...wr(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Yh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+Ht(o,e),s[0][1]+Ht(o,e)]});for(let h=1;h<a;h++)i.push({op:"lineTo",data:[s[h][0]+Ht(o,e),s[h][1]+Ht(o,e)]})}}return{type:"fillPath",ops:i}}function gi(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Ae[o])switch(o){case"zigzag":Ae[o]||(Ae[o]=new cp(s));break;case"cross-hatch":Ae[o]||(Ae[o]=new up(s));break;case"dots":Ae[o]||(Ae[o]=new dp(s));break;case"dashed":Ae[o]||(Ae[o]=new fp(s));break;case"zigzag-line":Ae[o]||(Ae[o]=new pp(s));break;default:o="hachure",Ae[o]||(Ae[o]=new Qs(s))}return Ae[o]}(e,Pk).fillPolygons(r,e)}function ap(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function kp(r){return r.randomizer||(r.randomizer=new gp(r.seed||0)),r.randomizer.next()}function Vs(r,e,i,s=1){return i.roughness*s*(kp(i)*(e-r)+r)}function Ht(r,e,i=1){return Vs(-r,r,e,i)}function wr(r,e,i,s,o,a=!1){let h=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Xh(r,e,i,s,o,!0,!1);if(h)return n;let u=Xh(r,e,i,s,o,!0,!0);return n.concat(u)}function Xh(r,e,i,s,o,a,h){let n=Math.pow(r-i,2)+Math.pow(e-s,2),u=Math.sqrt(n),d=1;d=u<200?1:u>500?0.4:-0.0016668*u+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=u/10);let f=c/2,p=0.2+0.2*kp(o),x=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;x=Ht(x,o,d),S=Ht(S,o,d);let T=[],B=()=>Ht(f,o,d),_=()=>Ht(c,o,d),v=o.preserveVertices;return a&&(h?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Ht(c,o,d)),e+(v?0:Ht(c,o,d))]})),h?T.push({op:"bcurveTo",data:[x+r+(i-r)*p+B(),S+e+(s-e)*p+B(),x+r+2*(i-r)*p+B(),S+e+2*(s-e)*p+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[x+r+(i-r)*p+_(),S+e+(s-e)*p+_(),x+r+2*(i-r)*p+_(),S+e+2*(s-e)*p+_(),i+(v?0:_()),s+(v?0:_())]}),T}function js(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Ht(e,i),r[0][1]+Ht(e,i)]),s.push([r[0][0]+Ht(e,i),r[0][1]+Ht(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Ht(e,i),r[o][1]+Ht(e,i)]),o===r.length-1&&s.push([r[o][0]+Ht(e,i),r[o][1]+Ht(e,i)]);return Ks(s,null,i)}function Ks(r,e,i){let s=r.length,o=[];if(s>3){let a=[],h=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let u=r[n];a[0]=[u[0],u[1]],a[1]=[u[0]+(h*r[n+1][0]-h*r[n-1][0])/6,u[1]+(h*r[n+1][1]-h*r[n-1][1])/6],a[2]=[r[n+1][0]+(h*r[n][0]-h*r[n+2][0])/6,r[n+1][1]+(h*r[n][1]-h*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Ht(n,i),e[1]+Ht(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Xh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function np(r,e,i,s,o,a,h,n){let u=[],d=[];if(n.roughness===0){r/=4,d.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let c=0;c<=2*Math.PI;c+=r){let f=[e+s*Math.cos(c),i+o*Math.sin(c)];u.push(f),d.push(f)}d.push([e+s*Math.cos(0),i+o*Math.sin(0)]),d.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let c=Ht(0.5,n)-Math.PI/2;d.push([Ht(a,n)+e+0.9*s*Math.cos(c-r),Ht(a,n)+i+0.9*o*Math.sin(c-r)]);let f=2*Math.PI+c-0.01;for(let p=c;p<f;p+=r){let x=[Ht(a,n)+e+s*Math.cos(p),Ht(a,n)+i+o*Math.sin(p)];u.push(x),d.push(x)}d.push([Ht(a,n)+e+s*Math.cos(c+2*Math.PI+0.5*h),Ht(a,n)+i+o*Math.sin(c+2*Math.PI+0.5*h)]),d.push([Ht(a,n)+e+0.98*s*Math.cos(c+h),Ht(a,n)+i+0.98*o*Math.sin(c+h)]),d.push([Ht(a,n)+e+0.9*s*Math.cos(c+0.5*h),Ht(a,n)+i+0.9*o*Math.sin(c+0.5*h)])}return[d,u]}function lp(r,e,i,s,o,a,h,n,u){let d=a+Ht(0.1,u),c=[];c.push([Ht(n,u)+e+0.9*s*Math.cos(d-r),Ht(n,u)+i+0.9*o*Math.sin(d-r)]);for(let f=d;f<=h;f+=r)c.push([Ht(n,u)+e+s*Math.cos(f),Ht(n,u)+i+o*Math.sin(f)]);return c.push([e+s*Math.cos(h),i+o*Math.sin(h)]),c.push([e+s*Math.cos(h),i+o*Math.sin(h)]),Ks(c,null,u)}function qk(r,e,i,s,o,a,h,n){let u=[],d=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],c=[0,0],f=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let x=0;x<f;x++)x===0?u.push({op:"move",data:[h[0],h[1]]}):u.push({op:"move",data:[h[0]+(p?0:Ht(d[0],n)),h[1]+(p?0:Ht(d[0],n))]}),c=p?[o,a]:[o+Ht(d[x],n),a+Ht(d[x],n)],u.push({op:"bcurveTo",data:[r+Ht(d[x],n),e+Ht(d[x],n),i+Ht(d[x],n),s+Ht(d[x],n),c[0],c[1]]});return u}function vo(r){return[...r]}function hp(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(vo(r[0]),vo(r[1]),vo(r[2]),vo(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],h=1-e;s.push(vo(o[0]));for(let n=1;n+2<o.length;n++){let u=o[n];a[0]=[u[0],u[1]],a[1]=[u[0]+(h*o[n+1][0]-h*o[n-1][0])/6,u[1]+(h*o[n+1][1]-h*o[n-1][1])/6],a[2]=[o[n+1][0]+(h*o[n][0]-h*o[n+2][0])/6,o[n+1][1]+(h*o[n][1]-h*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function Gs(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Wk(r,e,i){let s=Gs(e,i);if(s===0)return Gs(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),Gs(r,$r(e,i,o))}function $r(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Gh(r,e,i,s){let o=s||[];if(function(n,u){let d=n[u+0],c=n[u+1],f=n[u+2],p=n[u+3],x=3*c[0]-2*d[0]-p[0];x*=x;let S=3*c[1]-2*d[1]-p[1];S*=S;let T=3*f[0]-2*p[0]-d[0];T*=T;let B=3*f[1]-2*p[1]-d[1];return B*=B,x<T&&(x=T),S<B&&(S=B),x+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],h=n,Math.sqrt(Gs(a,h)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let u=r[e+0],d=r[e+1],c=r[e+2],f=r[e+3],p=$r(u,d,0.5),x=$r(d,c,0.5),S=$r(c,f,0.5),T=$r(p,x,0.5),B=$r(x,S,0.5),_=$r(T,B,0.5);Gh([u,p,T,_],0,i,o),Gh([_,B,S,f],0,i,o)}var a,h;return o}function Nk(r,e){return Zs(r,0,r.length,e)}function Zs(r,e,i,s,o){let a=o||[],h=r[e],n=r[i-1],u=0,d=1;for(let c=e+1;c<i-1;++c){let f=Wk(r[c],h,n);f>u&&(u=f,d=c)}return Math.sqrt(u)>s?(Zs(r,e,d+1,s,a),Zs(r,d,i,s,a)):(a.length||a.push(h),a.push(n)),a}function jh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)Gh(r,3*a,e,s);return i&&i>0?Zs(s,0,s.length,i):s}var Ie="none";class Lo{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[Cp(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),h=[],n=Rk(r,e,i,s,a);if(a.fill){let u=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?h.push(Yh([u],a)):h.push(gi([u],a))}return a.stroke!==Ie&&h.push(n),this._d("rectangle",h,a)}ellipse(r,e,i,s,o){let a=this._o(o),h=[],n=bp(i,s,a),u=Uh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let d=Uh(r,e,a,n).opset;d.type="fillPath",h.push(d)}else h.push(gi([u.estimatedPoints],a));return a.stroke!==Ie&&h.push(u.opset),this._d("ellipse",h,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[Xs(r,!1,i)],i)}arc(r,e,i,s,o,a,h=!1,n){let u=this._o(n),d=[],c=op(r,e,i,s,o,a,h,!0,u);if(h&&u.fill)if(u.fillStyle==="solid"){let f=Object.assign({},u);f.disableMultiStroke=!0;let p=op(r,e,i,s,o,a,!0,!1,f);p.type="fillPath",d.push(p)}else d.push(function(f,p,x,S,T,B,_){let v=f,E=p,D=Math.abs(x/2),P=Math.abs(S/2);D+=Ht(0.01*D,_),P+=Ht(0.01*P,_);let Z=T,Q=B;for(;Z<0;)Z+=2*Math.PI,Q+=2*Math.PI;Q-Z>2*Math.PI&&(Z=0,Q=2*Math.PI);let tt=(Q-Z)/_.curveStepCount,it=[];for(let ft=Z;ft<=Q;ft+=tt)it.push([v+D*Math.cos(ft),E+P*Math.sin(ft)]);return it.push([v+D*Math.cos(Q),E+P*Math.sin(Q)]),it.push([v,E]),gi([it],_)}(r,e,i,s,o,a,u));return u.stroke!==Ie&&d.push(c),this._d("arc",d,u)}curve(r,e){let i=this._o(e),s=[],o=ip(r,i);if(i.fill&&i.fill!==Ie)if(i.fillStyle==="solid"){let a=ip(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],h=r;if(h.length){let n=typeof h[0][0]=="number"?[h]:h;for(let u of n)u.length<3?a.push(...u):u.length===3?a.push(...jh(hp([u[0],u[0],u[1],u[2]]),10,(1+i.roughness)/2)):a.push(...jh(hp(u),10,(1+i.roughness)/2))}a.length&&s.push(gi([a],i))}return i.stroke!==Ie&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=Xs(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Yh([r],i)):s.push(gi([r],i))),i.stroke!==Ie&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==Ie,a=i.stroke!==Ie,h=!!(i.simplification&&i.simplification<1),n=function(d,c,f){let p=yp(mp(Vh(d))),x=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...jh(B,c)),B=[]},v=()=>{_(),S.length&&(x.push(S),S=[])};for(let{key:D,data:P}of p)switch(D){case"M":v(),T=[P[0],P[1]],S.push(T);break;case"L":_(),S.push([P[0],P[1]]);break;case"C":if(!B.length){let Z=S.length?S[S.length-1]:T;B.push([Z[0],Z[1]])}B.push([P[0],P[1]]),B.push([P[2],P[3]]),B.push([P[4],P[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!f)return x;let E=[];for(let D of x){let P=Nk(D,f);P.length&&E.push(P)}return E}(r,1,h?4-4*(i.simplification||1):(1+i.roughness)/2),u=sp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let d=sp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else s.push(Yh(n,i));else s.push(gi(n,i));return a&&(h?n.forEach((d)=>{s.push(Xs(d,!1,i))}):s.push(u)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ie};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ie,strokeWidth:0,fill:i.fill||Ie};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||Ie,strokeWidth:i,fill:Ie}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class wp{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new Lo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let h=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,h),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((h)=>+h.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,h=!1,n){let u=this.gen.arc(r,e,i,s,o,a,h,n);return this.draw(u),u}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Us="http://www.w3.org/2000/svg";class Sp{constructor(r,e){this.svg=r,this.gen=new Lo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Us,"g"),a=r.options.fixedDecimalPlaceDigits;for(let h of e){let n=null;switch(h.type){case"path":n=s.createElementNS(Us,"path"),n.setAttribute("d",this.opsToPath(h,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Us,"path"),n.setAttribute("d",this.opsToPath(h,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,h,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Us,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,h=!1,n){let u=this.gen.arc(r,e,i,s,o,a,h,n);return this.draw(u)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new wp(r,e),svg:(r,e)=>new Sp(r,e),generator:(r)=>new Lo(r),newSeed:()=>Lo.newSeed()};var zk=1,Hk=3;async function nc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!lc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let h=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[u=Y.fontSize]=zn(h),d=u*5+"px";s.style.minWidth=d,s.style.maxWidth=d}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(nc,"configureLabelImages");function lc(r){if(r.nodeType===Hk)return r.textContent?.trim()!=="";if(r.nodeType!==zk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(lc)}t(lc,"hasTextBesidesImages");var Tp=3,Yk=32,jk=t(async(r,e,i)=>{let s=m(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",de(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((_)=>({text:_,cssClass:"c4-descr"}))].filter((_)=>_.text),u=e.width?Math.max(e.width-2*(e.padding??0),Yk):m().flowchart?.wrappingWidth??200,c=s.c4?.wrap??!0?u:Number.POSITIVE_INFINITY,f=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),E=await gn(v,ee(Za(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:e.labelStyle},s);return b(E).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),b(E).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),p=Math.max(...f.map(({box:_})=>_.width),0),x=0;for(let{el:_,box:v}of f)_.attr("transform",`translate(${p/2-v.x-v.width/2}, ${x-v.y})`),x+=v.height+Tp;let S=f.length>0?x-Tp:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-p/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),Bp=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),X=t(async(r,e,i)=>{if(e.stereotype!==void 0)return jk(r,e,i);let s,o=e.useHtmlLabels||Jr(m()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),h=a.insert("g").attr("class","label").attr("style",de(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let u=!!e.icon||!!e.img,d=e.labelType==="markdown",c=n&&!e.width?e.minWidth??0:0,f=await gn(h,ee(Za(n),m()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||m().flowchart?.wrappingWidth,minWidth:c,classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},m()),p=(e?.padding??0)/2,x;if(o){let S=f.children[0],T=b(f);await nc(S),x=await cr.measure(()=>S.getBoundingClientRect()),x=Bp(x,c),T.attr("width",x.width),T.attr("height",x.height)}else x=await cr.measure(()=>f.getBBox()),x=Bp(x,c);if(o)h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")");else h.attr("transform","translate(0, "+-x.height/2+")");if(e.centerLabel)h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")");return h.insert("rect",":first-child"),{shapeSvg:a,bbox:x,halfPadding:p,label:h}},"labelHelper"),Or=t(async(r,e,i)=>{let s=i.useHtmlLabels??Yt(m()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await gn(o,ee(Za(e),m()),{useHtmlLabels:s,width:i.width||m()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),h=i.padding/2,n;if(Yt(m())){let u=a.children[0],d=b(a);n=await cr.measure(()=>u.getBoundingClientRect()),d.attr("width",n.width),d.attr("height",n.height)}else n=await cr.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:h,label:o}},"insertLabel"),W=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),Et=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function se(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(se,"createPathFromPoints");function Sr(r,e,i,s,o,a){let h=[],n=50,u=i-r,d=s-e,c=u/a,f=2*Math.PI/c,p=e+d/2;for(let x=0;x<=50;x++){let S=x/50,T=r+S*u,B=p+o*Math.sin(f*(T-r));h.push({x:T,y:B})}return h}t(Sr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x:-x,y:-S})}return h}t(Qe,"generateCirclePoints");function ic(r){let e=Array.from(r.childNodes).filter((u)=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((u)=>u.getAttribute("d")).filter((u)=>u!==null).join(" ");i.setAttribute("d",s);let o=e.find((u)=>u.getAttribute("fill")!=="none"),a=e.find((u)=>u.getAttribute("stroke")!=="none"),h=t((u,d)=>u?.getAttribute(d)??void 0,"getAttr");if(o){let u={fill:h(o,"fill"),"fill-opacity":h(o,"fill-opacity")??"1"};Object.entries(u).forEach(([d,c])=>{if(c)i.setAttribute(d,c)})}if(a){let u={stroke:h(a,"stroke"),"stroke-width":h(a,"stroke-width")??"1","stroke-opacity":h(a,"stroke-opacity")??"1"};Object.entries(u).forEach(([d,c])=>{if(c)i.setAttribute(d,c)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(ic,"mergePaths");var Uk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,h=r.width/2,n=r.height/2,u,d;if(Math.abs(a)*h>Math.abs(o)*n){if(a<0)n=-n;u=a===0?0:n*o/a,d=n}else{if(o<0)h=-h;u=h,d=o===0?0:h*a/o}return{x:i+u,y:s+d}},"intersectRect"),Je=Uk;function ig(r,e){return r.intersect(e)}t(ig,"intersectNode");var Xk=ig;function og(r,e,i,s){var{x:o,y:a}=r,h=o-s.x,n=a-s.y,u=Math.sqrt(e*e*n*n+i*i*h*h),d=Math.abs(e*i*h/u);if(s.x<o)d=-d;var c=Math.abs(e*i*n/u);if(s.y<a)c=-c;return{x:o+d,y:a+c}}t(og,"intersectEllipse");var sg=og;function ag(r,e,i){return sg(r,e,e,i)}t(ag,"intersectCircle");var Gk=ag;function ng(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,h=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+h,u=o*s.x+a*s.y+h,d=0.000001;if(n!==0&&u!==0&&oc(n,u))return;let c=s.y-i.y,f=i.x-s.x,p=s.x*i.y-i.x*s.y,x=c*r.x+f*r.y+p,S=c*e.x+f*e.y+p;if(Math.abs(x)<0.000001&&Math.abs(S)<0.000001&&oc(x,S))return;let T=o*f-c*a;if(T===0)return;let B=(a*p-f*h)/T,_=(c*h-o*p)/T;return{x:B,y:_}}}t(ng,"intersectLine");function oc(r,e){return r*e>0}t(oc,"sameSign");var Vk=ng;function lg(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:h,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(c){h=Math.min(h,c.x),n=Math.min(n,c.y)});else h=Math.min(h,e.x),n=Math.min(n,e.y);let u=s-r.width/2-h,d=o-r.height/2-n;for(let c=0;c<e.length;c++){let f=e[c],p=e[c<e.length-1?c+1:0],x=Vk(r,i,{x:u+f.x,y:d+f.y},{x:u+p.x,y:d+p.y});if(x)a.push(x)}if(!a.length)return r;if(a.length>1)a.sort(function(c,f){let p=c.x-i.x,x=c.y-i.y,S=Math.sqrt(p*p+x*x),T=f.x-i.x,B=f.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(lg,"intersectPolygon");var Kk=lg,R={node:Xk,circle:Gk,ellipse:sg,polygon:Kk,rect:Je},Ee=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),Zk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let h=m(),n=Yt(h);return await gn(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},h)},"createLabel"),ze=Zk;function hg(r,e){let{labelStyles:i}=L(e);e.labelStyle=i;let s=Et(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=1,{cssStyles:n}=e,u=y.svg(a),d=vt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")d.roughness=0;let c=u.circle(0,0,h*2,d),f=a.insert(()=>c,":first-child");return f.attr("class","anchor").attr("style",de(n)),W(e,f),e.intersect=function(p){return l.info("Circle intersect",e,h,p),R.circle(e,h,p)},a}t(hg,"anchor");function sc(r,e,i,s,o,a,h){let u=(r+i)/2,d=(e+s)/2,c=Math.atan2(s-e,i-r),f=(i-r)/2,p=(s-e)/2,x=f/o,S=p/a,T=Math.sqrt(x**2+S**2);if(T>1)throw Error("The given radii are too small to create an arc between the points.");let B=Math.sqrt(1-T**2),_=u+B*a*Math.sin(c)*(h?-1:1),v=d-B*o*Math.cos(c)*(h?-1:1),E=Math.atan2((e-v)/a,(r-_)/o),P=Math.atan2((s-v)/a,(i-_)/o)-E;if(h&&P<0)P+=2*Math.PI;if(!h&&P>0)P-=2*Math.PI;let Z=[];for(let Q=0;Q<20;Q++){let tt=Q/19,it=E+tt*P,ft=_+o*Math.cos(it),dt=v+a*Math.sin(it);Z.push({x:ft,y:dt})}return Z}t(sc,"generateArcPoints");function cg(r,e,i){let[s,o]=[e,i].sort((a,h)=>h-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(cg,"calculateArcSagitta");async function ug(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=t((it)=>it+h,"calcTotalHeight"),u=t((it)=>{let ft=it/2;return[ft/(2.5+it/50),ft]},"calcEllipseRadius"),{shapeSvg:d,bbox:c}=await X(r,e,Et(e)),f=n(e?.height?e?.height:c.height),[p,x]=u(f),S=cg(f,p,x),B=(e?.width?e?.width:c.width)+a*2+S-S,_=f,{cssStyles:v}=e,E=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...sc(-B/2,-_/2,-B/2,_/2,p,x,!1),{x:B/2,y:_/2},...sc(B/2,_/2,B/2,-_/2,p,x,!0)],D=y.svg(d),P=vt(e,{});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let Z=se(E),Q=D.path(Z,P),tt=d.insert(()=>Q,":first-child");if(tt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")tt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(${p/2}, 0)`),W(e,tt),e.intersect=function(it){return R.polygon(e,E,it)},d}t(ug,"bowTieRect");async function dg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await X(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=Math.max(h.width+d*2,e.width??0,80),f=Math.max(Math.min(c*0.08,12),5),p=Math.max(h.height+d*2+f,e.height??0),x=-p/2+f,S=p/2,T=c*0.72,B=[`M${-c/2},${x}`,`L${-T/2},${S}`,`A${T/2},${f} 0 0 0 ${T/2},${S}`,`L${c/2},${x}`,`A${c/2},${f} 0 0 0 ${-c/2},${x}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let tt=y.svg(a).path(B,vt(e,{}));if(v.node()?.appendChild(tt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",x).attr("rx",c/2).attr("ry",f).attr("style",`fill:none;stroke:${u};stroke-width:1px`),W(e,v);let E=x+(S-x)/2;n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${E-h.height/2-(h.y-(h.top??0))})`);let D=12,P=t((Q,tt,it)=>Array.from({length:D+1},(ft,dt)=>{let st=Math.PI-dt*Math.PI/D;return{x:Q*Math.cos(st),y:tt+it*f*Math.sin(st)}}),"arc"),Z=[...P(c/2,x,-1),...P(T/2,S,1).reverse()];return e.intersect=function(Q){return R.polygon(e,Z,Q)},a}t(dg,"bucket");var Kh=20,Zh=8,Qk=80,Jk=8;function fg(r){let{themeVariables:e}=m(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:Jk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(fg,"getCollapsedStyle");async function pg(r,e){let i=fg(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=L(e),{shapeSvg:h,bbox:n}=await X(r,e,Et(e)),{theme:u,themeVariables:d}=m();tr(h,e.colorIndex,u,d.borderColorArray);let c=e.padding??8,f=n.height,p=Math.max(n.width+c*2,Qk,e?.width??0),x=Math.max(f+Zh+Kh+c*2,e?.height??0),S=-p/2,T=-x/2,B=-(Zh+Kh)/2,_=h.select(".label");if(_)if(e.useHtmlLabels??Yt(m()))_.attr("transform",`translate(${-n.width/2}, ${-n.height/2+B})`);else _.attr("transform",`translate(0, ${-n.height/2+B})`);let v;if(e.look==="handDrawn"){let Q=y.svg(h),tt=vt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),it=Q.path(Ee(S,T,p,x,i.rx),tt);v=h.insert(()=>it,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",de(e.cssStyles))}else if(v=h.insert("rect",":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",S).attr("y",T).attr("width",p).attr("height",x).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let E=T+c+f+Zh;h.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",E).attr("x2",S+p-8).attr("y2",E).attr("stroke",o).attr("stroke-dasharray","3, 3");let D=E+Kh/2,P=2.5,Z=10;for(let Q=-1;Q<=1;Q++)h.append("circle").attr("class","collapsed-indicator").attr("cx",Q*Z).attr("cy",D).attr("r",P).attr("fill",o);return W(e,v),e.calcIntersect=function(Q,tt){return R.rect(Q,tt)},e.intersect=function(Q){return R.rect(e,Q)},h}t(pg,"collapsedGroup");function rr(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(rr,"insertPolygonShape");var t1=["right","left","up","down"],Cc="point",e1=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),r1=t((r)=>t1.filter((e)=>r.has(e)).join("|")||Cc,"getDirectionKey"),_p={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[Cc]:()=>[{x:0,y:0}]},i1=t((r,e,i,s)=>{let o=e1(r),a=(i.padding??0)/2,h=e.height+4*a,n=h/2,u=s??e.width+2*n+2*a,d=r1(o);return(_p[d]??_p[Cc])({height:h,midpoint:n,padding:a,width:u})},"getArrowPoints");async function gg(r,e){let i=e,{shapeSvg:s,bbox:o}=await X(r,i,Et(i)),a=i.padding??0,h=o.height+2*a,n=h/2,u=o.width+2*n+a,d=i.width??0,f=i.positioned&&(i.widthInColumns??1)>1&&d>u?d:u,p=i1(i.directions??[],o,i,f),x=rr(s,f,h,p);return x.attr("style",i.style??null),W(i,x),i.intersect=function(S){return R.polygon(i,p,S)},s}t(gg,"block_arrow");async function mg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await X(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=18,f=12,p=Math.max(h.width+d*2,e.width??0,90),x=Math.max(h.height+d*2+c,e.height??0),S=-x/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(Ee(-p/2,S,p,x,f),vt(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-p/2).attr("y",S).attr("width",p).attr("height",x).attr("rx",f).attr("ry",f).attr("style",o);B.append("line").attr("x1",-p/2).attr("y1",S+c).attr("x2",p/2).attr("y2",S+c).attr("style",`stroke:${u};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-p/2+12+v*9).attr("cy",S+c/2).attr("r",2.5).attr("style",`fill:${u};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",S+4).attr("width",Math.max(p-56,10)).attr("height",c-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${u};stroke-width:1px;opacity:0.6`),W(e,B);let _=S+c+(x-c)/2;return n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${_-h.height/2-(h.y-(h.top??0))})`),e.intersect=function(v){return R.rect(e,v)},a}t(mg,"browser");var ra=12;async function yg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,h=e.look==="neo"?24:o,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=(e?.width??u.width)+(e.look==="neo"?a*2:a+ra),c=(e?.height??u.height)+(e.look==="neo"?h*2:h),f=0,p=d,x=-c,S=0,T=[{x:f+ra,y:x},{x:p,y:x},{x:p,y:S},{x:f,y:S},{x:f,y:x+ra},{x:f+ra,y:x}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),E=vt(e,{}),D=se(T),P=v.path(D,E);if(B=n.insert(()=>P,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),_)B.attr("style",_)}else B=rr(n,d,c,T);if(s)B.attr("style",s);return W(e,B),e.intersect=function(v){return R.polygon(e,T,v)},n}t(yg,"card");function xg(r,e){let{nodeStyles:i}=L(e);e.label="";let s=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),h=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),u=vt(e,{});if(e.look!=="handDrawn")u.roughness=0,u.fillStyle="solid";let d=se(h),c=n.path(d,u),f=s.insert(()=>c,":first-child");if(o&&e.look!=="handDrawn")f.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")f.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(p){return R.polygon(e,h,p)},s}t(xg,"choice");async function Sc(r,e,i){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,halfPadding:n}=await X(r,e,Et(e)),u=16,d=i?.padding??n,c=Math.sqrt(h.width**2+h.height**2)/2,f=e.look==="neo"?c+u*2:c+d,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=vt(e,{}),B=S.circle(0,0,f*2,T);p=a.insert(()=>B,":first-child"),p.attr("class","basic label-container").attr("style",de(x))}else p=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",f).attr("cx",0).attr("cy",0);return W(e,p),e.calcIntersect=function(S,T){let B=S.width/2;return R.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,f,S),R.circle(e,f,S)},a}t(Sc,"circle");async function Cg(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:h}=await X(r,i,s),n=o.insert("rect",":first-child"),u=i.padding??0,d=i.positioned?i.width??0:a.width+u,c=i.positioned?i.height??0:a.height+u,f=i.positioned?-d/2:-a.width/2-h,p=i.positioned?-c/2:-a.height/2-h;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",f).attr("y",p).attr("width",d).attr("height",c),W(i,n),i.intersect=function(x){return R.rect(i,x)},o}t(Cg,"composite");async function bg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await X(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=20,f=12,p=Math.max(h.width+d*2,e.width??0,90),x=Math.max(h.height+d*2+c,e.height??0),S=-x/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(Ee(-p/2,S,p,x,f),vt(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-p/2).attr("y",S).attr("width",p).attr("height",x).attr("rx",f).attr("ry",f).attr("style",o);B.append("text").attr("x",-p/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${u}`).text(">_"),W(e,B);let _=S+c+(x-c)/2;return n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${_-h.height/2-(h.y-(h.top??0))})`),e.intersect=function(v){return R.rect(e,v)},a}t(bg,"consoleWindow");function kg(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},h={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
230
+ M ${o.x},${o.y} L ${h.x},${h.y}`}t(kg,"createLine");function wg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:h}=e,n=y.svg(o),u=vt(e,{});if(e.look!=="handDrawn")u.roughness=0,u.fillStyle="solid";let d=n.circle(0,0,a*2,u),c=kg(a),f=n.path(c,u),p=o.insert(()=>d,":first-child");if(p.insert(()=>f),p.attr("class","outer-path"),h&&e.look!=="handDrawn")p.selectAll("path").attr("style",h);if(s&&e.look!=="handDrawn")p.selectAll("path").attr("style",s);return W(e,p),e.intersect=function(x){return l.info("crossedCircle intersect",e,{radius:a,point:x}),R.circle(e,a,x)},o}t(wg,"crossedCircle");function ur(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x:-x,y:-S})}return h}t(ur,"generateCirclePoints");async function Bg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await X(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+n,c=a.height+u,f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...ur(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...ur(d/2+f*2,-f,f,20,-180,-270),...ur(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...ur(d/2,c/2,f,20,0,90)],S=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...ur(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...ur(d/2+d*0.1,-f,f,20,-180,-270),...ur(d/2+d*0.1,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...ur(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2,y:c/2+f}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=se(x).replace("Z",""),E=T.path(v,B),D=se(S),P=T.path(D,{...B}),Z=o.insert("g",":first-child");if(Z.insert(()=>P,":first-child").attr("stroke-opacity",0),Z.insert(()=>E,":first-child"),Z.attr("class","text"),p&&e.look!=="handDrawn")Z.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${f}, 0)`),h.attr("transform",`translate(${-d/2+f-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,Z),e.intersect=function(Q){return R.polygon(e,S,Q)},o}t(Bg,"curlyBraceLeft");function dr(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x,y:S})}return h}t(dr,"generateCirclePoints");async function vg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await X(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+(e.look==="neo"?n*2:n),c=a.height+(e.look==="neo"?u*2:u),f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...dr(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...dr(d/2+f*2,-f,f,20,-180,-270),...dr(d/2+f*2,f,f,20,-90,-180),{x:d/2+f,y:c/2},...dr(d/2,c/2,f,20,0,90)],S=[{x:-d/2,y:-c/2-f},{x:d/2,y:-c/2-f},...dr(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...dr(d/2+f*2,-f,f,20,-180,-270),...dr(d/2+f*2,f,f,20,-90,-180),{x:d/2+f,y:c/2},...dr(d/2,c/2,f,20,0,90),{x:d/2,y:c/2+f},{x:-d/2,y:c/2+f}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=se(x).replace("Z",""),E=T.path(v,B),D=se(S),P=T.path(D,{...B}),Z=o.insert("g",":first-child");if(Z.insert(()=>P,":first-child").attr("stroke-opacity",0),Z.insert(()=>E,":first-child"),Z.attr("class","text"),p&&e.look!=="handDrawn")Z.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-f}, 0)`),h.attr("transform",`translate(${-d/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,Z),e.intersect=function(Q){return R.polygon(e,S,Q)},o}t(vg,"curlyBraceRight");function Se(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x:-x,y:-S})}return h}t(Se,"generateCirclePoints");async function Ag(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await X(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+(e.look==="neo"?n*2:n),c=a.height+(e.look==="neo"?u*2:u),f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...Se(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...Se(d/2+f*2,-f,f,20,-180,-270),...Se(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...Se(d/2,c/2,f,20,0,90)],S=[...Se(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...Se(-d/2-f/2,-f,f,20,0,90),...Se(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...Se(-d/2+f+f/2,c/2,f,30,-180,-270)],T=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...Se(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...Se(d/2+f*2,-f,f,20,-180,-270),...Se(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...Se(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2-f-f/2,y:c/2+f},...Se(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...Se(-d/2-f/2,-f,f,20,0,90),...Se(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...Se(-d/2+f+f/2,c/2,f,30,-180,-270)],B=y.svg(o),_=vt(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let E=se(x).replace("Z",""),D=B.path(E,_),Z=se(S).replace("Z",""),Q=B.path(Z,_),tt=se(T),it=B.path(tt,{..._}),ft=o.insert("g",":first-child");if(ft.insert(()=>it,":first-child").attr("stroke-opacity",0),ft.insert(()=>D,":first-child"),ft.insert(()=>Q,":first-child"),ft.attr("class","text"),p&&e.look!=="handDrawn")ft.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return ft.attr("transform",`translate(${f-f/4}, 0)`),h.attr("transform",`translate(${-d/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,ft),e.intersect=function(dt){return R.polygon(e,T,dt)},o}t(Ag,"curlyBraces");async function Eg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=20,u=5,{shapeSvg:d,bbox:c}=await X(r,e,Et(e)),f=Math.max(u,c.height+h*2,e?.height??0),p=f/2,x=p-Math.sqrt(Math.max(0,p**2-(c.height/2)**2)),S=Math.max(f/4,x),T=Math.max(n,c.width+a*2+S*2,(c.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(d),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=T,D=f,P=E-p,Z=D/4,Q=[{x:P,y:0},{x:Z,y:0},{x:0,y:D/2},{x:Z,y:D},{x:P,y:D},...Qe(-P,-D/2,p,50,270,90)],tt=se(Q),it=_.path(tt,v),ft=d.insert(()=>it,":first-child");if(ft.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ft.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ft.selectChildren("path").attr("style",s);return ft.attr("transform",`translate(${-T/2}, ${-f/2})`),W(e,ft),e.intersect=function(dt){return R.polygon(e,Q,dt)},d}t(Eg,"curvedTrapezoid");async function Ig(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await X(r,e,Et(e)),n=e.padding??20,u=Math.max(a.width+n*2,e.width??0,100),d=Math.min(Math.max(u*0.23,16),56),c=d*0.27,f=Math.max(a.height+n*2,e.height?e.height-(2*d-c):0),p=Math.min(u*0.177,f*0.45),x=f+2*d-c,S=-x/2,T=S+2*d-c,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let tt=y.svg(o),it=vt(e,{}),ft=tt.path(Ee(-u/2,T,u,f,p),it),dt=tt.circle(0,S+d,d*2,it);if(B.insert(()=>dt,":first-child"),B.insert(()=>ft,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-u/2).attr("y",T).attr("width",u).attr("height",f).attr("rx",p).attr("ry",p).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+d).attr("r",d).attr("style",s);W(e,B);let v=T+f/2;h.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let E=S+d,D=Math.asin(Math.min(1,(T-E)/d))*180/Math.PI,P=24,Q=[...Qe(0,-E,d,P,180+D,-D),...Qe(-(-u/2+p),-(T+p),p,12,90,0),...Qe(-(-u/2+p),-(x/2-p),p,12,360,270),...Qe(-(u/2-p),-(x/2-p),p,12,270,180),...Qe(-(u/2-p),-(T+p),p,12,180,90)];return e.intersect=function(tt){return R.polygon(e,Q,tt)},o}t(Ig,"person");var o1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),s1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),a1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),vp=8,Lp=8;async function qg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,h=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-h,e.width<Lp)e.width=Lp}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<vp)e.height=vp}let{shapeSvg:u,bbox:d,label:c}=await X(r,e,Et(e)),f=Math.max(e.width??0,d.width)+h,p=f/2,x=p/(2.5+f/50),S=Math.max(e.height??0,d.height)+a+x,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(u),v=s1(0,0,f,S,p,x),E=a1(0,x,f,S,p,x),D=vt(e,{}),P=_.path(v,D),Z=_.path(E,vt(e,{fill:"none"}));if(T=u.insert(()=>Z,":first-child"),T=u.insert(()=>P,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=o1(0,0,f,S,p,x);T=u.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",de(B)).attr("style",s)}return T.attr("label-offset-y",x),T.attr("transform",`translate(${-f/2}, ${-(S/2+x)})`),W(e,T),c.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+(e.padding??0)/1.5-(d.y-(d.top??0))})`),e.intersect=function(_){let v=R.rect(e,_),E=v.x-(e.x??0);if(p!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-x)){let D=x*x*(1-E*E/(p*p));if(D>0)D=Math.sqrt(D);if(D=x-D,_.y-(e.y??0)>0)D=-D;v.y+=D}return v},u}t(qg,"cylinder");async function bi(r,e,i){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:h}=await X(r,e,Et(e)),n=Math.max(h.width+i.labelPaddingX*2,e?.width||0),u=Math.max(h.height+i.labelPaddingY*2,e?.height||0),d=-n/2,c=-u/2,f,{rx:p,ry:x}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)p=i.rx,x=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=vt(e,{}),_=p||x?T.path(Ee(d,c,n,u,p||0),B):T.rectangle(d,c,n,u,B);f=a.insert(()=>_,":first-child"),f.attr("class","basic label-container").attr("style",de(S))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",o).attr("rx",de(p)).attr("ry",de(x)).attr("x",d).attr("y",c).attr("width",n).attr("height",u);return W(e,f,e.look==="handDrawn"?void 0:{width:n,height:u}),e.calcIntersect=function(T,B){return R.rect(T,B)},e.intersect=function(T){return R.rect(e,T)},a}t(bi,"drawRect");async function Wg(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:h,height:n}=e,u={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},d=await bi(r,e,u);if(e.look==="handDrawn"){let x=y.svg(d),S=vt(e,{}),T=d.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return d;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return d;return d.insert(()=>x.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),d.insert(()=>x.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),d}let c=d.select(".basic.label-container"),f=(Number(c.attr("width"))||h)??0,p=(Number(c.attr("height"))||n)??0;if(f>0&&p>0)c.attr("stroke-dasharray",`${f} ${p}`);return d}t(Wg,"datastore");async function Hg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:h,bbox:n,label:u}=await X(r,e,Et(e)),d=n.width+o,c=n.height+a,f=c*0.2,p=-d/2,x=-c/2-f/2,{cssStyles:S}=e,T=y.svg(h),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:p,y:x+f},{x:-p,y:x+f},{x:-p,y:-x},{x:p,y:-x},{x:p,y:x},{x:-p,y:x},{x:-p,y:x+f}],v=T.polygon(_.map((D)=>[D.x,D.y]),B),E=h.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return u.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${x+f+(e.padding??0)/2-(n.y-(n.top??0))})`),W(e,E),e.intersect=function(D){return R.rect(e,D)},h}t(Hg,"dividedRectangle");async function Yg(r,e){let{labelStyles:i,nodeStyles:s}=L(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,h=e.look==="neo"?16:a,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=Math.sqrt(u.width**2+u.height**2)/2,c=(e?.width?e?.width/2:d)+(h??0),f=c+o,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{roughness:0.2,strokeWidth:2.5}),B=vt(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,f*2,T),v=S.circle(0,0,c*2,B);p=n.insert("g",":first-child"),p.attr("class",de(e.cssClasses)).attr("style",de(x)),p.node()?.appendChild(_),p.node()?.appendChild(v)}else{p=n.insert("g",":first-child");let S=p.insert("circle",":first-child"),T=p.insert("circle");p.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0)}return W(e,p),e.intersect=function(S){return l.info("DoubleCircle intersect",e,f,S),R.circle(e,f,S)},n}t(Yg,"doublecircle");async function jg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h}=await X(r,e,Et(e)),{theme:n,themeVariables:u}=m();tr(o,e.colorIndex,n,u.borderColorArray);let d=h??10,c=a.width/2+d*2,f=a.height/2+d*2,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=vt(e,{}),B=S.ellipse(0,0,c*2,f*2,T);if(p=o.insert(()=>B,":first-child"),p.attr("class","basic label-container"),x)p.attr("style",x)}else p=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",c).attr("ry",f).attr("cx",0).attr("cy",0);return e.width=c*2,e.height=f*2,W(e,p),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return R.ellipse(S,B,_,T)},e.intersect=function(S){return R.ellipse(e,c,f,S)},o}t(jg,"usecaseEllipse");function Xg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),h=7,{cssStyles:n}=e,u=y.svg(a),{nodeBorder:d}=i,c=vt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")c.roughness=0;let f=u.circle(0,0,h*2,c),p=a.insert(()=>f,":first-child");if(p.selectAll("path").attr("style",`fill: ${d} !important;`),n&&n.length>0&&e.look!=="handDrawn")p.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")p.selectAll("path").attr("style",o);return W(e,p),e.intersect=function(x){return l.info("filledCircle intersect",e,{radius:h,point:x}),R.circle(e,h,x)},a}t(Xg,"filledCircle");var Fp=10,Mp=10;async function Gg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Fp)e.height=Fp;if(e.width=(e?.width??0)-a-a/2,e.width<Mp)e.width=Mp}let{shapeSvg:h,bbox:n,label:u}=await X(r,e,Et(e)),d=(e?.width?e?.width:n.width)+(a??0),c=e?.height?e?.height:d+n.height,f=c,p=[{x:0,y:-c},{x:f,y:-c},{x:f/2,y:0}],{cssStyles:x}=e,S=y.svg(h),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=se(p),_=S.path(B,T),v=h.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");if(x&&e.look!=="handDrawn")v.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=d,e.height=c,W(e,v),u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(E){return l.info("Triangle intersect",e,p,E),R.polygon(e,p,E)},h}t(Gg,"flippedTriangle");async function Vg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await X(r,e,Et(e)),n=e.padding??12,u=Math.max(a.width+n*2,e.width??0,90),d=a.height+n*2,c=Math.max(Math.min(d*0.16,14),8),f=Math.max(d+c,e.height??0),p=f-c,x=Math.max(u*0.38,28),S=-f/2,T=[{x:-u/2,y:S},{x:-u/2+x,y:S},{x:-u/2+x,y:S+c},{x:u/2,y:S+c},{x:u/2,y:f/2},{x:-u/2,y:f/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((D)=>`L${D.x},${D.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let P=y.svg(o).path(B,vt(e,{}));if(v=o.insert(()=>P,":first-child").attr("class","basic label-container"),_)v.attr("style",_)}else v=o.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")W(e,v);else W(e,v,{width:u,height:f});let E=S+c+p/2;return h.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${E-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(D){return R.polygon(e,T,D)},o}t(Vg,"folder");function Kg(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=L(e);e.label="";let h=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,u=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")u=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0);let c=-1*u/2,f=-1*d/2,p=y.svg(h),x=vt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let S=p.rectangle(c,f,u,d,x),T=h.insert(()=>S,":first-child");if(n&&e.look!=="handDrawn")T.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);W(e,T);let B=s?.padding??0;if(e.width&&e.height)e.width+=B/2||0,e.height+=B/2||0;return e.intersect=function(_){return R.rect(e,_)},h}t(Kg,"forkJoin");async function Zg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=15,a=10,h=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-h*2,e.width<o)e.width=o}let{shapeSvg:u,bbox:d}=await X(r,e,Et(e)),c=(e?.height?e?.height:Math.max(a,d.height))+n*2,f=c/2,p=f-Math.sqrt(Math.max(0,f**2-(d.height/2)**2)),x=(e?.width?e?.width:Math.max(o,d.width)+p*2)+h*2,{cssStyles:S}=e,T=y.svg(u),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-x/2,y:-c/2},{x:x/2-f,y:-c/2},...Qe(-x/2+f,0,f,50,90,270),{x:x/2-f,y:c/2},{x:-x/2,y:c/2}],v=se(_),E=T.path(v,B),D=u.insert(()=>E,":first-child");if(D.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")D.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")D.selectChildren("path").attr("style",s);return W(e,D),e.intersect=function(P){return l.info("Pill intersect",e,{radius:f,point:P}),R.polygon(e,_,P)},u}t(Zg,"halfRoundedRectangle");var n1=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function Jg(r,e){let{labelStyles:i,nodeStyles:s}=L(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,h=70,n=32,u=e.look==="neo"?h:a,d=e.look==="neo"?n:a;if(e.width||e.height){let E=(e.height??0)/o;e.width=(e?.width??0)-2*E-d,e.height=(e.height??0)-u}let{shapeSvg:c,bbox:f}=await X(r,e,Et(e)),p=(e?.height?e?.height:f.height)+u,x=p/o,S=(e?.width?e?.width:f.width)+2*x+d,T=[{x,y:0},{x:S-x,y:0},{x:S,y:-p/2},{x:S-x,y:-p},{x,y:-p},{x:0,y:-p/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(c),E=vt(e,{}),D=n1(0,0,S,p,x),P=v.path(D,E);if(B=c.insert(()=>P,":first-child").attr("transform",`translate(${-S/2}, ${p/2})`),_)B.attr("style",_)}else B=rr(c,S,p,T);if(s)B.attr("style",s);return e.width=S,e.height=p,W(e,B),e.intersect=function(v){return R.polygon(e,T,v)},c}t(Jg,"hexagon");async function xm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await X(r,e,Et(e)),a=Math.max(30,e?.width??0),h=Math.max(30,e?.height??0),{cssStyles:n}=e,u=y.svg(o),d=vt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let c=[{x:0,y:0},{x:a,y:0},{x:0,y:h},{x:a,y:h}],f=se(c),p=u.path(f,d),x=o.insert(()=>p,":first-child");if(x.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")x.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")x.selectChildren("path").attr("style",s);return x.attr("transform",`translate(${-a/2}, ${-h/2})`),W(e,x),e.intersect=function(S){return l.info("Pill intersect",e,{points:c}),R.polygon(e,c,S)},o}t(xm,"hourglass");async function Cm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,label:f}=await X(r,e,"icon-shape default"),p=e.pos==="t",x=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ve(e),_=-S/2,v=-x/2,E=e.label?8:0,D=y.svg(d),P=vt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let Z=D.rectangle(_,v,S,x,P),Q=Math.max(S,c.width),tt=x+c.height+E,it=D.rectangle(-Q/2,-tt/2,Q,tt,{...P,fill:"transparent",stroke:"none"}),ft=d.insert(()=>Z,":first-child"),dt=d.insert(()=>it);if(e.icon){let st=d.append("g");st.html(`<g>${await fr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let N=st.node().getBBox(),{width:K,height:et,x:U,y:ut}=N;st.attr("transform",`translate(${-K/2-U},${p?c.height/2+E/2-et/2-ut:-c.height/2-E/2-et/2-ut})`),st.attr("style",`color: ${B.get("stroke")??T};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-tt/2:tt/2-c.height})`),ft.attr("transform",`translate(0,${p?c.height/2+E/2:-c.height/2-E/2})`),W(e,dt),e.intersect=function(st){if(l.info("iconSquare intersect",e,st),!e.label)return R.rect(e,st);let N=e.x??0,K=e.y??0,et=e.height??0,U=[];if(p)U=[{x:N-c.width/2,y:K-et/2},{x:N+c.width/2,y:K-et/2},{x:N+c.width/2,y:K-et/2+c.height+E},{x:N+S/2,y:K-et/2+c.height+E},{x:N+S/2,y:K+et/2},{x:N-S/2,y:K+et/2},{x:N-S/2,y:K-et/2+c.height+E},{x:N-c.width/2,y:K-et/2+c.height+E}];else U=[{x:N-S/2,y:K-et/2},{x:N+S/2,y:K-et/2},{x:N+S/2,y:K-et/2+x},{x:N+c.width/2,y:K-et/2+x},{x:N+c.width/2/2,y:K+et/2},{x:N-c.width/2,y:K+et/2},{x:N-c.width/2,y:K-et/2+x},{x:N-S/2,y:K-et/2+x}];return R.polygon(e,U,st)},d}t(Cm,"icon");async function km(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,label:f}=await X(r,e,"icon-shape default"),p=20,x=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ve(e),v=y.svg(d),E=vt(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let D=_.get("fill");E.stroke=D??B;let P=d.append("g");if(e.icon)P.html(`<g>${await fr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let Z=P.node().getBBox(),{width:Q,height:tt,x:it,y:ft}=Z,dt=Math.max(Q,tt)*Math.SQRT2+p*2,st=v.circle(0,0,dt,E),N=Math.max(dt,c.width),K=dt+c.height+x,et=v.rectangle(-N/2,-K/2,N,K,{...E,fill:"transparent",stroke:"none"}),U=d.insert(()=>st,":first-child"),ut=d.insert(()=>et);return P.attr("transform",`translate(${-Q/2-it},${S?c.height/2+x/2-tt/2-ft:-c.height/2-x/2-tt/2-ft})`),P.attr("style",`color: ${_.get("stroke")??T};`),f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${S?-K/2:K/2-c.height})`),U.attr("transform",`translate(0,${S?c.height/2+x/2:-c.height/2-x/2})`),W(e,ut),e.intersect=function(nt){return l.info("iconSquare intersect",e,nt),R.rect(e,nt)},d}t(km,"iconCircle");async function wm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,halfPadding:f,label:p}=await X(r,e,"icon-shape default"),x=e.pos==="t",S=n+f*2,T=n+f*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ve(e),E=-T/2,D=-S/2,P=e.label?8:0,Z=y.svg(d),Q=vt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let tt=v.get("fill");Q.stroke=tt??_;let it=Z.path(Ee(E,D,T,S,5),Q),ft=Math.max(T,c.width),dt=S+c.height+P,st=Z.rectangle(-ft/2,-dt/2,ft,dt,{...Q,fill:"transparent",stroke:"none"}),N=d.insert(()=>it,":first-child").attr("class","icon-shape2"),K=d.insert(()=>st);if(e.icon){let et=d.append("g");et.html(`<g>${await fr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let U=et.node().getBBox(),{width:ut,height:nt,x:_t,y:Lt}=U;et.attr("transform",`translate(${-ut/2-_t},${x?c.height/2+P/2-nt/2-Lt:-c.height/2-P/2-nt/2-Lt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${x?-dt/2:dt/2-c.height})`),N.attr("transform",`translate(0,${x?c.height/2+P/2:-c.height/2-P/2})`),W(e,K),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return R.rect(e,et);let U=e.x??0,ut=e.y??0,nt=e.height??0,_t=[];if(x)_t=[{x:U-c.width/2,y:ut-nt/2},{x:U+c.width/2,y:ut-nt/2},{x:U+c.width/2,y:ut-nt/2+c.height+P},{x:U+T/2,y:ut-nt/2+c.height+P},{x:U+T/2,y:ut+nt/2},{x:U-T/2,y:ut+nt/2},{x:U-T/2,y:ut-nt/2+c.height+P},{x:U-c.width/2,y:ut-nt/2+c.height+P}];else _t=[{x:U-T/2,y:ut-nt/2},{x:U+T/2,y:ut-nt/2},{x:U+T/2,y:ut-nt/2+S},{x:U+c.width/2,y:ut-nt/2+S},{x:U+c.width/2/2,y:ut+nt/2},{x:U-c.width/2,y:ut+nt/2},{x:U-c.width/2,y:ut-nt/2+S},{x:U-T/2,y:ut-nt/2+S}];return R.polygon(e,_t,et)},d}t(wm,"iconRounded");async function Sm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,halfPadding:f,label:p}=await X(r,e,"icon-shape default"),x=e.pos==="t",S=n+f*2,T=n+f*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ve(e),E=-T/2,D=-S/2,P=e.label?8:0,Z=y.svg(d),Q=vt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let tt=v.get("fill");Q.stroke=tt??_;let it=Z.path(Ee(E,D,T,S,0.1),Q),ft=Math.max(T,c.width),dt=S+c.height+P,st=Z.rectangle(-ft/2,-dt/2,ft,dt,{...Q,fill:"transparent",stroke:"none"}),N=d.insert(()=>it,":first-child"),K=d.insert(()=>st);if(e.icon){let et=d.append("g");et.html(`<g>${await fr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let U=et.node().getBBox(),{width:ut,height:nt,x:_t,y:Lt}=U;et.attr("transform",`translate(${-ut/2-_t},${x?c.height/2+P/2-nt/2-Lt:-c.height/2-P/2-nt/2-Lt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${x?-dt/2:dt/2-c.height})`),N.attr("transform",`translate(0,${x?c.height/2+P/2:-c.height/2-P/2})`),W(e,K),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return R.rect(e,et);let U=e.x??0,ut=e.y??0,nt=e.height??0,_t=[];if(x)_t=[{x:U-c.width/2,y:ut-nt/2},{x:U+c.width/2,y:ut-nt/2},{x:U+c.width/2,y:ut-nt/2+c.height+P},{x:U+T/2,y:ut-nt/2+c.height+P},{x:U+T/2,y:ut+nt/2},{x:U-T/2,y:ut+nt/2},{x:U-T/2,y:ut-nt/2+c.height+P},{x:U-c.width/2,y:ut-nt/2+c.height+P}];else _t=[{x:U-T/2,y:ut-nt/2},{x:U+T/2,y:ut-nt/2},{x:U+T/2,y:ut-nt/2+S},{x:U+c.width/2,y:ut-nt/2+S},{x:U+c.width/2/2,y:ut+nt/2},{x:U-c.width/2,y:ut+nt/2},{x:U-c.width/2,y:ut-nt/2+S},{x:U-T/2,y:ut-nt/2+S}];return R.polygon(e,_t,et)},d}t(Sm,"iconSquare");async function Tm(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:h}=L(e);e.labelStyle=h;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let u=Math.max(e.label?n??0:0,e?.assetWidth??o),d=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:u:u,c=e.constraint==="on"?d/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(d,n??0);let{shapeSvg:f,bbox:p,label:x}=await X(r,e,"image-shape default"),S=e.pos==="t",T=-d/2,B=-c/2,_=e.label?8:0,v=y.svg(f),E=vt(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let D=v.rectangle(T,B,d,c,E),P=Math.max(d,p.width),Z=c+p.height+_,Q=v.rectangle(-P/2,-Z/2,P,Z,{...E,fill:"none",stroke:"none"}),tt=f.insert(()=>D,":first-child"),it=f.insert(()=>Q);if(e.img){let ft=f.append("image");ft.attr("href",e.img),ft.attr("width",d),ft.attr("height",c),ft.attr("preserveAspectRatio","none"),ft.attr("transform",`translate(${-d/2},${S?Z/2-c:-Z/2})`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${S?-c/2-p.height/2-_/2:c/2-p.height/2+_/2})`),tt.attr("transform",`translate(0,${S?p.height/2+_/2:-p.height/2-_/2})`),W(e,it),e.intersect=function(ft){if(l.info("iconSquare intersect",e,ft),!e.label)return R.rect(e,ft);let dt=e.x??0,st=e.y??0,N=e.height??0,K=[];if(S)K=[{x:dt-p.width/2,y:st-N/2},{x:dt+p.width/2,y:st-N/2},{x:dt+p.width/2,y:st-N/2+p.height+_},{x:dt+d/2,y:st-N/2+p.height+_},{x:dt+d/2,y:st+N/2},{x:dt-d/2,y:st+N/2},{x:dt-d/2,y:st-N/2+p.height+_},{x:dt-p.width/2,y:st-N/2+p.height+_}];else K=[{x:dt-d/2,y:st-N/2},{x:dt+d/2,y:st-N/2},{x:dt+d/2,y:st-N/2+c},{x:dt+p.width/2,y:st-N/2+c},{x:dt+p.width/2/2,y:st+N/2},{x:dt-p.width/2,y:st+N/2},{x:dt-p.width/2,y:st-N/2+c},{x:dt-d/2,y:st-N/2+c}];return R.polygon(e,K,ft)},f}t(Tm,"imageSquare");async function Bm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=Math.max(u.height+a*2,e.height??0),c=Math.max(u.width+h*2,(e.width??0)-d),f=[{x:0,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:-3*d/6,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=rr(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(Bm,"inv_trapezoid");async function _m(r,e){let{shapeSvg:i,bbox:s,label:o}=await X(r,e,"label"),a=i.insert("rect",":first-child"),h=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),W(e,a),e.intersect=function(u){return R.rect(e,u)},i}t(_m,"labelRect");async function Lm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:0,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:-(3*d)/6,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=rr(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(Lm,"lean_left");async function Fm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:-3*d/6,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:0,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=rr(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(Fm,"lean_right");function Mm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,h=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),u=7,d=[{x:h,y:0},{x:0,y:n+u/2},{x:h-2*u,y:n+u/2},{x:0,y:2*n},{x:h,y:n-u/2},{x:2*u,y:n-u/2}],c=y.svg(o),f=vt(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let p=se(d),x=c.path(p,f),S=o.insert(()=>x,":first-child");if(S.attr("class","outer-path"),a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")S.selectAll("path").attr("style",s);return S.attr("transform",`translate(-${h/2},${-n})`),W(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),R.polygon(e,d,T)},o}t(Mm,"lightningBolt");var l1=t((r,e,i,s,o,a,h)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+h}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),h1=t((r,e,i,s,o,a,h)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+h}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),c1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Ap=10,Ep=10;async function Em(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<Ep)e.width=Ep;let E=_/2/(2.5+_/50);if(e.height=(e.height??0)-h-E*3,e.height<Ap)e.height=Ap}let{shapeSvg:n,bbox:u,label:d}=await X(r,e,Et(e)),c=(e?.width?e?.width:u.width)+a*2,f=c/2,p=f/(2.5+c/50),x=(e?.height?e?.height:u.height)+p+h*2,S=x*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=h1(0,0,c,x,f,p,S),E=c1(0,p,c,x,f,p),D=vt(e,{}),P=_.path(v,D),Z=_.path(E,D);if(n.insert(()=>Z,":first-child").attr("class","line"),T=n.insert(()=>P,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=l1(0,0,c,x,f,p,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",de(B)).attr("style",s)}return T.attr("label-offset-y",p),T.attr("transform",`translate(${-c/2}, ${-(x/2+p)})`),W(e,T),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+p-(u.y-(u.top??0))})`),e.intersect=function(_){let v=R.rect(e,_),E=v.x-(e.x??0);if(f!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-p)){let D=p*p*(1-E*E/(f*f));if(D>0)D=Math.sqrt(D);if(D=p-D,_.y-(e.y??0)>0)D=-D;v.y+=D}return v},n}t(Em,"linedCylinder");async function $m(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height){let D=e.width;if(e.width=(D??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-h*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:u,label:d}=await X(r,e,Et(e)),c=(e?.width?e?.width:u.width)+(a??0)*2,f=(e?.height?e?.height:u.height)+(h??0)*2,p=e.look==="neo"?f/4:f/8,x=f+p,{cssStyles:S}=e,T=y.svg(n),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-c/2-c/2*0.1,y:-x/2},{x:-c/2-c/2*0.1,y:x/2},...Sr(-c/2-c/2*0.1,x/2,c/2+c/2*0.1,x/2,p,0.8),{x:c/2+c/2*0.1,y:-x/2},{x:-c/2-c/2*0.1,y:-x/2},{x:-c/2,y:-x/2},{x:-c/2,y:x/2*1.1},{x:-c/2,y:-x/2}],v=T.polygon(_.map((D)=>[D.x,D.y]),B),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return E.attr("transform",`translate(0,${-p/2})`),d.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*0.1/2-(u.x-(u.left??0))},${-f/2+(e.padding??0)-p-(u.y-(u.top??0))})`),W(e,E),e.intersect=function(D){return R.polygon(e,_,D)},n}t($m,"linedWaveEdgedRect");var u1=56,Qh=72,$p=8,Ip=2,d1=8,f1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Op=Math.PI/3,Dp=0.6,Jh=t((r,e)=>{let i=e*Dp,s=e*Math.sqrt(1-Dp**2),o=Math.cos(Op),a=-Math.sin(Op),h=i*-a,n=r+i*o,u=s*o,d=s*a;return`M ${h-u} ${n-d} L ${h+u} ${n+d}`},"businessMarkerPathForCircle"),p1={normal:Jh(-24,12),hollow:Jh(-23,9),awesome:Jh(-21,13),icon:"M 12 -8 L 26 -26"},Pp=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),Tc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,vt(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),g1=t((r,e,i,s,o,a,h=!1)=>{if(e.look==="handDrawn"){let d=y.svg(r).circle(i,s,o*2,vt(e,h?{fill:"none"}:{}));return r.insert(()=>d,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(h)n.attr("fill","none");return n},"appendActorCircle");var m1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",p1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Ao(r,e,i,s){let{labelStyles:o,nodeStyles:a}=L(e);e.labelStyle=o;let h=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:u,label:d}=await X(r,h,Et(e,`usecase-actor-variant usecase-actor-${i}`)),c=e.accessibleName??e.label;if(c)n.attr("role","img").attr("aria-label",c);d.attr("class","label actor-label usecase-actor-label");let{theme:f,themeVariables:p}=m();tr(n,e.colorIndex,f,p.borderColorArray);let x,S;if(e.stereotype){let tt=await Or(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=tt.label.attr("class","label usecase-stereotype"),S=tt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${f1[i]}`).attr("style",a||null);await s(T,e),m1(T,e,i);let B=e.padding??d1,_=S?.height??0,v=Qh+$p+u.height+(S?_+Ip:0),E=Math.max(u1,u.width,S?.width??0)+B*2,D=v+B*2,P=-v/2;T.attr("transform",`translate(0,${P+Qh/2})`);let Z=P+Qh+$p;if(x&&S)Z+=_/2,Pp(x,S,Z),Z+=_/2+Ip;Pp(d,u,Z+u.height/2);let Q=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-E/2).attr("y",-D/2).attr("width",E).attr("height",D).attr("opacity",0).attr("aria-hidden","true");return W(e,Q),e.intersect=(tt)=>R.rect(e,tt),n}t(Ao,"renderUsecaseActor");var y1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function Im(r,e){return Ao(r,e,"normal",(i,s)=>{Tc(i,s,y1,"usecase-actor-stick")})}t(Im,"usecaseActor");var x1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Om(r,e){return Ao(r,e,"awesome",(i,s)=>{Tc(i,s,x1,"usecase-actor-awesome-silhouette")})}t(Om,"usecaseActorAwesome");var C1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Dm(r,e){return Ao(r,e,"hollow",(i,s)=>{g1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),Tc(i,s,C1,"usecase-actor-hollow-body",!0)})}t(Dm,"usecaseActorHollow");var mi=52,Rp=42,Np=-2,b1=t(async(r,e)=>{let i=-mi/2,s=Np-mi/2;if(e.look==="handDrawn"){let c=y.svg(r).rectangle(i,s,mi,mi,vt(e,{}));r.insert(()=>c,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",mi).attr("height",mi).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Fs(o.includes(":")?o:`fa:${o}`),h=await fr(o,{height:Rp,width:Rp,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${h}</g>`),u=n.node()?.getBBox();if(u)n.attr("transform",`translate(${-u.width/2-u.x},${Np-u.height/2-u.y})`)},"drawIconActor");async function Pm(r,e){return Ao(r,e,"icon",b1)}t(Pm,"usecaseActorIcon");var zp=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function Rm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:h,bbox:n,halfPadding:u,label:d}=await X(r,a,Et(e,"usecase-business-shape"));d.attr("class","label usecase-label");let{theme:c,themeVariables:f}=m();tr(h,e.colorIndex,c,f.borderColorArray);let p,x;if(i.stereotype){let N=await Or(h,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});p=N.label.attr("class","label usecase-stereotype"),x=N.bbox}let S=x?2:0,T=n.height+(x?.height??0)+S,B=Math.max(n.width,x?.width??0),_=u??10,v=B/2+_*2,E=T/2+_*2,D=Math.min(Math.max(_/5,1),_/2),P=B/2+D,Z=v-D,Q=P/v,tt=Z/v,it=E*Math.sqrt(Math.max(0,1-Q*Q)),ft=-E*Math.sqrt(Math.max(0,1-tt*tt));if(p&&x)zp(p,x,-T/2+x.height/2);zp(d,n,T/2-n.height/2);let dt;if(e.look==="handDrawn"){let K=y.svg(h).ellipse(0,0,v*2,E*2,vt(e,{}));dt=h.insert(()=>K,":first-child").attr("class","basic label-container usecase-business-ellipse")}else dt=h.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",E).attr("cx",0).attr("cy",0);h.append("path").attr("class","usecase-business-marker").attr("d",`M ${P} ${it} L ${Z} ${ft}`).attr("fill","none").attr("style",o||null);let st=i.accessibleName??i.label;if(st)h.attr("role","img").attr("aria-label",st);return W(e,dt),e.calcIntersect=(N,K)=>R.ellipse(N,N.width/2,N.height/2,K),e.intersect=(N)=>R.ellipse(e,v,E,N),h}t(Rm,"usecaseBusiness");var tc=8,Up=4,k1=1,ec=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),w1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:k1},"numericStrokeWidth");async function qm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=L(e),{stylesMap:a}=Ve(e);e.labelStyle=s;let{shapeSvg:h,bbox:n,label:u}=await X(r,e,Et(e,"usecase-json-table"));if(h.attr("role","img"),i.accessibleName)h.attr("aria-label",i.accessibleName);u.attr("class","label usecase-json-title");let d=h.append("g").attr("class","usecase-json-table-grid"),c=[];for(let N of i.jsonRows??[]){let K=await Or(d,N.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),et=await Or(d,N.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});c.push({key:{label:K.label.attr("class","label usecase-json-key"),bbox:K.bbox},value:{label:et.label.attr("class","label usecase-json-value"),bbox:et.bbox}})}let f=Math.max(0,...c.map(({key:N})=>N.bbox.width))+tc*2,p=Math.max(0,...c.map(({value:N})=>N.bbox.width))+tc*2,x=n.width+tc*2,S=Math.max(x,f+p),T=p+Math.max(0,S-f-p),B=n.height+Up*2,_=c.map(({key:N,value:K})=>Math.max(N.bbox.height,K.bbox.height)+Up*2),v=B+_.reduce((N,K)=>N+K,0),E=w1(a.get("stroke-width")),D=S+E*2,P=v+E*2,Z=-S/2,Q=-v/2,tt=e.look==="handDrawn"?y.svg(h):void 0,it=tt?vt(e,{}):void 0,ft=t((N,K,et,U,ut,nt)=>{if(tt&&it){let _t=tt.rectangle(et,U,ut,nt,it);return N.insert(()=>_t,":first-child").attr("class",K)}return N.insert("rect",":first-child").attr("class",K).attr("x",et).attr("y",U).attr("width",ut).attr("height",nt).attr("style",o)},"insertCell"),dt=ft(h,"label-container usecase-json-border",-D/2,-P/2,D,P);ft(d,"usecase-json-cell usecase-json-title-cell",Z,Q,S,B),d.node()?.append(u.node()),ec(u,n,0,Q+B/2);let st=Q+B;return c.forEach(({key:N,value:K},et)=>{let U=_[et],ut=d.append("g").attr("class","usecase-json-row").attr("data-row-index",et).attr("transform",`translate(0,${st})`);ft(ut,"usecase-json-cell usecase-json-key-cell",Z,0,f,U),ft(ut,"usecase-json-cell usecase-json-value-cell",Z+f,0,T,U),ut.node()?.append(N.label.node(),K.label.node()),ec(N.label,N.bbox,Z+f/2,U/2),ec(K.label,K.bbox,Z+f+T/2,U/2),st+=U}),W(e,dt),e.intersect=(N)=>R.rect(e,N),h}t(qm,"usecaseJsonTable");async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-h*2-2*n,10);let{shapeSvg:u,bbox:d,label:c}=await X(r,e,Et(e)),f=(e?.width?e?.width:d.width)+a*2+2*n,p=(e?.height?e?.height:d.height)+h*2+2*n,x=f-2*n,S=p-2*n,T=-x/2,B=-S/2,{cssStyles:_}=e,v=y.svg(u),E=vt(e,{}),D=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+x-n,y:B+S+n},{x:T+x-n,y:B+S},{x:T+x,y:B+S},{x:T+x,y:B+S-n},{x:T+x+n,y:B+S-n},{x:T+x+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],P=[{x:T,y:B+n},{x:T+x-n,y:B+n},{x:T+x-n,y:B+S},{x:T+x,y:B+S},{x:T+x,y:B},{x:T,y:B}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let Z=se(D),Q=v.path(Z,E),tt=se(P),it=v.path(tt,E);if(e.look!=="handDrawn")Q=ic(Q),it=ic(it);let ft=u.insert("g",":first-child");if(ft.insert(()=>Q),ft.insert(()=>it),ft.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ft.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return c.attr("transform",`translate(${-(d.width/2)-n-(d.x-(d.left??0))}, ${-(d.height/2)+n-(d.y-(d.top??0))})`),W(e,ft),e.intersect=function(dt){return R.polygon(e,D,dt)},u}t(Wm,"multiRect");async function Nm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await X(r,e,Et(e)),n=e.padding??0,u=e.look==="neo"?16:n,d=e.look==="neo"?12:n,c=!0;if(e.width||e.height)c=!1,e.width=(e?.width??0)-u*2,e.height=(e?.height??0)-d*3;let f=Math.max(a.width,e?.width??0)+u*2,p=Math.max(a.height,e?.height??0)+d*3,x=e.look==="neo"?p/4:p/8,S=p+(c?x/2:-x/2),T=-f/2,B=-S/2,_=10,{cssStyles:v}=e,E=Sr(T-_,B+S+_,T+f-_,B+S+_,x,0.8),D=E?.[E.length-1],P=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...E,{x:T+f-_,y:D.y-_},{x:T+f,y:D.y-_},{x:T+f,y:D.y-2*_},{x:T+f+_,y:D.y-2*_},{x:T+f+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],Z=[{x:T,y:B+_},{x:T+f-_,y:B+_},{x:T+f-_,y:D.y-_},{x:T+f,y:D.y-_},{x:T+f,y:B},{x:T,y:B}],Q=y.svg(o),tt=vt(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let it=se(P),ft=Q.path(it,tt),dt=se(Z),st=Q.path(dt,tt),N=o.insert(()=>ft,":first-child");if(N.insert(()=>st),N.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")N.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")N.selectAll("path").attr("style",s);return N.attr("transform",`translate(0,${-x/2})`),h.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-x-(a.y-(a.top??0))})`),W(e,N),e.intersect=function(K){return R.polygon(e,P,K)},o}t(Nm,"multiWaveEdgedRectangle");async function zm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);if(e.labelStyle=s,!(e.useHtmlLabels||Yt(C())))e.centerLabel=!0;let{shapeSvg:h,bbox:n,label:u}=await X(r,e,Et(e)),d=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),f=-d/2,p=-c/2,{cssStyles:x}=e,S=y.svg(h),T=vt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(f,p,d,c,T),_=h.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),x&&e.look!=="handDrawn")_.selectAll("path").attr("style",x);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,_),e.intersect=function(v){return R.rect(e,v)},h}t(zm,"note");var S1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Hm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,Et(e)),h=a.width+(e.padding??0),n=a.height+(e.padding??0),u=h+n,d=0.5,c=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:p}=e;if(e.look==="handDrawn"){let x=y.svg(o),S=vt(e,{}),T=S1(0,0,u),B=x.path(T,S);if(f=o.insert(()=>B,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),p)f.attr("style",p)}else f=rr(o,u,u,c),f.attr("transform",`translate(${-u/2+d}, ${u/2})`);if(s)f.attr("style",s);return W(e,f),e.calcIntersect=function(x,S){let T=x.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return R.polygon(x,B,S)},e.intersect=function(x){return this.calcIntersect(e,x)},o}t(Hm,"question");async function Ym(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,h=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:u,label:d}=await X(r,e,Et(e)),c=u.width+(e.look==="neo"?a*2:a),f=Math.max(u.height+(e.look==="neo"?h*2:h),e.height??0),p=f/4,S=-Math.max(c,(e.width??0)-p)/2,T=-f/2,B=T/2,_=[{x:S+B,y:T},{x:S,y:0},{x:S+B,y:-T},{x:-S,y:-T},{x:-S,y:T}],{cssStyles:v}=e,E=y.svg(n),D=vt(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=se(_),Z=E.path(P,D),Q=n.insert(()=>Z,":first-child");if(Q.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")Q.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return Q.attr("transform",`translate(${-B/2},0)`),d.attr("transform",`translate(${-B/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),W(e,Q),e.intersect=function(tt){return R.polygon(e,_,tt)},n}t(Ym,"rect_left_inv_arrow");async function jm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:u,label:d}=e,c=await ze(n,d,e.labelStyle,!0,!0),f={width:0,height:0};if(Yt(m())){let tt=c.children[0],it=b(c);f=tt.getBoundingClientRect(),it.attr("width",f.width),it.attr("height",f.height)}l.info("Text 2",u);let p=u||[],x=c.getBBox(),S=await ze(n,Array.isArray(p)?p.join("<br/>"):p,e.labelStyle,!0,!0),T=S.children[0],B=b(S);f=T.getBoundingClientRect(),B.attr("width",f.width),B.attr("height",f.height);let _=(e.padding||0)/2;b(S).attr("transform","translate( "+(f.width>x.width?0:(x.width-f.width)/2)+", "+(x.height+_+5)+")"),b(c).attr("transform","translate( "+(f.width<x.width?0:-(x.width-f.width)/2)+", 0)"),f=n.node().getBBox(),n.attr("transform","translate("+-f.width/2+", "+(-f.height/2-_+3)+")");let v=f.width+(e.padding||0),E=f.height+(e.padding||0),D=-f.width/2-_,P=-f.height/2-_,Z,Q;if(e.look==="handDrawn"){let tt=y.svg(a),it=vt(e,{}),ft=tt.path(Ee(D,P,v,E,e.rx||0),it),dt=tt.line(-f.width/2-_,-f.height/2-_+x.height+_,f.width/2+_,-f.height/2-_+x.height+_,it);Q=a.insert(()=>(l.debug("Rough node insert CXC",ft),dt),":first-child"),Z=a.insert(()=>(l.debug("Rough node insert CXC",ft),ft),":first-child")}else Z=h.insert("rect",":first-child"),Q=h.insert("line"),Z.attr("class","outer title-state").attr("style",s).attr("x",-f.width/2-_).attr("y",-f.height/2-_).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),Q.attr("class","divider").attr("x1",-f.width/2-_).attr("x2",f.width/2+_).attr("y1",-f.height/2-_+x.height+_).attr("y2",-f.height/2-_+x.height+_);return W(e,Z),e.intersect=function(tt){return R.rect(e,tt)},a}t(jm,"rectWithTitle");async function Um(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return bi(r,e,o)}t(Um,"roundedRect");var Ir=8;async function Xm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:h,bbox:n,label:u}=await X(r,e,Et(e)),d=(e?.width??n.width)+o*2+(e.look==="neo"?Ir:Ir*2),c=(e?.height??n.height)+a*2,f=d-Ir,p=c,x=Ir-d/2,S=-c/2,{cssStyles:T}=e,B=y.svg(h),_=vt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x,y:S},{x:x+f,y:S},{x:x+f,y:S+p},{x:x-Ir,y:S+p},{x:x-Ir,y:S},{x,y:S},{x,y:S+p}],E=B.polygon(v.map((P)=>[P.x,P.y]),_),D=h.insert(()=>E,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",de(T)),s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return u.attr("transform",`translate(${Ir/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,D),e.intersect=function(P){return R.rect(e,P)},h}t(Xm,"shadedProcess");async function Gm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-h*2,10);let{shapeSvg:n,bbox:u,label:d}=await X(r,e,Et(e)),c=(e?.width?e?.width:u.width)+a*2,f=((e?.height?e?.height:u.height)+h*2)*1.5,p=c,x=f/1.5,S=-p/2,T=-x/2,{cssStyles:B}=e,_=y.svg(n),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=[{x:S,y:T},{x:S,y:T+x},{x:S+p,y:T+x},{x:S+p,y:T-x/2}],D=se(E),P=_.path(D,v),Z=n.insert(()=>P,":first-child");if(Z.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")Z.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")Z.selectChildren("path").attr("style",s);return Z.attr("transform",`translate(0, ${x/4})`),d.attr("transform",`translate(${-p/2+(e.padding??0)-(u.x-(u.left??0))}, ${-x/4+(e.padding??0)-(u.y-(u.top??0))})`),W(e,Z),e.intersect=function(Q){return R.polygon(e,E,Q)},n}t(Gm,"slopedRect");async function Vm(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},h=await bi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:u}=m();tr(h,e.colorIndex,n,u.borderColorArray)}return h}t(Vm,"squareRect");var ac=50,T1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(ac-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function Km(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,h=e.look==="neo"?24:o,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),{w:d,h:c}=T1(u,a,h),f=c/2,{cssStyles:p}=e,x=y.svg(n),S=vt(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-d/2+f,y:-c/2},{x:d/2-f,y:-c/2},...Qe(-d/2+f,0,f,ac,90,270),{x:d/2-f,y:c/2},...Qe(d/2-f,0,f,ac,270,450)],B=se(T),_=x.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),p&&e.look!=="handDrawn")v.selectChildren("path").attr("style",p);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return W(e,v),e.intersect=function(E){return R.polygon(e,T,E)},n}t(Km,"stadium");async function Zm(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return bi(r,e,i)}t(Zm,"state");function Qm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:h,stateBorder:n,nodeBorder:u,nodeShadow:d}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let c=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=y.svg(c),p=vt(e,{});if(e.look!=="handDrawn")p.roughness=0,p.fillStyle="solid";let x=f.circle(0,0,e.width,{...p,stroke:h,strokeWidth:2}),S=n??u,T=(e.width??0)*5/14,B=f.circle(0,0,T,{...p,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=c.insert(()=>x,":first-child");if(_.insert(()=>B),e.look!=="handDrawn")_.attr("class","outer-path");if(a)_.selectAll("path").attr("style",a);if(o)_.selectAll("path").attr("style",o);if(e.width<25&&d&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",E=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${E})`)}return W(e,_),e.intersect=function(v){return R.circle(e,(e.width??0)/2,v)},c}t(Qm,"stateEnd");function Jm(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),h;if(e.look==="handDrawn"){let u=y.svg(a).circle(0,0,e.width,Ud(s));h=a.insert(()=>u),h.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else h=a.insert("circle",":first-child"),h.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",u=n?`${n}-drop-shadow-small`:"drop-shadow-small";h.attr("style",`filter:url(#${u})`)}return W(e,h),e.intersect=function(n){return R.circle(e,(e.width??7)/2,n)},a}t(Jm,"stateStart");var yi=8;async function ty(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,h=e.look==="neo"?12:o,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=Math.max(u.width+2*yi+a,e.width??0),c=Math.max(u.height+h,e.height??0),f=d-2*yi,p=c,x=-d/2,S=-c/2,T=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=vt(e,{}),v=B.rectangle(x,S,f+16,p,_),E=B.line(x+yi,S,x+yi,S+p,_),D=B.line(x+yi+f,S,x+yi+f,S+p,_);n.insert(()=>E,":first-child"),n.insert(()=>D,":first-child");let P=n.insert(()=>v,":first-child"),{cssStyles:Z}=e;P.attr("class","basic label-container").attr("style",de(Z)),W(e,P)}else{let B=rr(n,f,p,T);if(s)B.attr("style",s);W(e,B)}return e.intersect=function(B){return R.polygon(e,T,B)},n}t(ty,"subroutine");var rc=0.2;async function ey(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-h*2,10),e.width=Math.max((e?.width??0)-a*2-rc*(e.height+h*2),10);let{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=(e?.height?e?.height:u.height)+h*2,c=rc*d,f=rc*d,x=(e?.width?e?.width:u.width)+a*2+c-c,S=d,T=-x/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),E=vt(e,{}),D=[{x:T-c/2,y:B},{x:T+x+c/2,y:B},{x:T+x+c/2,y:B+S},{x:T-c/2,y:B+S}],P=[{x:T+x-c/2,y:B+S},{x:T+x+c/2,y:B+S},{x:T+x+c/2,y:B+S-f}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let Z=se(D),Q=v.path(Z,E),tt=se(P),it=v.path(tt,{...E,fillStyle:"solid"}),ft=n.insert(()=>it,":first-child");if(ft.insert(()=>Q,":first-child"),ft.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ft.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return W(e,ft),e.intersect=function(dt){return R.polygon(e,D,dt)},n}t(ey,"taggedRect");async function ry(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await X(r,e,Et(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),d=u/8,c=0.2*n,f=0.2*u,p=u+d,{cssStyles:x}=e,S=y.svg(o),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:p/2},...Sr(-n/2-n/2*0.1,p/2,n/2+n/2*0.1,p/2,d,0.8),{x:n/2+n/2*0.1,y:-p/2},{x:-n/2-n/2*0.1,y:-p/2}],_=-n/2+n/2*0.1,v=-p/2-f*0.4,E=[{x:_+n-c,y:(v+u)*1.3},{x:_+n,y:v+u-f},{x:_+n,y:(v+u)*0.9},...Sr(_+n,(v+u)*1.25,_+n-c,(v+u)*1.3,-u*0.02,0.5)],D=se(B),P=S.path(D,T),Z=se(E),Q=S.path(Z,{...T,fillStyle:"solid"}),tt=o.insert(()=>Q,":first-child");if(tt.insert(()=>P,":first-child"),tt.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")tt.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-d/2-(a.y-(a.top??0))})`),W(e,tt),e.intersect=function(it){return R.polygon(e,B,it)},o}t(ry,"taggedWaveEdgedRectangle");async function iy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,Et(e)),h=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),u=-h/2,d=-n/2,c=o.insert("rect",":first-child");return c.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",u).attr("y",d).attr("width",h).attr("height",n),W(e,c),e.intersect=function(f){return R.rect(e,f)},o}t(iy,"text");var B1=t((r,e,i,s,o,a)=>`M${r},${e}
231
+ a${o},${a} 0,0,1 0,${-s}
232
+ l${i},0
233
+ a${o},${a} 0,0,1 0,${s}
234
+ M${i},${-s}
235
+ a${o},${a} 0,0,0 0,${s}
236
+ l${-i},0`,"createCylinderPathD"),_1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),v1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Gp=5,Qp=10;async function oy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,h=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Gp)e.height=Gp}if(e.width){let _=h/2/(2.5+h/50);if(e.width=e.width-a-_*3,e.width<Qp)e.width=Qp}let{shapeSvg:n,bbox:u,label:d}=await X(r,e,Et(e)),c=Math.max(e.height??0,u.height)+a,f=c/2,p=f/(2.5+c/50),x=Math.max(e.width??0,u.width)+p+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=_1(0,0,x,c,p,f),v=v1(0,0,x,c,p,f),E=B.path(_,vt(e,{})),D=B.path(v,vt(e,{fill:"none"}));if(T=n.insert(()=>D,":first-child"),T=n.insert(()=>E,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=B1(0,0,x,c,p,f);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",de(S)).attr("style",s),T.attr("class","basic label-container outer-path"),S)T.selectAll("path").attr("style",S);if(s)T.selectAll("path").attr("style",s)}return T.attr("label-offset-x",p),T.attr("transform",`translate(${-x/2}, ${c/2} )`),d.attr("transform",`translate(${-(u.width/2)-p-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),W(e,T),e.intersect=function(B){let _=R.rect(e,B),v=_.y-(e.y??0);if(f!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-p)){let E=p*p*(1-v*v/(f*f));if(E!=0)E=Math.sqrt(Math.abs(E));if(E=p-E,B.x-(e.x??0)>0)E=-E;_.x+=E}return _},n}t(oy,"tiltedCylinder");async function sy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:-3*d/6,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:0,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=rr(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(sy,"trapezoid");async function ay(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=15,u=5;if(e.width||e.height){if(e.height=(e.height??0)-h*2,e.height<u)e.height=u;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:d,bbox:c}=await X(r,e,Et(e)),f=(e?.width?e?.width:c.width)+a*2,p=(e?.height?e?.height:c.height)+h*2,{cssStyles:x}=e,S=y.svg(d),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2*0.8,y:-p/2},{x:f/2*0.8,y:-p/2},{x:f/2,y:-p/2*0.6},{x:f/2,y:p/2},{x:-f/2,y:p/2},{x:-f/2,y:-p/2*0.6}],_=se(B),v=S.path(_,T),E=d.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")E.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return W(e,E),e.intersect=function(D){return R.polygon(e,B,D)},d}t(ay,"trapezoidalPentagon");var tg=10,eg=10;async function ny(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-a)/2,e.width<eg)e.width=eg;if(e.height=e?.height??0,e.height<tg)e.height=tg}let{shapeSvg:h,bbox:n,label:u}=await X(r,e,Et(e)),d=Jr(m().flowchart?.htmlLabels),c=(e?.width?e?.width:n.width)+a,f=e?.height?e?.height:c+n.height,p=f,x=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:S}=e,T=y.svg(h),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=se(x),v=T.path(_,B),E=h.insert(()=>v,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")E.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return e.width=c,e.height=f,W(e,E),u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${f/2-(n.height+(e.padding??0)/(d?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(D){return l.info("Triangle intersect",e,x,D),R.polygon(e,x,D)},h}t(ny,"triangle");async function ly(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=!0;if(e.width||e.height){if(n=!1,e.width=(e?.width??0)-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-h*2,e.height<10)e.height=10}let{shapeSvg:u,bbox:d,label:c}=await X(r,e,Et(e)),f=(e?.width?e?.width:d.width)+(a??0)*2,p=(e?.height?e?.height:d.height)+(h??0)*2,x=e.look==="neo"?p/4:p/8,S=p+(n?x:-x),{cssStyles:T}=e,_=14-f,v=_>0?_/2:0,E=y.svg(u),D=vt(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=[{x:-f/2-v,y:S/2},...Sr(-f/2-v,S/2,f/2+v,S/2,x,0.8),{x:f/2+v,y:-S/2},{x:-f/2-v,y:-S/2}],Z=se(P),Q=E.path(Z,D),tt=u.insert(()=>Q,":first-child");if(tt.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")tt.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-x/2})`),c.attr("transform",`translate(${-f/2+(e.padding??0)-(d.x-(d.left??0))},${-p/2+(e.padding??0)-x-(d.y-(d.top??0))})`),W(e,tt),e.intersect=function(it){return R.polygon(e,P,it)},u}t(ly,"waveEdgedRectangle");async function hy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let D=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-h-D*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:u}=await X(r,e,Et(e)),d=(e?.width?e?.width:u.width)+a*2,c=(e?.height?e?.height:u.height)+h,f=c/8,p=c+f*2,{cssStyles:x}=e,S=y.svg(n),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-d/2,y:p/2},...Sr(-d/2,p/2,d/2,p/2,f,1),{x:d/2,y:-p/2},...Sr(d/2,-p/2,-d/2,-p/2,f,-1)],_=se(B),v=S.path(_,T),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container"),x&&e.look!=="handDrawn")E.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return W(e,E),e.intersect=function(D){return R.polygon(e,B,D)},n}t(hy,"waveRectangle");var pe=10;async function cy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-pe,10),e.height=Math.max((e?.height??0)-a*2-pe,10);let{shapeSvg:h,bbox:n,label:u}=await X(r,e,Et(e)),d=(e?.width?e?.width:n.width)+o*2+pe,c=(e?.height?e?.height:n.height)+a*2+pe,f=d-pe,p=c-pe,x=-f/2,S=-p/2,{cssStyles:T}=e,B=y.svg(h),_=vt(e,{}),v=[{x:x-pe,y:S-pe},{x:x-pe,y:S+p},{x:x+f,y:S+p},{x:x+f,y:S-pe}],E=`M${x-pe},${S-pe} L${x+f},${S-pe} L${x+f},${S+p} L${x-pe},${S+p} L${x-pe},${S-pe}
237
+ M${x-pe},${S} L${x+f},${S}
238
+ M${x},${S-pe} L${x},${S+p}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let D=B.path(E,_),P=h.insert(()=>D,":first-child");if(P.attr("transform",`translate(${pe/2}, ${pe/2})`),P.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")P.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")P.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(n.width/2)+pe/2-(n.x-(n.left??0))}, ${-(n.height/2)+pe/2-(n.y-(n.top??0))})`),W(e,P),e.intersect=function(Z){return R.polygon(e,v,Z)},h}t(cy,"windowPane");var rg=new Set(["redux-color","redux-dark-color"]),L1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Bc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:h,nodeBorder:n,borderColorArray:u}=o;if(e.look==="handDrawn"){let{themeVariables:Mt}=C(),{background:Wt}=Mt,Gt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Wt}`]};await Bc(r,Gt)}let d=C();e.useHtmlLabels=d.htmlLabels;let c=d.er?.diagramPadding??10,f=d.er?.entityPadding??6,{cssStyles:p}=e,{labelStyles:x,nodeStyles:S}=L(e);if(i.attributes.length===0&&e.label){let Mt={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5,classes:""};if(Xn(e.label,d)+Mt.labelPaddingX*2<d.er.minEntityWidth)e.width=d.er.minEntityWidth;let Wt=await bi(r,e,Mt);if(s!=null&&rg.has(s)){let Gt=i.colorIndex??0;Wt.attr("data-color-id",`color-${Gt%u.length}`)}if(!Jr(d.htmlLabels)){let Gt=Wt.select("text"),zt=Gt.node()?.getBBox();Gt.attr("transform",`translate(${-zt.width/2}, 0)`)}return Wt}if(!d.htmlLabels)c*=1.25,f*=1.25;let T=Et(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await xi(B,e.label??"",d,0,0,["name"],x);_.height+=f;let v=0,E=[],D=[],P=0,Z=0,Q=0,tt=0,it=!0,ft=!0;for(let Mt of i.attributes){let Wt=await xi(B,Mt.type,d,0,v,["attribute-type"],x);P=Math.max(P,Wt.width+c);let Gt=await xi(B,Mt.name,d,0,v,["attribute-name"],x);Z=Math.max(Z,Gt.width+c);let zt=await xi(B,Mt.keys.join(),d,0,v,["attribute-keys"],x);Q=Math.max(Q,zt.width+c);let he=await xi(B,Mt.comment,d,0,v,["attribute-comment"],x);tt=Math.max(tt,he.width+c);let le=Math.max(Wt.height,Gt.height,zt.height,he.height)+f;D.push({yOffset:v,rowHeight:le}),v+=le}let dt=4;if(Q<=c)it=!1,Q=0,dt--;if(tt<=c)ft=!1,tt=0,dt--;let st=B.node().getBBox();if(_.width+c*2-(P+Z+Q+tt)>0){let Mt=_.width+c*2-(P+Z+Q+tt);if(P+=Mt/dt,Z+=Mt/dt,Q>0)Q+=Mt/dt;if(tt>0)tt+=Mt/dt}let N=P+Z+Q+tt,K=y.svg(B),et=vt(e,{});if(e.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let U=0;if(D.length>0)U=D.reduce((Mt,Wt)=>Mt+(Wt?.rowHeight??0),0);let ut=Math.max(st.width+c*2,e?.width||0,N),nt=Math.max((U??0)+_.height,e?.height||0),_t=-ut/2,Lt=-nt/2;if(B.selectAll("g:not(:first-child)").each((Mt,Wt,Gt)=>{let zt=b(Gt[Wt]),he=zt.attr("transform"),le=0,ir=0;if(he){let He=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(he);if(He){if(le=parseFloat(He[1]),ir=parseFloat(He[2]),zt.attr("class").includes("attribute-name"))le+=P;else if(zt.attr("class").includes("attribute-keys"))le+=P+Z;else if(zt.attr("class").includes("attribute-comment"))le+=P+Z+Q}}zt.attr("transform",`translate(${_t+c/2+le}, ${ir+Lt+_.height+f/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(Lt+f/2)+")"),s!=null&&rg.has(s)){let Mt=i.colorIndex??0;B.attr("data-color-id",`color-${Mt%u.length}`)}let Ut=K.rectangle(_t,Lt,ut,nt,et),Xt=B.insert(()=>Ut,":first-child").attr("class","outer-path").attr("style",p.join(""));E.push(0);for(let[Mt,Wt]of D.entries()){let zt=(Mt+1)%2===0&&Wt.yOffset!==0,he=K.rectangle(_t,_.height+Lt+Wt?.yOffset,ut,Wt?.rowHeight,{...et,fill:zt?a:h,stroke:n});B.insert(()=>he,"g.label").attr("style",p.join("")).attr("class",`row-rect-${zt?"even":"odd"}`)}let Qt=0.0001,re=Ci(_t,_.height+Lt,ut+_t,_.height+Lt,Qt),It=K.polygon(re.map((Mt)=>[Mt.x,Mt.y]),et);if(B.insert(()=>It).attr("class","divider"),re=Ci(P+_t,_.height+Lt,P+_t,nt+Lt,Qt),It=K.polygon(re.map((Mt)=>[Mt.x,Mt.y]),et),B.insert(()=>It).attr("class","divider"),it){let Mt=P+Z+_t;re=Ci(Mt,_.height+Lt,Mt,nt+Lt,Qt),It=K.polygon(re.map((Wt)=>[Wt.x,Wt.y]),et),B.insert(()=>It).attr("class","divider")}if(ft){let Mt=P+Z+Q+_t;re=Ci(Mt,_.height+Lt,Mt,nt+Lt,Qt),It=K.polygon(re.map((Wt)=>[Wt.x,Wt.y]),et),B.insert(()=>It).attr("class","divider")}for(let Mt of E){let Wt=_.height+Lt+Mt;re=Ci(_t,Wt,ut+_t,Wt,Qt),It=K.polygon(re.map((Gt)=>[Gt.x,Gt.y]),et),B.insert(()=>It).attr("class","divider")}if(W(e,Xt),S&&e.look!=="handDrawn")if(s!=null&&L1.has(s))B.selectAll("path").attr("style",S);else{let Wt=S.split(";")?.filter((Gt)=>Gt.includes("stroke"))?.map((Gt)=>`${Gt}`).join("; ");B.selectAll("path").attr("style",Wt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(Mt){return R.rect(e,Mt)},B}t(Bc,"erBox");async function xi(r,e,i,s=0,o=0,a=[],h=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",h);if(e!==Co(e))e=Co(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let u=n.node().appendChild(await gn(n,e,{width:Xn(e,i)+100,style:h,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let c=u.children[0];c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(c.childNodes[0])c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let d=u.getBBox();if(Jr(i.htmlLabels)){let c=u.children[0];c.style.textAlign="start";let f=b(u);d=c.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return d}t(xi,"addText");function Ci(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(Ci,"lineToPolygon");async function uy(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,h=r.insert("g").attr("class",Et(e)).attr("id",e.domId||e.id),n=null,u=null,d=null,c=null,f=0,p=0,x=0;if(n=h.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await Mo(n,{text:`«${v}»`},0),f=n.node().getBBox().height}u=h.insert("g").attr("class","label-group text"),await Mo(u,e,0,["font-weight: bolder"]);let S=u.node().getBBox();p=S.height,d=h.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let E=await Mo(d,v,T,[v.parseClassifier()]);T+=E+a}if(x=d.node().getBBox().height,x<=0)x=o/2;c=h.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let E=await Mo(c,v,B,[v.parseClassifier()]);B+=E+a}let _=h.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return u.attr("transform",`translate(${-S.width/2}, ${f})`),_=h.node().getBBox(),d.attr("transform",`translate(0, ${f+p+o*2})`),_=h.node().getBBox(),c.attr("transform",`translate(0, ${f+p+(x?x+o*4:o*2)})`),_=h.node().getBBox(),{shapeSvg:h,bbox:_}}t(uy,"textHelper");async function Mo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),h="useHtmlLabels"in e?e.useHtmlLabels:Jr(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!h&&n.startsWith("\\"))n=n.substring(1);if(Dt(n))h=!0;let u=await gn(o,Go(Za(n)),{width:Xn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:h},a),d,c=1;if(!h){if(s.includes("font-weight: bolder"))b(u).selectAll("tspan").attr("font-weight","");c=u.children.length;let f=u.children[0];if(u.textContent===""||u.textContent.includes("&gt")){if(f.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" ")f.textContent=f.textContent[0]+" "+f.textContent.substring(1)}if(f.textContent==="undefined")f.textContent="";d=u.getBBox()}else{let f=u.children[0],p=b(u);if(c=f.innerHTML.split("<br>").length,f.innerHTML.includes("</math>"))c+=f.innerHTML.split("<mrow>").length-1;await nc(f),d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}return o.attr("transform","translate(0,"+(-d.height/(2*c)+i)+")"),d.height}t(Mo,"addText");async function dy(r,e){let i=m(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:h}=o,n=i.class.padding??12,u=n,d=e.useHtmlLabels??Jr(i.htmlLabels)??!0,c=e;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];let{shapeSvg:f,bbox:p}=await uy(r,e,i,d,u);tr(f,e.colorIndex,s,h);let{labelStyles:x,nodeStyles:S}=L(e);e.labelStyle=x,e.cssStyles=c.styles||"";let T=c.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=c.members.length===0&&c.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(f),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=Math.max(e.width??0,p.width),D=Math.max(e.height??0,p.height),P=(e.height??0)>p.height;if(c.members.length===0&&c.methods.length===0)D+=u;else if(c.members.length>0&&c.methods.length===0)D+=u*2;let Z=-E/2,Q=-D/2,tt=B?n*2:c.members.length===0&&c.methods.length===0?-n:0;if(P)tt=n*2;let it=_.rectangle(Z-n,Q-n-(B?n:c.members.length===0&&c.methods.length===0?-n/2:0),E+2*n,D+2*n+tt,v),ft=f.insert(()=>it,":first-child");ft.attr("class","basic label-container outer-path");let dt=ft.node().getBBox(),st=f.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,N=f.select(".label-group").node().getBBox().height-(B?n/2:0)||0,K=f.select(".members-group").node().getBBox().height-(B?n/2:0)||0,et=(st+N+Q+n-(Q-n-(B?n:c.members.length===0&&c.methods.length===0?-n/2:0)))/2;if(f.selectAll(".text").each((U,ut,nt)=>{let _t=b(nt[ut]),Lt=_t.attr("transform"),Ut=0;if(Lt){let It=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Lt);if(It)Ut=parseFloat(It[2])}let Xt=Ut+Q+n-(B?n:c.members.length===0&&c.methods.length===0?-n/2:0);if(_t.attr("class").includes("methods-group")){let re=Math.max(K,u/2);if(P)Xt=Math.max(et,st+N+re+Q+u*2+n)+u*2;else Xt=st+N+re+Q+u*4+n}if(c.members.length===0&&c.methods.length===0&&i.class?.hideEmptyMembersBox)if(c.annotations.length>0)Xt=Ut-u;else Xt=Ut;if(!d)Xt-=4;let Qt=Z;if(_t.attr("class").includes("label-group")||_t.attr("class").includes("annotation-group"))Qt=-_t.node()?.getBBox().width/2||0,f.selectAll("text").each(function(re,It,Mt){if(window.getComputedStyle(Mt[It]).textAnchor==="middle")Qt=0});_t.attr("transform",`translate(${Qt}, ${Xt})`)}),c.members.length>0||c.methods.length>0||B){let U=st+N+Q+n,ut=_.line(dt.x,U,dt.x+dt.width,U+0.001,v);f.insert(()=>ut).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||c.members.length>0||c.methods.length>0){let U=st+N+K+Q+u*2+n,ut=_.line(dt.x,P?Math.max(et,U):U,dt.x+dt.width,(P?Math.max(et,U):U)+0.001,v);f.insert(()=>ut).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(c.look!=="handDrawn")f.selectAll("path").attr("style",T);if(ft.select(":nth-child(2)").attr("style",T),f.selectAll(".divider").select("path").attr("style",T),e.labelStyle)f.selectAll("span").attr("style",e.labelStyle);else f.selectAll("span").attr("style",T);if(!d){let U=RegExp(/color\s*:\s*([^;]*)/),ut=U.exec(T);if(ut){let nt=ut[0].replace("color","fill");f.selectAll("tspan").attr("style",nt)}else if(x){let nt=U.exec(x);if(nt){let _t=nt[0].replace("color","fill");f.selectAll("tspan").attr("style",_t)}}}return W(e,ft),e.intersect=function(U){return R.rect(e,U)},f}t(dy,"classBox");async function fy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e,a=e,h=20,n=20,u="verifyMethod"in e,d=Et(e),c=m(),{themeVariables:f}=c,{borderColorArray:p,requirementEdgeLabelBackground:x}=f,S=c.layout==="elk"?"start":"center",T=r.insert("g").attr("class",d).attr("id",e.domId??e.id),B;if(u)B=await Ze(T,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else B=await Ze(T,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let _=B,v=await Ze(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,u){let dt=await Ze(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=dt;let st=await Ze(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=st;let N=await Ze(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=N,await Ze(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let dt=await Ze(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=dt,await Ze(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let E=(T.node()?.getBBox().width??200)+h,D=(T.node()?.getBBox().height??200)+h,P=-E/2,Z=-D/2,Q=y.svg(T),tt=vt(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let it=Q.rectangle(P,Z,E,D,tt),ft=T.insert(()=>it,":first-child");if(ft.attr("class","basic label-container outer-path").attr("style",s),p?.length){let dt=e.colorIndex??0;T.attr("data-color-id",`color-${dt%p.length}`)}if(T.selectAll(".label").each((dt,st,N)=>{let K=b(N[st]),et=K.attr("transform"),U=0,ut=0;if(et){let Ut=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(et);if(Ut)U=parseFloat(Ut[1]),ut=parseFloat(Ut[2])}let nt=ut-D/2,_t=P+h/2;if(st===0||st===1)_t=U;K.attr("transform",`translate(${_t}, ${nt+h})`)}),_>B+v+n){let dt=Z+B+v+n,st;if(e.look==="neo"){let et=[[P,dt],[P+E,dt],[P+E,dt+0.001],[P,dt+0.001]];st=Q.polygon(et,tt)}else st=Q.line(P,dt,P+E,dt,tt);T.insert(()=>st).attr("class","divider")}if(W(e,ft),e.intersect=function(dt){return R.rect(e,dt)},s&&e.look!=="handDrawn"&&(x||p?.length))T.selectAll("path").attr("style",s);return T}t(fy,"requirementBox");async function Ze(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),h=m(),n=h.htmlLabels??!0,u=await gn(a,Go(Za(e)),{width:Xn(e,h)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},h),d;if(!n){let c=u.children[0];for(let f of c.children)if(s)f.setAttribute("style",s);if(o==="start"){c.setAttribute("text-anchor","start");for(let f of c.children)f.setAttribute("text-anchor","start")}d=u.getBBox(),d.height+=6}else{let c=u.children[0],f=b(u);if(o==="start")b(c).style("text-align","left");d=c.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return a.attr("transform",`translate(${-d.width/2},${-d.height/2+i})`),d.height}t(Ze,"addText");var F1=t((r)=>{switch(r){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 py(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s||"";let a=10,h=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:u,label:d}=await X(r,e,Et(e)),c=e.padding||10,f="",p;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)f=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank");let x={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(p)({label:S,bbox:T}=await Or(p,"ticket"in e&&e.ticket||"",x));else({label:S,bbox:T}=await Or(n,"ticket"in e&&e.ticket||"",x));let{label:B,bbox:_}=await Or(n,"assigned"in e&&e.assigned||"",x);e.width=h;let v=10,E=e?.width||0,D=Math.max(T.height,_.height)/2,P=Math.max(u.height+v*2,e?.height||0)+D,Z=-E/2,Q=-P/2;d.attr("transform","translate("+(c-E/2)+", "+(-D-u.height/2)+")"),S.attr("transform","translate("+(c-E/2)+", "+(-D+u.height/2)+")"),B.attr("transform","translate("+(c+E/2-_.width-2*a)+", "+(-D+u.height/2)+")");let tt,{rx:it,ry:ft}=e,{cssStyles:dt}=e;if(e.look==="handDrawn"){let st=y.svg(n),N=vt(e,{}),K=it||ft?st.path(Ee(Z,Q,E,P,it||0),N):st.rectangle(Z,Q,E,P,N);tt=n.insert(()=>K,":first-child"),tt.attr("class","basic label-container").attr("style",dt?dt:null)}else{tt=n.insert("rect",":first-child"),tt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",it??5).attr("ry",ft??5).attr("x",Z).attr("y",Q).attr("width",E).attr("height",P);let st="priority"in e&&e.priority;if(st){let N=n.append("line"),K=Z+2,et=Q+Math.floor((it??0)/2),U=Q+P-Math.floor((it??0)/2);N.attr("x1",K).attr("y1",et).attr("x2",K).attr("y2",U).attr("stroke-width","4").attr("stroke",F1(st))}}return W(e,tt),e.height=P,e.intersect=function(st){return R.rect(e,st)},n}t(py,"kanbanItem");async function gy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await X(r,e,Et(e)),u=a.width+10*h,d=a.height+8*h,c=0.15*u,{cssStyles:f}=e,p=a.width+20,x=a.height+20,S=Math.max(u,p),T=Math.max(d,x);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
239
+ a${c},${c} 1 0,0 ${S*0.25},${-1*T*0.1}
240
+ a${c},${c} 1 0,0 ${S*0.25},0
241
+ a${c},${c} 1 0,0 ${S*0.25},0
242
+ a${c},${c} 1 0,0 ${S*0.25},${T*0.1}
243
+
244
+ a${c},${c} 1 0,0 ${S*0.15},${T*0.33}
245
+ a${c*0.8},${c*0.8} 1 0,0 0,${T*0.34}
246
+ a${c},${c} 1 0,0 ${-1*S*0.15},${T*0.33}
247
+
248
+ a${c},${c} 1 0,0 ${-1*S*0.25},${T*0.15}
249
+ a${c},${c} 1 0,0 ${-1*S*0.25},0
250
+ a${c},${c} 1 0,0 ${-1*S*0.25},0
251
+ a${c},${c} 1 0,0 ${-1*S*0.25},${-1*T*0.15}
252
+
253
+ a${c},${c} 1 0,0 ${-1*S*0.1},${-1*T*0.33}
254
+ a${c*0.8},${c*0.8} 1 0,0 0,${-1*T*0.34}
255
+ a${c},${c} 1 0,0 ${S*0.1},${-1*T*0.33}
256
+ H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),E=vt(e,{}),D=v.path(_,E);B=o.insert(()=>D,":first-child"),B.attr("class","basic label-container").attr("style",de(f))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return B.attr("transform",`translate(${-S/2}, ${-T/2})`),W(e,B),e.calcIntersect=function(v,E){return R.rect(v,E)},e.intersect=function(v){return l.info("Bang intersect",e,v),R.rect(e,v)},o}t(gy,"bang");async function my(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await X(r,e,Et(e)),u=a.width+2*h,d=a.height+2*h,c=0.15*u,f=0.25*u,p=0.35*u,x=0.2*u,{cssStyles:S}=e,T,B=`M0 0
257
+ a${c},${c} 0 0,1 ${u*0.25},${-1*u*0.1}
258
+ a${p},${p} 1 0,1 ${u*0.4},${-1*u*0.1}
259
+ a${f},${f} 1 0,1 ${u*0.35},${u*0.2}
260
+
261
+ a${c},${c} 1 0,1 ${u*0.15},${d*0.35}
262
+ a${x},${x} 1 0,1 ${-1*u*0.15},${d*0.65}
263
+
264
+ a${f},${c} 1 0,1 ${-1*u*0.25},${u*0.15}
265
+ a${p},${p} 1 0,1 ${-1*u*0.5},0
266
+ a${c},${c} 1 0,1 ${-1*u*0.25},${-1*u*0.15}
267
+
268
+ a${c},${c} 1 0,1 ${-1*u*0.1},${-1*d*0.35}
269
+ a${x},${x} 1 0,1 ${u*0.1},${-1*d*0.65}
270
+ H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=vt(e,{}),E=_.path(B,v);T=o.insert(()=>E,":first-child"),T.attr("class","basic label-container").attr("style",de(S))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),T.attr("transform",`translate(${-u/2}, ${-d/2})`),W(e,T),e.calcIntersect=function(_,v){return R.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),R.rect(e,_)},o}t(my,"cloud");async function yy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await X(r,e,Et(e)),u=a.width+8*h,d=a.height+2*h,c=5,f=e.look==="neo"?`
271
+ M${-u/2} ${d/2-c}
272
+ v${-d+2*c}
273
+ q0,-${c} ${c},-${c}
274
+ h${u-2*c}
275
+ q${c},0 ${c},${c}
276
+ v${d-c}
277
+ H${-u/2}
278
+ Z
279
+ `:`
280
+ M${-u/2} ${d/2-c}
281
+ v${-d+2*c}
282
+ q0,-${c} ${c},-${c}
283
+ h${u-2*c}
284
+ q${c},0 ${c},${c}
285
+ v${d-2*c}
286
+ q0,${c} ${-c},${c}
287
+ h${-(u-2*c)}
288
+ q${-c},0 ${-c},${-c}
289
+ Z
290
+ `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let p=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",f);return o.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",d/2).attr("x2",u/2).attr("y2",d/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),W(e,p),e.calcIntersect=function(x,S){return R.rect(x,S)},e.intersect=function(x){return R.rect(e,x)},o}t(yy,"defaultMindmapNode");async function xy(r,e){let i={padding:e.padding??0};return Sc(r,e,i)}t(xy,"mindmapCircle");var M1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Vm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Um},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Km},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ty},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:qg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Wg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Vg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:dg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:bg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:mg},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Ig},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Sc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:gy},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:my},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Hm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Jg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Fm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Lm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:sy},{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:Yg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:iy},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:yg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Xm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Jm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Qm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Kg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:xm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Bg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:vg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ag},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Mm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ly},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Zg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:oy},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Em},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Eg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Hg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ny},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:cy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Xg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ay},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Gg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Gm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Nm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Wm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ug},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:wg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ry},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ey},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:hy},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ym},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:$m}],A1=t(()=>{let e=[...Object.entries({state:Zm,choice:xg,note:zm,composite:Cg,rectWithTitle:jm,labelRect:_m,block_arrow:gg,collapsedGroup:pg,iconSquare:Sm,iconCircle:km,icon:Cm,iconRounded:wm,imageSquare:Tm,anchor:hg,kanbanItem:py,mindmapCircle:xy,defaultMindmapNode:yy,classBox:dy,erBox:Bc,requirementBox:fy,usecaseActor:Im,usecaseActorHollow:Dm,usecaseActorAwesome:Om,usecaseActorIcon:Pm,usecaseBusiness:Rm,usecaseEllipse:jg,usecaseJsonTable:qm}),...M1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),bd=A1();function wc(r){return r in bd}t(wc,"isValidShape");var ka=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),ia=new Map;async function xa(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?bd[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let h;if(i.config.securityLevel==="sandbox")h="_top";else if(e.linkTarget)h=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",h??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",de(e.look)),e.tooltip)o.attr("title",e.tooltip);if(ia.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(xa,"insertNode");var oh=t((r,e)=>{ia.set(e.id,r)},"setNodeElem"),ih=t(()=>{ia.clear()},"clear"),ta=t((r)=>{let e=ia.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var E1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,d=n,{labelStyles:c,nodeStyles:f,borderStyles:p,backgroundStyles:x}=L(e),S=r.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);tr(S,e.colorIndex,s,u);let T=Jr(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await gn(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),E=v.getBBox();if(T){let et=v.children[0],U=b(v);E=et.getBoundingClientRect(),U.attr("width",E.width),U.attr("height",E.height)}let D=e.padding??0,P=e.width<=E.width+D?E.width+D:e.width;if(e.width<=E.width+D)e.diff=(P-e.width)/2-D;else e.diff=-D;let Z=e.height,Q=e.y-Z/2,tt=e.y+Z/2,it=e.x-P/2,ft=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Q+Z/3,dt=B?4:0,st=E.height+2*dt,N,K;if(B){let et=Math.max(st,E.height+2*dt),U=it+et,ut=Math.max(0,P-et);if(e.look==="handDrawn"){let Lt=y.svg(S),Ut=vt(e,{roughness:0.7,fill:h,stroke:d,seed:a}),Xt=vt(e,{roughness:0.7,fill:"none",stroke:d,seed:a}),Qt=Lt.rectangle(it,Q,et,Z,Ut);N=S.insert(()=>Qt,":first-child").attr("class","swimlane-title");let re=Lt.rectangle(U,Q,ut,Z,Xt);K=S.insert(()=>re,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",p.join(";")),N.select("path").attr("style",x.join(";").replace("fill","stroke"))}else N=S.insert("rect",":first-child"),K=S.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",f).attr("x",it).attr("y",Q).attr("width",et).attr("height",Z).attr("fill",h).attr("stroke",d),K.attr("class","swimlane-body").attr("style",f).attr("x",U).attr("y",Q).attr("width",ut).attr("height",Z).attr("fill","none").attr("stroke",d);let nt=it+et/2,_t=e.y;_.attr("transform",`translate(${nt}, ${_t}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let et=Math.max(0,ft-Q),U=Math.min(st,et),ut=Q+U,nt=Math.max(0,tt-ut),_t=e.x-P/2;if(e.look==="handDrawn"){let Xt=y.svg(S),Qt=vt(e,{roughness:0.7,fill:h,stroke:d,fillWeight:3,seed:a}),re=vt(e,{roughness:0.7,fill:"none",stroke:d,seed:a}),It=Xt.rectangle(_t,Q,P,U,Qt);N=S.insert(()=>It,":first-child").attr("class","swimlane-title");let Mt=Xt.rectangle(_t,ut,P,nt,re);K=S.insert(()=>Mt,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",p.join(";")),N.select("path").attr("style",x.join(";").replace("fill","stroke"))}else N=S.insert("rect",":first-child"),K=S.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",f).attr("x",_t).attr("y",Q).attr("width",P).attr("height",U).attr("fill",h).attr("stroke",d),K.attr("class","swimlane-body").attr("style",f).attr("x",_t).attr("y",ut).attr("width",P).attr("height",nt).attr("fill","none").attr("stroke",d);let Lt=e.x-E.width/2,Ut=Q+(U-E.height)/2;_.attr("transform",`translate(${Lt}, ${Ut})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),c){let et=_.select("span");if(et)et.attr("style",c)}return e.offsetX=0,e.width=P,e.height=Z,e.offsetY=E.height-D/2,e.intersect=function(et){return Je(e,et)},{cluster:S,labelBBox:E}},"swimlane"),Cy=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,{labelStyles:d,nodeStyles:c,borderStyles:f,backgroundStyles:p}=L(e),x=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);tr(x,e.colorIndex,s,u);let S=Yt(i),T=x.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await gn(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await ze(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(Yt(i)){let it=B.children[0],ft=b(B);_=it.getBoundingClientRect(),ft.attr("width",_.width),ft.attr("height",_.height)}let v=e.width<=_.width+e.padding?_.width+e.padding:e.width;if(e.width<=_.width+e.padding)e.diff=(v-e.width)/2-e.padding;else e.diff=-e.padding;let E=e.height,D=e.x-v/2,P=e.y-E/2;l.trace("Data ",e,JSON.stringify(e));let Z;if(e.look==="handDrawn"){let it=y.svg(x),ft=vt(e,{roughness:0.7,fill:h,stroke:n,fillWeight:3,seed:a}),dt=it.path(Ee(D,P,v,E,0),ft);Z=x.insert(()=>(l.debug("Rough node insert CXC",dt),dt),":first-child"),Z.select("path:nth-child(2)").attr("style",f.join(";")),Z.select("path").attr("style",p.join(";").replace("fill","stroke"))}else Z=x.insert("rect",":first-child"),Z.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",D).attr("y",P).attr("width",v).attr("height",E);let{subGraphTitleTopMargin:Q}=ka(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Q})`),d){let it=T.select("span");if(it)it.attr("style",d)}let tt=Z.node().getBBox();return e.offsetX=0,e.width=tt.width,e.height=tt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(it){return Je(e,it)},{cluster:x,labelBBox:_}},"rect"),$1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let h=s.node().getBBox();return e.width=h.width,e.height=h.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),I1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:h,borderColorArray:n,compositeBackground:u,compositeTitleBackground:d,nodeBorder:c}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);tr(f,e.colorIndex,s,n);let p=f.insert("g",":first-child"),x=f.insert("g").attr("class","cluster-label"),S=f.append("rect"),T=await ze(x,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(Yt(i)){let dt=T.children[0],st=b(T);B=dt.getBoundingClientRect(),st.attr("width",B.width),st.attr("height",B.height)}let _=0*e.padding,v=_/2,E=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(E-e.width)/2-e.padding;else e.diff=-e.padding;let D=e.height+_,P=e.height+_-B.height-6,Z=e.x-E/2,Q=e.y-D/2;e.width=E;let tt=e.y-e.height/2-v+B.height+2,it;if(e.look==="handDrawn"){let dt=e.cssClasses.includes("statediagram-cluster-alt"),st=y.svg(f),N=e.rx||e.ry?st.path(Ee(Z,Q,E,D,10),{roughness:0.7,fill:d,fillStyle:"solid",stroke:c,seed:a}):st.rectangle(Z,Q,E,D,{seed:a});it=f.insert(()=>N,":first-child");let K=st.rectangle(Z,tt,E,P,{fill:dt?h:u,fillStyle:dt?"hachure":"solid",stroke:c,seed:a});it=f.insert(()=>N,":first-child"),S=f.insert(()=>K),it.attr("class","outer"),S.attr("class","inner")}else{it=p.insert("rect",":first-child");let dt="outer";it.attr("class",dt).attr("x",Z).attr("y",Q).attr("width",E).attr("height",D).attr("data-look",e.look),S.attr("class","inner").attr("x",Z).attr("y",tt).attr("width",E).attr("height",P)}x.attr("transform",`translate(${e.x-B.width/2}, ${Q+1-(Yt(i)?0:3)})`);let ft=it.node().getBBox();return e.height=ft.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(dt){return Je(e,dt)},{cluster:f,labelBBox:B}},"roundedWithTitle"),O1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:h}=s,{labelStyles:n,nodeStyles:u,borderStyles:d,backgroundStyles:c}=L(e),f=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),p=Yt(i),x=f.insert("g").attr("class","cluster-label "),S=await gn(x,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),T=S.getBBox();if(Yt(i)){let Q=S.children[0],tt=b(S);T=Q.getBoundingClientRect(),tt.attr("width",T.width),tt.attr("height",T.height)}let B=e.width<=T.width+e.padding?T.width+e.padding:e.width;if(e.width<=T.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,E=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let D;if(e.look==="handDrawn"){let Q=y.svg(f),tt=vt(e,{roughness:0.7,fill:a,stroke:h,fillWeight:4,seed:o}),it=Q.path(Ee(v,E,B,_,e.rx),tt);D=f.insert(()=>(l.debug("Rough node insert CXC",it),it),":first-child"),D.select("path:nth-child(2)").attr("style",d.join(";")),D.select("path").attr("style",c.join(";").replace("fill","stroke"))}else D=f.insert("rect",":first-child"),D.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",E).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:P}=ka(i);if(x.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+P})`),n){let Q=x.select("span");if(Q)Q.attr("style",n)}let Z=D.node().getBBox();return e.offsetX=0,e.width=Z.width,e.height=Z.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Q){return Je(e,Q)},{cluster:f,labelBBox:T}},"kanbanSection"),D1=t((r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:h,nodeBorder:n,borderColorArray:u}=o,d=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);tr(d,e.colorIndex,s,u);let c=d.insert("g",":first-child"),f=0*e.padding,p=e.width+f;e.diff=-e.padding;let x=e.height+f,S=e.x-p/2,T=e.y-x/2;e.width=p;let B;if(e.look==="handDrawn"){let E=y.svg(d).rectangle(S,T,p,x,{fill:h??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=d.insert(()=>E,":first-child").attr("class","divider")}else{B=c.insert("rect",":first-child");let v="outer";if(e.look==="neo")v="divider";else v="divider";B.attr("class",v).attr("x",S).attr("y",T).attr("width",p).attr("height",x).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:d,labelBBox:{}}},"divider"),P1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=m(),{theme:o,themeVariables:a,handDrawnSeed:h}=s,{borderColorArray:n}=a,{labelStyles:u,borderStyles:d}=L(e),c=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);tr(c,e.colorIndex,o,n);let f=Yt(s),p=c.insert("g").attr("class","cluster-label"),x={width:0,height:0},S=e.label?.trim();if(S){let P;if(e.labelType==="markdown")P=await gn(p,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width});else P=await ze(p,e.label,e.labelStyle||"",!1,!0);if(x=P.getBBox(),f){let Z=P.children[0],Q=b(P);x=Z.getBoundingClientRect(),Q.attr("width",x.width),Q.attr("height",x.height)}}let T=e.width<=x.width+e.padding?x.width+e.padding:e.width;if(e.width<=x.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,v=e.y-B/2,E;if(e.look==="handDrawn"){let P=y.svg(c),Z=vt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:h,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Q=P.path(Ee(_,v,T,B,i.rx),Z);E=c.insert(()=>Q,":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";"))}else if(E=c.insert("rect",":first-child"),E.attr("rx",i.rx).attr("ry",i.rx).attr("x",_).attr("y",v).attr("width",T).attr("height",B).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)E.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:P}=ka(s);if(p.attr("transform",`translate(${e.x-x.width/2}, ${e.y-e.height/2+P})`),u){let Z=p.select("span");if(Z)Z.attr("style",u)}}let D=E.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=x.height-e.padding/2,e.intersect=function(P){return Je(e,P)},{cluster:c,labelBBox:x}},"createContainerGroup"),R1=t(async(r,e)=>{let{themeVariables:i}=m(),s=i.flowContainerStroke||i.secondaryBorderColor;return P1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),q1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),h=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,u=r.y-h/2;return{boundaryType:i,width:a,height:h,x:n,y:u,bodyY:u+o,bodyHeight:h-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),W1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,{labelStyles:d,nodeStyles:c}=L(e),{stylesMap:f}=Ve(e),p=e.boundaryType||"rect",x=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${p} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",p).attr("data-look",e.look);tr(x,e.colorIndex,s,u);let S=Yt(i),T=x.insert("g").attr("class","cluster-label system-boundary-title"),B=await gn(T,e.label,{style:d,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let N=B.children[0],K=b(B);_=N.getBoundingClientRect(),K.attr("width",_.width),K.attr("height",_.height)}let v=q1(e,_),{width:E,height:D,x:P,y:Z,bodyY:Q,bodyHeight:tt,tabHeight:it,tabWidth:ft}=v;e.diff=e.width<=_.width+e.padding?(E-e.width)/2-e.padding:-e.padding;let dt=vt(e,{fill:f.get("fill")||h,stroke:f.get("stroke")||n,strokeWidth:f.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let N=y.svg(x),K=N.rectangle(P,Q,E,tt,dt);if(x.insert(()=>K,":first-child").attr("class","boundary-body label-container"),p==="package"){let et=N.rectangle(P,Z,ft,it,dt);x.insert(()=>et,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(x.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",c).attr("x",P).attr("y",Q).attr("width",E).attr("height",tt),p==="package")x.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",c).attr("x",P).attr("y",Z).attr("width",ft).attr("height",it);let{subGraphTitleTopMargin:st}=ka(i);if(p==="package")T.attr("transform",`translate(${P+(ft-_.width)/2}, ${Z+(it-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${Z+st})`);if(d)T.attr("style",d),T.select("span").attr("style",d);return e.offsetX=0,e.width=E,e.height=D,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(N){return Je(e,N)},{cluster:x,labelBBox:_}},"usecaseSystemBoundary"),N1=Cy,z1={rect:Cy,squareRect:N1,roundedWithTitle:I1,noteGroup:$1,divider:D1,kanbanSection:O1,flowGroup:R1,usecaseSystemBoundary:W1,swimlane:E1},H1=new Set(["noteGroup","divider"]),$g=t((r)=>!H1.has(r??"rect"),"clusterPaintsTitle"),by=new Map,Bo=t(async(r,e)=>{let i=e.shape||"rect",s=await z1[i](r,e);return by.set(e.id,s),s},"insertCluster"),sh=t(()=>{by=new Map},"clear");var $o=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Jt={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},vm={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Do(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=ue(r),e=ue(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],h=o-i,n=a-s;return{angle:Math.atan(n/h),deltaX:h,deltaY:n}}t(Do,"calculateDeltaAndAngle");var ue=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),Y1=t((r)=>({x:t(function(e,i,s){let o=0,a=ue(s[0]).x<ue(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Jt,r.arrowTypeStart)){let{angle:x,deltaX:S}=Do(s[0],s[1]);o=Jt[r.arrowTypeStart]*Math.cos(x)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Jt,r.arrowTypeEnd)){let{angle:x,deltaX:S}=Do(s[s.length-1],s[s.length-2]);o=Jt[r.arrowTypeEnd]*Math.cos(x)*(S>=0?1:-1)}let h=Math.abs(ue(e).x-ue(s[s.length-1]).x),n=Math.abs(ue(e).y-ue(s[s.length-1]).y),u=Math.abs(ue(e).x-ue(s[0]).x),d=Math.abs(ue(e).y-ue(s[0]).y),c=Jt[r.arrowTypeStart],f=Jt[r.arrowTypeEnd],p=1;if(h<f&&h>0&&n<f){let x=f+p-h;x*=a==="right"?-1:1,o-=x}if(u<c&&u>0&&d<c){let x=c+p-u;x*=a==="right"?-1:1,o+=x}return ue(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=ue(s[0]).y<ue(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Jt,r.arrowTypeStart)){let{angle:x,deltaY:S}=Do(s[0],s[1]);o=Jt[r.arrowTypeStart]*Math.abs(Math.sin(x))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Jt,r.arrowTypeEnd)){let{angle:x,deltaY:S}=Do(s[s.length-1],s[s.length-2]);o=Jt[r.arrowTypeEnd]*Math.abs(Math.sin(x))*(S>=0?1:-1)}let h=Math.abs(ue(e).y-ue(s[s.length-1]).y),n=Math.abs(ue(e).x-ue(s[s.length-1]).x),u=Math.abs(ue(e).y-ue(s[0]).y),d=Math.abs(ue(e).x-ue(s[0]).x),c=Jt[r.arrowTypeStart],f=Jt[r.arrowTypeEnd],p=1;if(h<f&&h>0&&n<f){let x=f+p-h;x*=a==="up"?-1:1,o-=x}if(u<c&&u>0&&d<c){let x=c+p-u;x*=a==="up"?-1:1,o+=x}return ue(e).y+o},"y")}),"getLineFunctionsWithOffset"),j1=t((r,e,i,s,o,a=!1,h)=>{if(e.arrowTypeStart)ky(r,"start",e.arrowTypeStart,i,s,o,a,h);if(e.arrowTypeEnd)ky(r,"end",e.arrowTypeEnd,i,s,o,a,h)},"addEdgeMarkers"),U1={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},arrow_hierarchy:{type:"hierarchy",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}},X1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],ky=t((r,e,i,s,o,a,h=!1,n)=>{if(!i||i==="none")return;let u=U1[i],d=u&&X1.includes(u.type);if(!u){l.warn(`Unknown arrow type: ${i}`);return}let c=u.type,x=`${o}_${a}-${c}${e==="start"?"Start":"End"}${h&&d?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${x}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(x);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((E)=>{if(E.setAttribute("stroke",n),u.fill)E.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${x})`)},"addEdgeMarker"),G1=t((r)=>typeof r==="string"?r:m()?.flowchart?.curve,"resolveEdgeCurveType"),pl=new Map,Zt=new Map,lh=t(()=>{pl.clear(),Zt.clear()},"clear"),zg=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Oo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),wa=t(async(r,e)=>{let i=m(),s=Yt(i),{labelStyles:o}=L(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),h=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",u=void 0,d=await gn(r,e.label,{style:Oo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?u:void 0},i);h.node().appendChild(d),l.info("abc82",e,e.labelType);let c,f;if(s){let x=d.children[0],S=b(d);c=await cr.measure(()=>x.getBoundingClientRect()),f=c,S.attr("width",c.width),S.attr("height",c.height)}else{let x=b(d).select("text").node();await cr.measure(()=>{if(c=d.getBBox(),x&&typeof x.getBBox==="function")f=x.getBBox();else f=c})}h.attr("transform",$o(f,s)),pl.set(e.id,a),e.width=c.width,e.height=c.height;let p;if(e.startLabelLeft){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await ze(S,e.startLabelLeft,Oo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",$o(B,s)),!Zt.get(e.id))Zt.set(e.id,{});Zt.get(e.id).startLeft=x,Po(p,e.startLabelLeft)}if(e.startLabelRight){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await ze(S,e.startLabelRight,Oo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",$o(B,s)),!Zt.get(e.id))Zt.set(e.id,{});Zt.get(e.id).startRight=x,Po(p,e.startLabelRight)}if(e.endLabelLeft){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await ze(x,e.endLabelLeft,Oo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",$o(B,s)),!Zt.get(e.id))Zt.set(e.id,{});Zt.get(e.id).endLeft=x,Po(p,e.endLabelLeft)}if(e.endLabelRight){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await ze(x,e.endLabelRight,Oo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",$o(B,s)),!Zt.get(e.id))Zt.set(e.id,{});Zt.get(e.id).endRight=x,Po(p,e.endLabelRight)}return d},"insertEdgeLabel");function Po(r,e){if(Yt(m())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Po,"setTerminalWidth");var ml=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,pl.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=m(),{subGraphTitleTotalMargin:o}=ka(s);if(r.label){let a=pl.get(r.id),{x:h,y:n}=r;if(i){let u=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",h,",",n,") to (",u.x,",",u.y,") abc88"),e.updatedPath)h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n+o/2})`)}if(r.startLabelLeft){let a=Zt.get(r.id).startLeft,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.startLabelRight){let a=Zt.get(r.id).startRight,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.endLabelLeft){let a=Zt.get(r.id).endLeft,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.endLabelRight){let a=Zt.get(r.id).endRight,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}},"positionEdgeLabel"),V1=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),K1=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),h=r.width/2,n=r.height/2;return o>=h||a>=n},"outsideNode"),Z1=t((r,e,i)=>{l.debug(`intersection calc abc89:
291
+ outsidePoint: ${JSON.stringify(e)}
292
+ insidePoint : ${JSON.stringify(i)}
293
+ node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),h=r.width/2,n=i.x<e.x?h-a:h+a,u=r.height/2,d=Math.abs(e.y-i.y),c=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*h>Math.abs(s-e.x)*u){let f=i.y<e.y?e.y-u-o:o-u-e.y;n=c*f/d;let p={x:i.x<e.x?i.x+n:i.x-c+n,y:i.y<e.y?i.y+d-f:i.y-d+f};if(n===0)p.x=e.x,p.y=e.y;if(c===0)p.x=e.x;if(d===0)p.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${d}, q ${f}, R ${c}, r ${n}`,p),p}else{if(i.x<e.x)n=e.x-h-s;else n=s-h-e.x;let f=d*n/c,p=i.x<e.x?i.x+c-n:i.x-c+n,x=i.y<e.y?i.y+f:i.y-f;if(l.debug(`sides calc abc89, Q ${d}, q ${f}, R ${c}, r ${n}`,{_x:p,_y:x}),n===0)p=e.x,x=e.y;if(c===0)p=e.x;if(d===0)x=e.y;return{x:p,y:x}}},"intersection"),wy=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!K1(e,a)&&!o){let h=Z1(e,s,a);l.debug("abc88 inside",a,s,h),l.debug("abc88 intersection",h,e);let n=!1;if(i.forEach((u)=>{n=n||u.x===h.x&&u.y===h.y}),!i.some((u)=>u.x===h.x&&u.y===h.y))i.push(h);else l.warn("abc88 no intersect",h,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function Ty(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],h=r[s+1];if(o.x===a.x&&a.y===h.y&&Math.abs(a.x-h.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===h.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-h.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(Ty,"extractCornerPoints");var Sy=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),h=i/a;return{x:e.x-h*s,y:e.y-h*o}},"findAdjacentPoint"),Q1=t(function(r){let{cornerPointPositions:e}=Ty(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],h=r[s],n=Sy(o,h,5),u=Sy(a,h,5),d=u.x-n.x,c=u.y-n.y;i.push(n);let f=Math.sqrt(2)*2,p={x:h.x,y:h.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let x=5;if(h.x===n.x)p={x:d<0?n.x-x+f:n.x+x-f,y:c<0?n.y-f:n.y+f};else p={x:d<0?n.x-f:n.x+f,y:c<0?n.y-x+f:n.y+x-f}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(p,u)}else i.push(r[s]);return i},"fixCorners"),J1=t((r,e,i)=>{let s=r-e-i,o=2,a=2,h=4,n=Math.floor(s/4),u=Number.isFinite(n)?Math.max(0,n):0,d=Array(u).fill("2 2").join(" ");return`0 ${e} ${d} ${i}`},"generateDashArray"),Io=t(function(r,e,i,s,o,a,h,n=!1){if(!h)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u,layout:d}=m(),c=e.points,f=!1,p=o;var x=a;let S=[];for(let nt in e.cssCompiledStyles){if(md(nt))continue;S.push(e.cssCompiledStyles[nt])}if(d==="swimlane"){if(x.intersect&&p.intersect&&Array.isArray(c)&&c.length>=2)if(c.length===2)c=[p.intersect(c[0]),x.intersect(c[1])];else{let nt=c.slice(1,-1),_t=nt[0],Lt=nt[nt.length-1],Ut=0.5,Xt=Math.abs(c[c.length-1].x-Lt.x)<0.5&&Math.abs(c[c.length-1].y-Lt.y)<0.5,Qt=p.intersect(_t),re=Xt?Lt:x.intersect(Lt),It=Math.abs(re.x-Lt.x)<0.5&&Math.abs(re.y-Lt.y)<0.5,Wt=Math.abs(Qt.x-_t.x)<0.5&&Math.abs(Qt.y-_t.y)<0.5?[]:[Qt],Gt=It?[]:[re];c=[...Wt,...nt,...Gt]}c=V1(e,c)}else if(x.intersect&&p.intersect&&!n)c=c.slice(1,e.points.length-1),c.unshift(p.intersect(c[0])),c.push(x.intersect(c[c.length-1]));let T=btoa(JSON.stringify(c));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),c=wy(e.points,i.get(e.toCluster).node),f=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(c,null,2)),c=wy(c.reverse(),i.get(e.fromCluster).node).reverse(),f=!0;let B=c.filter((nt)=>!Number.isNaN(nt.y)),_=G1(e.curve);if(_!=="rounded")B=Q1(B);let v=va;switch(_){case"linear":v=va;break;case"basis":v=Fr;break;case"cardinal":v=lo;break;case"bumpX":v=so;break;case"bumpY":v=ao;break;case"catmullRom":v=co;break;case"monotoneX":v=uo;break;case"monotoneY":v=fo;break;case"natural":v=ai;break;case"step":v=ni;break;case"stepAfter":v=go;break;case"stepBefore":v=po;break;case"rounded":v=va;break;default:v=Fr}let{x:E,y:D}=Y1(e),P=ul().x(E).y(D).curve(v),Z;switch(e.thickness){case"normal":Z="edge-thickness-normal";break;case"thick":Z="edge-thickness-thick";break;case"invisible":Z="edge-thickness-invisible";break;default:Z="edge-thickness-normal"}switch(e.pattern){case"solid":Z+=" edge-pattern-solid";break;case"dotted":Z+=" edge-pattern-dotted";break;case"dashed":Z+=" edge-pattern-dashed";break;default:Z+=" edge-pattern-solid"}let Q,tt=_==="rounded"?By(_y(B,e),5):P(B),it=Array.isArray(e.style)?e.style:[e.style],ft=it.find((nt)=>nt?.startsWith("stroke:")),dt="";if(e.animate)dt="edge-animation-fast";if(e.animation)dt="edge-animation-"+e.animation;let st=!1;if(e.look==="handDrawn"){let nt=y.svg(r);Object.assign([],B);let _t=nt.path(tt,{roughness:0.3,seed:u});Z+=" transition",Q=b(_t).select("path").attr("id",`${h}-${e.id}`).attr("class"," "+Z+(e.classes?" "+e.classes:"")+(dt?" "+dt:"")).attr("style",it?it.reduce((Ut,Xt)=>Ut+";"+Xt,""):"");let Lt=Q.attr("d");Q.attr("d",Lt),r.node().appendChild(Q.node())}else{let nt=S.join(";"),_t=it?it.reduce((It,Mt)=>It+Mt+";",""):"",Lt=(nt?nt+";"+_t+";":_t)+";"+(it?it.reduce((It,Mt)=>It+";"+Mt,""):"");Q=r.append("path").attr("d",tt).attr("id",`${h}-${e.id}`).attr("class"," "+Z+(e.classes?" "+e.classes:"")+(dt?" "+dt:"")).attr("style",Lt),ft=Lt.match(/stroke:([^;]+)/)?.[1],st=e.animate===!0||!!e.animation||nt.includes("animation");let Ut=Q.node(),Xt=typeof Ut.getTotalLength==="function"?Ut.getTotalLength():0,Qt=vm[e.arrowTypeStart]||0,re=vm[e.arrowTypeEnd]||0;if(e.look==="neo"&&!st){let Mt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?J1(Xt,Qt,re):`0 ${Qt} ${Xt-Qt-re} ${re}`}; stroke-dashoffset: 0;`;Q.attr("style",Mt+Q.attr("style"))}}if(Q.attr("data-edge",!0),Q.attr("data-et","edge"),Q.attr("data-id",e.id),Q.attr("data-points",T),Q.attr("data-look",de(e.look)),e.showPoints)B.forEach((nt)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",nt.x).attr("cy",nt.y)});let N="";if(m().flowchart.arrowMarkerAbsolute||m().state.arrowMarkerAbsolute)N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let K=!st&&e?.look==="neo";j1(Q,e,N,h,s,K,ft);let et=Math.floor(c.length/2),U=c[et];if(!V.isLabelCoordinateInPath(U,Q.attr("d")))f=!0;let ut={};if(f)ut.updatedPath=c;return ut.originalPath=e.points,ut},"insertEdge");function By(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let h=r[a],n=r[a-1],u=r[a+1];if(a===0)i+=`M${h.x},${h.y}`;else if(a===s-1)i+=`L${h.x},${h.y}`;else{let d=h.x-n.x,c=h.y-n.y,f=u.x-h.x,p=u.y-h.y,x=Math.hypot(d,c),S=Math.hypot(f,p);if(x<o||S<o){i+=`L${h.x},${h.y}`;continue}let T=d/x,B=c/x,_=f/S,v=p/S,E=T*_+B*v,D=Math.max(-1,Math.min(1,E)),P=Math.acos(D);if(P<o||Math.abs(Math.PI-P)<o){i+=`L${h.x},${h.y}`;continue}let Z=Math.min(e/Math.sin(P/2),x/2,S/2),Q=h.x-T*Z,tt=h.y-B*Z,it=h.x+_*Z,ft=h.y+v*Z;i+=`L${Q},${tt}`,i+=`Q${h.x},${h.y} ${it},${ft}`}}return i}t(By,"generateRoundedPath");function _c(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(_c,"calculateDeltaAndAngle");function _y(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Jt[e.arrowTypeStart]){let o=Jt[e.arrowTypeStart],a=r[0],h=r[1],{angle:n}=_c(a,h),u=o*Math.cos(n),d=o*Math.sin(n);i[0].x=a.x+u,i[0].y=a.y+d}let s=r.length;if(s>=2&&Jt[e.arrowTypeEnd]){let o=Jt[e.arrowTypeEnd],a=r[s-1],h=r[s-2],{angle:n}=_c(h,a),u=o*Math.cos(n),d=o*Math.sin(n);i[s-1].x=a.x-u,i[s-1].y=a.y-d}return i}t(_y,"applyMarkerOffsetsToPoints");var t2=t((r,e,i,s)=>{e.forEach((o)=>{T2[o](r,i,s)})},"insertMarkers"),e2=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),i2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").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").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),o2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),s2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").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),r.append("defs").append("marker").attr("id",i+"_"+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),r.append("defs").append("marker").attr("id",i+"_"+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"),a2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),n2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),l2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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),r.append("marker").attr("id",i+"_"+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"),h2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),c2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),u2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),d2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),f2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),p2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),g2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),m2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:h}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",h??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let u=r.append("defs").append("marker").attr("id",i+"_"+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");u.append("circle").attr("fill",h??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),y2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),x2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:h}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",h??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let u=r.append("defs").append("marker").attr("id",i+"_"+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");u.append("circle").attr("fill",h??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),C2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
294
+ L20,10
295
+ M20,10
296
+ L0,20`)},"requirement_arrow"),b2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
297
+ L20,10
298
+ M20,10
299
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),k2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),w2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");h.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),h.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),h.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),h.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),S2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),T2={extension:e2,composition:r2,aggregation:i2,dependency:o2,lollipop:s2,point:a2,circle:n2,cross:l2,barb:h2,barbNeo:c2,hierarchy:S2,only_one:u2,zero_or_one:d2,one_or_more:f2,zero_or_more:p2,only_one_neo:g2,zero_or_one_neo:m2,one_or_more_neo:y2,zero_or_more_neo:x2,requirement_arrow:C2,requirement_contains:k2,requirement_arrow_neo:b2,requirement_contains_neo:w2},fl=t2;var B2={common:w,getConfig:C,insertCluster:Bo,insertEdge:Io,insertEdgeLabel:wa,insertMarkers:fl,insertNode:xa,interpolateToCurve:Is,labelHelper:X,log:l,positionEdgeLabel:ml},_2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Ro=Object.create(null),Ug=t((r)=>{for(let e of r)Ro[e.name]=e},"registerLayoutLoaders"),v2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-d9d23jch.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},..._2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),L2=t(()=>{Ug([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-nxmj6bkg.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-zhxm05ak.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-0zg7crdw.js"),"loader")},...v2()])},"registerDefaultLayoutLoaders");L2();var Pt=t(async(r,e)=>{if(!Object.hasOwn(Ro,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let a=o.domId||o.id;o.domId=`${r.diagramId}-${a}`}let i=Ro[r.layoutAlgorithm],s=await i.loader();return Yp(e,r.config),s.render(r,e,B2,{algorithm:i.algorithm})},"render"),Lc="dagre",Ot=t((r="",{fallback:e=Lc}={})=>{if(Object.hasOwn(Ro,r))return r;for(let i of[e,Lc])if(Object.hasOwn(Ro,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${Lc} is registered.`)},"getRegisteredLayoutAlgorithm");var Un=t(()=>`
300
+ /* Font Awesome icon styling - consolidated */
301
+ .label-icon {
302
+ display: inline-block;
303
+ height: 1em;
304
+ overflow: visible;
305
+ vertical-align: -0.125em;
306
+ }
307
+
308
+ .node .label-icon path {
309
+ fill: currentColor;
310
+ stroke: revert;
311
+ stroke-width: revert;
312
+ }
313
+ `,"getIconStyles");var $t=t((r,e)=>{let i;if(e==="sandbox")i=b("#i"+r);return(e==="sandbox"?b(i.nodes()[0].contentDocument.body):b("body")).select(`[id="${r}"]`)},"getDiagramElement");var yt=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:h,y:n}=F2(r,e);te(r,a,o,s);let u=M2(h,n,o,a,e);r.attr("viewBox",u),l.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),F2=t((r,e)=>{let i=r.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),M2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
314
+ export{t,xo,jp,l,cd,ht,ba,Te,cc,g,A,_g,Sg,Ki,uc,Hp,VA,at,Vt,wo,Y,Tg,oi,Jr,qp,YA,JA,ZA,Dg,Ng,C,XA,ud,eh,Yt,ll,ee,Qg,Co,Dt,dc,pc,w,te,Zr,Wp,th,Kp,F,O,G,z,j,q,H,m,ya,Vi,mc,dd,Vp,b,Yi,fc,Ji,Ja,Rg,$n,gc,nh,ii,cl,Rn,Ac,Eo,Zn,Ct,hc,Xr,pd,va,ul,ge,pr,mr,Yp,md,L,Lg,Zi,fr,dl,Xi,si,Jp,bc,yc,vc,kc,Zp,Xp,em,tm,nm,rm,am,om,im,sm,lm,cm,um,dm,pm,mm,fm,li,xc,fd,gm,Mg,rh,Am,Fg,Pg,es,gd,Xn,Ad,hm,zn,ie,V,ah,Za,Ln,bm,ym,Og,gn,hd,bt,lt,ct,ea,er,tr,y,X,W,R,bd,wc,ka,xa,oh,ih,ta,$g,Bo,sh,Jt,vm,pl,Zt,lh,zg,wa,ml,Io,fl,Ug,Pt,Ot,Un,$t,yt};