@bkm016/basalt 0.1.8 → 0.1.9

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 (252) hide show
  1. package/{chunk-0039s4jt.js → chunk-02d3x4mj.js} +3 -3
  2. package/{chunk-ky55taar.js → chunk-0xd9mnc2.js} +327 -316
  3. package/{chunk-ckjw3b61.js → chunk-13gvs0ax.js} +2 -2
  4. package/{chunk-0d51ggzj.js → chunk-1n7dat03.js} +4 -4
  5. package/{chunk-ppxv5q7y.js → chunk-1zj3zvw5.js} +3 -3
  6. package/{chunk-2ek3wq4b.js → chunk-29qrxygd.js} +1 -1
  7. package/{chunk-7p6e2f5s.js → chunk-30rjf7my.js} +3 -3
  8. package/{chunk-v2srrqcv.js → chunk-38g3gctw.js} +2 -2
  9. package/{chunk-3j2kkgsc.js → chunk-4dw43syb.js} +1 -1
  10. package/{chunk-t66jqz12.js → chunk-4gtgqcct.js} +2 -2
  11. package/chunk-66h5qpc6.js +479 -0
  12. package/{chunk-qmdpgbg3.js → chunk-755sy11p.js} +1 -1
  13. package/{chunk-n015c8nx.js → chunk-7zkswxvk.js} +1 -1
  14. package/{chunk-91r5nvth.js → chunk-82v8jh1h.js} +2 -2
  15. package/{chunk-12trygzx.js → chunk-95964592.js} +16 -16
  16. package/{chunk-nmtk9xra.js → chunk-9as0p561.js} +2 -2
  17. package/{chunk-pn413hjw.js → chunk-a1352w87.js} +1 -1
  18. package/{chunk-rnt1ckk9.js → chunk-a1rb1a48.js} +5 -5
  19. package/{chunk-fzcmzbsq.js → chunk-a98wma9j.js} +1 -1
  20. package/{chunk-kgkrccr1.js → chunk-asyr3gnq.js} +2 -2
  21. package/{chunk-5gxj9560.js → chunk-ax04trym.js} +1 -1
  22. package/chunk-b2bxqeb4.js +2 -0
  23. package/{chunk-xjw78yey.js → chunk-bdjr0kfr.js} +4 -4
  24. package/{chunk-7kjr9gdx.js → chunk-bk4rpnm8.js} +2 -2
  25. package/{chunk-47vf66t6.js → chunk-c0zfefq8.js} +1 -1
  26. package/{chunk-kpvaqb7c.js → chunk-c6q04xrd.js} +2 -2
  27. package/chunk-c71173py.js +25 -0
  28. package/{chunk-adys4qq4.js → chunk-cmwdjes8.js} +5 -5
  29. package/{chunk-dcwdmpw2.js → chunk-d0a1jxk5.js} +1 -1
  30. package/{chunk-2nrkqq45.js → chunk-d5j74pcp.js} +7 -7
  31. package/{chunk-pkpj7s2k.js → chunk-dfh9m9n7.js} +1 -1
  32. package/{chunk-26cz8et8.js → chunk-dq01v5eq.js} +1 -1
  33. package/{chunk-fpxc6qjr.js → chunk-e1x629v0.js} +2 -2
  34. package/{chunk-86xhmz7k.js → chunk-en218k4y.js} +1 -1
  35. package/{chunk-3hg7yn1t.js → chunk-fgwda4m0.js} +1 -1
  36. package/chunk-gbjn6d81.js +2 -0
  37. package/{chunk-x496kg3v.js → chunk-gkf5jwvj.js} +1 -1
  38. package/{chunk-k3q5jqjj.js → chunk-hb4f2v34.js} +2 -2
  39. package/{chunk-mr807v9n.js → chunk-hbnmymaq.js} +1 -1
  40. package/{chunk-818nd6s1.js → chunk-jj4hqbrx.js} +2 -2
  41. package/{chunk-jyv9cae6.js → chunk-jn5pqy5v.js} +1 -1
  42. package/{chunk-yyy2yp6f.js → chunk-jtsve11b.js} +9 -9
  43. package/chunk-m1eam0s5.js +2 -0
  44. package/{chunk-6vnjg5x9.js → chunk-mbpb5c7w.js} +1 -1
  45. package/{chunk-t40fag3z.js → chunk-msm9hmk9.js} +1 -1
  46. package/{chunk-j781n7ca.js → chunk-n0ybj4h9.js} +2 -2
  47. package/{chunk-jp5afrwm.js → chunk-n2jcx65v.js} +2 -2
  48. package/{chunk-2ks2tnac.js → chunk-nrsd810j.js} +2 -2
  49. package/chunk-pnspvnyd.js +2 -0
  50. package/chunk-pz2afna8.js +2 -0
  51. package/{chunk-d37gemt2.js → chunk-q9f4xb0w.js} +3 -3
  52. package/{chunk-hd3x1w46.js → chunk-qaeyhe65.js} +1 -1
  53. package/chunk-qnkrrwmg.js +2 -0
  54. package/{chunk-e6c2mzxc.js → chunk-r4ttdkrz.js} +2 -2
  55. package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
  56. package/{chunk-g3ed130w.js → chunk-tevejprz.js} +4 -4
  57. package/{chunk-k3rmjrf1.js → chunk-v3ee9z3f.js} +1 -1
  58. package/{chunk-4n49ptbz.js → chunk-vtqr7dm8.js} +2 -2
  59. package/{chunk-z3ch1wg6.js → chunk-xh444pfn.js} +14 -14
  60. package/{chunk-pehyqj8k.js → chunk-zc9ar0r4.js} +1 -1
  61. package/{chunk-ef9yhnk3.js → chunk-zyyzk5ha.js} +1 -1
  62. package/compiled.js +9 -9
  63. package/package.json +1 -1
  64. package/ui-test-worker.js +8 -8
  65. package/web/chunk-08sq3cwm.js +1 -0
  66. package/web/chunk-0pghpg4y.js +2 -0
  67. package/web/chunk-12qf1r6m.js +1 -0
  68. package/web/chunk-24fjnnee.js +1 -0
  69. package/web/chunk-24jhbz82.js +24 -0
  70. package/web/{chunk-v14s4vgc.js → chunk-2dvbeqt0.js} +1 -1
  71. package/web/chunk-2hrswh3d.js +2 -0
  72. package/web/chunk-2j2atyjw.js +1 -0
  73. package/web/{chunk-s7e93552.js → chunk-2x4g9t37.js} +4 -4
  74. package/web/{chunk-hstbgb83.js → chunk-3ak5dg10.js} +5 -5
  75. package/web/chunk-3ecrkvr3.js +106 -0
  76. package/web/chunk-3h3g3ca3.js +1 -0
  77. package/web/chunk-3hr3ew9w.js +1 -0
  78. package/web/chunk-3pcrxg6m.js +1 -0
  79. package/web/{chunk-7a4xk6j9.js → chunk-3pd0qt83.js} +5 -5
  80. package/web/chunk-3txxt0a7.js +1 -0
  81. package/web/chunk-43g4wd7a.js +1 -0
  82. package/web/{chunk-nky3bqfg.js → chunk-4a6gdrbs.js} +1 -1
  83. package/web/{chunk-d0m0h0eb.js → chunk-5a4mj3qz.js} +1 -1
  84. package/web/{chunk-rkjkynm3.js → chunk-5baeh8q7.js} +11 -11
  85. package/web/{chunk-qq2v8h6d.js → chunk-5dr4tkem.js} +4 -4
  86. package/web/chunk-5jdrev9p.js +36 -0
  87. package/web/{chunk-p0cjvjdx.js → chunk-5v2c0aqk.js} +1 -1
  88. package/web/chunk-5z2n4z9x.css +1 -0
  89. package/web/{chunk-6e38yf3a.js → chunk-601k823s.js} +4 -4
  90. package/web/{chunk-8dp7h6w8.js → chunk-60axh4sa.js} +16 -16
  91. package/web/chunk-66wb0p6e.js +62 -0
  92. package/web/{chunk-qcge7d6s.js → chunk-6e87m0nm.js} +2 -2
  93. package/web/chunk-6y55gk1n.js +1 -0
  94. package/web/{chunk-8wg44w91.js → chunk-79e08rk1.js} +2 -2
  95. package/web/{chunk-svh2gkx8.js → chunk-7qkav30b.js} +1 -1
  96. package/web/chunk-814kkkmq.js +8 -0
  97. package/web/chunk-8jcvdd5d.js +2 -0
  98. package/web/{chunk-rbdvc8x7.js → chunk-8w7fyb3v.js} +1 -1
  99. package/web/chunk-8w8atrdh.js +1 -0
  100. package/web/{chunk-sda7cyrt.js → chunk-8z0r0wtk.js} +21 -21
  101. package/web/chunk-935mjq1c.js +39 -0
  102. package/web/chunk-942g3eqn.js +1 -0
  103. package/web/{chunk-1gx0zpmp.js → chunk-98y92vmh.js} +9 -9
  104. package/web/chunk-9ctg0f30.js +3 -0
  105. package/web/chunk-9fnr00kv.js +4 -0
  106. package/web/{chunk-fe31sv6t.js → chunk-9yfftz38.js} +1 -1
  107. package/web/chunk-a0ryzdnp.js +7 -0
  108. package/web/chunk-a61zrp66.js +1 -0
  109. package/web/{chunk-dtg5yhhs.js → chunk-af9evdza.js} +1 -1
  110. package/web/chunk-arnzrqnm.js +1 -0
  111. package/web/chunk-avxk6jpc.js +2 -0
  112. package/web/{chunk-c01176kn.js → chunk-awkdw9rw.js} +2 -2
  113. package/web/{chunk-tkp72r9b.js → chunk-b5h52neg.js} +1 -1
  114. package/web/chunk-bwy3e58v.js +1 -0
  115. package/web/{chunk-ja7w629n.js → chunk-c57f714b.js} +2 -2
  116. package/web/chunk-c6yacwbc.js +30 -0
  117. package/web/{chunk-823b7866.js → chunk-ctzkqx2g.js} +18 -18
  118. package/web/{chunk-w37n09px.js → chunk-db3twjvk.js} +10 -10
  119. package/web/{chunk-hbkasy6c.js → chunk-ddyyc20r.js} +22 -22
  120. package/web/{chunk-z0zrp8n8.js → chunk-dnv8dx72.js} +1 -1
  121. package/web/{chunk-jzte2phh.js → chunk-dwjmr0zj.js} +1 -1
  122. package/web/chunk-dz7g1gnv.js +2 -0
  123. package/web/{chunk-cez1k71m.js → chunk-eadfxfkw.js} +1 -1
  124. package/web/{chunk-d9wdsjkk.js → chunk-eqndhs21.js} +2 -2
  125. package/web/{chunk-cyjnert7.js → chunk-ewx42c11.js} +16 -16
  126. package/web/chunk-f7jpakwh.js +1 -0
  127. package/web/{chunk-r4ffr96e.js → chunk-ff1pmd3g.js} +1 -1
  128. package/web/chunk-fjb3ksfd.js +78 -0
  129. package/web/chunk-fpb2dd2d.js +2 -0
  130. package/web/{chunk-fv6vm14n.js → chunk-frnh4zqf.js} +2 -2
  131. package/web/{chunk-0j9a7811.js → chunk-gn8kyz76.js} +6 -6
  132. package/web/chunk-gv99c8zv.js +1 -0
  133. package/web/chunk-h0767tjv.js +1 -0
  134. package/web/chunk-hqynf99g.js +1 -0
  135. package/web/{chunk-jam45rqg.js → chunk-jccz14ye.js} +2 -2
  136. package/web/{chunk-33w36n91.js → chunk-kcjz03h5.js} +2 -2
  137. package/web/chunk-ket6g0yd.js +1 -0
  138. package/web/chunk-m9q5nr8f.js +1 -0
  139. package/web/chunk-mdfksj61.js +1 -0
  140. package/web/chunk-me7dza1c.js +1 -0
  141. package/web/{chunk-8773nwdc.js → chunk-myd6sc76.js} +1 -1
  142. package/web/{chunk-sf101c23.js → chunk-mykrm8ba.js} +2 -2
  143. package/web/chunk-mzzaet63.js +1 -0
  144. package/web/chunk-n0wazxgz.js +1 -0
  145. package/web/{chunk-1s8zg6fb.js → chunk-nnyc889n.js} +5 -5
  146. package/web/{chunk-xabcx3ry.js → chunk-nvpp0ghj.js} +3 -3
  147. package/web/chunk-nvt9tkt4.js +1139 -0
  148. package/web/{chunk-dgwkqcz6.js → chunk-p9hfcamx.js} +2 -2
  149. package/web/chunk-ph1dgffm.js +1 -0
  150. package/web/chunk-q34as3v6.js +1 -0
  151. package/web/{chunk-sd3cdqcm.js → chunk-qh62nkem.js} +2 -2
  152. package/web/{chunk-j1bw5v1g.js → chunk-qq6m2my8.js} +2 -2
  153. package/web/{chunk-f93pe4kb.js → chunk-qsqtwf34.js} +4 -4
  154. package/web/{chunk-85gdsmt4.js → chunk-qz6r9v1z.js} +1 -1
  155. package/web/chunk-rad2s9ha.js +1 -0
  156. package/web/{chunk-8nv7q5ac.js → chunk-rasjtvsb.js} +15 -15
  157. package/web/{chunk-s38s9ff9.js → chunk-rayf24gy.js} +28 -28
  158. package/web/{chunk-cn0tmwjs.js → chunk-rrpn5r5w.js} +2 -2
  159. package/web/{chunk-m5y2d4zv.js → chunk-s37beysw.js} +1 -1
  160. package/web/chunk-s60s09mb.js +1 -0
  161. package/web/chunk-sk1wkgjw.js +4 -0
  162. package/web/{chunk-xqyazzm7.js → chunk-spbs56wz.js} +5 -5
  163. package/web/{chunk-h5cfg3vv.js → chunk-t893141g.js} +2 -2
  164. package/web/chunk-tftc5v89.js +24 -0
  165. package/web/chunk-tfvcs2xx.js +1 -0
  166. package/web/{chunk-q1xxs319.js → chunk-ts6jsfdk.js} +4 -4
  167. package/web/{chunk-xsz1dfm2.js → chunk-v1exk5wd.js} +20 -20
  168. package/web/{chunk-3q0v8w45.js → chunk-veam6vk4.js} +79 -79
  169. package/web/{chunk-xb9m0092.js → chunk-vqmj6peg.js} +1 -1
  170. package/web/{chunk-cn1xpg3q.js → chunk-vsjpnwsr.js} +2 -2
  171. package/web/{chunk-et8q775x.js → chunk-w3w18stt.js} +5 -5
  172. package/web/chunk-wdq2tp9e.js +1 -0
  173. package/web/chunk-wkf5xfyr.js +1 -0
  174. package/web/{chunk-fx4mackk.js → chunk-wzd2a4k5.js} +4 -4
  175. package/web/{chunk-jjjtv2r1.js → chunk-xa43ndfj.js} +2 -2
  176. package/web/chunk-xh4xn1az.js +1 -0
  177. package/web/{chunk-2axwda8c.js → chunk-xx11yv61.js} +7 -7
  178. package/web/chunk-xzwxcxb4.js +1 -0
  179. package/web/chunk-y1qty77a.js +1 -0
  180. package/web/{chunk-4anjs6yp.js → chunk-y2rzeb4v.js} +2 -2
  181. package/web/chunk-ys2tns0p.js +1 -0
  182. package/web/chunk-z05x9cbm.js +1 -0
  183. package/web/{chunk-mf6xng5b.js → chunk-zb2bkr7f.js} +2 -2
  184. package/web/{chunk-wj3ymejj.js → chunk-zdyys4ar.js} +3 -3
  185. package/web/chunk-zgavhnt8.js +1 -0
  186. package/web/index.html +1 -1
  187. package/worker.js +1 -1
  188. package/chunk-2gcp3xdc.js +0 -2
  189. package/chunk-320174qe.js +0 -2
  190. package/chunk-dvb5nd2x.js +0 -2
  191. package/chunk-frt9k18g.js +0 -480
  192. package/chunk-ndt6rjt9.js +0 -2
  193. package/chunk-xy2bxwq8.js +0 -2
  194. package/chunk-yzevjkms.js +0 -25
  195. package/chunk-zdyd8hbn.js +0 -2
  196. package/web/chunk-0jfda4jw.js +0 -2
  197. package/web/chunk-2p3fkhy8.js +0 -1
  198. package/web/chunk-3sz5qcwj.js +0 -1
  199. package/web/chunk-433c80pc.js +0 -1
  200. package/web/chunk-48cnmhvd.js +0 -106
  201. package/web/chunk-5r37rwq1.js +0 -4
  202. package/web/chunk-6bwgdvf6.js +0 -1
  203. package/web/chunk-7f1t7z72.js +0 -2
  204. package/web/chunk-7x35g67d.js +0 -78
  205. package/web/chunk-8pzg8qw4.js +0 -1
  206. package/web/chunk-8r0s8tx7.js +0 -1
  207. package/web/chunk-9p5dfvav.js +0 -1
  208. package/web/chunk-9q9w9pay.js +0 -1
  209. package/web/chunk-a3teqvz2.js +0 -39
  210. package/web/chunk-ahztazsg.js +0 -1
  211. package/web/chunk-bd8ftfxn.js +0 -3
  212. package/web/chunk-c03bt2pz.js +0 -1
  213. package/web/chunk-c1ha2xg6.js +0 -8
  214. package/web/chunk-cgng31df.js +0 -1
  215. package/web/chunk-cvd4f51j.js +0 -1
  216. package/web/chunk-cybvxssy.js +0 -1
  217. package/web/chunk-d22wq71s.js +0 -1
  218. package/web/chunk-dynajx8x.js +0 -2
  219. package/web/chunk-f3vv7n52.js +0 -1
  220. package/web/chunk-fpa81dv7.js +0 -62
  221. package/web/chunk-g17n6asp.js +0 -1
  222. package/web/chunk-g9dzaw9e.js +0 -30
  223. package/web/chunk-gcwhx3av.js +0 -1139
  224. package/web/chunk-gf8vm6b5.js +0 -1
  225. package/web/chunk-gnmeyy4h.js +0 -1
  226. package/web/chunk-hn7mhsbg.js +0 -1
  227. package/web/chunk-jfvxxp5c.js +0 -1
  228. package/web/chunk-k8h8zx6r.js +0 -24
  229. package/web/chunk-m3ajw575.js +0 -1
  230. package/web/chunk-mz9b5bsa.js +0 -1
  231. package/web/chunk-np33kmn4.js +0 -1
  232. package/web/chunk-nvk8mazs.js +0 -1
  233. package/web/chunk-nyw5ewgv.js +0 -1
  234. package/web/chunk-p56dcqpr.js +0 -1
  235. package/web/chunk-pdn4r8x4.js +0 -1
  236. package/web/chunk-qpt34d8d.js +0 -1
  237. package/web/chunk-qskt3tqa.js +0 -1
  238. package/web/chunk-qt3n897m.js +0 -4
  239. package/web/chunk-r1rt48h9.js +0 -1
  240. package/web/chunk-r7tgd2fm.js +0 -7
  241. package/web/chunk-rznszqmy.js +0 -1
  242. package/web/chunk-s1pefd34.js +0 -1
  243. package/web/chunk-sc29azev.js +0 -1
  244. package/web/chunk-t4jc4nac.js +0 -1
  245. package/web/chunk-t7g366a5.js +0 -24
  246. package/web/chunk-thbqwq6b.js +0 -1
  247. package/web/chunk-v94v68xg.js +0 -36
  248. package/web/chunk-wcphswcx.js +0 -2
  249. package/web/chunk-wwcnvyjh.css +0 -1
  250. package/web/chunk-xce8n339.js +0 -1
  251. package/web/chunk-xfd3b01q.js +0 -1
  252. package/web/chunk-xtss82z2.js +0 -1
@@ -1,10 +1,10 @@
1
- import{Se,Te,_}from"./chunk-gcwhx3av.js";var Ca=Te(function(Sh,Th){(function(r,e){typeof Sh=="object"&&typeof Th<"u"?Th.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(Sh,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",n="minute",c="hour",h="day",g="week",y="month",f="quarter",b="year",F="date",N="Invalid Date",W=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,H=/\[([^\]]+)]|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,Y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(kt){var st=["th","st","nd","rd"],at=kt%100;return"["+kt+(st[(at-20)%10]||st[at]||st[0])+"]"}},j=function(kt,st,at){var xt=String(kt);return!xt||xt.length>=st?kt:""+Array(st+1-xt.length).join(at)+kt},K={s:j,z:function(kt){var st=-kt.utcOffset(),at=Math.abs(st),xt=Math.floor(at/60),ot=at%60;return(st<=0?"+":"-")+j(xt,2,"0")+":"+j(ot,2,"0")},m:function kt(st,at){if(st.date()<at.date())return-kt(at,st);var xt=12*(at.year()-st.year())+(at.month()-st.month()),ot=st.clone().add(xt,y),St=at-ot<0,Lt=st.clone().add(xt+(St?-1:1),y);return+(-(xt+(at-ot)/(St?ot-Lt:Lt-ot))||0)},a:function(kt){return kt<0?Math.ceil(kt)||0:Math.floor(kt)},p:function(kt){return{M:y,y:b,w:g,d:h,D:F,h:c,m:n,s:o,ms:s,Q:f}[kt]||String(kt||"").toLowerCase().replace(/s$/,"")},u:function(kt){return kt===void 0}},Q="en",rt={};rt[Q]=Y;var it="$isDayjsObject",ct=function(kt){return kt instanceof vt||!(!kt||!kt[it])},lt=function kt(st,at,xt){var ot;if(!st)return Q;if(typeof st=="string"){var St=st.toLowerCase();rt[St]&&(ot=St),at&&(rt[St]=at,ot=St);var Lt=st.split("-");if(!ot&&Lt.length>1)return kt(Lt[0])}else{var Yt=st.name;rt[Yt]=st,ot=Yt}return!xt&&ot&&(Q=ot),ot||!xt&&Q},pt=function(kt,st){if(ct(kt))return kt.clone();var at=typeof st=="object"?st:{};return at.date=kt,at.args=arguments,new vt(at)},bt=K;bt.l=lt,bt.i=ct,bt.w=function(kt,st){return pt(kt,{locale:st.$L,utc:st.$u,x:st.$x,$offset:st.$offset})};var vt=function(){function kt(at){this.$L=lt(at.locale,null,!0),this.parse(at),this.$x=this.$x||at.x||{},this[it]=!0}var st=kt.prototype;return st.parse=function(at){this.$d=function(xt){var{date:ot,utc:St}=xt;if(ot===null)return new Date(NaN);if(bt.u(ot))return new Date;if(ot instanceof Date)return new Date(ot);if(typeof ot=="string"&&!/Z$/i.test(ot)){var Lt=ot.match(W);if(Lt){var Yt=Lt[2]-1||0,Ht=(Lt[7]||"0").substring(0,3);return St?new Date(Date.UTC(Lt[1],Yt,Lt[3]||1,Lt[4]||0,Lt[5]||0,Lt[6]||0,Ht)):new Date(Lt[1],Yt,Lt[3]||1,Lt[4]||0,Lt[5]||0,Lt[6]||0,Ht)}}return new Date(ot)}(at),this.init()},st.init=function(){var at=this.$d;this.$y=at.getFullYear(),this.$M=at.getMonth(),this.$D=at.getDate(),this.$W=at.getDay(),this.$H=at.getHours(),this.$m=at.getMinutes(),this.$s=at.getSeconds(),this.$ms=at.getMilliseconds()},st.$utils=function(){return bt},st.isValid=function(){return this.$d.toString()!==N},st.isSame=function(at,xt){var ot=pt(at);return this.startOf(xt)<=ot&&ot<=this.endOf(xt)},st.isAfter=function(at,xt){return pt(at)<this.startOf(xt)},st.isBefore=function(at,xt){return this.endOf(xt)<pt(at)},st.$g=function(at,xt,ot){return bt.u(at)?this[xt]:this.set(ot,at)},st.unix=function(){return Math.floor(this.valueOf()/1000)},st.valueOf=function(){return this.$d.getTime()},st.startOf=function(at,xt){var ot=this,St=!!bt.u(xt)||xt,Lt=bt.p(at),Yt=function(ee,ce){var ue=bt.w(ot.$u?Date.UTC(ot.$y,ce,ee):new Date(ot.$y,ce,ee),ot);return St?ue:ue.endOf(h)},Ht=function(ee,ce){return bt.w(ot.toDate()[ee].apply(ot.toDate("s"),(St?[0,0,0,0]:[23,59,59,999]).slice(ce)),ot)},ne=this.$W,ie=this.$M,be=this.$D,_e="set"+(this.$u?"UTC":"");switch(Lt){case b:return St?Yt(1,0):Yt(31,11);case y:return St?Yt(1,ie):Yt(0,ie+1);case g:var ge=this.$locale().weekStart||0,Wt=(ne<ge?ne+7:ne)-ge;return Yt(St?be-Wt:be+(6-Wt),ie);case h:case F:return Ht(_e+"Hours",0);case c:return Ht(_e+"Minutes",1);case n:return Ht(_e+"Seconds",2);case o:return Ht(_e+"Milliseconds",3);default:return this.clone()}},st.endOf=function(at){return this.startOf(at,!1)},st.$set=function(at,xt){var ot,St=bt.p(at),Lt="set"+(this.$u?"UTC":""),Yt=(ot={},ot[h]=Lt+"Date",ot[F]=Lt+"Date",ot[y]=Lt+"Month",ot[b]=Lt+"FullYear",ot[c]=Lt+"Hours",ot[n]=Lt+"Minutes",ot[o]=Lt+"Seconds",ot[s]=Lt+"Milliseconds",ot)[St],Ht=St===h?this.$D+(xt-this.$W):xt;if(St===y||St===b){var ne=this.clone().set(F,1);ne.$d[Yt](Ht),ne.init(),this.$d=ne.set(F,Math.min(this.$D,ne.daysInMonth())).$d}else Yt&&this.$d[Yt](Ht);return this.init(),this},st.set=function(at,xt){return this.clone().$set(at,xt)},st.get=function(at){return this[bt.p(at)]()},st.add=function(at,xt){var ot,St=this;at=Number(at);var Lt=bt.p(xt),Yt=function(ie){var be=pt(St);return bt.w(be.date(be.date()+Math.round(ie*at)),St)};if(Lt===y)return this.set(y,this.$M+at);if(Lt===b)return this.set(b,this.$y+at);if(Lt===h)return Yt(1);if(Lt===g)return Yt(7);var Ht=(ot={},ot[n]=e,ot[c]=i,ot[o]=r,ot)[Lt]||1,ne=this.$d.getTime()+at*Ht;return bt.w(ne,this)},st.subtract=function(at,xt){return this.add(-1*at,xt)},st.format=function(at){var xt=this,ot=this.$locale();if(!this.isValid())return ot.invalidDate||N;var St=at||"YYYY-MM-DDTHH:mm:ssZ",Lt=bt.z(this),Yt=this.$H,Ht=this.$m,ne=this.$M,{weekdays:ie,months:be,meridiem:_e}=ot,ge=function(ce,ue,Xe,Ge){return ce&&(ce[ue]||ce(xt,St))||Xe[ue].slice(0,Ge)},Wt=function(ce){return bt.s(Yt%12||12,ce,"0")},ee=_e||function(ce,ue,Xe){var Ge=ce<12?"AM":"PM";return Xe?Ge.toLowerCase():Ge};return St.replace(H,function(ce,ue){return ue||function(Xe){switch(Xe){case"YY":return String(xt.$y).slice(-2);case"YYYY":return bt.s(xt.$y,4,"0");case"M":return ne+1;case"MM":return bt.s(ne+1,2,"0");case"MMM":return ge(ot.monthsShort,ne,be,3);case"MMMM":return ge(be,ne);case"D":return xt.$D;case"DD":return bt.s(xt.$D,2,"0");case"d":return String(xt.$W);case"dd":return ge(ot.weekdaysMin,xt.$W,ie,2);case"ddd":return ge(ot.weekdaysShort,xt.$W,ie,3);case"dddd":return ie[xt.$W];case"H":return String(Yt);case"HH":return bt.s(Yt,2,"0");case"h":return Wt(1);case"hh":return Wt(2);case"a":return ee(Yt,Ht,!0);case"A":return ee(Yt,Ht,!1);case"m":return String(Ht);case"mm":return bt.s(Ht,2,"0");case"s":return String(xt.$s);case"ss":return bt.s(xt.$s,2,"0");case"SSS":return bt.s(xt.$ms,3,"0");case"Z":return Lt}return null}(ce)||Lt.replace(":","")})},st.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},st.diff=function(at,xt,ot){var St,Lt=this,Yt=bt.p(xt),Ht=pt(at),ne=(Ht.utcOffset()-this.utcOffset())*e,ie=this-Ht,be=function(){return bt.m(Lt,Ht)};switch(Yt){case b:St=be()/12;break;case y:St=be();break;case f:St=be()/3;break;case g:St=(ie-ne)/604800000;break;case h:St=(ie-ne)/86400000;break;case c:St=ie/i;break;case n:St=ie/e;break;case o:St=ie/r;break;default:St=ie}return ot?St:bt.a(St)},st.daysInMonth=function(){return this.endOf(y).$D},st.$locale=function(){return rt[this.$L]},st.locale=function(at,xt){if(!at)return this.$L;var ot=this.clone(),St=lt(at,xt,!0);return St&&(ot.$L=St),ot},st.clone=function(){return bt.w(this.$d,this)},st.toDate=function(){return new Date(this.valueOf())},st.toJSON=function(){return this.isValid()?this.toISOString():null},st.toISOString=function(){return this.$d.toISOString()},st.toString=function(){return this.$d.toUTCString()},kt}(),wt=vt.prototype;return pt.prototype=wt,[["$ms",s],["$s",o],["$m",n],["$H",c],["$W",h],["$M",y],["$y",b],["$D",F]].forEach(function(kt){wt[kt[1]]=function(st){return this.$g(st,kt[0],kt[1])}}),pt.extend=function(kt,st){return kt.$i||(kt(st,vt,pt),kt.$i=!0),pt},pt.locale=lt,pt.isDayjs=ct,pt.unix=function(kt){return pt(1000*kt)},pt.en=rt[Q],pt.Ls=rt,pt.p={},pt})});var sm=Te(function(im){Object.defineProperty(im,"__esModule",{value:!0});im.BLANK_URL=im.relativeFirstCharacters=im.whitespaceEscapeCharsRegex=im.urlSchemeRegex=im.ctrlCharactersRegex=im.htmlCtrlEntityRegex=im.htmlEntitiesRegex=im.invalidProtocolRegex=void 0;im.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;im.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;im.htmlCtrlEntityRegex=/&(newline|tab);/gi;im.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;im.urlSchemeRegex=/^.+(:|&colon;)/gim;im.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;im.relativeFirstCharacters=[".","/"];im.BLANK_URL="about:blank"});var Gn=Te(function(nm){Object.defineProperty(nm,"__esModule",{value:!0});nm.sanitizeUrl=T2;var yr=sm();function k2(r){return yr.relativeFirstCharacters.indexOf(r[0])>-1}function w2(r){var e=r.replace(yr.ctrlCharactersRegex,"");return e.replace(yr.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function S2(r){return URL.canParse(r)}function am(r){try{return decodeURIComponent(r)}catch(e){return r}}function T2(r){if(!r)return yr.BLANK_URL;var e,i=am(r.trim());do i=w2(i).replace(yr.htmlCtrlEntityRegex,"").replace(yr.ctrlCharactersRegex,"").replace(yr.whitespaceEscapeCharsRegex,"").trim(),i=am(i),e=i.match(yr.ctrlCharactersRegex)||i.match(yr.htmlEntitiesRegex)||i.match(yr.htmlCtrlEntityRegex)||i.match(yr.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return yr.BLANK_URL;if(k2(s))return s;var o=s.trimStart(),n=o.match(yr.urlSchemeRegex);if(!n)return s;var c=n[0].toLowerCase().trim();if(yr.invalidProtocolRegex.test(c))return yr.BLANK_URL;var h=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return h;if(c==="http:"||c==="https:"){if(!S2(h))return yr.BLANK_URL;var g=new URL(h);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return h}});var _d=Object.defineProperty,t=(r,e)=>_d(r,"name",{value:e,configurable:!0}),Qt=(r,e)=>{for(var i in e)_d(r,i,{get:e[i],enumerable:!0})};var Bd=Se(Ca(),1),to={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},a={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},Ur=t(function(r="fatal"){let e=to.fatal;if(typeof r==="string"){if(r.toLowerCase()in to)e=to[r]}else if(typeof r==="number")e=r;if(a.trace=()=>{},a.debug=()=>{},a.info=()=>{},a.warn=()=>{},a.error=()=>{},a.fatal=()=>{},e<=to.fatal)a.fatal=console.error?console.error.bind(console,li("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",li("FATAL"));if(e<=to.error)a.error=console.error?console.error.bind(console,li("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",li("ERROR"));if(e<=to.warn)a.warn=console.warn?console.warn.bind(console,li("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",li("WARN"));if(e<=to.info)a.info=console.info?console.info.bind(console,li("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",li("INFO"));if(e<=to.debug)a.debug=console.debug?console.debug.bind(console,li("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",li("DEBUG"));if(e<=to.trace)a.trace=console.debug?console.debug.bind(console,li("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",li("TRACE"))},"setLogLevel"),li=t((r)=>`%c${Bd.default().format("ss.SSS")} : ${r} : `,"format");var Mn={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,n=2*i-o;switch(s){case"r":return Mn.hue2rgb(n,o,r+0.3333333333333333)*255;case"g":return Mn.hue2rgb(n,o,r)*255;case"b":return Mn.hue2rgb(n,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),n=Math.min(r,e,i),c=(o+n)/2;if(s==="l")return c*100;if(o===n)return 0;let h=o-n,g=c>0.5?h/(2-o-n):h/(o+n);if(s==="s")return g*100;switch(o){case r:return((e-i)/h+(e<i?6:0))*60;case e:return((i-r)/h+2)*60;case i:return((r-e)/h+4)*60;default:return-1}}},vd=Mn;var rC={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},Ld=rC;var iC={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Fd=iC;var oC={channel:vd,lang:Ld,unit:Fd},z=oC;var eo={};for(let r=0;r<=255;r++)eo[r]=z.unit.dec2hex(r);var nr={ALL:0,RGB:1,HSL:2};class Ad{constructor(){this.type=nr.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=nr.ALL}is(r){return this.type===r}}var Md=Ad;class Ed{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Md}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=nr.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=z.channel.rgb2hsl(r,"h");if(i===void 0)r.s=z.channel.rgb2hsl(r,"s");if(s===void 0)r.l=z.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=z.channel.hsl2rgb(r,"r");if(i===void 0)r.g=z.channel.hsl2rgb(r,"g");if(s===void 0)r.b=z.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(nr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(nr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(nr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(nr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(nr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(nr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(nr.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(nr.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(nr.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(nr.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(nr.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(nr.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Od=Ed;var sC=new Od({r:0,g:0,b:0,a:0},"transparent"),Do=sC;var Id={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Id.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,n=o%4===0,c=o>4,h=c?1:17,g=c?8:4,y=n?0:-1,f=c?255:15;return Do.set({r:(s>>g*(y+3)&f)*h,g:(s>>g*(y+2)&f)*h,b:(s>>g*(y+1)&f)*h,a:n?(s&f)*h/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${eo[Math.round(e)]}${eo[Math.round(i)]}${eo[Math.round(s)]}${eo[Math.round(o*255)]}`;else return`#${eo[Math.round(e)]}${eo[Math.round(i)]}${eo[Math.round(s)]}`}},Yo=Id;var On={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(On.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return z.channel.clamp.h(parseFloat(i)*0.9);case"rad":return z.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return z.channel.clamp.h(parseFloat(i)*360)}}return z.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(On.re);if(!i)return;let[,s,o,n,c,h]=i;return Do.set({h:On._hue2deg(s),s:z.channel.clamp.s(parseFloat(o)),l:z.channel.clamp.l(parseFloat(n)),a:c?z.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%, ${o})`;else return`hsl(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%)`}},Rs=On;var $n={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=$n.colors[r];if(!e)return;return Yo.parse(e)},stringify:(r)=>{let e=Yo.stringify(r);for(let i in $n.colors)if($n.colors[i]===e)return i;return}},_h=$n;var $d={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($d.re);if(!i)return;let[,s,o,n,c,h,g,y,f]=i;return Do.set({r:z.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:z.channel.clamp.g(c?parseFloat(n)*2.55:parseFloat(n)),b:z.channel.clamp.b(g?parseFloat(h)*2.55:parseFloat(h)),a:y?z.channel.clamp.a(f?parseFloat(y)/100:parseFloat(y)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)}, ${z.lang.round(o)})`;else return`rgb(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)})`}},qs=$d;var aC={format:{keyword:_h,hex:Yo,rgb:qs,rgba:qs,hsl:Rs,hsla:Rs},parse:(r)=>{if(typeof r!=="string")return r;let e=Yo.parse(r)||qs.parse(r)||Rs.parse(r)||_h.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(nr.HSL)||r.data.r===void 0)return Rs.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return qs.stringify(r);else return Yo.stringify(r)}},De=aC;var nC=(r,e)=>{let i=De.parse(r);for(let s in e)i[s]=z.channel.clamp[s](e[s]);return De.stringify(i)},Pn=nC;var lC=(r,e,i=0,s=1)=>{if(typeof r!=="number")return Pn(r,{a:e});let o=Do.set({r:z.channel.clamp.r(r),g:z.channel.clamp.g(e),b:z.channel.clamp.b(i),a:z.channel.clamp.a(s)});return De.stringify(o)},de=lC;var hC=(r)=>{let{r:e,g:i,b:s}=De.parse(r),o=0.2126*z.channel.toLinear(e)+0.7152*z.channel.toLinear(i)+0.0722*z.channel.toLinear(s);return z.lang.round(o)},Dd=hC;var cC=(r)=>Dd(r)>=0.5,Pd=cC;var uC=(r)=>!Pd(r),X=uC;var fC=(r,e,i)=>{let s=De.parse(r),o=s[e],n=z.channel.clamp[e](o+i);if(o!==n)s[e]=n;return De.stringify(s)},br=fC;var dC=(r,e)=>br(r,"l",e),u=dC;var pC=(r,e)=>br(r,"l",-e),d=pC;var gC=(r,e)=>{let i=De.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return Pn(r,s)},G=gC;var mC=(r,e,i=50)=>{let{r:s,g:o,b:n,a:c}=De.parse(r),{r:h,g,b:y,a:f}=De.parse(e),b=i/100,F=b*2-1,N=c-f,H=((F*N===-1?F:(F+N)/(1+F*N))+1)/2,Y=1-H,j=s*H+h*Y,K=o*H+g*Y,Q=n*H+y*Y,rt=c*b+f*(1-b);return de(j,K,Q,rt)},Rd=mC;var yC=(r,e=100)=>{let i=De.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Rd(i,r,e)},ut=yC;/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function xC(r,e){this.v=r,this.k=e}function qd(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,s=Array(e);i<e;i++)s[i]=r[i];return s}function CC(r){if(Array.isArray(r))return r}function bC(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,n,c,h=[],g=!0,y=!1;try{if(n=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;g=!1}else for(;!(g=(s=n.call(i)).done)&&(h.push(s.value),h.length!==e);g=!0);}catch(f){y=!0,o=f}finally{try{if(!g&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(y)throw o}}return h}}function kC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function wC(r,e){return CC(r)||bC(r,e)||SC(r,e)||kC()}function SC(r,e){if(r){if(typeof r=="string")return qd(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qd(r,e):void 0}}function Xn(r){var e,i;function s(n,c){try{var h=r[n](c),g=h.value,y=g instanceof xC;Promise.resolve(y?g.v:g).then(function(f){if(y){var b=n==="return"&&g.k?n:"next";if(!g.k||f.done)return s(b,f);f=r[b](f).value}o(!!h.done,f)},function(f){s("throw",f)})}catch(f){o(2,f)}}function o(n,c){n===2?e.reject(c):e.resolve({value:c,done:n}),(e=e.next)?s(e.key,e.arg):i=null}this._invoke=function(n,c){return new Promise(function(h,g){var y={key:n,arg:c,resolve:h,reject:g,next:null};i?i=i.next=y:(e=i=y,s(n,c))})},typeof r.return!="function"&&(this.return=void 0)}Xn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Xn.prototype.next=function(r){return this._invoke("next",r)},Xn.prototype.throw=function(r){return this._invoke("throw",r)},Xn.prototype.return=function(r){return this._invoke("return",r)};var{entries:tp,setPrototypeOf:Nd,isFrozen:TC,getPrototypeOf:ep,getOwnPropertyDescriptor:rp,freeze:hr,seal:fr,create:ns}=Object,ip=typeof Reflect<"u"&&Reflect,{apply:$h,construct:Dh}=ip;if(!hr)hr=function(e){return e};if(!fr)fr=function(e){return e};if(!$h)$h=function(e,i){for(var s=arguments.length,o=Array(s>2?s-2:0),n=2;n<s;n++)o[n-2]=arguments[n];return e.apply(i,o)};if(!Dh)Dh=function(e){for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return new e(...s)};var xo=Ke(Array.prototype.forEach);Array.prototype.indexOf;var _C=Ke(Array.prototype.lastIndexOf),Wd=Ke(Array.prototype.pop),Ns=Ke(Array.prototype.push),BC=Ke(Array.prototype.slice),vC=Ke(Array.prototype.splice),ls=Array.isArray,Bh=op(Set),vh=Ke(Set.prototype.add),Ws=Ke(Set.prototype.has),Uo=Ke(String.prototype.toLowerCase),Lh=Ke(String.prototype.toString),zd=Ke(String.prototype.match),zs=Ke(String.prototype.replace),Hd=Ke(String.prototype.indexOf),LC=Ke(String.prototype.trim),FC=Ke(Number.prototype.toString),AC=Ke(Boolean.prototype.toString),Yd=typeof BigInt>"u"?null:Ke(BigInt.prototype.toString),Ud=typeof Symbol>"u"?null:Ke(Symbol.prototype.toString),zr=Ke(Object.prototype.hasOwnProperty),Hs=Ke(Object.prototype.toString),ur=Ke(RegExp.prototype.test),Co=op(TypeError);function Ke(r){return function(e){if(e instanceof RegExp)e.lastIndex=0;for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return $h(r,e,s)}}function op(r){return function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];return Dh(r,i)}}function Oe(r,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Uo;if(Nd)Nd(r,null);if(!ls(e))return r;let s=e.length;while(s--){let o=e[s];if(typeof o==="string"){let n=i(o);if(n!==o){if(!TC(e))e[s]=n;o=n}}r[o]=!0}return r}function MC(r){for(let e=0;e<r.length;e++)if(!zr(r,e))r[e]=null;return r}function ri(r){let e=ns(null);for(let s of tp(r)){var i=wC(s,2);let o=i[0],n=i[1];if(zr(r,o))if(ls(n))e[o]=MC(n);else if(n&&typeof n==="object"&&n.constructor===Object)e[o]=ri(n);else e[o]=n}return e}function EC(r){switch(typeof r){case"string":return r;case"number":return FC(r);case"boolean":return AC(r);case"bigint":return Yd?Yd(r):"0";case"symbol":return Ud?Ud(r):"Symbol()";case"undefined":return Hs(r);case"function":case"object":{if(r===null)return Hs(r);let e=r,i=hi(e,"toString");if(typeof i==="function"){let s=i(e);return typeof s==="string"?s:Hs(s)}return Hs(r)}default:return Hs(r)}}function hi(r,e){while(r!==null){let s=rp(r,e);if(s){if(s.get)return Ke(s.get);if(typeof s.value==="function")return Ke(s.value)}r=ep(r)}function i(){return null}return i}function OC(r,e){while(r!==null){let i=rp(r,e);if(i)return i.get?Ke(i.get):null;r=ep(r)}return null}function IC(r){try{return ur(r,""),!0}catch(e){return!1}}var jd=hr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Fh=hr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ah=hr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$C=hr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mh=hr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),DC=hr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gd=hr(["#text"]),Xd=hr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Eh=hr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Vd=hr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kn=hr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),PC=fr(/{{[\w\W]*|^[\w\W]*}}/g),RC=fr(/<%[\w\W]*|^[\w\W]*%>/g),qC=fr(/\${[\w\W]*/g),NC=fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),WC=fr(/^aria-[\-\w]+$/),Kd=fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zC=fr(/^(?:\w+script|data):/i),HC=fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),YC=fr(/^html$/i),UC=fr(/^[a-z][.\w]*(-[.\w]+)+$/i),Oh=fr(/<[/\w!]/g),Zd=fr(/<[/\w]/g),jC=fr(/<\/no(script|embed|frames)/i),Qd=fr(/\/>/i),sr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GC=hr(Oe({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),XC=function(){return typeof window>"u"?null:window},VC=function(e,i){if(typeof e!=="object"||typeof e.createPolicy!=="function")return null;let s=null,o="data-tt-policy-suffix";if(i&&i.hasAttribute(o))s=i.getAttribute(o);let n="dompurify"+(s?"#"+s:"");try{return e.createPolicy(n,{createHTML(c){return c},createScriptURL(c){return c}})}catch(c){return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Jd=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Po=function(e,i,s,o){return zr(e,i)&&ls(e[i])?Oe(o.base?ri(o.base):{},e[i],o.transform):s},Ih=function(e,i,s){let o=zr(e,i)?e[i]:void 0;return o&&typeof o==="object"?ri(o):s()};function sp(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:XC(),e=(Rt)=>sp(Rt);if(e.version="3.4.17",e.removed=[],!r||!r.document||r.document.nodeType!==sr.document||!r.Element)return e.isSupported=!1,e;let i=r.document,s=i,o=s.currentScript;r.DocumentFragment;let{HTMLTemplateElement:n,Node:c,Element:h,NodeFilter:g}=r;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let{DOMParser:y,trustedTypes:f}=r,b=h.prototype,F=hi(b,"cloneNode"),N=hi(b,"remove"),W=hi(b,"removeAttributeNode"),H=hi(b,"nextSibling"),Y=hi(b,"childNodes"),j=hi(b,"parentNode"),K=hi(b,"shadowRoot"),Q=hi(b,"attributes"),rt=c&&c.prototype?hi(c.prototype,"nodeType"):null,it=c&&c.prototype?hi(c.prototype,"nodeName"):null,ct=c&&c.prototype?hi(c.prototype,"ownerDocument"):null,lt=function(J){return rt?rt(J):J.nodeType},pt=function(J){return it?it(J):J.nodeName},bt=OC(b,"namespaceURI"),vt=function(J){return bt?bt(J):J.namespaceURI};if(typeof n==="function"){let Rt=i.createElement("template");if(Rt.content&&Rt.content.ownerDocument)i=Rt.content.ownerDocument}let wt,kt="",st,at=!1,xt=0,ot=function(){if(xt>0)throw Co('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},St=function(J){ot(),xt++;try{return wt.createHTML(J)}finally{xt--}},Lt=function(J){ot(),xt++;try{return wt.createScriptURL(J)}finally{xt--}},Yt=function(){if(!at)st=VC(f,o),at=!0;return st},Ht=i,{implementation:ne,createNodeIterator:ie,createDocumentFragment:be,getElementsByTagName:_e}=Ht,ge=s.importNode,Wt=Jd();e.isSupported=typeof tp==="function"&&typeof j==="function"&&ne&&ne.createHTMLDocument!==void 0;let ee=PC,ce=RC,ue=qC,Xe=NC,Ge=WC,ui=zC,Ki=HC,si=UC,Fo=Kd,Ue=null,Or=Oe({},[...jd,...Fh,...Ah,...Mh,...Gd]),$e=null,Zi=Oe({},[...Xd,...Eh,...Vd,...Kn]),cr=Object.seal(ns(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ai=null,Ao=null,or=Object.seal(ns(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Mo=!0,xi=!0,Qi=!1,Ji=!0,q=!1,mt=!0,Bt=!1,Mt=!1,_t=null,Nt=null,Z=!1,Ct=!1,Dt=!1,Ft=!1,Ot=!0,qt=!1,Pt="user-content-",Vt=!0,Xt=!1,Kt=null,te={},we=null,je=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Is=null,Eo=Oe({},["audio","video","img","source","image","track"]),Oo=null,ld=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wn="http://www.w3.org/1998/Math/MathML",Sn="http://www.w3.org/2000/svg",Ci="http://www.w3.org/1999/xhtml",rs=Ci,hh=!1,ch=null,D0=Oe({},[wn,Sn,Ci],Lh),hd=hr(["mi","mo","mn","ms","mtext"]),uh=Oe({},hd),cd=hr(["annotation-xml"]),fh=Oe({},cd),P0=Oe({},["title","style","font","a","script"]),$s=null,R0=["application/xhtml+xml","text/html"],q0="text/html",rr=null,is=null,N0=i.createElement("form"),ud=function(J){return J instanceof RegExp||J instanceof Function},dh=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(is&&is===J)return;if(!J||typeof J!=="object")J={};J=ri(J),$s=R0.indexOf(J.PARSER_MEDIA_TYPE)===-1?q0:J.PARSER_MEDIA_TYPE,rr=$s==="application/xhtml+xml"?Lh:Uo,Ue=Po(J,"ALLOWED_TAGS",Or,{transform:rr}),$e=Po(J,"ALLOWED_ATTR",Zi,{transform:rr}),ch=Po(J,"ALLOWED_NAMESPACES",D0,{transform:Lh}),Oo=Po(J,"ADD_URI_SAFE_ATTR",ld,{transform:rr,base:ld}),Is=Po(J,"ADD_DATA_URI_TAGS",Eo,{transform:rr,base:Eo}),we=Po(J,"FORBID_CONTENTS",je,{transform:rr}),ai=Po(J,"FORBID_TAGS",ri({}),{transform:rr}),Ao=Po(J,"FORBID_ATTR",ri({}),{transform:rr}),te=zr(J,"USE_PROFILES")?J.USE_PROFILES&&typeof J.USE_PROFILES==="object"?ri(J.USE_PROFILES):J.USE_PROFILES:!1,Mo=J.ALLOW_ARIA_ATTR!==!1,xi=J.ALLOW_DATA_ATTR!==!1,Qi=J.ALLOW_UNKNOWN_PROTOCOLS||!1,Ji=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,q=J.SAFE_FOR_TEMPLATES||!1,mt=J.SAFE_FOR_XML!==!1,Bt=J.WHOLE_DOCUMENT||!1,Ct=J.RETURN_DOM||!1,Dt=J.RETURN_DOM_FRAGMENT||!1,Ft=J.RETURN_TRUSTED_TYPE||!1,Z=J.FORCE_BODY||!1,Ot=J.SANITIZE_DOM!==!1,qt=J.SANITIZE_NAMED_PROPS||!1,Vt=J.KEEP_CONTENT!==!1,Xt=J.IN_PLACE||!1,Fo=IC(J.ALLOWED_URI_REGEXP)?J.ALLOWED_URI_REGEXP:Kd,rs=typeof J.NAMESPACE==="string"?J.NAMESPACE:Ci,uh=Ih(J,"MATHML_TEXT_INTEGRATION_POINTS",()=>Oe({},hd)),fh=Ih(J,"HTML_INTEGRATION_POINTS",()=>Oe({},cd));let dt=Ih(J,"CUSTOM_ELEMENT_HANDLING",()=>ns(null));if(cr=ns(null),zr(dt,"tagNameCheck")&&ud(dt.tagNameCheck))cr.tagNameCheck=dt.tagNameCheck;if(zr(dt,"attributeNameCheck")&&ud(dt.attributeNameCheck))cr.attributeNameCheck=dt.attributeNameCheck;if(zr(dt,"allowCustomizedBuiltInElements")&&typeof dt.allowCustomizedBuiltInElements==="boolean")cr.allowCustomizedBuiltInElements=dt.allowCustomizedBuiltInElements;if(fr(cr),q)xi=!1;if(Dt)Ct=!0;if(te){if(Ue=Oe({},Gd),$e=ns(null),te.html===!0)Oe(Ue,jd),Oe($e,Xd);if(te.svg===!0)Oe(Ue,Fh),Oe($e,Eh),Oe($e,Kn);if(te.svgFilters===!0)Oe(Ue,Ah),Oe($e,Eh),Oe($e,Kn);if(te.mathMl===!0)Oe(Ue,Mh),Oe($e,Vd),Oe($e,Kn)}if(or.tagCheck=null,or.attributeCheck=null,zr(J,"ADD_TAGS")){if(typeof J.ADD_TAGS==="function")or.tagCheck=J.ADD_TAGS;else if(ls(J.ADD_TAGS)){if(Ue===Or)Ue=ri(Ue);Oe(Ue,J.ADD_TAGS,rr)}}if(zr(J,"ADD_ATTR")){if(typeof J.ADD_ATTR==="function")or.attributeCheck=J.ADD_ATTR;else if(ls(J.ADD_ATTR)){if($e===Zi)$e=ri($e);Oe($e,J.ADD_ATTR,rr)}}if(zr(J,"ADD_FORBID_CONTENTS")&&ls(J.ADD_FORBID_CONTENTS)){if(we===je)we=ri(we);Oe(we,J.ADD_FORBID_CONTENTS,rr)}if(Vt)Ue["#text"]=!0;if(Bt)Oe(Ue,["html","head","body"]);if(Ue.table)Oe(Ue,["tbody"]),delete ai.tbody;if(J.TRUSTED_TYPES_POLICY){if(typeof J.TRUSTED_TYPES_POLICY.createHTML!=="function")throw Co('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof J.TRUSTED_TYPES_POLICY.createScriptURL!=="function")throw Co('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let It=wt;wt=J.TRUSTED_TYPES_POLICY;try{kt=St("")}catch($t){throw wt=It,$t}}else if(J.TRUSTED_TYPES_POLICY===null)wt=void 0,kt="";else{if(wt===void 0)wt=Yt();if(wt&&typeof kt==="string")kt=St("")}if(hr)hr(J);is=J},fd=Oe({},[...Fh,...Ah,...$C]),dd=Oe({},[...Mh,...DC]),W0=function(J,dt,It){if(dt.namespaceURI===Ci)return J==="svg";if(dt.namespaceURI===wn)return J==="svg"&&(It==="annotation-xml"||uh[It]);return Boolean(fd[J])},z0=function(J,dt,It){if(dt.namespaceURI===Ci)return J==="math";if(dt.namespaceURI===Sn)return J==="math"&&fh[It];return Boolean(dd[J])},H0=function(J,dt,It){if(dt.namespaceURI===Sn&&!fh[It])return!1;if(dt.namespaceURI===wn&&!uh[It])return!1;return!dd[J]&&(P0[J]||!fd[J])},Y0=function(J){let dt=vt(J),It=Uo(pt(J)),$t=j(J),re,xe;if($t&&lt($t)===sr.element)re={namespaceURI:vt($t)},xe=Uo(pt($t));else re={namespaceURI:rs},xe="template";if(!ch[dt])return!1;if(dt===Sn)return W0(It,re,xe);if(dt===wn)return z0(It,re,xe);if(dt===Ci)return H0(It,re,xe);if($s==="application/xhtml+xml"&&ch[dt])return!0;return!1},Io=function(J){Ns(e.removed,{element:J});try{j(J).removeChild(J)}catch(dt){if(N(J),!j(J))throw Co("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pd=function(J,dt,It){try{W(J,dt)}catch($t){try{J.removeAttribute(It)}catch(re){}}},ph=function(J){mh(J);let dt=Y(J);if(dt)xo(BC(dt),($t)=>{try{N($t)}catch(re){}});let It=lt(J)===sr.element?Q(J):null;if(It)for(let $t=It.length-1;$t>=0;--$t){let re=It[$t],xe=re&&re.name;if(typeof xe==="string")pd(J,re,xe)}},os=function(J,dt,It){if(!It)try{It=dt.getAttributeNode(J)}catch($t){It=null}Ns(e.removed,{attribute:It||null,from:dt});try{if(It)W(dt,It);else dt.removeAttribute(J)}catch($t){try{dt.removeAttribute(J)}catch(re){}}if(J==="is")if(Ct||Dt)try{Io(dt)}catch($t){}else try{dt.setAttribute(J,"")}catch($t){}},gd=function(J){let dt=Q(J);if(!dt)return;for(let It=dt.length-1;It>=0;--It){let $t=dt[It],re=$t&&$t.name;if(typeof re!=="string"||$e[rr(re)])continue;pd(J,$t,re)}},gh=function(J,dt){let It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$t=[J];while($t.length>0){let re=$t.pop();if(dt(re)===!1)continue;if(It&&lt(re)===sr.element){let Ae=K(re);if($o(Ae))$t.push(Ae)}let xe=Y(re);if(xe)for(let Ae=xe.length-1;Ae>=0;--Ae)$t.push(xe[Ae])}},mh=function(J){gh(J,(dt)=>{if(lt(dt)===sr.element)gd(dt)})},yh=function(J){let dt=[];return gh(J,(It)=>{dt.push(It)},!0),dt},U0=function(J,dt){let It=Bh();xo(yh(J),($t)=>{if(lt($t)===sr.element)vh(It,$t)}),xo(dt,($t)=>{if(lt($t)===sr.element&&!Ws(It,$t))gd($t)})},md=function(J,dt){let It=!1;return xo(e.removed,($t)=>{if($t.element)It=It||$t.element===J,mh($t.element)}),U0(J,dt),It},j0=8,G0=function(J,dt){let It=Kt,$t=null,re=()=>{if(!$t)$t=Bh(),xo(dt,(xe)=>{vh($t,xe)});return $t};for(let xe=0;;xe++){let Ae=yh(J),ar=[J],bi=!1;if(xo(Ae,(Br)=>{if(lt(Br)===sr.documentFragment)Ns(ar,Br);else if(!bi&&!Ws(It,Br))bi=Ws(re(),Br)}),!bi)return;if(xe>=j0)throw Co("the tree kept changing during in-place sanitization; refusing to return it");xo(ar,(Br,$r)=>{X0(Br,$r>0,J,re())})}},X0=function(J,dt,It,$t){let re=xh(J),xe;while(xe=re.nextNode()){if(!Ws($t,xe)||Ws(Kt,xe))continue;if(dt)fi(Wt.uponSanitizeShadowNode,xe,null);if(bh(xe,It),kh(xe,It),$o(xe.content))Ps(xe.content)}},V0=function(J){if(Kt)vh(Kt,J)},yd=function(J,dt){if(!mt)return!1;if(J==="patchsrc")return!0;return J==="for"&&dt!=="label"&&dt!=="output"},K0=function(J){if(!mt)return;gh(J,(dt)=>{let It=lt(dt);if(It===sr.processingInstruction||It===sr.comment&&ur(Zd,dt.data)){try{N(dt)}catch($t){}return!1}if(It===sr.element){let $t=dt,re=rr(pt(dt));try{if($t.hasAttribute&&$t.hasAttribute("patchsrc"))$t.removeAttribute("patchsrc");if($t.hasAttribute&&$t.hasAttribute("for")&&yd("for",re))$t.removeAttribute("for")}catch(xe){}}return!0})},xd=function(J){let dt=null,It=null;if(Z)J="<remove></remove>"+J;else{let xe=zd(J,/^[\r\n\t ]+/);It=xe&&xe[0]}if($s==="application/xhtml+xml"&&rs===Ci)J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>";let $t=wt?St(J):J;if(rs===Ci)try{dt=new y().parseFromString($t,$s)}catch(xe){}if(!dt||!dt.documentElement){dt=ne.createDocument(rs,"template",null);try{dt.documentElement.innerHTML=hh?kt:$t}catch(xe){}}let re=dt.body||dt.documentElement;if(J&&It)re.insertBefore(i.createTextNode(It),re.childNodes[0]||null);if(rs===Ci)return _e.call(dt,Bt?"html":"body")[0];return Bt?dt.documentElement:re},xh=function(J){let dt=ct?ct(J):J.ownerDocument;return ie.call(dt||J,J,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},_n=function(J){return J=zs(J,ee," "),J=zs(J,ce," "),J=zs(J,ue," "),J},Ch=function(J){var dt;Cd(J);let It=(dt=J.querySelectorAll)===null||dt===void 0?void 0:dt.call(J,"template");if(It)xo(It,($t)=>{if($o($t.content))Ch($t.content)})},Cd=function(J){J.normalize();let dt=ct?ct(J):J.ownerDocument,It=ie.call(dt||J,J,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null),$t=It.nextNode();while($t)$t.data=_n($t.data),$t=It.nextNode()},Bn=function(J){let dt=it?it(J):null;if(typeof dt!=="string")return!1;if(rr(dt)!=="form")return!1;return typeof J.nodeName!=="string"||typeof J.textContent!=="string"||typeof J.removeChild!=="function"||J.attributes!==Q(J)||typeof J.removeAttribute!=="function"||typeof J.removeAttributeNode!=="function"||typeof J.getAttributeNode!=="function"||typeof J.setAttribute!=="function"||typeof J.namespaceURI!=="string"||typeof J.insertBefore!=="function"||typeof J.hasChildNodes!=="function"||J.nodeType!==rt(J)||J.childNodes!==Y(J)},$o=function(J){if(!rt||typeof J!=="object"||J===null)return!1;try{return rt(J)===sr.documentFragment}catch(dt){return!1}},Ds=function(J){if(!rt||typeof J!=="object"||J===null)return!1;try{return typeof rt(J)==="number"}catch(dt){return!1}};function fi(Rt,J,dt){if(Rt.length===0)return;xo(Rt,(It)=>{It.call(e,J,dt,is)})}let Z0=function(J,dt){if(mt&&J.hasChildNodes()&&!Ds(J.firstElementChild)&&ur(Oh,J.textContent)&&ur(Oh,J.innerHTML))return!0;if(mt&&GC[dt]&&lt(J)===sr.element&&vt(J)===Ci&&(Ds(J.firstElementChild)||typeof J.textContent==="string"&&ur(Oh,J.textContent)))return!0;if(J.nodeType===sr.processingInstruction)return!0;if(mt&&J.nodeType===sr.comment&&ur(Zd,J.data))return!0;return!1},vn=function(J,dt){if(J instanceof RegExp)return ur(J,dt);if(J instanceof Function){for(var It=arguments.length,$t=Array(It>2?It-2:0),re=2;re<It;re++)$t[re-2]=arguments[re];return Boolean(J(dt,...$t))}return!1},Q0=function(J,dt,It){if(!ai[dt]&&wd(dt)&&vn(cr.tagNameCheck,dt))return!1;if(Vt&&!we[dt]&&!we[Uo(dt)]){let $t=j(J),re=Y(J);if(re&&$t){let xe=re.length;for(let Ae=xe-1;Ae>=0;--Ae){let ar=J===It?F(re[Ae],!0):re[Ae];$t.insertBefore(ar,H(J))}}}return Io(J),!0},bd=function(J,dt,It,$t){if(J.length===0)return dt;return dt===It||dt===$t?ri(dt):dt},ss=function(J,dt){if(J===dt||j(J)!==null)return!1;if(Xt)mh(J);return!0},bh=function(J,dt){if(V0(J),fi(Wt.beforeSanitizeElements,J,null),ss(J,dt))return!0;if(Bn(J))return Io(J),!0;let It=rr(pt(J));if(Ue=bd(Wt.uponSanitizeElement,Ue,Or,_t),fi(Wt.uponSanitizeElement,J,{tagName:It,allowedTags:Ue}),ss(J,dt))return!0;if(Z0(J,It))return Io(J),!0;if(ai[It]||!(or.tagCheck instanceof Function&&or.tagCheck(It))&&!Ue[It]){let $t=Q0(J,It,dt);if($t===!1){if(fi(Wt.afterSanitizeElements,J,null),ss(J,dt))return!0}return $t}if(lt(J)===sr.element&&!Y0(J))return Io(J),!0;if((It==="noscript"||It==="noembed"||It==="noframes")&&ur(jC,J.innerHTML))return Io(J),!0;if(q&&J.nodeType===sr.text){let $t=_n(J.textContent);if(J.textContent!==$t)Ns(e.removed,{element:J.cloneNode()}),J.textContent=$t}return fi(Wt.afterSanitizeElements,J,null),ss(J,dt)},kd=function(J,dt,It){if(Ao[dt])return!1;if(yd(dt,J))return!1;if(Ot&&(dt==="id"||dt==="name")&&((It in i)||(It in N0)))return!1;let $t=$e[dt]||or.attributeCheck instanceof Function&&or.attributeCheck(dt,J);if(xi&&ur(Xe,dt))return!0;if(Mo&&ur(Ge,dt))return!0;if(!$t)return wd(J)&&vn(cr.tagNameCheck,J)&&vn(cr.attributeNameCheck,dt,J)||dt==="is"&&cr.allowCustomizedBuiltInElements&&vn(cr.tagNameCheck,It);if(Oo[dt])return!0;if(ur(Fo,zs(It,Ki,"")))return!0;if((dt==="src"||dt==="xlink:href"||dt==="href")&&J!=="script"&&Hd(It,"data:")===0&&Is[J])return!0;if(Qi&&!ur(ui,zs(It,Ki,"")))return!0;return!It},J0=Oe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),wd=function(J){return!J0[Uo(J)]&&ur(si,J)},tC=function(J,dt,It,$t){if(wt&&typeof f==="object"&&typeof f.getAttributeType==="function"&&!It)switch(f.getAttributeType(J,dt)){case"TrustedHTML":return St($t);case"TrustedScriptURL":return Lt($t)}return $t},eC=function(J,dt,It,$t){try{if(It)J.setAttributeNS(It,dt,$t);else J.setAttribute(dt,$t);if(Bn(J))return Io(J),!1;return!0}catch(re){return os(dt,J),!1}},Sd=function(J,dt){if(mt&&ur(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,dt))return!0;return Uo(J)==="attributename"&&zd(dt,"href")!==null},kh=function(J,dt){if(fi(Wt.beforeSanitizeAttributes,J,null),ss(J,dt))return;let It=J.attributes;if(!It||Bn(J))return;$e=bd(Wt.uponSanitizeAttribute,$e,Zi,Nt);let $t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$e,forceKeepAttr:void 0},re=It.length,xe=rr(J.nodeName);while(re--){let Ae=It[re],{name:ar,namespaceURI:bi,value:Br}=Ae,$r=rr(ar),as=Br,Pr=ar==="value"?as:LC(as),Td=!1;if($t.attrName=$r,$t.attrValue=Pr,$t.keepAttr=!0,$t.forceKeepAttr=void 0,fi(Wt.uponSanitizeAttribute,J,$t),Pr=$t.attrValue,qt&&($r==="id"||$r==="name")&&Hd(Pr,Pt)!==0)os(ar,J,Ae),Pr=Pt+Pr,Td=!0;if(Sd(ar,Pr)){os(ar,J,Ae);continue}if($t.forceKeepAttr)continue;if(!$t.keepAttr){os(ar,J,Ae);continue}if(!Ji&&ur(Qd,Pr)){os(ar,J,Ae);continue}if(q)Pr=_n(Pr);if(!kd(xe,$r,Pr)){os(ar,J,Ae);continue}if(Pr=tC(xe,$r,bi,Pr),Pr!==as){if(eC(J,ar,bi,Pr)&&Td)Wd(e.removed)}}fi(Wt.afterSanitizeAttributes,J,null),ss(J,dt)},Ps=function(J){let dt=null,It=xh(J);fi(Wt.beforeSanitizeShadowDOM,J,null);while(dt=It.nextNode()){if(fi(Wt.uponSanitizeShadowNode,dt,null),bh(dt,J),kh(dt,J),$o(dt.content))Ps(dt.content);if(lt(dt)===sr.element){let $t=K(dt);if($o($t))wh($t),Ps($t)}}if(q)Cd(J);fi(Wt.afterSanitizeShadowDOM,J,null)},wh=function(J){let dt=[{node:J,shadow:null}];while(dt.length>0){let It=dt.pop();if(It.shadow){Ps(It.shadow);continue}let $t=It.node,re=lt($t)===sr.element,xe=Y($t);if(xe)for(let Ae=xe.length-1;Ae>=0;--Ae)dt.push({node:xe[Ae],shadow:null});if(re){let Ae=it?it($t):null;if(typeof Ae==="string"&&rr(Ae)==="template"){let ar=$t.content;if($o(ar))dt.push({node:ar,shadow:null})}}if(re){let Ae=K($t);if($o(Ae))dt.push({node:null,shadow:Ae},{node:Ae,shadow:null})}}};return e.sanitize=function(Rt){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dt=null,It=null,$t=null,re=null;if(hh=!Rt,hh)Rt="<!-->";if(typeof Rt!=="string"&&!Ds(Rt)){if(Rt=EC(Rt),typeof Rt!=="string")throw Co("dirty is not a string, aborting")}if(!e.isSupported)return Rt;if(Mt)Ue=_t,$e=Nt;else dh(J);if(Wt.uponSanitizeElement.length>0||Wt.uponSanitizeAttribute.length>0)Ue=ri(Ue);if(Wt.uponSanitizeAttribute.length>0)$e=ri($e);e.removed=[];let xe=Xt&&typeof Rt!=="string"&&Ds(Rt),Ae=[],ar=Kt;if(xe){K0(Rt);let $r=pt(Rt);if(typeof $r==="string"){let as=rr($r);if(!Ue[as]||ai[as])throw ph(Rt),Co("root node is forbidden and cannot be sanitized in-place")}if(Bn(Rt))throw ph(Rt),Co("root node is clobbered and cannot be sanitized in-place");Ae=yh(Rt),Kt=Bh()}else if(Ds(Rt)){if(dt=xd("<!---->"),It=dt.ownerDocument.importNode(Rt,!0),It.nodeType===sr.element&&It.nodeName==="BODY")dt=It;else if(It.nodeName==="HTML")dt=It;else dt.appendChild(It);wh(dt)}else{if(!Ct&&!q&&!Bt&&Rt.indexOf("<")===-1)return wt&&Ft?St(Rt):Rt;if(dt=xd(Rt),!dt)return Ct?null:Ft?kt:""}if(dt&&Z)Io(dt.firstChild);let bi=xe?Rt:dt;try{if(xe)wh(Rt);let $r=xh(bi);while($t=$r.nextNode())if(bh($t,bi),kh($t,bi),$o($t.content))Ps($t.content);if(xe)G0(Rt,Ae)}catch($r){if(xe)ph(Rt),md(Rt,Ae);throw $r}finally{Kt=ar}if(xe){if(md(Rt,Ae))throw Co("a node selected for removal could not be safely returned; refusing to sanitize in place");if(q)Ch(Rt);return Rt}if(Ct){if(q)Ch(dt);if(Dt){re=be.call(dt.ownerDocument);while(dt.firstChild)re.appendChild(dt.firstChild)}else re=dt;if($e.shadowroot||$e.shadowrootmode)re=ge.call(s,re,!0);return re}let Br=Bt?dt.outerHTML:dt.innerHTML;if(Bt&&Ue["!doctype"]&&dt.ownerDocument&&dt.ownerDocument.doctype&&dt.ownerDocument.doctype.name&&ur(YC,dt.ownerDocument.doctype.name))Br="<!DOCTYPE "+dt.ownerDocument.doctype.name+`>
3
- `+Br;if(q)Br=_n(Br);return wt&&Ft?St(Br):Br},e.setConfig=function(){let Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dh(Rt),Mt=!0,_t=Ue,Nt=$e},e.clearConfig=function(){is=null,Mt=!1,_t=null,Nt=null,wt=st,kt=""},e.isValidAttribute=function(Rt,J,dt){if(!is)dh({});let It=rr(Rt),$t=rr(J);if(typeof dt==="string"&&(Sd(J,dt)||!Ji&&ur(Qd,dt)))return!1;return kd(It,$t,dt)},e.addHook=function(Rt,J){if(typeof J!=="function")return;if(!zr(Wt,Rt))return;Ns(Wt[Rt],J)},e.removeHook=function(Rt,J){if(!zr(Wt,Rt))return;if(J!==void 0){let dt=_C(Wt[Rt],J);return dt===-1?void 0:vC(Wt[Rt],dt,1)[0]}return Wd(Wt[Rt])},e.removeHooks=function(Rt){if(!zr(Wt,Rt))return;Wt[Rt]=[]},e.removeAllHooks=function(){Wt=Jd()},e}var Re=sp();var hs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,el=/\s/,KC=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let n=r.indexOf(`
1
+ import{Se,Te,_}from"./chunk-nvt9tkt4.js";var Ia=Te(function(Sh,Th){(function(r,e){typeof Sh=="object"&&typeof Th<"u"?Th.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(Sh,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",n="minute",c="hour",h="day",g="week",y="month",f="quarter",B="year",v="date",q="Invalid Date",W=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,H=/\[([^\]]+)]|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,Y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(kt){var st=["th","st","nd","rd"],at=kt%100;return"["+kt+(st[(at-20)%10]||st[at]||st[0])+"]"}},j=function(kt,st,at){var xt=String(kt);return!xt||xt.length>=st?kt:""+Array(st+1-xt.length).join(at)+kt},X={s:j,z:function(kt){var st=-kt.utcOffset(),at=Math.abs(st),xt=Math.floor(at/60),ot=at%60;return(st<=0?"+":"-")+j(xt,2,"0")+":"+j(ot,2,"0")},m:function kt(st,at){if(st.date()<at.date())return-kt(at,st);var xt=12*(at.year()-st.year())+(at.month()-st.month()),ot=st.clone().add(xt,y),St=at-ot<0,Lt=st.clone().add(xt+(St?-1:1),y);return+(-(xt+(at-ot)/(St?ot-Lt:Lt-ot))||0)},a:function(kt){return kt<0?Math.ceil(kt)||0:Math.floor(kt)},p:function(kt){return{M:y,y:B,w:g,d:h,D:v,h:c,m:n,s:o,ms:s,Q:f}[kt]||String(kt||"").toLowerCase().replace(/s$/,"")},u:function(kt){return kt===void 0}},Q="en",rt={};rt[Q]=Y;var it="$isDayjsObject",ct=function(kt){return kt instanceof vt||!(!kt||!kt[it])},lt=function kt(st,at,xt){var ot;if(!st)return Q;if(typeof st=="string"){var St=st.toLowerCase();rt[St]&&(ot=St),at&&(rt[St]=at,ot=St);var Lt=st.split("-");if(!ot&&Lt.length>1)return kt(Lt[0])}else{var Yt=st.name;rt[Yt]=st,ot=Yt}return!xt&&ot&&(Q=ot),ot||!xt&&Q},pt=function(kt,st){if(ct(kt))return kt.clone();var at=typeof st=="object"?st:{};return at.date=kt,at.args=arguments,new vt(at)},bt=X;bt.l=lt,bt.i=ct,bt.w=function(kt,st){return pt(kt,{locale:st.$L,utc:st.$u,x:st.$x,$offset:st.$offset})};var vt=function(){function kt(at){this.$L=lt(at.locale,null,!0),this.parse(at),this.$x=this.$x||at.x||{},this[it]=!0}var st=kt.prototype;return st.parse=function(at){this.$d=function(xt){var{date:ot,utc:St}=xt;if(ot===null)return new Date(NaN);if(bt.u(ot))return new Date;if(ot instanceof Date)return new Date(ot);if(typeof ot=="string"&&!/Z$/i.test(ot)){var Lt=ot.match(W);if(Lt){var Yt=Lt[2]-1||0,Ht=(Lt[7]||"0").substring(0,3);return St?new Date(Date.UTC(Lt[1],Yt,Lt[3]||1,Lt[4]||0,Lt[5]||0,Lt[6]||0,Ht)):new Date(Lt[1],Yt,Lt[3]||1,Lt[4]||0,Lt[5]||0,Lt[6]||0,Ht)}}return new Date(ot)}(at),this.init()},st.init=function(){var at=this.$d;this.$y=at.getFullYear(),this.$M=at.getMonth(),this.$D=at.getDate(),this.$W=at.getDay(),this.$H=at.getHours(),this.$m=at.getMinutes(),this.$s=at.getSeconds(),this.$ms=at.getMilliseconds()},st.$utils=function(){return bt},st.isValid=function(){return this.$d.toString()!==q},st.isSame=function(at,xt){var ot=pt(at);return this.startOf(xt)<=ot&&ot<=this.endOf(xt)},st.isAfter=function(at,xt){return pt(at)<this.startOf(xt)},st.isBefore=function(at,xt){return this.endOf(xt)<pt(at)},st.$g=function(at,xt,ot){return bt.u(at)?this[xt]:this.set(ot,at)},st.unix=function(){return Math.floor(this.valueOf()/1000)},st.valueOf=function(){return this.$d.getTime()},st.startOf=function(at,xt){var ot=this,St=!!bt.u(xt)||xt,Lt=bt.p(at),Yt=function(re,ce){var ue=bt.w(ot.$u?Date.UTC(ot.$y,ce,re):new Date(ot.$y,ce,re),ot);return St?ue:ue.endOf(h)},Ht=function(re,ce){return bt.w(ot.toDate()[re].apply(ot.toDate("s"),(St?[0,0,0,0]:[23,59,59,999]).slice(ce)),ot)},he=this.$W,ne=this.$M,_e=this.$D,Ae="set"+(this.$u?"UTC":"");switch(Lt){case B:return St?Yt(1,0):Yt(31,11);case y:return St?Yt(1,ne):Yt(0,ne+1);case g:var xe=this.$locale().weekStart||0,Wt=(he<xe?he+7:he)-xe;return Yt(St?_e-Wt:_e+(6-Wt),ne);case h:case v:return Ht(Ae+"Hours",0);case c:return Ht(Ae+"Minutes",1);case n:return Ht(Ae+"Seconds",2);case o:return Ht(Ae+"Milliseconds",3);default:return this.clone()}},st.endOf=function(at){return this.startOf(at,!1)},st.$set=function(at,xt){var ot,St=bt.p(at),Lt="set"+(this.$u?"UTC":""),Yt=(ot={},ot[h]=Lt+"Date",ot[v]=Lt+"Date",ot[y]=Lt+"Month",ot[B]=Lt+"FullYear",ot[c]=Lt+"Hours",ot[n]=Lt+"Minutes",ot[o]=Lt+"Seconds",ot[s]=Lt+"Milliseconds",ot)[St],Ht=St===h?this.$D+(xt-this.$W):xt;if(St===y||St===B){var he=this.clone().set(v,1);he.$d[Yt](Ht),he.init(),this.$d=he.set(v,Math.min(this.$D,he.daysInMonth())).$d}else Yt&&this.$d[Yt](Ht);return this.init(),this},st.set=function(at,xt){return this.clone().$set(at,xt)},st.get=function(at){return this[bt.p(at)]()},st.add=function(at,xt){var ot,St=this;at=Number(at);var Lt=bt.p(xt),Yt=function(ne){var _e=pt(St);return bt.w(_e.date(_e.date()+Math.round(ne*at)),St)};if(Lt===y)return this.set(y,this.$M+at);if(Lt===B)return this.set(B,this.$y+at);if(Lt===h)return Yt(1);if(Lt===g)return Yt(7);var Ht=(ot={},ot[n]=e,ot[c]=i,ot[o]=r,ot)[Lt]||1,he=this.$d.getTime()+at*Ht;return bt.w(he,this)},st.subtract=function(at,xt){return this.add(-1*at,xt)},st.format=function(at){var xt=this,ot=this.$locale();if(!this.isValid())return ot.invalidDate||q;var St=at||"YYYY-MM-DDTHH:mm:ssZ",Lt=bt.z(this),Yt=this.$H,Ht=this.$m,he=this.$M,{weekdays:ne,months:_e,meridiem:Ae}=ot,xe=function(ce,ue,Ke,Xe){return ce&&(ce[ue]||ce(xt,St))||Ke[ue].slice(0,Xe)},Wt=function(ce){return bt.s(Yt%12||12,ce,"0")},re=Ae||function(ce,ue,Ke){var Xe=ce<12?"AM":"PM";return Ke?Xe.toLowerCase():Xe};return St.replace(H,function(ce,ue){return ue||function(Ke){switch(Ke){case"YY":return String(xt.$y).slice(-2);case"YYYY":return bt.s(xt.$y,4,"0");case"M":return he+1;case"MM":return bt.s(he+1,2,"0");case"MMM":return xe(ot.monthsShort,he,_e,3);case"MMMM":return xe(_e,he);case"D":return xt.$D;case"DD":return bt.s(xt.$D,2,"0");case"d":return String(xt.$W);case"dd":return xe(ot.weekdaysMin,xt.$W,ne,2);case"ddd":return xe(ot.weekdaysShort,xt.$W,ne,3);case"dddd":return ne[xt.$W];case"H":return String(Yt);case"HH":return bt.s(Yt,2,"0");case"h":return Wt(1);case"hh":return Wt(2);case"a":return re(Yt,Ht,!0);case"A":return re(Yt,Ht,!1);case"m":return String(Ht);case"mm":return bt.s(Ht,2,"0");case"s":return String(xt.$s);case"ss":return bt.s(xt.$s,2,"0");case"SSS":return bt.s(xt.$ms,3,"0");case"Z":return Lt}return null}(ce)||Lt.replace(":","")})},st.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},st.diff=function(at,xt,ot){var St,Lt=this,Yt=bt.p(xt),Ht=pt(at),he=(Ht.utcOffset()-this.utcOffset())*e,ne=this-Ht,_e=function(){return bt.m(Lt,Ht)};switch(Yt){case B:St=_e()/12;break;case y:St=_e();break;case f:St=_e()/3;break;case g:St=(ne-he)/604800000;break;case h:St=(ne-he)/86400000;break;case c:St=ne/i;break;case n:St=ne/e;break;case o:St=ne/r;break;default:St=ne}return ot?St:bt.a(St)},st.daysInMonth=function(){return this.endOf(y).$D},st.$locale=function(){return rt[this.$L]},st.locale=function(at,xt){if(!at)return this.$L;var ot=this.clone(),St=lt(at,xt,!0);return St&&(ot.$L=St),ot},st.clone=function(){return bt.w(this.$d,this)},st.toDate=function(){return new Date(this.valueOf())},st.toJSON=function(){return this.isValid()?this.toISOString():null},st.toISOString=function(){return this.$d.toISOString()},st.toString=function(){return this.$d.toUTCString()},kt}(),wt=vt.prototype;return pt.prototype=wt,[["$ms",s],["$s",o],["$m",n],["$H",c],["$W",h],["$M",y],["$y",B],["$D",v]].forEach(function(kt){wt[kt[1]]=function(st){return this.$g(st,kt[0],kt[1])}}),pt.extend=function(kt,st){return kt.$i||(kt(st,vt,pt),kt.$i=!0),pt},pt.locale=lt,pt.isDayjs=ct,pt.unix=function(kt){return pt(1000*kt)},pt.en=rt[Q],pt.Ls=rt,pt.p={},pt})});var sm=Te(function(im){Object.defineProperty(im,"__esModule",{value:!0});im.BLANK_URL=im.relativeFirstCharacters=im.whitespaceEscapeCharsRegex=im.urlSchemeRegex=im.ctrlCharactersRegex=im.htmlCtrlEntityRegex=im.htmlEntitiesRegex=im.invalidProtocolRegex=void 0;im.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;im.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;im.htmlCtrlEntityRegex=/&(newline|tab);/gi;im.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;im.urlSchemeRegex=/^.+(:|&colon;)/gim;im.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;im.relativeFirstCharacters=[".","/"];im.BLANK_URL="about:blank"});var Gn=Te(function(nm){Object.defineProperty(nm,"__esModule",{value:!0});nm.sanitizeUrl=T2;var Br=sm();function k2(r){return Br.relativeFirstCharacters.indexOf(r[0])>-1}function w2(r){var e=r.replace(Br.ctrlCharactersRegex,"");return e.replace(Br.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function S2(r){return URL.canParse(r)}function am(r){try{return decodeURIComponent(r)}catch(e){return r}}function T2(r){if(!r)return Br.BLANK_URL;var e,i=am(r.trim());do i=w2(i).replace(Br.htmlCtrlEntityRegex,"").replace(Br.ctrlCharactersRegex,"").replace(Br.whitespaceEscapeCharsRegex,"").trim(),i=am(i),e=i.match(Br.ctrlCharactersRegex)||i.match(Br.htmlEntitiesRegex)||i.match(Br.htmlCtrlEntityRegex)||i.match(Br.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Br.BLANK_URL;if(k2(s))return s;var o=s.trimStart(),n=o.match(Br.urlSchemeRegex);if(!n)return s;var c=n[0].toLowerCase().trim();if(Br.invalidProtocolRegex.test(c))return Br.BLANK_URL;var h=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return h;if(c==="http:"||c==="https:"){if(!S2(h))return Br.BLANK_URL;var g=new URL(h);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return h}});var _d=Object.defineProperty,t=(r,e)=>_d(r,"name",{value:e,configurable:!0}),Kt=(r,e)=>{for(var i in e)_d(r,i,{get:e[i],enumerable:!0})};var Bd=Se(Ia(),1),no={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},a={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},Vr=t(function(r="fatal"){let e=no.fatal;if(typeof r==="string"){if(r.toLowerCase()in no)e=no[r]}else if(typeof r==="number")e=r;if(a.trace=()=>{},a.debug=()=>{},a.info=()=>{},a.warn=()=>{},a.error=()=>{},a.fatal=()=>{},e<=no.fatal)a.fatal=console.error?console.error.bind(console,gi("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",gi("FATAL"));if(e<=no.error)a.error=console.error?console.error.bind(console,gi("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",gi("ERROR"));if(e<=no.warn)a.warn=console.warn?console.warn.bind(console,gi("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",gi("WARN"));if(e<=no.info)a.info=console.info?console.info.bind(console,gi("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",gi("INFO"));if(e<=no.debug)a.debug=console.debug?console.debug.bind(console,gi("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",gi("DEBUG"));if(e<=no.trace)a.trace=console.debug?console.debug.bind(console,gi("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",gi("TRACE"))},"setLogLevel"),gi=t((r)=>`%c${Bd.default().format("ss.SSS")} : ${r} : `,"format");var On={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,n=2*i-o;switch(s){case"r":return On.hue2rgb(n,o,r+0.3333333333333333)*255;case"g":return On.hue2rgb(n,o,r)*255;case"b":return On.hue2rgb(n,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),n=Math.min(r,e,i),c=(o+n)/2;if(s==="l")return c*100;if(o===n)return 0;let h=o-n,g=c>0.5?h/(2-o-n):h/(o+n);if(s==="s")return g*100;switch(o){case r:return((e-i)/h+(e<i?6:0))*60;case e:return((i-r)/h+2)*60;case i:return((r-e)/h+4)*60;default:return-1}}},vd=On;var rC={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},Ld=rC;var iC={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Fd=iC;var oC={channel:vd,lang:Ld,unit:Fd},z=oC;var lo={};for(let r=0;r<=255;r++)lo[r]=z.unit.dec2hex(r);var lr={ALL:0,RGB:1,HSL:2};class Ad{constructor(){this.type=lr.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=lr.ALL}is(r){return this.type===r}}var Md=Ad;class Ed{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Md}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=lr.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=z.channel.rgb2hsl(r,"h");if(i===void 0)r.s=z.channel.rgb2hsl(r,"s");if(s===void 0)r.l=z.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=z.channel.hsl2rgb(r,"r");if(i===void 0)r.g=z.channel.hsl2rgb(r,"g");if(s===void 0)r.b=z.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(lr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(lr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(lr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(lr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(lr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(lr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(lr.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(lr.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(lr.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(lr.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(lr.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(lr.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Od=Ed;var sC=new Od({r:0,g:0,b:0,a:0},"transparent"),Ho=sC;var Id={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Id.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,n=o%4===0,c=o>4,h=c?1:17,g=c?8:4,y=n?0:-1,f=c?255:15;return Ho.set({r:(s>>g*(y+3)&f)*h,g:(s>>g*(y+2)&f)*h,b:(s>>g*(y+1)&f)*h,a:n?(s&f)*h/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${lo[Math.round(e)]}${lo[Math.round(i)]}${lo[Math.round(s)]}${lo[Math.round(o*255)]}`;else return`#${lo[Math.round(e)]}${lo[Math.round(i)]}${lo[Math.round(s)]}`}},Zo=Id;var $n={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($n.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return z.channel.clamp.h(parseFloat(i)*0.9);case"rad":return z.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return z.channel.clamp.h(parseFloat(i)*360)}}return z.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match($n.re);if(!i)return;let[,s,o,n,c,h]=i;return Ho.set({h:$n._hue2deg(s),s:z.channel.clamp.s(parseFloat(o)),l:z.channel.clamp.l(parseFloat(n)),a:c?z.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%, ${o})`;else return`hsl(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%)`}},Us=$n;var Pn={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=Pn.colors[r];if(!e)return;return Zo.parse(e)},stringify:(r)=>{let e=Zo.stringify(r);for(let i in Pn.colors)if(Pn.colors[i]===e)return i;return}},_h=Pn;var $d={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($d.re);if(!i)return;let[,s,o,n,c,h,g,y,f]=i;return Ho.set({r:z.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:z.channel.clamp.g(c?parseFloat(n)*2.55:parseFloat(n)),b:z.channel.clamp.b(g?parseFloat(h)*2.55:parseFloat(h)),a:y?z.channel.clamp.a(f?parseFloat(y)/100:parseFloat(y)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)}, ${z.lang.round(o)})`;else return`rgb(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)})`}},js=$d;var aC={format:{keyword:_h,hex:Zo,rgb:js,rgba:js,hsl:Us,hsla:Us},parse:(r)=>{if(typeof r!=="string")return r;let e=Zo.parse(r)||js.parse(r)||Us.parse(r)||_h.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(lr.HSL)||r.data.r===void 0)return Us.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return js.stringify(r);else return Zo.stringify(r)}},De=aC;var nC=(r,e)=>{let i=De.parse(r);for(let s in e)i[s]=z.channel.clamp[s](e[s]);return De.stringify(i)},Nn=nC;var lC=(r,e,i=0,s=1)=>{if(typeof r!=="number")return Nn(r,{a:e});let o=Ho.set({r:z.channel.clamp.r(r),g:z.channel.clamp.g(e),b:z.channel.clamp.b(i),a:z.channel.clamp.a(s)});return De.stringify(o)},de=lC;var hC=(r)=>{let{r:e,g:i,b:s}=De.parse(r),o=0.2126*z.channel.toLinear(e)+0.7152*z.channel.toLinear(i)+0.0722*z.channel.toLinear(s);return z.lang.round(o)},Dd=hC;var cC=(r)=>Dd(r)>=0.5,Pd=cC;var uC=(r)=>!Pd(r),K=uC;var fC=(r,e,i)=>{let s=De.parse(r),o=s[e],n=z.channel.clamp[e](o+i);if(o!==n)s[e]=n;return De.stringify(s)},br=fC;var dC=(r,e)=>br(r,"l",e),u=dC;var pC=(r,e)=>br(r,"l",-e),d=pC;var gC=(r,e)=>{let i=De.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return Nn(r,s)},G=gC;var mC=(r,e,i=50)=>{let{r:s,g:o,b:n,a:c}=De.parse(r),{r:h,g,b:y,a:f}=De.parse(e),B=i/100,v=B*2-1,q=c-f,H=((v*q===-1?v:(v+q)/(1+v*q))+1)/2,Y=1-H,j=s*H+h*Y,X=o*H+g*Y,Q=n*H+y*Y,rt=c*B+f*(1-B);return de(j,X,Q,rt)},Rd=mC;var yC=(r,e=100)=>{let i=De.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Rd(i,r,e)},ut=yC;/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function xC(r,e){this.v=r,this.k=e}function qd(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,s=Array(e);i<e;i++)s[i]=r[i];return s}function CC(r){if(Array.isArray(r))return r}function bC(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,n,c,h=[],g=!0,y=!1;try{if(n=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;g=!1}else for(;!(g=(s=n.call(i)).done)&&(h.push(s.value),h.length!==e);g=!0);}catch(f){y=!0,o=f}finally{try{if(!g&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(y)throw o}}return h}}function kC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function wC(r,e){return CC(r)||bC(r,e)||SC(r,e)||kC()}function SC(r,e){if(r){if(typeof r=="string")return qd(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qd(r,e):void 0}}function Xn(r){var e,i;function s(n,c){try{var h=r[n](c),g=h.value,y=g instanceof xC;Promise.resolve(y?g.v:g).then(function(f){if(y){var B=n==="return"&&g.k?n:"next";if(!g.k||f.done)return s(B,f);f=r[B](f).value}o(!!h.done,f)},function(f){s("throw",f)})}catch(f){o(2,f)}}function o(n,c){n===2?e.reject(c):e.resolve({value:c,done:n}),(e=e.next)?s(e.key,e.arg):i=null}this._invoke=function(n,c){return new Promise(function(h,g){var y={key:n,arg:c,resolve:h,reject:g,next:null};i?i=i.next=y:(e=i=y,s(n,c))})},typeof r.return!="function"&&(this.return=void 0)}Xn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Xn.prototype.next=function(r){return this._invoke("next",r)},Xn.prototype.throw=function(r){return this._invoke("throw",r)},Xn.prototype.return=function(r){return this._invoke("return",r)};var{entries:tp,setPrototypeOf:Nd,isFrozen:TC,getPrototypeOf:ep,getOwnPropertyDescriptor:rp,freeze:cr,seal:dr,create:ps}=Object,ip=typeof Reflect<"u"&&Reflect,{apply:$h,construct:Dh}=ip;if(!cr)cr=function(e){return e};if(!dr)dr=function(e){return e};if(!$h)$h=function(e,i){for(var s=arguments.length,o=Array(s>2?s-2:0),n=2;n<s;n++)o[n-2]=arguments[n];return e.apply(i,o)};if(!Dh)Dh=function(e){for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return new e(...s)};var Bo=Qe(Array.prototype.forEach);Array.prototype.indexOf;var _C=Qe(Array.prototype.lastIndexOf),Wd=Qe(Array.prototype.pop),Gs=Qe(Array.prototype.push),BC=Qe(Array.prototype.slice),vC=Qe(Array.prototype.splice),gs=Array.isArray,Bh=op(Set),vh=Qe(Set.prototype.add),Xs=Qe(Set.prototype.has),Qo=Qe(String.prototype.toLowerCase),Lh=Qe(String.prototype.toString),zd=Qe(String.prototype.match),Vs=Qe(String.prototype.replace),Hd=Qe(String.prototype.indexOf),LC=Qe(String.prototype.trim),FC=Qe(Number.prototype.toString),AC=Qe(Boolean.prototype.toString),Yd=typeof BigInt>"u"?null:Qe(BigInt.prototype.toString),Ud=typeof Symbol>"u"?null:Qe(Symbol.prototype.toString),zr=Qe(Object.prototype.hasOwnProperty),Ks=Qe(Object.prototype.toString),fr=Qe(RegExp.prototype.test),Lo=op(TypeError);function Qe(r){return function(e){if(e instanceof RegExp)e.lastIndex=0;for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return $h(r,e,s)}}function op(r){return function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];return Dh(r,i)}}function Ie(r,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qo;if(Nd)Nd(r,null);if(!gs(e))return r;let s=e.length;while(s--){let o=e[s];if(typeof o==="string"){let n=i(o);if(n!==o){if(!TC(e))e[s]=n;o=n}}r[o]=!0}return r}function MC(r){for(let e=0;e<r.length;e++)if(!zr(r,e))r[e]=null;return r}function hi(r){let e=ps(null);for(let s of tp(r)){var i=wC(s,2);let o=i[0],n=i[1];if(zr(r,o))if(gs(n))e[o]=MC(n);else if(n&&typeof n==="object"&&n.constructor===Object)e[o]=hi(n);else e[o]=n}return e}function EC(r){switch(typeof r){case"string":return r;case"number":return FC(r);case"boolean":return AC(r);case"bigint":return Yd?Yd(r):"0";case"symbol":return Ud?Ud(r):"Symbol()";case"undefined":return Ks(r);case"function":case"object":{if(r===null)return Ks(r);let e=r,i=mi(e,"toString");if(typeof i==="function"){let s=i(e);return typeof s==="string"?s:Ks(s)}return Ks(r)}default:return Ks(r)}}function mi(r,e){while(r!==null){let s=rp(r,e);if(s){if(s.get)return Qe(s.get);if(typeof s.value==="function")return Qe(s.value)}r=ep(r)}function i(){return null}return i}function OC(r,e){while(r!==null){let i=rp(r,e);if(i)return i.get?Qe(i.get):null;r=ep(r)}return null}function IC(r){try{return fr(r,""),!0}catch(e){return!1}}var jd=cr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Fh=cr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ah=cr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$C=cr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mh=cr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),DC=cr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gd=cr(["#text"]),Xd=cr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Eh=cr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Vd=cr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kn=cr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),PC=dr(/{{[\w\W]*|^[\w\W]*}}/g),RC=dr(/<%[\w\W]*|^[\w\W]*%>/g),qC=dr(/\${[\w\W]*/g),NC=dr(/^data-[\-\w.\u00B7-\uFFFF]+$/),WC=dr(/^aria-[\-\w]+$/),Kd=dr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zC=dr(/^(?:\w+script|data):/i),HC=dr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),YC=dr(/^html$/i),UC=dr(/^[a-z][.\w]*(-[.\w]+)+$/i),Oh=dr(/<[/\w!]/g),Zd=dr(/<[/\w]/g),jC=dr(/<\/no(script|embed|frames)/i),Qd=dr(/\/>/i),ar={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GC=cr(Ie({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),XC=function(){return typeof window>"u"?null:window},VC=function(e,i){if(typeof e!=="object"||typeof e.createPolicy!=="function")return null;let s=null,o="data-tt-policy-suffix";if(i&&i.hasAttribute(o))s=i.getAttribute(o);let n="dompurify"+(s?"#"+s:"");try{return e.createPolicy(n,{createHTML(c){return c},createScriptURL(c){return c}})}catch(c){return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Jd=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Yo=function(e,i,s,o){return zr(e,i)&&gs(e[i])?Ie(o.base?hi(o.base):{},e[i],o.transform):s},Ih=function(e,i,s){let o=zr(e,i)?e[i]:void 0;return o&&typeof o==="object"?hi(o):s()};function sp(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:XC(),e=(Rt)=>sp(Rt);if(e.version="3.4.17",e.removed=[],!r||!r.document||r.document.nodeType!==ar.document||!r.Element)return e.isSupported=!1,e;let i=r.document,s=i,o=s.currentScript;r.DocumentFragment;let{HTMLTemplateElement:n,Node:c,Element:h,NodeFilter:g}=r;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let{DOMParser:y,trustedTypes:f}=r,B=h.prototype,v=mi(B,"cloneNode"),q=mi(B,"remove"),W=mi(B,"removeAttributeNode"),H=mi(B,"nextSibling"),Y=mi(B,"childNodes"),j=mi(B,"parentNode"),X=mi(B,"shadowRoot"),Q=mi(B,"attributes"),rt=c&&c.prototype?mi(c.prototype,"nodeType"):null,it=c&&c.prototype?mi(c.prototype,"nodeName"):null,ct=c&&c.prototype?mi(c.prototype,"ownerDocument"):null,lt=function(J){return rt?rt(J):J.nodeType},pt=function(J){return it?it(J):J.nodeName},bt=OC(B,"namespaceURI"),vt=function(J){return bt?bt(J):J.namespaceURI};if(typeof n==="function"){let Rt=i.createElement("template");if(Rt.content&&Rt.content.ownerDocument)i=Rt.content.ownerDocument}let wt,kt="",st,at=!1,xt=0,ot=function(){if(xt>0)throw Lo('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},St=function(J){ot(),xt++;try{return wt.createHTML(J)}finally{xt--}},Lt=function(J){ot(),xt++;try{return wt.createScriptURL(J)}finally{xt--}},Yt=function(){if(!at)st=VC(f,o),at=!0;return st},Ht=i,{implementation:he,createNodeIterator:ne,createDocumentFragment:_e,getElementsByTagName:Ae}=Ht,xe=s.importNode,Wt=Jd();e.isSupported=typeof tp==="function"&&typeof j==="function"&&he&&he.createHTMLDocument!==void 0;let re=PC,ce=RC,ue=qC,Ke=NC,Xe=WC,xi=zC,io=HC,di=UC,Do=Kd,je=null,$r=Ie({},[...jd,...Fh,...Ah,...Mh,...Gd]),Pe=null,oo=Ie({},[...Xd,...Eh,...Vd,...Kn]),ur=Object.seal(ps(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pi=null,Po=null,sr=Object.seal(ps(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ro=!0,_i=!0,so=!1,ao=!0,D=!1,mt=!0,Bt=!1,Mt=!1,_t=null,Nt=null,Z=!1,Ct=!1,Dt=!1,Ft=!1,Ot=!0,qt=!1,Pt="user-content-",Vt=!0,Xt=!1,Zt=null,ee={},ve=null,Ge=Ie({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Ws=null,qo=Ie({},["audio","video","img","source","image","track"]),No=null,ld=Ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wn="http://www.w3.org/1998/Math/MathML",_n="http://www.w3.org/2000/svg",vi="http://www.w3.org/1999/xhtml",hs=vi,hh=!1,ch=null,D0=Ie({},[wn,_n,vi],Lh),hd=cr(["mi","mo","mn","ms","mtext"]),uh=Ie({},hd),cd=cr(["annotation-xml"]),fh=Ie({},cd),P0=Ie({},["title","style","font","a","script"]),zs=null,R0=["application/xhtml+xml","text/html"],q0="text/html",ir=null,cs=null,N0=i.createElement("form"),ud=function(J){return J instanceof RegExp||J instanceof Function},dh=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(cs&&cs===J)return;if(!J||typeof J!=="object")J={};J=hi(J),zs=R0.indexOf(J.PARSER_MEDIA_TYPE)===-1?q0:J.PARSER_MEDIA_TYPE,ir=zs==="application/xhtml+xml"?Lh:Qo,je=Yo(J,"ALLOWED_TAGS",$r,{transform:ir}),Pe=Yo(J,"ALLOWED_ATTR",oo,{transform:ir}),ch=Yo(J,"ALLOWED_NAMESPACES",D0,{transform:Lh}),No=Yo(J,"ADD_URI_SAFE_ATTR",ld,{transform:ir,base:ld}),Ws=Yo(J,"ADD_DATA_URI_TAGS",qo,{transform:ir,base:qo}),ve=Yo(J,"FORBID_CONTENTS",Ge,{transform:ir}),pi=Yo(J,"FORBID_TAGS",hi({}),{transform:ir}),Po=Yo(J,"FORBID_ATTR",hi({}),{transform:ir}),ee=zr(J,"USE_PROFILES")?J.USE_PROFILES&&typeof J.USE_PROFILES==="object"?hi(J.USE_PROFILES):J.USE_PROFILES:!1,Ro=J.ALLOW_ARIA_ATTR!==!1,_i=J.ALLOW_DATA_ATTR!==!1,so=J.ALLOW_UNKNOWN_PROTOCOLS||!1,ao=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=J.SAFE_FOR_TEMPLATES||!1,mt=J.SAFE_FOR_XML!==!1,Bt=J.WHOLE_DOCUMENT||!1,Ct=J.RETURN_DOM||!1,Dt=J.RETURN_DOM_FRAGMENT||!1,Ft=J.RETURN_TRUSTED_TYPE||!1,Z=J.FORCE_BODY||!1,Ot=J.SANITIZE_DOM!==!1,qt=J.SANITIZE_NAMED_PROPS||!1,Vt=J.KEEP_CONTENT!==!1,Xt=J.IN_PLACE||!1,Do=IC(J.ALLOWED_URI_REGEXP)?J.ALLOWED_URI_REGEXP:Kd,hs=typeof J.NAMESPACE==="string"?J.NAMESPACE:vi,uh=Ih(J,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ie({},hd)),fh=Ih(J,"HTML_INTEGRATION_POINTS",()=>Ie({},cd));let dt=Ih(J,"CUSTOM_ELEMENT_HANDLING",()=>ps(null));if(ur=ps(null),zr(dt,"tagNameCheck")&&ud(dt.tagNameCheck))ur.tagNameCheck=dt.tagNameCheck;if(zr(dt,"attributeNameCheck")&&ud(dt.attributeNameCheck))ur.attributeNameCheck=dt.attributeNameCheck;if(zr(dt,"allowCustomizedBuiltInElements")&&typeof dt.allowCustomizedBuiltInElements==="boolean")ur.allowCustomizedBuiltInElements=dt.allowCustomizedBuiltInElements;if(dr(ur),D)_i=!1;if(Dt)Ct=!0;if(ee){if(je=Ie({},Gd),Pe=ps(null),ee.html===!0)Ie(je,jd),Ie(Pe,Xd);if(ee.svg===!0)Ie(je,Fh),Ie(Pe,Eh),Ie(Pe,Kn);if(ee.svgFilters===!0)Ie(je,Ah),Ie(Pe,Eh),Ie(Pe,Kn);if(ee.mathMl===!0)Ie(je,Mh),Ie(Pe,Vd),Ie(Pe,Kn)}if(sr.tagCheck=null,sr.attributeCheck=null,zr(J,"ADD_TAGS")){if(typeof J.ADD_TAGS==="function")sr.tagCheck=J.ADD_TAGS;else if(gs(J.ADD_TAGS)){if(je===$r)je=hi(je);Ie(je,J.ADD_TAGS,ir)}}if(zr(J,"ADD_ATTR")){if(typeof J.ADD_ATTR==="function")sr.attributeCheck=J.ADD_ATTR;else if(gs(J.ADD_ATTR)){if(Pe===oo)Pe=hi(Pe);Ie(Pe,J.ADD_ATTR,ir)}}if(zr(J,"ADD_FORBID_CONTENTS")&&gs(J.ADD_FORBID_CONTENTS)){if(ve===Ge)ve=hi(ve);Ie(ve,J.ADD_FORBID_CONTENTS,ir)}if(Vt)je["#text"]=!0;if(Bt)Ie(je,["html","head","body"]);if(je.table)Ie(je,["tbody"]),delete pi.tbody;if(J.TRUSTED_TYPES_POLICY){if(typeof J.TRUSTED_TYPES_POLICY.createHTML!=="function")throw Lo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof J.TRUSTED_TYPES_POLICY.createScriptURL!=="function")throw Lo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let It=wt;wt=J.TRUSTED_TYPES_POLICY;try{kt=St("")}catch($t){throw wt=It,$t}}else if(J.TRUSTED_TYPES_POLICY===null)wt=void 0,kt="";else{if(wt===void 0)wt=Yt();if(wt&&typeof kt==="string")kt=St("")}if(cr)cr(J);cs=J},fd=Ie({},[...Fh,...Ah,...$C]),dd=Ie({},[...Mh,...DC]),W0=function(J,dt,It){if(dt.namespaceURI===vi)return J==="svg";if(dt.namespaceURI===wn)return J==="svg"&&(It==="annotation-xml"||uh[It]);return Boolean(fd[J])},z0=function(J,dt,It){if(dt.namespaceURI===vi)return J==="math";if(dt.namespaceURI===_n)return J==="math"&&fh[It];return Boolean(dd[J])},H0=function(J,dt,It){if(dt.namespaceURI===_n&&!fh[It])return!1;if(dt.namespaceURI===wn&&!uh[It])return!1;return!dd[J]&&(P0[J]||!fd[J])},Y0=function(J){let dt=vt(J),It=Qo(pt(J)),$t=j(J),ie,we;if($t&&lt($t)===ar.element)ie={namespaceURI:vt($t)},we=Qo(pt($t));else ie={namespaceURI:hs},we="template";if(!ch[dt])return!1;if(dt===_n)return W0(It,ie,we);if(dt===wn)return z0(It,ie,we);if(dt===vi)return H0(It,ie,we);if(zs==="application/xhtml+xml"&&ch[dt])return!0;return!1},Wo=function(J){Gs(e.removed,{element:J});try{j(J).removeChild(J)}catch(dt){if(q(J),!j(J))throw Lo("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pd=function(J,dt,It){try{W(J,dt)}catch($t){try{J.removeAttribute(It)}catch(ie){}}},ph=function(J){mh(J);let dt=Y(J);if(dt)Bo(BC(dt),($t)=>{try{q($t)}catch(ie){}});let It=lt(J)===ar.element?Q(J):null;if(It)for(let $t=It.length-1;$t>=0;--$t){let ie=It[$t],we=ie&&ie.name;if(typeof we==="string")pd(J,ie,we)}},us=function(J,dt,It){if(!It)try{It=dt.getAttributeNode(J)}catch($t){It=null}Gs(e.removed,{attribute:It||null,from:dt});try{if(It)W(dt,It);else dt.removeAttribute(J)}catch($t){try{dt.removeAttribute(J)}catch(ie){}}if(J==="is")if(Ct||Dt)try{Wo(dt)}catch($t){}else try{dt.setAttribute(J,"")}catch($t){}},gd=function(J){let dt=Q(J);if(!dt)return;for(let It=dt.length-1;It>=0;--It){let $t=dt[It],ie=$t&&$t.name;if(typeof ie!=="string"||Pe[ir(ie)])continue;pd(J,$t,ie)}},gh=function(J,dt){let It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$t=[J];while($t.length>0){let ie=$t.pop();if(dt(ie)===!1)continue;if(It&&lt(ie)===ar.element){let Ee=X(ie);if(zo(Ee))$t.push(Ee)}let we=Y(ie);if(we)for(let Ee=we.length-1;Ee>=0;--Ee)$t.push(we[Ee])}},mh=function(J){gh(J,(dt)=>{if(lt(dt)===ar.element)gd(dt)})},yh=function(J){let dt=[];return gh(J,(It)=>{dt.push(It)},!0),dt},U0=function(J,dt){let It=Bh();Bo(yh(J),($t)=>{if(lt($t)===ar.element)vh(It,$t)}),Bo(dt,($t)=>{if(lt($t)===ar.element&&!Xs(It,$t))gd($t)})},md=function(J,dt){let It=!1;return Bo(e.removed,($t)=>{if($t.element)It=It||$t.element===J,mh($t.element)}),U0(J,dt),It},j0=8,G0=function(J,dt){let It=Zt,$t=null,ie=()=>{if(!$t)$t=Bh(),Bo(dt,(we)=>{vh($t,we)});return $t};for(let we=0;;we++){let Ee=yh(J),nr=[J],Li=!1;if(Bo(Ee,(vr)=>{if(lt(vr)===ar.documentFragment)Gs(nr,vr);else if(!Li&&!Xs(It,vr))Li=Xs(ie(),vr)}),!Li)return;if(we>=j0)throw Lo("the tree kept changing during in-place sanitization; refusing to return it");Bo(nr,(vr,Pr)=>{X0(vr,Pr>0,J,ie())})}},X0=function(J,dt,It,$t){let ie=xh(J),we;while(we=ie.nextNode()){if(!Xs($t,we)||Xs(Zt,we))continue;if(dt)Ci(Wt.uponSanitizeShadowNode,we,null);if(bh(we,It),kh(we,It),zo(we.content))Ys(we.content)}},V0=function(J){if(Zt)vh(Zt,J)},yd=function(J,dt){if(!mt)return!1;if(J==="patchsrc")return!0;return J==="for"&&dt!=="label"&&dt!=="output"},K0=function(J){if(!mt)return;gh(J,(dt)=>{let It=lt(dt);if(It===ar.processingInstruction||It===ar.comment&&fr(Zd,dt.data)){try{q(dt)}catch($t){}return!1}if(It===ar.element){let $t=dt,ie=ir(pt(dt));try{if($t.hasAttribute&&$t.hasAttribute("patchsrc"))$t.removeAttribute("patchsrc");if($t.hasAttribute&&$t.hasAttribute("for")&&yd("for",ie))$t.removeAttribute("for")}catch(we){}}return!0})},xd=function(J){let dt=null,It=null;if(Z)J="<remove></remove>"+J;else{let we=zd(J,/^[\r\n\t ]+/);It=we&&we[0]}if(zs==="application/xhtml+xml"&&hs===vi)J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>";let $t=wt?St(J):J;if(hs===vi)try{dt=new y().parseFromString($t,zs)}catch(we){}if(!dt||!dt.documentElement){dt=he.createDocument(hs,"template",null);try{dt.documentElement.innerHTML=hh?kt:$t}catch(we){}}let ie=dt.body||dt.documentElement;if(J&&It)ie.insertBefore(i.createTextNode(It),ie.childNodes[0]||null);if(hs===vi)return Ae.call(dt,Bt?"html":"body")[0];return Bt?dt.documentElement:ie},xh=function(J){let dt=ct?ct(J):J.ownerDocument;return ne.call(dt||J,J,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},Bn=function(J){return J=Vs(J,re," "),J=Vs(J,ce," "),J=Vs(J,ue," "),J},Ch=function(J){var dt;Cd(J);let It=(dt=J.querySelectorAll)===null||dt===void 0?void 0:dt.call(J,"template");if(It)Bo(It,($t)=>{if(zo($t.content))Ch($t.content)})},Cd=function(J){J.normalize();let dt=ct?ct(J):J.ownerDocument,It=ne.call(dt||J,J,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null),$t=It.nextNode();while($t)$t.data=Bn($t.data),$t=It.nextNode()},vn=function(J){let dt=it?it(J):null;if(typeof dt!=="string")return!1;if(ir(dt)!=="form")return!1;return typeof J.nodeName!=="string"||typeof J.textContent!=="string"||typeof J.removeChild!=="function"||J.attributes!==Q(J)||typeof J.removeAttribute!=="function"||typeof J.removeAttributeNode!=="function"||typeof J.getAttributeNode!=="function"||typeof J.setAttribute!=="function"||typeof J.namespaceURI!=="string"||typeof J.insertBefore!=="function"||typeof J.hasChildNodes!=="function"||J.nodeType!==rt(J)||J.childNodes!==Y(J)},zo=function(J){if(!rt||typeof J!=="object"||J===null)return!1;try{return rt(J)===ar.documentFragment}catch(dt){return!1}},Hs=function(J){if(!rt||typeof J!=="object"||J===null)return!1;try{return typeof rt(J)==="number"}catch(dt){return!1}};function Ci(Rt,J,dt){if(Rt.length===0)return;Bo(Rt,(It)=>{It.call(e,J,dt,cs)})}let Z0=function(J,dt){if(mt&&J.hasChildNodes()&&!Hs(J.firstElementChild)&&fr(Oh,J.textContent)&&fr(Oh,J.innerHTML))return!0;if(mt&&GC[dt]&&lt(J)===ar.element&&vt(J)===vi&&(Hs(J.firstElementChild)||typeof J.textContent==="string"&&fr(Oh,J.textContent)))return!0;if(J.nodeType===ar.processingInstruction)return!0;if(mt&&J.nodeType===ar.comment&&fr(Zd,J.data))return!0;return!1},Mn=function(J,dt){if(J instanceof RegExp)return fr(J,dt);if(J instanceof Function){for(var It=arguments.length,$t=Array(It>2?It-2:0),ie=2;ie<It;ie++)$t[ie-2]=arguments[ie];return Boolean(J(dt,...$t))}return!1},Q0=function(J,dt,It){if(!pi[dt]&&wd(dt)&&Mn(ur.tagNameCheck,dt))return!1;if(Vt&&!ve[dt]&&!ve[Qo(dt)]){let $t=j(J),ie=Y(J);if(ie&&$t){let we=ie.length;for(let Ee=we-1;Ee>=0;--Ee){let nr=J===It?v(ie[Ee],!0):ie[Ee];$t.insertBefore(nr,H(J))}}}return Wo(J),!0},bd=function(J,dt,It,$t){if(J.length===0)return dt;return dt===It||dt===$t?hi(dt):dt},fs=function(J,dt){if(J===dt||j(J)!==null)return!1;if(Xt)mh(J);return!0},bh=function(J,dt){if(V0(J),Ci(Wt.beforeSanitizeElements,J,null),fs(J,dt))return!0;if(vn(J))return Wo(J),!0;let It=ir(pt(J));if(je=bd(Wt.uponSanitizeElement,je,$r,_t),Ci(Wt.uponSanitizeElement,J,{tagName:It,allowedTags:je}),fs(J,dt))return!0;if(Z0(J,It))return Wo(J),!0;if(pi[It]||!(sr.tagCheck instanceof Function&&sr.tagCheck(It))&&!je[It]){let $t=Q0(J,It,dt);if($t===!1){if(Ci(Wt.afterSanitizeElements,J,null),fs(J,dt))return!0}return $t}if(lt(J)===ar.element&&!Y0(J))return Wo(J),!0;if((It==="noscript"||It==="noembed"||It==="noframes")&&fr(jC,J.innerHTML))return Wo(J),!0;if(D&&J.nodeType===ar.text){let $t=Bn(J.textContent);if(J.textContent!==$t)Gs(e.removed,{element:J.cloneNode()}),J.textContent=$t}return Ci(Wt.afterSanitizeElements,J,null),fs(J,dt)},kd=function(J,dt,It){if(Po[dt])return!1;if(yd(dt,J))return!1;if(Ot&&(dt==="id"||dt==="name")&&((It in i)||(It in N0)))return!1;let $t=Pe[dt]||sr.attributeCheck instanceof Function&&sr.attributeCheck(dt,J);if(_i&&fr(Ke,dt))return!0;if(Ro&&fr(Xe,dt))return!0;if(!$t)return wd(J)&&Mn(ur.tagNameCheck,J)&&Mn(ur.attributeNameCheck,dt,J)||dt==="is"&&ur.allowCustomizedBuiltInElements&&Mn(ur.tagNameCheck,It);if(No[dt])return!0;if(fr(Do,Vs(It,io,"")))return!0;if((dt==="src"||dt==="xlink:href"||dt==="href")&&J!=="script"&&Hd(It,"data:")===0&&Ws[J])return!0;if(so&&!fr(xi,Vs(It,io,"")))return!0;return!It},J0=Ie({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),wd=function(J){return!J0[Qo(J)]&&fr(di,J)},tC=function(J,dt,It,$t){if(wt&&typeof f==="object"&&typeof f.getAttributeType==="function"&&!It)switch(f.getAttributeType(J,dt)){case"TrustedHTML":return St($t);case"TrustedScriptURL":return Lt($t)}return $t},eC=function(J,dt,It,$t){try{if(It)J.setAttributeNS(It,dt,$t);else J.setAttribute(dt,$t);if(vn(J))return Wo(J),!1;return!0}catch(ie){return us(dt,J),!1}},Sd=function(J,dt){if(mt&&fr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,dt))return!0;return Qo(J)==="attributename"&&zd(dt,"href")!==null},kh=function(J,dt){if(Ci(Wt.beforeSanitizeAttributes,J,null),fs(J,dt))return;let It=J.attributes;if(!It||vn(J))return;Pe=bd(Wt.uponSanitizeAttribute,Pe,oo,Nt);let $t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Pe,forceKeepAttr:void 0},ie=It.length,we=ir(J.nodeName);while(ie--){let Ee=It[ie],{name:nr,namespaceURI:Li,value:vr}=Ee,Pr=ir(nr),ds=vr,qr=nr==="value"?ds:LC(ds),Td=!1;if($t.attrName=Pr,$t.attrValue=qr,$t.keepAttr=!0,$t.forceKeepAttr=void 0,Ci(Wt.uponSanitizeAttribute,J,$t),qr=$t.attrValue,qt&&(Pr==="id"||Pr==="name")&&Hd(qr,Pt)!==0)us(nr,J,Ee),qr=Pt+qr,Td=!0;if(Sd(nr,qr)){us(nr,J,Ee);continue}if($t.forceKeepAttr)continue;if(!$t.keepAttr){us(nr,J,Ee);continue}if(!ao&&fr(Qd,qr)){us(nr,J,Ee);continue}if(D)qr=Bn(qr);if(!kd(we,Pr,qr)){us(nr,J,Ee);continue}if(qr=tC(we,Pr,Li,qr),qr!==ds){if(eC(J,nr,Li,qr)&&Td)Wd(e.removed)}}Ci(Wt.afterSanitizeAttributes,J,null),fs(J,dt)},Ys=function(J){let dt=null,It=xh(J);Ci(Wt.beforeSanitizeShadowDOM,J,null);while(dt=It.nextNode()){if(Ci(Wt.uponSanitizeShadowNode,dt,null),bh(dt,J),kh(dt,J),zo(dt.content))Ys(dt.content);if(lt(dt)===ar.element){let $t=X(dt);if(zo($t))wh($t),Ys($t)}}if(D)Cd(J);Ci(Wt.afterSanitizeShadowDOM,J,null)},wh=function(J){let dt=[{node:J,shadow:null}];while(dt.length>0){let It=dt.pop();if(It.shadow){Ys(It.shadow);continue}let $t=It.node,ie=lt($t)===ar.element,we=Y($t);if(we)for(let Ee=we.length-1;Ee>=0;--Ee)dt.push({node:we[Ee],shadow:null});if(ie){let Ee=it?it($t):null;if(typeof Ee==="string"&&ir(Ee)==="template"){let nr=$t.content;if(zo(nr))dt.push({node:nr,shadow:null})}}if(ie){let Ee=X($t);if(zo(Ee))dt.push({node:null,shadow:Ee},{node:Ee,shadow:null})}}};return e.sanitize=function(Rt){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dt=null,It=null,$t=null,ie=null;if(hh=!Rt,hh)Rt="<!-->";if(typeof Rt!=="string"&&!Hs(Rt)){if(Rt=EC(Rt),typeof Rt!=="string")throw Lo("dirty is not a string, aborting")}if(!e.isSupported)return Rt;if(Mt)je=_t,Pe=Nt;else dh(J);if(Wt.uponSanitizeElement.length>0||Wt.uponSanitizeAttribute.length>0)je=hi(je);if(Wt.uponSanitizeAttribute.length>0)Pe=hi(Pe);e.removed=[];let we=Xt&&typeof Rt!=="string"&&Hs(Rt),Ee=[],nr=Zt;if(we){K0(Rt);let Pr=pt(Rt);if(typeof Pr==="string"){let ds=ir(Pr);if(!je[ds]||pi[ds])throw ph(Rt),Lo("root node is forbidden and cannot be sanitized in-place")}if(vn(Rt))throw ph(Rt),Lo("root node is clobbered and cannot be sanitized in-place");Ee=yh(Rt),Zt=Bh()}else if(Hs(Rt)){if(dt=xd("<!---->"),It=dt.ownerDocument.importNode(Rt,!0),It.nodeType===ar.element&&It.nodeName==="BODY")dt=It;else if(It.nodeName==="HTML")dt=It;else dt.appendChild(It);wh(dt)}else{if(!Ct&&!D&&!Bt&&Rt.indexOf("<")===-1)return wt&&Ft?St(Rt):Rt;if(dt=xd(Rt),!dt)return Ct?null:Ft?kt:""}if(dt&&Z)Wo(dt.firstChild);let Li=we?Rt:dt;try{if(we)wh(Rt);let Pr=xh(Li);while($t=Pr.nextNode())if(bh($t,Li),kh($t,Li),zo($t.content))Ys($t.content);if(we)G0(Rt,Ee)}catch(Pr){if(we)ph(Rt),md(Rt,Ee);throw Pr}finally{Zt=nr}if(we){if(md(Rt,Ee))throw Lo("a node selected for removal could not be safely returned; refusing to sanitize in place");if(D)Ch(Rt);return Rt}if(Ct){if(D)Ch(dt);if(Dt){ie=_e.call(dt.ownerDocument);while(dt.firstChild)ie.appendChild(dt.firstChild)}else ie=dt;if(Pe.shadowroot||Pe.shadowrootmode)ie=xe.call(s,ie,!0);return ie}let vr=Bt?dt.outerHTML:dt.innerHTML;if(Bt&&je["!doctype"]&&dt.ownerDocument&&dt.ownerDocument.doctype&&dt.ownerDocument.doctype.name&&fr(YC,dt.ownerDocument.doctype.name))vr="<!DOCTYPE "+dt.ownerDocument.doctype.name+`>
3
+ `+vr;if(D)vr=Bn(vr);return wt&&Ft?St(vr):vr},e.setConfig=function(){let Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dh(Rt),Mt=!0,_t=je,Nt=Pe},e.clearConfig=function(){cs=null,Mt=!1,_t=null,Nt=null,wt=st,kt=""},e.isValidAttribute=function(Rt,J,dt){if(!cs)dh({});let It=ir(Rt),$t=ir(J);if(typeof dt==="string"&&(Sd(J,dt)||!ao&&fr(Qd,dt)))return!1;return kd(It,$t,dt)},e.addHook=function(Rt,J){if(typeof J!=="function")return;if(!zr(Wt,Rt))return;Gs(Wt[Rt],J)},e.removeHook=function(Rt,J){if(!zr(Wt,Rt))return;if(J!==void 0){let dt=_C(Wt[Rt],J);return dt===-1?void 0:vC(Wt[Rt],dt,1)[0]}return Wd(Wt[Rt])},e.removeHooks=function(Rt){if(!zr(Wt,Rt))return;Wt[Rt]=[]},e.removeAllHooks=function(){Wt=Jd()},e}var Re=sp();var ms=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,el=/\s/,KC=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let n=r.indexOf(`
4
4
  `,o);if(n===-1)break;let c=o;while(c>i&&el.test(r[c-1]))c--;e+=r.slice(i,c)+`
5
5
  `,i=n+1,s=i}return e+r.slice(i)},"stripAnyComments"),Qn=t((r)=>r===`
6
- `||r==="\r","isLineBreak"),ZC=t((r,e)=>{let i=-1;for(let s=e;s<r.length&&el.test(r[s]);s++)if(Qn(r[s]))i=s;return i},"lastLineBreakInWhitespaceRun"),Li=t((r)=>{let e=0;while(e<r.length&&el.test(r[e])&&!Qn(r[e]))e++;let i=r.slice(0,e);if(!r.startsWith("---",e))return;let s=[];for(let f=e+3;f<r.length&&el.test(r[f]);f++)if(Qn(r[f]))s.push(f);if(s.length===0)return;let o=`${i}---`,n=t((f)=>Qn(r[f])&&r.startsWith(o,f+1)?ZC(r,f+1+o.length):-1,"closingEnd"),c=s[0]+1,h=-1;for(let f=c;f<r.length;f++)if(n(f)!==-1)h=f;if(h===-1)return;let g=s[0];for(let f of s)if(f<h)g=f;let y=g+1;for(let f=y;f<=h;f++){let b=n(f);if(b!==-1)return{indent:i,body:r.slice(y,f),length:b+1}}return},"matchFrontMatter"),Ii=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Tn={},xr=t(function(r,e){let i=Li(r);r=KC((i?r.slice(i.length):r).replace(hs,""));for(let[s,{detector:o}]of Object.entries(Tn))if(o(r,e))return s;throw new Ii(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Sa=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)up(e,i,s)},"registerLazyLoadedDiagrams"),up=t((r,e,i)=>{if(Tn[r])a.warn(`Detector with key ${r} already exists. Overwriting.`);Tn[r]={detector:e,loader:i},a.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),no=t((r)=>Tn[r].loader,"getDiagramLoader"),Ph=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>Ph(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(([n,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,n))Object.defineProperty(r,n,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[n]===void 0)o[n]=Array.isArray(c)?[]:{};if(typeof o[n]==="object")o[n]=Ph(o[n],c,{depth:i-1})}else if(typeof o[n]!=="object")if(Object.hasOwn(r,n))o[n]=c;else Object.defineProperty(r,n,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),oe=Ph,ki="#ffffff",wi="#f2f2f2",me=t((r,e)=>e?G(r,{s:-40,l:10}):G(r,{s:-40,l:-10}),"mkBorder"),ap=t((r)=>typeof r==="object"&&r!==null&&!Array.isArray(r),"isPlainObject"),di=t((r,e)=>ap(r)&&ap(e)?{...r,...e}:e,"applyOverride"),QC=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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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||d(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(this.mainBkg,10);else this.rowOdd=this.rowOdd||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(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]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(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||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi,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]=di(this[i],r[i])}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},JC=t((r)=>{let e=new QC;return e.calculate(r),e},"getThemeVariables"),tb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=me(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=de(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=d("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=d(this.sectionBkgColor,10),this.taskBorderColor=de(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=de(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||u(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(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=u(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=u(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=u(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=ut(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||ut(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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)]??u(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=u(this.secondaryColor,20),this.git1=u(this.pie2||this.secondaryColor,20),this.git2=u(this.pie3||this.tertiaryColor,20),this.git3=u(this.pie4||G(this.primaryColor,{h:-30}),20),this.git4=u(this.pie5||G(this.primaryColor,{h:-60}),20),this.git5=u(this.pie6||G(this.primaryColor,{h:-90}),10),this.git6=u(this.pie7||G(this.primaryColor,{h:60}),10),this.git7=u(this.pie8||G(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||u("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||u("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||u("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||u("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||u(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||u(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||u(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||u(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]=di(this[i],r[i])})}},eb=t((r)=>{let e=new tb;return e.calculate(r),e},"getThemeVariables"),rb=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=G(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=me(this.primaryColor,this.darkMode),this.secondaryBorderColor=me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=me(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=me(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=de(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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||ut(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ut(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||u(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||G(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||G(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||d(ut(this.git0),25),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},ke=t((r)=>{let e=new rb;return e.calculate(r),e},"getThemeVariables"),ib=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=u("#cde498",10),this.primaryBorderColor=me(this.primaryColor,this.darkMode),this.secondaryBorderColor=me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=me(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.primaryColor),this.lineColor=ut(this.background),this.textColor=ut(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=d(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(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]||G(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{l:-30}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},ob=t((r)=>{let e=new ib;return e.calculate(r),e},"getThemeVariables"),sb=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=u(this.contrast,55),this.background="#ffffff",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=me(this.primaryColor,this.darkMode),this.secondaryBorderColor=me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=me(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(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||u(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=u(this.contrast,55),this.border2=this.contrast,this.actorBorder=u(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]||ut(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||d(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]||G(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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=u(this.contrast,30),this.sectionBkgColor2=u(this.contrast,30),this.taskBorderColor=d(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=u(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=d(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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=d(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||G(this.primaryColor,{h:-30}),this.git4=this.pie5||G(this.primaryColor,{h:-60}),this.git5=this.pie6||G(this.primaryColor,{h:-90}),this.git6=this.pie7||G(this.primaryColor,{h:60}),this.git7=this.pie8||G(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},ab=t((r)=>{let e=new sb;return e.calculate(r),e},"getThemeVariables"),nb=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=me(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(X(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(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||u(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||G(r,{h:30}),this.cScale4=this.cScale4||G(r,{h:60}),this.cScale5=this.cScale5||G(r,{h:90}),this.cScale6=this.cScale6||G(r,{h:120}),this.cScale7=this.cScale7||G(r,{h:150}),this.cScale8=this.cScale8||G(r,{h:210,l:150}),this.cScale9=this.cScale9||G(r,{h:270}),this.cScale10=this.cScale10||G(r,{h:300}),this.cScale11=this.cScale11||G(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(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]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(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||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},lb=t((r)=>{let e=new nb;return e.calculate(r),e},"getThemeVariables"),hb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=me(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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"?u(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(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]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(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||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}};var cb=t((r)=>{let e=new hb;return e.calculate(r),e},"getThemeVariables"),ub=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=me("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(X(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(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||u(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]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(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]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(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||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},fb=t((r)=>{let e=new ub;return e.calculate(r),e},"getThemeVariables"),db=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=me(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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"?u(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(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]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(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||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},pb=t((r)=>{let e=new db;return e.calculate(r),e},"getThemeVariables"),gb=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=me("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(X(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(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||u(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]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(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]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(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||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},mb=t((r)=>{let e=new gb;return e.calculate(r),e},"getThemeVariables"),yb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=me(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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"?u(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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]||ut(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||u(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||d(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=d(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||G(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||X(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wi}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]=di(this[i],r[i])})}},xb=t((r)=>{let e=new yb;return e.calculate(r),e},"getThemeVariables"),Jt={base:{getThemeVariables:JC},dark:{getThemeVariables:eb},default:{getThemeVariables:ke},forest:{getThemeVariables:ob},neutral:{getThemeVariables:ab},neo:{getThemeVariables:lb},"neo-dark":{getThemeVariables:cb},redux:{getThemeVariables:fb},"redux-dark":{getThemeVariables:pb},"redux-color":{getThemeVariables:mb},"redux-dark-color":{getThemeVariables:xb}},ir={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,colorBy:"branch",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,bitOrder:"ascending",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},fp={...ir,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,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:Jt.default.getThemeVariables(),sequence:{...ir.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:ir.class?.theme,look:ir.class?.look,layout:ir.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ir.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ir.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ir.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:{...ir.pie,useWidth:984},xyChart:{...ir.xyChart,useWidth:void 0},requirement:{...ir.requirement,useWidth:void 0},packet:{...ir.packet},eventmodeling:{...ir.eventmodeling},treeView:{...ir.treeView,useWidth:void 0},radar:{...ir.radar},usecase:{...ir.usecase},railroad:{...ir.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:{...ir.ishikawa},sankey:{...ir.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:{...ir.venn},cynefin:{...ir.cynefin}},dp=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,...dp(r[s],"")];return[...i,e+s]},[]),"keyify"),Cb=new Set(dp(fp,"")),D=fp,bb={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},kb=t((r)=>bb[r]??r,"getDiagramConfigKey"),wb={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Sb=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))a.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),js=t((r)=>{if(a.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>js(e));return}for(let e of Object.keys(r)){if(a.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Cb.has(e)||r[e]==null){a.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=wb[e];if(s)Sb(r[e],s);else a.debug("sanitizing object",e),js(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))a.debug("sanitizing css option",e),r[e]=Di(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]=""}a.debug("After sanitization",r)},"sanitizeDirective"),Di=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"),sn=Object.freeze(D),Tb=["theme","look","layout"],_b=new Set(["classic","handDrawn","neo"]),Bb=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(Jt,e);return r!=="look"||_b.has(e)},"isUsableAppearance"),vb=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Bb(i,o))},"readAppearance"),ft=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),vr=oe({},sn),rl,il={},ko=[],Ys=oe({},sn),Us,Lb=t((r,e)=>{if(!Us)return;let i=[e,...[...ko].reverse(),il,sn],s=r[Us];for(let o of Tb)for(let n of i){let c=vb(n,Us,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),cs=t((r,e)=>{let i=oe({},r),s={};for(let n of e)pp(n),s=oe(s,n);if(i=oe(i,s),Lb(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(Jt,i.theme)){let n=oe({},rl),c=oe(n.themeVariables||{},s.themeVariables);i.themeVariables=Jt[i.theme].getThemeVariables(c)}return Ys=i,Ab(Ys),Ys},"updateCurrentConfig"),Ta=t((r)=>{Us=r===void 0?void 0:kb(r),cs(vr,ko)},"setDiagramConfigScope"),ro=t((r)=>{if(vr=oe({},sn),vr=oe(vr,r),il=oe({},r),r.theme&&Object.hasOwn(Jt,r.theme))vr.themeVariables=Jt[r.theme].getThemeVariables(r.themeVariables);return cs(vr,ko),vr},"setSiteConfig"),ao=t((r)=>{rl=oe({},r)},"saveConfigFromInitialize"),io=t((r)=>(vr=oe(vr,r),il=oe(il,r),cs(vr,ko),vr),"updateSiteConfig"),Ni=t(()=>oe({},vr),"getSiteConfig"),Mi=t((r)=>(cs(Ys,[r]),x()),"setConfig"),x=t(()=>oe({},Ys),"getConfig"),pp=t((r)=>{if(!r)return;["secure",...vr.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))a.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")pp(r[e])})},"sanitize"),oo=t((r)=>{if(js(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};ko.push(r),cs(vr,ko)},"addDirective"),jr=t((r=vr)=>{ko=[],Us=void 0,cs(r,ko)},"reset"),Fb={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."},np={},gp=t((r)=>{if(np[r])return;a.warn(Fb[r]),np[r]=!0},"issueWarning"),Ab=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)gp("LAZY_LOAD_DEPRECATED")},"checkConfig"),so=t(()=>{let r={};if(rl)r=oe(r,rl);for(let e of ko)r=oe(r,e);return r},"getUserDefinedConfig"),Ce=t((r)=>{if(r.flowchart?.htmlLabels!=null)gp("FLOWCHART_HTML_LABELS_DEPRECATED");return ft(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Fn=/<\/?br\s*\/?>/gi,Mb=new RegExp(Fn.source,"i"),Eb=t((r)=>{if(!r)return[""];return xp(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ob=(()=>{let r=!1;return()=>{if(!r)mp(),r=!0}})();function mp(){Re.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Re.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(mp,"setupDompurifyHooks");var yp=t((r)=>(Ob(),Re.sanitize(r)),"removeScript"),lp=t((r,e)=>{if(Ce(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=yp(r);else if(i!=="loose")r=xp(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Pb(r)}return r},"sanitizeMore"),O=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Re.sanitize(lp(r,e),e.dompurifyConfig).toString();else r=Re.sanitize(lp(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),Ib=t((r,e)=>{if(typeof r==="string")return O(r,e);return r.flat().map((i)=>O(i,e))},"sanitizeTextOrArray"),$b=t((r)=>Mb.test(r),"hasBreaks"),Db=t((r)=>r.split(Fn),"splitBreaks"),Pb=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),xp=t((r)=>r.replace(Fn,"#br#"),"breakToPlaceholder"),Pi=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"),Rb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),qb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),en=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 n=e[s-1],c=e[s+1];if(Nb(n,c))o=n+","+c,s++,i.pop()}i.push(Wb(o))}return i.join("")},"parseGenericTypes"),Rh=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Nb=t((r,e)=>{let i=Rh(r,"~"),s=Rh(e,"~");return i===1&&s===1},"shouldCombineSets"),Wb=t((r)=>{let e=Rh(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("~"),n=s.lastIndexOf("~");while(o!==-1&&n!==-1&&o!==n)s[o]="<",s[n]=">",o=s.indexOf("~"),n=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),hp=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Jn=/\$\$(.*?)\$\$/g,he=t((r)=>(r.match(Jn)?.length??0)>0,"hasKatex"),_r=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await wr(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"),zb=t(async(r,e)=>{if(!he(r))return r;if(!(hp()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Jn,"MathML is unsupported in this environment.");{let{default:i}=await (_("nj0cv1cq"),import("./chunk-nj0cv1cq.js")),s=e.forceLegacyMathML||!hp()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Fn).map((o)=>he(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Jn,(o,n)=>i.renderToString(n,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Jn,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),wr=t(async(r,e)=>O(await zb(r,e),e),"renderKatexSanitized"),v={getRows:Eb,sanitizeText:O,sanitizeTextOrArray:Ib,hasBreaks:$b,splitBreaks:Db,lineBreakRegex:Fn,removeScript:yp,getUrl:Pi,evaluate:ft,getMax:Rb,getMin:qb},Hb=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Yb=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"),B=t(function(r,e,i,s){let o=Yb(e,i,s);Hb(r,o)},"configureSvgSize"),ht=t(function(r,e,i,s){let o=e.node().getBBox(),{width:n,height:c}=o;a.info(`SVG bounds: ${n}x${c}`,o);let h=0,g=0;a.info(`Graph bounds: ${h}x${g}`,r),h=n+i*2,g=c+i*2,a.info(`Calculated bounds: ${h}x${g}`),B(e,g,h,s);let y=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",y)},"setupGraphViewbox"),tl={};function Ea(r){return[...r.cssRules].map((e)=>e.cssText).join(`
7
- `)}t(Ea,"cssStyleSheetToString");var Ub=t((r,e,i,s)=>{let o="";if(r in tl&&tl[r])o=tl[r]({...i,svgId:s});else a.warn(`No theme found for ${r}`);return`& {
6
+ `||r==="\r","isLineBreak"),ZC=t((r,e)=>{let i=-1;for(let s=e;s<r.length&&el.test(r[s]);s++)if(Qn(r[s]))i=s;return i},"lastLineBreakInWhitespaceRun"),$i=t((r)=>{let e=0;while(e<r.length&&el.test(r[e])&&!Qn(r[e]))e++;let i=r.slice(0,e);if(!r.startsWith("---",e))return;let s=[];for(let f=e+3;f<r.length&&el.test(r[f]);f++)if(Qn(r[f]))s.push(f);if(s.length===0)return;let o=`${i}---`,n=t((f)=>Qn(r[f])&&r.startsWith(o,f+1)?ZC(r,f+1+o.length):-1,"closingEnd"),c=s[0]+1,h=-1;for(let f=c;f<r.length;f++)if(n(f)!==-1)h=f;if(h===-1)return;let g=s[0];for(let f of s)if(f<h)g=f;let y=g+1;for(let f=y;f<=h;f++){let B=n(f);if(B!==-1)return{indent:i,body:r.slice(y,f),length:B+1}}return},"matchFrontMatter"),Bi=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Sn={},xr=t(function(r,e){let i=$i(r);r=KC((i?r.slice(i.length):r).replace(ms,""));for(let[s,{detector:o}]of Object.entries(Sn))if(o(r,e))return s;throw new Bi(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Da=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)up(e,i,s)},"registerLazyLoadedDiagrams"),up=t((r,e,i)=>{if(Sn[r])a.warn(`Detector with key ${r} already exists. Overwriting.`);Sn[r]={detector:e,loader:i},a.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),co=t((r)=>Sn[r].loader,"getDiagramLoader"),Ph=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>Ph(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(([n,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,n))Object.defineProperty(r,n,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[n]===void 0)o[n]=Array.isArray(c)?[]:{};if(typeof o[n]==="object")o[n]=Ph(o[n],c,{depth:i-1})}else if(typeof o[n]!=="object")if(Object.hasOwn(r,n))o[n]=c;else Object.defineProperty(r,n,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),oe=Ph,Ai="#ffffff",Mi="#f2f2f2",be=t((r,e)=>e?G(r,{s:-40,l:10}):G(r,{s:-40,l:-10}),"mkBorder"),ap=t((r)=>typeof r==="object"&&r!==null&&!Array.isArray(r),"isPlainObject"),bi=t((r,e)=>ap(r)&&ap(e)?{...r,...e}:e,"applyOverride"),QC=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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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||d(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(this.mainBkg,10);else this.rowOdd=this.rowOdd||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(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]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(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||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi,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]=bi(this[i],r[i])}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},JC=t((r)=>{let e=new QC;return e.calculate(r),e},"getThemeVariables"),tb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=de(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=d("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=d(this.sectionBkgColor,10),this.taskBorderColor=de(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=de(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||u(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(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=u(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=u(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=u(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=ut(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||ut(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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)]??u(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=u(this.secondaryColor,20),this.git1=u(this.pie2||this.secondaryColor,20),this.git2=u(this.pie3||this.tertiaryColor,20),this.git3=u(this.pie4||G(this.primaryColor,{h:-30}),20),this.git4=u(this.pie5||G(this.primaryColor,{h:-60}),20),this.git5=u(this.pie6||G(this.primaryColor,{h:-90}),10),this.git6=u(this.pie7||G(this.primaryColor,{h:60}),10),this.git7=u(this.pie8||G(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||u("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||u("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||u("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||u("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||u(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||u(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||u(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||u(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]=bi(this[i],r[i])})}},eb=t((r)=>{let e=new tb;return e.calculate(r),e},"getThemeVariables"),rb=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=G(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=be(this.primaryColor,this.darkMode),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=be(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=de(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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||ut(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ut(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||u(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||G(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||G(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||d(ut(this.git0),25),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},ke=t((r)=>{let e=new rb;return e.calculate(r),e},"getThemeVariables"),ib=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=u("#cde498",10),this.primaryBorderColor=be(this.primaryColor,this.darkMode),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.primaryColor),this.lineColor=ut(this.background),this.textColor=ut(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=d(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(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]||G(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{l:-30}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},ob=t((r)=>{let e=new ib;return e.calculate(r),e},"getThemeVariables"),sb=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=u(this.contrast,55),this.background="#ffffff",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=be(this.primaryColor,this.darkMode),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(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||u(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=u(this.contrast,55),this.border2=this.contrast,this.actorBorder=u(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]||ut(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||d(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]||G(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(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=u(this.contrast,30),this.sectionBkgColor2=u(this.contrast,30),this.taskBorderColor=d(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=u(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=d(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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=d(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||G(this.primaryColor,{h:-30}),this.git4=this.pie5||G(this.primaryColor,{h:-60}),this.git5=this.pie6||G(this.primaryColor,{h:-90}),this.git6=this.pie7||G(this.primaryColor,{h:60}),this.git7=this.pie8||G(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},ab=t((r)=>{let e=new sb;return e.calculate(r),e},"getThemeVariables"),nb=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=be(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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(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||u(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||G(r,{h:30}),this.cScale4=this.cScale4||G(r,{h:60}),this.cScale5=this.cScale5||G(r,{h:90}),this.cScale6=this.cScale6||G(r,{h:120}),this.cScale7=this.cScale7||G(r,{h:150}),this.cScale8=this.cScale8||G(r,{h:210,l:150}),this.cScale9=this.cScale9||G(r,{h:270}),this.cScale10=this.cScale10||G(r,{h:300}),this.cScale11=this.cScale11||G(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(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]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(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||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},lb=t((r)=>{let e=new nb;return e.calculate(r),e},"getThemeVariables"),hb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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"?u(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(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]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(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||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}};var cb=t((r)=>{let e=new hb;return e.calculate(r),e},"getThemeVariables"),ub=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=be("#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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(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||u(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]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(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]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(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||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},fb=t((r)=>{let e=new ub;return e.calculate(r),e},"getThemeVariables"),db=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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"?u(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(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]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(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||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},pb=t((r)=>{let e=new db;return e.calculate(r),e},"getThemeVariables"),gb=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=be("#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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(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||u(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]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(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]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(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||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},mb=t((r)=>{let e=new gb;return e.calculate(r),e},"getThemeVariables"),yb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(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||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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"?u(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?d(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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||u(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]||ut(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||u(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||d(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=d(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||G(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(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?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else this.git0=d(this.git0,25),this.git1=d(this.git1,25),this.git2=d(this.git2,25),this.git3=d(this.git3,25),this.git4=d(this.git4,25),this.git5=d(this.git5,25),this.git6=d(this.git6,25),this.git7=d(this.git7,25);this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}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]=bi(this[i],r[i])})}},xb=t((r)=>{let e=new yb;return e.calculate(r),e},"getThemeVariables"),Qt={base:{getThemeVariables:JC},dark:{getThemeVariables:eb},default:{getThemeVariables:ke},forest:{getThemeVariables:ob},neutral:{getThemeVariables:ab},neo:{getThemeVariables:lb},"neo-dark":{getThemeVariables:cb},redux:{getThemeVariables:fb},"redux-dark":{getThemeVariables:pb},"redux-color":{getThemeVariables:mb},"redux-dark-color":{getThemeVariables:xb}},or={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,colorBy:"branch",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,bitOrder:"ascending",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},fp={...or,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,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:Qt.default.getThemeVariables(),sequence:{...or.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:or.class?.theme,look:or.class?.look,layout:or.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...or.gantt,tickInterval:void 0,useWidth:void 0},c4:{...or.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...or.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:{...or.pie,useWidth:984},xyChart:{...or.xyChart,useWidth:void 0},requirement:{...or.requirement,useWidth:void 0},packet:{...or.packet},eventmodeling:{...or.eventmodeling},treeView:{...or.treeView,useWidth:void 0},radar:{...or.radar},usecase:{...or.usecase},railroad:{...or.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:{...or.ishikawa},sankey:{...or.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:{...or.venn},cynefin:{...or.cynefin}},dp=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,...dp(r[s],"")];return[...i,e+s]},[]),"keyify"),Cb=new Set(dp(fp,"")),N=fp,bb={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},kb=t((r)=>bb[r]??r,"getDiagramConfigKey"),wb={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Sb=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))a.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),Js=t((r)=>{if(a.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Js(e));return}for(let e of Object.keys(r)){if(a.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Cb.has(e)||r[e]==null){a.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=wb[e];if(s)Sb(r[e],s);else a.debug("sanitizing object",e),Js(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))a.debug("sanitizing css option",e),r[e]=Fi(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]=""}a.debug("After sanitization",r)},"sanitizeDirective"),Fi=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"),on=Object.freeze(N),Tb=["theme","look","layout"],_b=new Set(["classic","handDrawn","neo"]),Bb=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(Qt,e);return r!=="look"||_b.has(e)},"isUsableAppearance"),vb=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Bb(i,o))},"readAppearance"),ft=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Fr=oe({},on),rl,il={},Fo=[],Zs=oe({},on),Qs,Lb=t((r,e)=>{if(!Qs)return;let i=[e,...[...Fo].reverse(),il,on],s=r[Qs];for(let o of Tb)for(let n of i){let c=vb(n,Qs,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),ys=t((r,e)=>{let i=oe({},r),s={};for(let n of e)pp(n),s=oe(s,n);if(i=oe(i,s),Lb(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(Qt,i.theme)){let n=oe({},rl),c=oe(n.themeVariables||{},s.themeVariables);i.themeVariables=Qt[i.theme].getThemeVariables(c)}return Zs=i,Ab(Zs),Zs},"updateCurrentConfig"),Na=t((r)=>{Qs=r===void 0?void 0:kb(r),ys(Fr,Fo)},"setDiagramConfigScope"),uo=t((r)=>{if(Fr=oe({},on),Fr=oe(Fr,r),il=oe({},r),r.theme&&Object.hasOwn(Qt,r.theme))Fr.themeVariables=Qt[r.theme].getThemeVariables(r.themeVariables);return ys(Fr,Fo),Fr},"setSiteConfig"),po=t((r)=>{rl=oe({},r)},"saveConfigFromInitialize"),mo=t((r)=>(Fr=oe(Fr,r),il=oe(il,r),ys(Fr,Fo),Fr),"updateSiteConfig"),zi=t(()=>oe({},Fr),"getSiteConfig"),Ui=t((r)=>(ys(Zs,[r]),x()),"setConfig"),x=t(()=>oe({},Zs),"getConfig"),pp=t((r)=>{if(!r)return;["secure",...Fr.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))a.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")pp(r[e])})},"sanitize"),fo=t((r)=>{if(Js(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};Fo.push(r),ys(Fr,Fo)},"addDirective"),Wr=t((r=Fr)=>{Fo=[],Qs=void 0,ys(r,Fo)},"reset"),Fb={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."},np={},gp=t((r)=>{if(np[r])return;a.warn(Fb[r]),np[r]=!0},"issueWarning"),Ab=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)gp("LAZY_LOAD_DEPRECATED")},"checkConfig"),ho=t(()=>{let r={};if(rl)r=oe(r,rl);for(let e of Fo)r=oe(r,e);return r},"getUserDefinedConfig"),Ce=t((r)=>{if(r.flowchart?.htmlLabels!=null)gp("FLOWCHART_HTML_LABELS_DEPRECATED");return ft(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Fn=/<\/?br\s*\/?>/gi,Mb=new RegExp(Fn.source,"i"),Eb=t((r)=>{if(!r)return[""];return xp(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ob=(()=>{let r=!1;return()=>{if(!r)mp(),r=!0}})();function mp(){Re.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Re.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(mp,"setupDompurifyHooks");var yp=t((r)=>(Ob(),Re.sanitize(r)),"removeScript"),lp=t((r,e)=>{if(Ce(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=yp(r);else if(i!=="loose")r=xp(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Pb(r)}return r},"sanitizeMore"),O=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Re.sanitize(lp(r,e),e.dompurifyConfig).toString();else r=Re.sanitize(lp(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),Ib=t((r,e)=>{if(typeof r==="string")return O(r,e);return r.flat().map((i)=>O(i,e))},"sanitizeTextOrArray"),$b=t((r)=>Mb.test(r),"hasBreaks"),Db=t((r)=>r.split(Fn),"splitBreaks"),Pb=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),xp=t((r)=>r.replace(Fn,"#br#"),"breakToPlaceholder"),ji=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"),Rb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),qb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),Jt=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 n=e[s-1],c=e[s+1];if(Nb(n,c))o=n+","+c,s++,i.pop()}i.push(Wb(o))}return i.join("")},"parseGenericTypes"),Rh=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Nb=t((r,e)=>{let i=Rh(r,"~"),s=Rh(e,"~");return i===1&&s===1},"shouldCombineSets"),Wb=t((r)=>{let e=Rh(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("~"),n=s.lastIndexOf("~");while(o!==-1&&n!==-1&&o!==n)s[o]="<",s[n]=">",o=s.indexOf("~"),n=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),hp=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Jn=/\$\$(.*?)\$\$/g,fe=t((r)=>(r.match(Jn)?.length??0)>0,"hasKatex"),_r=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await wr(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"),zb=t(async(r,e)=>{if(!fe(r))return r;if(!(hp()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Jn,"MathML is unsupported in this environment.");{let{default:i}=await (_("nj0cv1cq"),import("./chunk-nj0cv1cq.js")),s=e.forceLegacyMathML||!hp()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Fn).map((o)=>fe(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Jn,(o,n)=>i.renderToString(n,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Jn,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),wr=t(async(r,e)=>O(await zb(r,e),e),"renderKatexSanitized"),b={getRows:Eb,sanitizeText:O,sanitizeTextOrArray:Ib,hasBreaks:$b,splitBreaks:Db,lineBreakRegex:Fn,removeScript:yp,getUrl:ji,evaluate:ft,getMax:Rb,getMin:qb},Hb=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Yb=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"),F=t(function(r,e,i,s){let o=Yb(e,i,s);Hb(r,o)},"configureSvgSize"),ht=t(function(r,e,i,s){let o=e.node().getBBox(),{width:n,height:c}=o;a.info(`SVG bounds: ${n}x${c}`,o);let h=0,g=0;a.info(`Graph bounds: ${h}x${g}`,r),h=n+i*2,g=c+i*2,a.info(`Calculated bounds: ${h}x${g}`),F(e,g,h,s);let y=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",y)},"setupGraphViewbox"),tl={};function Ma(r){return[...r.cssRules].map((e)=>e.cssText).join(`
7
+ `)}t(Ma,"cssStyleSheetToString");var Ub=t((r,e,i,s)=>{let o="";if(r in tl&&tl[r])o=tl[r]({...i,svgId:s});else a.warn(`No theme found for ${r}`);return`& {
8
8
  font-family: ${i.fontFamily};
9
9
  font-size: ${i.fontSize};
10
10
  fill: ${i.textColor}
@@ -125,66 +125,66 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
125
125
  }
126
126
 
127
127
  ${e}
128
- `},"getStyles"),jb=t((r,e)=>{if(e!==void 0)tl[r]=e},"addStylesForDiagram"),lo=Ub,Aa={};Qt(Aa,{clear:()=>C,getAccDescription:()=>A,getAccTitle:()=>E,getDiagramTitle:()=>R,setAccDescription:()=>T,setAccTitle:()=>S,setDiagramTitle:()=>L});var qh="",Nh="",Wh="",zh=t((r)=>O(r,x()),"sanitizeText"),C=t(()=>{qh="",Wh="",Nh=""},"clear"),S=t((r)=>{qh=zh(r).replace(/^\s+/g,"")},"setAccTitle"),E=t(()=>qh,"getAccTitle"),T=t((r)=>{Wh=zh(r).replace(/\n\s+/g,`
129
- `)},"setAccDescription"),A=t(()=>Wh,"getAccDescription"),L=t((r)=>{Nh=zh(r)},"setDiagramTitle"),R=t(()=>Nh,"getDiagramTitle"),cp=a,Gb=Ur,l=x,ln=Mi,En=sn,sl=t((r)=>O(r,l()),"sanitizeText"),kr=ht,Xb=t(()=>Aa,"getCommonDb"),ol={},qr=t((r,e,i)=>{if(ol[r])cp.warn(`Diagram with id ${r} already registered. Overwriting.`);if(ol[r]=e,i)up(r,i);jb(r,e.styles),e.injectUtils?.(cp,Gb,l,sl,kr,Xb(),()=>{})},"registerDiagram"),Ra=t((r)=>{if(r in ol)return ol[r];throw new Vb(r)},"getDiagram"),Vb=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};var Kb={value:()=>{}};function bp(){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 al(i)}function al(r){this._=r}function Zb(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}})}al.prototype=bp.prototype={constructor:al,on:function(r,e){var i=this._,s=Zb(r+"",i),o,n=-1,c=s.length;if(arguments.length<2){while(++n<c)if((o=(r=s[n]).type)&&(o=Qb(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++n<c)if(o=(r=s[n]).type)i[o]=Cp(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Cp(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 al(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,n;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(n=this._[r],s=0,o=n.length;s<o;++s)n[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,n=s.length;o<n;++o)s[o].value.apply(e,i)}};function Qb(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Cp(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Kb,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Hh=bp;var nl="http://www.w3.org/1999/xhtml",Yh={svg:"http://www.w3.org/2000/svg",xhtml:nl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Si(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Yh.hasOwnProperty(e)?{space:Yh[e],local:r}:r}function Jb(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===nl&&e.documentElement.namespaceURI===nl?e.createElement(r):e.createElementNS(i,r)}}function tk(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Gs(r){var e=Si(r);return(e.local?tk:Jb)(e)}function ek(){}function Ro(r){return r==null?ek:function(){return this.querySelector(r)}}function Uh(r){if(typeof r!=="function")r=Ro(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=Array(c),g,y,f=0;f<c;++f)if((g=n[f])&&(y=r.call(g,g.__data__,f,n))){if("__data__"in g)y.__data__=g.__data__;h[f]=y}return new tr(s,this._parents)}function jh(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function rk(){return[]}function us(r){return r==null?rk:function(){return this.querySelectorAll(r)}}function ik(r){return function(){return jh(r.apply(this,arguments))}}function Gh(r){if(typeof r==="function")r=ik(r);else r=us(r);for(var e=this._groups,i=e.length,s=[],o=[],n=0;n<i;++n)for(var c=e[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])s.push(r.call(g,g.__data__,y,c)),o.push(g);return new tr(s,o)}function fs(r){return function(){return this.matches(r)}}function ll(r){return function(e){return e.matches(r)}}var ok=Array.prototype.find;function sk(r){return function(){return ok.call(this.children,r)}}function ak(){return this.firstElementChild}function Xh(r){return this.select(r==null?ak:sk(typeof r==="function"?r:ll(r)))}var nk=Array.prototype.filter;function lk(){return Array.from(this.children)}function hk(r){return function(){return nk.call(this.children,r)}}function Vh(r){return this.selectAll(r==null?lk:hk(typeof r==="function"?r:ll(r)))}function Kh(r){if(typeof r!=="function")r=fs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new tr(s,this._parents)}function Xs(r){return Array(r.length)}function Zh(){return new tr(this._enter||this._groups.map(Xs),this._parents)}function Vs(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Vs.prototype={constructor:Vs,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 Qh(r){return function(){return r}}function ck(r,e,i,s,o,n){var c=0,h,g=e.length,y=n.length;for(;c<y;++c)if(h=e[c])h.__data__=n[c],s[c]=h;else i[c]=new Vs(r,n[c]);for(;c<g;++c)if(h=e[c])o[c]=h}function uk(r,e,i,s,o,n,c){var h,g,y=new Map,f=e.length,b=n.length,F=Array(f),N;for(h=0;h<f;++h)if(g=e[h])if(F[h]=N=c.call(g,g.__data__,h,e)+"",y.has(N))o[h]=g;else y.set(N,g);for(h=0;h<b;++h)if(N=c.call(r,n[h],h,n)+"",g=y.get(N))s[h]=g,g.__data__=n[h],y.delete(N);else i[h]=new Vs(r,n[h]);for(h=0;h<f;++h)if((g=e[h])&&y.get(F[h])===g)o[h]=g}function fk(r){return r.__data__}function Jh(r,e){if(!arguments.length)return Array.from(this,fk);var i=e?uk:ck,s=this._parents,o=this._groups;if(typeof r!=="function")r=Qh(r);for(var n=o.length,c=Array(n),h=Array(n),g=Array(n),y=0;y<n;++y){var f=s[y],b=o[y],F=b.length,N=dk(r.call(f,f&&f.__data__,y,s)),W=N.length,H=h[y]=Array(W),Y=c[y]=Array(W),j=g[y]=Array(F);i(f,b,H,Y,j,N,e);for(var K=0,Q=0,rt,it;K<W;++K)if(rt=H[K]){if(K>=Q)Q=K+1;while(!(it=Y[Q])&&++Q<W);rt._next=it||null}}return c=new tr(c,s),c._enter=h,c._exit=g,c}function dk(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function tc(){return new tr(this._exit||this._groups.map(Xs),this._parents)}function ec(r,e,i){var s=this.enter(),o=this,n=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)n.remove();else i(n);return s&&o?s.merge(o).order():o}function rc(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,n=s.length,c=Math.min(o,n),h=Array(o),g=0;g<c;++g)for(var y=i[g],f=s[g],b=y.length,F=h[g]=Array(b),N,W=0;W<b;++W)if(N=y[W]||f[W])F[W]=N;for(;g<o;++g)h[g]=i[g];return new tr(h,this._parents)}function ic(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,n=s[o],c;--o>=0;)if(c=s[o]){if(n&&c.compareDocumentPosition(n)^4)n.parentNode.insertBefore(c,n);n=c}return this}function oc(r){if(!r)r=pk;function e(b,F){return b&&F?r(b.__data__,F.__data__):!b-!F}for(var i=this._groups,s=i.length,o=Array(s),n=0;n<s;++n){for(var c=i[n],h=c.length,g=o[n]=Array(h),y,f=0;f<h;++f)if(y=c[f])g[f]=y;g.sort(e)}return new tr(o,this._parents).order()}function pk(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function sc(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function ac(){return Array.from(this)}function nc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length;o<n;++o){var c=s[o];if(c)return c}return null}function lc(){let r=0;for(let e of this)++r;return r}function hc(){return!this.node()}function cc(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],n=0,c=o.length,h;n<c;++n)if(h=o[n])r.call(h,h.__data__,n,o);return this}function gk(r){return function(){this.removeAttribute(r)}}function mk(r){return function(){this.removeAttributeNS(r.space,r.local)}}function yk(r,e){return function(){this.setAttribute(r,e)}}function xk(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function Ck(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function bk(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 uc(r,e){var i=Si(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?mk:gk:typeof e==="function"?i.local?bk:Ck:i.local?xk:yk)(i,e))}function Ks(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function kk(r){return function(){this.style.removeProperty(r)}}function wk(r,e,i){return function(){this.style.setProperty(r,e,i)}}function Sk(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 fc(r,e,i){return arguments.length>1?this.each((e==null?kk:typeof e==="function"?Sk:wk)(r,e,i==null?"":i)):qo(this.node(),r)}function qo(r,e){return r.style.getPropertyValue(e)||Ks(r).getComputedStyle(r,null).getPropertyValue(e)}function Tk(r){return function(){delete this[r]}}function _k(r,e){return function(){this[r]=e}}function Bk(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function dc(r,e){return arguments.length>1?this.each((e==null?Tk:typeof e==="function"?Bk:_k)(r,e)):this.node()[r]}function kp(r){return r.trim().split(/^|\s+/)}function pc(r){return r.classList||new wp(r)}function wp(r){this._node=r,this._names=kp(r.getAttribute("class")||"")}wp.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 Sp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function Tp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function vk(r){return function(){Sp(this,r)}}function Lk(r){return function(){Tp(this,r)}}function Fk(r,e){return function(){(e.apply(this,arguments)?Sp:Tp)(this,r)}}function gc(r,e){var i=kp(r+"");if(arguments.length<2){var s=pc(this.node()),o=-1,n=i.length;while(++o<n)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?Fk:e?vk:Lk)(i,e))}function Ak(){this.textContent=""}function Mk(r){return function(){this.textContent=r}}function Ek(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function mc(r){return arguments.length?this.each(r==null?Ak:(typeof r==="function"?Ek:Mk)(r)):this.node().textContent}function Ok(){this.innerHTML=""}function Ik(r){return function(){this.innerHTML=r}}function $k(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function yc(r){return arguments.length?this.each(r==null?Ok:(typeof r==="function"?$k:Ik)(r)):this.node().innerHTML}function Dk(){if(this.nextSibling)this.parentNode.appendChild(this)}function xc(){return this.each(Dk)}function Pk(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Cc(){return this.each(Pk)}function bc(r){var e=typeof r==="function"?r:Gs(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Rk(){return null}function kc(r,e){var i=typeof r==="function"?r:Gs(r),s=e==null?Rk:typeof e==="function"?e:Ro(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function qk(){var r=this.parentNode;if(r)r.removeChild(this)}function wc(){return this.each(qk)}function Nk(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Wk(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Sc(r){return this.select(r?Wk:Nk)}function Tc(r){return arguments.length?this.property("__data__",r):this.node().__data__}function zk(r){return function(e){r.call(this,e,this.__data__)}}function Hk(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 Yk(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,n;i<o;++i)if(n=e[i],(!r.type||n.type===r.type)&&n.name===r.name)this.removeEventListener(n.type,n.listener,n.options);else e[++s]=n;if(++s)e.length=s;else delete this.__on}}function Uk(r,e,i){return function(){var s=this.__on,o,n=zk(e);if(s){for(var c=0,h=s.length;c<h;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=n,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,n,i),o={type:r.type,name:r.name,value:e,listener:n,options:i},!s)this.__on=[o];else s.push(o)}}function _c(r,e,i){var s=Hk(r+""),o,n=s.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,y=h.length,f;g<y;++g)for(o=0,f=h[g];o<n;++o)if((c=s[o]).type===f.type&&c.name===f.name)return f.value}return}h=e?Uk:Yk;for(o=0;o<n;++o)this.each(h(s[o],e,i));return this}function _p(r,e,i){var s=Ks(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 jk(r,e){return function(){return _p(this,r,e)}}function Gk(r,e){return function(){return _p(this,r,e.apply(this,arguments))}}function Bc(r,e){return this.each((typeof e==="function"?Gk:jk)(r,e))}function*vc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length,c;o<n;++o)if(c=s[o])yield c}var Lc=[null];function tr(r,e){this._groups=r,this._parents=e}function Bp(){return new tr([[document.documentElement]],Lc)}function Xk(){return this}tr.prototype=Bp.prototype={constructor:tr,select:Uh,selectAll:Gh,selectChild:Xh,selectChildren:Vh,filter:Kh,data:Jh,enter:Zh,exit:tc,join:ec,merge:rc,selection:Xk,order:ic,sort:oc,call:sc,nodes:ac,node:nc,size:lc,empty:hc,each:cc,attr:uc,style:fc,property:dc,classed:gc,text:mc,html:yc,raise:xc,lower:Cc,append:bc,insert:kc,remove:wc,clone:Sc,datum:Tc,on:_c,dispatch:Bc,[Symbol.iterator]:vc};var wo=Bp;function p(r){return typeof r==="string"?new tr([[document.querySelector(r)]],[document.documentElement]):new tr([[r]],Lc)}function An(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Cr(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Rn(){}var Zs=0.7,ul=1/Zs,ds="\\s*([+-]?\\d+)\\s*",Qs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vk=/^#([0-9a-f]{3,8})$/,Kk=new RegExp(`^rgb\\(${ds},${ds},${ds}\\)$`),Zk=new RegExp(`^rgb\\(${Ti},${Ti},${Ti}\\)$`),Qk=new RegExp(`^rgba\\(${ds},${ds},${ds},${Qs}\\)$`),Jk=new RegExp(`^rgba\\(${Ti},${Ti},${Ti},${Qs}\\)$`),t1=new RegExp(`^hsl\\(${Qs},${Ti},${Ti}\\)$`),e1=new RegExp(`^hsla\\(${Qs},${Ti},${Ti},${Qs}\\)$`),vp={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};An(Rn,zt,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Lp,formatHex:Lp,formatHex8:r1,formatHsl:i1,formatRgb:Fp,toString:Fp});function Lp(){return this.rgb().formatHex()}function r1(){return this.rgb().formatHex8()}function i1(){return $p(this).formatHsl()}function Fp(){return this.rgb().formatRgb()}function zt(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Vk.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?Ap(e):i===3?new qe(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?hl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?hl(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=Kk.exec(r))?new qe(e[1],e[2],e[3],1):(e=Zk.exec(r))?new qe(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Qk.exec(r))?hl(e[1],e[2],e[3],e[4]):(e=Jk.exec(r))?hl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=t1.exec(r))?Op(e[1],e[2]/100,e[3]/100,1):(e=e1.exec(r))?Op(e[1],e[2]/100,e[3]/100,e[4]):vp.hasOwnProperty(r)?Ap(vp[r]):r==="transparent"?new qe(NaN,NaN,NaN,0):null}function Ap(r){return new qe(r>>16&255,r>>8&255,r&255,1)}function hl(r,e,i,s){if(s<=0)r=e=i=NaN;return new qe(r,e,i,s)}function Oi(r){if(!(r instanceof Rn))r=zt(r);if(!r)return new qe;return r=r.rgb(),new qe(r.r,r.g,r.b,r.opacity)}function ps(r,e,i,s){return arguments.length===1?Oi(r):new qe(r,e,i,s==null?1:s)}function qe(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}An(qe,ps,Cr(Rn,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new qe(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Zs:Math.pow(Zs,r),new qe(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new qe(Go(this.r),Go(this.g),Go(this.b),fl(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:Mp,formatHex:Mp,formatHex8:o1,formatRgb:Ep,toString:Ep}));function Mp(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}`}function o1(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}${jo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ep(){let r=fl(this.opacity);return`${r===1?"rgb(":"rgba("}${Go(this.r)}, ${Go(this.g)}, ${Go(this.b)}${r===1?")":`, ${r})`}`}function fl(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Go(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function jo(r){return r=Go(r),(r<16?"0":"")+r.toString(16)}function Op(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 pi(r,e,i,s)}function $p(r){if(r instanceof pi)return new pi(r.h,r.s,r.l,r.opacity);if(!(r instanceof Rn))r=zt(r);if(!r)return new pi;if(r instanceof pi)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),n=Math.max(e,i,s),c=NaN,h=n-o,g=(n+o)/2;if(h){if(e===n)c=(i-s)/h+(i<s)*6;else if(i===n)c=(s-e)/h+2;else c=(e-i)/h+4;h/=g<0.5?n+o:2-n-o,c*=60}else h=g>0&&g<1?0:c;return new pi(c,h,g,r.opacity)}function Dp(r,e,i,s){return arguments.length===1?$p(r):new pi(r,e,i,s==null?1:s)}function pi(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}An(pi,Dp,Cr(Rn,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new pi(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Zs:Math.pow(Zs,r),new pi(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 qe(Fc(r>=240?r-240:r+120,o,s),Fc(r,o,s),Fc(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new pi(Ip(this.h),cl(this.s),cl(this.l),fl(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=fl(this.opacity);return`${r===1?"hsl(":"hsla("}${Ip(this.h)}, ${cl(this.s)*100}%, ${cl(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Ip(r){return r=(r||0)%360,r<0?r+360:r}function cl(r){return Math.max(0,Math.min(1,r||0))}function Fc(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 Ac(r,e,i,s,o){var n=r*r,c=n*r;return((1-3*r+3*n-c)*e+(4-6*n+3*c)*i+(1+3*r+3*n-3*c)*s+c*o)/6}function Mc(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],n=r[s+1],c=s>0?r[s-1]:2*o-n,h=s<e-1?r[s+2]:2*n-o;return Ac((i-s/e)*e,c,o,n,h)}}function Ec(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],n=r[s%e],c=r[(s+1)%e],h=r[(s+2)%e];return Ac((i-s/e)*e,o,n,c,h)}}var Sr=(r)=>()=>r;function Pp(r,e){return function(i){return r+i*e}}function s1(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 co(r,e){var i=e-r;return i?Pp(r,i>180||i<-180?i-360*Math.round(i/360):i):Sr(isNaN(r)?e:r)}function Rp(r){return(r=+r)===1?cn:function(e,i){return i-e?s1(e,i,r):Sr(isNaN(e)?i:e)}}function cn(r,e){var i=e-r;return i?Pp(r,i):Sr(isNaN(r)?e:r)}var zn=function r(e){var i=Rp(e);function s(o,n){var c=i((o=ps(o)).r,(n=ps(n)).r),h=i(o.g,n.g),g=i(o.b,n.b),y=cn(o.opacity,n.opacity);return function(f){return o.r=c(f),o.g=h(f),o.b=g(f),o.opacity=y(f),o+""}}return s.gamma=r,s}(1);function qp(r){return function(e){var i=e.length,s=Array(i),o=Array(i),n=Array(i),c,h;for(c=0;c<i;++c)h=ps(e[c]),s[c]=h.r||0,o[c]=h.g||0,n[c]=h.b||0;return s=r(s),o=r(o),n=r(n),h.opacity=1,function(g){return h.r=s(g),h.g=o(g),h.b=n(g),h+""}}}var a1=qp(Mc),n1=qp(Ec);function Be(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var Ic=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oc=new RegExp(Ic.source,"g");function l1(r){return function(){return r}}function h1(r){return function(e){return r(e)+""}}function Tr(r,e){var i=Ic.lastIndex=Oc.lastIndex=0,s,o,n,c=-1,h=[],g=[];r=r+"",e=e+"";while((s=Ic.exec(r))&&(o=Oc.exec(e))){if((n=o.index)>i)if(n=e.slice(i,n),h[c])h[c]+=n;else h[++c]=n;if((s=s[0])===(o=o[0]))if(h[c])h[c]+=o;else h[++c]=o;else h[++c]=null,g.push({i:c,x:Be(s,o)});i=Oc.lastIndex}if(i<e.length)if(n=e.slice(i),h[c])h[c]+=n;else h[++c]=n;return h.length<2?g[0]?h1(g[0].x):l1(e):(e=g.length,function(y){for(var f=0,b;f<e;++f)h[(b=g[f]).i]=b.x(y);return h.join("")})}var Np=180/Math.PI,dl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pl(r,e,i,s,o,n){var c,h,g;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(g=r*i+e*s)i-=r*g,s-=e*g;if(h=Math.sqrt(i*i+s*s))i/=h,s/=h,g/=h;if(r*s<e*i)r=-r,e=-e,g=-g,c=-c;return{translateX:o,translateY:n,rotate:Math.atan2(e,r)*Np,skewX:Math.atan(g)*Np,scaleX:c,scaleY:h}}var gl;function Wp(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?dl:pl(e.a,e.b,e.c,e.d,e.e,e.f)}function zp(r){if(r==null)return dl;if(!gl)gl=document.createElementNS("http://www.w3.org/2000/svg","g");if(gl.setAttribute("transform",r),!(r=gl.transform.baseVal.consolidate()))return dl;return r=r.matrix,pl(r.a,r.b,r.c,r.d,r.e,r.f)}function Hp(r,e,i,s){function o(y){return y.length?y.pop()+" ":""}function n(y,f,b,F,N,W){if(y!==b||f!==F){var H=N.push("translate(",null,e,null,i);W.push({i:H-4,x:Be(y,b)},{i:H-2,x:Be(f,F)})}else if(b||F)N.push("translate("+b+e+F+i)}function c(y,f,b,F){if(y!==f){if(y-f>180)f+=360;else if(f-y>180)y+=360;F.push({i:b.push(o(b)+"rotate(",null,s)-2,x:Be(y,f)})}else if(f)b.push(o(b)+"rotate("+f+s)}function h(y,f,b,F){if(y!==f)F.push({i:b.push(o(b)+"skewX(",null,s)-2,x:Be(y,f)});else if(f)b.push(o(b)+"skewX("+f+s)}function g(y,f,b,F,N,W){if(y!==b||f!==F){var H=N.push(o(N)+"scale(",null,",",null,")");W.push({i:H-4,x:Be(y,b)},{i:H-2,x:Be(f,F)})}else if(b!==1||F!==1)N.push(o(N)+"scale("+b+","+F+")")}return function(y,f){var b=[],F=[];return y=r(y),f=r(f),n(y.translateX,y.translateY,f.translateX,f.translateY,b,F),c(y.rotate,f.rotate,b,F),h(y.skewX,f.skewX,b,F),g(y.scaleX,y.scaleY,f.scaleX,f.scaleY,b,F),y=f=null,function(N){var W=-1,H=F.length,Y;while(++W<H)b[(Y=F[W]).i]=Y.x(N);return b.join("")}}}var $c=Hp(Wp,"px, ","px)","deg)"),Dc=Hp(zp,", ",")",")");var gs=0,ta=0,Js=0,Up=1000,ml,ea,yl=0,Xo=0,xl=0,ra=typeof performance==="object"&&performance.now?performance:Date,jp=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function oa(){return Xo||(jp(c1),Xo=ra.now()+xl)}function c1(){Xo=0}function ia(){this._call=this._time=this._next=null}ia.prototype=Cl.prototype={constructor:ia,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?oa():+i)+(e==null?0:+e),!this._next&&ea!==this){if(ea)ea._next=this;else ml=this;ea=this}this._call=r,this._time=i,Pc()},stop:function(){if(this._call)this._call=null,this._time=1/0,Pc()}};function Cl(r,e,i){var s=new ia;return s.restart(r,e,i),s}function Gp(){oa(),++gs;var r=ml,e;while(r){if((e=Xo-r._time)>=0)r._call.call(void 0,e);r=r._next}--gs}function Yp(){Xo=(yl=ra.now())+xl,gs=ta=0;try{Gp()}finally{gs=0,f1(),Xo=0}}function u1(){var r=ra.now(),e=r-yl;if(e>Up)xl-=e,yl=r}function f1(){var r,e=ml,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:ml=i;ea=r,Pc(s)}function Pc(r){if(gs)return;if(ta)ta=clearTimeout(ta);var e=r-Xo;if(e>24){if(r<1/0)ta=setTimeout(Yp,r-ra.now()-xl);if(Js)Js=clearInterval(Js)}else{if(!Js)yl=ra.now(),Js=setInterval(u1,Up);gs=1,jp(Yp)}}function sa(r,e,i){var s=new ia;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var d1=Hh("start","end","cancel","interrupt"),p1=[],Kp=0,Xp=1,kl=2,bl=3,Vp=4,wl=5,aa=6;function So(r,e,i,s,o,n){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;g1(r,i,{name:e,index:s,group:o,on:d1,tween:p1,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:Kp})}function na(r,e){var i=lr(r,e);if(i.state>Kp)throw Error("too late; already scheduled");return i}function dr(r,e){var i=lr(r,e);if(i.state>bl)throw Error("too late; already running");return i}function lr(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function g1(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=Cl(n,0,i.time);function n(y){if(i.state=Xp,i.timer.restart(c,i.delay,i.time),i.delay<=y)c(y-i.delay)}function c(y){var f,b,F,N;if(i.state!==Xp)return g();for(f in s){if(N=s[f],N.name!==i.name)continue;if(N.state===bl)return sa(c);if(N.state===Vp)N.state=aa,N.timer.stop(),N.on.call("interrupt",r,r.__data__,N.index,N.group),delete s[f];else if(+f<e)N.state=aa,N.timer.stop(),N.on.call("cancel",r,r.__data__,N.index,N.group),delete s[f]}if(sa(function(){if(i.state===bl)i.state=Vp,i.timer.restart(h,i.delay,i.time),h(y)}),i.state=kl,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==kl)return;i.state=bl,o=Array(F=i.tween.length);for(f=0,b=-1;f<F;++f)if(N=i.tween[f].value.call(r,r.__data__,i.index,i.group))o[++b]=N;o.length=b+1}function h(y){var f=y<i.duration?i.ease.call(null,y/i.duration):(i.timer.restart(g),i.state=wl,1),b=-1,F=o.length;while(++b<F)o[b].call(r,f);if(i.state===wl)i.on.call("end",r,r.__data__,i.index,i.group),g()}function g(){i.state=aa,i.timer.stop(),delete s[e];for(var y in s)return;delete r.__transition}}function la(r,e){var i=r.__transition,s,o,n=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){n=!1;continue}o=s.state>kl&&s.state<wl,s.state=aa,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(n)delete r.__transition}function Rc(r){return this.each(function(){la(this,r)})}function m1(r,e){var i,s;return function(){var o=dr(this,r),n=o.tween;if(n!==i){s=i=n;for(var c=0,h=s.length;c<h;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function y1(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var n=dr(this,r),c=n.tween;if(c!==s){o=(s=c).slice();for(var h={name:e,value:i},g=0,y=o.length;g<y;++g)if(o[g].name===e){o[g]=h;break}if(g===y)o.push(h)}n.tween=o}}function qc(r,e){var i=this._id;if(r+="",arguments.length<2){var s=lr(this.node(),i).tween;for(var o=0,n=s.length,c;o<n;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?m1:y1)(i,r,e))}function ms(r,e,i){var s=r._id;return r.each(function(){var o=dr(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return lr(o,s).value[e]}}function ha(r,e){var i;return(typeof e==="number"?Be:e instanceof zt?zn:(i=zt(e))?(e=i,zn):Tr)(r,e)}function x1(r){return function(){this.removeAttribute(r)}}function C1(r){return function(){this.removeAttributeNS(r.space,r.local)}}function b1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttribute(r);return c===o?null:c===s?n:n=e(s=c,i)}}function k1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?n:n=e(s=c,i)}}function w1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttribute(r);return c=this.getAttribute(r),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function S1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function Nc(r,e){var i=Si(r),s=i==="transform"?Dc:ha;return this.attrTween(r,typeof e==="function"?(i.local?S1:w1)(i,s,ms(this,"attr."+r,e)):e==null?(i.local?C1:x1)(i):(i.local?k1:b1)(i,s,e))}function T1(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function _1(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function B1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&_1(r,n);return i}return o._value=e,o}function v1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&T1(r,n);return i}return o._value=e,o}function Wc(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=Si(r);return this.tween(i,(s.local?B1:v1)(s,e))}function L1(r,e){return function(){na(this,r).delay=+e.apply(this,arguments)}}function F1(r,e){return e=+e,function(){na(this,r).delay=e}}function zc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?L1:F1)(e,r)):lr(this.node(),e).delay}function A1(r,e){return function(){dr(this,r).duration=+e.apply(this,arguments)}}function M1(r,e){return e=+e,function(){dr(this,r).duration=e}}function Hc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?A1:M1)(e,r)):lr(this.node(),e).duration}function E1(r,e){if(typeof e!=="function")throw Error();return function(){dr(this,r).ease=e}}function Yc(r){var e=this._id;return arguments.length?this.each(E1(e,r)):lr(this.node(),e).ease}function O1(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();dr(this,r).ease=i}}function Uc(r){if(typeof r!=="function")throw Error();return this.each(O1(this._id,r))}function jc(r){if(typeof r!=="function")r=fs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new Fr(s,this._parents,this._name,this._id)}function Gc(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,n=Math.min(s,o),c=Array(s),h=0;h<n;++h)for(var g=e[h],y=i[h],f=g.length,b=c[h]=Array(f),F,N=0;N<f;++N)if(F=g[N]||y[N])b[N]=F;for(;h<s;++h)c[h]=e[h];return new Fr(c,this._parents,this._name,this._id)}function I1(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 $1(r,e,i){var s,o,n=I1(e)?na:dr;return function(){var c=n(this,r),h=c.on;if(h!==s)(o=(s=h).copy()).on(e,i);c.on=o}}function Xc(r,e){var i=this._id;return arguments.length<2?lr(this.node(),i).on.on(r):this.each($1(i,r,e))}function D1(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function Vc(){return this.on("end.remove",D1(this._id))}function Kc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Ro(r);for(var s=this._groups,o=s.length,n=Array(o),c=0;c<o;++c)for(var h=s[c],g=h.length,y=n[c]=Array(g),f,b,F=0;F<g;++F)if((f=h[F])&&(b=r.call(f,f.__data__,F,h))){if("__data__"in f)b.__data__=f.__data__;y[F]=b,So(y[F],e,i,F,y,lr(f,i))}return new Fr(n,this._parents,e,i)}function Zc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=us(r);for(var s=this._groups,o=s.length,n=[],c=[],h=0;h<o;++h)for(var g=s[h],y=g.length,f,b=0;b<y;++b)if(f=g[b]){for(var F=r.call(f,f.__data__,b,g),N,W=lr(f,i),H=0,Y=F.length;H<Y;++H)if(N=F[H])So(N,e,i,H,F,W);n.push(F),c.push(f)}return new Fr(n,c,e,i)}var P1=wo.prototype.constructor;function Qc(){return new P1(this._groups,this._parents)}function R1(r,e){var i,s,o;return function(){var n=qo(this,r),c=(this.style.removeProperty(r),qo(this,r));return n===c?null:n===i&&c===s?o:o=e(i=n,s=c)}}function Zp(r){return function(){this.style.removeProperty(r)}}function q1(r,e,i){var s,o=i+"",n;return function(){var c=qo(this,r);return c===o?null:c===s?n:n=e(s=c,i)}}function N1(r,e,i){var s,o,n;return function(){var c=qo(this,r),h=i(this),g=h+"";if(h==null)g=h=(this.style.removeProperty(r),qo(this,r));return c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function W1(r,e){var i,s,o,n="style."+e,c="end."+n,h;return function(){var g=dr(this,r),y=g.on,f=g.value[n]==null?h||(h=Zp(e)):void 0;if(y!==i||o!==f)(s=(i=y).copy()).on(c,o=f);g.on=s}}function Jc(r,e,i){var s=(r+="")==="transform"?$c:ha;return e==null?this.styleTween(r,R1(r,s)).on("end.style."+r,Zp(r)):typeof e==="function"?this.styleTween(r,N1(r,s,ms(this,"style."+r,e))).each(W1(this._id,r)):this.styleTween(r,q1(r,s,e),i).on("end.style."+r,null)}function z1(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function H1(r,e,i){var s,o;function n(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&z1(r,c,i);return s}return n._value=e,n}function tu(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,H1(r,e,i==null?"":i))}function Y1(r){return function(){this.textContent=r}}function U1(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function eu(r){return this.tween("text",typeof r==="function"?U1(ms(this,"text",r)):Y1(r==null?"":r+""))}function j1(r){return function(e){this.textContent=r.call(this,e)}}function G1(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&j1(o);return e}return s._value=r,s}function ru(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,G1(r))}function iu(){var r=this._name,e=this._id,i=Sl();for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y]){var f=lr(g,e);So(g,r,i,y,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Fr(s,this._parents,r,i)}function ou(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(n,c){var h={value:c},g={value:function(){if(--o===0)n()}};if(i.each(function(){var y=dr(this,s),f=y.on;if(f!==r)e=(r=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(g);y.on=e}),o===0)n()})}var X1=0;function Fr(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Qp(r){return wo().transition(r)}function Sl(){return++X1}var To=wo.prototype;Fr.prototype=Qp.prototype={constructor:Fr,select:Kc,selectAll:Zc,selectChild:To.selectChild,selectChildren:To.selectChildren,filter:jc,merge:Gc,selection:Qc,transition:iu,call:To.call,nodes:To.nodes,node:To.node,size:To.size,empty:To.empty,each:To.each,on:Xc,attr:Nc,attrTween:Wc,style:Jc,styleTween:tu,text:eu,textTween:ru,remove:Vc,tween:qc,delay:zc,duration:Hc,ease:Yc,easeVarying:Uc,end:ou,[Symbol.iterator]:To[Symbol.iterator]};function Tl(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var V1={time:null,delay:0,duration:250,ease:Tl};function K1(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function su(r){var e,i;if(r instanceof Fr)e=r._id,r=r._name;else e=Sl(),(i=V1).time=oa(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])So(g,r,e,y,c,i||K1(g,e));return new Fr(s,this._parents,r,e)}wo.prototype.interrupt=Rc;wo.prototype.transition=su;var{abs:tE,max:eE,min:rE}=Math;function Jp(r){return[+r[0],+r[1]]}function Z1(r){return[Jp(r[0]),Jp(r[1])]}var iE={name:"x",handles:["w","e"].map(au),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]]}},oE={name:"y",handles:["n","s"].map(au),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]]}},sE={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(au),input:function(r){return r==null?null:Z1(r)},output:function(r){return r}};function au(r){return{type:r}}var nu=Math.PI,lu=2*nu;var Q1=lu-0.000001;function tg(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function J1(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return tg;let i=10**e;return function(s){this._+=s[0];for(let o=1,n=s.length;o<n;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class ys{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?tg:J1(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,n){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+n}`}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 n=this._x1,c=this._y1,h=i-r,g=s-e,y=n-r,f=c-e,b=y*y+f*f;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(b>0.000001));else if(!(Math.abs(f*h-g*y)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let F=i-n,N=s-c,W=h*h+g*g,H=F*F+N*N,Y=Math.sqrt(W),j=Math.sqrt(b),K=o*Math.tan((nu-Math.acos((W+b-H)/(2*Y*j)))/2),Q=K/j,rt=K/Y;if(Math.abs(Q-1)>0.000001)this._append`L${r+Q*y},${e+Q*f}`;this._append`A${o},${o},0,0,${+(f*F>y*N)},${this._x1=r+rt*h},${this._y1=e+rt*g}`}}arc(r,e,i,s,o,n){if(r=+r,e=+e,i=+i,n=!!n,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),h=i*Math.sin(s),g=r+c,y=e+h,f=1^n,b=n?s-o:o-s;if(this._x1===null)this._append`M${g},${y}`;else if(Math.abs(this._x1-g)>0.000001||Math.abs(this._y1-y)>0.000001)this._append`L${g},${y}`;if(!i)return;if(b<0)b=b%lu+lu;if(b>Q1)this._append`A${i},${i},0,1,${f},${r-c},${e-h}A${i},${i},0,1,${f},${this._x1=g},${this._y1=y}`;else if(b>0.000001)this._append`A${i},${i},0,${+(b>=nu)},${f},${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 eg(){return new ys}eg.prototype=ys.prototype;function ae(r){return function(){return r}}var{abs:$i,atan2:Ve,cos:Ln,max:uo,min:La,sin:Ut,sqrt:Un}=Math,Fe=0.000000000001,Er=Math.PI,Vr=Er/2,jn=2*Er;function po(r){return r>1?0:r<-1?Er:Math.acos(r)}function Bi(r){return r>=1?Vr:r<=-1?-Vr:Math.asin(r)}function qn(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 ys(e)}var mo=Array.prototype.slice;function Wr(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function rg(r){this._context=r}rg.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 _i(r){return new rg(r)}function Ia(r){return r[0]}function Da(r){return r[1]}function Vn(r,e){var i=ae(!0),s=null,o=_i,n=null,c=qn(h);r=typeof r==="function"?r:r===void 0?Ia:ae(r),e=typeof e==="function"?e:e===void 0?Da:ae(e);function h(g){var y,f=(g=Wr(g)).length,b,F=!1,N;if(s==null)n=o(N=c());for(y=0;y<=f;++y){if(!(y<f&&i(b=g[y],y,g))===F)if(F=!F)n.lineStart();else n.lineEnd();if(F)n.point(+r(b,y,g),+e(b,y,g))}if(N)return n=null,N+""||null}return h.x=function(g){return arguments.length?(r=typeof g==="function"?g:ae(+g),h):r},h.y=function(g){return arguments.length?(e=typeof g==="function"?g:ae(+g),h):e},h.defined=function(g){return arguments.length?(i=typeof g==="function"?g:ae(!!g),h):i},h.curve=function(g){return arguments.length?(o=g,s!=null&&(n=o(s)),h):o},h.context=function(g){return arguments.length?(g==null?s=n=null:n=o(s=g),h):s},h}class hu{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 Wn(r){return new hu(r,!0)}function ca(r){return new hu(r,!1)}function ii(){}function xs(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 ua(r){this._context=r}ua.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:xs(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:xs(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Vo(r){return new ua(r)}function ig(r){this._context=r}ig.prototype={areaStart:ii,areaEnd:ii,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:xs(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function _l(r){return new ig(r)}function og(r){this._context=r}og.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:xs(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Bl(r){return new og(r)}function sg(r,e){this._basis=new ua(r),this._beta=e}sg.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],n=r[i]-s,c=e[i]-o,h=-1,g;while(++h<=i)g=h/i,this._basis.point(this._beta*r[h]+(1-this._beta)*(s+g*n),this._beta*e[h]+(1-this._beta)*(o+g*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var cu=function r(e){function i(s){return e===1?new ua(s):new sg(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function Cs(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 vl(r,e){this._context=r,this._k=(1-e)/6}vl.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:Cs(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:Cs(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 fa=function r(e){function i(s){return new vl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Ll(r,e){this._context=r,this._k=(1-e)/6}Ll.prototype={areaStart:ii,areaEnd:ii,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:Cs(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 uu=function r(e){function i(s){return new Ll(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Fl(r,e){this._context=r,this._k=(1-e)/6}Fl.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:Cs(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 fu=function r(e){function i(s){return new Fl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function da(r,e,i){var{_x1:s,_y1:o,_x2:n,_y2:c}=r;if(r._l01_a>Fe){var h=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,g=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*h-r._x0*r._l12_2a+r._x2*r._l01_2a)/g,o=(o*h-r._y0*r._l12_2a+r._y2*r._l01_2a)/g}if(r._l23_a>Fe){var y=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,f=3*r._l23_a*(r._l23_a+r._l12_a);n=(n*y+r._x1*r._l23_2a-e*r._l12_2a)/f,c=(c*y+r._y1*r._l23_2a-i*r._l12_2a)/f}r._context.bezierCurveTo(s,o,n,c,r._x2,r._y2)}function ag(r,e){this._context=r,this._alpha=e}ag.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:da(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 pa=function r(e){function i(s){return e?new ag(s,e):new vl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function ng(r,e){this._context=r,this._alpha=e}ng.prototype={areaStart:ii,areaEnd:ii,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:da(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 du=function r(e){function i(s){return e?new ng(s,e):new Ll(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function lg(r,e){this._context=r,this._alpha=e}lg.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:da(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 pu=function r(e){function i(s){return e?new lg(s,e):new Fl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function hg(r){this._context=r}hg.prototype={areaStart:ii,areaEnd:ii,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 Al(r){return new hg(r)}function cg(r){return r<0?-1:1}function ug(r,e,i){var s=r._x1-r._x0,o=e-r._x1,n=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),h=(n*o+c*s)/(s+o);return(cg(n)+cg(c))*Math.min(Math.abs(n),Math.abs(c),0.5*Math.abs(h))||0}function fg(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function gu(r,e,i){var{_x0:s,_y0:o,_x1:n,_y1:c}=r,h=(n-s)/3;r._context.bezierCurveTo(s+h,o+h*e,n-h,c-h*i,n,c)}function Ml(r){this._context=r}Ml.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:gu(this,this._t0,fg(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,gu(this,fg(this,i=ug(this,r,e)),i);break;default:gu(this,this._t0,i=ug(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function dg(r){this._context=new pg(r)}(dg.prototype=Object.create(Ml.prototype)).point=function(r,e){Ml.prototype.point.call(this,e,r)};function pg(r){this._context=r}pg.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,n){this._context.bezierCurveTo(e,r,s,i,n,o)}};function ga(r){return new Ml(r)}function ma(r){return new dg(r)}function mg(r){this._context=r}mg.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=gg(r),o=gg(e);for(var n=0,c=1;c<i;++n,++c)this._context.bezierCurveTo(s[0][n],o[0][n],s[1][n],o[1][n],r[c],e[c])}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 gg(r){var e,i=r.length-1,s,o=Array(i),n=Array(i),c=Array(i);o[0]=0,n[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,n[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,n[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/n[e-1],n[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/n[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/n[e];n[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)n[e]=2*r[e+1]-o[e+1];return[o,n]}function bs(r){return new mg(r)}function El(r,e){this._context=r,this._t=e}El.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 ks(r){return new El(r,0.5)}function ya(r){return new El(r,0)}function xa(r){return new El(r,1)}function No(r,e,i){this.k=r,this.x=e,this.y=i}No.prototype={constructor:No,scale:function(r){return r===1?this:new No(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new No(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 mu=new No(1,0,0);yu.prototype=No.prototype;function yu(r){while(!r.__zoom)if(!(r=r.parentNode))return mu;return r.__zoom}var V=t((r)=>{let{securityLevel:e}=l(),i=p("body");if(e==="sandbox"){let n=p(`#i${r}`).node()?.contentDocument??document;i=p(n.body)}return i.select(`#${r}`)},"selectSvgElement");function zg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(zg,"getDefaultExportFromCjs");var gr={},Ol={},Wo={},yg;function ws(){if(yg)return Wo;yg=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,h){if(h){let g=Object.keys(h);for(let y=0,f=g.length;y<f;y+=1){let b=g[y];c[b]=h[b]}}return c}t(s,"extend");function o(c,h){let g="";for(let y=0;y<h;y+=1)g+=c;return g}t(o,"repeat");function n(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(n,"isNegativeZero"),Wo.isNothing=r,Wo.isObject=e,Wo.toArray=i,Wo.repeat=o,Wo.isNegativeZero=n,Wo.extend=s,Wo}t(ws,"requireCommon");var xu,xg;function Ss(){if(xg)return xu;xg=1;function r(i,s){let o="",n=i.reason||"(unknown reason)";if(!i.mark)return n;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
128
+ `},"getStyles"),jb=t((r,e)=>{if(e!==void 0)tl[r]=e},"addStylesForDiagram"),go=Ub,Pa={};Kt(Pa,{clear:()=>C,getAccDescription:()=>A,getAccTitle:()=>E,getDiagramTitle:()=>R,setAccDescription:()=>T,setAccTitle:()=>S,setDiagramTitle:()=>L});var qh="",Nh="",Wh="",zh=t((r)=>O(r,x()),"sanitizeText"),C=t(()=>{qh="",Wh="",Nh=""},"clear"),S=t((r)=>{qh=zh(r).replace(/^\s+/g,"")},"setAccTitle"),E=t(()=>qh,"getAccTitle"),T=t((r)=>{Wh=zh(r).replace(/\n\s+/g,`
129
+ `)},"setAccDescription"),A=t(()=>Wh,"getAccDescription"),L=t((r)=>{Nh=zh(r)},"setDiagramTitle"),R=t(()=>Nh,"getDiagramTitle"),cp=a,Gb=Vr,l=x,sn=Ui,Tn=on,sl=t((r)=>O(r,l()),"sanitizeText"),kr=ht,Xb=t(()=>Pa,"getCommonDb"),ol={},Gr=t((r,e,i)=>{if(ol[r])cp.warn(`Diagram with id ${r} already registered. Overwriting.`);if(ol[r]=e,i)up(r,i);jb(r,e.styles),e.injectUtils?.(cp,Gb,l,sl,kr,Xb(),()=>{})},"registerDiagram"),Oa=t((r)=>{if(r in ol)return ol[r];throw new Vb(r)},"getDiagram"),Vb=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};var Kb={value:()=>{}};function bp(){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 al(i)}function al(r){this._=r}function Zb(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}})}al.prototype=bp.prototype={constructor:al,on:function(r,e){var i=this._,s=Zb(r+"",i),o,n=-1,c=s.length;if(arguments.length<2){while(++n<c)if((o=(r=s[n]).type)&&(o=Qb(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++n<c)if(o=(r=s[n]).type)i[o]=Cp(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Cp(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 al(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,n;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(n=this._[r],s=0,o=n.length;s<o;++s)n[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,n=s.length;o<n;++o)s[o].value.apply(e,i)}};function Qb(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Cp(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Kb,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Hh=bp;var nl="http://www.w3.org/1999/xhtml",Yh={svg:"http://www.w3.org/2000/svg",xhtml:nl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ei(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Yh.hasOwnProperty(e)?{space:Yh[e],local:r}:r}function Jb(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===nl&&e.documentElement.namespaceURI===nl?e.createElement(r):e.createElementNS(i,r)}}function tk(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function ta(r){var e=Ei(r);return(e.local?tk:Jb)(e)}function ek(){}function Uo(r){return r==null?ek:function(){return this.querySelector(r)}}function Uh(r){if(typeof r!=="function")r=Uo(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=Array(c),g,y,f=0;f<c;++f)if((g=n[f])&&(y=r.call(g,g.__data__,f,n))){if("__data__"in g)y.__data__=g.__data__;h[f]=y}return new er(s,this._parents)}function jh(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function rk(){return[]}function xs(r){return r==null?rk:function(){return this.querySelectorAll(r)}}function ik(r){return function(){return jh(r.apply(this,arguments))}}function Gh(r){if(typeof r==="function")r=ik(r);else r=xs(r);for(var e=this._groups,i=e.length,s=[],o=[],n=0;n<i;++n)for(var c=e[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])s.push(r.call(g,g.__data__,y,c)),o.push(g);return new er(s,o)}function Cs(r){return function(){return this.matches(r)}}function ll(r){return function(e){return e.matches(r)}}var ok=Array.prototype.find;function sk(r){return function(){return ok.call(this.children,r)}}function ak(){return this.firstElementChild}function Xh(r){return this.select(r==null?ak:sk(typeof r==="function"?r:ll(r)))}var nk=Array.prototype.filter;function lk(){return Array.from(this.children)}function hk(r){return function(){return nk.call(this.children,r)}}function Vh(r){return this.selectAll(r==null?lk:hk(typeof r==="function"?r:ll(r)))}function Kh(r){if(typeof r!=="function")r=Cs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new er(s,this._parents)}function ra(r){return Array(r.length)}function Zh(){return new er(this._enter||this._groups.map(ra),this._parents)}function ia(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}ia.prototype={constructor:ia,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 Qh(r){return function(){return r}}function ck(r,e,i,s,o,n){var c=0,h,g=e.length,y=n.length;for(;c<y;++c)if(h=e[c])h.__data__=n[c],s[c]=h;else i[c]=new ia(r,n[c]);for(;c<g;++c)if(h=e[c])o[c]=h}function uk(r,e,i,s,o,n,c){var h,g,y=new Map,f=e.length,B=n.length,v=Array(f),q;for(h=0;h<f;++h)if(g=e[h])if(v[h]=q=c.call(g,g.__data__,h,e)+"",y.has(q))o[h]=g;else y.set(q,g);for(h=0;h<B;++h)if(q=c.call(r,n[h],h,n)+"",g=y.get(q))s[h]=g,g.__data__=n[h],y.delete(q);else i[h]=new ia(r,n[h]);for(h=0;h<f;++h)if((g=e[h])&&y.get(v[h])===g)o[h]=g}function fk(r){return r.__data__}function Jh(r,e){if(!arguments.length)return Array.from(this,fk);var i=e?uk:ck,s=this._parents,o=this._groups;if(typeof r!=="function")r=Qh(r);for(var n=o.length,c=Array(n),h=Array(n),g=Array(n),y=0;y<n;++y){var f=s[y],B=o[y],v=B.length,q=dk(r.call(f,f&&f.__data__,y,s)),W=q.length,H=h[y]=Array(W),Y=c[y]=Array(W),j=g[y]=Array(v);i(f,B,H,Y,j,q,e);for(var X=0,Q=0,rt,it;X<W;++X)if(rt=H[X]){if(X>=Q)Q=X+1;while(!(it=Y[Q])&&++Q<W);rt._next=it||null}}return c=new er(c,s),c._enter=h,c._exit=g,c}function dk(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function tc(){return new er(this._exit||this._groups.map(ra),this._parents)}function ec(r,e,i){var s=this.enter(),o=this,n=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)n.remove();else i(n);return s&&o?s.merge(o).order():o}function rc(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,n=s.length,c=Math.min(o,n),h=Array(o),g=0;g<c;++g)for(var y=i[g],f=s[g],B=y.length,v=h[g]=Array(B),q,W=0;W<B;++W)if(q=y[W]||f[W])v[W]=q;for(;g<o;++g)h[g]=i[g];return new er(h,this._parents)}function ic(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,n=s[o],c;--o>=0;)if(c=s[o]){if(n&&c.compareDocumentPosition(n)^4)n.parentNode.insertBefore(c,n);n=c}return this}function oc(r){if(!r)r=pk;function e(B,v){return B&&v?r(B.__data__,v.__data__):!B-!v}for(var i=this._groups,s=i.length,o=Array(s),n=0;n<s;++n){for(var c=i[n],h=c.length,g=o[n]=Array(h),y,f=0;f<h;++f)if(y=c[f])g[f]=y;g.sort(e)}return new er(o,this._parents).order()}function pk(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function sc(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function ac(){return Array.from(this)}function nc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length;o<n;++o){var c=s[o];if(c)return c}return null}function lc(){let r=0;for(let e of this)++r;return r}function hc(){return!this.node()}function cc(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],n=0,c=o.length,h;n<c;++n)if(h=o[n])r.call(h,h.__data__,n,o);return this}function gk(r){return function(){this.removeAttribute(r)}}function mk(r){return function(){this.removeAttributeNS(r.space,r.local)}}function yk(r,e){return function(){this.setAttribute(r,e)}}function xk(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function Ck(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function bk(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 uc(r,e){var i=Ei(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?mk:gk:typeof e==="function"?i.local?bk:Ck:i.local?xk:yk)(i,e))}function oa(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function kk(r){return function(){this.style.removeProperty(r)}}function wk(r,e,i){return function(){this.style.setProperty(r,e,i)}}function Sk(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 fc(r,e,i){return arguments.length>1?this.each((e==null?kk:typeof e==="function"?Sk:wk)(r,e,i==null?"":i)):jo(this.node(),r)}function jo(r,e){return r.style.getPropertyValue(e)||oa(r).getComputedStyle(r,null).getPropertyValue(e)}function Tk(r){return function(){delete this[r]}}function _k(r,e){return function(){this[r]=e}}function Bk(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function dc(r,e){return arguments.length>1?this.each((e==null?Tk:typeof e==="function"?Bk:_k)(r,e)):this.node()[r]}function kp(r){return r.trim().split(/^|\s+/)}function pc(r){return r.classList||new wp(r)}function wp(r){this._node=r,this._names=kp(r.getAttribute("class")||"")}wp.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 Sp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function Tp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function vk(r){return function(){Sp(this,r)}}function Lk(r){return function(){Tp(this,r)}}function Fk(r,e){return function(){(e.apply(this,arguments)?Sp:Tp)(this,r)}}function gc(r,e){var i=kp(r+"");if(arguments.length<2){var s=pc(this.node()),o=-1,n=i.length;while(++o<n)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?Fk:e?vk:Lk)(i,e))}function Ak(){this.textContent=""}function Mk(r){return function(){this.textContent=r}}function Ek(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function mc(r){return arguments.length?this.each(r==null?Ak:(typeof r==="function"?Ek:Mk)(r)):this.node().textContent}function Ok(){this.innerHTML=""}function Ik(r){return function(){this.innerHTML=r}}function $k(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function yc(r){return arguments.length?this.each(r==null?Ok:(typeof r==="function"?$k:Ik)(r)):this.node().innerHTML}function Dk(){if(this.nextSibling)this.parentNode.appendChild(this)}function xc(){return this.each(Dk)}function Pk(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Cc(){return this.each(Pk)}function bc(r){var e=typeof r==="function"?r:ta(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Rk(){return null}function kc(r,e){var i=typeof r==="function"?r:ta(r),s=e==null?Rk:typeof e==="function"?e:Uo(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function qk(){var r=this.parentNode;if(r)r.removeChild(this)}function wc(){return this.each(qk)}function Nk(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Wk(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Sc(r){return this.select(r?Wk:Nk)}function Tc(r){return arguments.length?this.property("__data__",r):this.node().__data__}function zk(r){return function(e){r.call(this,e,this.__data__)}}function Hk(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 Yk(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,n;i<o;++i)if(n=e[i],(!r.type||n.type===r.type)&&n.name===r.name)this.removeEventListener(n.type,n.listener,n.options);else e[++s]=n;if(++s)e.length=s;else delete this.__on}}function Uk(r,e,i){return function(){var s=this.__on,o,n=zk(e);if(s){for(var c=0,h=s.length;c<h;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=n,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,n,i),o={type:r.type,name:r.name,value:e,listener:n,options:i},!s)this.__on=[o];else s.push(o)}}function _c(r,e,i){var s=Hk(r+""),o,n=s.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,y=h.length,f;g<y;++g)for(o=0,f=h[g];o<n;++o)if((c=s[o]).type===f.type&&c.name===f.name)return f.value}return}h=e?Uk:Yk;for(o=0;o<n;++o)this.each(h(s[o],e,i));return this}function _p(r,e,i){var s=oa(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 jk(r,e){return function(){return _p(this,r,e)}}function Gk(r,e){return function(){return _p(this,r,e.apply(this,arguments))}}function Bc(r,e){return this.each((typeof e==="function"?Gk:jk)(r,e))}function*vc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length,c;o<n;++o)if(c=s[o])yield c}var Lc=[null];function er(r,e){this._groups=r,this._parents=e}function Bp(){return new er([[document.documentElement]],Lc)}function Xk(){return this}er.prototype=Bp.prototype={constructor:er,select:Uh,selectAll:Gh,selectChild:Xh,selectChildren:Vh,filter:Kh,data:Jh,enter:Zh,exit:tc,join:ec,merge:rc,selection:Xk,order:ic,sort:oc,call:sc,nodes:ac,node:nc,size:lc,empty:hc,each:cc,attr:uc,style:fc,property:dc,classed:gc,text:mc,html:yc,raise:xc,lower:Cc,append:bc,insert:kc,remove:wc,clone:Sc,datum:Tc,on:_c,dispatch:Bc,[Symbol.iterator]:vc};var Ao=Bp;function p(r){return typeof r==="string"?new er([[document.querySelector(r)]],[document.documentElement]):new er([[r]],Lc)}function En(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Cr(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function An(){}var sa=0.7,ul=1/sa,bs="\\s*([+-]?\\d+)\\s*",aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vk=/^#([0-9a-f]{3,8})$/,Kk=new RegExp(`^rgb\\(${bs},${bs},${bs}\\)$`),Zk=new RegExp(`^rgb\\(${Oi},${Oi},${Oi}\\)$`),Qk=new RegExp(`^rgba\\(${bs},${bs},${bs},${aa}\\)$`),Jk=new RegExp(`^rgba\\(${Oi},${Oi},${Oi},${aa}\\)$`),t1=new RegExp(`^hsl\\(${aa},${Oi},${Oi}\\)$`),e1=new RegExp(`^hsla\\(${aa},${Oi},${Oi},${aa}\\)$`),vp={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};En(An,zt,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Lp,formatHex:Lp,formatHex8:r1,formatHsl:i1,formatRgb:Fp,toString:Fp});function Lp(){return this.rgb().formatHex()}function r1(){return this.rgb().formatHex8()}function i1(){return $p(this).formatHsl()}function Fp(){return this.rgb().formatRgb()}function zt(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Vk.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?Ap(e):i===3?new qe(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?hl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?hl(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=Kk.exec(r))?new qe(e[1],e[2],e[3],1):(e=Zk.exec(r))?new qe(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Qk.exec(r))?hl(e[1],e[2],e[3],e[4]):(e=Jk.exec(r))?hl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=t1.exec(r))?Op(e[1],e[2]/100,e[3]/100,1):(e=e1.exec(r))?Op(e[1],e[2]/100,e[3]/100,e[4]):vp.hasOwnProperty(r)?Ap(vp[r]):r==="transparent"?new qe(NaN,NaN,NaN,0):null}function Ap(r){return new qe(r>>16&255,r>>8&255,r&255,1)}function hl(r,e,i,s){if(s<=0)r=e=i=NaN;return new qe(r,e,i,s)}function qi(r){if(!(r instanceof An))r=zt(r);if(!r)return new qe;return r=r.rgb(),new qe(r.r,r.g,r.b,r.opacity)}function ks(r,e,i,s){return arguments.length===1?qi(r):new qe(r,e,i,s==null?1:s)}function qe(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}En(qe,ks,Cr(An,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new qe(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?sa:Math.pow(sa,r),new qe(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new qe(ts(this.r),ts(this.g),ts(this.b),fl(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:Mp,formatHex:Mp,formatHex8:o1,formatRgb:Ep,toString:Ep}));function Mp(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}`}function o1(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}${Jo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ep(){let r=fl(this.opacity);return`${r===1?"rgb(":"rgba("}${ts(this.r)}, ${ts(this.g)}, ${ts(this.b)}${r===1?")":`, ${r})`}`}function fl(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function ts(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Jo(r){return r=ts(r),(r<16?"0":"")+r.toString(16)}function Op(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 ki(r,e,i,s)}function $p(r){if(r instanceof ki)return new ki(r.h,r.s,r.l,r.opacity);if(!(r instanceof An))r=zt(r);if(!r)return new ki;if(r instanceof ki)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),n=Math.max(e,i,s),c=NaN,h=n-o,g=(n+o)/2;if(h){if(e===n)c=(i-s)/h+(i<s)*6;else if(i===n)c=(s-e)/h+2;else c=(e-i)/h+4;h/=g<0.5?n+o:2-n-o,c*=60}else h=g>0&&g<1?0:c;return new ki(c,h,g,r.opacity)}function Dp(r,e,i,s){return arguments.length===1?$p(r):new ki(r,e,i,s==null?1:s)}function ki(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}En(ki,Dp,Cr(An,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new ki(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?sa:Math.pow(sa,r),new ki(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 qe(Fc(r>=240?r-240:r+120,o,s),Fc(r,o,s),Fc(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new ki(Ip(this.h),cl(this.s),cl(this.l),fl(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=fl(this.opacity);return`${r===1?"hsl(":"hsla("}${Ip(this.h)}, ${cl(this.s)*100}%, ${cl(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Ip(r){return r=(r||0)%360,r<0?r+360:r}function cl(r){return Math.max(0,Math.min(1,r||0))}function Fc(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 Ac(r,e,i,s,o){var n=r*r,c=n*r;return((1-3*r+3*n-c)*e+(4-6*n+3*c)*i+(1+3*r+3*n-3*c)*s+c*o)/6}function Mc(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],n=r[s+1],c=s>0?r[s-1]:2*o-n,h=s<e-1?r[s+2]:2*n-o;return Ac((i-s/e)*e,c,o,n,h)}}function Ec(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],n=r[s%e],c=r[(s+1)%e],h=r[(s+2)%e];return Ac((i-s/e)*e,o,n,c,h)}}var Sr=(r)=>()=>r;function Pp(r,e){return function(i){return r+i*e}}function s1(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 yo(r,e){var i=e-r;return i?Pp(r,i>180||i<-180?i-360*Math.round(i/360):i):Sr(isNaN(r)?e:r)}function Rp(r){return(r=+r)===1?ln:function(e,i){return i-e?s1(e,i,r):Sr(isNaN(e)?i:e)}}function ln(r,e){var i=e-r;return i?Pp(r,i):Sr(isNaN(r)?e:r)}var zn=function r(e){var i=Rp(e);function s(o,n){var c=i((o=ks(o)).r,(n=ks(n)).r),h=i(o.g,n.g),g=i(o.b,n.b),y=ln(o.opacity,n.opacity);return function(f){return o.r=c(f),o.g=h(f),o.b=g(f),o.opacity=y(f),o+""}}return s.gamma=r,s}(1);function qp(r){return function(e){var i=e.length,s=Array(i),o=Array(i),n=Array(i),c,h;for(c=0;c<i;++c)h=ks(e[c]),s[c]=h.r||0,o[c]=h.g||0,n[c]=h.b||0;return s=r(s),o=r(o),n=r(n),h.opacity=1,function(g){return h.r=s(g),h.g=o(g),h.b=n(g),h+""}}}var a1=qp(Mc),n1=qp(Ec);function Be(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var Ic=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oc=new RegExp(Ic.source,"g");function l1(r){return function(){return r}}function h1(r){return function(e){return r(e)+""}}function Tr(r,e){var i=Ic.lastIndex=Oc.lastIndex=0,s,o,n,c=-1,h=[],g=[];r=r+"",e=e+"";while((s=Ic.exec(r))&&(o=Oc.exec(e))){if((n=o.index)>i)if(n=e.slice(i,n),h[c])h[c]+=n;else h[++c]=n;if((s=s[0])===(o=o[0]))if(h[c])h[c]+=o;else h[++c]=o;else h[++c]=null,g.push({i:c,x:Be(s,o)});i=Oc.lastIndex}if(i<e.length)if(n=e.slice(i),h[c])h[c]+=n;else h[++c]=n;return h.length<2?g[0]?h1(g[0].x):l1(e):(e=g.length,function(y){for(var f=0,B;f<e;++f)h[(B=g[f]).i]=B.x(y);return h.join("")})}var Np=180/Math.PI,dl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pl(r,e,i,s,o,n){var c,h,g;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(g=r*i+e*s)i-=r*g,s-=e*g;if(h=Math.sqrt(i*i+s*s))i/=h,s/=h,g/=h;if(r*s<e*i)r=-r,e=-e,g=-g,c=-c;return{translateX:o,translateY:n,rotate:Math.atan2(e,r)*Np,skewX:Math.atan(g)*Np,scaleX:c,scaleY:h}}var gl;function Wp(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?dl:pl(e.a,e.b,e.c,e.d,e.e,e.f)}function zp(r){if(r==null)return dl;if(!gl)gl=document.createElementNS("http://www.w3.org/2000/svg","g");if(gl.setAttribute("transform",r),!(r=gl.transform.baseVal.consolidate()))return dl;return r=r.matrix,pl(r.a,r.b,r.c,r.d,r.e,r.f)}function Hp(r,e,i,s){function o(y){return y.length?y.pop()+" ":""}function n(y,f,B,v,q,W){if(y!==B||f!==v){var H=q.push("translate(",null,e,null,i);W.push({i:H-4,x:Be(y,B)},{i:H-2,x:Be(f,v)})}else if(B||v)q.push("translate("+B+e+v+i)}function c(y,f,B,v){if(y!==f){if(y-f>180)f+=360;else if(f-y>180)y+=360;v.push({i:B.push(o(B)+"rotate(",null,s)-2,x:Be(y,f)})}else if(f)B.push(o(B)+"rotate("+f+s)}function h(y,f,B,v){if(y!==f)v.push({i:B.push(o(B)+"skewX(",null,s)-2,x:Be(y,f)});else if(f)B.push(o(B)+"skewX("+f+s)}function g(y,f,B,v,q,W){if(y!==B||f!==v){var H=q.push(o(q)+"scale(",null,",",null,")");W.push({i:H-4,x:Be(y,B)},{i:H-2,x:Be(f,v)})}else if(B!==1||v!==1)q.push(o(q)+"scale("+B+","+v+")")}return function(y,f){var B=[],v=[];return y=r(y),f=r(f),n(y.translateX,y.translateY,f.translateX,f.translateY,B,v),c(y.rotate,f.rotate,B,v),h(y.skewX,f.skewX,B,v),g(y.scaleX,y.scaleY,f.scaleX,f.scaleY,B,v),y=f=null,function(q){var W=-1,H=v.length,Y;while(++W<H)B[(Y=v[W]).i]=Y.x(q);return B.join("")}}}var $c=Hp(Wp,"px, ","px)","deg)"),Dc=Hp(zp,", ",")",")");var ws=0,la=0,na=0,Up=1000,ml,ha,yl=0,es=0,xl=0,ca=typeof performance==="object"&&performance.now?performance:Date,jp=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function fa(){return es||(jp(c1),es=ca.now()+xl)}function c1(){es=0}function ua(){this._call=this._time=this._next=null}ua.prototype=Cl.prototype={constructor:ua,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?fa():+i)+(e==null?0:+e),!this._next&&ha!==this){if(ha)ha._next=this;else ml=this;ha=this}this._call=r,this._time=i,Pc()},stop:function(){if(this._call)this._call=null,this._time=1/0,Pc()}};function Cl(r,e,i){var s=new ua;return s.restart(r,e,i),s}function Gp(){fa(),++ws;var r=ml,e;while(r){if((e=es-r._time)>=0)r._call.call(void 0,e);r=r._next}--ws}function Yp(){es=(yl=ca.now())+xl,ws=la=0;try{Gp()}finally{ws=0,f1(),es=0}}function u1(){var r=ca.now(),e=r-yl;if(e>Up)xl-=e,yl=r}function f1(){var r,e=ml,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:ml=i;ha=r,Pc(s)}function Pc(r){if(ws)return;if(la)la=clearTimeout(la);var e=r-es;if(e>24){if(r<1/0)la=setTimeout(Yp,r-ca.now()-xl);if(na)na=clearInterval(na)}else{if(!na)yl=ca.now(),na=setInterval(u1,Up);ws=1,jp(Yp)}}function da(r,e,i){var s=new ua;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var d1=Hh("start","end","cancel","interrupt"),p1=[],Kp=0,Xp=1,kl=2,bl=3,Vp=4,wl=5,pa=6;function Mo(r,e,i,s,o,n){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;g1(r,i,{name:e,index:s,group:o,on:d1,tween:p1,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:Kp})}function ga(r,e){var i=hr(r,e);if(i.state>Kp)throw Error("too late; already scheduled");return i}function pr(r,e){var i=hr(r,e);if(i.state>bl)throw Error("too late; already running");return i}function hr(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function g1(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=Cl(n,0,i.time);function n(y){if(i.state=Xp,i.timer.restart(c,i.delay,i.time),i.delay<=y)c(y-i.delay)}function c(y){var f,B,v,q;if(i.state!==Xp)return g();for(f in s){if(q=s[f],q.name!==i.name)continue;if(q.state===bl)return da(c);if(q.state===Vp)q.state=pa,q.timer.stop(),q.on.call("interrupt",r,r.__data__,q.index,q.group),delete s[f];else if(+f<e)q.state=pa,q.timer.stop(),q.on.call("cancel",r,r.__data__,q.index,q.group),delete s[f]}if(da(function(){if(i.state===bl)i.state=Vp,i.timer.restart(h,i.delay,i.time),h(y)}),i.state=kl,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==kl)return;i.state=bl,o=Array(v=i.tween.length);for(f=0,B=-1;f<v;++f)if(q=i.tween[f].value.call(r,r.__data__,i.index,i.group))o[++B]=q;o.length=B+1}function h(y){var f=y<i.duration?i.ease.call(null,y/i.duration):(i.timer.restart(g),i.state=wl,1),B=-1,v=o.length;while(++B<v)o[B].call(r,f);if(i.state===wl)i.on.call("end",r,r.__data__,i.index,i.group),g()}function g(){i.state=pa,i.timer.stop(),delete s[e];for(var y in s)return;delete r.__transition}}function ma(r,e){var i=r.__transition,s,o,n=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){n=!1;continue}o=s.state>kl&&s.state<wl,s.state=pa,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(n)delete r.__transition}function Rc(r){return this.each(function(){ma(this,r)})}function m1(r,e){var i,s;return function(){var o=pr(this,r),n=o.tween;if(n!==i){s=i=n;for(var c=0,h=s.length;c<h;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function y1(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var n=pr(this,r),c=n.tween;if(c!==s){o=(s=c).slice();for(var h={name:e,value:i},g=0,y=o.length;g<y;++g)if(o[g].name===e){o[g]=h;break}if(g===y)o.push(h)}n.tween=o}}function qc(r,e){var i=this._id;if(r+="",arguments.length<2){var s=hr(this.node(),i).tween;for(var o=0,n=s.length,c;o<n;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?m1:y1)(i,r,e))}function Ss(r,e,i){var s=r._id;return r.each(function(){var o=pr(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return hr(o,s).value[e]}}function ya(r,e){var i;return(typeof e==="number"?Be:e instanceof zt?zn:(i=zt(e))?(e=i,zn):Tr)(r,e)}function x1(r){return function(){this.removeAttribute(r)}}function C1(r){return function(){this.removeAttributeNS(r.space,r.local)}}function b1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttribute(r);return c===o?null:c===s?n:n=e(s=c,i)}}function k1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?n:n=e(s=c,i)}}function w1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttribute(r);return c=this.getAttribute(r),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function S1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function Nc(r,e){var i=Ei(r),s=i==="transform"?Dc:ya;return this.attrTween(r,typeof e==="function"?(i.local?S1:w1)(i,s,Ss(this,"attr."+r,e)):e==null?(i.local?C1:x1)(i):(i.local?k1:b1)(i,s,e))}function T1(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function _1(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function B1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&_1(r,n);return i}return o._value=e,o}function v1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&T1(r,n);return i}return o._value=e,o}function Wc(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=Ei(r);return this.tween(i,(s.local?B1:v1)(s,e))}function L1(r,e){return function(){ga(this,r).delay=+e.apply(this,arguments)}}function F1(r,e){return e=+e,function(){ga(this,r).delay=e}}function zc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?L1:F1)(e,r)):hr(this.node(),e).delay}function A1(r,e){return function(){pr(this,r).duration=+e.apply(this,arguments)}}function M1(r,e){return e=+e,function(){pr(this,r).duration=e}}function Hc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?A1:M1)(e,r)):hr(this.node(),e).duration}function E1(r,e){if(typeof e!=="function")throw Error();return function(){pr(this,r).ease=e}}function Yc(r){var e=this._id;return arguments.length?this.each(E1(e,r)):hr(this.node(),e).ease}function O1(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();pr(this,r).ease=i}}function Uc(r){if(typeof r!=="function")throw Error();return this.each(O1(this._id,r))}function jc(r){if(typeof r!=="function")r=Cs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new Mr(s,this._parents,this._name,this._id)}function Gc(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,n=Math.min(s,o),c=Array(s),h=0;h<n;++h)for(var g=e[h],y=i[h],f=g.length,B=c[h]=Array(f),v,q=0;q<f;++q)if(v=g[q]||y[q])B[q]=v;for(;h<s;++h)c[h]=e[h];return new Mr(c,this._parents,this._name,this._id)}function I1(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 $1(r,e,i){var s,o,n=I1(e)?ga:pr;return function(){var c=n(this,r),h=c.on;if(h!==s)(o=(s=h).copy()).on(e,i);c.on=o}}function Xc(r,e){var i=this._id;return arguments.length<2?hr(this.node(),i).on.on(r):this.each($1(i,r,e))}function D1(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function Vc(){return this.on("end.remove",D1(this._id))}function Kc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Uo(r);for(var s=this._groups,o=s.length,n=Array(o),c=0;c<o;++c)for(var h=s[c],g=h.length,y=n[c]=Array(g),f,B,v=0;v<g;++v)if((f=h[v])&&(B=r.call(f,f.__data__,v,h))){if("__data__"in f)B.__data__=f.__data__;y[v]=B,Mo(y[v],e,i,v,y,hr(f,i))}return new Mr(n,this._parents,e,i)}function Zc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=xs(r);for(var s=this._groups,o=s.length,n=[],c=[],h=0;h<o;++h)for(var g=s[h],y=g.length,f,B=0;B<y;++B)if(f=g[B]){for(var v=r.call(f,f.__data__,B,g),q,W=hr(f,i),H=0,Y=v.length;H<Y;++H)if(q=v[H])Mo(q,e,i,H,v,W);n.push(v),c.push(f)}return new Mr(n,c,e,i)}var P1=Ao.prototype.constructor;function Qc(){return new P1(this._groups,this._parents)}function R1(r,e){var i,s,o;return function(){var n=jo(this,r),c=(this.style.removeProperty(r),jo(this,r));return n===c?null:n===i&&c===s?o:o=e(i=n,s=c)}}function Zp(r){return function(){this.style.removeProperty(r)}}function q1(r,e,i){var s,o=i+"",n;return function(){var c=jo(this,r);return c===o?null:c===s?n:n=e(s=c,i)}}function N1(r,e,i){var s,o,n;return function(){var c=jo(this,r),h=i(this),g=h+"";if(h==null)g=h=(this.style.removeProperty(r),jo(this,r));return c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function W1(r,e){var i,s,o,n="style."+e,c="end."+n,h;return function(){var g=pr(this,r),y=g.on,f=g.value[n]==null?h||(h=Zp(e)):void 0;if(y!==i||o!==f)(s=(i=y).copy()).on(c,o=f);g.on=s}}function Jc(r,e,i){var s=(r+="")==="transform"?$c:ya;return e==null?this.styleTween(r,R1(r,s)).on("end.style."+r,Zp(r)):typeof e==="function"?this.styleTween(r,N1(r,s,Ss(this,"style."+r,e))).each(W1(this._id,r)):this.styleTween(r,q1(r,s,e),i).on("end.style."+r,null)}function z1(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function H1(r,e,i){var s,o;function n(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&z1(r,c,i);return s}return n._value=e,n}function tu(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,H1(r,e,i==null?"":i))}function Y1(r){return function(){this.textContent=r}}function U1(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function eu(r){return this.tween("text",typeof r==="function"?U1(Ss(this,"text",r)):Y1(r==null?"":r+""))}function j1(r){return function(e){this.textContent=r.call(this,e)}}function G1(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&j1(o);return e}return s._value=r,s}function ru(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,G1(r))}function iu(){var r=this._name,e=this._id,i=Sl();for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y]){var f=hr(g,e);Mo(g,r,i,y,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Mr(s,this._parents,r,i)}function ou(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(n,c){var h={value:c},g={value:function(){if(--o===0)n()}};if(i.each(function(){var y=pr(this,s),f=y.on;if(f!==r)e=(r=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(g);y.on=e}),o===0)n()})}var X1=0;function Mr(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Qp(r){return Ao().transition(r)}function Sl(){return++X1}var Eo=Ao.prototype;Mr.prototype=Qp.prototype={constructor:Mr,select:Kc,selectAll:Zc,selectChild:Eo.selectChild,selectChildren:Eo.selectChildren,filter:jc,merge:Gc,selection:Qc,transition:iu,call:Eo.call,nodes:Eo.nodes,node:Eo.node,size:Eo.size,empty:Eo.empty,each:Eo.each,on:Xc,attr:Nc,attrTween:Wc,style:Jc,styleTween:tu,text:eu,textTween:ru,remove:Vc,tween:qc,delay:zc,duration:Hc,ease:Yc,easeVarying:Uc,end:ou,[Symbol.iterator]:Eo[Symbol.iterator]};function Tl(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var V1={time:null,delay:0,duration:250,ease:Tl};function K1(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function su(r){var e,i;if(r instanceof Mr)e=r._id,r=r._name;else e=Sl(),(i=V1).time=fa(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])Mo(g,r,e,y,c,i||K1(g,e));return new Mr(s,this._parents,r,e)}Ao.prototype.interrupt=Rc;Ao.prototype.transition=su;var{abs:tE,max:eE,min:rE}=Math;function Jp(r){return[+r[0],+r[1]]}function Z1(r){return[Jp(r[0]),Jp(r[1])]}var iE={name:"x",handles:["w","e"].map(au),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]]}},oE={name:"y",handles:["n","s"].map(au),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]]}},sE={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(au),input:function(r){return r==null?null:Z1(r)},output:function(r){return r}};function au(r){return{type:r}}var nu=Math.PI,lu=2*nu;var Q1=lu-0.000001;function tg(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function J1(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return tg;let i=10**e;return function(s){this._+=s[0];for(let o=1,n=s.length;o<n;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Ts{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?tg:J1(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,n){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+n}`}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 n=this._x1,c=this._y1,h=i-r,g=s-e,y=n-r,f=c-e,B=y*y+f*f;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(B>0.000001));else if(!(Math.abs(f*h-g*y)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let v=i-n,q=s-c,W=h*h+g*g,H=v*v+q*q,Y=Math.sqrt(W),j=Math.sqrt(B),X=o*Math.tan((nu-Math.acos((W+B-H)/(2*Y*j)))/2),Q=X/j,rt=X/Y;if(Math.abs(Q-1)>0.000001)this._append`L${r+Q*y},${e+Q*f}`;this._append`A${o},${o},0,0,${+(f*v>y*q)},${this._x1=r+rt*h},${this._y1=e+rt*g}`}}arc(r,e,i,s,o,n){if(r=+r,e=+e,i=+i,n=!!n,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),h=i*Math.sin(s),g=r+c,y=e+h,f=1^n,B=n?s-o:o-s;if(this._x1===null)this._append`M${g},${y}`;else if(Math.abs(this._x1-g)>0.000001||Math.abs(this._y1-y)>0.000001)this._append`L${g},${y}`;if(!i)return;if(B<0)B=B%lu+lu;if(B>Q1)this._append`A${i},${i},0,1,${f},${r-c},${e-h}A${i},${i},0,1,${f},${this._x1=g},${this._y1=y}`;else if(B>0.000001)this._append`A${i},${i},0,${+(B>=nu)},${f},${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 eg(){return new Ts}eg.prototype=Ts.prototype;function ae(r){return function(){return r}}var{abs:Vi,atan2:Ve,cos:Rn,max:vo,min:$a,sin:Ut,sqrt:Un}=Math,Fe=0.000000000001,Er=Math.PI,Hr=Er/2,jn=2*Er;function bo(r){return r>1?0:r<-1?Er:Math.acos(r)}function Wi(r){return r>=1?Hr:r<=-1?-Hr:Math.asin(r)}function qn(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 Ts(e)}var xo=Array.prototype.slice;function Yr(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function rg(r){this._context=r}rg.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 Ii(r){return new rg(r)}function Ba(r){return r[0]}function Fa(r){return r[1]}function Vn(r,e){var i=ae(!0),s=null,o=Ii,n=null,c=qn(h);r=typeof r==="function"?r:r===void 0?Ba:ae(r),e=typeof e==="function"?e:e===void 0?Fa:ae(e);function h(g){var y,f=(g=Yr(g)).length,B,v=!1,q;if(s==null)n=o(q=c());for(y=0;y<=f;++y){if(!(y<f&&i(B=g[y],y,g))===v)if(v=!v)n.lineStart();else n.lineEnd();if(v)n.point(+r(B,y,g),+e(B,y,g))}if(q)return n=null,q+""||null}return h.x=function(g){return arguments.length?(r=typeof g==="function"?g:ae(+g),h):r},h.y=function(g){return arguments.length?(e=typeof g==="function"?g:ae(+g),h):e},h.defined=function(g){return arguments.length?(i=typeof g==="function"?g:ae(!!g),h):i},h.curve=function(g){return arguments.length?(o=g,s!=null&&(n=o(s)),h):o},h.context=function(g){return arguments.length?(g==null?s=n=null:n=o(s=g),h):s},h}class hu{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 Wn(r){return new hu(r,!0)}function xa(r){return new hu(r,!1)}function ui(){}function _s(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 Ca(r){this._context=r}Ca.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_s(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}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:_s(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function rs(r){return new Ca(r)}function ig(r){this._context=r}ig.prototype={areaStart:ui,areaEnd:ui,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:_s(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function _l(r){return new ig(r)}function og(r){this._context=r}og.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:_s(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Bl(r){return new og(r)}function sg(r,e){this._basis=new Ca(r),this._beta=e}sg.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],n=r[i]-s,c=e[i]-o,h=-1,g;while(++h<=i)g=h/i,this._basis.point(this._beta*r[h]+(1-this._beta)*(s+g*n),this._beta*e[h]+(1-this._beta)*(o+g*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var cu=function r(e){function i(s){return e===1?new Ca(s):new sg(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function Bs(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 vl(r,e){this._context=r,this._k=(1-e)/6}vl.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:Bs(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:Bs(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 ba=function r(e){function i(s){return new vl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Ll(r,e){this._context=r,this._k=(1-e)/6}Ll.prototype={areaStart:ui,areaEnd:ui,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:Bs(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 uu=function r(e){function i(s){return new Ll(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Fl(r,e){this._context=r,this._k=(1-e)/6}Fl.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:Bs(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 fu=function r(e){function i(s){return new Fl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ka(r,e,i){var{_x1:s,_y1:o,_x2:n,_y2:c}=r;if(r._l01_a>Fe){var h=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,g=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*h-r._x0*r._l12_2a+r._x2*r._l01_2a)/g,o=(o*h-r._y0*r._l12_2a+r._y2*r._l01_2a)/g}if(r._l23_a>Fe){var y=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,f=3*r._l23_a*(r._l23_a+r._l12_a);n=(n*y+r._x1*r._l23_2a-e*r._l12_2a)/f,c=(c*y+r._y1*r._l23_2a-i*r._l12_2a)/f}r._context.bezierCurveTo(s,o,n,c,r._x2,r._y2)}function ag(r,e){this._context=r,this._alpha=e}ag.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:ka(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 wa=function r(e){function i(s){return e?new ag(s,e):new vl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function ng(r,e){this._context=r,this._alpha=e}ng.prototype={areaStart:ui,areaEnd:ui,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:ka(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 du=function r(e){function i(s){return e?new ng(s,e):new Ll(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function lg(r,e){this._context=r,this._alpha=e}lg.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:ka(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 pu=function r(e){function i(s){return e?new lg(s,e):new Fl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function hg(r){this._context=r}hg.prototype={areaStart:ui,areaEnd:ui,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 Al(r){return new hg(r)}function cg(r){return r<0?-1:1}function ug(r,e,i){var s=r._x1-r._x0,o=e-r._x1,n=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),h=(n*o+c*s)/(s+o);return(cg(n)+cg(c))*Math.min(Math.abs(n),Math.abs(c),0.5*Math.abs(h))||0}function fg(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function gu(r,e,i){var{_x0:s,_y0:o,_x1:n,_y1:c}=r,h=(n-s)/3;r._context.bezierCurveTo(s+h,o+h*e,n-h,c-h*i,n,c)}function Ml(r){this._context=r}Ml.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:gu(this,this._t0,fg(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,gu(this,fg(this,i=ug(this,r,e)),i);break;default:gu(this,this._t0,i=ug(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function dg(r){this._context=new pg(r)}(dg.prototype=Object.create(Ml.prototype)).point=function(r,e){Ml.prototype.point.call(this,e,r)};function pg(r){this._context=r}pg.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,n){this._context.bezierCurveTo(e,r,s,i,n,o)}};function Sa(r){return new Ml(r)}function Ta(r){return new dg(r)}function mg(r){this._context=r}mg.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=gg(r),o=gg(e);for(var n=0,c=1;c<i;++n,++c)this._context.bezierCurveTo(s[0][n],o[0][n],s[1][n],o[1][n],r[c],e[c])}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 gg(r){var e,i=r.length-1,s,o=Array(i),n=Array(i),c=Array(i);o[0]=0,n[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,n[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,n[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/n[e-1],n[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/n[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/n[e];n[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)n[e]=2*r[e+1]-o[e+1];return[o,n]}function vs(r){return new mg(r)}function El(r,e){this._context=r,this._t=e}El.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 Ls(r){return new El(r,0.5)}function _a(r){return new El(r,0)}function va(r){return new El(r,1)}function Go(r,e,i){this.k=r,this.x=e,this.y=i}Go.prototype={constructor:Go,scale:function(r){return r===1?this:new Go(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new Go(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 mu=new Go(1,0,0);yu.prototype=Go.prototype;function yu(r){while(!r.__zoom)if(!(r=r.parentNode))return mu;return r.__zoom}var V=t((r)=>{let{securityLevel:e}=l(),i=p("body");if(e==="sandbox"){let n=p(`#i${r}`).node()?.contentDocument??document;i=p(n.body)}return i.select(`#${r}`)},"selectSvgElement");function zg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(zg,"getDefaultExportFromCjs");var mr={},Ol={},Xo={},yg;function Fs(){if(yg)return Xo;yg=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,h){if(h){let g=Object.keys(h);for(let y=0,f=g.length;y<f;y+=1){let B=g[y];c[B]=h[B]}}return c}t(s,"extend");function o(c,h){let g="";for(let y=0;y<h;y+=1)g+=c;return g}t(o,"repeat");function n(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(n,"isNegativeZero"),Xo.isNothing=r,Xo.isObject=e,Xo.toArray=i,Xo.repeat=o,Xo.isNegativeZero=n,Xo.extend=s,Xo}t(Fs,"requireCommon");var xu,xg;function As(){if(xg)return xu;xg=1;function r(i,s){let o="",n=i.reason||"(unknown reason)";if(!i.mark)return n;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
130
130
 
131
- `+i.mark.snippet;return n+" "+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"),xu=e,xu}t(Ss,"requireException");var Cu,Cg;function Hg(){if(Cg)return Cu;Cg=1;let r=ws();function e(o,n,c,h,g){let y="",f="",b=Math.floor(g/2)-1;if(h-n>b)y=" ... ",n=h-b+y.length;if(c-h>b)f=" ...",c=h+b-f.length;return{str:y+o.slice(n,c).replace(/\t/g,"→")+f,pos:h-n+y.length}}t(e,"getLine");function i(o,n){return r.repeat(" ",n-o.length)+o}t(i,"padStart");function s(o,n){if(n=Object.create(n||null),!o.buffer)return null;if(!n.maxLength)n.maxLength=79;if(typeof n.indent!=="number")n.indent=1;if(typeof n.linesBefore!=="number")n.linesBefore=3;if(typeof n.linesAfter!=="number")n.linesAfter=2;let c=/\r?\n|\r|\0/g,h=[0],g=[],y,f=-1;while(y=c.exec(o.buffer))if(g.push(y.index),h.push(y.index+y[0].length),o.position<=y.index&&f<0)f=h.length-2;if(f<0)f=h.length-1;let b="",F=Math.min(o.line+n.linesAfter,g.length).toString().length,N=n.maxLength-(n.indent+F+3);for(let H=1;H<=n.linesBefore;H++){if(f-H<0)break;let Y=e(o.buffer,h[f-H],g[f-H],o.position-(h[f]-h[f-H]),N);b=r.repeat(" ",n.indent)+i((o.line-H+1).toString(),F)+" | "+Y.str+`
132
- `+b}let W=e(o.buffer,h[f],g[f],o.position,N);b+=r.repeat(" ",n.indent)+i((o.line+1).toString(),F)+" | "+W.str+`
133
- `,b+=r.repeat("-",n.indent+F+3+W.pos)+`^
134
- `;for(let H=1;H<=n.linesAfter;H++){if(f+H>=g.length)break;let Y=e(o.buffer,h[f+H],g[f+H],o.position-(h[f]-h[f+H]),N);b+=r.repeat(" ",n.indent)+i((o.line+H+1).toString(),F)+" | "+Y.str+`
135
- `}return b.replace(/\n$/,"")}return t(s,"makeSnippet"),Cu=s,Cu}t(Hg,"requireSnippet");var bu,bg;function mr(){if(bg)return bu;bg=1;let r=Ss(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(n){let c={};if(n!==null)Object.keys(n).forEach(function(h){n[h].forEach(function(g){c[String(g)]=h})});return c}t(s,"compileStyleAliases");function o(n,c){if(c=c||{},Object.keys(c).forEach(function(h){if(e.indexOf(h)===-1)throw new r('Unknown option "'+h+'" is met in definition of "'+n+'" YAML type.')}),this.options=c,this.tag=n,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(h){return h},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}return t(o,"Type2"),bu=o,bu}t(mr,"requireType");var ku,kg;function Nu(){if(kg)return ku;kg=1;let r=Ss(),e=mr();function i(n,c){let h=[];return n[c].forEach(function(g){let y=h.length;h.forEach(function(f,b){if(f.tag===g.tag&&f.kind===g.kind&&f.multi===g.multi)y=b}),h[y]=g}),h}t(i,"compileList");function s(){let n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(h){if(h.multi)n.multi[h.kind].push(h),n.multi.fallback.push(h);else n[h.kind][h.tag]=n.fallback[h.tag]=h}t(c,"collectType");for(let h=0,g=arguments.length;h<g;h+=1)arguments[h].forEach(c);return n}t(s,"compileMap");function o(n){return this.extend(n)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let h=[],g=[];if(c instanceof e)g.push(c);else if(Array.isArray(c))g=g.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)h=h.concat(c.implicit);if(c.explicit)g=g.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");h.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.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(f.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),g.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let y=Object.create(o.prototype);return y.implicit=(this.implicit||[]).concat(h),y.explicit=(this.explicit||[]).concat(g),y.compiledImplicit=i(y,"implicit"),y.compiledExplicit=i(y,"explicit"),y.compiledTypeMap=s(y.compiledImplicit,y.compiledExplicit),y},"extend"),ku=o,ku}t(Nu,"requireSchema");var wu,wg;function Wu(){if(wg)return wu;return wg=1,wu=new(mr())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),wu}t(Wu,"requireStr");var Su,Sg;function zu(){if(Sg)return Su;return Sg=1,Su=new(mr())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),Su}t(zu,"requireSeq");var Tu,Tg;function Hu(){if(Tg)return Tu;return Tg=1,Tu=new(mr())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Tu}t(Hu,"requireMap");var _u,_g;function Yu(){if(_g)return _u;return _g=1,_u=new(Nu())({explicit:[Wu(),zu(),Hu()]}),_u}t(Yu,"requireFailsafe");var Bu,Bg;function Uu(){if(Bg)return Bu;Bg=1;let r=mr();function e(o){if(o===null)return!0;let n=o.length;return n===1&&o==="~"||n===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"),Bu=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"}),Bu}t(Uu,"require_null");var vu,vg;function ju(){if(vg)return vu;vg=1;let r=mr();function e(o){if(o===null)return!1;let n=o.length;return n===4&&(o==="true"||o==="True"||o==="TRUE")||n===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"),vu=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"}),vu}t(ju,"requireBool");var Lu,Lg;function Gu(){if(Lg)return Lu;Lg=1;let r=ws(),e=mr();function i(y){return y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102}t(i,"isHexCode");function s(y){return y>=48&&y<=55}t(s,"isOctCode");function o(y){return y>=48&&y<=57}t(o,"isDecCode");function n(y){if(y===null)return!1;let f=y.length,b=0,F=!1;if(!f)return!1;let N=y[b];if(N==="-"||N==="+")N=y[++b];if(N==="0"){if(b+1===f)return!0;if(N=y[++b],N==="b"){b++;for(;b<f;b++){if(N=y[b],N!=="0"&&N!=="1")return!1;F=!0}return F&&isFinite(c(y))}if(N==="x"){b++;for(;b<f;b++){if(!i(y.charCodeAt(b)))return!1;F=!0}return F&&isFinite(c(y))}if(N==="o"){b++;for(;b<f;b++){if(!s(y.charCodeAt(b)))return!1;F=!0}return F&&isFinite(c(y))}}for(;b<f;b++){if(!o(y.charCodeAt(b)))return!1;F=!0}if(!F)return!1;return isFinite(c(y))}t(n,"resolveYamlInteger");function c(y){let f=y,b=1,F=f[0];if(F==="-"||F==="+"){if(F==="-")b=-1;f=f.slice(1),F=f[0]}if(f==="0")return 0;if(F==="0"){if(f[1]==="b")return b*parseInt(f.slice(2),2);if(f[1]==="x")return b*parseInt(f.slice(2),16);if(f[1]==="o")return b*parseInt(f.slice(2),8)}return b*parseInt(f,10)}t(c,"parseYamlInteger");function h(y){return c(y)}t(h,"constructYamlInteger");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1===0&&!r.isNegativeZero(y))}return t(g,"isInteger"),Lu=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:n,construct:h,predicate:g,represent:{binary:t(function(y){return y>=0?"0b"+y.toString(2):"-0b"+y.toString(2).slice(1)},"binary"),octal:t(function(y){return y>=0?"0o"+y.toString(8):"-0o"+y.toString(8).slice(1)},"octal"),decimal:t(function(y){return y.toString(10)},"decimal"),hexadecimal:t(function(y){return y>=0?"0x"+y.toString(16).toUpperCase():"-0x"+y.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lu}t(Gu,"requireInt");var Fu,Fg;function Xu(){if(Fg)return Fu;Fg=1;let r=ws(),e=mr(),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(y){if(y===null)return!1;if(!i.test(y))return!1;if(isFinite(parseFloat(y,10)))return!0;return s.test(y)}t(o,"resolveYamlFloat");function n(y){let f=y.toLowerCase(),b=f[0]==="-"?-1:1;if("+-".indexOf(f[0])>=0)f=f.slice(1);if(f===".inf")return b===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(f===".nan")return NaN;return b*parseFloat(f,10)}t(n,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function h(y,f){if(isNaN(y))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===y)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===y)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(y))return"-0.0";let b=y.toString(10);return c.test(b)?b.replace("e",".e"):b}t(h,"representYamlFloat");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1!==0||r.isNegativeZero(y))}return t(g,"isFloat"),Fu=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:n,predicate:g,represent:h,defaultStyle:"lowercase"}),Fu}t(Xu,"requireFloat");var Au,Ag;function Vu(){if(Ag)return Au;return Ag=1,Au=Yu().extend({implicit:[Uu(),ju(),Gu(),Xu()]}),Au}t(Vu,"requireJson");var Mu,Mg;function Ku(){if(Mg)return Mu;return Mg=1,Mu=Vu(),Mu}t(Ku,"requireCore");var Eu,Eg;function Zu(){if(Eg)return Eu;Eg=1;let r=mr(),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(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let h=0,g=null,y=e.exec(c);if(y===null)y=i.exec(c);if(y===null)throw Error("Date resolve error");let f=+y[1],b=+y[2]-1,F=+y[3];if(!y[4])return new Date(Date.UTC(f,b,F));let N=+y[4],W=+y[5],H=+y[6];if(y[7]){h=y[7].slice(0,3);while(h.length<3)h+="0";h=+h}if(y[9]){let j=+y[10],K=+(y[11]||0);if(g=(j*60+K)*60000,y[9]==="-")g=-g}let Y=new Date(Date.UTC(f,b,F,N,W,H,h));if(g)Y.setTime(Y.getTime()-g);return Y}t(o,"constructYamlTimestamp");function n(c){return c.toISOString()}return t(n,"representYamlTimestamp"),Eu=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:n}),Eu}t(Zu,"requireTimestamp");var Ou,Og;function Qu(){if(Og)return Ou;Og=1;let r=mr();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),Ou=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Ou}t(Qu,"requireMerge");var Iu,Ig;function Ju(){if(Ig)return Iu;Ig=1;let r=mr(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
136
- \r`;function i(c){if(c===null)return!1;let h=0,g=c.length,y=e;for(let f=0;f<g;f++){let b=y.indexOf(c.charAt(f));if(b>64)continue;if(b<0)return!1;h+=6}return h%8===0}t(i,"resolveYamlBinary");function s(c){let h=c.replace(/[\r\n=]/g,""),g=h.length,y=e,f=0,b=[];for(let N=0;N<g;N++){if(N%4===0&&N)b.push(f>>16&255),b.push(f>>8&255),b.push(f&255);f=f<<6|y.indexOf(h.charAt(N))}let F=g%4*6;if(F===0)b.push(f>>16&255),b.push(f>>8&255),b.push(f&255);else if(F===18)b.push(f>>10&255),b.push(f>>2&255);else if(F===12)b.push(f>>4&255);return new Uint8Array(b)}t(s,"constructYamlBinary");function o(c){let h="",g=0,y=c.length,f=e;for(let F=0;F<y;F++){if(F%3===0&&F)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];g=(g<<8)+c[F]}let b=y%3;if(b===0)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];else if(b===2)h+=f[g>>10&63],h+=f[g>>4&63],h+=f[g<<2&63],h+=f[64];else if(b===1)h+=f[g>>2&63],h+=f[g<<4&63],h+=f[64],h+=f[64];return h}t(o,"representYamlBinary");function n(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(n,"isBinary"),Iu=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:n,represent:o}),Iu}t(Ju,"requireBinary");var $u,$g;function tf(){if($g)return $u;$g=1;let r=mr(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(n){if(n===null)return!0;let c=[],h=n;for(let g=0,y=h.length;g<y;g+=1){let f=h[g],b=!1;if(i.call(f)!=="[object Object]")return!1;let F;for(F in f)if(e.call(f,F))if(!b)b=!0;else return!1;if(!b)return!1;if(c.indexOf(F)===-1)c.push(F);else return!1}return!0}t(s,"resolveYamlOmap");function o(n){return n!==null?n:[]}return t(o,"constructYamlOmap"),$u=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),$u}t(tf,"requireOmap");var Du,Dg;function ef(){if(Dg)return Du;Dg=1;let r=mr(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h];if(e.call(y)!=="[object Object]")return!1;let f=Object.keys(y);if(f.length!==1)return!1;c[h]=[f[0],y[f[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h],f=Object.keys(y);c[h]=[f[0],y[f[0]]]}return c}return t(s,"constructYamlPairs"),Du=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Du}t(ef,"requirePairs");var Pu,Pg;function rf(){if(Pg)return Pu;Pg=1;let r=mr(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let n=o;for(let c in n)if(e.call(n,c)){if(n[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Pu=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Pu}t(rf,"requireSet");var Ru,Rg;function Il(){if(Rg)return Ru;return Rg=1,Ru=Ku().extend({implicit:[Zu(),Qu()],explicit:[Ju(),tf(),ef(),rf()]}),Ru}t(Il,"require_default");var qg;function Yg(){if(qg)return Ol;qg=1;let r=ws(),e=Ss(),i=Hg(),s=Il(),o=Object.prototype.hasOwnProperty,n=1,c=2,h=3,g=4,y=1,f=2,b=3,F=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,N=/[\x85\u2028\u2029]/,W=/[,\[\]{}]/,H=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Y=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function j(q){return Object.prototype.toString.call(q)}t(j,"_class");function K(q){return q===10||q===13}t(K,"isEol");function Q(q){return q===9||q===32}t(Q,"isWhiteSpace");function rt(q){return q===9||q===32||q===10||q===13}t(rt,"isWsOrEol");function it(q){return q===44||q===91||q===93||q===123||q===125}t(it,"isFlowIndicator");function ct(q){if(q>=48&&q<=57)return q-48;let mt=q|32;if(mt>=97&&mt<=102)return mt-97+10;return-1}t(ct,"fromHexCode");function lt(q){if(q===120)return 2;if(q===117)return 4;if(q===85)return 8;return 0}t(lt,"escapedHexLen");function pt(q){if(q>=48&&q<=57)return q-48;return-1}t(pt,"fromDecimalCode");function bt(q){switch(q){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
137
- `;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(bt,"simpleEscapeSequence");function vt(q){if(q<=65535)return String.fromCharCode(q);return String.fromCharCode((q-65536>>10)+55296,(q-65536&1023)+56320)}t(vt,"charFromCodepoint");function wt(q,mt,Bt){if(mt==="__proto__")Object.defineProperty(q,mt,{configurable:!0,enumerable:!0,writable:!0,value:Bt});else q[mt]=Bt}t(wt,"setProperty");let kt=Array(256),st=Array(256);for(let q=0;q<256;q++)kt[q]=bt(q)?1:0,st[q]=bt(q);function at(q,mt){this.input=q,this.filename=mt.filename||null,this.schema=mt.schema||s,this.onWarning=mt.onWarning||null,this.legacy=mt.legacy||!1,this.json=mt.json||!1,this.listener=mt.listener||null,this.maxDepth=typeof mt.maxDepth==="number"?mt.maxDepth:100,this.maxTotalMergeKeys=typeof mt.maxTotalMergeKeys==="number"?mt.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=q.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(at,"State");function xt(q,mt){let Bt={name:q.filename,buffer:q.input.slice(0,-1),position:q.position,line:q.line,column:q.position-q.lineStart};return Bt.snippet=i(Bt),new e(mt,Bt)}t(xt,"generateError");function ot(q,mt){throw xt(q,mt)}t(ot,"throwError");function St(q,mt){if(q.onWarning)q.onWarning.call(null,xt(q,mt))}t(St,"throwWarning");function Lt(q,mt,Bt){let Mt=q.anchorMapTransactions;if(Mt.length!==0){let _t=Mt[Mt.length-1];if(!o.call(_t,mt))_t[mt]={existed:o.call(q.anchorMap,mt),value:q.anchorMap[mt]}}q.anchorMap[mt]=Bt}t(Lt,"storeAnchor");function Yt(q){q.anchorMapTransactions.push(Object.create(null))}t(Yt,"beginAnchorTransaction");function Ht(q){let mt=q.anchorMapTransactions.pop(),Bt=q.anchorMapTransactions;if(Bt.length===0)return;let Mt=Bt[Bt.length-1],_t=Object.keys(mt);for(let Nt=0,Z=_t.length;Nt<Z;Nt+=1){let Ct=_t[Nt];if(!o.call(Mt,Ct))Mt[Ct]=mt[Ct]}}t(Ht,"commitAnchorTransaction");function ne(q){let mt=q.anchorMapTransactions.pop(),Bt=Object.keys(mt);for(let Mt=Bt.length-1;Mt>=0;Mt-=1){let _t=mt[Bt[Mt]];if(_t.existed)q.anchorMap[Bt[Mt]]=_t.value;else delete q.anchorMap[Bt[Mt]]}}t(ne,"rollbackAnchorTransaction");function ie(q){return{position:q.position,line:q.line,lineStart:q.lineStart,lineIndent:q.lineIndent,firstTabInLine:q.firstTabInLine,tag:q.tag,anchor:q.anchor,kind:q.kind,result:q.result}}t(ie,"snapshotState");function be(q,mt){q.position=mt.position,q.line=mt.line,q.lineStart=mt.lineStart,q.lineIndent=mt.lineIndent,q.firstTabInLine=mt.firstTabInLine,q.tag=mt.tag,q.anchor=mt.anchor,q.kind=mt.kind,q.result=mt.result}t(be,"restoreState");let _e={YAML:t(function(mt,Bt,Mt){if(mt.version!==null)ot(mt,"duplication of %YAML directive");if(Mt.length!==1)ot(mt,"YAML directive accepts exactly one argument");let _t=/^([0-9]+)\.([0-9]+)$/.exec(Mt[0]);if(_t===null)ot(mt,"ill-formed argument of the YAML directive");let Nt=parseInt(_t[1],10),Z=parseInt(_t[2],10);if(Nt!==1)ot(mt,"unacceptable YAML version of the document");if(mt.version=Mt[0],mt.checkLineBreaks=Z<2,Z!==1&&Z!==2)St(mt,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(mt,Bt,Mt){let _t;if(Mt.length!==2)ot(mt,"TAG directive accepts exactly two arguments");let Nt=Mt[0];if(_t=Mt[1],!H.test(Nt))ot(mt,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(mt.tagMap,Nt))ot(mt,'there is a previously declared suffix for "'+Nt+'" tag handle');if(!Y.test(_t))ot(mt,"ill-formed tag prefix (second argument) of the TAG directive");try{_t=decodeURIComponent(_t)}catch(Z){ot(mt,"tag prefix is malformed: "+_t)}mt.tagMap[Nt]=_t},"handleTagDirective")};function ge(q,mt,Bt,Mt){if(mt<Bt){let _t=q.input.slice(mt,Bt);if(Mt)for(let Nt=0,Z=_t.length;Nt<Z;Nt+=1){let Ct=_t.charCodeAt(Nt);if(!(Ct===9||Ct>=32&&Ct<=1114111))ot(q,"expected valid JSON character")}else if(F.test(_t))ot(q,"the stream contains non-printable characters");q.result+=_t}}t(ge,"captureSegment");function Wt(q,mt,Bt,Mt){if(!r.isObject(Bt))ot(q,"cannot merge mappings; the provided source object is unacceptable");let _t=Object.keys(Bt);for(let Nt=0,Z=_t.length;Nt<Z;Nt+=1){let Ct=_t[Nt];if(q.maxTotalMergeKeys!==-1&&++q.totalMergeKeys>q.maxTotalMergeKeys)ot(q,"merge keys exceeded maxTotalMergeKeys ("+q.maxTotalMergeKeys+")");if(!o.call(mt,Ct))wt(mt,Ct,Bt[Ct]),Mt[Ct]=!0}}t(Wt,"mergeMappings");function ee(q,mt,Bt,Mt,_t,Nt,Z,Ct,Dt){if(Array.isArray(_t)){_t=Array.prototype.slice.call(_t);for(let Ft=0,Ot=_t.length;Ft<Ot;Ft+=1){if(Array.isArray(_t[Ft]))ot(q,"nested arrays are not supported inside keys");if(typeof _t==="object"&&j(_t[Ft])==="[object Object]")_t[Ft]="[object Object]"}}if(typeof _t==="object"&&j(_t)==="[object Object]")_t="[object Object]";if(_t=String(_t),mt===null)mt={};if(Mt==="tag:yaml.org,2002:merge")if(Array.isArray(Nt))for(let Ft=0,Ot=Nt.length;Ft<Ot;Ft+=1)Wt(q,mt,Nt[Ft],Bt);else Wt(q,mt,Nt,Bt);else{if(!q.json&&!o.call(Bt,_t)&&o.call(mt,_t))q.line=Z||q.line,q.lineStart=Ct||q.lineStart,q.position=Dt||q.position,ot(q,"duplicated mapping key");wt(mt,_t,Nt),delete Bt[_t]}return mt}t(ee,"storeMappingPair");function ce(q){let mt=q.input.charCodeAt(q.position);if(mt===10)q.position++;else if(mt===13){if(q.position++,q.input.charCodeAt(q.position)===10)q.position++}else ot(q,"a line break is expected");q.line+=1,q.lineStart=q.position,q.firstTabInLine=-1}t(ce,"readLineBreak");function ue(q,mt,Bt){let Mt=0,_t=q.input.charCodeAt(q.position);while(_t!==0){while(Q(_t)){if(_t===9&&q.firstTabInLine===-1)q.firstTabInLine=q.position;_t=q.input.charCodeAt(++q.position)}if(mt&&_t===35)do _t=q.input.charCodeAt(++q.position);while(_t!==10&&_t!==13&&_t!==0);if(K(_t)){ce(q),_t=q.input.charCodeAt(q.position),Mt++,q.lineIndent=0;while(_t===32)q.lineIndent++,_t=q.input.charCodeAt(++q.position)}else break}if(Bt!==-1&&Mt!==0&&q.lineIndent<Bt)St(q,"deficient indentation");return Mt}t(ue,"skipSeparationSpace");function Xe(q){let mt=q.position,Bt=q.input.charCodeAt(mt);if((Bt===45||Bt===46)&&Bt===q.input.charCodeAt(mt+1)&&Bt===q.input.charCodeAt(mt+2)){if(mt+=3,Bt=q.input.charCodeAt(mt),Bt===0||rt(Bt))return!0}return!1}t(Xe,"testDocumentSeparator");function Ge(q,mt){if(mt===1)q.result+=" ";else if(mt>1)q.result+=r.repeat(`
138
- `,mt-1)}t(Ge,"writeFoldedLines");function ui(q,mt,Bt){let Mt,_t,Nt,Z,Ct,Dt,{kind:Ft,result:Ot}=q,qt=q.input.charCodeAt(q.position);if(rt(qt)||it(qt)||qt===35||qt===38||qt===42||qt===33||qt===124||qt===62||qt===39||qt===34||qt===37||qt===64||qt===96)return!1;if(qt===63||qt===45){let Pt=q.input.charCodeAt(q.position+1);if(rt(Pt)||Bt&&it(Pt))return!1}q.kind="scalar",q.result="",Mt=_t=q.position,Nt=!1;while(qt!==0){if(qt===58){let Pt=q.input.charCodeAt(q.position+1);if(rt(Pt)||Bt&&it(Pt))break}else if(qt===35){let Pt=q.input.charCodeAt(q.position-1);if(rt(Pt))break}else if(q.position===q.lineStart&&Xe(q)||Bt&&it(qt))break;else if(K(qt))if(Z=q.line,Ct=q.lineStart,Dt=q.lineIndent,ue(q,!1,-1),q.lineIndent>=mt){Nt=!0,qt=q.input.charCodeAt(q.position);continue}else{q.position=_t,q.line=Z,q.lineStart=Ct,q.lineIndent=Dt;break}if(Nt)ge(q,Mt,_t,!1),Ge(q,q.line-Z),Mt=_t=q.position,Nt=!1;if(!Q(qt))_t=q.position+1;qt=q.input.charCodeAt(++q.position)}if(ge(q,Mt,_t,!1),q.result)return!0;return q.kind=Ft,q.result=Ot,!1}t(ui,"readPlainScalar");function Ki(q,mt){let Bt,Mt,_t=q.input.charCodeAt(q.position);if(_t!==39)return!1;q.kind="scalar",q.result="",q.position++,Bt=Mt=q.position;while((_t=q.input.charCodeAt(q.position))!==0)if(_t===39)if(ge(q,Bt,q.position,!0),_t=q.input.charCodeAt(++q.position),_t===39)Bt=q.position,q.position++,Mt=q.position;else return!0;else if(K(_t))ge(q,Bt,Mt,!0),Ge(q,ue(q,!1,mt)),Bt=Mt=q.position;else if(q.position===q.lineStart&&Xe(q))ot(q,"unexpected end of the document within a single quoted scalar");else if(q.position++,!Q(_t))Mt=q.position;ot(q,"unexpected end of the stream within a single quoted scalar")}t(Ki,"readSingleQuotedScalar");function si(q,mt){let Bt,Mt,_t,Nt=q.input.charCodeAt(q.position);if(Nt!==34)return!1;q.kind="scalar",q.result="",q.position++,Bt=Mt=q.position;while((Nt=q.input.charCodeAt(q.position))!==0)if(Nt===34)return ge(q,Bt,q.position,!0),q.position++,!0;else if(Nt===92){if(ge(q,Bt,q.position,!0),Nt=q.input.charCodeAt(++q.position),K(Nt))ue(q,!1,mt);else if(Nt<256&&kt[Nt])q.result+=st[Nt],q.position++;else if((_t=lt(Nt))>0){let Z=_t,Ct=0;for(;Z>0;Z--)if(Nt=q.input.charCodeAt(++q.position),(_t=ct(Nt))>=0)Ct=(Ct<<4)+_t;else ot(q,"expected hexadecimal character");q.result+=vt(Ct),q.position++}else ot(q,"unknown escape sequence");Bt=Mt=q.position}else if(K(Nt))ge(q,Bt,Mt,!0),Ge(q,ue(q,!1,mt)),Bt=Mt=q.position;else if(q.position===q.lineStart&&Xe(q))ot(q,"unexpected end of the document within a double quoted scalar");else if(q.position++,!Q(Nt))Mt=q.position;ot(q,"unexpected end of the stream within a double quoted scalar")}t(si,"readDoubleQuotedScalar");function Fo(q,mt){let Bt=!0,Mt,_t,Nt,Z=q.tag,Ct,Dt=q.anchor,Ft,Ot,qt,Pt,Vt=Object.create(null),Xt,Kt,te,we=q.input.charCodeAt(q.position);if(we===91)Ft=93,Pt=!1,Ct=[];else if(we===123)Ft=125,Pt=!0,Ct={};else return!1;if(q.anchor!==null)Lt(q,q.anchor,Ct);we=q.input.charCodeAt(++q.position);while(we!==0){if(ue(q,!0,mt),we=q.input.charCodeAt(q.position),we===Ft)return q.position++,q.tag=Z,q.anchor=Dt,q.kind=Pt?"mapping":"sequence",q.result=Ct,!0;else if(!Bt)ot(q,"missed comma between flow collection entries");else if(we===44)ot(q,"expected the node content, but found ','");if(Kt=Xt=te=null,Ot=qt=!1,we===63){let je=q.input.charCodeAt(q.position+1);if(rt(je))Ot=qt=!0,q.position++,ue(q,!0,mt)}if(Mt=q.line,_t=q.lineStart,Nt=q.position,or(q,mt,n,!1,!0),Kt=q.tag,Xt=q.result,ue(q,!0,mt),we=q.input.charCodeAt(q.position),(qt||q.line===Mt)&&we===58)Ot=!0,we=q.input.charCodeAt(++q.position),ue(q,!0,mt),or(q,mt,n,!1,!0),te=q.result;if(Pt)ee(q,Ct,Vt,Kt,Xt,te,Mt,_t,Nt);else if(Ot)Ct.push(ee(q,null,Vt,Kt,Xt,te,Mt,_t,Nt));else Ct.push(Xt);if(ue(q,!0,mt),we=q.input.charCodeAt(q.position),we===44)Bt=!0,we=q.input.charCodeAt(++q.position);else Bt=!1}ot(q,"unexpected end of the stream within a flow collection")}t(Fo,"readFlowCollection");function Ue(q,mt){let Bt,Mt=y,_t=!1,Nt=!1,Z=mt,Ct=0,Dt=!1,Ft,Ot=q.input.charCodeAt(q.position);if(Ot===124)Bt=!1;else if(Ot===62)Bt=!0;else return!1;q.kind="scalar",q.result="";while(Ot!==0)if(Ot=q.input.charCodeAt(++q.position),Ot===43||Ot===45)if(y===Mt)Mt=Ot===43?b:f;else ot(q,"repeat of a chomping mode identifier");else if((Ft=pt(Ot))>=0)if(Ft===0)ot(q,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Nt)Z=mt+Ft-1,Nt=!0;else ot(q,"repeat of an indentation width identifier");else break;if(Q(Ot)){do Ot=q.input.charCodeAt(++q.position);while(Q(Ot));if(Ot===35)do Ot=q.input.charCodeAt(++q.position);while(!K(Ot)&&Ot!==0)}while(Ot!==0){ce(q),q.lineIndent=0,Ot=q.input.charCodeAt(q.position);while((!Nt||q.lineIndent<Z)&&Ot===32)q.lineIndent++,Ot=q.input.charCodeAt(++q.position);if(!Nt&&q.lineIndent>Z)Z=q.lineIndent;if(K(Ot)){Ct++;continue}if(!Nt&&Z===0)ot(q,"missing indentation for block scalar");if(q.lineIndent<Z){if(Mt===b)q.result+=r.repeat(`
139
- `,_t?1+Ct:Ct);else if(Mt===y){if(_t)q.result+=`
140
- `}break}if(Bt)if(Q(Ot))Dt=!0,q.result+=r.repeat(`
141
- `,_t?1+Ct:Ct);else if(Dt)Dt=!1,q.result+=r.repeat(`
142
- `,Ct+1);else if(Ct===0){if(_t)q.result+=" "}else q.result+=r.repeat(`
143
- `,Ct);else q.result+=r.repeat(`
144
- `,_t?1+Ct:Ct);_t=!0,Nt=!0,Ct=0;let qt=q.position;while(!K(Ot)&&Ot!==0)Ot=q.input.charCodeAt(++q.position);ge(q,qt,q.position,!1)}return!0}t(Ue,"readBlockScalar");function Or(q,mt){let{tag:Bt,anchor:Mt}=q,_t=[],Nt=!1;if(q.firstTabInLine!==-1)return!1;if(q.anchor!==null)Lt(q,q.anchor,_t);let Z=q.input.charCodeAt(q.position);while(Z!==0){if(q.firstTabInLine!==-1)q.position=q.firstTabInLine,ot(q,"tab characters must not be used in indentation");if(Z!==45)break;let Ct=q.input.charCodeAt(q.position+1);if(!rt(Ct))break;if(Nt=!0,q.position++,ue(q,!0,-1)){if(q.lineIndent<=mt){_t.push(null),Z=q.input.charCodeAt(q.position);continue}}let Dt=q.line;if(or(q,mt,h,!1,!0),_t.push(q.result),ue(q,!0,-1),Z=q.input.charCodeAt(q.position),(q.line===Dt||q.lineIndent>mt)&&Z!==0)ot(q,"bad indentation of a sequence entry");else if(q.lineIndent<mt)break}if(Nt)return q.tag=Bt,q.anchor=Mt,q.kind="sequence",q.result=_t,!0;return!1}t(Or,"readBlockSequence");function $e(q,mt,Bt){let Mt,_t,Nt,Z,{tag:Ct,anchor:Dt}=q,Ft={},Ot=Object.create(null),qt=null,Pt=null,Vt=null,Xt=!1,Kt=!1;if(q.firstTabInLine!==-1)return!1;if(q.anchor!==null)Lt(q,q.anchor,Ft);let te=q.input.charCodeAt(q.position);while(te!==0){if(!Xt&&q.firstTabInLine!==-1)q.position=q.firstTabInLine,ot(q,"tab characters must not be used in indentation");let we=q.input.charCodeAt(q.position+1),je=q.line;if((te===63||te===58)&&rt(we)){if(te===63){if(Xt)ee(q,Ft,Ot,qt,Pt,null,_t,Nt,Z),qt=Pt=Vt=null;Kt=!0,Xt=!0,Mt=!0}else if(Xt)Xt=!1,Mt=!0;else ot(q,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");q.position+=1,te=we}else{if(_t=q.line,Nt=q.lineStart,Z=q.position,!or(q,Bt,c,!1,!0))break;if(q.line===je){te=q.input.charCodeAt(q.position);while(Q(te))te=q.input.charCodeAt(++q.position);if(te===58){if(te=q.input.charCodeAt(++q.position),!rt(te))ot(q,"a whitespace character is expected after the key-value separator within a block mapping");if(Xt)ee(q,Ft,Ot,qt,Pt,null,_t,Nt,Z),qt=Pt=Vt=null;Kt=!0,Xt=!1,Mt=!1,qt=q.tag,Pt=q.result}else if(Kt)ot(q,"can not read an implicit mapping pair; a colon is missed");else return q.tag=Ct,q.anchor=Dt,!0}else if(Kt)ot(q,"can not read a block mapping entry; a multiline key may not be an implicit key");else return q.tag=Ct,q.anchor=Dt,!0}if(q.line===je||q.lineIndent>mt){if(Xt)_t=q.line,Nt=q.lineStart,Z=q.position;if(or(q,mt,g,!0,Mt))if(Xt)Pt=q.result;else Vt=q.result;if(!Xt)ee(q,Ft,Ot,qt,Pt,Vt,_t,Nt,Z),qt=Pt=Vt=null;ue(q,!0,-1),te=q.input.charCodeAt(q.position)}if((q.line===je||q.lineIndent>mt)&&te!==0)ot(q,"bad indentation of a mapping entry");else if(q.lineIndent<mt)break}if(Xt)ee(q,Ft,Ot,qt,Pt,null,_t,Nt,Z);if(Kt)q.tag=Ct,q.anchor=Dt,q.kind="mapping",q.result=Ft;return Kt}t($e,"readBlockMapping");function Zi(q){let mt=!1,Bt=!1,Mt,_t,Nt=q.input.charCodeAt(q.position);if(Nt!==33)return!1;if(q.tag!==null)ot(q,"duplication of a tag property");if(Nt=q.input.charCodeAt(++q.position),Nt===60)mt=!0,Nt=q.input.charCodeAt(++q.position);else if(Nt===33)Bt=!0,Mt="!!",Nt=q.input.charCodeAt(++q.position);else Mt="!";let Z=q.position;if(mt){do Nt=q.input.charCodeAt(++q.position);while(Nt!==0&&Nt!==62);if(q.position<q.length)_t=q.input.slice(Z,q.position),Nt=q.input.charCodeAt(++q.position);else ot(q,"unexpected end of the stream within a verbatim tag")}else{while(Nt!==0&&!rt(Nt)){if(Nt===33)if(!Bt){if(Mt=q.input.slice(Z-1,q.position+1),!H.test(Mt))ot(q,"named tag handle cannot contain such characters");Bt=!0,Z=q.position+1}else ot(q,"tag suffix cannot contain exclamation marks");Nt=q.input.charCodeAt(++q.position)}if(_t=q.input.slice(Z,q.position),W.test(_t))ot(q,"tag suffix cannot contain flow indicator characters")}if(_t&&!Y.test(_t))ot(q,"tag name cannot contain such characters: "+_t);try{_t=decodeURIComponent(_t)}catch(Ct){ot(q,"tag name is malformed: "+_t)}if(mt)q.tag=_t;else if(o.call(q.tagMap,Mt))q.tag=q.tagMap[Mt]+_t;else if(Mt==="!")q.tag="!"+_t;else if(Mt==="!!")q.tag="tag:yaml.org,2002:"+_t;else ot(q,'undeclared tag handle "'+Mt+'"');return!0}t(Zi,"readTagProperty");function cr(q){let mt=q.input.charCodeAt(q.position);if(mt!==38)return!1;if(q.anchor!==null)ot(q,"duplication of an anchor property");mt=q.input.charCodeAt(++q.position);let Bt=q.position;while(mt!==0&&!rt(mt)&&!it(mt))mt=q.input.charCodeAt(++q.position);if(q.position===Bt)ot(q,"name of an anchor node must contain at least one character");return q.anchor=q.input.slice(Bt,q.position),!0}t(cr,"readAnchorProperty");function ai(q){let mt=q.input.charCodeAt(q.position);if(mt!==42)return!1;mt=q.input.charCodeAt(++q.position);let Bt=q.position;while(mt!==0&&!rt(mt)&&!it(mt))mt=q.input.charCodeAt(++q.position);if(q.position===Bt)ot(q,"name of an alias node must contain at least one character");let Mt=q.input.slice(Bt,q.position);if(!o.call(q.anchorMap,Mt))ot(q,'unidentified alias "'+Mt+'"');return q.result=q.anchorMap[Mt],ue(q,!0,-1),!0}t(ai,"readAlias");function Ao(q,mt,Bt,Mt){let _t=ie(q);if(Yt(q),be(q,mt),q.tag=null,q.anchor=null,q.kind=null,q.result=null,$e(q,Bt,Mt)&&q.kind==="mapping")return Ht(q),!0;return ne(q),be(q,_t),!1}t(Ao,"tryReadBlockMappingFromProperty");function or(q,mt,Bt,Mt,_t){let Nt,Z,Ct=1,Dt=!1,Ft=!1,Ot=null,qt,Pt,Vt;if(q.depth>=q.maxDepth)ot(q,"nesting exceeded maxDepth ("+q.maxDepth+")");if(q.depth+=1,q.listener!==null)q.listener("open",q);q.tag=null,q.anchor=null,q.kind=null,q.result=null;let Xt=Nt=Z=g===Bt||h===Bt;if(Mt){if(ue(q,!0,-1)){if(Dt=!0,q.lineIndent>mt)Ct=1;else if(q.lineIndent===mt)Ct=0;else if(q.lineIndent<mt)Ct=-1}}if(Ct===1)while(!0){let Kt=q.input.charCodeAt(q.position),te=ie(q);if(Dt&&(Kt===33&&q.tag!==null||Kt===38&&q.anchor!==null))break;if(!Zi(q)&&!cr(q))break;if(Ot===null)Ot=te;if(ue(q,!0,-1)){if(Dt=!0,Z=Xt,q.lineIndent>mt)Ct=1;else if(q.lineIndent===mt)Ct=0;else if(q.lineIndent<mt)Ct=-1}else Z=!1}if(Z)Z=Dt||_t;if(Ct===1||g===Bt){if(n===Bt||c===Bt)Pt=mt;else Pt=mt+1;if(Vt=q.position-q.lineStart,Ct===1)if(Z&&(Or(q,Vt)||$e(q,Vt,Pt))||Fo(q,Pt))Ft=!0;else{let Kt=q.input.charCodeAt(q.position);if(Ot!==null&&Xt&&!Z&&Kt!==124&&Kt!==62&&Ao(q,Ot,Ot.position-Ot.lineStart,Pt))Ft=!0;else if(Nt&&Ue(q,Pt)||Ki(q,Pt)||si(q,Pt))Ft=!0;else if(ai(q)){if(Ft=!0,q.tag!==null||q.anchor!==null)ot(q,"alias node should not have any properties")}else if(ui(q,Pt,n===Bt)){if(Ft=!0,q.tag===null)q.tag="?"}if(q.anchor!==null)Lt(q,q.anchor,q.result)}else if(Ct===0)Ft=Z&&Or(q,Vt)}if(q.tag===null){if(q.anchor!==null)Lt(q,q.anchor,q.result)}else if(q.tag==="?"){if(q.result!==null&&q.kind!=="scalar")ot(q,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+q.kind+'"');for(let Kt=0,te=q.implicitTypes.length;Kt<te;Kt+=1)if(qt=q.implicitTypes[Kt],qt.resolve(q.result)){if(q.result=qt.construct(q.result),q.tag=qt.tag,q.anchor!==null)Lt(q,q.anchor,q.result);break}}else if(q.tag!=="!"){if(o.call(q.typeMap[q.kind||"fallback"],q.tag))qt=q.typeMap[q.kind||"fallback"][q.tag];else{qt=null;let Kt=q.typeMap.multi[q.kind||"fallback"];for(let te=0,we=Kt.length;te<we;te+=1)if(q.tag.slice(0,Kt[te].tag.length)===Kt[te].tag){qt=Kt[te];break}}if(!qt)ot(q,"unknown tag !<"+q.tag+">");if(q.result!==null&&qt.kind!==q.kind)ot(q,"unacceptable node kind for !<"+q.tag+'> tag; it should be "'+qt.kind+'", not "'+q.kind+'"');if(!qt.resolve(q.result,q.tag))ot(q,"cannot resolve a node with !<"+q.tag+"> explicit tag");else if(q.result=qt.construct(q.result,q.tag),q.anchor!==null)Lt(q,q.anchor,q.result)}if(q.listener!==null)q.listener("close",q);return q.depth-=1,q.tag!==null||q.anchor!==null||Ft}t(or,"composeNode");function Mo(q){let mt=q.position,Bt=!1,Mt;q.version=null,q.checkLineBreaks=q.legacy,q.tagMap=Object.create(null),q.anchorMap=Object.create(null);while((Mt=q.input.charCodeAt(q.position))!==0){if(ue(q,!0,-1),Mt=q.input.charCodeAt(q.position),q.lineIndent>0||Mt!==37)break;Bt=!0,Mt=q.input.charCodeAt(++q.position);let _t=q.position;while(Mt!==0&&!rt(Mt))Mt=q.input.charCodeAt(++q.position);let Nt=q.input.slice(_t,q.position),Z=[];if(Nt.length<1)ot(q,"directive name must not be less than one character in length");while(Mt!==0){while(Q(Mt))Mt=q.input.charCodeAt(++q.position);if(Mt===35){do Mt=q.input.charCodeAt(++q.position);while(Mt!==0&&!K(Mt));break}if(K(Mt))break;_t=q.position;while(Mt!==0&&!rt(Mt))Mt=q.input.charCodeAt(++q.position);Z.push(q.input.slice(_t,q.position))}if(Mt!==0)ce(q);if(o.call(_e,Nt))_e[Nt](q,Nt,Z);else St(q,'unknown document directive "'+Nt+'"')}if(ue(q,!0,-1),q.lineIndent===0&&q.input.charCodeAt(q.position)===45&&q.input.charCodeAt(q.position+1)===45&&q.input.charCodeAt(q.position+2)===45)q.position+=3,ue(q,!0,-1);else if(Bt)ot(q,"directives end mark is expected");if(or(q,q.lineIndent-1,g,!1,!0),ue(q,!0,-1),q.checkLineBreaks&&N.test(q.input.slice(mt,q.position)))St(q,"non-ASCII line breaks are interpreted as content");if(q.documents.push(q.result),q.position===q.lineStart&&Xe(q)){if(q.input.charCodeAt(q.position)===46)q.position+=3,ue(q,!0,-1);return}if(q.position<q.length-1)ot(q,"end of the stream or a document separator is expected")}t(Mo,"readDocument");function xi(q,mt){if(q=String(q),mt=mt||{},q.length!==0){if(q.charCodeAt(q.length-1)!==10&&q.charCodeAt(q.length-1)!==13)q+=`
145
- `;if(q.charCodeAt(0)===65279)q=q.slice(1)}let Bt=new at(q,mt),Mt=q.indexOf("\x00");if(Mt!==-1)Bt.position=Mt,ot(Bt,"null byte is not allowed in input");Bt.input+="\x00";while(Bt.input.charCodeAt(Bt.position)===32)Bt.lineIndent+=1,Bt.position+=1;while(Bt.position<Bt.length-1)Mo(Bt);return Bt.documents}t(xi,"loadDocuments");function Qi(q,mt,Bt){if(mt!==null&&typeof mt==="object"&&typeof Bt>"u")Bt=mt,mt=null;let Mt=xi(q,Bt);if(typeof mt!=="function")return Mt;for(let _t=0,Nt=Mt.length;_t<Nt;_t+=1)mt(Mt[_t])}t(Qi,"loadAll2");function Ji(q,mt){let Bt=xi(q,mt);if(Bt.length===0)return;else if(Bt.length===1)return Bt[0];throw new e("expected a single document in the stream, but found more")}return t(Ji,"load2"),Ol.loadAll=Qi,Ol.load=Ji,Ol}t(Yg,"requireLoader");var qu={},Ng;function Ug(){if(Ng)return qu;Ng=1;let r=ws(),e=Ss(),i=Il(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,n=65279,c=9,h=10,g=13,y=32,f=33,b=34,F=35,N=37,W=38,H=39,Y=42,j=44,K=45,Q=58,rt=61,it=62,ct=63,lt=64,pt=91,bt=93,vt=96,wt=123,kt=124,st=125,at={};at[0]="\\0",at[7]="\\a",at[8]="\\b",at[9]="\\t",at[10]="\\n",at[11]="\\v",at[12]="\\f",at[13]="\\r",at[27]="\\e",at[34]="\\\"",at[92]="\\\\",at[133]="\\N",at[160]="\\_",at[8232]="\\L",at[8233]="\\P";let xt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ot=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function St(Z,Ct){if(Ct===null)return{};let Dt={},Ft=Object.keys(Ct);for(let Ot=0,qt=Ft.length;Ot<qt;Ot+=1){let Pt=Ft[Ot],Vt=String(Ct[Pt]);if(Pt.slice(0,2)==="!!")Pt="tag:yaml.org,2002:"+Pt.slice(2);let Xt=Z.compiledTypeMap.fallback[Pt];if(Xt&&o.call(Xt.styleAliases,Vt))Vt=Xt.styleAliases[Vt];Dt[Pt]=Vt}return Dt}t(St,"compileStyleMap");function Lt(Z){let Ct,Dt,Ft=Z.toString(16).toUpperCase();if(Z<=255)Ct="x",Dt=2;else if(Z<=65535)Ct="u",Dt=4;else if(Z<=4294967295)Ct="U",Dt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+Ct+r.repeat("0",Dt-Ft.length)+Ft}t(Lt,"encodeHex");let Yt=1,Ht=2;function ne(Z){this.schema=Z.schema||i,this.indent=Math.max(1,Z.indent||2),this.noArrayIndent=Z.noArrayIndent||!1,this.skipInvalid=Z.skipInvalid||!1,this.flowLevel=r.isNothing(Z.flowLevel)?-1:Z.flowLevel,this.styleMap=St(this.schema,Z.styles||null),this.sortKeys=Z.sortKeys||!1,this.lineWidth=Z.lineWidth||80,this.noRefs=Z.noRefs||!1,this.noCompatMode=Z.noCompatMode||!1,this.condenseFlow=Z.condenseFlow||!1,this.quotingType=Z.quotingType==='"'?Ht:Yt,this.forceQuotes=Z.forceQuotes||!1,this.replacer=typeof Z.replacer==="function"?Z.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(ne,"State");function ie(Z,Ct){let Dt=r.repeat(" ",Ct),Ft=0,Ot="",qt=Z.length;while(Ft<qt){let Pt,Vt=Z.indexOf(`
131
+ `+i.mark.snippet;return n+" "+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"),xu=e,xu}t(As,"requireException");var Cu,Cg;function Hg(){if(Cg)return Cu;Cg=1;let r=Fs();function e(o,n,c,h,g){let y="",f="",B=Math.floor(g/2)-1;if(h-n>B)y=" ... ",n=h-B+y.length;if(c-h>B)f=" ...",c=h+B-f.length;return{str:y+o.slice(n,c).replace(/\t/g,"→")+f,pos:h-n+y.length}}t(e,"getLine");function i(o,n){return r.repeat(" ",n-o.length)+o}t(i,"padStart");function s(o,n){if(n=Object.create(n||null),!o.buffer)return null;if(!n.maxLength)n.maxLength=79;if(typeof n.indent!=="number")n.indent=1;if(typeof n.linesBefore!=="number")n.linesBefore=3;if(typeof n.linesAfter!=="number")n.linesAfter=2;let c=/\r?\n|\r|\0/g,h=[0],g=[],y,f=-1;while(y=c.exec(o.buffer))if(g.push(y.index),h.push(y.index+y[0].length),o.position<=y.index&&f<0)f=h.length-2;if(f<0)f=h.length-1;let B="",v=Math.min(o.line+n.linesAfter,g.length).toString().length,q=n.maxLength-(n.indent+v+3);for(let H=1;H<=n.linesBefore;H++){if(f-H<0)break;let Y=e(o.buffer,h[f-H],g[f-H],o.position-(h[f]-h[f-H]),q);B=r.repeat(" ",n.indent)+i((o.line-H+1).toString(),v)+" | "+Y.str+`
132
+ `+B}let W=e(o.buffer,h[f],g[f],o.position,q);B+=r.repeat(" ",n.indent)+i((o.line+1).toString(),v)+" | "+W.str+`
133
+ `,B+=r.repeat("-",n.indent+v+3+W.pos)+`^
134
+ `;for(let H=1;H<=n.linesAfter;H++){if(f+H>=g.length)break;let Y=e(o.buffer,h[f+H],g[f+H],o.position-(h[f]-h[f+H]),q);B+=r.repeat(" ",n.indent)+i((o.line+H+1).toString(),v)+" | "+Y.str+`
135
+ `}return B.replace(/\n$/,"")}return t(s,"makeSnippet"),Cu=s,Cu}t(Hg,"requireSnippet");var bu,bg;function yr(){if(bg)return bu;bg=1;let r=As(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(n){let c={};if(n!==null)Object.keys(n).forEach(function(h){n[h].forEach(function(g){c[String(g)]=h})});return c}t(s,"compileStyleAliases");function o(n,c){if(c=c||{},Object.keys(c).forEach(function(h){if(e.indexOf(h)===-1)throw new r('Unknown option "'+h+'" is met in definition of "'+n+'" YAML type.')}),this.options=c,this.tag=n,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(h){return h},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}return t(o,"Type2"),bu=o,bu}t(yr,"requireType");var ku,kg;function Nu(){if(kg)return ku;kg=1;let r=As(),e=yr();function i(n,c){let h=[];return n[c].forEach(function(g){let y=h.length;h.forEach(function(f,B){if(f.tag===g.tag&&f.kind===g.kind&&f.multi===g.multi)y=B}),h[y]=g}),h}t(i,"compileList");function s(){let n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(h){if(h.multi)n.multi[h.kind].push(h),n.multi.fallback.push(h);else n[h.kind][h.tag]=n.fallback[h.tag]=h}t(c,"collectType");for(let h=0,g=arguments.length;h<g;h+=1)arguments[h].forEach(c);return n}t(s,"compileMap");function o(n){return this.extend(n)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let h=[],g=[];if(c instanceof e)g.push(c);else if(Array.isArray(c))g=g.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)h=h.concat(c.implicit);if(c.explicit)g=g.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");h.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.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(f.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),g.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let y=Object.create(o.prototype);return y.implicit=(this.implicit||[]).concat(h),y.explicit=(this.explicit||[]).concat(g),y.compiledImplicit=i(y,"implicit"),y.compiledExplicit=i(y,"explicit"),y.compiledTypeMap=s(y.compiledImplicit,y.compiledExplicit),y},"extend"),ku=o,ku}t(Nu,"requireSchema");var wu,wg;function Wu(){if(wg)return wu;return wg=1,wu=new(yr())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),wu}t(Wu,"requireStr");var Su,Sg;function zu(){if(Sg)return Su;return Sg=1,Su=new(yr())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),Su}t(zu,"requireSeq");var Tu,Tg;function Hu(){if(Tg)return Tu;return Tg=1,Tu=new(yr())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Tu}t(Hu,"requireMap");var _u,_g;function Yu(){if(_g)return _u;return _g=1,_u=new(Nu())({explicit:[Wu(),zu(),Hu()]}),_u}t(Yu,"requireFailsafe");var Bu,Bg;function Uu(){if(Bg)return Bu;Bg=1;let r=yr();function e(o){if(o===null)return!0;let n=o.length;return n===1&&o==="~"||n===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"),Bu=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"}),Bu}t(Uu,"require_null");var vu,vg;function ju(){if(vg)return vu;vg=1;let r=yr();function e(o){if(o===null)return!1;let n=o.length;return n===4&&(o==="true"||o==="True"||o==="TRUE")||n===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"),vu=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"}),vu}t(ju,"requireBool");var Lu,Lg;function Gu(){if(Lg)return Lu;Lg=1;let r=Fs(),e=yr();function i(y){return y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102}t(i,"isHexCode");function s(y){return y>=48&&y<=55}t(s,"isOctCode");function o(y){return y>=48&&y<=57}t(o,"isDecCode");function n(y){if(y===null)return!1;let f=y.length,B=0,v=!1;if(!f)return!1;let q=y[B];if(q==="-"||q==="+")q=y[++B];if(q==="0"){if(B+1===f)return!0;if(q=y[++B],q==="b"){B++;for(;B<f;B++){if(q=y[B],q!=="0"&&q!=="1")return!1;v=!0}return v&&isFinite(c(y))}if(q==="x"){B++;for(;B<f;B++){if(!i(y.charCodeAt(B)))return!1;v=!0}return v&&isFinite(c(y))}if(q==="o"){B++;for(;B<f;B++){if(!s(y.charCodeAt(B)))return!1;v=!0}return v&&isFinite(c(y))}}for(;B<f;B++){if(!o(y.charCodeAt(B)))return!1;v=!0}if(!v)return!1;return isFinite(c(y))}t(n,"resolveYamlInteger");function c(y){let f=y,B=1,v=f[0];if(v==="-"||v==="+"){if(v==="-")B=-1;f=f.slice(1),v=f[0]}if(f==="0")return 0;if(v==="0"){if(f[1]==="b")return B*parseInt(f.slice(2),2);if(f[1]==="x")return B*parseInt(f.slice(2),16);if(f[1]==="o")return B*parseInt(f.slice(2),8)}return B*parseInt(f,10)}t(c,"parseYamlInteger");function h(y){return c(y)}t(h,"constructYamlInteger");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1===0&&!r.isNegativeZero(y))}return t(g,"isInteger"),Lu=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:n,construct:h,predicate:g,represent:{binary:t(function(y){return y>=0?"0b"+y.toString(2):"-0b"+y.toString(2).slice(1)},"binary"),octal:t(function(y){return y>=0?"0o"+y.toString(8):"-0o"+y.toString(8).slice(1)},"octal"),decimal:t(function(y){return y.toString(10)},"decimal"),hexadecimal:t(function(y){return y>=0?"0x"+y.toString(16).toUpperCase():"-0x"+y.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lu}t(Gu,"requireInt");var Fu,Fg;function Xu(){if(Fg)return Fu;Fg=1;let r=Fs(),e=yr(),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(y){if(y===null)return!1;if(!i.test(y))return!1;if(isFinite(parseFloat(y,10)))return!0;return s.test(y)}t(o,"resolveYamlFloat");function n(y){let f=y.toLowerCase(),B=f[0]==="-"?-1:1;if("+-".indexOf(f[0])>=0)f=f.slice(1);if(f===".inf")return B===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(f===".nan")return NaN;return B*parseFloat(f,10)}t(n,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function h(y,f){if(isNaN(y))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===y)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===y)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(y))return"-0.0";let B=y.toString(10);return c.test(B)?B.replace("e",".e"):B}t(h,"representYamlFloat");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1!==0||r.isNegativeZero(y))}return t(g,"isFloat"),Fu=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:n,predicate:g,represent:h,defaultStyle:"lowercase"}),Fu}t(Xu,"requireFloat");var Au,Ag;function Vu(){if(Ag)return Au;return Ag=1,Au=Yu().extend({implicit:[Uu(),ju(),Gu(),Xu()]}),Au}t(Vu,"requireJson");var Mu,Mg;function Ku(){if(Mg)return Mu;return Mg=1,Mu=Vu(),Mu}t(Ku,"requireCore");var Eu,Eg;function Zu(){if(Eg)return Eu;Eg=1;let r=yr(),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(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let h=0,g=null,y=e.exec(c);if(y===null)y=i.exec(c);if(y===null)throw Error("Date resolve error");let f=+y[1],B=+y[2]-1,v=+y[3];if(!y[4])return new Date(Date.UTC(f,B,v));let q=+y[4],W=+y[5],H=+y[6];if(y[7]){h=y[7].slice(0,3);while(h.length<3)h+="0";h=+h}if(y[9]){let j=+y[10],X=+(y[11]||0);if(g=(j*60+X)*60000,y[9]==="-")g=-g}let Y=new Date(Date.UTC(f,B,v,q,W,H,h));if(g)Y.setTime(Y.getTime()-g);return Y}t(o,"constructYamlTimestamp");function n(c){return c.toISOString()}return t(n,"representYamlTimestamp"),Eu=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:n}),Eu}t(Zu,"requireTimestamp");var Ou,Og;function Qu(){if(Og)return Ou;Og=1;let r=yr();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),Ou=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Ou}t(Qu,"requireMerge");var Iu,Ig;function Ju(){if(Ig)return Iu;Ig=1;let r=yr(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
136
+ \r`;function i(c){if(c===null)return!1;let h=0,g=c.length,y=e;for(let f=0;f<g;f++){let B=y.indexOf(c.charAt(f));if(B>64)continue;if(B<0)return!1;h+=6}return h%8===0}t(i,"resolveYamlBinary");function s(c){let h=c.replace(/[\r\n=]/g,""),g=h.length,y=e,f=0,B=[];for(let q=0;q<g;q++){if(q%4===0&&q)B.push(f>>16&255),B.push(f>>8&255),B.push(f&255);f=f<<6|y.indexOf(h.charAt(q))}let v=g%4*6;if(v===0)B.push(f>>16&255),B.push(f>>8&255),B.push(f&255);else if(v===18)B.push(f>>10&255),B.push(f>>2&255);else if(v===12)B.push(f>>4&255);return new Uint8Array(B)}t(s,"constructYamlBinary");function o(c){let h="",g=0,y=c.length,f=e;for(let v=0;v<y;v++){if(v%3===0&&v)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];g=(g<<8)+c[v]}let B=y%3;if(B===0)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];else if(B===2)h+=f[g>>10&63],h+=f[g>>4&63],h+=f[g<<2&63],h+=f[64];else if(B===1)h+=f[g>>2&63],h+=f[g<<4&63],h+=f[64],h+=f[64];return h}t(o,"representYamlBinary");function n(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(n,"isBinary"),Iu=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:n,represent:o}),Iu}t(Ju,"requireBinary");var $u,$g;function tf(){if($g)return $u;$g=1;let r=yr(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(n){if(n===null)return!0;let c=[],h=n;for(let g=0,y=h.length;g<y;g+=1){let f=h[g],B=!1;if(i.call(f)!=="[object Object]")return!1;let v;for(v in f)if(e.call(f,v))if(!B)B=!0;else return!1;if(!B)return!1;if(c.indexOf(v)===-1)c.push(v);else return!1}return!0}t(s,"resolveYamlOmap");function o(n){return n!==null?n:[]}return t(o,"constructYamlOmap"),$u=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),$u}t(tf,"requireOmap");var Du,Dg;function ef(){if(Dg)return Du;Dg=1;let r=yr(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h];if(e.call(y)!=="[object Object]")return!1;let f=Object.keys(y);if(f.length!==1)return!1;c[h]=[f[0],y[f[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h],f=Object.keys(y);c[h]=[f[0],y[f[0]]]}return c}return t(s,"constructYamlPairs"),Du=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Du}t(ef,"requirePairs");var Pu,Pg;function rf(){if(Pg)return Pu;Pg=1;let r=yr(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let n=o;for(let c in n)if(e.call(n,c)){if(n[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Pu=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Pu}t(rf,"requireSet");var Ru,Rg;function Il(){if(Rg)return Ru;return Rg=1,Ru=Ku().extend({implicit:[Zu(),Qu()],explicit:[Ju(),tf(),ef(),rf()]}),Ru}t(Il,"require_default");var qg;function Yg(){if(qg)return Ol;qg=1;let r=Fs(),e=As(),i=Hg(),s=Il(),o=Object.prototype.hasOwnProperty,n=1,c=2,h=3,g=4,y=1,f=2,B=3,v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,q=/[\x85\u2028\u2029]/,W=/[,\[\]{}]/,H=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Y=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function j(D){return Object.prototype.toString.call(D)}t(j,"_class");function X(D){return D===10||D===13}t(X,"isEol");function Q(D){return D===9||D===32}t(Q,"isWhiteSpace");function rt(D){return D===9||D===32||D===10||D===13}t(rt,"isWsOrEol");function it(D){return D===44||D===91||D===93||D===123||D===125}t(it,"isFlowIndicator");function ct(D){if(D>=48&&D<=57)return D-48;let mt=D|32;if(mt>=97&&mt<=102)return mt-97+10;return-1}t(ct,"fromHexCode");function lt(D){if(D===120)return 2;if(D===117)return 4;if(D===85)return 8;return 0}t(lt,"escapedHexLen");function pt(D){if(D>=48&&D<=57)return D-48;return-1}t(pt,"fromDecimalCode");function bt(D){switch(D){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
137
+ `;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(bt,"simpleEscapeSequence");function vt(D){if(D<=65535)return String.fromCharCode(D);return String.fromCharCode((D-65536>>10)+55296,(D-65536&1023)+56320)}t(vt,"charFromCodepoint");function wt(D,mt,Bt){if(mt==="__proto__")Object.defineProperty(D,mt,{configurable:!0,enumerable:!0,writable:!0,value:Bt});else D[mt]=Bt}t(wt,"setProperty");let kt=Array(256),st=Array(256);for(let D=0;D<256;D++)kt[D]=bt(D)?1:0,st[D]=bt(D);function at(D,mt){this.input=D,this.filename=mt.filename||null,this.schema=mt.schema||s,this.onWarning=mt.onWarning||null,this.legacy=mt.legacy||!1,this.json=mt.json||!1,this.listener=mt.listener||null,this.maxDepth=typeof mt.maxDepth==="number"?mt.maxDepth:100,this.maxTotalMergeKeys=typeof mt.maxTotalMergeKeys==="number"?mt.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=D.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(at,"State");function xt(D,mt){let Bt={name:D.filename,buffer:D.input.slice(0,-1),position:D.position,line:D.line,column:D.position-D.lineStart};return Bt.snippet=i(Bt),new e(mt,Bt)}t(xt,"generateError");function ot(D,mt){throw xt(D,mt)}t(ot,"throwError");function St(D,mt){if(D.onWarning)D.onWarning.call(null,xt(D,mt))}t(St,"throwWarning");function Lt(D,mt,Bt){let Mt=D.anchorMapTransactions;if(Mt.length!==0){let _t=Mt[Mt.length-1];if(!o.call(_t,mt))_t[mt]={existed:o.call(D.anchorMap,mt),value:D.anchorMap[mt]}}D.anchorMap[mt]=Bt}t(Lt,"storeAnchor");function Yt(D){D.anchorMapTransactions.push(Object.create(null))}t(Yt,"beginAnchorTransaction");function Ht(D){let mt=D.anchorMapTransactions.pop(),Bt=D.anchorMapTransactions;if(Bt.length===0)return;let Mt=Bt[Bt.length-1],_t=Object.keys(mt);for(let Nt=0,Z=_t.length;Nt<Z;Nt+=1){let Ct=_t[Nt];if(!o.call(Mt,Ct))Mt[Ct]=mt[Ct]}}t(Ht,"commitAnchorTransaction");function he(D){let mt=D.anchorMapTransactions.pop(),Bt=Object.keys(mt);for(let Mt=Bt.length-1;Mt>=0;Mt-=1){let _t=mt[Bt[Mt]];if(_t.existed)D.anchorMap[Bt[Mt]]=_t.value;else delete D.anchorMap[Bt[Mt]]}}t(he,"rollbackAnchorTransaction");function ne(D){return{position:D.position,line:D.line,lineStart:D.lineStart,lineIndent:D.lineIndent,firstTabInLine:D.firstTabInLine,tag:D.tag,anchor:D.anchor,kind:D.kind,result:D.result}}t(ne,"snapshotState");function _e(D,mt){D.position=mt.position,D.line=mt.line,D.lineStart=mt.lineStart,D.lineIndent=mt.lineIndent,D.firstTabInLine=mt.firstTabInLine,D.tag=mt.tag,D.anchor=mt.anchor,D.kind=mt.kind,D.result=mt.result}t(_e,"restoreState");let Ae={YAML:t(function(mt,Bt,Mt){if(mt.version!==null)ot(mt,"duplication of %YAML directive");if(Mt.length!==1)ot(mt,"YAML directive accepts exactly one argument");let _t=/^([0-9]+)\.([0-9]+)$/.exec(Mt[0]);if(_t===null)ot(mt,"ill-formed argument of the YAML directive");let Nt=parseInt(_t[1],10),Z=parseInt(_t[2],10);if(Nt!==1)ot(mt,"unacceptable YAML version of the document");if(mt.version=Mt[0],mt.checkLineBreaks=Z<2,Z!==1&&Z!==2)St(mt,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(mt,Bt,Mt){let _t;if(Mt.length!==2)ot(mt,"TAG directive accepts exactly two arguments");let Nt=Mt[0];if(_t=Mt[1],!H.test(Nt))ot(mt,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(mt.tagMap,Nt))ot(mt,'there is a previously declared suffix for "'+Nt+'" tag handle');if(!Y.test(_t))ot(mt,"ill-formed tag prefix (second argument) of the TAG directive");try{_t=decodeURIComponent(_t)}catch(Z){ot(mt,"tag prefix is malformed: "+_t)}mt.tagMap[Nt]=_t},"handleTagDirective")};function xe(D,mt,Bt,Mt){if(mt<Bt){let _t=D.input.slice(mt,Bt);if(Mt)for(let Nt=0,Z=_t.length;Nt<Z;Nt+=1){let Ct=_t.charCodeAt(Nt);if(!(Ct===9||Ct>=32&&Ct<=1114111))ot(D,"expected valid JSON character")}else if(v.test(_t))ot(D,"the stream contains non-printable characters");D.result+=_t}}t(xe,"captureSegment");function Wt(D,mt,Bt,Mt){if(!r.isObject(Bt))ot(D,"cannot merge mappings; the provided source object is unacceptable");let _t=Object.keys(Bt);for(let Nt=0,Z=_t.length;Nt<Z;Nt+=1){let Ct=_t[Nt];if(D.maxTotalMergeKeys!==-1&&++D.totalMergeKeys>D.maxTotalMergeKeys)ot(D,"merge keys exceeded maxTotalMergeKeys ("+D.maxTotalMergeKeys+")");if(!o.call(mt,Ct))wt(mt,Ct,Bt[Ct]),Mt[Ct]=!0}}t(Wt,"mergeMappings");function re(D,mt,Bt,Mt,_t,Nt,Z,Ct,Dt){if(Array.isArray(_t)){_t=Array.prototype.slice.call(_t);for(let Ft=0,Ot=_t.length;Ft<Ot;Ft+=1){if(Array.isArray(_t[Ft]))ot(D,"nested arrays are not supported inside keys");if(typeof _t==="object"&&j(_t[Ft])==="[object Object]")_t[Ft]="[object Object]"}}if(typeof _t==="object"&&j(_t)==="[object Object]")_t="[object Object]";if(_t=String(_t),mt===null)mt={};if(Mt==="tag:yaml.org,2002:merge")if(Array.isArray(Nt))for(let Ft=0,Ot=Nt.length;Ft<Ot;Ft+=1)Wt(D,mt,Nt[Ft],Bt);else Wt(D,mt,Nt,Bt);else{if(!D.json&&!o.call(Bt,_t)&&o.call(mt,_t))D.line=Z||D.line,D.lineStart=Ct||D.lineStart,D.position=Dt||D.position,ot(D,"duplicated mapping key");wt(mt,_t,Nt),delete Bt[_t]}return mt}t(re,"storeMappingPair");function ce(D){let mt=D.input.charCodeAt(D.position);if(mt===10)D.position++;else if(mt===13){if(D.position++,D.input.charCodeAt(D.position)===10)D.position++}else ot(D,"a line break is expected");D.line+=1,D.lineStart=D.position,D.firstTabInLine=-1}t(ce,"readLineBreak");function ue(D,mt,Bt){let Mt=0,_t=D.input.charCodeAt(D.position);while(_t!==0){while(Q(_t)){if(_t===9&&D.firstTabInLine===-1)D.firstTabInLine=D.position;_t=D.input.charCodeAt(++D.position)}if(mt&&_t===35)do _t=D.input.charCodeAt(++D.position);while(_t!==10&&_t!==13&&_t!==0);if(X(_t)){ce(D),_t=D.input.charCodeAt(D.position),Mt++,D.lineIndent=0;while(_t===32)D.lineIndent++,_t=D.input.charCodeAt(++D.position)}else break}if(Bt!==-1&&Mt!==0&&D.lineIndent<Bt)St(D,"deficient indentation");return Mt}t(ue,"skipSeparationSpace");function Ke(D){let mt=D.position,Bt=D.input.charCodeAt(mt);if((Bt===45||Bt===46)&&Bt===D.input.charCodeAt(mt+1)&&Bt===D.input.charCodeAt(mt+2)){if(mt+=3,Bt=D.input.charCodeAt(mt),Bt===0||rt(Bt))return!0}return!1}t(Ke,"testDocumentSeparator");function Xe(D,mt){if(mt===1)D.result+=" ";else if(mt>1)D.result+=r.repeat(`
138
+ `,mt-1)}t(Xe,"writeFoldedLines");function xi(D,mt,Bt){let Mt,_t,Nt,Z,Ct,Dt,{kind:Ft,result:Ot}=D,qt=D.input.charCodeAt(D.position);if(rt(qt)||it(qt)||qt===35||qt===38||qt===42||qt===33||qt===124||qt===62||qt===39||qt===34||qt===37||qt===64||qt===96)return!1;if(qt===63||qt===45){let Pt=D.input.charCodeAt(D.position+1);if(rt(Pt)||Bt&&it(Pt))return!1}D.kind="scalar",D.result="",Mt=_t=D.position,Nt=!1;while(qt!==0){if(qt===58){let Pt=D.input.charCodeAt(D.position+1);if(rt(Pt)||Bt&&it(Pt))break}else if(qt===35){let Pt=D.input.charCodeAt(D.position-1);if(rt(Pt))break}else if(D.position===D.lineStart&&Ke(D)||Bt&&it(qt))break;else if(X(qt))if(Z=D.line,Ct=D.lineStart,Dt=D.lineIndent,ue(D,!1,-1),D.lineIndent>=mt){Nt=!0,qt=D.input.charCodeAt(D.position);continue}else{D.position=_t,D.line=Z,D.lineStart=Ct,D.lineIndent=Dt;break}if(Nt)xe(D,Mt,_t,!1),Xe(D,D.line-Z),Mt=_t=D.position,Nt=!1;if(!Q(qt))_t=D.position+1;qt=D.input.charCodeAt(++D.position)}if(xe(D,Mt,_t,!1),D.result)return!0;return D.kind=Ft,D.result=Ot,!1}t(xi,"readPlainScalar");function io(D,mt){let Bt,Mt,_t=D.input.charCodeAt(D.position);if(_t!==39)return!1;D.kind="scalar",D.result="",D.position++,Bt=Mt=D.position;while((_t=D.input.charCodeAt(D.position))!==0)if(_t===39)if(xe(D,Bt,D.position,!0),_t=D.input.charCodeAt(++D.position),_t===39)Bt=D.position,D.position++,Mt=D.position;else return!0;else if(X(_t))xe(D,Bt,Mt,!0),Xe(D,ue(D,!1,mt)),Bt=Mt=D.position;else if(D.position===D.lineStart&&Ke(D))ot(D,"unexpected end of the document within a single quoted scalar");else if(D.position++,!Q(_t))Mt=D.position;ot(D,"unexpected end of the stream within a single quoted scalar")}t(io,"readSingleQuotedScalar");function di(D,mt){let Bt,Mt,_t,Nt=D.input.charCodeAt(D.position);if(Nt!==34)return!1;D.kind="scalar",D.result="",D.position++,Bt=Mt=D.position;while((Nt=D.input.charCodeAt(D.position))!==0)if(Nt===34)return xe(D,Bt,D.position,!0),D.position++,!0;else if(Nt===92){if(xe(D,Bt,D.position,!0),Nt=D.input.charCodeAt(++D.position),X(Nt))ue(D,!1,mt);else if(Nt<256&&kt[Nt])D.result+=st[Nt],D.position++;else if((_t=lt(Nt))>0){let Z=_t,Ct=0;for(;Z>0;Z--)if(Nt=D.input.charCodeAt(++D.position),(_t=ct(Nt))>=0)Ct=(Ct<<4)+_t;else ot(D,"expected hexadecimal character");D.result+=vt(Ct),D.position++}else ot(D,"unknown escape sequence");Bt=Mt=D.position}else if(X(Nt))xe(D,Bt,Mt,!0),Xe(D,ue(D,!1,mt)),Bt=Mt=D.position;else if(D.position===D.lineStart&&Ke(D))ot(D,"unexpected end of the document within a double quoted scalar");else if(D.position++,!Q(Nt))Mt=D.position;ot(D,"unexpected end of the stream within a double quoted scalar")}t(di,"readDoubleQuotedScalar");function Do(D,mt){let Bt=!0,Mt,_t,Nt,Z=D.tag,Ct,Dt=D.anchor,Ft,Ot,qt,Pt,Vt=Object.create(null),Xt,Zt,ee,ve=D.input.charCodeAt(D.position);if(ve===91)Ft=93,Pt=!1,Ct=[];else if(ve===123)Ft=125,Pt=!0,Ct={};else return!1;if(D.anchor!==null)Lt(D,D.anchor,Ct);ve=D.input.charCodeAt(++D.position);while(ve!==0){if(ue(D,!0,mt),ve=D.input.charCodeAt(D.position),ve===Ft)return D.position++,D.tag=Z,D.anchor=Dt,D.kind=Pt?"mapping":"sequence",D.result=Ct,!0;else if(!Bt)ot(D,"missed comma between flow collection entries");else if(ve===44)ot(D,"expected the node content, but found ','");if(Zt=Xt=ee=null,Ot=qt=!1,ve===63){let Ge=D.input.charCodeAt(D.position+1);if(rt(Ge))Ot=qt=!0,D.position++,ue(D,!0,mt)}if(Mt=D.line,_t=D.lineStart,Nt=D.position,sr(D,mt,n,!1,!0),Zt=D.tag,Xt=D.result,ue(D,!0,mt),ve=D.input.charCodeAt(D.position),(qt||D.line===Mt)&&ve===58)Ot=!0,ve=D.input.charCodeAt(++D.position),ue(D,!0,mt),sr(D,mt,n,!1,!0),ee=D.result;if(Pt)re(D,Ct,Vt,Zt,Xt,ee,Mt,_t,Nt);else if(Ot)Ct.push(re(D,null,Vt,Zt,Xt,ee,Mt,_t,Nt));else Ct.push(Xt);if(ue(D,!0,mt),ve=D.input.charCodeAt(D.position),ve===44)Bt=!0,ve=D.input.charCodeAt(++D.position);else Bt=!1}ot(D,"unexpected end of the stream within a flow collection")}t(Do,"readFlowCollection");function je(D,mt){let Bt,Mt=y,_t=!1,Nt=!1,Z=mt,Ct=0,Dt=!1,Ft,Ot=D.input.charCodeAt(D.position);if(Ot===124)Bt=!1;else if(Ot===62)Bt=!0;else return!1;D.kind="scalar",D.result="";while(Ot!==0)if(Ot=D.input.charCodeAt(++D.position),Ot===43||Ot===45)if(y===Mt)Mt=Ot===43?B:f;else ot(D,"repeat of a chomping mode identifier");else if((Ft=pt(Ot))>=0)if(Ft===0)ot(D,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Nt)Z=mt+Ft-1,Nt=!0;else ot(D,"repeat of an indentation width identifier");else break;if(Q(Ot)){do Ot=D.input.charCodeAt(++D.position);while(Q(Ot));if(Ot===35)do Ot=D.input.charCodeAt(++D.position);while(!X(Ot)&&Ot!==0)}while(Ot!==0){ce(D),D.lineIndent=0,Ot=D.input.charCodeAt(D.position);while((!Nt||D.lineIndent<Z)&&Ot===32)D.lineIndent++,Ot=D.input.charCodeAt(++D.position);if(!Nt&&D.lineIndent>Z)Z=D.lineIndent;if(X(Ot)){Ct++;continue}if(!Nt&&Z===0)ot(D,"missing indentation for block scalar");if(D.lineIndent<Z){if(Mt===B)D.result+=r.repeat(`
139
+ `,_t?1+Ct:Ct);else if(Mt===y){if(_t)D.result+=`
140
+ `}break}if(Bt)if(Q(Ot))Dt=!0,D.result+=r.repeat(`
141
+ `,_t?1+Ct:Ct);else if(Dt)Dt=!1,D.result+=r.repeat(`
142
+ `,Ct+1);else if(Ct===0){if(_t)D.result+=" "}else D.result+=r.repeat(`
143
+ `,Ct);else D.result+=r.repeat(`
144
+ `,_t?1+Ct:Ct);_t=!0,Nt=!0,Ct=0;let qt=D.position;while(!X(Ot)&&Ot!==0)Ot=D.input.charCodeAt(++D.position);xe(D,qt,D.position,!1)}return!0}t(je,"readBlockScalar");function $r(D,mt){let{tag:Bt,anchor:Mt}=D,_t=[],Nt=!1;if(D.firstTabInLine!==-1)return!1;if(D.anchor!==null)Lt(D,D.anchor,_t);let Z=D.input.charCodeAt(D.position);while(Z!==0){if(D.firstTabInLine!==-1)D.position=D.firstTabInLine,ot(D,"tab characters must not be used in indentation");if(Z!==45)break;let Ct=D.input.charCodeAt(D.position+1);if(!rt(Ct))break;if(Nt=!0,D.position++,ue(D,!0,-1)){if(D.lineIndent<=mt){_t.push(null),Z=D.input.charCodeAt(D.position);continue}}let Dt=D.line;if(sr(D,mt,h,!1,!0),_t.push(D.result),ue(D,!0,-1),Z=D.input.charCodeAt(D.position),(D.line===Dt||D.lineIndent>mt)&&Z!==0)ot(D,"bad indentation of a sequence entry");else if(D.lineIndent<mt)break}if(Nt)return D.tag=Bt,D.anchor=Mt,D.kind="sequence",D.result=_t,!0;return!1}t($r,"readBlockSequence");function Pe(D,mt,Bt){let Mt,_t,Nt,Z,{tag:Ct,anchor:Dt}=D,Ft={},Ot=Object.create(null),qt=null,Pt=null,Vt=null,Xt=!1,Zt=!1;if(D.firstTabInLine!==-1)return!1;if(D.anchor!==null)Lt(D,D.anchor,Ft);let ee=D.input.charCodeAt(D.position);while(ee!==0){if(!Xt&&D.firstTabInLine!==-1)D.position=D.firstTabInLine,ot(D,"tab characters must not be used in indentation");let ve=D.input.charCodeAt(D.position+1),Ge=D.line;if((ee===63||ee===58)&&rt(ve)){if(ee===63){if(Xt)re(D,Ft,Ot,qt,Pt,null,_t,Nt,Z),qt=Pt=Vt=null;Zt=!0,Xt=!0,Mt=!0}else if(Xt)Xt=!1,Mt=!0;else ot(D,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");D.position+=1,ee=ve}else{if(_t=D.line,Nt=D.lineStart,Z=D.position,!sr(D,Bt,c,!1,!0))break;if(D.line===Ge){ee=D.input.charCodeAt(D.position);while(Q(ee))ee=D.input.charCodeAt(++D.position);if(ee===58){if(ee=D.input.charCodeAt(++D.position),!rt(ee))ot(D,"a whitespace character is expected after the key-value separator within a block mapping");if(Xt)re(D,Ft,Ot,qt,Pt,null,_t,Nt,Z),qt=Pt=Vt=null;Zt=!0,Xt=!1,Mt=!1,qt=D.tag,Pt=D.result}else if(Zt)ot(D,"can not read an implicit mapping pair; a colon is missed");else return D.tag=Ct,D.anchor=Dt,!0}else if(Zt)ot(D,"can not read a block mapping entry; a multiline key may not be an implicit key");else return D.tag=Ct,D.anchor=Dt,!0}if(D.line===Ge||D.lineIndent>mt){if(Xt)_t=D.line,Nt=D.lineStart,Z=D.position;if(sr(D,mt,g,!0,Mt))if(Xt)Pt=D.result;else Vt=D.result;if(!Xt)re(D,Ft,Ot,qt,Pt,Vt,_t,Nt,Z),qt=Pt=Vt=null;ue(D,!0,-1),ee=D.input.charCodeAt(D.position)}if((D.line===Ge||D.lineIndent>mt)&&ee!==0)ot(D,"bad indentation of a mapping entry");else if(D.lineIndent<mt)break}if(Xt)re(D,Ft,Ot,qt,Pt,null,_t,Nt,Z);if(Zt)D.tag=Ct,D.anchor=Dt,D.kind="mapping",D.result=Ft;return Zt}t(Pe,"readBlockMapping");function oo(D){let mt=!1,Bt=!1,Mt,_t,Nt=D.input.charCodeAt(D.position);if(Nt!==33)return!1;if(D.tag!==null)ot(D,"duplication of a tag property");if(Nt=D.input.charCodeAt(++D.position),Nt===60)mt=!0,Nt=D.input.charCodeAt(++D.position);else if(Nt===33)Bt=!0,Mt="!!",Nt=D.input.charCodeAt(++D.position);else Mt="!";let Z=D.position;if(mt){do Nt=D.input.charCodeAt(++D.position);while(Nt!==0&&Nt!==62);if(D.position<D.length)_t=D.input.slice(Z,D.position),Nt=D.input.charCodeAt(++D.position);else ot(D,"unexpected end of the stream within a verbatim tag")}else{while(Nt!==0&&!rt(Nt)){if(Nt===33)if(!Bt){if(Mt=D.input.slice(Z-1,D.position+1),!H.test(Mt))ot(D,"named tag handle cannot contain such characters");Bt=!0,Z=D.position+1}else ot(D,"tag suffix cannot contain exclamation marks");Nt=D.input.charCodeAt(++D.position)}if(_t=D.input.slice(Z,D.position),W.test(_t))ot(D,"tag suffix cannot contain flow indicator characters")}if(_t&&!Y.test(_t))ot(D,"tag name cannot contain such characters: "+_t);try{_t=decodeURIComponent(_t)}catch(Ct){ot(D,"tag name is malformed: "+_t)}if(mt)D.tag=_t;else if(o.call(D.tagMap,Mt))D.tag=D.tagMap[Mt]+_t;else if(Mt==="!")D.tag="!"+_t;else if(Mt==="!!")D.tag="tag:yaml.org,2002:"+_t;else ot(D,'undeclared tag handle "'+Mt+'"');return!0}t(oo,"readTagProperty");function ur(D){let mt=D.input.charCodeAt(D.position);if(mt!==38)return!1;if(D.anchor!==null)ot(D,"duplication of an anchor property");mt=D.input.charCodeAt(++D.position);let Bt=D.position;while(mt!==0&&!rt(mt)&&!it(mt))mt=D.input.charCodeAt(++D.position);if(D.position===Bt)ot(D,"name of an anchor node must contain at least one character");return D.anchor=D.input.slice(Bt,D.position),!0}t(ur,"readAnchorProperty");function pi(D){let mt=D.input.charCodeAt(D.position);if(mt!==42)return!1;mt=D.input.charCodeAt(++D.position);let Bt=D.position;while(mt!==0&&!rt(mt)&&!it(mt))mt=D.input.charCodeAt(++D.position);if(D.position===Bt)ot(D,"name of an alias node must contain at least one character");let Mt=D.input.slice(Bt,D.position);if(!o.call(D.anchorMap,Mt))ot(D,'unidentified alias "'+Mt+'"');return D.result=D.anchorMap[Mt],ue(D,!0,-1),!0}t(pi,"readAlias");function Po(D,mt,Bt,Mt){let _t=ne(D);if(Yt(D),_e(D,mt),D.tag=null,D.anchor=null,D.kind=null,D.result=null,Pe(D,Bt,Mt)&&D.kind==="mapping")return Ht(D),!0;return he(D),_e(D,_t),!1}t(Po,"tryReadBlockMappingFromProperty");function sr(D,mt,Bt,Mt,_t){let Nt,Z,Ct=1,Dt=!1,Ft=!1,Ot=null,qt,Pt,Vt;if(D.depth>=D.maxDepth)ot(D,"nesting exceeded maxDepth ("+D.maxDepth+")");if(D.depth+=1,D.listener!==null)D.listener("open",D);D.tag=null,D.anchor=null,D.kind=null,D.result=null;let Xt=Nt=Z=g===Bt||h===Bt;if(Mt){if(ue(D,!0,-1)){if(Dt=!0,D.lineIndent>mt)Ct=1;else if(D.lineIndent===mt)Ct=0;else if(D.lineIndent<mt)Ct=-1}}if(Ct===1)while(!0){let Zt=D.input.charCodeAt(D.position),ee=ne(D);if(Dt&&(Zt===33&&D.tag!==null||Zt===38&&D.anchor!==null))break;if(!oo(D)&&!ur(D))break;if(Ot===null)Ot=ee;if(ue(D,!0,-1)){if(Dt=!0,Z=Xt,D.lineIndent>mt)Ct=1;else if(D.lineIndent===mt)Ct=0;else if(D.lineIndent<mt)Ct=-1}else Z=!1}if(Z)Z=Dt||_t;if(Ct===1||g===Bt){if(n===Bt||c===Bt)Pt=mt;else Pt=mt+1;if(Vt=D.position-D.lineStart,Ct===1)if(Z&&($r(D,Vt)||Pe(D,Vt,Pt))||Do(D,Pt))Ft=!0;else{let Zt=D.input.charCodeAt(D.position);if(Ot!==null&&Xt&&!Z&&Zt!==124&&Zt!==62&&Po(D,Ot,Ot.position-Ot.lineStart,Pt))Ft=!0;else if(Nt&&je(D,Pt)||io(D,Pt)||di(D,Pt))Ft=!0;else if(pi(D)){if(Ft=!0,D.tag!==null||D.anchor!==null)ot(D,"alias node should not have any properties")}else if(xi(D,Pt,n===Bt)){if(Ft=!0,D.tag===null)D.tag="?"}if(D.anchor!==null)Lt(D,D.anchor,D.result)}else if(Ct===0)Ft=Z&&$r(D,Vt)}if(D.tag===null){if(D.anchor!==null)Lt(D,D.anchor,D.result)}else if(D.tag==="?"){if(D.result!==null&&D.kind!=="scalar")ot(D,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+D.kind+'"');for(let Zt=0,ee=D.implicitTypes.length;Zt<ee;Zt+=1)if(qt=D.implicitTypes[Zt],qt.resolve(D.result)){if(D.result=qt.construct(D.result),D.tag=qt.tag,D.anchor!==null)Lt(D,D.anchor,D.result);break}}else if(D.tag!=="!"){if(o.call(D.typeMap[D.kind||"fallback"],D.tag))qt=D.typeMap[D.kind||"fallback"][D.tag];else{qt=null;let Zt=D.typeMap.multi[D.kind||"fallback"];for(let ee=0,ve=Zt.length;ee<ve;ee+=1)if(D.tag.slice(0,Zt[ee].tag.length)===Zt[ee].tag){qt=Zt[ee];break}}if(!qt)ot(D,"unknown tag !<"+D.tag+">");if(D.result!==null&&qt.kind!==D.kind)ot(D,"unacceptable node kind for !<"+D.tag+'> tag; it should be "'+qt.kind+'", not "'+D.kind+'"');if(!qt.resolve(D.result,D.tag))ot(D,"cannot resolve a node with !<"+D.tag+"> explicit tag");else if(D.result=qt.construct(D.result,D.tag),D.anchor!==null)Lt(D,D.anchor,D.result)}if(D.listener!==null)D.listener("close",D);return D.depth-=1,D.tag!==null||D.anchor!==null||Ft}t(sr,"composeNode");function Ro(D){let mt=D.position,Bt=!1,Mt;D.version=null,D.checkLineBreaks=D.legacy,D.tagMap=Object.create(null),D.anchorMap=Object.create(null);while((Mt=D.input.charCodeAt(D.position))!==0){if(ue(D,!0,-1),Mt=D.input.charCodeAt(D.position),D.lineIndent>0||Mt!==37)break;Bt=!0,Mt=D.input.charCodeAt(++D.position);let _t=D.position;while(Mt!==0&&!rt(Mt))Mt=D.input.charCodeAt(++D.position);let Nt=D.input.slice(_t,D.position),Z=[];if(Nt.length<1)ot(D,"directive name must not be less than one character in length");while(Mt!==0){while(Q(Mt))Mt=D.input.charCodeAt(++D.position);if(Mt===35){do Mt=D.input.charCodeAt(++D.position);while(Mt!==0&&!X(Mt));break}if(X(Mt))break;_t=D.position;while(Mt!==0&&!rt(Mt))Mt=D.input.charCodeAt(++D.position);Z.push(D.input.slice(_t,D.position))}if(Mt!==0)ce(D);if(o.call(Ae,Nt))Ae[Nt](D,Nt,Z);else St(D,'unknown document directive "'+Nt+'"')}if(ue(D,!0,-1),D.lineIndent===0&&D.input.charCodeAt(D.position)===45&&D.input.charCodeAt(D.position+1)===45&&D.input.charCodeAt(D.position+2)===45)D.position+=3,ue(D,!0,-1);else if(Bt)ot(D,"directives end mark is expected");if(sr(D,D.lineIndent-1,g,!1,!0),ue(D,!0,-1),D.checkLineBreaks&&q.test(D.input.slice(mt,D.position)))St(D,"non-ASCII line breaks are interpreted as content");if(D.documents.push(D.result),D.position===D.lineStart&&Ke(D)){if(D.input.charCodeAt(D.position)===46)D.position+=3,ue(D,!0,-1);return}if(D.position<D.length-1)ot(D,"end of the stream or a document separator is expected")}t(Ro,"readDocument");function _i(D,mt){if(D=String(D),mt=mt||{},D.length!==0){if(D.charCodeAt(D.length-1)!==10&&D.charCodeAt(D.length-1)!==13)D+=`
145
+ `;if(D.charCodeAt(0)===65279)D=D.slice(1)}let Bt=new at(D,mt),Mt=D.indexOf("\x00");if(Mt!==-1)Bt.position=Mt,ot(Bt,"null byte is not allowed in input");Bt.input+="\x00";while(Bt.input.charCodeAt(Bt.position)===32)Bt.lineIndent+=1,Bt.position+=1;while(Bt.position<Bt.length-1)Ro(Bt);return Bt.documents}t(_i,"loadDocuments");function so(D,mt,Bt){if(mt!==null&&typeof mt==="object"&&typeof Bt>"u")Bt=mt,mt=null;let Mt=_i(D,Bt);if(typeof mt!=="function")return Mt;for(let _t=0,Nt=Mt.length;_t<Nt;_t+=1)mt(Mt[_t])}t(so,"loadAll2");function ao(D,mt){let Bt=_i(D,mt);if(Bt.length===0)return;else if(Bt.length===1)return Bt[0];throw new e("expected a single document in the stream, but found more")}return t(ao,"load2"),Ol.loadAll=so,Ol.load=ao,Ol}t(Yg,"requireLoader");var qu={},Ng;function Ug(){if(Ng)return qu;Ng=1;let r=Fs(),e=As(),i=Il(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,n=65279,c=9,h=10,g=13,y=32,f=33,B=34,v=35,q=37,W=38,H=39,Y=42,j=44,X=45,Q=58,rt=61,it=62,ct=63,lt=64,pt=91,bt=93,vt=96,wt=123,kt=124,st=125,at={};at[0]="\\0",at[7]="\\a",at[8]="\\b",at[9]="\\t",at[10]="\\n",at[11]="\\v",at[12]="\\f",at[13]="\\r",at[27]="\\e",at[34]="\\\"",at[92]="\\\\",at[133]="\\N",at[160]="\\_",at[8232]="\\L",at[8233]="\\P";let xt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ot=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function St(Z,Ct){if(Ct===null)return{};let Dt={},Ft=Object.keys(Ct);for(let Ot=0,qt=Ft.length;Ot<qt;Ot+=1){let Pt=Ft[Ot],Vt=String(Ct[Pt]);if(Pt.slice(0,2)==="!!")Pt="tag:yaml.org,2002:"+Pt.slice(2);let Xt=Z.compiledTypeMap.fallback[Pt];if(Xt&&o.call(Xt.styleAliases,Vt))Vt=Xt.styleAliases[Vt];Dt[Pt]=Vt}return Dt}t(St,"compileStyleMap");function Lt(Z){let Ct,Dt,Ft=Z.toString(16).toUpperCase();if(Z<=255)Ct="x",Dt=2;else if(Z<=65535)Ct="u",Dt=4;else if(Z<=4294967295)Ct="U",Dt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+Ct+r.repeat("0",Dt-Ft.length)+Ft}t(Lt,"encodeHex");let Yt=1,Ht=2;function he(Z){this.schema=Z.schema||i,this.indent=Math.max(1,Z.indent||2),this.noArrayIndent=Z.noArrayIndent||!1,this.skipInvalid=Z.skipInvalid||!1,this.flowLevel=r.isNothing(Z.flowLevel)?-1:Z.flowLevel,this.styleMap=St(this.schema,Z.styles||null),this.sortKeys=Z.sortKeys||!1,this.lineWidth=Z.lineWidth||80,this.noRefs=Z.noRefs||!1,this.noCompatMode=Z.noCompatMode||!1,this.condenseFlow=Z.condenseFlow||!1,this.quotingType=Z.quotingType==='"'?Ht:Yt,this.forceQuotes=Z.forceQuotes||!1,this.replacer=typeof Z.replacer==="function"?Z.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(he,"State");function ne(Z,Ct){let Dt=r.repeat(" ",Ct),Ft=0,Ot="",qt=Z.length;while(Ft<qt){let Pt,Vt=Z.indexOf(`
146
146
  `,Ft);if(Vt===-1)Pt=Z.slice(Ft),Ft=qt;else Pt=Z.slice(Ft,Vt+1),Ft=Vt+1;if(Pt.length&&Pt!==`
147
- `)Ot+=Dt;Ot+=Pt}return Ot}t(ie,"indentString");function be(Z,Ct){return`
148
- `+r.repeat(" ",Z.indent*Ct)}t(be,"generateNextLine");function _e(Z,Ct){for(let Dt=0,Ft=Z.implicitTypes.length;Dt<Ft;Dt+=1)if(Z.implicitTypes[Dt].resolve(Ct))return!0;return!1}t(_e,"testImplicitResolving");function ge(Z){return Z===y||Z===c}t(ge,"isWhitespace");function Wt(Z){return Z>=32&&Z<=126||Z>=161&&Z<=55295&&Z!==8232&&Z!==8233||Z>=57344&&Z<=65533&&Z!==n||Z>=65536&&Z<=1114111}t(Wt,"isPrintable");function ee(Z){return Wt(Z)&&Z!==n&&Z!==g&&Z!==h}t(ee,"isNsCharOrWhitespace");function ce(Z,Ct,Dt){let Ft=ee(Z),Ot=Ft&&!ge(Z);return(Dt?Ft:Ft&&Z!==j&&Z!==pt&&Z!==bt&&Z!==wt&&Z!==st)&&Z!==F&&!(Ct===Q&&!Ot)||ee(Ct)&&!ge(Ct)&&Z===F||Ct===Q&&Ot}t(ce,"isPlainSafe");function ue(Z){return Wt(Z)&&Z!==n&&!ge(Z)&&Z!==K&&Z!==ct&&Z!==Q&&Z!==j&&Z!==pt&&Z!==bt&&Z!==wt&&Z!==st&&Z!==F&&Z!==W&&Z!==Y&&Z!==f&&Z!==kt&&Z!==rt&&Z!==it&&Z!==H&&Z!==b&&Z!==N&&Z!==lt&&Z!==vt}t(ue,"isPlainSafeFirst");function Xe(Z){return!ge(Z)&&Z!==Q}t(Xe,"isPlainSafeLast");function Ge(Z,Ct){let Dt=Z.charCodeAt(Ct),Ft;if(Dt>=55296&&Dt<=56319&&Ct+1<Z.length){if(Ft=Z.charCodeAt(Ct+1),Ft>=56320&&Ft<=57343)return(Dt-55296)*1024+Ft-56320+65536}return Dt}t(Ge,"codePointAt");function ui(Z){return/^\n* /.test(Z)}t(ui,"needIndentIndicator");let Ki=1,si=2,Fo=3,Ue=4,Or=5;function $e(Z,Ct,Dt,Ft,Ot,qt,Pt,Vt){let Xt,Kt=0,te=null,we=!1,je=!1,Is=Ft!==-1,Eo=-1,Oo=ue(Ge(Z,0))&&Xe(Ge(Z,Z.length-1));if(Ct||Pt)for(Xt=0;Xt<Z.length;Kt>=65536?Xt+=2:Xt++){if(Kt=Ge(Z,Xt),!Wt(Kt))return Or;Oo=Oo&&ce(Kt,te,Vt),te=Kt}else{for(Xt=0;Xt<Z.length;Kt>=65536?Xt+=2:Xt++){if(Kt=Ge(Z,Xt),Kt===h){if(we=!0,Is)je=je||Xt-Eo-1>Ft&&Z[Eo+1]!==" ",Eo=Xt}else if(!Wt(Kt))return Or;Oo=Oo&&ce(Kt,te,Vt),te=Kt}je=je||Is&&(Xt-Eo-1>Ft&&Z[Eo+1]!==" ")}if(!we&&!je){if(Oo&&!Pt&&!Ot(Z))return Ki;return qt===Ht?Or:si}if(Dt>9&&ui(Z))return Or;if(!Pt)return je?Ue:Fo;return qt===Ht?Or:si}t($e,"chooseScalarStyle");function Zi(Z,Ct,Dt,Ft,Ot){Z.dump=function(){if(Ct.length===0)return Z.quotingType===Ht?'""':"''";if(!Z.noCompatMode){if(xt.indexOf(Ct)!==-1||ot.test(Ct))return Z.quotingType===Ht?'"'+Ct+'"':"'"+Ct+"'"}let qt=Z.indent*Math.max(1,Dt),Pt=Z.lineWidth===-1?-1:Math.max(Math.min(Z.lineWidth,40),Z.lineWidth-qt),Vt=Ft||Z.flowLevel>-1&&Dt>=Z.flowLevel;function Xt(Kt){return _e(Z,Kt)}switch(t(Xt,"testAmbiguity"),$e(Ct,Vt,Z.indent,Pt,Xt,Z.quotingType,Z.forceQuotes&&!Ft,Ot)){case Ki:return Ct;case si:return"'"+Ct.replace(/'/g,"''")+"'";case Fo:return"|"+cr(Ct,Z.indent)+ai(ie(Ct,qt));case Ue:return">"+cr(Ct,Z.indent)+ai(ie(Ao(Ct,Pt),qt));case Or:return'"'+Mo(Ct)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Zi,"writeScalar");function cr(Z,Ct){let Dt=ui(Z)?String(Ct):"",Ft=Z[Z.length-1]===`
147
+ `)Ot+=Dt;Ot+=Pt}return Ot}t(ne,"indentString");function _e(Z,Ct){return`
148
+ `+r.repeat(" ",Z.indent*Ct)}t(_e,"generateNextLine");function Ae(Z,Ct){for(let Dt=0,Ft=Z.implicitTypes.length;Dt<Ft;Dt+=1)if(Z.implicitTypes[Dt].resolve(Ct))return!0;return!1}t(Ae,"testImplicitResolving");function xe(Z){return Z===y||Z===c}t(xe,"isWhitespace");function Wt(Z){return Z>=32&&Z<=126||Z>=161&&Z<=55295&&Z!==8232&&Z!==8233||Z>=57344&&Z<=65533&&Z!==n||Z>=65536&&Z<=1114111}t(Wt,"isPrintable");function re(Z){return Wt(Z)&&Z!==n&&Z!==g&&Z!==h}t(re,"isNsCharOrWhitespace");function ce(Z,Ct,Dt){let Ft=re(Z),Ot=Ft&&!xe(Z);return(Dt?Ft:Ft&&Z!==j&&Z!==pt&&Z!==bt&&Z!==wt&&Z!==st)&&Z!==v&&!(Ct===Q&&!Ot)||re(Ct)&&!xe(Ct)&&Z===v||Ct===Q&&Ot}t(ce,"isPlainSafe");function ue(Z){return Wt(Z)&&Z!==n&&!xe(Z)&&Z!==X&&Z!==ct&&Z!==Q&&Z!==j&&Z!==pt&&Z!==bt&&Z!==wt&&Z!==st&&Z!==v&&Z!==W&&Z!==Y&&Z!==f&&Z!==kt&&Z!==rt&&Z!==it&&Z!==H&&Z!==B&&Z!==q&&Z!==lt&&Z!==vt}t(ue,"isPlainSafeFirst");function Ke(Z){return!xe(Z)&&Z!==Q}t(Ke,"isPlainSafeLast");function Xe(Z,Ct){let Dt=Z.charCodeAt(Ct),Ft;if(Dt>=55296&&Dt<=56319&&Ct+1<Z.length){if(Ft=Z.charCodeAt(Ct+1),Ft>=56320&&Ft<=57343)return(Dt-55296)*1024+Ft-56320+65536}return Dt}t(Xe,"codePointAt");function xi(Z){return/^\n* /.test(Z)}t(xi,"needIndentIndicator");let io=1,di=2,Do=3,je=4,$r=5;function Pe(Z,Ct,Dt,Ft,Ot,qt,Pt,Vt){let Xt,Zt=0,ee=null,ve=!1,Ge=!1,Ws=Ft!==-1,qo=-1,No=ue(Xe(Z,0))&&Ke(Xe(Z,Z.length-1));if(Ct||Pt)for(Xt=0;Xt<Z.length;Zt>=65536?Xt+=2:Xt++){if(Zt=Xe(Z,Xt),!Wt(Zt))return $r;No=No&&ce(Zt,ee,Vt),ee=Zt}else{for(Xt=0;Xt<Z.length;Zt>=65536?Xt+=2:Xt++){if(Zt=Xe(Z,Xt),Zt===h){if(ve=!0,Ws)Ge=Ge||Xt-qo-1>Ft&&Z[qo+1]!==" ",qo=Xt}else if(!Wt(Zt))return $r;No=No&&ce(Zt,ee,Vt),ee=Zt}Ge=Ge||Ws&&(Xt-qo-1>Ft&&Z[qo+1]!==" ")}if(!ve&&!Ge){if(No&&!Pt&&!Ot(Z))return io;return qt===Ht?$r:di}if(Dt>9&&xi(Z))return $r;if(!Pt)return Ge?je:Do;return qt===Ht?$r:di}t(Pe,"chooseScalarStyle");function oo(Z,Ct,Dt,Ft,Ot){Z.dump=function(){if(Ct.length===0)return Z.quotingType===Ht?'""':"''";if(!Z.noCompatMode){if(xt.indexOf(Ct)!==-1||ot.test(Ct))return Z.quotingType===Ht?'"'+Ct+'"':"'"+Ct+"'"}let qt=Z.indent*Math.max(1,Dt),Pt=Z.lineWidth===-1?-1:Math.max(Math.min(Z.lineWidth,40),Z.lineWidth-qt),Vt=Ft||Z.flowLevel>-1&&Dt>=Z.flowLevel;function Xt(Zt){return Ae(Z,Zt)}switch(t(Xt,"testAmbiguity"),Pe(Ct,Vt,Z.indent,Pt,Xt,Z.quotingType,Z.forceQuotes&&!Ft,Ot)){case io:return Ct;case di:return"'"+Ct.replace(/'/g,"''")+"'";case Do:return"|"+ur(Ct,Z.indent)+pi(ne(Ct,qt));case je:return">"+ur(Ct,Z.indent)+pi(ne(Po(Ct,Pt),qt));case $r:return'"'+Ro(Ct)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(oo,"writeScalar");function ur(Z,Ct){let Dt=xi(Z)?String(Ct):"",Ft=Z[Z.length-1]===`
149
149
  `,qt=Ft&&(Z[Z.length-2]===`
150
150
  `||Z===`
151
151
  `)?"+":Ft?"":"-";return Dt+qt+`
152
- `}t(cr,"blockHeader");function ai(Z){return Z[Z.length-1]===`
153
- `?Z.slice(0,-1):Z}t(ai,"dropEndingNewline");function Ao(Z,Ct){let Dt=/(\n+)([^\n]*)/g,Ft=function(){let Vt=Z.indexOf(`
154
- `);return Vt=Vt!==-1?Vt:Z.length,Dt.lastIndex=Vt,or(Z.slice(0,Vt),Ct)}(),Ot=Z[0]===`
152
+ `}t(ur,"blockHeader");function pi(Z){return Z[Z.length-1]===`
153
+ `?Z.slice(0,-1):Z}t(pi,"dropEndingNewline");function Po(Z,Ct){let Dt=/(\n+)([^\n]*)/g,Ft=function(){let Vt=Z.indexOf(`
154
+ `);return Vt=Vt!==-1?Vt:Z.length,Dt.lastIndex=Vt,sr(Z.slice(0,Vt),Ct)}(),Ot=Z[0]===`
155
155
  `||Z[0]===" ",qt,Pt;while(Pt=Dt.exec(Z)){let Vt=Pt[1],Xt=Pt[2];qt=Xt[0]===" ",Ft+=Vt+(!Ot&&!qt&&Xt!==""?`
156
- `:"")+or(Xt,Ct),Ot=qt}return Ft}t(Ao,"foldString");function or(Z,Ct){if(Z===""||Z[0]===" ")return Z;let Dt=/ [^ ]/g,Ft,Ot=0,qt,Pt=0,Vt=0,Xt="";while(Ft=Dt.exec(Z)){if(Vt=Ft.index,Vt-Ot>Ct)qt=Pt>Ot?Pt:Vt,Xt+=`
156
+ `:"")+sr(Xt,Ct),Ot=qt}return Ft}t(Po,"foldString");function sr(Z,Ct){if(Z===""||Z[0]===" ")return Z;let Dt=/ [^ ]/g,Ft,Ot=0,qt,Pt=0,Vt=0,Xt="";while(Ft=Dt.exec(Z)){if(Vt=Ft.index,Vt-Ot>Ct)qt=Pt>Ot?Pt:Vt,Xt+=`
157
157
  `+Z.slice(Ot,qt),Ot=qt+1;Pt=Vt}if(Xt+=`
158
158
  `,Z.length-Ot>Ct&&Pt>Ot)Xt+=Z.slice(Ot,Pt)+`
159
- `+Z.slice(Pt+1);else Xt+=Z.slice(Ot);return Xt.slice(1)}t(or,"foldLine");function Mo(Z){let Ct="",Dt=0;for(let Ft=0;Ft<Z.length;Dt>=65536?Ft+=2:Ft++){Dt=Ge(Z,Ft);let Ot=at[Dt];if(!Ot&&Wt(Dt)){if(Ct+=Z[Ft],Dt>=65536)Ct+=Z[Ft+1]}else Ct+=Ot||Lt(Dt)}return Ct}t(Mo,"escapeString");function xi(Z,Ct,Dt){let Ft="",Ot=Z.tag;for(let qt=0,Pt=Dt.length;qt<Pt;qt+=1){let Vt=Dt[qt];if(Z.replacer)Vt=Z.replacer.call(Dt,String(qt),Vt);if(Bt(Z,Ct,Vt,!1,!1)||typeof Vt>"u"&&Bt(Z,Ct,null,!1,!1)){if(Ft!=="")Ft+=","+(!Z.condenseFlow?" ":"");Ft+=Z.dump}}Z.tag=Ot,Z.dump="["+Ft+"]"}t(xi,"writeFlowSequence");function Qi(Z,Ct,Dt,Ft){let Ot="",qt=Z.tag;for(let Pt=0,Vt=Dt.length;Pt<Vt;Pt+=1){let Xt=Dt[Pt];if(Z.replacer)Xt=Z.replacer.call(Dt,String(Pt),Xt);if(Bt(Z,Ct+1,Xt,!0,!0,!1,!0)||typeof Xt>"u"&&Bt(Z,Ct+1,null,!0,!0,!1,!0)){if(!Ft||Ot!=="")Ot+=be(Z,Ct);if(Z.dump&&h===Z.dump.charCodeAt(0))Ot+="-";else Ot+="- ";Ot+=Z.dump}}Z.tag=qt,Z.dump=Ot||"[]"}t(Qi,"writeBlockSequence");function Ji(Z,Ct,Dt){let Ft="",Ot=Z.tag,qt=Object.keys(Dt);for(let Pt=0,Vt=qt.length;Pt<Vt;Pt+=1){let Xt="";if(Ft!=="")Xt+=", ";if(Z.condenseFlow)Xt+='"';let Kt=qt[Pt],te=Dt[Kt];if(Z.replacer)te=Z.replacer.call(Dt,Kt,te);if(!Bt(Z,Ct,Kt,!1,!1))continue;if(Z.dump.length>1024)Xt+="? ";if(Xt+=Z.dump+(Z.condenseFlow?'"':"")+":"+(Z.condenseFlow?"":" "),!Bt(Z,Ct,te,!1,!1))continue;Xt+=Z.dump,Ft+=Xt}Z.tag=Ot,Z.dump="{"+Ft+"}"}t(Ji,"writeFlowMapping");function q(Z,Ct,Dt,Ft){let Ot="",qt=Z.tag,Pt=Object.keys(Dt);if(Z.sortKeys===!0)Pt.sort();else if(typeof Z.sortKeys==="function")Pt.sort(Z.sortKeys);else if(Z.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Vt=0,Xt=Pt.length;Vt<Xt;Vt+=1){let Kt="";if(!Ft||Ot!=="")Kt+=be(Z,Ct);let te=Pt[Vt],we=Dt[te];if(Z.replacer)we=Z.replacer.call(Dt,te,we);if(!Bt(Z,Ct+1,te,!0,!0,!0))continue;let je=Z.tag!==null&&Z.tag!=="?"||Z.dump&&Z.dump.length>1024;if(je)if(Z.dump&&h===Z.dump.charCodeAt(0))Kt+="?";else Kt+="? ";if(Kt+=Z.dump,je)Kt+=be(Z,Ct);if(!Bt(Z,Ct+1,we,!0,je))continue;if(Z.dump&&h===Z.dump.charCodeAt(0))Kt+=":";else Kt+=": ";Kt+=Z.dump,Ot+=Kt}Z.tag=qt,Z.dump=Ot||"{}"}t(q,"writeBlockMapping");function mt(Z,Ct,Dt){let Ft=Dt?Z.explicitTypes:Z.implicitTypes;for(let Ot=0,qt=Ft.length;Ot<qt;Ot+=1){let Pt=Ft[Ot];if((Pt.instanceOf||Pt.predicate)&&(!Pt.instanceOf||typeof Ct==="object"&&Ct instanceof Pt.instanceOf)&&(!Pt.predicate||Pt.predicate(Ct))){if(Dt)if(Pt.multi&&Pt.representName)Z.tag=Pt.representName(Ct);else Z.tag=Pt.tag;else Z.tag="?";if(Pt.represent){let Vt=Z.styleMap[Pt.tag]||Pt.defaultStyle,Xt;if(s.call(Pt.represent)==="[object Function]")Xt=Pt.represent(Ct,Vt);else if(o.call(Pt.represent,Vt))Xt=Pt.represent[Vt](Ct,Vt);else throw new e("!<"+Pt.tag+'> tag resolver accepts not "'+Vt+'" style');Z.dump=Xt}return!0}}return!1}t(mt,"detectType");function Bt(Z,Ct,Dt,Ft,Ot,qt,Pt){if(Z.tag=null,Z.dump=Dt,!mt(Z,Dt,!1))mt(Z,Dt,!0);let Vt=s.call(Z.dump),Xt=Ft;if(Ft)Ft=Z.flowLevel<0||Z.flowLevel>Ct;let Kt=Vt==="[object Object]"||Vt==="[object Array]",te,we;if(Kt)te=Z.duplicates.indexOf(Dt),we=te!==-1;if(Z.tag!==null&&Z.tag!=="?"||we||Z.indent!==2&&Ct>0)Ot=!1;if(we&&Z.usedDuplicates[te])Z.dump="*ref_"+te;else{if(Kt&&we&&!Z.usedDuplicates[te])Z.usedDuplicates[te]=!0;if(Vt==="[object Object]"){if(Ft&&Object.keys(Z.dump).length!==0){if(q(Z,Ct,Z.dump,Ot),we)Z.dump="&ref_"+te+Z.dump}else if(Ji(Z,Ct,Z.dump),we)Z.dump="&ref_"+te+" "+Z.dump}else if(Vt==="[object Array]"){if(Ft&&Z.dump.length!==0){if(Z.noArrayIndent&&!Pt&&Ct>0)Qi(Z,Ct-1,Z.dump,Ot);else Qi(Z,Ct,Z.dump,Ot);if(we)Z.dump="&ref_"+te+Z.dump}else if(xi(Z,Ct,Z.dump),we)Z.dump="&ref_"+te+" "+Z.dump}else if(Vt==="[object String]"){if(Z.tag!=="?")Zi(Z,Z.dump,Ct,qt,Xt)}else if(Vt==="[object Undefined]")return!1;else{if(Z.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Vt)}if(Z.tag!==null&&Z.tag!=="?"){let je=encodeURI(Z.tag[0]==="!"?Z.tag.slice(1):Z.tag).replace(/!/g,"%21");if(Z.tag[0]==="!")je="!"+je;else if(je.slice(0,18)==="tag:yaml.org,2002:")je="!!"+je.slice(18);else je="!<"+je+">";Z.dump=je+" "+Z.dump}}return!0}t(Bt,"writeNode");function Mt(Z,Ct){let Dt=[],Ft=[];_t(Z,Dt,Ft);let Ot=Ft.length;for(let qt=0;qt<Ot;qt+=1)Ct.duplicates.push(Dt[Ft[qt]]);Ct.usedDuplicates=Array(Ot)}t(Mt,"getDuplicateReferences");function _t(Z,Ct,Dt){if(Z!==null&&typeof Z==="object"){let Ft=Ct.indexOf(Z);if(Ft!==-1){if(Dt.indexOf(Ft)===-1)Dt.push(Ft)}else if(Ct.push(Z),Array.isArray(Z))for(let Ot=0,qt=Z.length;Ot<qt;Ot+=1)_t(Z[Ot],Ct,Dt);else{let Ot=Object.keys(Z);for(let qt=0,Pt=Ot.length;qt<Pt;qt+=1)_t(Z[Ot[qt]],Ct,Dt)}}}t(_t,"inspectNode");function Nt(Z,Ct){Ct=Ct||{};let Dt=new ne(Ct);if(!Dt.noRefs)Mt(Z,Dt);let Ft=Z;if(Dt.replacer)Ft=Dt.replacer.call({"":Ft},"",Ft);if(Bt(Dt,0,Ft,!0,!0))return Dt.dump+`
160
- `;return""}return t(Nt,"dump2"),qu.dump=Nt,qu}t(Ug,"requireDumper");var Wg;function jg(){if(Wg)return gr;Wg=1;let r=Yg(),e=Ug();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"),gr.Type=mr(),gr.Schema=Nu(),gr.FAILSAFE_SCHEMA=Yu(),gr.JSON_SCHEMA=Vu(),gr.CORE_SCHEMA=Ku(),gr.DEFAULT_SCHEMA=Il(),gr.load=r.load,gr.loadAll=r.loadAll,gr.dump=e.dump,gr.YAMLException=Ss(),gr.types={binary:Ju(),float:Xu(),map:Hu(),null:Uu(),pairs:ef(),set:rf(),timestamp:Zu(),bool:ju(),int:Gu(),merge:Qu(),omap:tf(),seq:zu(),str:Wu()},gr.safeLoad=i("safeLoad","load"),gr.safeLoadAll=i("safeLoadAll","loadAll"),gr.safeDump=i("safeDump","dump"),gr}t(jg,"requireJsYaml");var t2=jg(),e2=zg(t2),{Type:I3,Schema:$3,FAILSAFE_SCHEMA:D3,JSON_SCHEMA:et,CORE_SCHEMA:P3,DEFAULT_SCHEMA:R3,load:tt,loadAll:q3,dump:N3,YAMLException:W3,types:z3,safeLoad:H3,safeLoadAll:Y3,safeDump:U3}=e2;var Na=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:n,gradientStop:c}=s??{},h=r.attr("id"),g=i?.includes("dark")?"#FFFFFF":"#000000",y=t((b,F,N)=>r.append("defs").append("filter").attr("id",b).attr("height",F).attr("width",F).append("feDropShadow").attr("dx",N).attr("dy",N).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",g),"dropShadow");if(y(`${h}-drop-shadow`,"130%","4"),y(`${h}-drop-shadow-small`,"150%","2"),!o)return;let f=r.append("linearGradient").attr("id",`${h}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),f.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Gg=t((r)=>{let{handDrawnSeed:e}=l();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),r2=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),vi=t((r)=>{let e=i2([...r.cssCompiledStyles||[],...r.cssStyles||[],...r2(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),i2=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Gr=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"),k=t((r)=>{let{stylesArray:e}=vi(r),i=[],s=[],o=[],n=[];return e.forEach((c)=>{let h=c[0];if(Gr(h))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),h.includes("stroke"))o.push(c.join(":")+" !important");if(h==="fill")n.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),Gt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=l(),{nodeBorder:o,mainBkg:n}=i,{stylesMap:c}=vi(r);return Object.assign({roughness:0.7,fill:c.get("fill")||n,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:o2(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),o2=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 of=(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 h=o.pop(),g=o.pop(),y={provider:o.length>0?o[0]:s,prefix:g,name:h};return e&&!$l(y)?null:y}let n=o[0],c=n.split("-");if(c.length>1){let h={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!$l(h)?null:h}if(i&&s===""){let h={provider:s,prefix:"",name:n};return e&&!$l(h,i)?null:h}return null},$l=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var s2=Object.freeze({left:0,top:0,width:16,height:16}),Ts=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sf=Object.freeze({...s2,...Ts}),Xg=Object.freeze({...sf,body:"",hidden:!1});function Vg(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 af(r,e){let i=Vg(r,e);for(let s in Xg)if(s in Ts){if(s in r&&!(s in i))i[s]=Ts[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Kg(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function n(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let h=s[c]&&s[c].parent,g=h&&n(h);if(g)o[c]=[h].concat(g)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(n),o}function Zg(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),n={};function c(h){n=af(s[h]||o[h],n)}return c(e),i.forEach(c),af(r,n)}function nf(r,e){if(r.icons[e])return Zg(r,e,[]);let i=Kg(r,[e])[e];return i?Zg(r,e,i):null}var a2=Object.freeze({width:null,height:null}),Qg=Object.freeze({...a2,...Ts});var n2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,l2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lf(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(n2);if(s===null||!s.length)return r;let o=[],n=s.shift(),c=l2.test(n);while(!0){if(c){let h=parseFloat(n);if(isNaN(h))o.push(n);else o.push(Math.ceil(h*e*i)/i)}else o.push(n);if(n=s.shift(),n===void 0)return o.join("");c=!c}}function h2(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),n=r.indexOf("</"+e);if(o===-1||n===-1)break;let c=r.indexOf(">",n);if(c===-1)break;i+=r.slice(o+1,n).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function c2(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Jg(r,e,i){let s=h2(r);return c2(s.defs,e+s.content+i)}var u2=(r)=>r==="unset"||r==="undefined"||r==="none";function hf(r,e){let i={...sf,...r},s={...Qg,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},n=i.body;[i,s].forEach((H)=>{let Y=[],{hFlip:j,vFlip:K,rotate:Q}=H;if(j)if(K)Q+=2;else Y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),Y.push("scale(-1 1)"),o.top=o.left=0;else if(K)Y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),Y.push("scale(1 -1)"),o.top=o.left=0;let rt;if(Q<0)Q-=Math.floor(Q/4)*4;switch(Q=Q%4,Q){case 1:rt=o.height/2+o.top,Y.unshift("rotate(90 "+rt.toString()+" "+rt.toString()+")");break;case 2:Y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:rt=o.width/2+o.left,Y.unshift("rotate(-90 "+rt.toString()+" "+rt.toString()+")")}if(Q%2===1){if(o.left!==o.top)rt=o.left,o.left=o.top,o.top=rt;if(o.width!==o.height)rt=o.width,o.width=o.height,o.height=rt}if(Y.length)n=Jg(n,'<g transform="'+Y.join(" ")+'">',"</g>")});let{width:c,height:h}=s,{width:g,height:y}=o,f,b;if(c===null)b=h===null?"1em":h==="auto"?y:h,f=lf(b,g/y);else f=c==="auto"?g:c,b=h===null?lf(f,y/g):h==="auto"?y:h;let F={},N=(H,Y)=>{if(!u2(Y))F[H]=Y.toString()};N("width",f),N("height",b);let W=[o.left,o.top,g,y];return F.viewBox=W.join(" "),{attributes:F,viewBox:W,body:n}}var f2=/\sid="(\S+)"/g,tm=new Map;function d2(r){r=r.replace(/[0-9]+$/,"")||"a";let e=tm.get(r)||0;return tm.set(r,e+1),e?`${r}${e}`:r}function cf(r){let e=[],i;while(i=f2.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 n=d2(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+n+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function uf(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 Fi={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},ff=new Map,em=new Map,In=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(a.debug("Registering icon pack:",e.name),"loader"in e)em.set(e.name,e.loader);else if("icons"in e)ff.set(e.name,e.icons);else throw a.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),rm=t(async(r,e)=>{let i=of(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=ff.get(s);if(!o){let c=em.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},ff.set(s,o)}catch(h){throw a.error(h),Error(`Failed to load icon set: ${i.prefix}`)}}let n=nf(o,i.name);if(!n)throw Error(`Icon not found: ${r}`);return n},"getRegisteredIconData"),Dl=t(async(r)=>{try{return await rm(r),!0}catch{return!1}},"isIconAvailable"),nt=t(async(r,e,i)=>{let s;try{s=await rm(r,e?.fallbackPrefix)}catch(c){a.error(c),s=Fi}let o=hf(s,e),n=uf(cf(o.body),{...o.attributes,...i});return O(n,x())},"getIconSVG");var xm=Se(Gn(),1);function Ko(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],n=i.cache;if(n.has(o))return n.get(o);let c=r.apply(this,s);return i.cache=n.set(o,c)||n,c};return i.cache=new(Ko.Cache||Map),i}Ko.Cache=Map;function Dn(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function un(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var Ma="[object RegExp]",Ar="[object String]",Rr="[object Number]",Lr="[object Boolean]",Ir="[object Arguments]",Pa="[object Symbol]",Oa="[object Date]",$a="[object Map]",Ba="[object Set]",Fa="[object Array]";var za="[object ArrayBuffer]",Ua="[object Object]";var ja="[object DataView]",qa="[object Uint8Array]",Va="[object Uint8ClampedArray]",Wa="[object Uint16Array]",Ga="[object Uint32Array]";var Ha="[object Int8Array]",Ya="[object Int16Array]",Za="[object Int32Array]";var Xa="[object Float32Array]",Ka="[object Float64Array]";function _s(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function dn(r){return _s(r)}function lm(){}function hm(r){if(Dn(r))return r;if(Array.isArray(r)||_s(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 Pl(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var df=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Dr(r){return typeof df.Buffer<"u"&&df.Buffer.isBuffer(r)}function cm(r){return r==="__proto__"}function Rl(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 um(r,e){return Bs(r,void 0,r,new Map,e)}function Bs(r,e,i,s=new Map,o=void 0){let n=o?.(r,e,i,s);if(n!==void 0)return n;if(Dn(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Bs(r[h],h,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[h,g]of r)c.set(h,Bs(g,h,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let h of r)c.add(Bs(h,void 0,i,s,o));return c}if(Dr(r))return r.subarray();if(_s(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Bs(r[h],h,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),ci(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),ci(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),ci(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,ci(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),ci(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),ci(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),ci(c,r,i,s,o),c}if(typeof r==="object"&&B2(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),ci(c,r,i,s,o),c}return r}function ci(r,e,i=r,s,o){let n=[...Object.keys(e),...Pl(e)];for(let c=0;c<n.length;c++){let h=n[c],g=Object.getOwnPropertyDescriptor(r,h);if(g==null||g.writable)r[h]=Bs(e[h],h,i,s,o)}}function B2(r){switch(un(r)){case Ir:case Fa:case za:case ja:case Lr:case Oa:case Xa:case Ka:case Ha:case Ya:case Za:case $a:case Rr:case Ua:case Ma:case Ba:case Ar:case Pa:case qa:case Va:case Wa:case Ga:return!0;default:return!1}}function fm(r,e){return um(r,(i,s,o,n)=>{let c=e?.(i,s,o,n);if(c!==void 0)return c;if(typeof r!=="object")return;if(un(r)==="[object Object]"&&typeof r.constructor!=="function"){let h={};return n.set(r,h),ci(h,r,o,n),h}switch(Object.prototype.toString.call(r)){case Rr:case Ar:case Lr:{let h=new r.constructor(r?.valueOf());return ci(h,r),h}case Ir:{let h={};return ci(h,r),h.length=r.length,h[Symbol.iterator]=r[Symbol.iterator],h}default:return}})}function pf(r){return fm(r)}function Hr(r){return r!==null&&typeof r==="object"&&un(r)==="[object Arguments]"}function ba(r){return typeof r==="object"&&r!==null}function dm(r){return Number.isSafeInteger(r)&&r>=0}function Qa(r){return r!=null&&typeof r!=="function"&&dm(r.length)}function pm(r){return ba(r)&&Qa(r)}function gm(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let n=0;n<i.length;n++){let c=i[n];o=ql(o,c,s,new Map)}return o}function ql(r,e,i,s){if(Dn(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return hm(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let n=0;n<e.length;n++)if(!(n in e))e[n]=void 0}let o=[...Object.keys(e),...Pl(e)];for(let n=0;n<o.length;n++){let c=o[n];if(cm(c))continue;let h=e[c],g=r[c];if(Hr(h))h={...h};if(Hr(g))g={...g};if(Dr(h))h=pf(h);if(Array.isArray(h))if(Array.isArray(g)){let f=[],b=Reflect.ownKeys(g);for(let F=0;F<b.length;F++){let N=b[F];f[N]=g[N]}g=f}else if(pm(g)){let f=[];for(let b=0;b<g.length;b++)f[b]=g[b];g=f}else g=[];let y=i(g,h,c,r,e,s);if(y!==void 0)r[c]=y;else if(Array.isArray(h))r[c]=ql(g,h,i,s);else if(ba(g)&&ba(h)&&(Rl(g)||Rl(h)||dn(g)||dn(h)))r[c]=ql(g,h,i,s);else if(g==null&&Rl(h))r[c]=ql({},h,i,s);else if(g==null&&dn(h))r[c]=pf(h);else if(g===void 0||h!==void 0)r[c]=h}return r}function gf(r,...e){return gm(r,...e,lm)}var zi="​",v2={curveBasis:Vo,curveBasisClosed:_l,curveBasisOpen:Bl,curveBumpX:Wn,curveBumpY:ca,curveBundle:cu,curveCardinalClosed:uu,curveCardinalOpen:fu,curveCardinal:fa,curveCatmullRomClosed:du,curveCatmullRomOpen:pu,curveCatmullRom:pa,curveLinear:_i,curveLinearClosed:Al,curveMonotoneX:ga,curveMonotoneY:ma,curveNatural:bs,curveStep:ks,curveStepAfter:xa,curveStepBefore:ya},L2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F2=t(function(r,e){let i=Cm(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((h)=>h.args);js(c),s=oe(s,[...c])}else s=i.args;if(!s)return;let o=xr(r,e),n="config";if(s[n]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[n],delete s[n]}return s},"detectInit"),Cm=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${L2.source})(?=[}][%]{2}).*
161
- `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),a.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=hs.exec(r))!==null){if(s.index===hs.lastIndex)hs.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let n=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return a.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),fo=t(function(r){return r.replace(hs,"")},"removeDirectives"),A2=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Wl(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return v2[i]??e}t(Wl,"interpolateToCurve");function bm(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return xm.sanitizeUrl(i);return i}t(bm,"formatUrl");var M2=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],n=window;for(let c=0;c<s;c++)if(n=n[i[c]],!n){a.error(`Function name: ${r} not found in window`);return}n[o](...e)},"runFunc");function mf(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(mf,"distance");function km(r){let e,i=0;r.forEach((o)=>{i+=mf(o,e),e=o});let s=i/2;return yf(r,s)}t(km,"traverseEdge");function wm(r){if(r.length===1)return r[0];return km(r)}t(wm,"calcLabelPosition");var mm=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),yf=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let n=mf(o,i);if(n===0)return i;if(n<s)s-=n;else{let c=s/n;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:mm((1-c)*i.x+c*o.x,5),y:mm((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),E2=t((r,e,i)=>{if(a.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=yf(e,25),n=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(c)*n+(e[0].x+o.x)/2,h.y=-Math.cos(c)*n+(e[0].y+o.y)/2,h},"calcCardinalityPosition");function Sm(r,e,i){let s=structuredClone(i);if(a.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,n=yf(s,o),c=10+r*0.5,h=Math.atan2(s[0].y-n.y,s[0].x-n.x),g={x:0,y:0};if(e==="start_left")g.x=Math.sin(h+Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h+Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_right")g.x=Math.sin(h-Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h-Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_left")g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;else g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;return g}t(Sm,"calcTerminalLabelPosition");function Ja(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(Ja,"getStylesFromArray");var ym=0,Ui=t(()=>(ym++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ym),"generateId");function Tm(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(Tm,"makeRandomHex");var ji=t((r)=>Tm(r.length),"random"),O2=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"),I2=t(function(r,e){let i=e.text.replace(v.lineBreakRegex," "),[,s]=We(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 n=o.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(i),o},"drawSimpleText"),Nn=Ko((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),v.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],n="";return s.forEach((c,h)=>{let g=He(`${c} `,i),y=He(n,i);if(g>e){let{hyphenatedStrings:F,remainingWord:N}=$2(c,e,"-",i);o.push(n,...F),n=N}else if(y+g>=e)o.push(n),n=c;else n=[n,c].filter(Boolean).join(" ");if(h+1===s.length)o.push(n)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),$2=Ko((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],n=[],c="";return o.forEach((h,g)=>{let y=`${c}${h}`;if(He(y,s)>=e){let b=g+1,F=o.length===b,N=`${y}${i}`;n.push(F?y:N),c=""}else c=y}),{hyphenatedStrings:n,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Yr(r,e){return Zr(r,e).height}t(Yr,"calculateTextHeight");function He(r,e){return Zr(r,e).width}t(He,"calculateTextWidth");var Zr=Ko((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,n]=We(i),c=["sans-serif",s],h=r.split(v.lineBreakRegex),g=[],y=p("body");if(!y.remove)return{width:0,height:0,lineHeight:0};let f=y.append("svg");for(let F of c){let N=0,W={width:0,height:0,lineHeight:0};for(let H of h){let Y=O2();Y.text=H||zi;let j=I2(f,Y).style("font-size",n).style("font-weight",o).style("font-family",F),K=(j._groups||j)[0][0].getBBox();if(K.width===0&&K.height===0)throw Error("svg element not in render tree");W.width=Math.round(Math.max(W.width,K.width)),N=Math.round(K.height),W.height+=N,W.lineHeight=Math.round(Math.max(W.lineHeight,N))}g.push(W)}f.remove();let b=isNaN(g[1].height)||isNaN(g[1].width)||isNaN(g[1].lineHeight)||g[0].height>g[1].height&&g[0].width>g[1].width&&g[0].lineHeight>g[1].lineHeight?0:1;return g[b]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),D2=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")}},Nl,P2=t(function(r){return Nl=Nl||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Nl.innerHTML=r,unescape(Nl.textContent)},"entityDecode");function ei(r){return"str"in r}t(ei,"isDetailedError");function qi(r){if(r instanceof Error)return r.message;return String(r)}t(qi,"getErrorMessage");var R2=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"),We=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 U(r,e){return gf({},r,e)}t(U,"cleanAndMerge");var M={assignWithDepth:oe,wrapLabel:Nn,calculateTextHeight:Yr,calculateTextWidth:He,calculateTextDimensions:Zr,cleanAndMerge:U,detectInit:F2,detectDirective:Cm,isSubstringInArray:A2,interpolateToCurve:Wl,calcLabelPosition:wm,calcCardinalityPosition:E2,calcTerminalLabelPosition:Sm,formatUrl:bm,getStylesFromArray:Ja,generateId:Ui,random:ji,runFunc:M2,entityDecode:P2,insertTitle:R2,isLabelCoordinateInPath:_m,parseFontSize:We,InitIDGenerator:D2},ho=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"),jt=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),ze=t((r,e,{counter:i=0,prefix:s,suffix:o},n)=>{if(n)return n;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function Je(r){return r??null}t(Je,"handleUndefinedAttr");function _m(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(n)=>Math.round(parseFloat(n)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(_m,"isLabelCoordinateInPath");function Cf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qo=Cf();function Em(r){Qo=r}var va={exec:()=>null};function Ie(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,n)=>{let c=typeof n=="string"?n:n.source;return c=c.replace(Mr.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var q2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Mr={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")},N2=/^(?:[ \t]*(?:\n|$))+/,W2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,z2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,H2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bf=/(?:[*+-]|\d{1,9}[.)])/,Om=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Im=Ie(Om).replace(/bull/g,bf).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(),Y2=Ie(Om).replace(/bull/g,bf).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(),kf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,U2=/^[^\n]+/,wf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,j2=Ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),G2=Ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bf).getRegex(),jl="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",Sf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,X2=Ie("^ {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",Sf).replace("tag",jl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$m=Ie(kf).replace("hr",rn).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",jl).getRegex(),V2=Ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$m).getRegex(),Tf={blockquote:V2,code:W2,def:j2,fences:z2,heading:H2,hr:rn,html:X2,lheading:Im,list:G2,newline:N2,paragraph:$m,table:va,text:U2},Bm=Ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rn).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",jl).getRegex(),K2={...Tf,lheading:Y2,table:Bm,paragraph:Ie(kf).replace("hr",rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bm).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",jl).getRegex()},Z2={...Tf,html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sf).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:va,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ie(kf).replace("hr",rn).replace("heading",` *#{1,6} *[^
162
- ]`).replace("lheading",Im).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Q2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,J2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dm=/^( {2,}|\\)\n(?!\s*$)/,tw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gl=/[\p{P}\p{S}]/u,_f=/[\s\p{P}\p{S}]/u,Pm=/[^\s\p{P}\p{S}]/u,ew=Ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_f).getRegex(),Rm=/(?!~)[\p{P}\p{S}]/u,rw=/(?!~)[\s\p{P}\p{S}]/u,iw=/(?:[^\s\p{P}\p{S}]|~)/u,ow=Ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",q2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sw=Ie(qm,"u").replace(/punct/g,Gl).getRegex(),aw=Ie(qm,"u").replace(/punct/g,Rm).getRegex(),Nm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nw=Ie(Nm,"gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),lw=Ie(Nm,"gu").replace(/notPunctSpace/g,iw).replace(/punctSpace/g,rw).replace(/punct/g,Rm).getRegex(),hw=Ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),cw=Ie(/\\(punct)/,"gu").replace(/punct/g,Gl).getRegex(),uw=Ie(/^<(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(),fw=Ie(Sf).replace("(?:-->|$)","-->").getRegex(),dw=Ie("^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",fw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Hl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pw=Ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Hl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wm=Ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Hl).replace("ref",wf).getRegex(),zm=Ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",wf).getRegex(),gw=Ie("reflink|nolink(?!\\()","g").replace("reflink",Wm).replace("nolink",zm).getRegex(),vm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Bf={_backpedal:va,anyPunctuation:cw,autolink:uw,blockSkip:ow,br:Dm,code:J2,del:va,emStrongLDelim:sw,emStrongRDelimAst:nw,emStrongRDelimUnd:hw,escape:Q2,link:pw,nolink:zm,punctuation:ew,reflink:Wm,reflinkSearch:gw,tag:dw,text:tw,url:va},mw={...Bf,link:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Hl).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Hl).getRegex()},xf={...Bf,emStrongRDelimAst:lw,emStrongLDelim:aw,url:Ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vm).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:Ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vm).getRegex()},yw={...xf,br:Ie(Dm).replace("{2,}","*").getRegex(),text:Ie(xf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zl={normal:Tf,gfm:K2,pedantic:Z2},ka={normal:Bf,gfm:xf,breaks:yw,pedantic:mw},xw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lm=(r)=>xw[r];function Ai(r,e){if(e){if(Mr.escapeTest.test(r))return r.replace(Mr.escapeReplace,Lm)}else if(Mr.escapeTestNoEncode.test(r))return r.replace(Mr.escapeReplaceNoEncode,Lm);return r}function Fm(r){try{r=encodeURI(r).replace(Mr.percentDecode,"%")}catch{return null}return r}function Am(r,e){let i=r.replace(Mr.findPipe,(n,c,h)=>{let g=!1,y=c;for(;--y>=0&&h[y]==="\\";)g=!g;return g?"|":" |"}),s=i.split(Mr.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(Mr.slashPipe,"|");return s}function wa(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let n=r.charAt(s-o-1);if(n===e&&!i)o++;else if(n!==e&&i)o++;else break}return r.slice(0,s-o)}function Cw(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 Mm(r,e,i,s,o){let n=e.href,c=e.title||null,h=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let g={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:n,title:c,text:h,tokens:s.inlineTokens(h)};return s.state.inLink=!1,g}function bw(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
159
+ `+Z.slice(Pt+1);else Xt+=Z.slice(Ot);return Xt.slice(1)}t(sr,"foldLine");function Ro(Z){let Ct="",Dt=0;for(let Ft=0;Ft<Z.length;Dt>=65536?Ft+=2:Ft++){Dt=Xe(Z,Ft);let Ot=at[Dt];if(!Ot&&Wt(Dt)){if(Ct+=Z[Ft],Dt>=65536)Ct+=Z[Ft+1]}else Ct+=Ot||Lt(Dt)}return Ct}t(Ro,"escapeString");function _i(Z,Ct,Dt){let Ft="",Ot=Z.tag;for(let qt=0,Pt=Dt.length;qt<Pt;qt+=1){let Vt=Dt[qt];if(Z.replacer)Vt=Z.replacer.call(Dt,String(qt),Vt);if(Bt(Z,Ct,Vt,!1,!1)||typeof Vt>"u"&&Bt(Z,Ct,null,!1,!1)){if(Ft!=="")Ft+=","+(!Z.condenseFlow?" ":"");Ft+=Z.dump}}Z.tag=Ot,Z.dump="["+Ft+"]"}t(_i,"writeFlowSequence");function so(Z,Ct,Dt,Ft){let Ot="",qt=Z.tag;for(let Pt=0,Vt=Dt.length;Pt<Vt;Pt+=1){let Xt=Dt[Pt];if(Z.replacer)Xt=Z.replacer.call(Dt,String(Pt),Xt);if(Bt(Z,Ct+1,Xt,!0,!0,!1,!0)||typeof Xt>"u"&&Bt(Z,Ct+1,null,!0,!0,!1,!0)){if(!Ft||Ot!=="")Ot+=_e(Z,Ct);if(Z.dump&&h===Z.dump.charCodeAt(0))Ot+="-";else Ot+="- ";Ot+=Z.dump}}Z.tag=qt,Z.dump=Ot||"[]"}t(so,"writeBlockSequence");function ao(Z,Ct,Dt){let Ft="",Ot=Z.tag,qt=Object.keys(Dt);for(let Pt=0,Vt=qt.length;Pt<Vt;Pt+=1){let Xt="";if(Ft!=="")Xt+=", ";if(Z.condenseFlow)Xt+='"';let Zt=qt[Pt],ee=Dt[Zt];if(Z.replacer)ee=Z.replacer.call(Dt,Zt,ee);if(!Bt(Z,Ct,Zt,!1,!1))continue;if(Z.dump.length>1024)Xt+="? ";if(Xt+=Z.dump+(Z.condenseFlow?'"':"")+":"+(Z.condenseFlow?"":" "),!Bt(Z,Ct,ee,!1,!1))continue;Xt+=Z.dump,Ft+=Xt}Z.tag=Ot,Z.dump="{"+Ft+"}"}t(ao,"writeFlowMapping");function D(Z,Ct,Dt,Ft){let Ot="",qt=Z.tag,Pt=Object.keys(Dt);if(Z.sortKeys===!0)Pt.sort();else if(typeof Z.sortKeys==="function")Pt.sort(Z.sortKeys);else if(Z.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Vt=0,Xt=Pt.length;Vt<Xt;Vt+=1){let Zt="";if(!Ft||Ot!=="")Zt+=_e(Z,Ct);let ee=Pt[Vt],ve=Dt[ee];if(Z.replacer)ve=Z.replacer.call(Dt,ee,ve);if(!Bt(Z,Ct+1,ee,!0,!0,!0))continue;let Ge=Z.tag!==null&&Z.tag!=="?"||Z.dump&&Z.dump.length>1024;if(Ge)if(Z.dump&&h===Z.dump.charCodeAt(0))Zt+="?";else Zt+="? ";if(Zt+=Z.dump,Ge)Zt+=_e(Z,Ct);if(!Bt(Z,Ct+1,ve,!0,Ge))continue;if(Z.dump&&h===Z.dump.charCodeAt(0))Zt+=":";else Zt+=": ";Zt+=Z.dump,Ot+=Zt}Z.tag=qt,Z.dump=Ot||"{}"}t(D,"writeBlockMapping");function mt(Z,Ct,Dt){let Ft=Dt?Z.explicitTypes:Z.implicitTypes;for(let Ot=0,qt=Ft.length;Ot<qt;Ot+=1){let Pt=Ft[Ot];if((Pt.instanceOf||Pt.predicate)&&(!Pt.instanceOf||typeof Ct==="object"&&Ct instanceof Pt.instanceOf)&&(!Pt.predicate||Pt.predicate(Ct))){if(Dt)if(Pt.multi&&Pt.representName)Z.tag=Pt.representName(Ct);else Z.tag=Pt.tag;else Z.tag="?";if(Pt.represent){let Vt=Z.styleMap[Pt.tag]||Pt.defaultStyle,Xt;if(s.call(Pt.represent)==="[object Function]")Xt=Pt.represent(Ct,Vt);else if(o.call(Pt.represent,Vt))Xt=Pt.represent[Vt](Ct,Vt);else throw new e("!<"+Pt.tag+'> tag resolver accepts not "'+Vt+'" style');Z.dump=Xt}return!0}}return!1}t(mt,"detectType");function Bt(Z,Ct,Dt,Ft,Ot,qt,Pt){if(Z.tag=null,Z.dump=Dt,!mt(Z,Dt,!1))mt(Z,Dt,!0);let Vt=s.call(Z.dump),Xt=Ft;if(Ft)Ft=Z.flowLevel<0||Z.flowLevel>Ct;let Zt=Vt==="[object Object]"||Vt==="[object Array]",ee,ve;if(Zt)ee=Z.duplicates.indexOf(Dt),ve=ee!==-1;if(Z.tag!==null&&Z.tag!=="?"||ve||Z.indent!==2&&Ct>0)Ot=!1;if(ve&&Z.usedDuplicates[ee])Z.dump="*ref_"+ee;else{if(Zt&&ve&&!Z.usedDuplicates[ee])Z.usedDuplicates[ee]=!0;if(Vt==="[object Object]"){if(Ft&&Object.keys(Z.dump).length!==0){if(D(Z,Ct,Z.dump,Ot),ve)Z.dump="&ref_"+ee+Z.dump}else if(ao(Z,Ct,Z.dump),ve)Z.dump="&ref_"+ee+" "+Z.dump}else if(Vt==="[object Array]"){if(Ft&&Z.dump.length!==0){if(Z.noArrayIndent&&!Pt&&Ct>0)so(Z,Ct-1,Z.dump,Ot);else so(Z,Ct,Z.dump,Ot);if(ve)Z.dump="&ref_"+ee+Z.dump}else if(_i(Z,Ct,Z.dump),ve)Z.dump="&ref_"+ee+" "+Z.dump}else if(Vt==="[object String]"){if(Z.tag!=="?")oo(Z,Z.dump,Ct,qt,Xt)}else if(Vt==="[object Undefined]")return!1;else{if(Z.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Vt)}if(Z.tag!==null&&Z.tag!=="?"){let Ge=encodeURI(Z.tag[0]==="!"?Z.tag.slice(1):Z.tag).replace(/!/g,"%21");if(Z.tag[0]==="!")Ge="!"+Ge;else if(Ge.slice(0,18)==="tag:yaml.org,2002:")Ge="!!"+Ge.slice(18);else Ge="!<"+Ge+">";Z.dump=Ge+" "+Z.dump}}return!0}t(Bt,"writeNode");function Mt(Z,Ct){let Dt=[],Ft=[];_t(Z,Dt,Ft);let Ot=Ft.length;for(let qt=0;qt<Ot;qt+=1)Ct.duplicates.push(Dt[Ft[qt]]);Ct.usedDuplicates=Array(Ot)}t(Mt,"getDuplicateReferences");function _t(Z,Ct,Dt){if(Z!==null&&typeof Z==="object"){let Ft=Ct.indexOf(Z);if(Ft!==-1){if(Dt.indexOf(Ft)===-1)Dt.push(Ft)}else if(Ct.push(Z),Array.isArray(Z))for(let Ot=0,qt=Z.length;Ot<qt;Ot+=1)_t(Z[Ot],Ct,Dt);else{let Ot=Object.keys(Z);for(let qt=0,Pt=Ot.length;qt<Pt;qt+=1)_t(Z[Ot[qt]],Ct,Dt)}}}t(_t,"inspectNode");function Nt(Z,Ct){Ct=Ct||{};let Dt=new he(Ct);if(!Dt.noRefs)Mt(Z,Dt);let Ft=Z;if(Dt.replacer)Ft=Dt.replacer.call({"":Ft},"",Ft);if(Bt(Dt,0,Ft,!0,!0))return Dt.dump+`
160
+ `;return""}return t(Nt,"dump2"),qu.dump=Nt,qu}t(Ug,"requireDumper");var Wg;function jg(){if(Wg)return mr;Wg=1;let r=Yg(),e=Ug();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"),mr.Type=yr(),mr.Schema=Nu(),mr.FAILSAFE_SCHEMA=Yu(),mr.JSON_SCHEMA=Vu(),mr.CORE_SCHEMA=Ku(),mr.DEFAULT_SCHEMA=Il(),mr.load=r.load,mr.loadAll=r.loadAll,mr.dump=e.dump,mr.YAMLException=As(),mr.types={binary:Ju(),float:Xu(),map:Hu(),null:Uu(),pairs:ef(),set:rf(),timestamp:Zu(),bool:ju(),int:Gu(),merge:Qu(),omap:tf(),seq:zu(),str:Wu()},mr.safeLoad=i("safeLoad","load"),mr.safeLoadAll=i("safeLoadAll","loadAll"),mr.safeDump=i("safeDump","dump"),mr}t(jg,"requireJsYaml");var t2=jg(),e2=zg(t2),{Type:I3,Schema:$3,FAILSAFE_SCHEMA:D3,JSON_SCHEMA:et,CORE_SCHEMA:P3,DEFAULT_SCHEMA:R3,load:tt,loadAll:q3,dump:N3,YAMLException:W3,types:z3,safeLoad:H3,safeLoadAll:Y3,safeDump:U3}=e2;var za=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:n,gradientStop:c}=s??{},h=r.attr("id"),g=i?.includes("dark")?"#FFFFFF":"#000000",y=t((B,v,q)=>r.append("defs").append("filter").attr("id",B).attr("height",v).attr("width",v).append("feDropShadow").attr("dx",q).attr("dy",q).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",g),"dropShadow");if(y(`${h}-drop-shadow`,"130%","4"),y(`${h}-drop-shadow-small`,"150%","2"),!o)return;let f=r.append("linearGradient").attr("id",`${h}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),f.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Gg=t((r)=>{let{handDrawnSeed:e}=l();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),r2=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Di=t((r)=>{let e=i2([...r.cssCompiledStyles||[],...r.cssStyles||[],...r2(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),i2=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Zr=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"),k=t((r)=>{let{stylesArray:e}=Di(r),i=[],s=[],o=[],n=[];return e.forEach((c)=>{let h=c[0];if(Zr(h))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),h.includes("stroke"))o.push(c.join(":")+" !important");if(h==="fill")n.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),Gt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=l(),{nodeBorder:o,mainBkg:n}=i,{stylesMap:c}=Di(r);return Object.assign({roughness:0.7,fill:c.get("fill")||n,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:o2(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),o2=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 of=(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 h=o.pop(),g=o.pop(),y={provider:o.length>0?o[0]:s,prefix:g,name:h};return e&&!$l(y)?null:y}let n=o[0],c=n.split("-");if(c.length>1){let h={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!$l(h)?null:h}if(i&&s===""){let h={provider:s,prefix:"",name:n};return e&&!$l(h,i)?null:h}return null},$l=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var s2=Object.freeze({left:0,top:0,width:16,height:16}),Ms=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sf=Object.freeze({...s2,...Ms}),Xg=Object.freeze({...sf,body:"",hidden:!1});function Vg(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 af(r,e){let i=Vg(r,e);for(let s in Xg)if(s in Ms){if(s in r&&!(s in i))i[s]=Ms[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Kg(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function n(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let h=s[c]&&s[c].parent,g=h&&n(h);if(g)o[c]=[h].concat(g)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(n),o}function Zg(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),n={};function c(h){n=af(s[h]||o[h],n)}return c(e),i.forEach(c),af(r,n)}function nf(r,e){if(r.icons[e])return Zg(r,e,[]);let i=Kg(r,[e])[e];return i?Zg(r,e,i):null}var a2=Object.freeze({width:null,height:null}),Qg=Object.freeze({...a2,...Ms});var n2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,l2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lf(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(n2);if(s===null||!s.length)return r;let o=[],n=s.shift(),c=l2.test(n);while(!0){if(c){let h=parseFloat(n);if(isNaN(h))o.push(n);else o.push(Math.ceil(h*e*i)/i)}else o.push(n);if(n=s.shift(),n===void 0)return o.join("");c=!c}}function h2(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),n=r.indexOf("</"+e);if(o===-1||n===-1)break;let c=r.indexOf(">",n);if(c===-1)break;i+=r.slice(o+1,n).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function c2(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Jg(r,e,i){let s=h2(r);return c2(s.defs,e+s.content+i)}var u2=(r)=>r==="unset"||r==="undefined"||r==="none";function hf(r,e){let i={...sf,...r},s={...Qg,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},n=i.body;[i,s].forEach((H)=>{let Y=[],{hFlip:j,vFlip:X,rotate:Q}=H;if(j)if(X)Q+=2;else Y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),Y.push("scale(-1 1)"),o.top=o.left=0;else if(X)Y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),Y.push("scale(1 -1)"),o.top=o.left=0;let rt;if(Q<0)Q-=Math.floor(Q/4)*4;switch(Q=Q%4,Q){case 1:rt=o.height/2+o.top,Y.unshift("rotate(90 "+rt.toString()+" "+rt.toString()+")");break;case 2:Y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:rt=o.width/2+o.left,Y.unshift("rotate(-90 "+rt.toString()+" "+rt.toString()+")")}if(Q%2===1){if(o.left!==o.top)rt=o.left,o.left=o.top,o.top=rt;if(o.width!==o.height)rt=o.width,o.width=o.height,o.height=rt}if(Y.length)n=Jg(n,'<g transform="'+Y.join(" ")+'">',"</g>")});let{width:c,height:h}=s,{width:g,height:y}=o,f,B;if(c===null)B=h===null?"1em":h==="auto"?y:h,f=lf(B,g/y);else f=c==="auto"?g:c,B=h===null?lf(f,y/g):h==="auto"?y:h;let v={},q=(H,Y)=>{if(!u2(Y))v[H]=Y.toString()};q("width",f),q("height",B);let W=[o.left,o.top,g,y];return v.viewBox=W.join(" "),{attributes:v,viewBox:W,body:n}}var f2=/\sid="(\S+)"/g,tm=new Map;function d2(r){r=r.replace(/[0-9]+$/,"")||"a";let e=tm.get(r)||0;return tm.set(r,e+1),e?`${r}${e}`:r}function cf(r){let e=[],i;while(i=f2.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 n=d2(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+n+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function uf(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 Gi={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},ff=new Map,em=new Map,Ln=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(a.debug("Registering icon pack:",e.name),"loader"in e)em.set(e.name,e.loader);else if("icons"in e)ff.set(e.name,e.icons);else throw a.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),rm=t(async(r,e)=>{let i=of(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=ff.get(s);if(!o){let c=em.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},ff.set(s,o)}catch(h){throw a.error(h),Error(`Failed to load icon set: ${i.prefix}`)}}let n=nf(o,i.name);if(!n)throw Error(`Icon not found: ${r}`);return n},"getRegisteredIconData"),Dl=t(async(r)=>{try{return await rm(r),!0}catch{return!1}},"isIconAvailable"),nt=t(async(r,e,i)=>{let s;try{s=await rm(r,e?.fallbackPrefix)}catch(c){a.error(c),s=Gi}let o=hf(s,e),n=uf(cf(o.body),{...o.attributes,...i});return O(n,x())},"getIconSVG");var xm=Se(Gn(),1);function is(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],n=i.cache;if(n.has(o))return n.get(o);let c=r.apply(this,s);return i.cache=n.set(o,c)||n,c};return i.cache=new(is.Cache||Map),i}is.Cache=Map;function In(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function cn(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var Ua="[object RegExp]",Ar="[object String]",Rr="[object Number]",Lr="[object Boolean]",Ir="[object Arguments]",ja="[object Symbol]",qa="[object Date]",Va="[object Map]",Wa="[object Set]",Ga="[object Array]";var Ha="[object ArrayBuffer]",Ya="[object Object]";var Za="[object DataView]",Xa="[object Uint8Array]",Ka="[object Uint8ClampedArray]",Qa="[object Uint16Array]",Ja="[object Uint32Array]";var ei="[object Int8Array]",ti="[object Int16Array]",ni="[object Int32Array]";var ri="[object Float32Array]",ai="[object Float64Array]";function Es(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function un(r){return Es(r)}function lm(){}function hm(r){if(In(r))return r;if(Array.isArray(r)||Es(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 Pl(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var df=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Dr(r){return typeof df.Buffer<"u"&&df.Buffer.isBuffer(r)}function cm(r){return r==="__proto__"}function Rl(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 um(r,e){return Os(r,void 0,r,new Map,e)}function Os(r,e,i,s=new Map,o=void 0){let n=o?.(r,e,i,s);if(n!==void 0)return n;if(In(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Os(r[h],h,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[h,g]of r)c.set(h,Os(g,h,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let h of r)c.add(Os(h,void 0,i,s,o));return c}if(Dr(r))return r.subarray();if(Es(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Os(r[h],h,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),yi(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),yi(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),yi(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,yi(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),yi(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),yi(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),yi(c,r,i,s,o),c}if(typeof r==="object"&&B2(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),yi(c,r,i,s,o),c}return r}function yi(r,e,i=r,s,o){let n=[...Object.keys(e),...Pl(e)];for(let c=0;c<n.length;c++){let h=n[c],g=Object.getOwnPropertyDescriptor(r,h);if(g==null||g.writable)r[h]=Os(e[h],h,i,s,o)}}function B2(r){switch(cn(r)){case Ir:case Ga:case Ha:case Za:case Lr:case qa:case ri:case ai:case ei:case ti:case ni:case Va:case Rr:case Ya:case Ua:case Wa:case Ar:case ja:case Xa:case Ka:case Qa:case Ja:return!0;default:return!1}}function fm(r,e){return um(r,(i,s,o,n)=>{let c=e?.(i,s,o,n);if(c!==void 0)return c;if(typeof r!=="object")return;if(cn(r)==="[object Object]"&&typeof r.constructor!=="function"){let h={};return n.set(r,h),yi(h,r,o,n),h}switch(Object.prototype.toString.call(r)){case Rr:case Ar:case Lr:{let h=new r.constructor(r?.valueOf());return yi(h,r),h}case Ir:{let h={};return yi(h,r),h.length=r.length,h[Symbol.iterator]=r[Symbol.iterator],h}default:return}})}function pf(r){return fm(r)}function Xr(r){return r!==null&&typeof r==="object"&&cn(r)==="[object Arguments]"}function La(r){return typeof r==="object"&&r!==null}function dm(r){return Number.isSafeInteger(r)&&r>=0}function ii(r){return r!=null&&typeof r!=="function"&&dm(r.length)}function pm(r){return La(r)&&ii(r)}function gm(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let n=0;n<i.length;n++){let c=i[n];o=ql(o,c,s,new Map)}return o}function ql(r,e,i,s){if(In(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return hm(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let n=0;n<e.length;n++)if(!(n in e))e[n]=void 0}let o=[...Object.keys(e),...Pl(e)];for(let n=0;n<o.length;n++){let c=o[n];if(cm(c))continue;let h=e[c],g=r[c];if(Xr(h))h={...h};if(Xr(g))g={...g};if(Dr(h))h=pf(h);if(Array.isArray(h))if(Array.isArray(g)){let f=[],B=Reflect.ownKeys(g);for(let v=0;v<B.length;v++){let q=B[v];f[q]=g[q]}g=f}else if(pm(g)){let f=[];for(let B=0;B<g.length;B++)f[B]=g[B];g=f}else g=[];let y=i(g,h,c,r,e,s);if(y!==void 0)r[c]=y;else if(Array.isArray(h))r[c]=ql(g,h,i,s);else if(La(g)&&La(h)&&(Rl(g)||Rl(h)||un(g)||un(h)))r[c]=ql(g,h,i,s);else if(g==null&&Rl(h))r[c]=ql({},h,i,s);else if(g==null&&un(h))r[c]=pf(h);else if(g===void 0||h!==void 0)r[c]=h}return r}function gf(r,...e){return gm(r,...e,lm)}var Hi="​",v2={curveBasis:rs,curveBasisClosed:_l,curveBasisOpen:Bl,curveBumpX:Wn,curveBumpY:xa,curveBundle:cu,curveCardinalClosed:uu,curveCardinalOpen:fu,curveCardinal:ba,curveCatmullRomClosed:du,curveCatmullRomOpen:pu,curveCatmullRom:wa,curveLinear:Ii,curveLinearClosed:Al,curveMonotoneX:Sa,curveMonotoneY:Ta,curveNatural:vs,curveStep:Ls,curveStepAfter:va,curveStepBefore:_a},L2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F2=t(function(r,e){let i=Cm(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((h)=>h.args);Js(c),s=oe(s,[...c])}else s=i.args;if(!s)return;let o=xr(r,e),n="config";if(s[n]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[n],delete s[n]}return s},"detectInit"),Cm=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${L2.source})(?=[}][%]{2}).*
161
+ `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),a.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=ms.exec(r))!==null){if(s.index===ms.lastIndex)ms.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let n=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return a.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),_o=t(function(r){return r.replace(ms,"")},"removeDirectives"),A2=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Wl(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return v2[i]??e}t(Wl,"interpolateToCurve");function bm(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return xm.sanitizeUrl(i);return i}t(bm,"formatUrl");var M2=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],n=window;for(let c=0;c<s;c++)if(n=n[i[c]],!n){a.error(`Function name: ${r} not found in window`);return}n[o](...e)},"runFunc");function mf(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(mf,"distance");function km(r){let e,i=0;r.forEach((o)=>{i+=mf(o,e),e=o});let s=i/2;return yf(r,s)}t(km,"traverseEdge");function wm(r){if(r.length===1)return r[0];return km(r)}t(wm,"calcLabelPosition");var mm=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),yf=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let n=mf(o,i);if(n===0)return i;if(n<s)s-=n;else{let c=s/n;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:mm((1-c)*i.x+c*o.x,5),y:mm((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),E2=t((r,e,i)=>{if(a.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=yf(e,25),n=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(c)*n+(e[0].x+o.x)/2,h.y=-Math.cos(c)*n+(e[0].y+o.y)/2,h},"calcCardinalityPosition");function Sm(r,e,i){let s=structuredClone(i);if(a.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,n=yf(s,o),c=10+r*0.5,h=Math.atan2(s[0].y-n.y,s[0].x-n.x),g={x:0,y:0};if(e==="start_left")g.x=Math.sin(h+Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h+Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_right")g.x=Math.sin(h-Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h-Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_left")g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;else g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;return g}t(Sm,"calcTerminalLabelPosition");function oi(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(oi,"getStylesFromArray");var ym=0,Yi=t(()=>(ym++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ym),"generateId");function Tm(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(Tm,"makeRandomHex");var Zi=t((r)=>Tm(r.length),"random"),O2=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"),I2=t(function(r,e){let i=e.text.replace(b.lineBreakRegex," "),[,s]=We(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 n=o.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(i),o},"drawSimpleText"),Dn=is((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),b.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],n="";return s.forEach((c,h)=>{let g=He(`${c} `,i),y=He(n,i);if(g>e){let{hyphenatedStrings:v,remainingWord:q}=$2(c,e,"-",i);o.push(n,...v),n=q}else if(y+g>=e)o.push(n),n=c;else n=[n,c].filter(Boolean).join(" ");if(h+1===s.length)o.push(n)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),$2=is((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],n=[],c="";return o.forEach((h,g)=>{let y=`${c}${h}`;if(He(y,s)>=e){let B=g+1,v=o.length===B,q=`${y}${i}`;n.push(v?y:q),c=""}else c=y}),{hyphenatedStrings:n,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Kr(r,e){return Qr(r,e).height}t(Kr,"calculateTextHeight");function He(r,e){return Qr(r,e).width}t(He,"calculateTextWidth");var Qr=is((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,n]=We(i),c=["sans-serif",s],h=r.split(b.lineBreakRegex),g=[],y=p("body");if(!y.remove)return{width:0,height:0,lineHeight:0};let f=y.append("svg");for(let v of c){let q=0,W={width:0,height:0,lineHeight:0};for(let H of h){let Y=O2();Y.text=H||Hi;let j=I2(f,Y).style("font-size",n).style("font-weight",o).style("font-family",v),X=(j._groups||j)[0][0].getBBox();if(X.width===0&&X.height===0)throw Error("svg element not in render tree");W.width=Math.round(Math.max(W.width,X.width)),q=Math.round(X.height),W.height+=q,W.lineHeight=Math.round(Math.max(W.lineHeight,q))}g.push(W)}f.remove();let B=isNaN(g[1].height)||isNaN(g[1].width)||isNaN(g[1].lineHeight)||g[0].height>g[1].height&&g[0].width>g[1].width&&g[0].lineHeight>g[1].lineHeight?0:1;return g[B]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),D2=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")}},Nl,P2=t(function(r){return Nl=Nl||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Nl.innerHTML=r,unescape(Nl.textContent)},"entityDecode");function si(r){return"str"in r}t(si,"isDetailedError");function Xi(r){if(r instanceof Error)return r.message;return String(r)}t(Xi,"getErrorMessage");var R2=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"),We=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 U(r,e){return gf({},r,e)}t(U,"cleanAndMerge");var M={assignWithDepth:oe,wrapLabel:Dn,calculateTextHeight:Kr,calculateTextWidth:He,calculateTextDimensions:Qr,cleanAndMerge:U,detectInit:F2,detectDirective:Cm,isSubstringInArray:A2,interpolateToCurve:Wl,calcLabelPosition:wm,calcCardinalityPosition:E2,calcTerminalLabelPosition:Sm,formatUrl:bm,getStylesFromArray:oi,generateId:Yi,random:Zi,runFunc:M2,entityDecode:P2,insertTitle:R2,isLabelCoordinateInPath:_m,parseFontSize:We,InitIDGenerator:D2},wo=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"),jt=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),ze=t((r,e,{counter:i=0,prefix:s,suffix:o},n)=>{if(n)return n;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function tr(r){return r??null}t(tr,"handleUndefinedAttr");function _m(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(n)=>Math.round(parseFloat(n)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(_m,"isLabelCoordinateInPath");function Cf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ss=Cf();function Em(r){ss=r}var rn={exec:()=>null};function $e(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,n)=>{let c=typeof n=="string"?n:n.source;return c=c.replace(Or.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var q2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Or={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")},N2=/^(?:[ \t]*(?:\n|$))+/,W2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,z2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,an=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,H2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bf=/(?:[*+-]|\d{1,9}[.)])/,Om=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Im=$e(Om).replace(/bull/g,bf).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(),Y2=$e(Om).replace(/bull/g,bf).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(),kf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,U2=/^[^\n]+/,wf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,j2=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),G2=$e(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bf).getRegex(),jl="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",Sf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,X2=$e("^ {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",Sf).replace("tag",jl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$m=$e(kf).replace("hr",an).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",jl).getRegex(),V2=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$m).getRegex(),Tf={blockquote:V2,code:W2,def:j2,fences:z2,heading:H2,hr:an,html:X2,lheading:Im,list:G2,newline:N2,paragraph:$m,table:rn,text:U2},Bm=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",an).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",jl).getRegex(),K2={...Tf,lheading:Y2,table:Bm,paragraph:$e(kf).replace("hr",an).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bm).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",jl).getRegex()},Z2={...Tf,html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sf).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:rn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(kf).replace("hr",an).replace("heading",` *#{1,6} *[^
162
+ ]`).replace("lheading",Im).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Q2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,J2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dm=/^( {2,}|\\)\n(?!\s*$)/,tw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gl=/[\p{P}\p{S}]/u,_f=/[\s\p{P}\p{S}]/u,Pm=/[^\s\p{P}\p{S}]/u,ew=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_f).getRegex(),Rm=/(?!~)[\p{P}\p{S}]/u,rw=/(?!~)[\s\p{P}\p{S}]/u,iw=/(?:[^\s\p{P}\p{S}]|~)/u,ow=$e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",q2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sw=$e(qm,"u").replace(/punct/g,Gl).getRegex(),aw=$e(qm,"u").replace(/punct/g,Rm).getRegex(),Nm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nw=$e(Nm,"gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),lw=$e(Nm,"gu").replace(/notPunctSpace/g,iw).replace(/punctSpace/g,rw).replace(/punct/g,Rm).getRegex(),hw=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),cw=$e(/\\(punct)/,"gu").replace(/punct/g,Gl).getRegex(),uw=$e(/^<(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(),fw=$e(Sf).replace("(?:-->|$)","-->").getRegex(),dw=$e("^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",fw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Hl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pw=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Hl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wm=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",Hl).replace("ref",wf).getRegex(),zm=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",wf).getRegex(),gw=$e("reflink|nolink(?!\\()","g").replace("reflink",Wm).replace("nolink",zm).getRegex(),vm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Bf={_backpedal:rn,anyPunctuation:cw,autolink:uw,blockSkip:ow,br:Dm,code:J2,del:rn,emStrongLDelim:sw,emStrongRDelimAst:nw,emStrongRDelimUnd:hw,escape:Q2,link:pw,nolink:zm,punctuation:ew,reflink:Wm,reflinkSearch:gw,tag:dw,text:tw,url:rn},mw={...Bf,link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",Hl).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Hl).getRegex()},xf={...Bf,emStrongRDelimAst:lw,emStrongLDelim:aw,url:$e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vm).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:$e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vm).getRegex()},yw={...xf,br:$e(Dm).replace("{2,}","*").getRegex(),text:$e(xf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zl={normal:Tf,gfm:K2,pedantic:Z2},Aa={normal:Bf,gfm:xf,breaks:yw,pedantic:mw},xw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lm=(r)=>xw[r];function Pi(r,e){if(e){if(Or.escapeTest.test(r))return r.replace(Or.escapeReplace,Lm)}else if(Or.escapeTestNoEncode.test(r))return r.replace(Or.escapeReplaceNoEncode,Lm);return r}function Fm(r){try{r=encodeURI(r).replace(Or.percentDecode,"%")}catch{return null}return r}function Am(r,e){let i=r.replace(Or.findPipe,(n,c,h)=>{let g=!1,y=c;for(;--y>=0&&h[y]==="\\";)g=!g;return g?"|":" |"}),s=i.split(Or.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(Or.slashPipe,"|");return s}function Ea(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let n=r.charAt(s-o-1);if(n===e&&!i)o++;else if(n!==e&&i)o++;else break}return r.slice(0,s-o)}function Cw(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 Mm(r,e,i,s,o){let n=e.href,c=e.title||null,h=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let g={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:n,title:c,text:h,tokens:s.inlineTokens(h)};return s.state.inLink=!1,g}function bw(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
163
163
  `).map((n)=>{let c=n.match(i.other.beginningSpace);if(c===null)return n;let[h]=c;return h.length>=o.length?n.slice(o.length):n}).join(`
164
- `)}var Yl=class{options;rules;lexer;constructor(r){this.options=r||Qo}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:wa(i,`
165
- `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=bw(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=wa(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:wa(e[0],`
166
- `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=wa(e[0],`
164
+ `)}var Yl=class{options;rules;lexer;constructor(r){this.options=r||ss}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:Ea(i,`
165
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=bw(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=Ea(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:Ea(e[0],`
166
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=Ea(e[0],`
167
167
  `).split(`
168
168
  `),s="",o="",n=[];for(;i.length>0;){let c=!1,h=[],g;for(g=0;g<i.length;g++)if(this.rules.other.blockquoteStart.test(i[g]))h.push(i[g]),c=!0;else if(!c)h.push(i[g]);else break;i=i.slice(g);let y=h.join(`
169
169
  `),f=y.replace(this.rules.other.blockquoteSetextReplace,`
170
170
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
171
171
  ${y}`:y,o=o?`${o}
172
- ${f}`:f;let b=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,n,!0),this.lexer.state.top=b,i.length===0)break;let F=n.at(-1);if(F?.type==="code")break;if(F?.type==="blockquote"){let N=F,W=N.raw+`
172
+ ${f}`:f;let B=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,n,!0),this.lexer.state.top=B,i.length===0)break;let v=n.at(-1);if(v?.type==="code")break;if(v?.type==="blockquote"){let q=v,W=q.raw+`
173
173
  `+i.join(`
174
- `),H=this.blockquote(W);n[n.length-1]=H,s=s.substring(0,s.length-N.raw.length)+H.raw,o=o.substring(0,o.length-N.text.length)+H.text;break}else if(F?.type==="list"){let N=F,W=N.raw+`
174
+ `),H=this.blockquote(W);n[n.length-1]=H,s=s.substring(0,s.length-q.raw.length)+H.raw,o=o.substring(0,o.length-q.text.length)+H.text;break}else if(v?.type==="list"){let q=v,W=q.raw+`
175
175
  `+i.join(`
176
- `),H=this.list(W);n[n.length-1]=H,s=s.substring(0,s.length-F.raw.length)+H.raw,o=o.substring(0,o.length-N.raw.length)+H.raw,i=W.substring(n.at(-1).raw.length).split(`
177
- `);continue}}return{type:"blockquote",raw:s,tokens:n,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 n=this.rules.other.listItemRegex(i),c=!1;for(;r;){let g=!1,y="",f="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;y=e[0],r=r.substring(y.length);let b=e[2].split(`
178
- `,1)[0].replace(this.rules.other.listReplaceTabs,(j)=>" ".repeat(3*j.length)),F=r.split(`
179
- `,1)[0],N=!b.trim(),W=0;if(this.options.pedantic?(W=2,f=b.trimStart()):N?W=e[1].length+1:(W=e[2].search(this.rules.other.nonSpaceChar),W=W>4?1:W,f=b.slice(W),W+=e[1].length),N&&this.rules.other.blankLine.test(F)&&(y+=F+`
180
- `,r=r.substring(F.length+1),g=!0),!g){let j=this.rules.other.nextBulletRegex(W),K=this.rules.other.hrRegex(W),Q=this.rules.other.fencesBeginRegex(W),rt=this.rules.other.headingBeginRegex(W),it=this.rules.other.htmlBeginRegex(W);for(;r;){let ct=r.split(`
181
- `,1)[0],lt;if(F=ct,this.options.pedantic?(F=F.replace(this.rules.other.listReplaceNesting," "),lt=F):lt=F.replace(this.rules.other.tabCharGlobal," "),Q.test(F)||rt.test(F)||it.test(F)||j.test(F)||K.test(F))break;if(lt.search(this.rules.other.nonSpaceChar)>=W||!F.trim())f+=`
182
- `+lt.slice(W);else{if(N||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Q.test(b)||rt.test(b)||K.test(b))break;f+=`
183
- `+F}!N&&!F.trim()&&(N=!0),y+=ct+`
184
- `,r=r.substring(ct.length+1),b=lt.slice(W)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(c=!0));let H=null,Y;this.options.gfm&&(H=this.rules.other.listIsTask.exec(f),H&&(Y=H[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:y,task:!!H,checked:Y,loose:!1,text:f,tokens:[]}),o.raw+=y}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let g=0;g<o.items.length;g++)if(this.lexer.state.top=!1,o.items[g].tokens=this.lexer.blockTokens(o.items[g].text,[]),!o.loose){let y=o.items[g].tokens.filter((b)=>b.type==="space"),f=y.length>0&&y.some((b)=>this.rules.other.anyLine.test(b.raw));o.loose=f}if(o.loose)for(let g=0;g<o.items.length;g++)o.items[g].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=Am(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
176
+ `),H=this.list(W);n[n.length-1]=H,s=s.substring(0,s.length-v.raw.length)+H.raw,o=o.substring(0,o.length-q.raw.length)+H.raw,i=W.substring(n.at(-1).raw.length).split(`
177
+ `);continue}}return{type:"blockquote",raw:s,tokens:n,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 n=this.rules.other.listItemRegex(i),c=!1;for(;r;){let g=!1,y="",f="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;y=e[0],r=r.substring(y.length);let B=e[2].split(`
178
+ `,1)[0].replace(this.rules.other.listReplaceTabs,(j)=>" ".repeat(3*j.length)),v=r.split(`
179
+ `,1)[0],q=!B.trim(),W=0;if(this.options.pedantic?(W=2,f=B.trimStart()):q?W=e[1].length+1:(W=e[2].search(this.rules.other.nonSpaceChar),W=W>4?1:W,f=B.slice(W),W+=e[1].length),q&&this.rules.other.blankLine.test(v)&&(y+=v+`
180
+ `,r=r.substring(v.length+1),g=!0),!g){let j=this.rules.other.nextBulletRegex(W),X=this.rules.other.hrRegex(W),Q=this.rules.other.fencesBeginRegex(W),rt=this.rules.other.headingBeginRegex(W),it=this.rules.other.htmlBeginRegex(W);for(;r;){let ct=r.split(`
181
+ `,1)[0],lt;if(v=ct,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),lt=v):lt=v.replace(this.rules.other.tabCharGlobal," "),Q.test(v)||rt.test(v)||it.test(v)||j.test(v)||X.test(v))break;if(lt.search(this.rules.other.nonSpaceChar)>=W||!v.trim())f+=`
182
+ `+lt.slice(W);else{if(q||B.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Q.test(B)||rt.test(B)||X.test(B))break;f+=`
183
+ `+v}!q&&!v.trim()&&(q=!0),y+=ct+`
184
+ `,r=r.substring(ct.length+1),B=lt.slice(W)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(c=!0));let H=null,Y;this.options.gfm&&(H=this.rules.other.listIsTask.exec(f),H&&(Y=H[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:y,task:!!H,checked:Y,loose:!1,text:f,tokens:[]}),o.raw+=y}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let g=0;g<o.items.length;g++)if(this.lexer.state.top=!1,o.items[g].tokens=this.lexer.blockTokens(o.items[g].text,[]),!o.loose){let y=o.items[g].tokens.filter((B)=>B.type==="space"),f=y.length>0&&y.some((B)=>this.rules.other.anyLine.test(B.raw));o.loose=f}if(o.loose)for(let g=0;g<o.items.length;g++)o.items[g].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=Am(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
185
  `):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<i.length;c++)n.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:n.align[c]});for(let c of o)n.rows.push(Am(c,n.header.length).map((h,g)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[g]})));return n}}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)===`
186
- `?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 n=wa(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=Cw(e[2],"()");if(n===-2)return;if(n>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],o=n[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)),Mm(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 n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Mm(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,n,c,h=o,g=0,y=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,e=e.slice(-1*r.length+o);(s=y.exec(e))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(c=[...n].length,s[3]||s[4]){h+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){g+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+g);let f=[...s[0]][0].length,b=r.slice(0,o+s.index+f+c);if(Math.min(o,c)%2){let N=b.slice(1,-1);return{type:"em",raw:b,text:N,tokens:this.lexer.inlineTokens(N)}}let F=b.slice(2,-2);return{type:"strong",raw:b,text:F,tokens:this.lexer.inlineTokens(F)}}}}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}}}},gi=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Qo,this.options.tokenizer=this.options.tokenizer||new Yl,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:Mr,block:zl.normal,inline:ka.normal};this.options.pedantic?(i.block=zl.pedantic,i.inline=ka.pedantic):this.options.gfm&&(i.block=zl.gfm,this.options.breaks?i.inline=ka.breaks:i.inline=ka.gfm),this.tokenizer.rules=i}static get rules(){return{block:zl,inline:ka}}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(Mr.carriageReturn,`
187
- `),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(Mr.tabCharGlobal," ").replace(Mr.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.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 c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
186
+ `?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 n=Ea(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=Cw(e[2],"()");if(n===-2)return;if(n>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],o=n[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)),Mm(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 n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Mm(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,n,c,h=o,g=0,y=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,e=e.slice(-1*r.length+o);(s=y.exec(e))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(c=[...n].length,s[3]||s[4]){h+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){g+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+g);let f=[...s[0]][0].length,B=r.slice(0,o+s.index+f+c);if(Math.min(o,c)%2){let q=B.slice(1,-1);return{type:"em",raw:B,text:q,tokens:this.lexer.inlineTokens(q)}}let v=B.slice(2,-2);return{type:"strong",raw:B,text:v,tokens:this.lexer.inlineTokens(v)}}}}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}}}},wi=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ss,this.options.tokenizer=this.options.tokenizer||new Yl,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:Or,block:zl.normal,inline:Aa.normal};this.options.pedantic?(i.block=zl.pedantic,i.inline=Aa.pedantic):this.options.gfm&&(i.block=zl.gfm,this.options.breaks?i.inline=Aa.breaks:i.inline=Aa.gfm),this.tokenizer.rules=i}static get rules(){return{block:zl,inline:Aa}}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(Or.carriageReturn,`
187
+ `),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(Or.tabCharGlobal," ").replace(Or.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.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 c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
188
188
  `:i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
189
189
  `)?"":`
190
190
  `)+o.raw,c.text+=`
@@ -197,16 +197,16 @@ ${f}`:f;let b=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
197
197
  `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o),s=n.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
198
198
  `)?"":`
199
199
  `)+o.raw,c.text+=`
200
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);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 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 g=Object.keys(this.tokens.links);if(g.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)g.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 n;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)n=o[2]?o[2].length:0,s=s.slice(0,o.index+n)+"["+"a".repeat(o[0].length-n-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let c=!1,h="";for(;e;){c||(h=""),c=!1;let g;if(this.options.extensions?.inline?.some((f)=>(g=f.call({lexer:this},e,i))?(e=e.substring(g.raw.length),i.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let f=i.at(-1);g.type==="text"&&f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(g=this.tokenizer.emStrong(e,s,h)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.del(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),i.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),i.push(g);continue}let y=e;if(this.options.extensions?.startInline){let f=1/0,b=e.slice(1),F;this.options.extensions.startInline.forEach((N)=>{F=N.call({lexer:this},b),typeof F=="number"&&F>=0&&(f=Math.min(f,F))}),f<1/0&&f>=0&&(y=e.substring(0,f+1))}if(g=this.tokenizer.inlineText(y)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(h=g.raw.slice(-1)),c=!0;let f=i.at(-1);f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw Error(f)}}return i}},Ul=class{options;parser;constructor(r){this.options=r||Qo}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Mr.notSpaceStart)?.[0],o=r.replace(Mr.endingNewline,"")+`
201
- `;return s?'<pre><code class="language-'+Ai(s)+'">'+(i?o:Ai(o,!0))+`</code></pre>
202
- `:"<pre><code>"+(i?o:Ai(o,!0))+`</code></pre>
200
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);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 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 g=Object.keys(this.tokens.links);if(g.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)g.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 n;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)n=o[2]?o[2].length:0,s=s.slice(0,o.index+n)+"["+"a".repeat(o[0].length-n-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let c=!1,h="";for(;e;){c||(h=""),c=!1;let g;if(this.options.extensions?.inline?.some((f)=>(g=f.call({lexer:this},e,i))?(e=e.substring(g.raw.length),i.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let f=i.at(-1);g.type==="text"&&f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(g=this.tokenizer.emStrong(e,s,h)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.del(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),i.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),i.push(g);continue}let y=e;if(this.options.extensions?.startInline){let f=1/0,B=e.slice(1),v;this.options.extensions.startInline.forEach((q)=>{v=q.call({lexer:this},B),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(y=e.substring(0,f+1))}if(g=this.tokenizer.inlineText(y)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(h=g.raw.slice(-1)),c=!0;let f=i.at(-1);f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw Error(f)}}return i}},Ul=class{options;parser;constructor(r){this.options=r||ss}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Or.notSpaceStart)?.[0],o=r.replace(Or.endingNewline,"")+`
201
+ `;return s?'<pre><code class="language-'+Pi(s)+'">'+(i?o:Pi(o,!0))+`</code></pre>
202
+ `:"<pre><code>"+(i?o:Pi(o,!0))+`</code></pre>
203
203
  `}blockquote({tokens:r}){return`<blockquote>
204
204
  ${this.parser.parse(r)}</blockquote>
205
205
  `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
206
206
  `}hr(r){return`<hr>
207
207
  `}list(r){let{ordered:e,start:i}=r,s="";for(let c=0;c<r.items.length;c++){let h=r.items[c];s+=this.listitem(h)}let o=e?"ol":"ul",n=e&&i!==1?' start="'+i+'"':"";return"<"+o+n+`>
208
208
  `+s+"</"+o+`>
209
- `}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+" "+Ai(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>
209
+ `}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+" "+Pi(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>
210
210
  `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
211
211
  `}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 n=r.rows[o];i="";for(let c=0;c<n.length;c++)i+=this.tablecell(n[c]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
212
212
  <thead>
@@ -215,30 +215,30 @@ ${this.parser.parse(r)}</blockquote>
215
215
  `}tablerow({text:r}){return`<tr>
216
216
  ${r}</tr>
217
217
  `}tablecell(r){let e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
218
- `}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>${Ai(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=Fm(r);if(o===null)return s;r=o;let n='<a href="'+r+'"';return e&&(n+=' title="'+Ai(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Fm(r);if(o===null)return Ai(i);r=o;let n=`<img src="${r}" alt="${i}"`;return e&&(n+=` title="${Ai(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ai(r.text)}},vf=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""}},mi=class r{options;renderer;textRenderer;constructor(e){this.options=e||Qo,this.options.renderer=this.options.renderer||new Ul,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vf}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 n=e[o];if(this.options.extensions?.renderers?.[n.type]){let h=n,g=this.options.extensions.renderers[h.type].call({parser:this},h);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){s+=g||"";continue}}let c=n;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let h=c,g=this.renderer.text(h);for(;o+1<e.length&&e[o+1].type==="text";)h=e[++o],g+=`
219
- `+this.renderer.text(h);i?s+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):s+=g;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){s+=h||"";continue}}let c=n;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}},_a=class{options;block;constructor(r){this.options=r||Qo}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?gi.lex:gi.lexInline}provideParser(){return this.block?mi.parse:mi.parseInline}},kw=class{defaults=Cf();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=mi;Renderer=Ul;TextRenderer=vf;Lexer=gi;Tokenizer=Yl;Hooks=_a;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 n of o.header)i=i.concat(this.walkTokens(n.tokens,e));for(let n of o.rows)for(let c of n)i=i.concat(this.walkTokens(c.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((n)=>{let c=o[n].flat(1/0);i=i.concat(this.walkTokens(c,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 n=e.renderers[o.name];n?e.renderers[o.name]=function(...c){let h=o.renderer.apply(this,c);return h===!1&&(h=n.apply(this,c)),h}: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 n=e[o.level];n?n.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 Ul(this.defaults);for(let n in i.renderer){if(!(n in o))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let c=n,h=i.renderer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Yl(this.defaults);for(let n in i.tokenizer){if(!(n in o))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let c=n,h=i.tokenizer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new _a;for(let n in i.hooks){if(!(n in o))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let c=n,h=i.hooks[c],g=o[c];_a.passThroughHooks.has(n)?o[c]=(y)=>{if(this.defaults.async&&_a.passThroughHooksRespectAsync.has(n))return(async()=>{let b=await h.call(o,y);return g.call(o,b)})();let f=h.call(o,y);return g.call(o,f)}:o[c]=(...y)=>{if(this.defaults.async)return(async()=>{let b=await h.apply(o,y);return b===!1&&(b=await g.apply(o,y)),b})();let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(c){let h=[];return h.push(n.call(this,c)),o&&(h=h.concat(o.call(this,c))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return gi.lex(r,e??this.defaults)}parser(r,e){return mi.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},n=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return n(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 n(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(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 c=o.hooks?await o.hooks.preprocess(e):e,h=await(o.hooks?await o.hooks.provideLexer():r?gi.lex:gi.lexInline)(c,o),g=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(g,o.walkTokens));let y=await(o.hooks?await o.hooks.provideParser():r?mi.parse:mi.parseInline)(g,o);return o.hooks?await o.hooks.postprocess(y):y})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?gi.lex:gi.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=(o.hooks?o.hooks.provideParser():r?mi.parse:mi.parseInline)(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return n(c)}}}onError(r,e){return(i)=>{if(i.message+=`
220
- Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Ai(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Zo=new kw;function Pe(r,e){return Zo.parse(r,e)}Pe.options=Pe.setOptions=function(r){return Zo.setOptions(r),Pe.defaults=Zo.defaults,Em(Pe.defaults),Pe};Pe.getDefaults=Cf;Pe.defaults=Qo;Pe.use=function(...r){return Zo.use(...r),Pe.defaults=Zo.defaults,Em(Pe.defaults),Pe};Pe.walkTokens=function(r,e){return Zo.walkTokens(r,e)};Pe.parseInline=Zo.parseInline;Pe.Parser=mi;Pe.parser=mi.parse;Pe.Renderer=Ul;Pe.TextRenderer=vf;Pe.Lexer=gi;Pe.lexer=gi.lex;Pe.Tokenizer=Yl;Pe.Hooks=_a;Pe.parse=Pe;var{options:jH,setOptions:GH,use:XH,walkTokens:VH,parseInline:KH}=Pe;var ZH=mi.parse,QH=gi.lex;function ti(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(h,g){var y=g.match(/\n([\t ]+|(?!\s).)/g);if(y)return h.concat(y.map(function(f){var b,F;return(F=(b=f.match(/[\t ]/g))===null||b===void 0?void 0:b.length)!==null&&F!==void 0?F:0}));return h},[]);if(o.length){var n=new RegExp(`
218
+ `}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>${Pi(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=Fm(r);if(o===null)return s;r=o;let n='<a href="'+r+'"';return e&&(n+=' title="'+Pi(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Fm(r);if(o===null)return Pi(i);r=o;let n=`<img src="${r}" alt="${i}"`;return e&&(n+=` title="${Pi(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Pi(r.text)}},vf=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""}},Si=class r{options;renderer;textRenderer;constructor(e){this.options=e||ss,this.options.renderer=this.options.renderer||new Ul,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vf}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 n=e[o];if(this.options.extensions?.renderers?.[n.type]){let h=n,g=this.options.extensions.renderers[h.type].call({parser:this},h);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){s+=g||"";continue}}let c=n;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let h=c,g=this.renderer.text(h);for(;o+1<e.length&&e[o+1].type==="text";)h=e[++o],g+=`
219
+ `+this.renderer.text(h);i?s+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):s+=g;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){s+=h||"";continue}}let c=n;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}},Ra=class{options;block;constructor(r){this.options=r||ss}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?wi.lex:wi.lexInline}provideParser(){return this.block?Si.parse:Si.parseInline}},kw=class{defaults=Cf();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Si;Renderer=Ul;TextRenderer=vf;Lexer=wi;Tokenizer=Yl;Hooks=Ra;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 n of o.header)i=i.concat(this.walkTokens(n.tokens,e));for(let n of o.rows)for(let c of n)i=i.concat(this.walkTokens(c.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((n)=>{let c=o[n].flat(1/0);i=i.concat(this.walkTokens(c,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 n=e.renderers[o.name];n?e.renderers[o.name]=function(...c){let h=o.renderer.apply(this,c);return h===!1&&(h=n.apply(this,c)),h}: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 n=e[o.level];n?n.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 Ul(this.defaults);for(let n in i.renderer){if(!(n in o))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let c=n,h=i.renderer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Yl(this.defaults);for(let n in i.tokenizer){if(!(n in o))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let c=n,h=i.tokenizer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ra;for(let n in i.hooks){if(!(n in o))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let c=n,h=i.hooks[c],g=o[c];Ra.passThroughHooks.has(n)?o[c]=(y)=>{if(this.defaults.async&&Ra.passThroughHooksRespectAsync.has(n))return(async()=>{let B=await h.call(o,y);return g.call(o,B)})();let f=h.call(o,y);return g.call(o,f)}:o[c]=(...y)=>{if(this.defaults.async)return(async()=>{let B=await h.apply(o,y);return B===!1&&(B=await g.apply(o,y)),B})();let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(c){let h=[];return h.push(n.call(this,c)),o&&(h=h.concat(o.call(this,c))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return wi.lex(r,e??this.defaults)}parser(r,e){return Si.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},n=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return n(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 n(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(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 c=o.hooks?await o.hooks.preprocess(e):e,h=await(o.hooks?await o.hooks.provideLexer():r?wi.lex:wi.lexInline)(c,o),g=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(g,o.walkTokens));let y=await(o.hooks?await o.hooks.provideParser():r?Si.parse:Si.parseInline)(g,o);return o.hooks?await o.hooks.postprocess(y):y})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?wi.lex:wi.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=(o.hooks?o.hooks.provideParser():r?Si.parse:Si.parseInline)(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return n(c)}}}onError(r,e){return(i)=>{if(i.message+=`
220
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Pi(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},os=new kw;function Ue(r,e){return os.parse(r,e)}Ue.options=Ue.setOptions=function(r){return os.setOptions(r),Ue.defaults=os.defaults,Em(Ue.defaults),Ue};Ue.getDefaults=Cf;Ue.defaults=ss;Ue.use=function(...r){return os.use(...r),Ue.defaults=os.defaults,Em(Ue.defaults),Ue};Ue.walkTokens=function(r,e){return os.walkTokens(r,e)};Ue.parseInline=os.parseInline;Ue.Parser=Si;Ue.parser=Si.parse;Ue.Renderer=Ul;Ue.TextRenderer=vf;Ue.Lexer=wi;Ue.lexer=wi.lex;Ue.Tokenizer=Yl;Ue.Hooks=Ra;Ue.parse=Ue;var{options:jH,setOptions:GH,use:XH,walkTokens:VH,parseInline:KH}=Ue;var ZH=Si.parse,QH=wi.lex;function li(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(h,g){var y=g.match(/\n([\t ]+|(?!\s).)/g);if(y)return h.concat(y.map(function(f){var B,v;return(v=(B=f.match(/[\t ]/g))===null||B===void 0?void 0:B.length)!==null&&v!==void 0?v:0}));return h},[]);if(o.length){var n=new RegExp(`
221
221
  [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");s=s.map(function(h){return h.replace(n,`
222
- `)})}s[0]=s[0].replace(/^\r?\n/,"");var c=s[0];return e.forEach(function(h,g){var y=c.match(/(?:^|\n)( *)$/),f=y?y[1]:"",b=h;if(typeof h==="string"&&h.includes(`
223
- `))b=String(h).split(`
224
- `).map(function(F,N){return N===0?F:"".concat(f).concat(F)}).join(`
225
- `);c+=b+s[g+1]}),c}var Ff=typeof performance<"u"&&typeof performance.now==="function",vs=t(()=>Ff?performance.now():0,"now"),Lf="\uD83E\uDDDC ",ww="Mermaid render",Sw="Mermaid",Tw={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},u9=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=vs();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(vs()-i)}}async tick(r,e){if(!this.enabled)return e();let i=vs();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(vs()-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:vs(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),Ff&&typeof performance.mark==="function")try{performance.mark(`${Lf}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=vs();if(r.duration=e-r.start,Ff&&typeof performance.measure==="function")try{performance.measure(`${Lf}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:ww,trackGroup:Sw,color:Tw[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"],n=t((h,g)=>{let y=" ".repeat(g),f=h.duration.toFixed(1).padStart(8),b=i>0?`${(h.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${f} ${b} ${y}${h.name}`);for(let F of h.children)n(F,g+1);if(h.children.length>0){let F=h.children.reduce((W,H)=>W+H.duration,0),N=h.duration-F;if(N>0.5){let W=N.toFixed(1).padStart(8);o.push(`${W} ${y} (self)`)}}},"walk");n(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let h of c)o.push(`${this.buckets[h].toFixed(1).padStart(8)} ${h}`)}console.log(`${Lf}mermaid render profile · ${s}
222
+ `)})}s[0]=s[0].replace(/^\r?\n/,"");var c=s[0];return e.forEach(function(h,g){var y=c.match(/(?:^|\n)( *)$/),f=y?y[1]:"",B=h;if(typeof h==="string"&&h.includes(`
223
+ `))B=String(h).split(`
224
+ `).map(function(v,q){return q===0?v:"".concat(f).concat(v)}).join(`
225
+ `);c+=B+s[g+1]}),c}var Ff=typeof performance<"u"&&typeof performance.now==="function",Is=t(()=>Ff?performance.now():0,"now"),Lf="\uD83E\uDDDC ",ww="Mermaid render",Sw="Mermaid",Tw={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},u9=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=Is();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(Is()-i)}}async tick(r,e){if(!this.enabled)return e();let i=Is();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(Is()-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:Is(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),Ff&&typeof performance.mark==="function")try{performance.mark(`${Lf}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=Is();if(r.duration=e-r.start,Ff&&typeof performance.measure==="function")try{performance.measure(`${Lf}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:ww,trackGroup:Sw,color:Tw[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"],n=t((h,g)=>{let y=" ".repeat(g),f=h.duration.toFixed(1).padStart(8),B=i>0?`${(h.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${f} ${B} ${y}${h.name}`);for(let v of h.children)n(v,g+1);if(h.children.length>0){let v=h.children.reduce((W,H)=>W+H.duration,0),q=h.duration-v;if(q>0.5){let W=q.toFixed(1).padStart(8);o.push(`${W} ${y} (self)`)}}},"walk");n(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let h of c)o.push(`${this.buckets[h].toFixed(1).padStart(8)} ${h}`)}console.log(`${Lf}mermaid render profile · ${s}
226
226
  ${o.join(`
227
227
  `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Ym(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
228
228
  `).replace(/\n{2,}/g,`
229
- `);return ti(s)}t(Ym,"preprocessMarkdown");function Um(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Um,"nonMarkdownToLines");function ni(r,e={}){let i=Ym(r,e),s=Pe.lexer(i),o=[[]],n=0;function c(h,g="normal"){if(h.type==="text")h.text.split(`
230
- `).forEach((f,b)=>{if(b!==0)n++,o.push([]);f.split(" ").forEach((F)=>{if(F=F.replace(/&#39;/g,"'"),F)o[n].push({content:F,type:g})})});else if(h.type==="strong"||h.type==="em")h.tokens.forEach((y)=>{c(y,h.type)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"})}return t(c,"processNode"),s.forEach((h)=>{if(h.type==="paragraph")h.tokens?.forEach((g)=>{c(g)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"});else o[n].push({content:h.raw,type:"normal"})}),o}t(ni,"markdownToLines");function jm(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(jm,"nonMarkdownToHTML");function Gm(r,{markdownAutoWrap:e}={}){let i=Pe.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 a.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Gm,"markdownToHTML");var _w=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(y){return setTimeout(y,16)};function s(){var y=this;y.reads=[],y.writes=[],y.raf=i.bind(r),e("initialized",y)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(y){e("run tasks");var f;while(f=y.shift())f()},"runTasks"),measure:t(function(y,f){e("measure");var b=!f?y:y.bind(f);return this.reads.push(b),o(this),b},"measure"),mutate:t(function(y,f){e("mutate");var b=!f?y:y.bind(f);return this.writes.push(b),o(this),b},"mutate"),clear:t(function(y){return e("clear",y),c(this.reads,y)||c(this.writes,y)},"clear"),extend:t(function(y){if(e("extend",y),typeof y!="object")throw Error("expected object");var f=Object.create(this);if(h(f,y),f.fastdom=this,f.initialize)f.initialize();return f},"extend"),catch:null};function o(y){if(!y.scheduled)y.scheduled=!0,y.raf(n.bind(null,y)),e("flush scheduled")}t(o,"scheduleFlush");function n(y){e("flush");var{writes:f,reads:b}=y,F;try{e("flushing reads",b.length),y.runTasks(b),e("flushing writes",f.length),y.runTasks(f)}catch(N){F=N}if(y.scheduled=!1,b.length||f.length)o(y);if(F)if(e("task errored",F.message),y.catch)y.catch(F);else throw F}t(n,"flush");function c(y,f){var b=y.indexOf(f);return!!~b&&!!y.splice(b,1)}t(c,"remove");function h(y,f){for(var b in f)if(f.hasOwnProperty(b))y[b]=f[b]}t(h,"mixin");var g=r.fastdom=r.fastdom||new s;return g}(typeof window<"u"?window:globalThis),Xm={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Af(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Af(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 Af(r,e,i,s){var{_tasks:o,fastdom:n}=r,c,h=new Promise(function(g,y){c=n[e](function(){o.delete(h);try{g(s?i.call(s):i())}catch(f){y(f)}},s)});return o.set(h,c),h}t(Af,"create");var{initialize:p9,mutate:g9,measure:m9,clear:y9}=Xm,Bw=Xm,vw=_w.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Bw),_o=vw;function Vm(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Vm,"splitTextToChars");function Km(r,e){let i=Vm(e.content);return Of(r,[],i,e.type)}t(Km,"splitWordToFitWidth");function Of(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...n]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Of(r,c,n,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Of,"splitWordToFitWidthRecursion");function Zm(r,e){if(r.some(({content:i})=>i.includes(`
231
- `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Xl(r,e)}t(Zm,"splitLineToFitWidth");function Xl(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 n=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(n),e(c))return Xl(r,e,i,c);if(s.length>0)i.push(s),r.unshift(n);else if(n.content){let[h,g]=Km(e,n);if(i.push([h]),g.content)r.unshift(g)}return Xl(r,e,i)}t(Xl,"splitLineToFitWidthRecursion");function Mf(r,e){if(e)r.attr("style",e)}t(Mf,"applyStyle");var Hm=16384;async function Qm(r,e,i,s,o=!1,n=x(),c=0){let h=r.append("foreignObject");h.attr("width",`${Math.min(10*i,Hm)}px`),h.attr("height",`${Math.min(10*i,Hm)}px`);let g=h.append("xhtml:div"),y=he(e.label)?await wr(e.label.replace(v.lineBreakRegex,`
232
- `),n):O(e.label,n),f=e.isNode?"nodeLabel":"edgeLabel",b=g.append("span");if(b.html(y),Mf(b,e.labelStyle),b.attr("class",`${f} ${s}`),Mf(g,e.labelStyle),g.style("display","table-cell"),g.style("white-space","nowrap"),g.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)g.style("max-width",i+"px"),g.style("text-align","center");if(g.attr("xmlns","http://www.w3.org/1999/xhtml"),o)g.attr("class","labelBkg");let F=await _o.measure(()=>g.node().getBoundingClientRect());if(F.width===i)g.style("display","table"),g.style("white-space","break-spaces"),g.style("width",i+"px");else if(F.width<c)g.style("display","table"),g.style("width",c+"px"),g.style("text-align","center");return h.node()}t(Qm,"addHtmlSpan");function Vl(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(Vl,"createTspan");function Jm(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,i);let n=o.node().getComputedTextLength();return s.remove(),n}t(Jm,"computeWidthOfText");function Vi(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,[{content:i,type:"normal"}]);let n=o.node()?.getBoundingClientRect();if(n)s.remove();return n}t(Vi,"computeDimensionOfText");function ty(r,e,i,s=!1,o=!1){let c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),g=c.append("text").attr("y","-10.1");if(o)g.attr("text-anchor","middle");let y=0;for(let f of i){let b=t((N)=>Jm(c,1.1,N)<=r,"checkWidth"),F=b(f)?[f]:Zm(f,b);for(let N of F){let W=Vl(g,y,1.1,o);Kl(W,N),y++}}if(s){let f=g.node().getBBox(),b=2;return h.attr("x",f.x-2).attr("y",f.y-2).attr("width",f.width+4).attr("height",f.height+4),c.node()}else return g.node()}t(ty,"createFormattedText");function Ef(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(Ef,"decodeHTMLEntities");function Kl(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(Ef(i.content));else o.text(" "+Ef(i.content))})}t(Kl,"updateTextContentAndStyles");async function ey(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,n,c)=>(i.push((async()=>{let h=`${n}:${c}`;if(await Dl(h))return await nt(h,void 0,{class:"label-icon"});else return`<i class='${O(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ey,"replaceIconSubstring");var Le=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:n=!0,markdown:c=!0,isNode:h=!0,width:g=200,minWidth:y=0,addSvgBackground:f=!1}={},b)=>{if(a.debug("XYZ createText",e,i,s,o,n,h,"addSvgBackground: ",f),n){let F=c?Gm(e,b):jm(e),N=await ey(jt(F),b),W=e.replace(/\\\\/g,"\\"),H={isNode:h,label:he(e)?W:N,labelStyle:i.replace("fill:","color:")};return await Qm(r,H,g,o,f,b,y)}else{let F=jt(e.replace(/<br\s*\/?>/g,"<br/>")),N=c?ni(F.replace("<br>","<br/>"),b):Um(F),W=ty(g,r,N,e?f:!1,!h);if(h){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).attr("style",H)}else{let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");p(W).select("rect").attr("style",H.replace(/background:/g,"fill:"));let Y=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).select("text").attr("style",Y)}if(s)p(W).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else p(W).selectAll("tspan.text-outer-tspan").classed("row",!0);return W}},"createText");var Xr=new Set(["redux-color","redux-dark-color"]),Lw=12,Fw=64,pe=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),se=t((r,e)=>r!=null&&Xr.has(r)&&pe(e),"isColorTheme"),Aw=/^[\w-]+$/,le=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Aw.test(e)?e:"classic"},"safeLook"),gt=t((r)=>pe(r)?r.length:0,"paletteSlotCount"),Ye=t((r,e)=>{if(pe(e))return gt(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Fw?r:Lw},"colorSlotCount"),Ze=t((r,e,i,s)=>{if(e===void 0||!se(i,s))return;let o=e%gt(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function If(r,e,i){if(r&&r.length){let[s,o]=e,n=Math.PI/180*i,c=Math.cos(n),h=Math.sin(n);for(let g of r){let[y,f]=g;g[0]=(y-s)*c-(f-o)*h+s,g[1]=(y-s)*h+(f-o)*c+o}}}function Mw(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ew(r,e,i,s=1){let o=i,n=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,h=[0,0];if(o)for(let y of c)If(y,h,o);let g=function(y,f,b){let F=[];for(let K of y){let Q=[...K];Mw(Q[0],Q[Q.length-1])||Q.push([Q[0][0],Q[0][1]]),Q.length>2&&F.push(Q)}let N=[];f=Math.max(f,0.1);let W=[];for(let K of F)for(let Q=0;Q<K.length-1;Q++){let rt=K[Q],it=K[Q+1];if(rt[1]!==it[1]){let ct=Math.min(rt[1],it[1]);W.push({ymin:ct,ymax:Math.max(rt[1],it[1]),x:ct===rt[1]?rt[0]:it[0],islope:(it[0]-rt[0])/(it[1]-rt[1])})}}if(W.sort((K,Q)=>K.ymin<Q.ymin?-1:K.ymin>Q.ymin?1:K.x<Q.x?-1:K.x>Q.x?1:K.ymax===Q.ymax?0:(K.ymax-Q.ymax)/Math.abs(K.ymax-Q.ymax)),!W.length)return N;let H=[],Y=W[0].ymin,j=0;for(;H.length||W.length;){if(W.length){let K=-1;for(let Q=0;Q<W.length&&!(W[Q].ymin>Y);Q++)K=Q;W.splice(0,K+1).forEach((Q)=>{H.push({s:Y,edge:Q})})}if(H=H.filter((K)=>!(K.edge.ymax<=Y)),H.sort((K,Q)=>K.edge.x===Q.edge.x?0:(K.edge.x-Q.edge.x)/Math.abs(K.edge.x-Q.edge.x)),(b!==1||j%f==0)&&H.length>1)for(let K=0;K<H.length;K+=2){let Q=K+1;if(Q>=H.length)break;let rt=H[K].edge,it=H[Q].edge;N.push([[Math.round(rt.x),Y],[Math.round(it.x),Y]])}Y+=b,H.forEach((K)=>{K.edge.x=K.edge.x+b*K.edge.islope}),j++}return N}(c,n,s);if(o){for(let y of c)If(y,h,-o);(function(y,f,b){let F=[];y.forEach((N)=>F.push(...N)),If(F,f,b)})(g,h,-o)}return g}function fn(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 n=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(n=o),Ew(r,o,s,n||1)}class sh{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=fn(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 ah(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 cy extends sh{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=fn(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,n=[],c=0.5*i*Math.cos(o),h=0.5*i*Math.sin(o);for(let[g,y]of s)ah([g,y])&&n.push([[g[0]-c,g[1]+h],[...y]],[[g[0]+c,g[1]-h],[...y]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class uy extends sh{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 fy{constructor(r){this.helper=r}fillPolygons(r,e){let i=fn(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 n=s/4;for(let c of r){let h=ah(c),g=h/s,y=Math.ceil(g)-1,f=h-y*s,b=(c[0][0]+c[1][0])/2-s/4,F=Math.min(c[0][1],c[1][1]);for(let N=0;N<y;N++){let W=F+f+N*s,H=b-n+2*Math.random()*n,Y=W-n+2*Math.random()*n,j=this.helper.ellipse(H,Y,o,o,e);i.push(...j.ops)}}return{type:"fillSketch",ops:i}}}class dy{constructor(r){this.helper=r}fillPolygons(r,e){let i=fn(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((n)=>{let c=ah(n),h=Math.floor(c/(i+s)),g=(c+s-h*(i+s))/2,y=n[0],f=n[1];y[0]>f[0]&&(y=n[1],f=n[0]);let b=Math.atan((f[1]-y[1])/(f[0]-y[0]));for(let F=0;F<h;F++){let N=F*(i+s),W=N+i,H=[y[0]+N*Math.cos(b)+g*Math.cos(b),y[1]+N*Math.sin(b)+g*Math.sin(b)],Y=[y[0]+W*Math.cos(b)+g*Math.cos(b),y[1]+W*Math.sin(b)+g*Math.sin(b)];o.push(...this.helper.doubleLineOps(H[0],H[1],Y[0],Y[1],e))}}),o}}class py{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=fn(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 n=ah(o),c=Math.round(n/(2*e)),h=o[0],g=o[1];h[0]>g[0]&&(h=o[1],g=o[0]);let y=Math.atan((g[1]-h[1])/(g[0]-h[0]));for(let f=0;f<c;f++){let b=2*f*e,F=2*(f+1)*e,N=Math.sqrt(2*Math.pow(e,2)),W=[h[0]+b*Math.cos(y),h[1]+b*Math.sin(y)],H=[h[0]+F*Math.cos(y),h[1]+F*Math.sin(y)],Y=[W[0]+N*Math.cos(y+Math.PI/4),W[1]+N*Math.sin(y+Math.PI/4)];s.push(...this.helper.doubleLineOps(W[0],W[1],Y[0],Y[1],i),...this.helper.doubleLineOps(Y[0],Y[1],H[0],H[1],i))}}),s}}var Qr={};class gy{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ow=0,$f=1,ry=2,Zl={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 Df(r,e){return r.type===e}function zf(r){let e=[],i=function(c){let h=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:Ow,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:$f,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:ry,text:""},h}(r),s="BOD",o=0,n=i[o];for(;!Df(n,ry);){let c=0,h=[];if(s==="BOD"){if(n.text!=="M"&&n.text!=="m")return zf("M0,0"+r);o++,c=Zl[n.text],s=n.text}else Df(n,$f)?c=Zl[s]:(o++,c=Zl[n.text],s=n.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let g=o;g<o+c;g++){let y=i[g];if(!Df(y,$f))throw Error("Param not a number: "+s+","+y.text);h[h.length]=+y.text}if(typeof Zl[s]!="number")throw Error("Bad segment: "+s);{let g={key:s,data:h};e.push(g),o+=c,n=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function my(r){let e=0,i=0,s=0,o=0,n=[];for(let{key:c,data:h}of r)switch(c){case"M":n.push({key:"M",data:[...h]}),[e,i]=h,[s,o]=h;break;case"m":e+=h[0],i+=h[1],n.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":n.push({key:"L",data:[...h]}),[e,i]=h;break;case"l":e+=h[0],i+=h[1],n.push({key:"L",data:[e,i]});break;case"C":n.push({key:"C",data:[...h]}),e=h[4],i=h[5];break;case"c":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"C",data:g}),e=g[4],i=g[5];break}case"Q":n.push({key:"Q",data:[...h]}),e=h[2],i=h[3];break;case"q":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"Q",data:g}),e=g[2],i=g[3];break}case"A":n.push({key:"A",data:[...h]}),e=h[5],i=h[6];break;case"a":e+=h[5],i+=h[6],n.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,i]});break;case"H":n.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],n.push({key:"V",data:[i]});break;case"S":n.push({key:"S",data:[...h]}),e=h[2],i=h[3];break;case"s":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"S",data:g}),e=g[2],i=g[3];break}case"T":n.push({key:"T",data:[...h]}),e=h[0],i=h[1];break;case"t":e+=h[0],i+=h[1],n.push({key:"T",data:[e,i]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=s,i=o}return n}function yy(r){let e=[],i="",s=0,o=0,n=0,c=0,h=0,g=0;for(let{key:y,data:f}of r){switch(y){case"M":e.push({key:"M",data:[...f]}),[s,o]=f,[n,c]=f;break;case"C":e.push({key:"C",data:[...f]}),s=f[4],o=f[5],h=f[2],g=f[3];break;case"L":e.push({key:"L",data:[...f]}),[s,o]=f;break;case"H":s=f[0],e.push({key:"L",data:[s,o]});break;case"V":o=f[0],e.push({key:"L",data:[s,o]});break;case"S":{let b=0,F=0;i==="C"||i==="S"?(b=s+(s-h),F=o+(o-g)):(b=s,F=o),e.push({key:"C",data:[b,F,...f]}),h=f[0],g=f[1],s=f[2],o=f[3];break}case"T":{let[b,F]=f,N=0,W=0;i==="Q"||i==="T"?(N=s+(s-h),W=o+(o-g)):(N=s,W=o);let H=s+2*(N-s)/3,Y=o+2*(W-o)/3,j=b+2*(N-b)/3,K=F+2*(W-F)/3;e.push({key:"C",data:[H,Y,j,K,b,F]}),h=N,g=W,s=b,o=F;break}case"Q":{let[b,F,N,W]=f,H=s+2*(b-s)/3,Y=o+2*(F-o)/3,j=N+2*(b-N)/3,K=W+2*(F-W)/3;e.push({key:"C",data:[H,Y,j,K,N,W]}),h=b,g=F,s=N,o=W;break}case"A":{let b=Math.abs(f[0]),F=Math.abs(f[1]),N=f[2],W=f[3],H=f[4],Y=f[5],j=f[6];if(b===0||F===0)e.push({key:"C",data:[s,o,Y,j,Y,j]}),s=Y,o=j;else if(s!==Y||o!==j)xy(s,o,Y,j,b,F,N,W,H).forEach(function(K){e.push({key:"C",data:K})}),s=Y,o=j;break}case"Z":e.push({key:"Z",data:[]}),s=n,o=c}i=y}return e}function on(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function xy(r,e,i,s,o,n,c,h,g,y){let f=(b=c,Math.PI*b/180);var b;let F=[],N=0,W=0,H=0,Y=0;if(y)[N,W,H,Y]=y;else{[r,e]=on(r,e,-f),[i,s]=on(i,s,-f);let st=(r-i)/2,at=(e-s)/2,xt=st*st/(o*o)+at*at/(n*n);xt>1&&(xt=Math.sqrt(xt),o*=xt,n*=xt);let ot=o*o,St=n*n,Lt=ot*St-ot*at*at-St*st*st,Yt=ot*at*at+St*st*st,Ht=(h===g?-1:1)*Math.sqrt(Math.abs(Lt/Yt));H=Ht*o*at/n+(r+i)/2,Y=Ht*-n*st/o+(e+s)/2,N=Math.asin(parseFloat(((e-Y)/n).toFixed(9))),W=Math.asin(parseFloat(((s-Y)/n).toFixed(9))),r<H&&(N=Math.PI-N),i<H&&(W=Math.PI-W),N<0&&(N=2*Math.PI+N),W<0&&(W=2*Math.PI+W),g&&N>W&&(N-=2*Math.PI),!g&&W>N&&(W-=2*Math.PI)}let j=W-N;if(Math.abs(j)>120*Math.PI/180){let st=W,at=i,xt=s;W=g&&W>N?N+120*Math.PI/180*1:N+120*Math.PI/180*-1,F=xy(i=H+o*Math.cos(W),s=Y+n*Math.sin(W),at,xt,o,n,c,0,g,[W,st,H,Y])}j=W-N;let K=Math.cos(N),Q=Math.sin(N),rt=Math.cos(W),it=Math.sin(W),ct=Math.tan(j/4),lt=1.3333333333333333*o*ct,pt=1.3333333333333333*n*ct,bt=[r,e],vt=[r+lt*Q,e-pt*K],wt=[i+lt*it,s-pt*rt],kt=[i,s];if(vt[0]=2*bt[0]-vt[0],vt[1]=2*bt[1]-vt[1],y)return[vt,wt,kt].concat(F);{F=[vt,wt,kt].concat(F);let st=[];for(let at=0;at<F.length;at+=3){let xt=on(F[at][0],F[at][1],f),ot=on(F[at+1][0],F[at+1][1],f),St=on(F[at+2][0],F[at+2][1],f);st.push([xt[0],xt[1],ot[0],ot[1],St[0],St[1]])}return st}}var Iw={randOffset:function(r,e){return fe(r,e)},randOffsetWithRange:function(r,e,i){return rh(r,e,i)},ellipse:function(r,e,i,s,o){let n=by(i,s,o);return qf(r,e,o,n).opset},doubleLineOps:function(r,e,i,s,o){return zo(r,e,i,s,o,!0)}};function Cy(r,e,i,s,o){return{type:"path",ops:zo(r,e,i,s,o)}}function th(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let n=0;n<s-1;n++)o.push(...zo(r[n][0],r[n][1],r[n+1][0],r[n+1][1],i));return e&&o.push(...zo(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Cy(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function $w(r,e,i,s,o){return function(n,c){return th(n,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function iy(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Ql(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Ql(i[0],1.5*(1+0.22*e.roughness),ay(e));for(let n=1;n<i.length;n++){let c=i[n];if(c.length){let h=Ql(c,1*(1+0.2*e.roughness),e),g=e.disableMultiStroke?[]:Ql(c,1.5*(1+0.22*e.roughness),ay(e));for(let y of h)y.op!=="move"&&s.push(y);for(let y of g)y.op!=="move"&&o.push(y)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function by(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)),n=2*Math.PI/o,c=Math.abs(r/2),h=Math.abs(e/2),g=1-i.curveFitting;return c+=fe(c*g,i),h+=fe(h*g,i),{increment:n,rx:c,ry:h}}function qf(r,e,i,s){let[o,n]=ny(s.increment,r,e,s.rx,s.ry,1,s.increment*rh(0.1,rh(0.4,1,i),i),i),c=ih(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[h]=ny(s.increment,r,e,s.rx,s.ry,1.5,0,i),g=ih(h,null,i);c=c.concat(g)}return{estimatedPoints:n,opset:{type:"path",ops:c}}}function oy(r,e,i,s,o,n,c,h,g){let y=r,f=e,b=Math.abs(i/2),F=Math.abs(s/2);b+=fe(0.01*b,g),F+=fe(0.01*F,g);let N=o,W=n;for(;N<0;)N+=2*Math.PI,W+=2*Math.PI;W-N>2*Math.PI&&(N=0,W=2*Math.PI);let H=2*Math.PI/g.curveStepCount,Y=Math.min(H/2,(W-N)/2),j=ly(Y,y,f,b,F,N,W,1,g);if(!g.disableMultiStroke){let K=ly(Y,y,f,b,F,N,W,1.5,g);j.push(...K)}return c&&(h?j.push(...zo(y,f,y+b*Math.cos(N),f+F*Math.sin(N),g),...zo(y,f,y+b*Math.cos(W),f+F*Math.sin(W),g)):j.push({op:"lineTo",data:[y,f]},{op:"lineTo",data:[y+b*Math.cos(N),f+F*Math.sin(N)]})),{type:"path",ops:j}}function sy(r,e){let i=yy(my(zf(r))),s=[],o=[0,0],n=[0,0];for(let{key:c,data:h}of i)switch(c){case"M":n=[h[0],h[1]],o=[h[0],h[1]];break;case"L":s.push(...zo(n[0],n[1],h[0],h[1],e)),n=[h[0],h[1]];break;case"C":{let[g,y,f,b,F,N]=h;s.push(...Dw(g,y,f,b,F,N,n,e)),n=[F,N];break}case"Z":s.push(...zo(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:s}}function Pf(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,n=s.length;if(n>2){i.push({op:"move",data:[s[0][0]+fe(o,e),s[0][1]+fe(o,e)]});for(let c=1;c<n;c++)i.push({op:"lineTo",data:[s[c][0]+fe(o,e),s[c][1]+fe(o,e)]})}}return{type:"fillPath",ops:i}}function Ls(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Qr[o])switch(o){case"zigzag":Qr[o]||(Qr[o]=new cy(s));break;case"cross-hatch":Qr[o]||(Qr[o]=new uy(s));break;case"dots":Qr[o]||(Qr[o]=new fy(s));break;case"dashed":Qr[o]||(Qr[o]=new dy(s));break;case"zigzag-line":Qr[o]||(Qr[o]=new py(s));break;default:o="hachure",Qr[o]||(Qr[o]=new sh(s))}return Qr[o]}(e,Iw).fillPolygons(r,e)}function ay(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function ky(r){return r.randomizer||(r.randomizer=new gy(r.seed||0)),r.randomizer.next()}function rh(r,e,i,s=1){return i.roughness*s*(ky(i)*(e-r)+r)}function fe(r,e,i=1){return rh(-r,r,e,i)}function zo(r,e,i,s,o,n=!1){let c=n?o.disableMultiStrokeFill:o.disableMultiStroke,h=Nf(r,e,i,s,o,!0,!1);if(c)return h;let g=Nf(r,e,i,s,o,!0,!0);return h.concat(g)}function Nf(r,e,i,s,o,n,c){let h=Math.pow(r-i,2)+Math.pow(e-s,2),g=Math.sqrt(h),y=1;y=g<200?1:g>500?0.4:-0.0016668*g+1.233334;let f=o.maxRandomnessOffset||0;f*f*100>h&&(f=g/10);let b=f/2,F=0.2+0.2*ky(o),N=o.bowing*o.maxRandomnessOffset*(s-e)/200,W=o.bowing*o.maxRandomnessOffset*(r-i)/200;N=fe(N,o,y),W=fe(W,o,y);let H=[],Y=()=>fe(b,o,y),j=()=>fe(f,o,y),K=o.preserveVertices;return n&&(c?H.push({op:"move",data:[r+(K?0:Y()),e+(K?0:Y())]}):H.push({op:"move",data:[r+(K?0:fe(f,o,y)),e+(K?0:fe(f,o,y))]})),c?H.push({op:"bcurveTo",data:[N+r+(i-r)*F+Y(),W+e+(s-e)*F+Y(),N+r+2*(i-r)*F+Y(),W+e+2*(s-e)*F+Y(),i+(K?0:Y()),s+(K?0:Y())]}):H.push({op:"bcurveTo",data:[N+r+(i-r)*F+j(),W+e+(s-e)*F+j(),N+r+2*(i-r)*F+j(),W+e+2*(s-e)*F+j(),i+(K?0:j()),s+(K?0:j())]}),H}function Ql(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+fe(e,i),r[0][1]+fe(e,i)]),s.push([r[0][0]+fe(e,i),r[0][1]+fe(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+fe(e,i),r[o][1]+fe(e,i)]),o===r.length-1&&s.push([r[o][0]+fe(e,i),r[o][1]+fe(e,i)]);return ih(s,null,i)}function ih(r,e,i){let s=r.length,o=[];if(s>3){let n=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let h=1;h+2<s;h++){let g=r[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*r[h+1][0]-c*r[h-1][0])/6,g[1]+(c*r[h+1][1]-c*r[h-1][1])/6],n[2]=[r[h+1][0]+(c*r[h][0]-c*r[h+2][0])/6,r[h+1][1]+(c*r[h][1]-c*r[h+2][1])/6],n[3]=[r[h+1][0],r[h+1][1]],o.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&e.length===2){let h=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+fe(h,i),e[1]+fe(h,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(...Nf(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function ny(r,e,i,s,o,n,c,h){let g=[],y=[];if(h.roughness===0){r/=4,y.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let f=0;f<=2*Math.PI;f+=r){let b=[e+s*Math.cos(f),i+o*Math.sin(f)];g.push(b),y.push(b)}y.push([e+s*Math.cos(0),i+o*Math.sin(0)]),y.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let f=fe(0.5,h)-Math.PI/2;y.push([fe(n,h)+e+0.9*s*Math.cos(f-r),fe(n,h)+i+0.9*o*Math.sin(f-r)]);let b=2*Math.PI+f-0.01;for(let F=f;F<b;F+=r){let N=[fe(n,h)+e+s*Math.cos(F),fe(n,h)+i+o*Math.sin(F)];g.push(N),y.push(N)}y.push([fe(n,h)+e+s*Math.cos(f+2*Math.PI+0.5*c),fe(n,h)+i+o*Math.sin(f+2*Math.PI+0.5*c)]),y.push([fe(n,h)+e+0.98*s*Math.cos(f+c),fe(n,h)+i+0.98*o*Math.sin(f+c)]),y.push([fe(n,h)+e+0.9*s*Math.cos(f+0.5*c),fe(n,h)+i+0.9*o*Math.sin(f+0.5*c)])}return[y,g]}function ly(r,e,i,s,o,n,c,h,g){let y=n+fe(0.1,g),f=[];f.push([fe(h,g)+e+0.9*s*Math.cos(y-r),fe(h,g)+i+0.9*o*Math.sin(y-r)]);for(let b=y;b<=c;b+=r)f.push([fe(h,g)+e+s*Math.cos(b),fe(h,g)+i+o*Math.sin(b)]);return f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ih(f,null,g)}function Dw(r,e,i,s,o,n,c,h){let g=[],y=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+0.3],f=[0,0],b=h.disableMultiStroke?1:2,F=h.preserveVertices;for(let N=0;N<b;N++)N===0?g.push({op:"move",data:[c[0],c[1]]}):g.push({op:"move",data:[c[0]+(F?0:fe(y[0],h)),c[1]+(F?0:fe(y[0],h))]}),f=F?[o,n]:[o+fe(y[N],h),n+fe(y[N],h)],g.push({op:"bcurveTo",data:[r+fe(y[N],h),e+fe(y[N],h),i+fe(y[N],h),s+fe(y[N],h),f[0],f[1]]});return g}function an(r){return[...r]}function hy(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(an(r[0]),an(r[1]),an(r[2]),an(r[2]));else{let o=[];o.push(r[0],r[0]);for(let h=1;h<r.length;h++)o.push(r[h]),h===r.length-1&&o.push(r[h]);let n=[],c=1-e;s.push(an(o[0]));for(let h=1;h+2<o.length;h++){let g=o[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*o[h+1][0]-c*o[h-1][0])/6,g[1]+(c*o[h+1][1]-c*o[h-1][1])/6],n[2]=[o[h+1][0]+(c*o[h][0]-c*o[h+2][0])/6,o[h+1][1]+(c*o[h][1]-c*o[h+2][1])/6],n[3]=[o[h+1][0],o[h+1][1]],s.push(n[1],n[2],n[3])}}return s}function eh(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Pw(r,e,i){let s=eh(e,i);if(s===0)return eh(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)),eh(r,Jo(e,i,o))}function Jo(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Wf(r,e,i,s){let o=s||[];if(function(h,g){let y=h[g+0],f=h[g+1],b=h[g+2],F=h[g+3],N=3*f[0]-2*y[0]-F[0];N*=N;let W=3*f[1]-2*y[1]-F[1];W*=W;let H=3*b[0]-2*F[0]-y[0];H*=H;let Y=3*b[1]-2*F[1]-y[1];return Y*=Y,N<H&&(N=H),W<Y&&(W=Y),N+W}(r,e)<i){let h=r[e+0];if(o.length)(n=o[o.length-1],c=h,Math.sqrt(eh(n,c)))>1&&o.push(h);else o.push(h);o.push(r[e+3])}else{let g=r[e+0],y=r[e+1],f=r[e+2],b=r[e+3],F=Jo(g,y,0.5),N=Jo(y,f,0.5),W=Jo(f,b,0.5),H=Jo(F,N,0.5),Y=Jo(N,W,0.5),j=Jo(H,Y,0.5);Wf([g,F,H,j],0,i,o),Wf([j,Y,W,b],0,i,o)}var n,c;return o}function Rw(r,e){return oh(r,0,r.length,e)}function oh(r,e,i,s,o){let n=o||[],c=r[e],h=r[i-1],g=0,y=1;for(let f=e+1;f<i-1;++f){let b=Pw(r[f],c,h);b>g&&(g=b,y=f)}return Math.sqrt(g)>s?(oh(r,e,y+1,s,n),oh(r,y,i,s,n)):(n.length||n.push(c),n.push(h)),n}function Rf(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let n=0;n<o;n++)Wf(r,3*n,e,s);return i&&i>0?oh(s,0,s.length,i):s}var oi="none";class hn{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 n=this._o(o);return this._d("line",[Cy(r,e,i,s,n)],n)}rectangle(r,e,i,s,o){let n=this._o(o),c=[],h=$w(r,e,i,s,n);if(n.fill){let g=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];n.fillStyle==="solid"?c.push(Pf([g],n)):c.push(Ls([g],n))}return n.stroke!==oi&&c.push(h),this._d("rectangle",c,n)}ellipse(r,e,i,s,o){let n=this._o(o),c=[],h=by(i,s,n),g=qf(r,e,n,h);if(n.fill)if(n.fillStyle==="solid"){let y=qf(r,e,n,h).opset;y.type="fillPath",c.push(y)}else c.push(Ls([g.estimatedPoints],n));return n.stroke!==oi&&c.push(g.opset),this._d("ellipse",c,n)}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",[th(r,!1,i)],i)}arc(r,e,i,s,o,n,c=!1,h){let g=this._o(h),y=[],f=oy(r,e,i,s,o,n,c,!0,g);if(c&&g.fill)if(g.fillStyle==="solid"){let b=Object.assign({},g);b.disableMultiStroke=!0;let F=oy(r,e,i,s,o,n,!0,!1,b);F.type="fillPath",y.push(F)}else y.push(function(b,F,N,W,H,Y,j){let K=b,Q=F,rt=Math.abs(N/2),it=Math.abs(W/2);rt+=fe(0.01*rt,j),it+=fe(0.01*it,j);let ct=H,lt=Y;for(;ct<0;)ct+=2*Math.PI,lt+=2*Math.PI;lt-ct>2*Math.PI&&(ct=0,lt=2*Math.PI);let pt=(lt-ct)/j.curveStepCount,bt=[];for(let vt=ct;vt<=lt;vt+=pt)bt.push([K+rt*Math.cos(vt),Q+it*Math.sin(vt)]);return bt.push([K+rt*Math.cos(lt),Q+it*Math.sin(lt)]),bt.push([K,Q]),Ls([bt],j)}(r,e,i,s,o,n,g));return g.stroke!==oi&&y.push(f),this._d("arc",y,g)}curve(r,e){let i=this._o(e),s=[],o=iy(r,i);if(i.fill&&i.fill!==oi)if(i.fillStyle==="solid"){let n=iy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{let n=[],c=r;if(c.length){let h=typeof c[0][0]=="number"?[c]:c;for(let g of h)g.length<3?n.push(...g):g.length===3?n.push(...Rf(hy([g[0],g[0],g[1],g[2]]),10,(1+i.roughness)/2)):n.push(...Rf(hy(g),10,(1+i.roughness)/2))}n.length&&s.push(Ls([n],i))}return i.stroke!==oi&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=th(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Pf([r],i)):s.push(Ls([r],i))),i.stroke!==oi&&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!==oi,n=i.stroke!==oi,c=!!(i.simplification&&i.simplification<1),h=function(y,f,b){let F=yy(my(zf(y))),N=[],W=[],H=[0,0],Y=[],j=()=>{Y.length>=4&&W.push(...Rf(Y,f)),Y=[]},K=()=>{j(),W.length&&(N.push(W),W=[])};for(let{key:rt,data:it}of F)switch(rt){case"M":K(),H=[it[0],it[1]],W.push(H);break;case"L":j(),W.push([it[0],it[1]]);break;case"C":if(!Y.length){let ct=W.length?W[W.length-1]:H;Y.push([ct[0],ct[1]])}Y.push([it[0],it[1]]),Y.push([it[2],it[3]]),Y.push([it[4],it[5]]);break;case"Z":j(),W.push([H[0],H[1]])}if(K(),!b)return N;let Q=[];for(let rt of N){let it=Rw(rt,b);it.length&&Q.push(it)}return Q}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),g=sy(r,i);if(o)if(i.fillStyle==="solid")if(h.length===1){let y=sy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(y.ops)})}else s.push(Pf(h,i));else s.push(Ls(h,i));return n&&(c?h.forEach((y)=>{s.push(th(y,!1,i))}):s.push(g)),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((n)=>+n.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 n=null;switch(o.type){case"path":n={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:oi};break;case"fillPath":n={d:this.opsToPath(o),stroke:oi,strokeWidth:0,fill:i.fill||oi};break;case"fillSketch":n=this.fillSketch(o,i)}n&&s.push(n)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||oi,strokeWidth:i,fill:oi}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class wy{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new hn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let n of e)switch(n.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,n,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,n,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 n=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(n[0],n[1]);break;case"bcurveTo":r.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":r.lineTo(n[0],n[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 n=this.gen.line(r,e,i,s,o);return this.draw(n),n}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n),n}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n),n}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,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g),g}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 Jl="http://www.w3.org/2000/svg";class Sy{constructor(r,e){this.svg=r,this.gen=new hn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Jl,"g"),n=r.options.fixedDecimalPlaceDigits;for(let c of e){let h=null;switch(c.type){case"path":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(s,c,i)}h&&o.appendChild(h)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Jl,"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 n=this.gen.line(r,e,i,s,o);return this.draw(n)}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n)}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n)}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,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g)}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 m={canvas:(r,e)=>new wy(r,e),svg:(r,e)=>new Sy(r,e),generator:(r)=>new hn(r),newSeed:()=>hn.newSeed()};var qw=1,Nw=3;async function td(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!ed(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function n(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=l().fontSize?l().fontSize:window.getComputedStyle(document.body).fontSize,h=5,[g=D.fontSize]=We(c),y=g*5+"px";s.style.minWidth=y,s.style.maxWidth=y}else s.style.width="100%";o(s)}t(n,"setupImage"),setTimeout(()=>{if(s.complete)n()}),s.addEventListener("error",n),s.addEventListener("load",n)})))}t(td,"configureLabelImages");function ed(r){if(r.nodeType===Nw)return r.textContent?.trim()!=="";if(r.nodeType!==qw)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(ed)}t(ed,"hasTextBesidesImages");var Ty=3,Ww=32,zw=t(async(r,e,i)=>{let s=l(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),n=o.insert("g").attr("class","label").attr("style",Je(e.labelStyle)),h=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((j)=>({text:j,cssClass:"c4-descr"}))].filter((j)=>j.text),g=e.width?Math.max(e.width-2*(e.padding??0),Ww):l().flowchart?.wrappingWidth??200,f=s.c4?.wrap??!0?g:Number.POSITIVE_INFINITY,b=await Promise.all(h.map(async(j)=>{let K=n.append("g").attr("class",j.cssClass),Q=await Le(K,O(jt(j.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:f,style:e.labelStyle},s);return p(Q).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),p(Q).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:K,box:K.node().getBBox()}})),F=Math.max(...b.map(({box:j})=>j.width),0),N=0;for(let{el:j,box:K}of b)j.attr("transform",`translate(${F/2-K.x-K.width/2}, ${N-K.y})`),N+=K.height+Ty;let W=b.length>0?N-Ty:0;n.insert("rect",":first-child"),n.attr("transform",`translate(${-F/2}, ${-W/2})`);let H=n.node().getBBox(),Y=(e.padding??0)/2;return{shapeSvg:o,bbox:H,halfPadding:Y,label:n}},"c4LabelHelper"),_y=t((r,e)=>{let{x:i,y:s,width:o,height:n}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:n};return{x:i,y:s,width:e,height:n,top:s,left:i,bottom:s+n,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),P=t(async(r,e,i,{ignoreMinWidth:s=!1}={})=>{if(e.stereotype!==void 0)return zw(r,e,i);let o,n=e.useHtmlLabels||ft(l()?.htmlLabels);if(!i)o="node default";else o=i;let c=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=c.insert("g").attr("class","label").attr("style",Je(e.labelStyle)),g;if(e.label===void 0)g="";else g=typeof e.label==="string"?e.label:e.label[0];let y=!!e.icon||!!e.img,f=e.labelType==="markdown",b=g&&!e.width&&!s?e.minWidth??0:0,F=await Le(h,O(jt(g),l()),{useHtmlLabels:n,width:e.width||e.wrappingWidth||l().flowchart?.wrappingWidth,minWidth:b,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},l()),N=(e?.padding??0)/2,W;if(n){let H=F.children[0],Y=p(F);await td(H),W=await _o.measure(()=>H.getBoundingClientRect()),W=_y(W,b),Y.attr("width",W.width),Y.attr("height",W.height)}else W=await _o.measure(()=>F.getBBox()),W=_y(W,b);if(n)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");else h.attr("transform","translate(0, "+-W.height/2+")");if(e.centerLabel)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");return h.insert("rect",":first-child"),{shapeSvg:c,bbox:W,halfPadding:N,label:h}},"labelHelper"),es=t(async(r,e,i)=>{let s=i.useHtmlLabels??Ce(l()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),n=await Le(o,O(jt(e),l()),{useHtmlLabels:s,width:i.width||l()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,h;if(Ce(l())){let g=n.children[0],y=p(n);h=await _o.measure(()=>g.getBoundingClientRect()),y.attr("width",h.width),y.attr("height",h.height)}else h=await _o.measure(()=>n.getBBox());if(s)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");else o.attr("transform","translate(0, "+-h.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:h,halfPadding:c,label:o}},"insertLabel"),I=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"),Zt=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Ee(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Ee,"createPathFromPoints");function Ho(r,e,i,s,o,n){let c=[],h=50,g=i-r,y=s-e,f=g/n,b=2*Math.PI/f,F=e+y/2;for(let N=0;N<=50;N++){let W=N/50,H=r+W*g,Y=F+o*Math.sin(b*(H-r));c.push({x:H,y:Y})}return c}t(Ho,"generateFullSineWavePoints");function Ri(r,e,i,s,o,n){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let b=0;b<s;b++){let F=h+b*f,N=r+i*Math.cos(F),W=e+i*Math.sin(F);c.push({x:-N,y:-W})}return c}t(Ri,"generateCirclePoints");function Kf(r){let e=Array.from(r.childNodes).filter((g)=>g.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((g)=>g.getAttribute("d")).filter((g)=>g!==null).join(" ");i.setAttribute("d",s);let o=e.find((g)=>g.getAttribute("fill")!=="none"),n=e.find((g)=>g.getAttribute("stroke")!=="none"),c=t((g,y)=>g?.getAttribute(y)??void 0,"getAttr");if(o){let g={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}if(n){let g={stroke:c(n,"stroke"),"stroke-width":c(n,"stroke-width")??"1","stroke-opacity":c(n,"stroke-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}let h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}t(Kf,"mergePaths");var Hw=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,n=e.y-s,c=r.width/2,h=r.height/2,g,y;if(Math.abs(n)*c>Math.abs(o)*h){if(n<0)h=-h;g=n===0?0:h*o/n,y=h}else{if(o<0)c=-c;g=c,y=o===0?0:c*n/o}return{x:i+g,y:s+y}},"intersectRect"),Yi=Hw;function Gy(r,e){return r.intersect(e)}t(Gy,"intersectNode");var Yw=Gy;function Xy(r,e,i,s){var{x:o,y:n}=r,c=o-s.x,h=n-s.y,g=Math.sqrt(e*e*h*h+i*i*c*c),y=Math.abs(e*i*c/g);if(s.x<o)y=-y;var f=Math.abs(e*i*h/g);if(s.y<n)f=-f;return{x:o+y,y:n+f}}t(Xy,"intersectEllipse");var Vy=Xy;function Ky(r,e,i){return Vy(r,e,e,i)}t(Ky,"intersectCircle");var Uw=Ky;function Zy(r,e,i,s){{let o=e.y-r.y,n=r.x-e.x,c=e.x*r.y-r.x*e.y,h=o*i.x+n*i.y+c,g=o*s.x+n*s.y+c,y=0.000001;if(h!==0&&g!==0&&Zf(h,g))return;let f=s.y-i.y,b=i.x-s.x,F=s.x*i.y-i.x*s.y,N=f*r.x+b*r.y+F,W=f*e.x+b*e.y+F;if(Math.abs(N)<0.000001&&Math.abs(W)<0.000001&&Zf(N,W))return;let H=o*b-f*n;if(H===0)return;let Y=(n*F-b*c)/H,j=(f*c-o*F)/H;return{x:Y,y:j}}}t(Zy,"intersectLine");function Zf(r,e){return r*e>0}t(Zf,"sameSign");var jw=Zy;function Qy(r,e,i){let{x:s,y:o}=r,n=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:h}=Number;if(typeof e.forEach==="function")e.forEach(function(f){c=Math.min(c,f.x),h=Math.min(h,f.y)});else c=Math.min(c,e.x),h=Math.min(h,e.y);let g=s-r.width/2-c,y=o-r.height/2-h;for(let f=0;f<e.length;f++){let b=e[f],F=e[f<e.length-1?f+1:0],N=jw(r,i,{x:g+b.x,y:y+b.y},{x:g+F.x,y:y+F.y});if(N)n.push(N)}if(!n.length)return r;if(n.length>1)n.sort(function(f,b){let F=f.x-i.x,N=f.y-i.y,W=Math.sqrt(F*F+N*N),H=b.x-i.x,Y=b.y-i.y,j=Math.sqrt(H*H+Y*Y);return W<j?-1:W===j?0:1});return n[0]}t(Qy,"intersectPolygon");var Gw=Qy,w={node:Yw,circle:Uw,ellipse:Vy,polygon:Gw,rect:Yi},Jr=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"),Xw=t(async(r,e,i,s=!1,o=!1)=>{let n=e||"";if(typeof n==="object")n=n[0];let c=l(),h=Ce(c);return await Le(r,n,{style:i,isTitle:s,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),yi=Xw;function Jy(r,e){let{labelStyles:i}=k(e);e.labelStyle=i;let s=Zt(e),o=s;if(!s)o="anchor";let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,g=m.svg(n),y=Gt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")y.roughness=0;let f=g.circle(0,0,c*2,y),b=n.insert(()=>f,":first-child");return b.attr("class","anchor").attr("style",Je(h)),I(e,b),e.intersect=function(F){return a.info("Circle intersect",e,c,F),w.circle(e,c,F)},n}t(Jy,"anchor");function Qf(r,e,i,s,o,n,c){let g=(r+i)/2,y=(e+s)/2,f=Math.atan2(s-e,i-r),b=(i-r)/2,F=(s-e)/2,N=b/o,W=F/n,H=Math.sqrt(N**2+W**2);if(H>1)throw Error("The given radii are too small to create an arc between the points.");let Y=Math.sqrt(1-H**2),j=g+Y*n*Math.sin(f)*(c?-1:1),K=y-Y*o*Math.cos(f)*(c?-1:1),Q=Math.atan2((e-K)/n,(r-j)/o),it=Math.atan2((s-K)/n,(i-j)/o)-Q;if(c&&it<0)it+=2*Math.PI;if(!c&&it>0)it-=2*Math.PI;let ct=[];for(let lt=0;lt<20;lt++){let pt=lt/19,bt=Q+pt*it,vt=j+o*Math.cos(bt),wt=K+n*Math.sin(bt);ct.push({x:vt,y:wt})}return ct}t(Qf,"generateArcPoints");function tx(r,e,i){let[s,o]=[e,i].sort((n,c)=>c-n);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(tx,"calculateArcSagitta");async function ex(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=t((bt)=>bt+c,"calcTotalHeight"),g=t((bt)=>{let vt=bt/2;return[vt/(2.5+bt/50),vt]},"calcEllipseRadius"),{shapeSvg:y,bbox:f}=await P(r,e,Zt(e)),b=h(e?.height?e?.height:f.height),[F,N]=g(b),W=tx(b,F,N),Y=(e?.width?e?.width:f.width)+n*2+W-W,j=b,{cssStyles:K}=e,Q=[{x:Y/2,y:-j/2},{x:-Y/2,y:-j/2},...Qf(-Y/2,-j/2,-Y/2,j/2,F,N,!1),{x:Y/2,y:j/2},...Qf(Y/2,j/2,Y/2,-j/2,F,N,!0)],rt=m.svg(y),it=Gt(e,{});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ct=Ee(Q),lt=rt.path(ct,it),pt=y.insert(()=>lt,":first-child");if(pt.attr("class","basic label-container outer-path"),K&&e.look!=="handDrawn")pt.selectAll("path").attr("style",K);if(s&&e.look!=="handDrawn")pt.selectAll("path").attr("style",s);return pt.attr("transform",`translate(${F/2}, 0)`),I(e,pt),e.intersect=function(bt){return w.polygon(e,Q,bt)},y}t(ex,"bowTieRect");async function rx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,Zt(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=Math.max(c.width+y*2,e.width??0,80),b=Math.max(Math.min(f*0.08,12),5),F=Math.max(c.height+y*2+b,e.height??0),N=-F/2+b,W=F/2,H=f*0.72,Y=[`M${-f/2},${N}`,`L${-H/2},${W}`,`A${H/2},${b} 0 0 0 ${H/2},${W}`,`L${f/2},${N}`,`A${f/2},${b} 0 0 0 ${-f/2},${N}`,"Z"].join(" "),{cssStyles:j}=e,K=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let pt=m.svg(n).path(Y,Gt(e,{}));if(K.node()?.appendChild(pt),j)K.attr("style",j)}else K.append("path").attr("d",Y).attr("style",o);K.append("ellipse").attr("cx",0).attr("cy",N).attr("rx",f/2).attr("ry",b).attr("style",`fill:none;stroke:${g};stroke-width:1px`),I(e,K);let Q=N+(W-N)/2;h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${Q-c.height/2-(c.y-(c.top??0))})`);let rt=12,it=t((lt,pt,bt)=>Array.from({length:rt+1},(vt,wt)=>{let kt=Math.PI-wt*Math.PI/rt;return{x:lt*Math.cos(kt),y:pt+bt*b*Math.sin(kt)}}),"arc"),ct=[...it(f/2,N,-1),...it(H/2,W,1).reverse()];return e.intersect=function(lt){return w.polygon(e,ct,lt)},n}t(rx,"bucket");var Hf=20,Yf=8,Vw=80,Kw=8;function ix(r){let{themeVariables:e}=l(),{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:Kw,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(ix,"getCollapsedStyle");async function ox(r,e){let i=ix(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:n}=k(e),{shapeSvg:c,bbox:h}=await P(r,e,Zt(e)),{theme:g,themeVariables:y}=l();Ze(c,e.colorIndex,g,y.borderColorArray);let f=e.padding??8,b=h.height,F=Math.max(h.width+f*2,Vw,e?.width??0),N=Math.max(b+Yf+Hf+f*2,e?.height??0),W=-F/2,H=-N/2,Y=-(Yf+Hf)/2,j=c.select(".label");if(j)if(e.useHtmlLabels??Ce(l()))j.attr("transform",`translate(${-h.width/2}, ${-h.height/2+Y})`);else j.attr("transform",`translate(0, ${-h.height/2+Y})`);let K;if(e.look==="handDrawn"){let lt=m.svg(c),pt=Gt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),bt=lt.path(Jr(W,H,F,N,i.rx),pt);K=c.insert(()=>bt,":first-child"),K.attr("class","basic label-container "+i.cssClass).attr("style",Je(e.cssStyles))}else if(K=c.insert("rect",":first-child"),K.attr("class","basic label-container "+i.cssClass).attr("style",n).attr("rx",i.rx).attr("ry",i.rx).attr("x",W).attr("y",H).attr("width",F).attr("height",N).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)K.attr("stroke-width",i.strokeWidth+"px");let Q=H+f+b+Yf;c.append("line").attr("class","collapsed-separator").attr("x1",W+8).attr("y1",Q).attr("x2",W+F-8).attr("y2",Q).attr("stroke",o).attr("stroke-dasharray","3, 3");let rt=Q+Hf/2,it=2.5,ct=10;for(let lt=-1;lt<=1;lt++)c.append("circle").attr("class","collapsed-indicator").attr("cx",lt*ct).attr("cy",rt).attr("r",it).attr("fill",o);return I(e,K),e.calcIntersect=function(lt,pt){return w.rect(lt,pt)},e.intersect=function(lt){return w.rect(e,lt)},c}t(ox,"collapsedGroup");function Xi(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(Xi,"insertPolygonShape");var Zw=["right","left","up","down"],rd="point",Qw=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"),Jw=t((r)=>Zw.filter((e)=>r.has(e)).join("|")||rd,"getDirectionKey"),By={"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"),[rd]:()=>[{x:0,y:0}]},tS=t((r,e,i,s)=>{let o=Qw(r),n=(i.padding??0)/2,c=e.height+4*n,h=c/2,g=s??e.width+2*h+2*n,y=Jw(o);return(By[y]??By[rd])({height:c,midpoint:h,padding:n,width:g})},"getArrowPoints");async function sx(r,e){let i=e,{shapeSvg:s,bbox:o}=await P(r,i,Zt(i)),n=i.padding??0,c=o.height+2*n,h=c/2,g=o.width+2*h+n,y=i.width??0,b=i.positioned&&(i.widthInColumns??1)>1&&y>g?y:g,F=tS(i.directions??[],o,i,b),N=Xi(s,b,c,F);return N.attr("style",i.style??null),I(i,N),i.intersect=function(W){return w.polygon(i,F,W)},s}t(sx,"block_arrow");async function ax(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,Zt(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=18,b=12,F=Math.max(c.width+y*2,e.width??0,90),N=Math.max(c.height+y*2+f,e.height??0),W=-N/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(Jr(-F/2,W,F,N,b),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-F/2).attr("y",W).attr("width",F).attr("height",N).attr("rx",b).attr("ry",b).attr("style",o);Y.append("line").attr("x1",-F/2).attr("y1",W+f).attr("x2",F/2).attr("y2",W+f).attr("style",`stroke:${g};stroke-width:1px`);for(let K=0;K<3;K++)Y.append("circle").attr("cx",-F/2+12+K*9).attr("cy",W+f/2).attr("r",2.5).attr("style",`fill:${g};stroke:none`);Y.append("rect").attr("class","browser-address-bar").attr("x",-F/2+44).attr("y",W+4).attr("width",Math.max(F-56,10)).attr("height",f-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${g};stroke-width:1px;opacity:0.6`),I(e,Y);let j=W+f+(N-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(K){return w.rect(e,K)},n}t(ax,"browser");var nh=12;async function nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=(e?.width??g.width)+(e.look==="neo"?n*2:n+nh),f=(e?.height??g.height)+(e.look==="neo"?c*2:c),b=0,F=y,N=-f,W=0,H=[{x:b+nh,y:N},{x:F,y:N},{x:F,y:W},{x:b,y:W},{x:b,y:N+nh},{x:b+nh,y:N}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let K=m.svg(h),Q=Gt(e,{}),rt=Ee(H),it=K.path(rt,Q);if(Y=h.insert(()=>it,":first-child").attr("transform",`translate(${-y/2}, ${f/2})`),j)Y.attr("style",j)}else Y=Xi(h,y,f,H);if(s)Y.attr("style",s);return I(e,Y),e.intersect=function(K){return w.polygon(e,H,K)},h}t(nx,"card");function lx(r,e){let{nodeStyles:i}=k(e);e.label="";let s=r.insert("g").attr("class",Zt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,n=Math.max(28,e.width??0),c=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=m.svg(s),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=Ee(c),f=h.path(y,g),b=s.insert(()=>f,":first-child");if(o&&e.look!=="handDrawn")b.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")b.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(F){return w.polygon(e,c,F)},s}t(lx,"choice");async function id(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,halfPadding:h}=await P(r,e,Zt(e),{ignoreMinWidth:!0}),g=16,y=i?.padding??h,f=Math.sqrt(c.width**2+c.height**2)/2,b=e.look==="neo"?f+g:f+y,F,{cssStyles:N}=e;if(e.look==="handDrawn"){let W=m.svg(n),H=Gt(e,{}),Y=W.circle(0,0,b*2,H);F=n.insert(()=>Y,":first-child"),F.attr("class","basic label-container").attr("style",Je(N))}else F=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",b).attr("cx",0).attr("cy",0);return I(e,F),e.calcIntersect=function(W,H){let Y=W.width/2;return w.circle(W,Y,H)},e.intersect=function(W){return a.info("Circle intersect",e,b,W),w.circle(e,b,W)},n}t(id,"circle");async function hx(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,i,s),h=o.insert("rect",":first-child"),g=i.padding??0,y=i.positioned?i.width??0:n.width+g,f=i.positioned?i.height??0:n.height+g,b=i.positioned?-y/2:-n.width/2-c,F=i.positioned?-f/2:-n.height/2-c;return h.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",b).attr("y",F).attr("width",y).attr("height",f),I(i,h),i.intersect=function(N){return w.rect(i,N)},o}t(hx,"composite");async function cx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,Zt(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=20,b=12,F=Math.max(c.width+y*2,e.width??0,90),N=Math.max(c.height+y*2+f,e.height??0),W=-N/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(Jr(-F/2,W,F,N,b),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-F/2).attr("y",W).attr("width",F).attr("height",N).attr("rx",b).attr("ry",b).attr("style",o);Y.append("text").attr("x",-F/2+12).attr("y",W+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${g}`).text(">_"),I(e,Y);let j=W+f+(N-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(K){return w.rect(e,K)},n}t(cx,"consoleWindow");function ux(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},n={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},h={x:s/2*e,y:-(s/2)*i};return`M ${n.x},${n.y} L ${h.x},${h.y}
233
- M ${o.x},${o.y} L ${c.x},${c.y}`}t(ux,"createLine");function fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",Zt(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:c}=e,h=m.svg(o),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=h.circle(0,0,n*2,g),f=ux(n),b=h.path(f,g),F=o.insert(()=>y,":first-child");if(F.insert(()=>b),F.attr("class","outer-path"),c&&e.look!=="handDrawn")F.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return I(e,F),e.intersect=function(N){return a.info("crossedCircle intersect",e,{radius:n,point:N}),w.circle(e,n,N)},o}t(fx,"crossedCircle");function Bo(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let b=0;b<s;b++){let F=h+b*f,N=r+i*Math.cos(F),W=e+i*Math.sin(F);c.push({x:-N,y:-W})}return c}t(Bo,"generateCirclePoints");async function dx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,Zt(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+h,f=n.height+g,b=Math.max(5,f*0.1),{cssStyles:F}=e,N=[...Bo(y/2,-f/2,b,30,-90,0),{x:-y/2-b,y:b},...Bo(y/2+b*2,-b,b,20,-180,-270),...Bo(y/2+b*2,b,b,20,-90,-180),{x:-y/2-b,y:-f/2},...Bo(y/2,f/2,b,20,0,90)],W=[{x:y/2,y:-f/2-b},{x:-y/2,y:-f/2-b},...Bo(y/2,-f/2,b,20,-90,0),{x:-y/2-b,y:-b},...Bo(y/2+y*0.1,-b,b,20,-180,-270),...Bo(y/2+y*0.1,b,b,20,-90,-180),{x:-y/2-b,y:f/2},...Bo(y/2,f/2,b,20,0,90),{x:-y/2,y:f/2+b},{x:y/2,y:f/2+b}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let K=Ee(N).replace("Z",""),Q=H.path(K,Y),rt=Ee(W),it=H.path(rt,{...Y}),ct=o.insert("g",":first-child");if(ct.insert(()=>it,":first-child").attr("stroke-opacity",0),ct.insert(()=>Q,":first-child"),ct.attr("class","text"),F&&e.look!=="handDrawn")ct.selectAll("path").attr("style",F);if(s&&e.look!=="handDrawn")ct.selectAll("path").attr("style",s);return ct.attr("transform",`translate(${b}, 0)`),c.attr("transform",`translate(${-y/2+b-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(dx,"curlyBraceLeft");function Lo(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let b=0;b<s;b++){let F=h+b*f,N=r+i*Math.cos(F),W=e+i*Math.sin(F);c.push({x:N,y:W})}return c}t(Lo,"generateCirclePoints");async function px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,Zt(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),b=Math.max(5,f*0.1),{cssStyles:F}=e,N=[...Lo(y/2,-f/2,b,20,-90,0),{x:y/2+b,y:-b},...Lo(y/2+b*2,-b,b,20,-180,-270),...Lo(y/2+b*2,b,b,20,-90,-180),{x:y/2+b,y:f/2},...Lo(y/2,f/2,b,20,0,90)],W=[{x:-y/2,y:-f/2-b},{x:y/2,y:-f/2-b},...Lo(y/2,-f/2,b,20,-90,0),{x:y/2+b,y:-b},...Lo(y/2+b*2,-b,b,20,-180,-270),...Lo(y/2+b*2,b,b,20,-90,-180),{x:y/2+b,y:f/2},...Lo(y/2,f/2,b,20,0,90),{x:y/2,y:f/2+b},{x:-y/2,y:f/2+b}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let K=Ee(N).replace("Z",""),Q=H.path(K,Y),rt=Ee(W),it=H.path(rt,{...Y}),ct=o.insert("g",":first-child");if(ct.insert(()=>it,":first-child").attr("stroke-opacity",0),ct.insert(()=>Q,":first-child"),ct.attr("class","text"),F&&e.look!=="handDrawn")ct.selectAll("path").attr("style",F);if(s&&e.look!=="handDrawn")ct.selectAll("path").attr("style",s);return ct.attr("transform",`translate(${-b}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(px,"curlyBraceRight");function pr(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let b=0;b<s;b++){let F=h+b*f,N=r+i*Math.cos(F),W=e+i*Math.sin(F);c.push({x:-N,y:-W})}return c}t(pr,"generateCirclePoints");async function gx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,Zt(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),b=Math.max(5,f*0.1),{cssStyles:F}=e,N=[...pr(y/2,-f/2,b,30,-90,0),{x:-y/2-b,y:b},...pr(y/2+b*2,-b,b,20,-180,-270),...pr(y/2+b*2,b,b,20,-90,-180),{x:-y/2-b,y:-f/2},...pr(y/2,f/2,b,20,0,90)],W=[...pr(-y/2+b+b/2,-f/2,b,20,-90,-180),{x:y/2-b/2,y:b},...pr(-y/2-b/2,-b,b,20,0,90),...pr(-y/2-b/2,b,b,20,-90,0),{x:y/2-b/2,y:-b},...pr(-y/2+b+b/2,f/2,b,30,-180,-270)],H=[{x:y/2,y:-f/2-b},{x:-y/2,y:-f/2-b},...pr(y/2,-f/2,b,20,-90,0),{x:-y/2-b,y:-b},...pr(y/2+b*2,-b,b,20,-180,-270),...pr(y/2+b*2,b,b,20,-90,-180),{x:-y/2-b,y:f/2},...pr(y/2,f/2,b,20,0,90),{x:-y/2,y:f/2+b},{x:y/2-b-b/2,y:f/2+b},...pr(-y/2+b+b/2,-f/2,b,20,-90,-180),{x:y/2-b/2,y:b},...pr(-y/2-b/2,-b,b,20,0,90),...pr(-y/2-b/2,b,b,20,-90,0),{x:y/2-b/2,y:-b},...pr(-y/2+b+b/2,f/2,b,30,-180,-270)],Y=m.svg(o),j=Gt(e,{fill:"none"});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let Q=Ee(N).replace("Z",""),rt=Y.path(Q,j),ct=Ee(W).replace("Z",""),lt=Y.path(ct,j),pt=Ee(H),bt=Y.path(pt,{...j}),vt=o.insert("g",":first-child");if(vt.insert(()=>bt,":first-child").attr("stroke-opacity",0),vt.insert(()=>rt,":first-child"),vt.insert(()=>lt,":first-child"),vt.attr("class","text"),F&&e.look!=="handDrawn")vt.selectAll("path").attr("style",F);if(s&&e.look!=="handDrawn")vt.selectAll("path").attr("style",s);return vt.attr("transform",`translate(${b-b/4}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,vt),e.intersect=function(wt){return w.polygon(e,H,wt)},o}t(gx,"curlyBraces");async function mx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=20,g=5,{shapeSvg:y,bbox:f}=await P(r,e,Zt(e)),b=Math.max(g,f.height+c*2,e?.height??0),F=b/2,N=F-Math.sqrt(Math.max(0,F**2-(f.height/2)**2)),W=Math.max(b/4,N),H=Math.max(h,f.width+n*2+W*2,(f.width+n*2)*1.25,e?.width??0),{cssStyles:Y}=e,j=m.svg(y),K=Gt(e,{});if(e.look!=="handDrawn")K.roughness=0,K.fillStyle="solid";let Q=H,rt=b,it=Q-F,ct=rt/4,lt=[{x:it,y:0},{x:ct,y:0},{x:0,y:rt/2},{x:ct,y:rt},{x:it,y:rt},...Ri(-it,-rt/2,F,50,270,90)],pt=Ee(lt),bt=j.path(pt,K),vt=y.insert(()=>bt,":first-child");if(vt.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")vt.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")vt.selectChildren("path").attr("style",s);return vt.attr("transform",`translate(${-H/2}, ${-b/2})`),I(e,vt),e.intersect=function(wt){return w.polygon(e,lt,wt)},y}t(mx,"curvedTrapezoid");async function yx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,Zt(e)),h=e.padding??20,g=Math.max(n.width+h*2,e.width??0,100),y=Math.min(Math.max(g*0.23,16),56),f=y*0.27,b=Math.max(n.height+h*2,e.height?e.height-(2*y-f):0),F=Math.min(g*0.177,b*0.45),N=b+2*y-f,W=-N/2,H=W+2*y-f,Y=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:j}=e;if(e.look==="handDrawn"){let pt=m.svg(o),bt=Gt(e,{}),vt=pt.path(Jr(-g/2,H,g,b,F),bt),wt=pt.circle(0,W+y,y*2,bt);if(Y.insert(()=>wt,":first-child"),Y.insert(()=>vt,":first-child"),j)Y.attr("style",j)}else Y.append("rect").attr("x",-g/2).attr("y",H).attr("width",g).attr("height",b).attr("rx",F).attr("ry",F).attr("style",s),Y.append("circle").attr("cx",0).attr("cy",W+y).attr("r",y).attr("style",s);I(e,Y);let K=H+b/2;c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${K-n.height/2-(n.y-(n.top??0))})`);let Q=W+y,rt=Math.asin(Math.min(1,(H-Q)/y))*180/Math.PI,it=24,lt=[...Ri(0,-Q,y,it,180+rt,-rt),...Ri(-(-g/2+F),-(H+F),F,12,90,0),...Ri(-(-g/2+F),-(N/2-F),F,12,360,270),...Ri(-(g/2-F),-(N/2-F),F,12,270,180),...Ri(-(g/2-F),-(H+F),F,12,180,90)];return e.intersect=function(pt){return w.polygon(e,lt,pt)},o}t(yx,"person");var eS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),rS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),iS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),vy=8,Ly=8;async function xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?24:o,c=e.look==="neo"?24:o,h=e.width??0;if(e.width){if(e.width=e.width-c,e.width<Ly)e.width=Ly}if(e.height){let K=h/2/(2.5+h/50);if(e.height=e.height-n-K*3,e.height<vy)e.height=vy}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,Zt(e)),b=Math.max(e.width??0,y.width)+c,F=b/2,N=F/(2.5+b/50),W=Math.max(e.height??0,y.height)+n+N,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(g),K=rS(0,0,b,W,F,N),Q=iS(0,N,b,W,F,N),rt=Gt(e,{}),it=j.path(K,rt),ct=j.path(Q,Gt(e,{fill:"none"}));if(H=g.insert(()=>ct,":first-child"),H=g.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=eS(0,0,b,W,F,N);H=g.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",Je(Y)).attr("style",s)}return H.attr("label-offset-y",N),H.attr("transform",`translate(${-b/2}, ${-(W/2+N)})`),I(e,H),f.attr("transform",`translate(${-(y.width/2)-(y.x-(y.left??0))}, ${-(y.height/2)+(e.padding??0)/1.5-(y.y-(y.top??0))})`),e.intersect=function(j){let K=w.rect(e,j),Q=K.x-(e.x??0);if(F!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(K.y-(e.y??0))>(e.height??0)/2-N)){let rt=N*N*(1-Q*Q/(F*F));if(rt>0)rt=Math.sqrt(rt);if(rt=N-rt,j.y-(e.y??0)>0)rt=-rt;K.y+=rt}return K},g}t(xx,"cylinder");async function Os(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c}=await P(r,e,Zt(e)),h=Math.max(c.width+i.labelPaddingX*2,e?.width||0),g=Math.max(c.height+i.labelPaddingY*2,e?.height||0),y=-h/2,f=-g/2,b,{rx:F,ry:N}=e,{cssStyles:W}=e;if(i?.rx&&i.ry)F=i.rx,N=i.ry;if(e.look==="handDrawn"){let H=m.svg(n),Y=Gt(e,{}),j=F||N?H.path(Jr(y,f,h,g,F||0),Y):H.rectangle(y,f,h,g,Y);b=n.insert(()=>j,":first-child"),b.attr("class","basic label-container").attr("style",Je(W))}else b=n.insert("rect",":first-child"),b.attr("class","basic label-container").attr("style",o).attr("rx",Je(F)).attr("ry",Je(N)).attr("x",y).attr("y",f).attr("width",h).attr("height",g);return I(e,b,e.look==="handDrawn"?void 0:{width:h,height:g}),e.calcIntersect=function(H,Y){return w.rect(H,Y)},e.intersect=function(H){return w.rect(e,H)},n}t(Os,"drawRect");async function Cx(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:n,width:c,height:h}=e,g={rx:0,ry:0,classes:i??"",labelPaddingX:s??(n??0)*2,labelPaddingY:o??n??0},y=await Os(r,e,g);if(e.look==="handDrawn"){let N=m.svg(y),W=Gt(e,{}),H=y.select(".basic.label-container > path:nth-child(2)"),Y=H.node();if(!Y)return y;let j=null;if(Y instanceof SVGGraphicsElement)j=Y.getBBox();else return y;return y.insert(()=>N.line(j.x,j.y,j.x+j.width,j.y,W),".basic.label-container g.label"),y.insert(()=>N.line(j.x,j.y+j.height,j.x+j.width,j.y+j.height,W),".basic.label-container g.label"),H.remove(),y}let f=y.select(".basic.label-container"),b=(Number(f.attr("width"))||c)??0,F=(Number(f.attr("height"))||h)??0;if(b>0&&F>0)f.attr("stroke-dasharray",`${b} ${F}`);return y}t(Cx,"datastore");async function bx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,Zt(e)),y=h.width+o,f=h.height+n,b=f*0.2,F=-y/2,N=-f/2-b/2,{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:F,y:N+b},{x:-F,y:N+b},{x:-F,y:-N},{x:F,y:-N},{x:F,y:N},{x:-F,y:N},{x:-F,y:N+b}],K=H.polygon(j.map((rt)=>[rt.x,rt.y]),Y),Q=c.insert(()=>K,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return g.attr("transform",`translate(${F+(e.padding??0)/2-(h.x-(h.left??0))}, ${N+b+(e.padding??0)/2-(h.y-(h.top??0))})`),I(e,Q),e.intersect=function(rt){return w.rect(e,rt)},c}t(bx,"dividedRectangle");async function kx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?12:5;e.labelStyle=i;let n=e.padding??0,c=e.look==="neo"?16:n,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e),{ignoreMinWidth:!0}),y=Math.sqrt(g.width**2+g.height**2)/2,f=(e?.width?e?.width/2:y)+(c??0),b=f+o,F,{cssStyles:N}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{roughness:0.2,strokeWidth:2.5}),Y=Gt(e,{roughness:0.2,strokeWidth:1.5}),j=W.circle(0,0,b*2,H),K=W.circle(0,0,f*2,Y);F=h.insert("g",":first-child"),F.attr("class",Je(e.cssClasses)).attr("style",Je(N)),F.node()?.appendChild(j),F.node()?.appendChild(K)}else{F=h.insert("g",":first-child");let W=F.insert("circle",":first-child"),H=F.insert("circle");F.attr("class","basic label-container").attr("style",s),W.attr("class","outer-circle").attr("style",s).attr("r",b).attr("cx",0).attr("cy",0),H.attr("class","inner-circle").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0)}return I(e,F),e.intersect=function(W){return a.info("DoubleCircle intersect",e,b,W),w.circle(e,b,W)},h}t(kx,"doublecircle");async function wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,e,Zt(e)),{theme:h,themeVariables:g}=l();Ze(o,e.colorIndex,h,g.borderColorArray);let y=c??10,f=n.width/2+y*2,b=n.height/2+y*2,F,{cssStyles:N}=e;if(e.look==="handDrawn"){let W=m.svg(o),H=Gt(e,{}),Y=W.ellipse(0,0,f*2,b*2,H);if(F=o.insert(()=>Y,":first-child"),F.attr("class","basic label-container"),N)F.attr("style",N)}else F=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",f).attr("ry",b).attr("cx",0).attr("cy",0);return e.width=f*2,e.height=b*2,I(e,F),e.calcIntersect=function(W,H){let Y=W.width/2,j=W.height/2;return w.ellipse(W,Y,j,H)},e.intersect=function(W){return w.ellipse(e,f,b,W)},o}t(wx,"usecaseEllipse");function Sx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.label="",e.labelStyle=s;let n=r.insert("g").attr("class",Zt(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,g=m.svg(n),{nodeBorder:y}=i,f=Gt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let b=g.circle(0,0,c*2,f),F=n.insert(()=>b,":first-child");if(F.selectAll("path").attr("style",`fill: ${y} !important;`),h&&h.length>0&&e.look!=="handDrawn")F.selectAll("path").attr("style",h);if(o&&e.look!=="handDrawn")F.selectAll("path").attr("style",o);return I(e,F),e.intersect=function(N){return a.info("filledCircle intersect",e,{radius:c,point:N}),w.circle(e,c,N)},n}t(Sx,"filledCircle");var Fy=10,Ay=10;async function Tx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Fy)e.height=Fy;if(e.width=(e?.width??0)-n-n/2,e.width<Ay)e.width=Ay}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,Zt(e)),y=(e?.width?e?.width:h.width)+(n??0),f=e?.height?e?.height:y+h.height,b=f,F=[{x:0,y:-f},{x:b,y:-f},{x:b/2,y:0}],{cssStyles:N}=e,W=m.svg(c),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=Ee(F),j=W.path(Y,H),K=c.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");if(N&&e.look!=="handDrawn")K.selectChildren("path").attr("style",N);if(s&&e.look!=="handDrawn")K.selectChildren("path").attr("style",s);return e.width=y,e.height=f,I(e,K),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(Q){return a.info("Triangle intersect",e,F,Q),w.polygon(e,F,Q)},c}t(Tx,"flippedTriangle");async function _x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,Zt(e)),h=e.padding??12,g=Math.max(n.width+h*2,e.width??0,90),y=n.height+h*2,f=Math.max(Math.min(y*0.16,14),8),b=Math.max(y+f,e.height??0),F=b-f,N=Math.max(g*0.38,28),W=-b/2,H=[{x:-g/2,y:W},{x:-g/2+N,y:W},{x:-g/2+N,y:W+f},{x:g/2,y:W+f},{x:g/2,y:b/2},{x:-g/2,y:b/2}],Y=[`M${H[0].x},${H[0].y}`,...H.slice(1).map((rt)=>`L${rt.x},${rt.y}`),"Z"].join(" "),{cssStyles:j}=e,K;if(e.look==="handDrawn"){let it=m.svg(o).path(Y,Gt(e,{}));if(K=o.insert(()=>it,":first-child").attr("class","basic label-container"),j)K.attr("style",j)}else K=o.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")I(e,K);else I(e,K,{width:g,height:b});let Q=W+f+F/2;return c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${Q-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(rt){return w.polygon(e,H,rt)},o}t(_x,"folder");function Bx(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:n}=k(e);e.label="";let c=r.insert("g").attr("class",Zt(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,g=Math.max(70,e?.width??0),y=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")g=Math.max(10,e?.width??0),y=Math.max(70,e?.height??0);let f=-1*g/2,b=-1*y/2,F=m.svg(c),N=Gt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")N.roughness=0,N.fillStyle="solid";let W=F.rectangle(f,b,g,y,N),H=c.insert(()=>W,":first-child");if(h&&e.look!=="handDrawn")H.selectAll("path").attr("style",h);if(n&&e.look!=="handDrawn")H.selectAll("path").attr("style",n);I(e,H);let Y=s?.padding??0;if(e.width&&e.height)e.width+=Y/2||0,e.height+=Y/2||0;return e.intersect=function(j){return w.rect(e,j)},c}t(Bx,"forkJoin");async function vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=15,n=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-h*2,e.height<n)e.height=n;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:g,bbox:y}=await P(r,e,Zt(e)),f=(e?.height?e?.height:Math.max(n,y.height))+h*2,b=f/2,F=b-Math.sqrt(Math.max(0,b**2-(y.height/2)**2)),N=(e?.width?e?.width:Math.max(o,y.width)+F*2)+c*2,{cssStyles:W}=e,H=m.svg(g),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-N/2,y:-f/2},{x:N/2-b,y:-f/2},...Ri(-N/2+b,0,b,50,90,270),{x:N/2-b,y:f/2},{x:-N/2,y:f/2}],K=Ee(j),Q=H.path(K,Y),rt=g.insert(()=>Q,":first-child");if(rt.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")rt.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")rt.selectChildren("path").attr("style",s);return I(e,rt),e.intersect=function(it){return a.info("Pill intersect",e,{radius:b,point:it}),w.polygon(e,j,it)},g}t(vx,"halfRoundedRectangle");var oS=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 Lx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let n=e.padding??0,c=70,h=32,g=e.look==="neo"?c:n,y=e.look==="neo"?h:n;if(e.width||e.height){let Q=(e.height??0)/o;e.width=(e?.width??0)-2*Q-y,e.height=(e.height??0)-g}let{shapeSvg:f,bbox:b}=await P(r,e,Zt(e)),F=(e?.height?e?.height:b.height)+g,N=F/o,W=(e?.width?e?.width:b.width)+2*N+y,H=[{x:N,y:0},{x:W-N,y:0},{x:W,y:-F/2},{x:W-N,y:-F},{x:N,y:-F},{x:0,y:-F/2}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let K=m.svg(f),Q=Gt(e,{}),rt=oS(0,0,W,F,N),it=K.path(rt,Q);if(Y=f.insert(()=>it,":first-child").attr("transform",`translate(${-W/2}, ${F/2})`),j)Y.attr("style",j)}else Y=Xi(f,W,F,H);if(s)Y.attr("style",s);return e.width=W,e.height=F,I(e,Y),e.intersect=function(K){return w.polygon(e,H,K)},f}t(Lx,"hexagon");async function Fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await P(r,e,Zt(e)),n=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:h}=e,g=m.svg(o),y=Gt(e,{});if(e.look!=="handDrawn")y.roughness=0,y.fillStyle="solid";let f=[{x:0,y:0},{x:n,y:0},{x:0,y:c},{x:n,y:c}],b=Ee(f),F=g.path(b,y),N=o.insert(()=>F,":first-child");if(N.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn")N.selectChildren("path").attr("style",h);if(s&&e.look!=="handDrawn")N.selectChildren("path").attr("style",s);return N.attr("transform",`translate(${-n/2}, ${-c/2})`),I(e,N),e.intersect=function(W){return a.info("Pill intersect",e,{points:f}),w.polygon(e,f,W)},o}t(Fx,"hourglass");async function Ax(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:b}=await P(r,e,"icon-shape default"),F=e.pos==="t",N=h,W=h,{nodeBorder:H}=i,{stylesMap:Y}=vi(e),j=-W/2,K=-N/2,Q=e.label?8:0,rt=m.svg(y),it=Gt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ct=rt.rectangle(j,K,W,N,it),lt=Math.max(W,f.width),pt=N+f.height+Q,bt=rt.rectangle(-lt/2,-pt/2,lt,pt,{...it,fill:"transparent",stroke:"none"}),vt=y.insert(()=>ct,":first-child"),wt=y.insert(()=>bt);if(e.icon){let kt=y.append("g");kt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let st=kt.node().getBBox(),{width:at,height:xt,x:ot,y:St}=st;kt.attr("transform",`translate(${-at/2-ot},${F?f.height/2+Q/2-xt/2-St:-f.height/2-Q/2-xt/2-St})`),kt.attr("style",`color: ${Y.get("stroke")??H};`)}return b.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${F?-pt/2:pt/2-f.height})`),vt.attr("transform",`translate(0,${F?f.height/2+Q/2:-f.height/2-Q/2})`),I(e,wt),e.intersect=function(kt){if(a.info("iconSquare intersect",e,kt),!e.label)return w.rect(e,kt);let st=e.x??0,at=e.y??0,xt=e.height??0,ot=[];if(F)ot=[{x:st-f.width/2,y:at-xt/2},{x:st+f.width/2,y:at-xt/2},{x:st+f.width/2,y:at-xt/2+f.height+Q},{x:st+W/2,y:at-xt/2+f.height+Q},{x:st+W/2,y:at+xt/2},{x:st-W/2,y:at+xt/2},{x:st-W/2,y:at-xt/2+f.height+Q},{x:st-f.width/2,y:at-xt/2+f.height+Q}];else ot=[{x:st-W/2,y:at-xt/2},{x:st+W/2,y:at-xt/2},{x:st+W/2,y:at-xt/2+N},{x:st+f.width/2,y:at-xt/2+N},{x:st+f.width/2/2,y:at+xt/2},{x:st-f.width/2,y:at+xt/2},{x:st-f.width/2,y:at-xt/2+N},{x:st-W/2,y:at-xt/2+N}];return w.polygon(e,ot,kt)},y}t(Ax,"icon");async function Mx(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:b}=await P(r,e,"icon-shape default"),F=20,N=e.label?8:0,W=e.pos==="t",{nodeBorder:H,mainBkg:Y}=i,{stylesMap:j}=vi(e),K=m.svg(y),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let rt=j.get("fill");Q.stroke=rt??Y;let it=y.append("g");if(e.icon)it.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ct=it.node().getBBox(),{width:lt,height:pt,x:bt,y:vt}=ct,wt=Math.max(lt,pt)*Math.SQRT2+F*2,kt=K.circle(0,0,wt,Q),st=Math.max(wt,f.width),at=wt+f.height+N,xt=K.rectangle(-st/2,-at/2,st,at,{...Q,fill:"transparent",stroke:"none"}),ot=y.insert(()=>kt,":first-child"),St=y.insert(()=>xt);return it.attr("transform",`translate(${-lt/2-bt},${W?f.height/2+N/2-pt/2-vt:-f.height/2-N/2-pt/2-vt})`),it.attr("style",`color: ${j.get("stroke")??H};`),b.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${W?-at/2:at/2-f.height})`),ot.attr("transform",`translate(0,${W?f.height/2+N/2:-f.height/2-N/2})`),I(e,St),e.intersect=function(Lt){return a.info("iconSquare intersect",e,Lt),w.rect(e,Lt)},y}t(Mx,"iconCircle");async function Ex(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:b,label:F}=await P(r,e,"icon-shape default"),N=e.pos==="t",W=h+b*2,H=h+b*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:K}=vi(e),Q=-H/2,rt=-W/2,it=e.label?8:0,ct=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let pt=K.get("fill");lt.stroke=pt??j;let bt=ct.path(Jr(Q,rt,H,W,5),lt),vt=Math.max(H,f.width),wt=W+f.height+it,kt=ct.rectangle(-vt/2,-wt/2,vt,wt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>bt,":first-child").attr("class","icon-shape2"),at=y.insert(()=>kt);if(e.icon){let xt=y.append("g");xt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=xt.node().getBBox(),{width:St,height:Lt,x:Yt,y:Ht}=ot;xt.attr("transform",`translate(${-St/2-Yt},${N?f.height/2+it/2-Lt/2-Ht:-f.height/2-it/2-Lt/2-Ht})`),xt.attr("style",`color: ${K.get("stroke")??Y};`)}return F.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${N?-wt/2:wt/2-f.height})`),st.attr("transform",`translate(0,${N?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(xt){if(a.info("iconSquare intersect",e,xt),!e.label)return w.rect(e,xt);let ot=e.x??0,St=e.y??0,Lt=e.height??0,Yt=[];if(N)Yt=[{x:ot-f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St+Lt/2},{x:ot-H/2,y:St+Lt/2},{x:ot-H/2,y:St-Lt/2+f.height+it},{x:ot-f.width/2,y:St-Lt/2+f.height+it}];else Yt=[{x:ot-H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2+W},{x:ot+f.width/2,y:St-Lt/2+W},{x:ot+f.width/2/2,y:St+Lt/2},{x:ot-f.width/2,y:St+Lt/2},{x:ot-f.width/2,y:St-Lt/2+W},{x:ot-H/2,y:St-Lt/2+W}];return w.polygon(e,Yt,xt)},y}t(Ex,"iconRounded");async function Ox(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:b,label:F}=await P(r,e,"icon-shape default"),N=e.pos==="t",W=h+b*2,H=h+b*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:K}=vi(e),Q=-H/2,rt=-W/2,it=e.label?8:0,ct=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let pt=K.get("fill");lt.stroke=pt??j;let bt=ct.path(Jr(Q,rt,H,W,0.1),lt),vt=Math.max(H,f.width),wt=W+f.height+it,kt=ct.rectangle(-vt/2,-wt/2,vt,wt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>bt,":first-child"),at=y.insert(()=>kt);if(e.icon){let xt=y.append("g");xt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=xt.node().getBBox(),{width:St,height:Lt,x:Yt,y:Ht}=ot;xt.attr("transform",`translate(${-St/2-Yt},${N?f.height/2+it/2-Lt/2-Ht:-f.height/2-it/2-Lt/2-Ht})`),xt.attr("style",`color: ${K.get("stroke")??Y};`)}return F.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${N?-wt/2:wt/2-f.height})`),st.attr("transform",`translate(0,${N?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(xt){if(a.info("iconSquare intersect",e,xt),!e.label)return w.rect(e,xt);let ot=e.x??0,St=e.y??0,Lt=e.height??0,Yt=[];if(N)Yt=[{x:ot-f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St+Lt/2},{x:ot-H/2,y:St+Lt/2},{x:ot-H/2,y:St-Lt/2+f.height+it},{x:ot-f.width/2,y:St-Lt/2+f.height+it}];else Yt=[{x:ot-H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2+W},{x:ot+f.width/2,y:St-Lt/2+W},{x:ot+f.width/2/2,y:St+Lt/2},{x:ot-f.width/2,y:St+Lt/2},{x:ot-f.width/2,y:St-Lt/2+W},{x:ot-H/2,y:St-Lt/2+W}];return w.polygon(e,Yt,xt)},y}t(Ox,"iconSquare");async function Ix(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),n=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/n;let{labelStyles:c}=k(e);e.labelStyle=c;let h=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let g=Math.max(e.label?h??0:0,e?.assetWidth??o),y=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:g:g,f=e.constraint==="on"?y/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(y,h??0);let{shapeSvg:b,bbox:F,label:N}=await P(r,e,"image-shape default"),W=e.pos==="t",H=-y/2,Y=-f/2,j=e.label?8:0,K=m.svg(b),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let rt=K.rectangle(H,Y,y,f,Q),it=Math.max(y,F.width),ct=f+F.height+j,lt=K.rectangle(-it/2,-ct/2,it,ct,{...Q,fill:"none",stroke:"none"}),pt=b.insert(()=>rt,":first-child"),bt=b.insert(()=>lt);if(e.img){let vt=b.append("image");vt.attr("href",e.img),vt.attr("width",y),vt.attr("height",f),vt.attr("preserveAspectRatio","none"),vt.attr("transform",`translate(${-y/2},${W?ct/2-f:-ct/2})`)}return N.attr("transform",`translate(${-F.width/2-(F.x-(F.left??0))},${W?-f/2-F.height/2-j/2:f/2-F.height/2+j/2})`),pt.attr("transform",`translate(0,${W?F.height/2+j/2:-F.height/2-j/2})`),I(e,bt),e.intersect=function(vt){if(a.info("iconSquare intersect",e,vt),!e.label)return w.rect(e,vt);let wt=e.x??0,kt=e.y??0,st=e.height??0,at=[];if(W)at=[{x:wt-F.width/2,y:kt-st/2},{x:wt+F.width/2,y:kt-st/2},{x:wt+F.width/2,y:kt-st/2+F.height+j},{x:wt+y/2,y:kt-st/2+F.height+j},{x:wt+y/2,y:kt+st/2},{x:wt-y/2,y:kt+st/2},{x:wt-y/2,y:kt-st/2+F.height+j},{x:wt-F.width/2,y:kt-st/2+F.height+j}];else at=[{x:wt-y/2,y:kt-st/2},{x:wt+y/2,y:kt-st/2},{x:wt+y/2,y:kt-st/2+f},{x:wt+F.width/2,y:kt-st/2+f},{x:wt+F.width/2/2,y:kt+st/2},{x:wt-F.width/2,y:kt+st/2},{x:wt-F.width/2,y:kt-st/2+f},{x:wt-y/2,y:kt-st/2+f}];return w.polygon(e,at,vt)},b}t(Ix,"imageSquare");async function $x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=Math.max(g.height+n*2,e.height??0),f=Math.max(g.width+c*2,(e.width??0)-y),b=[{x:0,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:-3*y/6,y:-y}],F,{cssStyles:N}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Ee(b),j=W.path(Y,H);if(F=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),N)F.attr("style",N)}else F=Xi(h,f,y,b);if(s)F.attr("style",s);return e.width=f,e.height=y,I(e,F),e.intersect=function(W){return w.polygon(e,b,W)},h}t($x,"inv_trapezoid");async function Dx(r,e){let{shapeSvg:i,bbox:s,label:o}=await P(r,e,"label"),n=i.insert("rect",":first-child"),c=0.1,h=0.1;return n.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))})`),I(e,n),e.intersect=function(g){return w.rect(e,g)},i}t(Dx,"labelRect");async function Px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),b=[{x:0,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:-(3*y)/6,y:-y}],F,{cssStyles:N}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Ee(b),j=W.path(Y,H);if(F=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),N)F.attr("style",N)}else F=Xi(h,f,y,b);if(s)F.attr("style",s);return e.width=f,e.height=y,I(e,F),e.intersect=function(W){return w.polygon(e,b,W)},h}t(Px,"lean_left");async function Rx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),b=[{x:-3*y/6,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:0,y:-y}],F,{cssStyles:N}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Ee(b),j=W.path(Y,H);if(F=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),N)F.attr("style",N)}else F=Xi(h,f,y,b);if(s)F.attr("style",s);return e.width=f,e.height=y,I(e,F),e.intersect=function(W){return w.polygon(e,b,W)},h}t(Rx,"lean_right");function qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",Zt(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,c=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),g=7,y=[{x:c,y:0},{x:0,y:h+g/2},{x:c-2*g,y:h+g/2},{x:0,y:2*h},{x:c,y:h-g/2},{x:2*g,y:h-g/2}],f=m.svg(o),b=Gt(e,{});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let F=Ee(y),N=f.path(F,b),W=o.insert(()=>N,":first-child");if(W.attr("class","outer-path"),n&&e.look!=="handDrawn")W.selectAll("path").attr("style",n);if(s&&e.look!=="handDrawn")W.selectAll("path").attr("style",s);return W.attr("transform",`translate(-${c/2},${-h})`),I(e,W),e.intersect=function(H){return a.info("lightningBolt intersect",e,H),w.polygon(e,y,H)},o}t(qx,"lightningBolt");var sS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),aS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),nS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),My=10,Ey=10;async function Nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let j=e.width??0;if(e.width=(e.width??0)-n,e.width<Ey)e.width=Ey;let Q=j/2/(2.5+j/50);if(e.height=(e.height??0)-c-Q*3,e.height<My)e.height=My}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,Zt(e)),f=(e?.width?e?.width:g.width)+n*2,b=f/2,F=b/(2.5+f/50),N=(e?.height?e?.height:g.height)+F+c*2,W=N*0.1,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(h),K=aS(0,0,f,N,b,F,W),Q=nS(0,F,f,N,b,F),rt=Gt(e,{}),it=j.path(K,rt),ct=j.path(Q,rt);if(h.insert(()=>ct,":first-child").attr("class","line"),H=h.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=sS(0,0,f,N,b,F,W);H=h.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",Je(Y)).attr("style",s)}return H.attr("label-offset-y",F),H.attr("transform",`translate(${-f/2}, ${-(N/2+F)})`),I(e,H),y.attr("transform",`translate(${-(g.width/2)-(g.x-(g.left??0))}, ${-(g.height/2)+F-(g.y-(g.top??0))})`),e.intersect=function(j){let K=w.rect(e,j),Q=K.x-(e.x??0);if(b!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(K.y-(e.y??0))>(e.height??0)/2-F)){let rt=F*F*(1-Q*Q/(b*b));if(rt>0)rt=Math.sqrt(rt);if(rt=F-rt,j.y-(e.y??0)>0)rt=-rt;K.y+=rt}return K},h}t(Nx,"linedCylinder");async function Wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let rt=e.width;if(e.width=(rt??0)*10/11-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,Zt(e)),f=(e?.width?e?.width:g.width)+(n??0)*2,b=(e?.height?e?.height:g.height)+(c??0)*2,F=e.look==="neo"?b/4:b/8,N=b+F,{cssStyles:W}=e,H=m.svg(h),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-f/2-f/2*0.1,y:-N/2},{x:-f/2-f/2*0.1,y:N/2},...Ho(-f/2-f/2*0.1,N/2,f/2+f/2*0.1,N/2,F,0.8),{x:f/2+f/2*0.1,y:-N/2},{x:-f/2-f/2*0.1,y:-N/2},{x:-f/2,y:-N/2},{x:-f/2,y:N/2*1.1},{x:-f/2,y:-N/2}],K=H.polygon(j.map((rt)=>[rt.x,rt.y]),Y),Q=h.insert(()=>K,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return Q.attr("transform",`translate(0,${-F/2})`),y.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*0.1/2-(g.x-(g.left??0))},${-b/2+(e.padding??0)-F-(g.y-(g.top??0))})`),I(e,Q),e.intersect=function(rt){return w.polygon(e,j,rt)},h}t(Wx,"linedWaveEdgedRect");var lS=56,Uf=72,Oy=8,Iy=2,hS=8,cS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},$y=Math.PI/3,Dy=0.6,jf=t((r,e)=>{let i=e*Dy,s=e*Math.sqrt(1-Dy**2),o=Math.cos($y),n=-Math.sin($y),c=i*-n,h=r+i*o,g=s*o,y=s*n;return`M ${c-g} ${h-y} L ${c+g} ${h+y}`},"businessMarkerPathForCircle"),uS={normal:jf(-24,12),hollow:jf(-23,9),awesome:jf(-21,13),icon:"M 12 -8 L 26 -26"},Py=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"),od=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let h=m.svg(r).path(i,Gt(e,o?{fill:"none"}:{}));return r.insert(()=>h,":first-child").attr("class",s)}let n=r.append("path").attr("class",s).attr("d",i);if(o)n.attr("fill","none");return n},"appendActorPath"),fS=t((r,e,i,s,o,n,c=!1)=>{if(e.look==="handDrawn"){let y=m.svg(r).circle(i,s,o*2,Gt(e,c?{fill:"none"}:{}));return r.insert(()=>y,":first-child").attr("class",n)}let h=r.append("circle").attr("class",n).attr("cx",i).attr("cy",s).attr("r",o);if(c)h.attr("fill","none");return h},"appendActorCircle");var dS=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",uS[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function gn(r,e,i,s){let{labelStyles:o,nodeStyles:n}=k(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:h,bbox:g,label:y}=await P(r,c,Zt(e,`usecase-actor-variant usecase-actor-${i}`)),f=e.accessibleName??e.label;if(f)h.attr("role","img").attr("aria-label",f);y.attr("class","label actor-label usecase-actor-label");let{theme:b,themeVariables:F}=l();Ze(h,e.colorIndex,b,F.borderColorArray);let N,W;if(e.stereotype){let pt=await es(h,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});N=pt.label.attr("class","label usecase-stereotype"),W=pt.bbox}let H=h.append("g").attr("class",`usecase-actor-glyph ${cS[i]}`).attr("style",n||null);await s(H,e),dS(H,e,i);let Y=e.padding??hS,j=W?.height??0,K=Uf+Oy+g.height+(W?j+Iy:0),Q=Math.max(lS,g.width,W?.width??0)+Y*2,rt=K+Y*2,it=-K/2;H.attr("transform",`translate(0,${it+Uf/2})`);let ct=it+Uf+Oy;if(N&&W)ct+=j/2,Py(N,W,ct),ct+=j/2+Iy;Py(y,g,ct+g.height/2);let lt=h.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-Q/2).attr("y",-rt/2).attr("width",Q).attr("height",rt).attr("opacity",0).attr("aria-hidden","true");return I(e,lt),e.intersect=(pt)=>w.rect(e,pt),h}t(gn,"renderUsecaseActor");var pS=["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 zx(r,e){return gn(r,e,"normal",(i,s)=>{od(i,s,pS,"usecase-actor-stick")})}t(zx,"usecaseActor");var gS=["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 Hx(r,e){return gn(r,e,"awesome",(i,s)=>{od(i,s,gS,"usecase-actor-awesome-silhouette")})}t(Hx,"usecaseActorAwesome");var mS=["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 Yx(r,e){return gn(r,e,"hollow",(i,s)=>{fS(i,s,0,-23,9,"usecase-actor-hollow-head",!0),od(i,s,mS,"usecase-actor-hollow-body",!0)})}t(Yx,"usecaseActorHollow");var Fs=52,Ry=42,qy=-2,yS=t(async(r,e)=>{let i=-Fs/2,s=qy-Fs/2;if(e.look==="handDrawn"){let f=m.svg(r).rectangle(i,s,Fs,Fs,Gt(e,{}));r.insert(()=>f,":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",Fs).attr("height",Fs).attr("rx",4).attr("ry",4);let o=e.icon??"",n=await Dl(o.includes(":")?o:`fa:${o}`),c=await nt(o,{height:Ry,width:Ry,fallbackPrefix:"fa"}),h=r.append("g").attr("class",`usecase-actor-icon-symbol${n?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),g=h.node()?.getBBox();if(g)h.attr("transform",`translate(${-g.width/2-g.x},${qy-g.height/2-g.y})`)},"drawIconActor");async function Ux(r,e){return gn(r,e,"icon",yS)}t(Ux,"usecaseActorIcon");var Ny=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 jx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let n=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:h,halfPadding:g,label:y}=await P(r,n,Zt(e,"usecase-business-shape"));y.attr("class","label usecase-label");let{theme:f,themeVariables:b}=l();Ze(c,e.colorIndex,f,b.borderColorArray);let F,N;if(i.stereotype){let st=await es(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});F=st.label.attr("class","label usecase-stereotype"),N=st.bbox}let W=N?2:0,H=h.height+(N?.height??0)+W,Y=Math.max(h.width,N?.width??0),j=g??10,K=Y/2+j*2,Q=H/2+j*2,rt=Math.min(Math.max(j/5,1),j/2),it=Y/2+rt,ct=K-rt,lt=it/K,pt=ct/K,bt=Q*Math.sqrt(Math.max(0,1-lt*lt)),vt=-Q*Math.sqrt(Math.max(0,1-pt*pt));if(F&&N)Ny(F,N,-H/2+N.height/2);Ny(y,h,H/2-h.height/2);let wt;if(e.look==="handDrawn"){let at=m.svg(c).ellipse(0,0,K*2,Q*2,Gt(e,{}));wt=c.insert(()=>at,":first-child").attr("class","basic label-container usecase-business-ellipse")}else wt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",K).attr("ry",Q).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${it} ${bt} L ${ct} ${vt}`).attr("fill","none").attr("style",o||null);let kt=i.accessibleName??i.label;if(kt)c.attr("role","img").attr("aria-label",kt);return I(e,wt),e.calcIntersect=(st,at)=>w.ellipse(st,st.width/2,st.height/2,at),e.intersect=(st)=>w.ellipse(e,K,Q,st),c}t(jx,"usecaseBusiness");var Gf=8,Wy=4,xS=1,Xf=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),n=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-n})`)},"positionLabel"),CS=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:xS},"numericStrokeWidth");async function Gx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e),{stylesMap:n}=vi(e);e.labelStyle=s;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,Zt(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);g.attr("class","label usecase-json-title");let y=c.append("g").attr("class","usecase-json-table-grid"),f=[];for(let st of i.jsonRows??[]){let at=await es(y,st.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),xt=await es(y,st.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});f.push({key:{label:at.label.attr("class","label usecase-json-key"),bbox:at.bbox},value:{label:xt.label.attr("class","label usecase-json-value"),bbox:xt.bbox}})}let b=Math.max(0,...f.map(({key:st})=>st.bbox.width))+Gf*2,F=Math.max(0,...f.map(({value:st})=>st.bbox.width))+Gf*2,N=h.width+Gf*2,W=Math.max(N,b+F),H=F+Math.max(0,W-b-F),Y=h.height+Wy*2,j=f.map(({key:st,value:at})=>Math.max(st.bbox.height,at.bbox.height)+Wy*2),K=Y+j.reduce((st,at)=>st+at,0),Q=CS(n.get("stroke-width")),rt=W+Q*2,it=K+Q*2,ct=-W/2,lt=-K/2,pt=e.look==="handDrawn"?m.svg(c):void 0,bt=pt?Gt(e,{}):void 0,vt=t((st,at,xt,ot,St,Lt)=>{if(pt&&bt){let Yt=pt.rectangle(xt,ot,St,Lt,bt);return st.insert(()=>Yt,":first-child").attr("class",at)}return st.insert("rect",":first-child").attr("class",at).attr("x",xt).attr("y",ot).attr("width",St).attr("height",Lt).attr("style",o)},"insertCell"),wt=vt(c,"label-container usecase-json-border",-rt/2,-it/2,rt,it);vt(y,"usecase-json-cell usecase-json-title-cell",ct,lt,W,Y),y.node()?.append(g.node()),Xf(g,h,0,lt+Y/2);let kt=lt+Y;return f.forEach(({key:st,value:at},xt)=>{let ot=j[xt],St=y.append("g").attr("class","usecase-json-row").attr("data-row-index",xt).attr("transform",`translate(0,${kt})`);vt(St,"usecase-json-cell usecase-json-key-cell",ct,0,b,ot),vt(St,"usecase-json-cell usecase-json-value-cell",ct+b,0,H,ot),St.node()?.append(st.label.node(),at.label.node()),Xf(st.label,st.bbox,ct+b/2,ot/2),Xf(at.label,at.bbox,ct+b+H/2,ot/2),kt+=ot}),I(e,wt),e.intersect=(st)=>w.rect(e,st),c}t(Gx,"usecaseJsonTable");async function Xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2-2*h,10),e.height=Math.max((e?.height??0)-c*2-2*h,10);let{shapeSvg:g,bbox:y,label:f}=await P(r,e,Zt(e)),b=(e?.width?e?.width:y.width)+n*2+2*h,F=(e?.height?e?.height:y.height)+c*2+2*h,N=b-2*h,W=F-2*h,H=-N/2,Y=-W/2,{cssStyles:j}=e,K=m.svg(g),Q=Gt(e,{}),rt=[{x:H-h,y:Y+h},{x:H-h,y:Y+W+h},{x:H+N-h,y:Y+W+h},{x:H+N-h,y:Y+W},{x:H+N,y:Y+W},{x:H+N,y:Y+W-h},{x:H+N+h,y:Y+W-h},{x:H+N+h,y:Y-h},{x:H+h,y:Y-h},{x:H+h,y:Y},{x:H,y:Y},{x:H,y:Y+h}],it=[{x:H,y:Y+h},{x:H+N-h,y:Y+h},{x:H+N-h,y:Y+W},{x:H+N,y:Y+W},{x:H+N,y:Y},{x:H,y:Y}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ct=Ee(rt),lt=K.path(ct,Q),pt=Ee(it),bt=K.path(pt,Q);if(e.look!=="handDrawn")lt=Kf(lt),bt=Kf(bt);let vt=g.insert("g",":first-child");if(vt.insert(()=>lt),vt.insert(()=>bt),vt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")vt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")vt.selectAll("path").attr("style",s);return f.attr("transform",`translate(${-(y.width/2)-h-(y.x-(y.left??0))}, ${-(y.height/2)+h-(y.y-(y.top??0))})`),I(e,vt),e.intersect=function(wt){return w.polygon(e,rt,wt)},g}t(Xx,"multiRect");async function Vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,Zt(e)),h=e.padding??0,g=e.look==="neo"?16:h,y=e.look==="neo"?12:h,f=!0;if(e.width||e.height)f=!1,e.width=(e?.width??0)-g*2,e.height=(e?.height??0)-y*3;let b=Math.max(n.width,e?.width??0)+g*2,F=Math.max(n.height,e?.height??0)+y*3,N=e.look==="neo"?F/4:F/8,W=F+(f?N/2:-N/2),H=-b/2,Y=-W/2,j=10,{cssStyles:K}=e,Q=Ho(H-j,Y+W+j,H+b-j,Y+W+j,N,0.8),rt=Q?.[Q.length-1],it=[{x:H-j,y:Y+j},{x:H-j,y:Y+W+j},...Q,{x:H+b-j,y:rt.y-j},{x:H+b,y:rt.y-j},{x:H+b,y:rt.y-2*j},{x:H+b+j,y:rt.y-2*j},{x:H+b+j,y:Y-j},{x:H+j,y:Y-j},{x:H+j,y:Y},{x:H,y:Y},{x:H,y:Y+j}],ct=[{x:H,y:Y+j},{x:H+b-j,y:Y+j},{x:H+b-j,y:rt.y-j},{x:H+b,y:rt.y-j},{x:H+b,y:Y},{x:H,y:Y}],lt=m.svg(o),pt=Gt(e,{});if(e.look!=="handDrawn")pt.roughness=0,pt.fillStyle="solid";let bt=Ee(it),vt=lt.path(bt,pt),wt=Ee(ct),kt=lt.path(wt,pt),st=o.insert(()=>vt,":first-child");if(st.insert(()=>kt),st.attr("class","basic label-container outer-path"),K&&e.look!=="handDrawn")st.selectAll("path").attr("style",K);if(s&&e.look!=="handDrawn")st.selectAll("path").attr("style",s);return st.attr("transform",`translate(0,${-N/2})`),c.attr("transform",`translate(${-(n.width/2)-j-(n.x-(n.left??0))}, ${-(n.height/2)+j-N-(n.y-(n.top??0))})`),I(e,st),e.intersect=function(at){return w.polygon(e,it,at)},o}t(Vx,"multiWaveEdgedRectangle");async function Kx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);if(e.labelStyle=s,!(e.useHtmlLabels||Ce(x())))e.centerLabel=!0;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,Zt(e)),y=Math.max(h.width+(e.padding??0)*2,e?.width??0),f=Math.max(h.height+(e.padding??0)*2,e?.height??0),b=-y/2,F=-f/2,{cssStyles:N}=e,W=m.svg(c),H=Gt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=W.rectangle(b,F,y,f,H),j=c.insert(()=>Y,":first-child");if(j.attr("class","basic label-container outer-path"),g.attr("class","label noteLabel"),N&&e.look!=="handDrawn")j.selectAll("path").attr("style",N);if(o&&e.look!=="handDrawn")j.selectAll("path").attr("style",o);return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,j),e.intersect=function(K){return w.rect(e,K)},c}t(Kx,"note");var bS=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 Zx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,Zt(e)),c=n.width+(e.padding??0),h=n.height+(e.padding??0),g=c+h,y=0.5,f=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],b,{cssStyles:F}=e;if(e.look==="handDrawn"){let N=m.svg(o),W=Gt(e,{}),H=bS(0,0,g),Y=N.path(H,W);if(b=o.insert(()=>Y,":first-child").attr("transform",`translate(${-g/2+y}, ${g/2})`),F)b.attr("style",F)}else b=Xi(o,g,g,f),b.attr("transform",`translate(${-g/2+y}, ${g/2})`);if(s)b.attr("style",s);return I(e,b),e.calcIntersect=function(N,W){let H=N.width,Y=[{x:H/2,y:0},{x:H,y:-H/2},{x:H/2,y:-H},{x:0,y:-H/2}];return w.polygon(N,Y,W)},e.intersect=function(N){return this.calcIntersect(e,N)},o}t(Zx,"question");async function Qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:h,bbox:g,label:y}=await P(r,e,Zt(e)),f=g.width+(e.look==="neo"?n*2:n),b=Math.max(g.height+(e.look==="neo"?c*2:c),e.height??0),F=b/4,W=-Math.max(f,(e.width??0)-F)/2,H=-b/2,Y=H/2,j=[{x:W+Y,y:H},{x:W,y:0},{x:W+Y,y:-H},{x:-W,y:-H},{x:-W,y:H}],{cssStyles:K}=e,Q=m.svg(h),rt=Gt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let it=Ee(j),ct=Q.path(it,rt),lt=h.insert(()=>ct,":first-child");if(lt.attr("class","basic label-container outer-path"),K&&e.look!=="handDrawn")lt.selectAll("path").attr("style",K);if(s&&e.look!=="handDrawn")lt.selectAll("path").attr("style",s);return lt.attr("transform",`translate(${-Y/2},0)`),y.attr("transform",`translate(${-Y/2-g.width/2-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,lt),e.intersect=function(pt){return w.polygon(e,j,pt)},h}t(Qx,"rect_left_inv_arrow");async function Jx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=n.insert("g"),h=n.insert("g").attr("class","label").attr("style",s),{description:g,label:y}=e,f=await yi(h,y,e.labelStyle,!0,!0),b={width:0,height:0};if(Ce(l())){let pt=f.children[0],bt=p(f);b=pt.getBoundingClientRect(),bt.attr("width",b.width),bt.attr("height",b.height)}a.info("Text 2",g);let F=g||[],N=f.getBBox(),W=await yi(h,Array.isArray(F)?F.join("<br/>"):F,e.labelStyle,!0,!0),H=W.children[0],Y=p(W);b=H.getBoundingClientRect(),Y.attr("width",b.width),Y.attr("height",b.height);let j=(e.padding||0)/2;p(W).attr("transform","translate( "+(b.width>N.width?0:(N.width-b.width)/2)+", "+(N.height+j+5)+")"),p(f).attr("transform","translate( "+(b.width<N.width?0:-(N.width-b.width)/2)+", 0)"),b=h.node().getBBox(),h.attr("transform","translate("+-b.width/2+", "+(-b.height/2-j+3)+")");let K=b.width+(e.padding||0),Q=b.height+(e.padding||0),rt=-b.width/2-j,it=-b.height/2-j,ct,lt;if(e.look==="handDrawn"){let pt=m.svg(n),bt=Gt(e,{}),vt=pt.path(Jr(rt,it,K,Q,e.rx||0),bt),wt=pt.line(-b.width/2-j,-b.height/2-j+N.height+j,b.width/2+j,-b.height/2-j+N.height+j,bt);lt=n.insert(()=>(a.debug("Rough node insert CXC",vt),wt),":first-child"),ct=n.insert(()=>(a.debug("Rough node insert CXC",vt),vt),":first-child")}else ct=c.insert("rect",":first-child"),lt=c.insert("line"),ct.attr("class","outer title-state").attr("style",s).attr("x",-b.width/2-j).attr("y",-b.height/2-j).attr("width",b.width+(e.padding||0)).attr("height",b.height+(e.padding||0)),lt.attr("class","divider").attr("x1",-b.width/2-j).attr("x2",b.width/2+j).attr("y1",-b.height/2-j+N.height+j).attr("y2",-b.height/2-j+N.height+j);return I(e,ct),e.intersect=function(pt){return w.rect(e,pt)},n}t(Jx,"rectWithTitle");async function t0(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 Os(r,e,o)}t(t0,"roundedRect");var ts=8;async function e0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,Zt(e)),y=(e?.width??h.width)+o*2+(e.look==="neo"?ts:ts*2),f=(e?.height??h.height)+n*2,b=y-ts,F=f,N=ts-y/2,W=-f/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let K=[{x:N,y:W},{x:N+b,y:W},{x:N+b,y:W+F},{x:N-ts,y:W+F},{x:N-ts,y:W},{x:N,y:W},{x:N,y:W+F}],Q=Y.polygon(K.map((it)=>[it.x,it.y]),j),rt=c.insert(()=>Q,":first-child");if(rt.attr("class","basic label-container outer-path").attr("style",Je(H)),s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);if(H&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return g.attr("transform",`translate(${ts/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,rt),e.intersect=function(it){return w.rect(e,it)},c}t(e0,"shadedProcess");async function r0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:h,bbox:g,label:y}=await P(r,e,Zt(e)),f=(e?.width?e?.width:g.width)+n*2,b=((e?.height?e?.height:g.height)+c*2)*1.5,F=f,N=b/1.5,W=-F/2,H=-N/2,{cssStyles:Y}=e,j=m.svg(h),K=Gt(e,{});if(e.look!=="handDrawn")K.roughness=0,K.fillStyle="solid";let Q=[{x:W,y:H},{x:W,y:H+N},{x:W+F,y:H+N},{x:W+F,y:H-N/2}],rt=Ee(Q),it=j.path(rt,K),ct=h.insert(()=>it,":first-child");if(ct.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")ct.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")ct.selectChildren("path").attr("style",s);return ct.attr("transform",`translate(0, ${N/4})`),y.attr("transform",`translate(${-F/2+(e.padding??0)-(g.x-(g.left??0))}, ${-N/4+(e.padding??0)-(g.y-(g.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,Q,lt)},h}t(r0,"slopedRect");async function i0(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,n={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await Os(r,e,n);if(e.colorIndex!==void 0){let{theme:h,themeVariables:g}=l();Ze(c,e.colorIndex,h,g.borderColorArray)}return c}t(i0,"squareRect");var Jf=50,kS=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(Jf-1))),n=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-n),h:s}},"stadiumDimensions");async function o0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),{w:y,h:f}=kS(g,n,c),b=f/2,{cssStyles:F}=e,N=m.svg(h),W=Gt(e,{});if(e.look!=="handDrawn")W.roughness=0,W.fillStyle="solid";let H=[{x:-y/2+b,y:-f/2},{x:y/2-b,y:-f/2},...Ri(-y/2+b,0,b,Jf,90,270),{x:y/2-b,y:f/2},...Ri(y/2-b,0,b,Jf,270,450)],Y=Ee(H),j=N.path(Y,W),K=h.insert(()=>j,":first-child");if(K.attr("class","basic label-container outer-path"),F&&e.look!=="handDrawn")K.selectChildren("path").attr("style",F);if(s&&e.look!=="handDrawn")K.selectChildren("path").attr("style",s);return I(e,K),e.intersect=function(Q){return w.polygon(e,H,Q)},h}t(o0,"stadium");async function s0(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return Os(r,e,i)}t(s0,"state");function a0(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{cssStyles:n}=e,{lineColor:c,stateBorder:h,nodeBorder:g,nodeShadow:y}=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 f=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),b=m.svg(f),F=Gt(e,{});if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let N=b.circle(0,0,e.width,{...F,stroke:c,strokeWidth:2}),W=h??g,H=(e.width??0)*5/14,Y=b.circle(0,0,H,{...F,fill:W,stroke:W,strokeWidth:2,fillStyle:"solid"}),j=f.insert(()=>N,":first-child");if(j.insert(()=>Y),e.look!=="handDrawn")j.attr("class","outer-path");if(n)j.selectAll("path").attr("style",n);if(o)j.selectAll("path").attr("style",o);if(e.width<25&&y&&e.look!=="handDrawn"){let K=r.node()?.ownerSVGElement?.id??"",Q=K?`${K}-drop-shadow-small`:"drop-shadow-small";j.attr("style",`filter:url(#${Q})`)}return I(e,j),e.intersect=function(K){return w.circle(e,(e.width??0)/2,K)},f}t(a0,"stateEnd");function n0(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 n=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let g=m.svg(n).circle(0,0,e.width,Gg(s));c=n.insert(()=>g),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=n.insert("circle",":first-child"),c.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 h=r.node()?.ownerSVGElement?.id??"",g=h?`${h}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${g})`)}return I(e,c),e.intersect=function(h){return w.circle(e,(e.width??7)/2,h)},n}t(n0,"stateStart");var As=8;async function l0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e?.padding??8,n=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=Math.max(g.width+2*As+n,e.width??0),f=Math.max(g.height+c,e.height??0),b=y-2*As,F=f,N=-y/2,W=-f/2,H=[{x:0,y:0},{x:b,y:0},{x:b,y:-F},{x:0,y:-F},{x:0,y:0},{x:-8,y:0},{x:b+8,y:0},{x:b+8,y:-F},{x:-8,y:-F},{x:-8,y:0}];if(e.look==="handDrawn"){let Y=m.svg(h),j=Gt(e,{}),K=Y.rectangle(N,W,b+16,F,j),Q=Y.line(N+As,W,N+As,W+F,j),rt=Y.line(N+As+b,W,N+As+b,W+F,j);h.insert(()=>Q,":first-child"),h.insert(()=>rt,":first-child");let it=h.insert(()=>K,":first-child"),{cssStyles:ct}=e;it.attr("class","basic label-container").attr("style",Je(ct)),I(e,it)}else{let Y=Xi(h,b,F,H);if(s)Y.attr("style",s);I(e,Y)}return e.intersect=function(Y){return w.polygon(e,H,Y)},h}t(l0,"subroutine");var Vf=0.2;async function h0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-n*2-Vf*(e.height+c*2),10);let{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=(e?.height?e?.height:g.height)+c*2,f=Vf*y,b=Vf*y,N=(e?.width?e?.width:g.width)+n*2+f-f,W=y,H=-N/2,Y=-W/2,{cssStyles:j}=e,K=m.svg(h),Q=Gt(e,{}),rt=[{x:H-f/2,y:Y},{x:H+N+f/2,y:Y},{x:H+N+f/2,y:Y+W},{x:H-f/2,y:Y+W}],it=[{x:H+N-f/2,y:Y+W},{x:H+N+f/2,y:Y+W},{x:H+N+f/2,y:Y+W-b}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ct=Ee(rt),lt=K.path(ct,Q),pt=Ee(it),bt=K.path(pt,{...Q,fillStyle:"solid"}),vt=h.insert(()=>bt,":first-child");if(vt.insert(()=>lt,":first-child"),vt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")vt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")vt.selectAll("path").attr("style",s);return I(e,vt),e.intersect=function(wt){return w.polygon(e,rt,wt)},h}t(h0,"taggedRect");async function c0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,Zt(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),g=Math.max(n.height+(e.padding??0)*2,e?.height??0),y=g/8,f=0.2*h,b=0.2*g,F=g+y,{cssStyles:N}=e,W=m.svg(o),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-h/2-h/2*0.1,y:F/2},...Ho(-h/2-h/2*0.1,F/2,h/2+h/2*0.1,F/2,y,0.8),{x:h/2+h/2*0.1,y:-F/2},{x:-h/2-h/2*0.1,y:-F/2}],j=-h/2+h/2*0.1,K=-F/2-b*0.4,Q=[{x:j+h-f,y:(K+g)*1.3},{x:j+h,y:K+g-b},{x:j+h,y:(K+g)*0.9},...Ho(j+h,(K+g)*1.25,j+h-f,(K+g)*1.3,-g*0.02,0.5)],rt=Ee(Y),it=W.path(rt,H),ct=Ee(Q),lt=W.path(ct,{...H,fillStyle:"solid"}),pt=o.insert(()=>lt,":first-child");if(pt.insert(()=>it,":first-child"),pt.attr("class","basic label-container outer-path"),N&&e.look!=="handDrawn")pt.selectAll("path").attr("style",N);if(s&&e.look!=="handDrawn")pt.selectAll("path").attr("style",s);return pt.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-g/2+(e.padding??0)-y/2-(n.y-(n.top??0))})`),I(e,pt),e.intersect=function(bt){return w.polygon(e,Y,bt)},o}t(c0,"taggedWaveEdgedRectangle");async function u0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,Zt(e)),c=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),g=-c/2,y=-h/2,f=o.insert("rect",":first-child");return f.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",g).attr("y",y).attr("width",c).attr("height",h),I(e,f),e.intersect=function(b){return w.rect(e,b)},o}t(u0,"text");var wS=t((r,e,i,s,o,n)=>`M${r},${e}
229
+ `);return li(s)}t(Ym,"preprocessMarkdown");function Um(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Um,"nonMarkdownToLines");function ci(r,e={}){let i=Ym(r,e),s=Ue.lexer(i),o=[[]],n=0;function c(h,g="normal"){if(h.type==="text")h.text.split(`
230
+ `).forEach((f,B)=>{if(B!==0)n++,o.push([]);f.split(" ").forEach((v)=>{if(v=v.replace(/&#39;/g,"'"),v)o[n].push({content:v,type:g})})});else if(h.type==="strong"||h.type==="em")h.tokens.forEach((y)=>{c(y,h.type)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"})}return t(c,"processNode"),s.forEach((h)=>{if(h.type==="paragraph")h.tokens?.forEach((g)=>{c(g)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"});else o[n].push({content:h.raw,type:"normal"})}),o}t(ci,"markdownToLines");function jm(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(jm,"nonMarkdownToHTML");function Gm(r,{markdownAutoWrap:e}={}){let i=Ue.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 a.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Gm,"markdownToHTML");var _w=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(y){return setTimeout(y,16)};function s(){var y=this;y.reads=[],y.writes=[],y.raf=i.bind(r),e("initialized",y)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(y){e("run tasks");var f;while(f=y.shift())f()},"runTasks"),measure:t(function(y,f){e("measure");var B=!f?y:y.bind(f);return this.reads.push(B),o(this),B},"measure"),mutate:t(function(y,f){e("mutate");var B=!f?y:y.bind(f);return this.writes.push(B),o(this),B},"mutate"),clear:t(function(y){return e("clear",y),c(this.reads,y)||c(this.writes,y)},"clear"),extend:t(function(y){if(e("extend",y),typeof y!="object")throw Error("expected object");var f=Object.create(this);if(h(f,y),f.fastdom=this,f.initialize)f.initialize();return f},"extend"),catch:null};function o(y){if(!y.scheduled)y.scheduled=!0,y.raf(n.bind(null,y)),e("flush scheduled")}t(o,"scheduleFlush");function n(y){e("flush");var{writes:f,reads:B}=y,v;try{e("flushing reads",B.length),y.runTasks(B),e("flushing writes",f.length),y.runTasks(f)}catch(q){v=q}if(y.scheduled=!1,B.length||f.length)o(y);if(v)if(e("task errored",v.message),y.catch)y.catch(v);else throw v}t(n,"flush");function c(y,f){var B=y.indexOf(f);return!!~B&&!!y.splice(B,1)}t(c,"remove");function h(y,f){for(var B in f)if(f.hasOwnProperty(B))y[B]=f[B]}t(h,"mixin");var g=r.fastdom=r.fastdom||new s;return g}(typeof window<"u"?window:globalThis),Xm={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Af(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Af(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 Af(r,e,i,s){var{_tasks:o,fastdom:n}=r,c,h=new Promise(function(g,y){c=n[e](function(){o.delete(h);try{g(s?i.call(s):i())}catch(f){y(f)}},s)});return o.set(h,c),h}t(Af,"create");var{initialize:p9,mutate:g9,measure:m9,clear:y9}=Xm,Bw=Xm,vw=_w.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Bw),Oo=vw;function Vm(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Vm,"splitTextToChars");function Km(r,e){let i=Vm(e.content);return Of(r,[],i,e.type)}t(Km,"splitWordToFitWidth");function Of(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...n]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Of(r,c,n,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Of,"splitWordToFitWidthRecursion");function Zm(r,e){if(r.some(({content:i})=>i.includes(`
231
+ `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Xl(r,e)}t(Zm,"splitLineToFitWidth");function Xl(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 n=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(n),e(c))return Xl(r,e,i,c);if(s.length>0)i.push(s),r.unshift(n);else if(n.content){let[h,g]=Km(e,n);if(i.push([h]),g.content)r.unshift(g)}return Xl(r,e,i)}t(Xl,"splitLineToFitWidthRecursion");function Mf(r,e){if(e)r.attr("style",e)}t(Mf,"applyStyle");var Hm=16384;async function Qm(r,e,i,s,o=!1,n=x(),c=0){let h=r.append("foreignObject");h.attr("width",`${Math.min(10*i,Hm)}px`),h.attr("height",`${Math.min(10*i,Hm)}px`);let g=h.append("xhtml:div"),y=fe(e.label)?await wr(e.label.replace(b.lineBreakRegex,`
232
+ `),n):O(e.label,n),f=e.isNode?"nodeLabel":"edgeLabel",B=g.append("span");if(B.html(y),Mf(B,e.labelStyle),B.attr("class",`${f} ${s}`),Mf(g,e.labelStyle),g.style("display","table-cell"),g.style("white-space","nowrap"),g.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)g.style("max-width",i+"px"),g.style("text-align","center");if(g.attr("xmlns","http://www.w3.org/1999/xhtml"),o)g.attr("class","labelBkg");let v=await Oo.measure(()=>g.node().getBoundingClientRect());if(v.width===i)g.style("display","table"),g.style("white-space","break-spaces"),g.style("width",i+"px");else if(v.width<c)g.style("display","table"),g.style("width",c+"px"),g.style("text-align","center");return h.node()}t(Qm,"addHtmlSpan");function Vl(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(Vl,"createTspan");function Jm(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,i);let n=o.node().getComputedTextLength();return s.remove(),n}t(Jm,"computeWidthOfText");function Ki(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,[{content:i,type:"normal"}]);let n=o.node()?.getBoundingClientRect();if(n)s.remove();return n}t(Ki,"computeDimensionOfText");function ty(r,e,i,s=!1,o=!1){let c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),g=c.append("text").attr("y","-10.1");if(o)g.attr("text-anchor","middle");let y=0;for(let f of i){let B=t((q)=>Jm(c,1.1,q)<=r,"checkWidth"),v=B(f)?[f]:Zm(f,B);for(let q of v){let W=Vl(g,y,1.1,o);Kl(W,q),y++}}if(s){let f=g.node().getBBox(),B=2;return h.attr("x",f.x-2).attr("y",f.y-2).attr("width",f.width+4).attr("height",f.height+4),c.node()}else return g.node()}t(ty,"createFormattedText");function Ef(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(Ef,"decodeHTMLEntities");function Kl(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(Ef(i.content));else o.text(" "+Ef(i.content))})}t(Kl,"updateTextContentAndStyles");async function ey(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,n,c)=>(i.push((async()=>{let h=`${n}:${c}`;if(await Dl(h))return await nt(h,void 0,{class:"label-icon"});else return`<i class='${O(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ey,"replaceIconSubstring");var Le=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:n=!0,markdown:c=!0,isNode:h=!0,width:g=200,minWidth:y=0,addSvgBackground:f=!1}={},B)=>{if(a.debug("XYZ createText",e,i,s,o,n,h,"addSvgBackground: ",f),n){let v=c?Gm(e,B):jm(e),q=await ey(jt(v),B),W=e.replace(/\\\\/g,"\\"),H={isNode:h,label:fe(e)?W:q,labelStyle:i.replace("fill:","color:")};return await Qm(r,H,g,o,f,B,y)}else{let v=jt(e.replace(/<br\s*\/?>/g,"<br/>")),q=c?ci(v.replace("<br>","<br/>"),B):Um(v),W=ty(g,r,q,e?f:!1,!h);if(h){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).attr("style",H)}else{let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");p(W).select("rect").attr("style",H.replace(/background:/g,"fill:"));let Y=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).select("text").attr("style",Y)}if(s)p(W).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else p(W).selectAll("tspan.text-outer-tspan").classed("row",!0);return W}},"createText");var Jr=new Set(["redux-color","redux-dark-color"]),Lw=12,Fw=64,pe=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),se=t((r,e)=>r!=null&&Jr.has(r)&&pe(e),"isColorTheme"),Aw=/^[\w-]+$/,le=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Aw.test(e)?e:"classic"},"safeLook"),gt=t((r)=>pe(r)?r.length:0,"paletteSlotCount"),Ye=t((r,e)=>{if(pe(e))return gt(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Fw?r:Lw},"colorSlotCount"),Ze=t((r,e,i,s)=>{if(e===void 0||!se(i,s))return;let o=e%gt(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function If(r,e,i){if(r&&r.length){let[s,o]=e,n=Math.PI/180*i,c=Math.cos(n),h=Math.sin(n);for(let g of r){let[y,f]=g;g[0]=(y-s)*c-(f-o)*h+s,g[1]=(y-s)*h+(f-o)*c+o}}}function Mw(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ew(r,e,i,s=1){let o=i,n=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,h=[0,0];if(o)for(let y of c)If(y,h,o);let g=function(y,f,B){let v=[];for(let X of y){let Q=[...X];Mw(Q[0],Q[Q.length-1])||Q.push([Q[0][0],Q[0][1]]),Q.length>2&&v.push(Q)}let q=[];f=Math.max(f,0.1);let W=[];for(let X of v)for(let Q=0;Q<X.length-1;Q++){let rt=X[Q],it=X[Q+1];if(rt[1]!==it[1]){let ct=Math.min(rt[1],it[1]);W.push({ymin:ct,ymax:Math.max(rt[1],it[1]),x:ct===rt[1]?rt[0]:it[0],islope:(it[0]-rt[0])/(it[1]-rt[1])})}}if(W.sort((X,Q)=>X.ymin<Q.ymin?-1:X.ymin>Q.ymin?1:X.x<Q.x?-1:X.x>Q.x?1:X.ymax===Q.ymax?0:(X.ymax-Q.ymax)/Math.abs(X.ymax-Q.ymax)),!W.length)return q;let H=[],Y=W[0].ymin,j=0;for(;H.length||W.length;){if(W.length){let X=-1;for(let Q=0;Q<W.length&&!(W[Q].ymin>Y);Q++)X=Q;W.splice(0,X+1).forEach((Q)=>{H.push({s:Y,edge:Q})})}if(H=H.filter((X)=>!(X.edge.ymax<=Y)),H.sort((X,Q)=>X.edge.x===Q.edge.x?0:(X.edge.x-Q.edge.x)/Math.abs(X.edge.x-Q.edge.x)),(B!==1||j%f==0)&&H.length>1)for(let X=0;X<H.length;X+=2){let Q=X+1;if(Q>=H.length)break;let rt=H[X].edge,it=H[Q].edge;q.push([[Math.round(rt.x),Y],[Math.round(it.x),Y]])}Y+=B,H.forEach((X)=>{X.edge.x=X.edge.x+B*X.edge.islope}),j++}return q}(c,n,s);if(o){for(let y of c)If(y,h,-o);(function(y,f,B){let v=[];y.forEach((q)=>v.push(...q)),If(v,f,B)})(g,h,-o)}return g}function dn(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 n=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(n=o),Ew(r,o,s,n||1)}class sh{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=dn(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 ah(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 cy extends sh{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=dn(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,n=[],c=0.5*i*Math.cos(o),h=0.5*i*Math.sin(o);for(let[g,y]of s)ah([g,y])&&n.push([[g[0]-c,g[1]+h],[...y]],[[g[0]+c,g[1]-h],[...y]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class uy extends sh{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 fy{constructor(r){this.helper=r}fillPolygons(r,e){let i=dn(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 n=s/4;for(let c of r){let h=ah(c),g=h/s,y=Math.ceil(g)-1,f=h-y*s,B=(c[0][0]+c[1][0])/2-s/4,v=Math.min(c[0][1],c[1][1]);for(let q=0;q<y;q++){let W=v+f+q*s,H=B-n+2*Math.random()*n,Y=W-n+2*Math.random()*n,j=this.helper.ellipse(H,Y,o,o,e);i.push(...j.ops)}}return{type:"fillSketch",ops:i}}}class dy{constructor(r){this.helper=r}fillPolygons(r,e){let i=dn(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((n)=>{let c=ah(n),h=Math.floor(c/(i+s)),g=(c+s-h*(i+s))/2,y=n[0],f=n[1];y[0]>f[0]&&(y=n[1],f=n[0]);let B=Math.atan((f[1]-y[1])/(f[0]-y[0]));for(let v=0;v<h;v++){let q=v*(i+s),W=q+i,H=[y[0]+q*Math.cos(B)+g*Math.cos(B),y[1]+q*Math.sin(B)+g*Math.sin(B)],Y=[y[0]+W*Math.cos(B)+g*Math.cos(B),y[1]+W*Math.sin(B)+g*Math.sin(B)];o.push(...this.helper.doubleLineOps(H[0],H[1],Y[0],Y[1],e))}}),o}}class py{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=dn(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 n=ah(o),c=Math.round(n/(2*e)),h=o[0],g=o[1];h[0]>g[0]&&(h=o[1],g=o[0]);let y=Math.atan((g[1]-h[1])/(g[0]-h[0]));for(let f=0;f<c;f++){let B=2*f*e,v=2*(f+1)*e,q=Math.sqrt(2*Math.pow(e,2)),W=[h[0]+B*Math.cos(y),h[1]+B*Math.sin(y)],H=[h[0]+v*Math.cos(y),h[1]+v*Math.sin(y)],Y=[W[0]+q*Math.cos(y+Math.PI/4),W[1]+q*Math.sin(y+Math.PI/4)];s.push(...this.helper.doubleLineOps(W[0],W[1],Y[0],Y[1],i),...this.helper.doubleLineOps(Y[0],Y[1],H[0],H[1],i))}}),s}}var Ur={};class gy{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ow=0,$f=1,ry=2,Zl={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 Df(r,e){return r.type===e}function zf(r){let e=[],i=function(c){let h=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:Ow,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:$f,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:ry,text:""},h}(r),s="BOD",o=0,n=i[o];for(;!Df(n,ry);){let c=0,h=[];if(s==="BOD"){if(n.text!=="M"&&n.text!=="m")return zf("M0,0"+r);o++,c=Zl[n.text],s=n.text}else Df(n,$f)?c=Zl[s]:(o++,c=Zl[n.text],s=n.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let g=o;g<o+c;g++){let y=i[g];if(!Df(y,$f))throw Error("Param not a number: "+s+","+y.text);h[h.length]=+y.text}if(typeof Zl[s]!="number")throw Error("Bad segment: "+s);{let g={key:s,data:h};e.push(g),o+=c,n=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function my(r){let e=0,i=0,s=0,o=0,n=[];for(let{key:c,data:h}of r)switch(c){case"M":n.push({key:"M",data:[...h]}),[e,i]=h,[s,o]=h;break;case"m":e+=h[0],i+=h[1],n.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":n.push({key:"L",data:[...h]}),[e,i]=h;break;case"l":e+=h[0],i+=h[1],n.push({key:"L",data:[e,i]});break;case"C":n.push({key:"C",data:[...h]}),e=h[4],i=h[5];break;case"c":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"C",data:g}),e=g[4],i=g[5];break}case"Q":n.push({key:"Q",data:[...h]}),e=h[2],i=h[3];break;case"q":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"Q",data:g}),e=g[2],i=g[3];break}case"A":n.push({key:"A",data:[...h]}),e=h[5],i=h[6];break;case"a":e+=h[5],i+=h[6],n.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,i]});break;case"H":n.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],n.push({key:"V",data:[i]});break;case"S":n.push({key:"S",data:[...h]}),e=h[2],i=h[3];break;case"s":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"S",data:g}),e=g[2],i=g[3];break}case"T":n.push({key:"T",data:[...h]}),e=h[0],i=h[1];break;case"t":e+=h[0],i+=h[1],n.push({key:"T",data:[e,i]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=s,i=o}return n}function yy(r){let e=[],i="",s=0,o=0,n=0,c=0,h=0,g=0;for(let{key:y,data:f}of r){switch(y){case"M":e.push({key:"M",data:[...f]}),[s,o]=f,[n,c]=f;break;case"C":e.push({key:"C",data:[...f]}),s=f[4],o=f[5],h=f[2],g=f[3];break;case"L":e.push({key:"L",data:[...f]}),[s,o]=f;break;case"H":s=f[0],e.push({key:"L",data:[s,o]});break;case"V":o=f[0],e.push({key:"L",data:[s,o]});break;case"S":{let B=0,v=0;i==="C"||i==="S"?(B=s+(s-h),v=o+(o-g)):(B=s,v=o),e.push({key:"C",data:[B,v,...f]}),h=f[0],g=f[1],s=f[2],o=f[3];break}case"T":{let[B,v]=f,q=0,W=0;i==="Q"||i==="T"?(q=s+(s-h),W=o+(o-g)):(q=s,W=o);let H=s+2*(q-s)/3,Y=o+2*(W-o)/3,j=B+2*(q-B)/3,X=v+2*(W-v)/3;e.push({key:"C",data:[H,Y,j,X,B,v]}),h=q,g=W,s=B,o=v;break}case"Q":{let[B,v,q,W]=f,H=s+2*(B-s)/3,Y=o+2*(v-o)/3,j=q+2*(B-q)/3,X=W+2*(v-W)/3;e.push({key:"C",data:[H,Y,j,X,q,W]}),h=B,g=v,s=q,o=W;break}case"A":{let B=Math.abs(f[0]),v=Math.abs(f[1]),q=f[2],W=f[3],H=f[4],Y=f[5],j=f[6];if(B===0||v===0)e.push({key:"C",data:[s,o,Y,j,Y,j]}),s=Y,o=j;else if(s!==Y||o!==j)xy(s,o,Y,j,B,v,q,W,H).forEach(function(X){e.push({key:"C",data:X})}),s=Y,o=j;break}case"Z":e.push({key:"Z",data:[]}),s=n,o=c}i=y}return e}function nn(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function xy(r,e,i,s,o,n,c,h,g,y){let f=(B=c,Math.PI*B/180);var B;let v=[],q=0,W=0,H=0,Y=0;if(y)[q,W,H,Y]=y;else{[r,e]=nn(r,e,-f),[i,s]=nn(i,s,-f);let st=(r-i)/2,at=(e-s)/2,xt=st*st/(o*o)+at*at/(n*n);xt>1&&(xt=Math.sqrt(xt),o*=xt,n*=xt);let ot=o*o,St=n*n,Lt=ot*St-ot*at*at-St*st*st,Yt=ot*at*at+St*st*st,Ht=(h===g?-1:1)*Math.sqrt(Math.abs(Lt/Yt));H=Ht*o*at/n+(r+i)/2,Y=Ht*-n*st/o+(e+s)/2,q=Math.asin(parseFloat(((e-Y)/n).toFixed(9))),W=Math.asin(parseFloat(((s-Y)/n).toFixed(9))),r<H&&(q=Math.PI-q),i<H&&(W=Math.PI-W),q<0&&(q=2*Math.PI+q),W<0&&(W=2*Math.PI+W),g&&q>W&&(q-=2*Math.PI),!g&&W>q&&(W-=2*Math.PI)}let j=W-q;if(Math.abs(j)>120*Math.PI/180){let st=W,at=i,xt=s;W=g&&W>q?q+120*Math.PI/180*1:q+120*Math.PI/180*-1,v=xy(i=H+o*Math.cos(W),s=Y+n*Math.sin(W),at,xt,o,n,c,0,g,[W,st,H,Y])}j=W-q;let X=Math.cos(q),Q=Math.sin(q),rt=Math.cos(W),it=Math.sin(W),ct=Math.tan(j/4),lt=1.3333333333333333*o*ct,pt=1.3333333333333333*n*ct,bt=[r,e],vt=[r+lt*Q,e-pt*X],wt=[i+lt*it,s-pt*rt],kt=[i,s];if(vt[0]=2*bt[0]-vt[0],vt[1]=2*bt[1]-vt[1],y)return[vt,wt,kt].concat(v);{v=[vt,wt,kt].concat(v);let st=[];for(let at=0;at<v.length;at+=3){let xt=nn(v[at][0],v[at][1],f),ot=nn(v[at+1][0],v[at+1][1],f),St=nn(v[at+2][0],v[at+2][1],f);st.push([xt[0],xt[1],ot[0],ot[1],St[0],St[1]])}return st}}var Iw={randOffset:function(r,e){return me(r,e)},randOffsetWithRange:function(r,e,i){return rh(r,e,i)},ellipse:function(r,e,i,s,o){let n=by(i,s,o);return qf(r,e,o,n).opset},doubleLineOps:function(r,e,i,s,o){return Vo(r,e,i,s,o,!0)}};function Cy(r,e,i,s,o){return{type:"path",ops:Vo(r,e,i,s,o)}}function th(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let n=0;n<s-1;n++)o.push(...Vo(r[n][0],r[n][1],r[n+1][0],r[n+1][1],i));return e&&o.push(...Vo(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Cy(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function $w(r,e,i,s,o){return function(n,c){return th(n,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function iy(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Ql(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Ql(i[0],1.5*(1+0.22*e.roughness),ay(e));for(let n=1;n<i.length;n++){let c=i[n];if(c.length){let h=Ql(c,1*(1+0.2*e.roughness),e),g=e.disableMultiStroke?[]:Ql(c,1.5*(1+0.22*e.roughness),ay(e));for(let y of h)y.op!=="move"&&s.push(y);for(let y of g)y.op!=="move"&&o.push(y)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function by(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)),n=2*Math.PI/o,c=Math.abs(r/2),h=Math.abs(e/2),g=1-i.curveFitting;return c+=me(c*g,i),h+=me(h*g,i),{increment:n,rx:c,ry:h}}function qf(r,e,i,s){let[o,n]=ny(s.increment,r,e,s.rx,s.ry,1,s.increment*rh(0.1,rh(0.4,1,i),i),i),c=ih(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[h]=ny(s.increment,r,e,s.rx,s.ry,1.5,0,i),g=ih(h,null,i);c=c.concat(g)}return{estimatedPoints:n,opset:{type:"path",ops:c}}}function oy(r,e,i,s,o,n,c,h,g){let y=r,f=e,B=Math.abs(i/2),v=Math.abs(s/2);B+=me(0.01*B,g),v+=me(0.01*v,g);let q=o,W=n;for(;q<0;)q+=2*Math.PI,W+=2*Math.PI;W-q>2*Math.PI&&(q=0,W=2*Math.PI);let H=2*Math.PI/g.curveStepCount,Y=Math.min(H/2,(W-q)/2),j=ly(Y,y,f,B,v,q,W,1,g);if(!g.disableMultiStroke){let X=ly(Y,y,f,B,v,q,W,1.5,g);j.push(...X)}return c&&(h?j.push(...Vo(y,f,y+B*Math.cos(q),f+v*Math.sin(q),g),...Vo(y,f,y+B*Math.cos(W),f+v*Math.sin(W),g)):j.push({op:"lineTo",data:[y,f]},{op:"lineTo",data:[y+B*Math.cos(q),f+v*Math.sin(q)]})),{type:"path",ops:j}}function sy(r,e){let i=yy(my(zf(r))),s=[],o=[0,0],n=[0,0];for(let{key:c,data:h}of i)switch(c){case"M":n=[h[0],h[1]],o=[h[0],h[1]];break;case"L":s.push(...Vo(n[0],n[1],h[0],h[1],e)),n=[h[0],h[1]];break;case"C":{let[g,y,f,B,v,q]=h;s.push(...Dw(g,y,f,B,v,q,n,e)),n=[v,q];break}case"Z":s.push(...Vo(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:s}}function Pf(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,n=s.length;if(n>2){i.push({op:"move",data:[s[0][0]+me(o,e),s[0][1]+me(o,e)]});for(let c=1;c<n;c++)i.push({op:"lineTo",data:[s[c][0]+me(o,e),s[c][1]+me(o,e)]})}}return{type:"fillPath",ops:i}}function $s(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Ur[o])switch(o){case"zigzag":Ur[o]||(Ur[o]=new cy(s));break;case"cross-hatch":Ur[o]||(Ur[o]=new uy(s));break;case"dots":Ur[o]||(Ur[o]=new fy(s));break;case"dashed":Ur[o]||(Ur[o]=new dy(s));break;case"zigzag-line":Ur[o]||(Ur[o]=new py(s));break;default:o="hachure",Ur[o]||(Ur[o]=new sh(s))}return Ur[o]}(e,Iw).fillPolygons(r,e)}function ay(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function ky(r){return r.randomizer||(r.randomizer=new gy(r.seed||0)),r.randomizer.next()}function rh(r,e,i,s=1){return i.roughness*s*(ky(i)*(e-r)+r)}function me(r,e,i=1){return rh(-r,r,e,i)}function Vo(r,e,i,s,o,n=!1){let c=n?o.disableMultiStrokeFill:o.disableMultiStroke,h=Nf(r,e,i,s,o,!0,!1);if(c)return h;let g=Nf(r,e,i,s,o,!0,!0);return h.concat(g)}function Nf(r,e,i,s,o,n,c){let h=Math.pow(r-i,2)+Math.pow(e-s,2),g=Math.sqrt(h),y=1;y=g<200?1:g>500?0.4:-0.0016668*g+1.233334;let f=o.maxRandomnessOffset||0;f*f*100>h&&(f=g/10);let B=f/2,v=0.2+0.2*ky(o),q=o.bowing*o.maxRandomnessOffset*(s-e)/200,W=o.bowing*o.maxRandomnessOffset*(r-i)/200;q=me(q,o,y),W=me(W,o,y);let H=[],Y=()=>me(B,o,y),j=()=>me(f,o,y),X=o.preserveVertices;return n&&(c?H.push({op:"move",data:[r+(X?0:Y()),e+(X?0:Y())]}):H.push({op:"move",data:[r+(X?0:me(f,o,y)),e+(X?0:me(f,o,y))]})),c?H.push({op:"bcurveTo",data:[q+r+(i-r)*v+Y(),W+e+(s-e)*v+Y(),q+r+2*(i-r)*v+Y(),W+e+2*(s-e)*v+Y(),i+(X?0:Y()),s+(X?0:Y())]}):H.push({op:"bcurveTo",data:[q+r+(i-r)*v+j(),W+e+(s-e)*v+j(),q+r+2*(i-r)*v+j(),W+e+2*(s-e)*v+j(),i+(X?0:j()),s+(X?0:j())]}),H}function Ql(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+me(e,i),r[0][1]+me(e,i)]),s.push([r[0][0]+me(e,i),r[0][1]+me(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+me(e,i),r[o][1]+me(e,i)]),o===r.length-1&&s.push([r[o][0]+me(e,i),r[o][1]+me(e,i)]);return ih(s,null,i)}function ih(r,e,i){let s=r.length,o=[];if(s>3){let n=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let h=1;h+2<s;h++){let g=r[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*r[h+1][0]-c*r[h-1][0])/6,g[1]+(c*r[h+1][1]-c*r[h-1][1])/6],n[2]=[r[h+1][0]+(c*r[h][0]-c*r[h+2][0])/6,r[h+1][1]+(c*r[h][1]-c*r[h+2][1])/6],n[3]=[r[h+1][0],r[h+1][1]],o.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&e.length===2){let h=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+me(h,i),e[1]+me(h,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(...Nf(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function ny(r,e,i,s,o,n,c,h){let g=[],y=[];if(h.roughness===0){r/=4,y.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let f=0;f<=2*Math.PI;f+=r){let B=[e+s*Math.cos(f),i+o*Math.sin(f)];g.push(B),y.push(B)}y.push([e+s*Math.cos(0),i+o*Math.sin(0)]),y.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let f=me(0.5,h)-Math.PI/2;y.push([me(n,h)+e+0.9*s*Math.cos(f-r),me(n,h)+i+0.9*o*Math.sin(f-r)]);let B=2*Math.PI+f-0.01;for(let v=f;v<B;v+=r){let q=[me(n,h)+e+s*Math.cos(v),me(n,h)+i+o*Math.sin(v)];g.push(q),y.push(q)}y.push([me(n,h)+e+s*Math.cos(f+2*Math.PI+0.5*c),me(n,h)+i+o*Math.sin(f+2*Math.PI+0.5*c)]),y.push([me(n,h)+e+0.98*s*Math.cos(f+c),me(n,h)+i+0.98*o*Math.sin(f+c)]),y.push([me(n,h)+e+0.9*s*Math.cos(f+0.5*c),me(n,h)+i+0.9*o*Math.sin(f+0.5*c)])}return[y,g]}function ly(r,e,i,s,o,n,c,h,g){let y=n+me(0.1,g),f=[];f.push([me(h,g)+e+0.9*s*Math.cos(y-r),me(h,g)+i+0.9*o*Math.sin(y-r)]);for(let B=y;B<=c;B+=r)f.push([me(h,g)+e+s*Math.cos(B),me(h,g)+i+o*Math.sin(B)]);return f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ih(f,null,g)}function Dw(r,e,i,s,o,n,c,h){let g=[],y=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+0.3],f=[0,0],B=h.disableMultiStroke?1:2,v=h.preserveVertices;for(let q=0;q<B;q++)q===0?g.push({op:"move",data:[c[0],c[1]]}):g.push({op:"move",data:[c[0]+(v?0:me(y[0],h)),c[1]+(v?0:me(y[0],h))]}),f=v?[o,n]:[o+me(y[q],h),n+me(y[q],h)],g.push({op:"bcurveTo",data:[r+me(y[q],h),e+me(y[q],h),i+me(y[q],h),s+me(y[q],h),f[0],f[1]]});return g}function hn(r){return[...r]}function hy(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(hn(r[0]),hn(r[1]),hn(r[2]),hn(r[2]));else{let o=[];o.push(r[0],r[0]);for(let h=1;h<r.length;h++)o.push(r[h]),h===r.length-1&&o.push(r[h]);let n=[],c=1-e;s.push(hn(o[0]));for(let h=1;h+2<o.length;h++){let g=o[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*o[h+1][0]-c*o[h-1][0])/6,g[1]+(c*o[h+1][1]-c*o[h-1][1])/6],n[2]=[o[h+1][0]+(c*o[h][0]-c*o[h+2][0])/6,o[h+1][1]+(c*o[h][1]-c*o[h+2][1])/6],n[3]=[o[h+1][0],o[h+1][1]],s.push(n[1],n[2],n[3])}}return s}function eh(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Pw(r,e,i){let s=eh(e,i);if(s===0)return eh(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)),eh(r,as(e,i,o))}function as(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Wf(r,e,i,s){let o=s||[];if(function(h,g){let y=h[g+0],f=h[g+1],B=h[g+2],v=h[g+3],q=3*f[0]-2*y[0]-v[0];q*=q;let W=3*f[1]-2*y[1]-v[1];W*=W;let H=3*B[0]-2*v[0]-y[0];H*=H;let Y=3*B[1]-2*v[1]-y[1];return Y*=Y,q<H&&(q=H),W<Y&&(W=Y),q+W}(r,e)<i){let h=r[e+0];if(o.length)(n=o[o.length-1],c=h,Math.sqrt(eh(n,c)))>1&&o.push(h);else o.push(h);o.push(r[e+3])}else{let g=r[e+0],y=r[e+1],f=r[e+2],B=r[e+3],v=as(g,y,0.5),q=as(y,f,0.5),W=as(f,B,0.5),H=as(v,q,0.5),Y=as(q,W,0.5),j=as(H,Y,0.5);Wf([g,v,H,j],0,i,o),Wf([j,Y,W,B],0,i,o)}var n,c;return o}function Rw(r,e){return oh(r,0,r.length,e)}function oh(r,e,i,s,o){let n=o||[],c=r[e],h=r[i-1],g=0,y=1;for(let f=e+1;f<i-1;++f){let B=Pw(r[f],c,h);B>g&&(g=B,y=f)}return Math.sqrt(g)>s?(oh(r,e,y+1,s,n),oh(r,y,i,s,n)):(n.length||n.push(c),n.push(h)),n}function Rf(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let n=0;n<o;n++)Wf(r,3*n,e,s);return i&&i>0?oh(s,0,s.length,i):s}var fi="none";class fn{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 n=this._o(o);return this._d("line",[Cy(r,e,i,s,n)],n)}rectangle(r,e,i,s,o){let n=this._o(o),c=[],h=$w(r,e,i,s,n);if(n.fill){let g=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];n.fillStyle==="solid"?c.push(Pf([g],n)):c.push($s([g],n))}return n.stroke!==fi&&c.push(h),this._d("rectangle",c,n)}ellipse(r,e,i,s,o){let n=this._o(o),c=[],h=by(i,s,n),g=qf(r,e,n,h);if(n.fill)if(n.fillStyle==="solid"){let y=qf(r,e,n,h).opset;y.type="fillPath",c.push(y)}else c.push($s([g.estimatedPoints],n));return n.stroke!==fi&&c.push(g.opset),this._d("ellipse",c,n)}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",[th(r,!1,i)],i)}arc(r,e,i,s,o,n,c=!1,h){let g=this._o(h),y=[],f=oy(r,e,i,s,o,n,c,!0,g);if(c&&g.fill)if(g.fillStyle==="solid"){let B=Object.assign({},g);B.disableMultiStroke=!0;let v=oy(r,e,i,s,o,n,!0,!1,B);v.type="fillPath",y.push(v)}else y.push(function(B,v,q,W,H,Y,j){let X=B,Q=v,rt=Math.abs(q/2),it=Math.abs(W/2);rt+=me(0.01*rt,j),it+=me(0.01*it,j);let ct=H,lt=Y;for(;ct<0;)ct+=2*Math.PI,lt+=2*Math.PI;lt-ct>2*Math.PI&&(ct=0,lt=2*Math.PI);let pt=(lt-ct)/j.curveStepCount,bt=[];for(let vt=ct;vt<=lt;vt+=pt)bt.push([X+rt*Math.cos(vt),Q+it*Math.sin(vt)]);return bt.push([X+rt*Math.cos(lt),Q+it*Math.sin(lt)]),bt.push([X,Q]),$s([bt],j)}(r,e,i,s,o,n,g));return g.stroke!==fi&&y.push(f),this._d("arc",y,g)}curve(r,e){let i=this._o(e),s=[],o=iy(r,i);if(i.fill&&i.fill!==fi)if(i.fillStyle==="solid"){let n=iy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{let n=[],c=r;if(c.length){let h=typeof c[0][0]=="number"?[c]:c;for(let g of h)g.length<3?n.push(...g):g.length===3?n.push(...Rf(hy([g[0],g[0],g[1],g[2]]),10,(1+i.roughness)/2)):n.push(...Rf(hy(g),10,(1+i.roughness)/2))}n.length&&s.push($s([n],i))}return i.stroke!==fi&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=th(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Pf([r],i)):s.push($s([r],i))),i.stroke!==fi&&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!==fi,n=i.stroke!==fi,c=!!(i.simplification&&i.simplification<1),h=function(y,f,B){let v=yy(my(zf(y))),q=[],W=[],H=[0,0],Y=[],j=()=>{Y.length>=4&&W.push(...Rf(Y,f)),Y=[]},X=()=>{j(),W.length&&(q.push(W),W=[])};for(let{key:rt,data:it}of v)switch(rt){case"M":X(),H=[it[0],it[1]],W.push(H);break;case"L":j(),W.push([it[0],it[1]]);break;case"C":if(!Y.length){let ct=W.length?W[W.length-1]:H;Y.push([ct[0],ct[1]])}Y.push([it[0],it[1]]),Y.push([it[2],it[3]]),Y.push([it[4],it[5]]);break;case"Z":j(),W.push([H[0],H[1]])}if(X(),!B)return q;let Q=[];for(let rt of q){let it=Rw(rt,B);it.length&&Q.push(it)}return Q}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),g=sy(r,i);if(o)if(i.fillStyle==="solid")if(h.length===1){let y=sy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(y.ops)})}else s.push(Pf(h,i));else s.push($s(h,i));return n&&(c?h.forEach((y)=>{s.push(th(y,!1,i))}):s.push(g)),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((n)=>+n.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 n=null;switch(o.type){case"path":n={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:fi};break;case"fillPath":n={d:this.opsToPath(o),stroke:fi,strokeWidth:0,fill:i.fill||fi};break;case"fillSketch":n=this.fillSketch(o,i)}n&&s.push(n)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||fi,strokeWidth:i,fill:fi}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class wy{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new fn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let n of e)switch(n.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,n,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,n,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 n=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(n[0],n[1]);break;case"bcurveTo":r.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":r.lineTo(n[0],n[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 n=this.gen.line(r,e,i,s,o);return this.draw(n),n}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n),n}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n),n}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,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g),g}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 Jl="http://www.w3.org/2000/svg";class Sy{constructor(r,e){this.svg=r,this.gen=new fn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Jl,"g"),n=r.options.fixedDecimalPlaceDigits;for(let c of e){let h=null;switch(c.type){case"path":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(s,c,i)}h&&o.appendChild(h)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Jl,"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 n=this.gen.line(r,e,i,s,o);return this.draw(n)}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n)}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n)}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,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g)}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 m={canvas:(r,e)=>new wy(r,e),svg:(r,e)=>new Sy(r,e),generator:(r)=>new fn(r),newSeed:()=>fn.newSeed()};var qw=1,Nw=3;async function td(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!ed(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function n(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=l().fontSize?l().fontSize:window.getComputedStyle(document.body).fontSize,h=5,[g=N.fontSize]=We(c),y=g*5+"px";s.style.minWidth=y,s.style.maxWidth=y}else s.style.width="100%";o(s)}t(n,"setupImage"),setTimeout(()=>{if(s.complete)n()}),s.addEventListener("error",n),s.addEventListener("load",n)})))}t(td,"configureLabelImages");function ed(r){if(r.nodeType===Nw)return r.textContent?.trim()!=="";if(r.nodeType!==qw)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(ed)}t(ed,"hasTextBesidesImages");var Ty=3,Ww=32,zw=t(async(r,e,i)=>{let s=l(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),n=o.insert("g").attr("class","label").attr("style",tr(e.labelStyle)),h=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((j)=>({text:j,cssClass:"c4-descr"}))].filter((j)=>j.text),g=e.width?Math.max(e.width-2*(e.padding??0),Ww):l().flowchart?.wrappingWidth??200,f=s.c4?.wrap??!0?g:Number.POSITIVE_INFINITY,B=await Promise.all(h.map(async(j)=>{let X=n.append("g").attr("class",j.cssClass),Q=await Le(X,O(jt(j.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:f,style:e.labelStyle},s);return p(Q).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),p(Q).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:X,box:X.node().getBBox()}})),v=Math.max(...B.map(({box:j})=>j.width),0),q=0;for(let{el:j,box:X}of B)j.attr("transform",`translate(${v/2-X.x-X.width/2}, ${q-X.y})`),q+=X.height+Ty;let W=B.length>0?q-Ty:0;n.insert("rect",":first-child"),n.attr("transform",`translate(${-v/2}, ${-W/2})`);let H=n.node().getBBox(),Y=(e.padding??0)/2;return{shapeSvg:o,bbox:H,halfPadding:Y,label:n}},"c4LabelHelper"),_y=t((r,e)=>{let{x:i,y:s,width:o,height:n}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:n};return{x:i,y:s,width:e,height:n,top:s,left:i,bottom:s+n,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),P=t(async(r,e,i,{ignoreMinWidth:s=!1}={})=>{if(e.stereotype!==void 0)return zw(r,e,i);let o,n=e.useHtmlLabels||ft(l()?.htmlLabels);if(!i)o="node default";else o=i;let c=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=c.insert("g").attr("class","label").attr("style",tr(e.labelStyle)),g;if(e.label===void 0)g="";else g=typeof e.label==="string"?e.label:e.label[0];let y=!!e.icon||!!e.img,f=e.labelType==="markdown",B=g&&!e.width&&!s?e.minWidth??0:0,v=await Le(h,O(jt(g),l()),{useHtmlLabels:n,width:e.width||e.wrappingWidth||l().flowchart?.wrappingWidth,minWidth:B,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},l()),q=(e?.padding??0)/2,W;if(n){let H=v.children[0],Y=p(v);await td(H),W=await Oo.measure(()=>H.getBoundingClientRect()),W=_y(W,B),Y.attr("width",W.width),Y.attr("height",W.height)}else W=await Oo.measure(()=>v.getBBox()),W=_y(W,B);if(n)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");else h.attr("transform","translate(0, "+-W.height/2+")");if(e.centerLabel)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");return h.insert("rect",":first-child"),{shapeSvg:c,bbox:W,halfPadding:q,label:h}},"labelHelper"),ls=t(async(r,e,i)=>{let s=i.useHtmlLabels??Ce(l()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),n=await Le(o,O(jt(e),l()),{useHtmlLabels:s,width:i.width||l()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,h;if(Ce(l())){let g=n.children[0],y=p(n);h=await Oo.measure(()=>g.getBoundingClientRect()),y.attr("width",h.width),y.attr("height",h.height)}else h=await Oo.measure(()=>n.getBBox());if(s)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");else o.attr("transform","translate(0, "+-h.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:h,halfPadding:c,label:o}},"insertLabel"),I=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"),te=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Oe(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Oe,"createPathFromPoints");function Ko(r,e,i,s,o,n){let c=[],h=50,g=i-r,y=s-e,f=g/n,B=2*Math.PI/f,v=e+y/2;for(let q=0;q<=50;q++){let W=q/50,H=r+W*g,Y=v+o*Math.sin(B*(H-r));c.push({x:H,y:Y})}return c}t(Ko,"generateFullSineWavePoints");function Ni(r,e,i,s,o,n){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(Ni,"generateCirclePoints");function Kf(r){let e=Array.from(r.childNodes).filter((g)=>g.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((g)=>g.getAttribute("d")).filter((g)=>g!==null).join(" ");i.setAttribute("d",s);let o=e.find((g)=>g.getAttribute("fill")!=="none"),n=e.find((g)=>g.getAttribute("stroke")!=="none"),c=t((g,y)=>g?.getAttribute(y)??void 0,"getAttr");if(o){let g={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}if(n){let g={stroke:c(n,"stroke"),"stroke-width":c(n,"stroke-width")??"1","stroke-opacity":c(n,"stroke-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}let h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}t(Kf,"mergePaths");var Hw=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,n=e.y-s,c=r.width/2,h=r.height/2,g,y;if(Math.abs(n)*c>Math.abs(o)*h){if(n<0)h=-h;g=n===0?0:h*o/n,y=h}else{if(o<0)c=-c;g=c,y=o===0?0:c*n/o}return{x:i+g,y:s+y}},"intersectRect"),to=Hw;function Gy(r,e){return r.intersect(e)}t(Gy,"intersectNode");var Yw=Gy;function Xy(r,e,i,s){var{x:o,y:n}=r,c=o-s.x,h=n-s.y,g=Math.sqrt(e*e*h*h+i*i*c*c),y=Math.abs(e*i*c/g);if(s.x<o)y=-y;var f=Math.abs(e*i*h/g);if(s.y<n)f=-f;return{x:o+y,y:n+f}}t(Xy,"intersectEllipse");var Vy=Xy;function Ky(r,e,i){return Vy(r,e,e,i)}t(Ky,"intersectCircle");var Uw=Ky;function Zy(r,e,i,s){{let o=e.y-r.y,n=r.x-e.x,c=e.x*r.y-r.x*e.y,h=o*i.x+n*i.y+c,g=o*s.x+n*s.y+c,y=0.000001;if(h!==0&&g!==0&&Zf(h,g))return;let f=s.y-i.y,B=i.x-s.x,v=s.x*i.y-i.x*s.y,q=f*r.x+B*r.y+v,W=f*e.x+B*e.y+v;if(Math.abs(q)<0.000001&&Math.abs(W)<0.000001&&Zf(q,W))return;let H=o*B-f*n;if(H===0)return;let Y=(n*v-B*c)/H,j=(f*c-o*v)/H;return{x:Y,y:j}}}t(Zy,"intersectLine");function Zf(r,e){return r*e>0}t(Zf,"sameSign");var jw=Zy;function Qy(r,e,i){let{x:s,y:o}=r,n=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:h}=Number;if(typeof e.forEach==="function")e.forEach(function(f){c=Math.min(c,f.x),h=Math.min(h,f.y)});else c=Math.min(c,e.x),h=Math.min(h,e.y);let g=s-r.width/2-c,y=o-r.height/2-h;for(let f=0;f<e.length;f++){let B=e[f],v=e[f<e.length-1?f+1:0],q=jw(r,i,{x:g+B.x,y:y+B.y},{x:g+v.x,y:y+v.y});if(q)n.push(q)}if(!n.length)return r;if(n.length>1)n.sort(function(f,B){let v=f.x-i.x,q=f.y-i.y,W=Math.sqrt(v*v+q*q),H=B.x-i.x,Y=B.y-i.y,j=Math.sqrt(H*H+Y*Y);return W<j?-1:W===j?0:1});return n[0]}t(Qy,"intersectPolygon");var Gw=Qy,w={node:Yw,circle:Uw,ellipse:Vy,polygon:Gw,rect:to},jr=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"),Xw=t(async(r,e,i,s=!1,o=!1)=>{let n=e||"";if(typeof n==="object")n=n[0];let c=l(),h=Ce(c);return await Le(r,n,{style:i,isTitle:s,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ti=Xw;function Jy(r,e){let{labelStyles:i}=k(e);e.labelStyle=i;let s=te(e),o=s;if(!s)o="anchor";let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,g=m.svg(n),y=Gt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")y.roughness=0;let f=g.circle(0,0,c*2,y),B=n.insert(()=>f,":first-child");return B.attr("class","anchor").attr("style",tr(h)),I(e,B),e.intersect=function(v){return a.info("Circle intersect",e,c,v),w.circle(e,c,v)},n}t(Jy,"anchor");function Qf(r,e,i,s,o,n,c){let g=(r+i)/2,y=(e+s)/2,f=Math.atan2(s-e,i-r),B=(i-r)/2,v=(s-e)/2,q=B/o,W=v/n,H=Math.sqrt(q**2+W**2);if(H>1)throw Error("The given radii are too small to create an arc between the points.");let Y=Math.sqrt(1-H**2),j=g+Y*n*Math.sin(f)*(c?-1:1),X=y-Y*o*Math.cos(f)*(c?-1:1),Q=Math.atan2((e-X)/n,(r-j)/o),it=Math.atan2((s-X)/n,(i-j)/o)-Q;if(c&&it<0)it+=2*Math.PI;if(!c&&it>0)it-=2*Math.PI;let ct=[];for(let lt=0;lt<20;lt++){let pt=lt/19,bt=Q+pt*it,vt=j+o*Math.cos(bt),wt=X+n*Math.sin(bt);ct.push({x:vt,y:wt})}return ct}t(Qf,"generateArcPoints");function tx(r,e,i){let[s,o]=[e,i].sort((n,c)=>c-n);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(tx,"calculateArcSagitta");async function ex(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=t((bt)=>bt+c,"calcTotalHeight"),g=t((bt)=>{let vt=bt/2;return[vt/(2.5+bt/50),vt]},"calcEllipseRadius"),{shapeSvg:y,bbox:f}=await P(r,e,te(e)),B=h(e?.height?e?.height:f.height),[v,q]=g(B),W=tx(B,v,q),Y=(e?.width?e?.width:f.width)+n*2+W-W,j=B,{cssStyles:X}=e,Q=[{x:Y/2,y:-j/2},{x:-Y/2,y:-j/2},...Qf(-Y/2,-j/2,-Y/2,j/2,v,q,!1),{x:Y/2,y:j/2},...Qf(Y/2,j/2,Y/2,-j/2,v,q,!0)],rt=m.svg(y),it=Gt(e,{});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ct=Oe(Q),lt=rt.path(ct,it),pt=y.insert(()=>lt,":first-child");if(pt.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")pt.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")pt.selectAll("path").attr("style",s);return pt.attr("transform",`translate(${v/2}, 0)`),I(e,pt),e.intersect=function(bt){return w.polygon(e,Q,bt)},y}t(ex,"bowTieRect");async function rx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,te(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=Math.max(c.width+y*2,e.width??0,80),B=Math.max(Math.min(f*0.08,12),5),v=Math.max(c.height+y*2+B,e.height??0),q=-v/2+B,W=v/2,H=f*0.72,Y=[`M${-f/2},${q}`,`L${-H/2},${W}`,`A${H/2},${B} 0 0 0 ${H/2},${W}`,`L${f/2},${q}`,`A${f/2},${B} 0 0 0 ${-f/2},${q}`,"Z"].join(" "),{cssStyles:j}=e,X=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let pt=m.svg(n).path(Y,Gt(e,{}));if(X.node()?.appendChild(pt),j)X.attr("style",j)}else X.append("path").attr("d",Y).attr("style",o);X.append("ellipse").attr("cx",0).attr("cy",q).attr("rx",f/2).attr("ry",B).attr("style",`fill:none;stroke:${g};stroke-width:1px`),I(e,X);let Q=q+(W-q)/2;h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${Q-c.height/2-(c.y-(c.top??0))})`);let rt=12,it=t((lt,pt,bt)=>Array.from({length:rt+1},(vt,wt)=>{let kt=Math.PI-wt*Math.PI/rt;return{x:lt*Math.cos(kt),y:pt+bt*B*Math.sin(kt)}}),"arc"),ct=[...it(f/2,q,-1),...it(H/2,W,1).reverse()];return e.intersect=function(lt){return w.polygon(e,ct,lt)},n}t(rx,"bucket");var Hf=20,Yf=8,Vw=80,Kw=8;function ix(r){let{themeVariables:e}=l(),{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:Kw,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(ix,"getCollapsedStyle");async function ox(r,e){let i=ix(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:n}=k(e),{shapeSvg:c,bbox:h}=await P(r,e,te(e)),{theme:g,themeVariables:y}=l();Ze(c,e.colorIndex,g,y.borderColorArray);let f=e.padding??8,B=h.height,v=Math.max(h.width+f*2,Vw,e?.width??0),q=Math.max(B+Yf+Hf+f*2,e?.height??0),W=-v/2,H=-q/2,Y=-(Yf+Hf)/2,j=c.select(".label");if(j)if(e.useHtmlLabels??Ce(l()))j.attr("transform",`translate(${-h.width/2}, ${-h.height/2+Y})`);else j.attr("transform",`translate(0, ${-h.height/2+Y})`);let X;if(e.look==="handDrawn"){let lt=m.svg(c),pt=Gt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),bt=lt.path(jr(W,H,v,q,i.rx),pt);X=c.insert(()=>bt,":first-child"),X.attr("class","basic label-container "+i.cssClass).attr("style",tr(e.cssStyles))}else if(X=c.insert("rect",":first-child"),X.attr("class","basic label-container "+i.cssClass).attr("style",n).attr("rx",i.rx).attr("ry",i.rx).attr("x",W).attr("y",H).attr("width",v).attr("height",q).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)X.attr("stroke-width",i.strokeWidth+"px");let Q=H+f+B+Yf;c.append("line").attr("class","collapsed-separator").attr("x1",W+8).attr("y1",Q).attr("x2",W+v-8).attr("y2",Q).attr("stroke",o).attr("stroke-dasharray","3, 3");let rt=Q+Hf/2,it=2.5,ct=10;for(let lt=-1;lt<=1;lt++)c.append("circle").attr("class","collapsed-indicator").attr("cx",lt*ct).attr("cy",rt).attr("r",it).attr("fill",o);return I(e,X),e.calcIntersect=function(lt,pt){return w.rect(lt,pt)},e.intersect=function(lt){return w.rect(e,lt)},c}t(ox,"collapsedGroup");function ro(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(ro,"insertPolygonShape");var Zw=["right","left","up","down"],rd="point",Qw=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"),Jw=t((r)=>Zw.filter((e)=>r.has(e)).join("|")||rd,"getDirectionKey"),By={"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"),[rd]:()=>[{x:0,y:0}]},tS=t((r,e,i,s)=>{let o=Qw(r),n=(i.padding??0)/2,c=e.height+4*n,h=c/2,g=s??e.width+2*h+2*n,y=Jw(o);return(By[y]??By[rd])({height:c,midpoint:h,padding:n,width:g})},"getArrowPoints");async function sx(r,e){let i=e,{shapeSvg:s,bbox:o}=await P(r,i,te(i)),n=i.padding??0,c=o.height+2*n,h=c/2,g=o.width+2*h+n,y=i.width??0,B=i.positioned&&(i.widthInColumns??1)>1&&y>g?y:g,v=tS(i.directions??[],o,i,B),q=ro(s,B,c,v);return q.attr("style",i.style??null),I(i,q),i.intersect=function(W){return w.polygon(i,v,W)},s}t(sx,"block_arrow");async function ax(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,te(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=18,B=12,v=Math.max(c.width+y*2,e.width??0,90),q=Math.max(c.height+y*2+f,e.height??0),W=-q/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(jr(-v/2,W,v,q,B),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-v/2).attr("y",W).attr("width",v).attr("height",q).attr("rx",B).attr("ry",B).attr("style",o);Y.append("line").attr("x1",-v/2).attr("y1",W+f).attr("x2",v/2).attr("y2",W+f).attr("style",`stroke:${g};stroke-width:1px`);for(let X=0;X<3;X++)Y.append("circle").attr("cx",-v/2+12+X*9).attr("cy",W+f/2).attr("r",2.5).attr("style",`fill:${g};stroke:none`);Y.append("rect").attr("class","browser-address-bar").attr("x",-v/2+44).attr("y",W+4).attr("width",Math.max(v-56,10)).attr("height",f-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${g};stroke-width:1px;opacity:0.6`),I(e,Y);let j=W+f+(q-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(X){return w.rect(e,X)},n}t(ax,"browser");var nh=12;async function nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=(e?.width??g.width)+(e.look==="neo"?n*2:n+nh),f=(e?.height??g.height)+(e.look==="neo"?c*2:c),B=0,v=y,q=-f,W=0,H=[{x:B+nh,y:q},{x:v,y:q},{x:v,y:W},{x:B,y:W},{x:B,y:q+nh},{x:B+nh,y:q}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let X=m.svg(h),Q=Gt(e,{}),rt=Oe(H),it=X.path(rt,Q);if(Y=h.insert(()=>it,":first-child").attr("transform",`translate(${-y/2}, ${f/2})`),j)Y.attr("style",j)}else Y=ro(h,y,f,H);if(s)Y.attr("style",s);return I(e,Y),e.intersect=function(X){return w.polygon(e,H,X)},h}t(nx,"card");function lx(r,e){let{nodeStyles:i}=k(e);e.label="";let s=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,n=Math.max(28,e.width??0),c=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=m.svg(s),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=Oe(c),f=h.path(y,g),B=s.insert(()=>f,":first-child");if(o&&e.look!=="handDrawn")B.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")B.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(v){return w.polygon(e,c,v)},s}t(lx,"choice");async function id(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,halfPadding:h}=await P(r,e,te(e),{ignoreMinWidth:!0}),g=16,y=i?.padding??h,f=Math.sqrt(c.width**2+c.height**2)/2,B=e.look==="neo"?f+g:f+y,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(n),H=Gt(e,{}),Y=W.circle(0,0,B*2,H);v=n.insert(()=>Y,":first-child"),v.attr("class","basic label-container").attr("style",tr(q))}else v=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",B).attr("cx",0).attr("cy",0);return I(e,v),e.calcIntersect=function(W,H){let Y=W.width/2;return w.circle(W,Y,H)},e.intersect=function(W){return a.info("Circle intersect",e,B,W),w.circle(e,B,W)},n}t(id,"circle");async function hx(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,i,s),h=o.insert("rect",":first-child"),g=i.padding??0,y=i.positioned?i.width??0:n.width+g,f=i.positioned?i.height??0:n.height+g,B=i.positioned?-y/2:-n.width/2-c,v=i.positioned?-f/2:-n.height/2-c;return h.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",B).attr("y",v).attr("width",y).attr("height",f),I(i,h),i.intersect=function(q){return w.rect(i,q)},o}t(hx,"composite");async function cx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,te(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=20,B=12,v=Math.max(c.width+y*2,e.width??0,90),q=Math.max(c.height+y*2+f,e.height??0),W=-q/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(jr(-v/2,W,v,q,B),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-v/2).attr("y",W).attr("width",v).attr("height",q).attr("rx",B).attr("ry",B).attr("style",o);Y.append("text").attr("x",-v/2+12).attr("y",W+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${g}`).text(">_"),I(e,Y);let j=W+f+(q-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(X){return w.rect(e,X)},n}t(cx,"consoleWindow");function ux(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},n={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},h={x:s/2*e,y:-(s/2)*i};return`M ${n.x},${n.y} L ${h.x},${h.y}
233
+ M ${o.x},${o.y} L ${c.x},${c.y}`}t(ux,"createLine");function fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:c}=e,h=m.svg(o),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=h.circle(0,0,n*2,g),f=ux(n),B=h.path(f,g),v=o.insert(()=>y,":first-child");if(v.insert(()=>B),v.attr("class","outer-path"),c&&e.look!=="handDrawn")v.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")v.selectAll("path").attr("style",s);return I(e,v),e.intersect=function(q){return a.info("crossedCircle intersect",e,{radius:n,point:q}),w.circle(e,n,q)},o}t(fx,"crossedCircle");function Io(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(Io,"generateCirclePoints");async function dx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+h,f=n.height+g,B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...Io(y/2,-f/2,B,30,-90,0),{x:-y/2-B,y:B},...Io(y/2+B*2,-B,B,20,-180,-270),...Io(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:-f/2},...Io(y/2,f/2,B,20,0,90)],W=[{x:y/2,y:-f/2-B},{x:-y/2,y:-f/2-B},...Io(y/2,-f/2,B,20,-90,0),{x:-y/2-B,y:-B},...Io(y/2+y*0.1,-B,B,20,-180,-270),...Io(y/2+y*0.1,B,B,20,-90,-180),{x:-y/2-B,y:f/2},...Io(y/2,f/2,B,20,0,90),{x:-y/2,y:f/2+B},{x:y/2,y:f/2+B}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let X=Oe(q).replace("Z",""),Q=H.path(X,Y),rt=Oe(W),it=H.path(rt,{...Y}),ct=o.insert("g",":first-child");if(ct.insert(()=>it,":first-child").attr("stroke-opacity",0),ct.insert(()=>Q,":first-child"),ct.attr("class","text"),v&&e.look!=="handDrawn")ct.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")ct.selectAll("path").attr("style",s);return ct.attr("transform",`translate(${B}, 0)`),c.attr("transform",`translate(${-y/2+B-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(dx,"curlyBraceLeft");function $o(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:q,y:W})}return c}t($o,"generateCirclePoints");async function px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...$o(y/2,-f/2,B,20,-90,0),{x:y/2+B,y:-B},...$o(y/2+B*2,-B,B,20,-180,-270),...$o(y/2+B*2,B,B,20,-90,-180),{x:y/2+B,y:f/2},...$o(y/2,f/2,B,20,0,90)],W=[{x:-y/2,y:-f/2-B},{x:y/2,y:-f/2-B},...$o(y/2,-f/2,B,20,-90,0),{x:y/2+B,y:-B},...$o(y/2+B*2,-B,B,20,-180,-270),...$o(y/2+B*2,B,B,20,-90,-180),{x:y/2+B,y:f/2},...$o(y/2,f/2,B,20,0,90),{x:y/2,y:f/2+B},{x:-y/2,y:f/2+B}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let X=Oe(q).replace("Z",""),Q=H.path(X,Y),rt=Oe(W),it=H.path(rt,{...Y}),ct=o.insert("g",":first-child");if(ct.insert(()=>it,":first-child").attr("stroke-opacity",0),ct.insert(()=>Q,":first-child"),ct.attr("class","text"),v&&e.look!=="handDrawn")ct.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")ct.selectAll("path").attr("style",s);return ct.attr("transform",`translate(${-B}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(px,"curlyBraceRight");function gr(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(gr,"generateCirclePoints");async function gx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...gr(y/2,-f/2,B,30,-90,0),{x:-y/2-B,y:B},...gr(y/2+B*2,-B,B,20,-180,-270),...gr(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:-f/2},...gr(y/2,f/2,B,20,0,90)],W=[...gr(-y/2+B+B/2,-f/2,B,20,-90,-180),{x:y/2-B/2,y:B},...gr(-y/2-B/2,-B,B,20,0,90),...gr(-y/2-B/2,B,B,20,-90,0),{x:y/2-B/2,y:-B},...gr(-y/2+B+B/2,f/2,B,30,-180,-270)],H=[{x:y/2,y:-f/2-B},{x:-y/2,y:-f/2-B},...gr(y/2,-f/2,B,20,-90,0),{x:-y/2-B,y:-B},...gr(y/2+B*2,-B,B,20,-180,-270),...gr(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:f/2},...gr(y/2,f/2,B,20,0,90),{x:-y/2,y:f/2+B},{x:y/2-B-B/2,y:f/2+B},...gr(-y/2+B+B/2,-f/2,B,20,-90,-180),{x:y/2-B/2,y:B},...gr(-y/2-B/2,-B,B,20,0,90),...gr(-y/2-B/2,B,B,20,-90,0),{x:y/2-B/2,y:-B},...gr(-y/2+B+B/2,f/2,B,30,-180,-270)],Y=m.svg(o),j=Gt(e,{fill:"none"});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let Q=Oe(q).replace("Z",""),rt=Y.path(Q,j),ct=Oe(W).replace("Z",""),lt=Y.path(ct,j),pt=Oe(H),bt=Y.path(pt,{...j}),vt=o.insert("g",":first-child");if(vt.insert(()=>bt,":first-child").attr("stroke-opacity",0),vt.insert(()=>rt,":first-child"),vt.insert(()=>lt,":first-child"),vt.attr("class","text"),v&&e.look!=="handDrawn")vt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")vt.selectAll("path").attr("style",s);return vt.attr("transform",`translate(${B-B/4}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,vt),e.intersect=function(wt){return w.polygon(e,H,wt)},o}t(gx,"curlyBraces");async function mx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=20,g=5,{shapeSvg:y,bbox:f}=await P(r,e,te(e)),B=Math.max(g,f.height+c*2,e?.height??0),v=B/2,q=v-Math.sqrt(Math.max(0,v**2-(f.height/2)**2)),W=Math.max(B/4,q),H=Math.max(h,f.width+n*2+W*2,(f.width+n*2)*1.25,e?.width??0),{cssStyles:Y}=e,j=m.svg(y),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=H,rt=B,it=Q-v,ct=rt/4,lt=[{x:it,y:0},{x:ct,y:0},{x:0,y:rt/2},{x:ct,y:rt},{x:it,y:rt},...Ni(-it,-rt/2,v,50,270,90)],pt=Oe(lt),bt=j.path(pt,X),vt=y.insert(()=>bt,":first-child");if(vt.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")vt.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")vt.selectChildren("path").attr("style",s);return vt.attr("transform",`translate(${-H/2}, ${-B/2})`),I(e,vt),e.intersect=function(wt){return w.polygon(e,lt,wt)},y}t(mx,"curvedTrapezoid");async function yx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.padding??20,g=Math.max(n.width+h*2,e.width??0,100),y=Math.min(Math.max(g*0.23,16),56),f=y*0.27,B=Math.max(n.height+h*2,e.height?e.height-(2*y-f):0),v=Math.min(g*0.177,B*0.45),q=B+2*y-f,W=-q/2,H=W+2*y-f,Y=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:j}=e;if(e.look==="handDrawn"){let pt=m.svg(o),bt=Gt(e,{}),vt=pt.path(jr(-g/2,H,g,B,v),bt),wt=pt.circle(0,W+y,y*2,bt);if(Y.insert(()=>wt,":first-child"),Y.insert(()=>vt,":first-child"),j)Y.attr("style",j)}else Y.append("rect").attr("x",-g/2).attr("y",H).attr("width",g).attr("height",B).attr("rx",v).attr("ry",v).attr("style",s),Y.append("circle").attr("cx",0).attr("cy",W+y).attr("r",y).attr("style",s);I(e,Y);let X=H+B/2;c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${X-n.height/2-(n.y-(n.top??0))})`);let Q=W+y,rt=Math.asin(Math.min(1,(H-Q)/y))*180/Math.PI,it=24,lt=[...Ni(0,-Q,y,it,180+rt,-rt),...Ni(-(-g/2+v),-(H+v),v,12,90,0),...Ni(-(-g/2+v),-(q/2-v),v,12,360,270),...Ni(-(g/2-v),-(q/2-v),v,12,270,180),...Ni(-(g/2-v),-(H+v),v,12,180,90)];return e.intersect=function(pt){return w.polygon(e,lt,pt)},o}t(yx,"person");var eS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),rS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),iS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),vy=8,Ly=8;async function xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?24:o,c=e.look==="neo"?24:o,h=e.width??0;if(e.width){if(e.width=e.width-c,e.width<Ly)e.width=Ly}if(e.height){let X=h/2/(2.5+h/50);if(e.height=e.height-n-X*3,e.height<vy)e.height=vy}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,te(e)),B=Math.max(e.width??0,y.width)+c,v=B/2,q=v/(2.5+B/50),W=Math.max(e.height??0,y.height)+n+q,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(g),X=rS(0,0,B,W,v,q),Q=iS(0,q,B,W,v,q),rt=Gt(e,{}),it=j.path(X,rt),ct=j.path(Q,Gt(e,{fill:"none"}));if(H=g.insert(()=>ct,":first-child"),H=g.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=eS(0,0,B,W,v,q);H=g.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",tr(Y)).attr("style",s)}return H.attr("label-offset-y",q),H.attr("transform",`translate(${-B/2}, ${-(W/2+q)})`),I(e,H),f.attr("transform",`translate(${-(y.width/2)-(y.x-(y.left??0))}, ${-(y.height/2)+(e.padding??0)/1.5-(y.y-(y.top??0))})`),e.intersect=function(j){let X=w.rect(e,j),Q=X.x-(e.x??0);if(v!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(X.y-(e.y??0))>(e.height??0)/2-q)){let rt=q*q*(1-Q*Q/(v*v));if(rt>0)rt=Math.sqrt(rt);if(rt=q-rt,j.y-(e.y??0)>0)rt=-rt;X.y+=rt}return X},g}t(xx,"cylinder");async function Ns(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c}=await P(r,e,te(e)),h=Math.max(c.width+i.labelPaddingX*2,e?.width||0),g=Math.max(c.height+i.labelPaddingY*2,e?.height||0),y=-h/2,f=-g/2,B,{rx:v,ry:q}=e,{cssStyles:W}=e;if(i?.rx&&i.ry)v=i.rx,q=i.ry;if(e.look==="handDrawn"){let H=m.svg(n),Y=Gt(e,{}),j=v||q?H.path(jr(y,f,h,g,v||0),Y):H.rectangle(y,f,h,g,Y);B=n.insert(()=>j,":first-child"),B.attr("class","basic label-container").attr("style",tr(W))}else B=n.insert("rect",":first-child"),B.attr("class","basic label-container").attr("style",o).attr("rx",tr(v)).attr("ry",tr(q)).attr("x",y).attr("y",f).attr("width",h).attr("height",g);return I(e,B,e.look==="handDrawn"?void 0:{width:h,height:g}),e.calcIntersect=function(H,Y){return w.rect(H,Y)},e.intersect=function(H){return w.rect(e,H)},n}t(Ns,"drawRect");async function Cx(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:n,width:c,height:h}=e,g={rx:0,ry:0,classes:i??"",labelPaddingX:s??(n??0)*2,labelPaddingY:o??n??0},y=await Ns(r,e,g);if(e.look==="handDrawn"){let q=m.svg(y),W=Gt(e,{}),H=y.select(".basic.label-container > path:nth-child(2)"),Y=H.node();if(!Y)return y;let j=null;if(Y instanceof SVGGraphicsElement)j=Y.getBBox();else return y;return y.insert(()=>q.line(j.x,j.y,j.x+j.width,j.y,W),".basic.label-container g.label"),y.insert(()=>q.line(j.x,j.y+j.height,j.x+j.width,j.y+j.height,W),".basic.label-container g.label"),H.remove(),y}let f=y.select(".basic.label-container"),B=(Number(f.attr("width"))||c)??0,v=(Number(f.attr("height"))||h)??0;if(B>0&&v>0)f.attr("stroke-dasharray",`${B} ${v}`);return y}t(Cx,"datastore");async function bx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=h.width+o,f=h.height+n,B=f*0.2,v=-y/2,q=-f/2-B/2,{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:v,y:q+B},{x:-v,y:q+B},{x:-v,y:-q},{x:v,y:-q},{x:v,y:q},{x:-v,y:q},{x:-v,y:q+B}],X=H.polygon(j.map((rt)=>[rt.x,rt.y]),Y),Q=c.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return g.attr("transform",`translate(${v+(e.padding??0)/2-(h.x-(h.left??0))}, ${q+B+(e.padding??0)/2-(h.y-(h.top??0))})`),I(e,Q),e.intersect=function(rt){return w.rect(e,rt)},c}t(bx,"dividedRectangle");async function kx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?12:5;e.labelStyle=i;let n=e.padding??0,c=e.look==="neo"?16:n,{shapeSvg:h,bbox:g}=await P(r,e,te(e),{ignoreMinWidth:!0}),y=Math.sqrt(g.width**2+g.height**2)/2,f=(e?.width?e?.width/2:y)+(c??0),B=f+o,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{roughness:0.2,strokeWidth:2.5}),Y=Gt(e,{roughness:0.2,strokeWidth:1.5}),j=W.circle(0,0,B*2,H),X=W.circle(0,0,f*2,Y);v=h.insert("g",":first-child"),v.attr("class",tr(e.cssClasses)).attr("style",tr(q)),v.node()?.appendChild(j),v.node()?.appendChild(X)}else{v=h.insert("g",":first-child");let W=v.insert("circle",":first-child"),H=v.insert("circle");v.attr("class","basic label-container").attr("style",s),W.attr("class","outer-circle").attr("style",s).attr("r",B).attr("cx",0).attr("cy",0),H.attr("class","inner-circle").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0)}return I(e,v),e.intersect=function(W){return a.info("DoubleCircle intersect",e,B,W),w.circle(e,B,W)},h}t(kx,"doublecircle");async function wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,e,te(e)),{theme:h,themeVariables:g}=l();Ze(o,e.colorIndex,h,g.borderColorArray);let y=c??10,f=n.width/2+y*2,B=n.height/2+y*2,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(o),H=Gt(e,{}),Y=W.ellipse(0,0,f*2,B*2,H);if(v=o.insert(()=>Y,":first-child"),v.attr("class","basic label-container"),q)v.attr("style",q)}else v=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",f).attr("ry",B).attr("cx",0).attr("cy",0);return e.width=f*2,e.height=B*2,I(e,v),e.calcIntersect=function(W,H){let Y=W.width/2,j=W.height/2;return w.ellipse(W,Y,j,H)},e.intersect=function(W){return w.ellipse(e,f,B,W)},o}t(wx,"usecaseEllipse");function Sx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.label="",e.labelStyle=s;let n=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,g=m.svg(n),{nodeBorder:y}=i,f=Gt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let B=g.circle(0,0,c*2,f),v=n.insert(()=>B,":first-child");if(v.selectAll("path").attr("style",`fill: ${y} !important;`),h&&h.length>0&&e.look!=="handDrawn")v.selectAll("path").attr("style",h);if(o&&e.look!=="handDrawn")v.selectAll("path").attr("style",o);return I(e,v),e.intersect=function(q){return a.info("filledCircle intersect",e,{radius:c,point:q}),w.circle(e,c,q)},n}t(Sx,"filledCircle");var Fy=10,Ay=10;async function Tx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Fy)e.height=Fy;if(e.width=(e?.width??0)-n-n/2,e.width<Ay)e.width=Ay}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=(e?.width?e?.width:h.width)+(n??0),f=e?.height?e?.height:y+h.height,B=f,v=[{x:0,y:-f},{x:B,y:-f},{x:B/2,y:0}],{cssStyles:q}=e,W=m.svg(c),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=Oe(v),j=W.path(Y,H),X=c.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");if(q&&e.look!=="handDrawn")X.selectChildren("path").attr("style",q);if(s&&e.look!=="handDrawn")X.selectChildren("path").attr("style",s);return e.width=y,e.height=f,I(e,X),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(Q){return a.info("Triangle intersect",e,v,Q),w.polygon(e,v,Q)},c}t(Tx,"flippedTriangle");async function _x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.padding??12,g=Math.max(n.width+h*2,e.width??0,90),y=n.height+h*2,f=Math.max(Math.min(y*0.16,14),8),B=Math.max(y+f,e.height??0),v=B-f,q=Math.max(g*0.38,28),W=-B/2,H=[{x:-g/2,y:W},{x:-g/2+q,y:W},{x:-g/2+q,y:W+f},{x:g/2,y:W+f},{x:g/2,y:B/2},{x:-g/2,y:B/2}],Y=[`M${H[0].x},${H[0].y}`,...H.slice(1).map((rt)=>`L${rt.x},${rt.y}`),"Z"].join(" "),{cssStyles:j}=e,X;if(e.look==="handDrawn"){let it=m.svg(o).path(Y,Gt(e,{}));if(X=o.insert(()=>it,":first-child").attr("class","basic label-container"),j)X.attr("style",j)}else X=o.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")I(e,X);else I(e,X,{width:g,height:B});let Q=W+f+v/2;return c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${Q-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(rt){return w.polygon(e,H,rt)},o}t(_x,"folder");function Bx(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:n}=k(e);e.label="";let c=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,g=Math.max(70,e?.width??0),y=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")g=Math.max(10,e?.width??0),y=Math.max(70,e?.height??0);let f=-1*g/2,B=-1*y/2,v=m.svg(c),q=Gt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")q.roughness=0,q.fillStyle="solid";let W=v.rectangle(f,B,g,y,q),H=c.insert(()=>W,":first-child");if(h&&e.look!=="handDrawn")H.selectAll("path").attr("style",h);if(n&&e.look!=="handDrawn")H.selectAll("path").attr("style",n);I(e,H);let Y=s?.padding??0;if(e.width&&e.height)e.width+=Y/2||0,e.height+=Y/2||0;return e.intersect=function(j){return w.rect(e,j)},c}t(Bx,"forkJoin");async function vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=15,n=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-h*2,e.height<n)e.height=n;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:g,bbox:y}=await P(r,e,te(e)),f=(e?.height?e?.height:Math.max(n,y.height))+h*2,B=f/2,v=B-Math.sqrt(Math.max(0,B**2-(y.height/2)**2)),q=(e?.width?e?.width:Math.max(o,y.width)+v*2)+c*2,{cssStyles:W}=e,H=m.svg(g),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-q/2,y:-f/2},{x:q/2-B,y:-f/2},...Ni(-q/2+B,0,B,50,90,270),{x:q/2-B,y:f/2},{x:-q/2,y:f/2}],X=Oe(j),Q=H.path(X,Y),rt=g.insert(()=>Q,":first-child");if(rt.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")rt.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")rt.selectChildren("path").attr("style",s);return I(e,rt),e.intersect=function(it){return a.info("Pill intersect",e,{radius:B,point:it}),w.polygon(e,j,it)},g}t(vx,"halfRoundedRectangle");var oS=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 Lx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let n=e.padding??0,c=70,h=32,g=e.look==="neo"?c:n,y=e.look==="neo"?h:n;if(e.width||e.height){let Q=(e.height??0)/o;e.width=(e?.width??0)-2*Q-y,e.height=(e.height??0)-g}let{shapeSvg:f,bbox:B}=await P(r,e,te(e)),v=(e?.height?e?.height:B.height)+g,q=v/o,W=(e?.width?e?.width:B.width)+2*q+y,H=[{x:q,y:0},{x:W-q,y:0},{x:W,y:-v/2},{x:W-q,y:-v},{x:q,y:-v},{x:0,y:-v/2}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let X=m.svg(f),Q=Gt(e,{}),rt=oS(0,0,W,v,q),it=X.path(rt,Q);if(Y=f.insert(()=>it,":first-child").attr("transform",`translate(${-W/2}, ${v/2})`),j)Y.attr("style",j)}else Y=ro(f,W,v,H);if(s)Y.attr("style",s);return e.width=W,e.height=v,I(e,Y),e.intersect=function(X){return w.polygon(e,H,X)},f}t(Lx,"hexagon");async function Fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await P(r,e,te(e)),n=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:h}=e,g=m.svg(o),y=Gt(e,{});if(e.look!=="handDrawn")y.roughness=0,y.fillStyle="solid";let f=[{x:0,y:0},{x:n,y:0},{x:0,y:c},{x:n,y:c}],B=Oe(f),v=g.path(B,y),q=o.insert(()=>v,":first-child");if(q.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn")q.selectChildren("path").attr("style",h);if(s&&e.look!=="handDrawn")q.selectChildren("path").attr("style",s);return q.attr("transform",`translate(${-n/2}, ${-c/2})`),I(e,q),e.intersect=function(W){return a.info("Pill intersect",e,{points:f}),w.polygon(e,f,W)},o}t(Fx,"hourglass");async function Ax(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:B}=await P(r,e,"icon-shape default"),v=e.pos==="t",q=h,W=h,{nodeBorder:H}=i,{stylesMap:Y}=Di(e),j=-W/2,X=-q/2,Q=e.label?8:0,rt=m.svg(y),it=Gt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ct=rt.rectangle(j,X,W,q,it),lt=Math.max(W,f.width),pt=q+f.height+Q,bt=rt.rectangle(-lt/2,-pt/2,lt,pt,{...it,fill:"transparent",stroke:"none"}),vt=y.insert(()=>ct,":first-child"),wt=y.insert(()=>bt);if(e.icon){let kt=y.append("g");kt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let st=kt.node().getBBox(),{width:at,height:xt,x:ot,y:St}=st;kt.attr("transform",`translate(${-at/2-ot},${v?f.height/2+Q/2-xt/2-St:-f.height/2-Q/2-xt/2-St})`),kt.attr("style",`color: ${Y.get("stroke")??H};`)}return B.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-pt/2:pt/2-f.height})`),vt.attr("transform",`translate(0,${v?f.height/2+Q/2:-f.height/2-Q/2})`),I(e,wt),e.intersect=function(kt){if(a.info("iconSquare intersect",e,kt),!e.label)return w.rect(e,kt);let st=e.x??0,at=e.y??0,xt=e.height??0,ot=[];if(v)ot=[{x:st-f.width/2,y:at-xt/2},{x:st+f.width/2,y:at-xt/2},{x:st+f.width/2,y:at-xt/2+f.height+Q},{x:st+W/2,y:at-xt/2+f.height+Q},{x:st+W/2,y:at+xt/2},{x:st-W/2,y:at+xt/2},{x:st-W/2,y:at-xt/2+f.height+Q},{x:st-f.width/2,y:at-xt/2+f.height+Q}];else ot=[{x:st-W/2,y:at-xt/2},{x:st+W/2,y:at-xt/2},{x:st+W/2,y:at-xt/2+q},{x:st+f.width/2,y:at-xt/2+q},{x:st+f.width/2/2,y:at+xt/2},{x:st-f.width/2,y:at+xt/2},{x:st-f.width/2,y:at-xt/2+q},{x:st-W/2,y:at-xt/2+q}];return w.polygon(e,ot,kt)},y}t(Ax,"icon");async function Mx(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:B}=await P(r,e,"icon-shape default"),v=20,q=e.label?8:0,W=e.pos==="t",{nodeBorder:H,mainBkg:Y}=i,{stylesMap:j}=Di(e),X=m.svg(y),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let rt=j.get("fill");Q.stroke=rt??Y;let it=y.append("g");if(e.icon)it.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ct=it.node().getBBox(),{width:lt,height:pt,x:bt,y:vt}=ct,wt=Math.max(lt,pt)*Math.SQRT2+v*2,kt=X.circle(0,0,wt,Q),st=Math.max(wt,f.width),at=wt+f.height+q,xt=X.rectangle(-st/2,-at/2,st,at,{...Q,fill:"transparent",stroke:"none"}),ot=y.insert(()=>kt,":first-child"),St=y.insert(()=>xt);return it.attr("transform",`translate(${-lt/2-bt},${W?f.height/2+q/2-pt/2-vt:-f.height/2-q/2-pt/2-vt})`),it.attr("style",`color: ${j.get("stroke")??H};`),B.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${W?-at/2:at/2-f.height})`),ot.attr("transform",`translate(0,${W?f.height/2+q/2:-f.height/2-q/2})`),I(e,St),e.intersect=function(Lt){return a.info("iconSquare intersect",e,Lt),w.rect(e,Lt)},y}t(Mx,"iconCircle");async function Ex(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:B,label:v}=await P(r,e,"icon-shape default"),q=e.pos==="t",W=h+B*2,H=h+B*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:X}=Di(e),Q=-H/2,rt=-W/2,it=e.label?8:0,ct=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let pt=X.get("fill");lt.stroke=pt??j;let bt=ct.path(jr(Q,rt,H,W,5),lt),vt=Math.max(H,f.width),wt=W+f.height+it,kt=ct.rectangle(-vt/2,-wt/2,vt,wt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>bt,":first-child").attr("class","icon-shape2"),at=y.insert(()=>kt);if(e.icon){let xt=y.append("g");xt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=xt.node().getBBox(),{width:St,height:Lt,x:Yt,y:Ht}=ot;xt.attr("transform",`translate(${-St/2-Yt},${q?f.height/2+it/2-Lt/2-Ht:-f.height/2-it/2-Lt/2-Ht})`),xt.attr("style",`color: ${X.get("stroke")??Y};`)}return v.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${q?-wt/2:wt/2-f.height})`),st.attr("transform",`translate(0,${q?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(xt){if(a.info("iconSquare intersect",e,xt),!e.label)return w.rect(e,xt);let ot=e.x??0,St=e.y??0,Lt=e.height??0,Yt=[];if(q)Yt=[{x:ot-f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St+Lt/2},{x:ot-H/2,y:St+Lt/2},{x:ot-H/2,y:St-Lt/2+f.height+it},{x:ot-f.width/2,y:St-Lt/2+f.height+it}];else Yt=[{x:ot-H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2+W},{x:ot+f.width/2,y:St-Lt/2+W},{x:ot+f.width/2/2,y:St+Lt/2},{x:ot-f.width/2,y:St+Lt/2},{x:ot-f.width/2,y:St-Lt/2+W},{x:ot-H/2,y:St-Lt/2+W}];return w.polygon(e,Yt,xt)},y}t(Ex,"iconRounded");async function Ox(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:B,label:v}=await P(r,e,"icon-shape default"),q=e.pos==="t",W=h+B*2,H=h+B*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:X}=Di(e),Q=-H/2,rt=-W/2,it=e.label?8:0,ct=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let pt=X.get("fill");lt.stroke=pt??j;let bt=ct.path(jr(Q,rt,H,W,0.1),lt),vt=Math.max(H,f.width),wt=W+f.height+it,kt=ct.rectangle(-vt/2,-wt/2,vt,wt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>bt,":first-child"),at=y.insert(()=>kt);if(e.icon){let xt=y.append("g");xt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=xt.node().getBBox(),{width:St,height:Lt,x:Yt,y:Ht}=ot;xt.attr("transform",`translate(${-St/2-Yt},${q?f.height/2+it/2-Lt/2-Ht:-f.height/2-it/2-Lt/2-Ht})`),xt.attr("style",`color: ${X.get("stroke")??Y};`)}return v.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${q?-wt/2:wt/2-f.height})`),st.attr("transform",`translate(0,${q?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(xt){if(a.info("iconSquare intersect",e,xt),!e.label)return w.rect(e,xt);let ot=e.x??0,St=e.y??0,Lt=e.height??0,Yt=[];if(q)Yt=[{x:ot-f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2},{x:ot+f.width/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St-Lt/2+f.height+it},{x:ot+H/2,y:St+Lt/2},{x:ot-H/2,y:St+Lt/2},{x:ot-H/2,y:St-Lt/2+f.height+it},{x:ot-f.width/2,y:St-Lt/2+f.height+it}];else Yt=[{x:ot-H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2},{x:ot+H/2,y:St-Lt/2+W},{x:ot+f.width/2,y:St-Lt/2+W},{x:ot+f.width/2/2,y:St+Lt/2},{x:ot-f.width/2,y:St+Lt/2},{x:ot-f.width/2,y:St-Lt/2+W},{x:ot-H/2,y:St-Lt/2+W}];return w.polygon(e,Yt,xt)},y}t(Ox,"iconSquare");async function Ix(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),n=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/n;let{labelStyles:c}=k(e);e.labelStyle=c;let h=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let g=Math.max(e.label?h??0:0,e?.assetWidth??o),y=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:g:g,f=e.constraint==="on"?y/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(y,h??0);let{shapeSvg:B,bbox:v,label:q}=await P(r,e,"image-shape default"),W=e.pos==="t",H=-y/2,Y=-f/2,j=e.label?8:0,X=m.svg(B),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let rt=X.rectangle(H,Y,y,f,Q),it=Math.max(y,v.width),ct=f+v.height+j,lt=X.rectangle(-it/2,-ct/2,it,ct,{...Q,fill:"none",stroke:"none"}),pt=B.insert(()=>rt,":first-child"),bt=B.insert(()=>lt);if(e.img){let vt=B.append("image");vt.attr("href",e.img),vt.attr("width",y),vt.attr("height",f),vt.attr("preserveAspectRatio","none"),vt.attr("transform",`translate(${-y/2},${W?ct/2-f:-ct/2})`)}return q.attr("transform",`translate(${-v.width/2-(v.x-(v.left??0))},${W?-f/2-v.height/2-j/2:f/2-v.height/2+j/2})`),pt.attr("transform",`translate(0,${W?v.height/2+j/2:-v.height/2-j/2})`),I(e,bt),e.intersect=function(vt){if(a.info("iconSquare intersect",e,vt),!e.label)return w.rect(e,vt);let wt=e.x??0,kt=e.y??0,st=e.height??0,at=[];if(W)at=[{x:wt-v.width/2,y:kt-st/2},{x:wt+v.width/2,y:kt-st/2},{x:wt+v.width/2,y:kt-st/2+v.height+j},{x:wt+y/2,y:kt-st/2+v.height+j},{x:wt+y/2,y:kt+st/2},{x:wt-y/2,y:kt+st/2},{x:wt-y/2,y:kt-st/2+v.height+j},{x:wt-v.width/2,y:kt-st/2+v.height+j}];else at=[{x:wt-y/2,y:kt-st/2},{x:wt+y/2,y:kt-st/2},{x:wt+y/2,y:kt-st/2+f},{x:wt+v.width/2,y:kt-st/2+f},{x:wt+v.width/2/2,y:kt+st/2},{x:wt-v.width/2,y:kt+st/2},{x:wt-v.width/2,y:kt-st/2+f},{x:wt-y/2,y:kt-st/2+f}];return w.polygon(e,at,vt)},B}t(Ix,"imageSquare");async function $x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n*2,e.height??0),f=Math.max(g.width+c*2,(e.width??0)-y),B=[{x:0,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:-3*y/6,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t($x,"inv_trapezoid");async function Dx(r,e){let{shapeSvg:i,bbox:s,label:o}=await P(r,e,"label"),n=i.insert("rect",":first-child"),c=0.1,h=0.1;return n.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))})`),I(e,n),e.intersect=function(g){return w.rect(e,g)},i}t(Dx,"labelRect");async function Px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:0,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:-(3*y)/6,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(Px,"lean_left");async function Rx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:-3*y/6,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:0,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(Rx,"lean_right");function qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,c=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),g=7,y=[{x:c,y:0},{x:0,y:h+g/2},{x:c-2*g,y:h+g/2},{x:0,y:2*h},{x:c,y:h-g/2},{x:2*g,y:h-g/2}],f=m.svg(o),B=Gt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Oe(y),q=f.path(v,B),W=o.insert(()=>q,":first-child");if(W.attr("class","outer-path"),n&&e.look!=="handDrawn")W.selectAll("path").attr("style",n);if(s&&e.look!=="handDrawn")W.selectAll("path").attr("style",s);return W.attr("transform",`translate(-${c/2},${-h})`),I(e,W),e.intersect=function(H){return a.info("lightningBolt intersect",e,H),w.polygon(e,y,H)},o}t(qx,"lightningBolt");var sS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),aS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),nS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),My=10,Ey=10;async function Nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let j=e.width??0;if(e.width=(e.width??0)-n,e.width<Ey)e.width=Ey;let Q=j/2/(2.5+j/50);if(e.height=(e.height??0)-c-Q*3,e.height<My)e.height=My}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=(e?.width?e?.width:g.width)+n*2,B=f/2,v=B/(2.5+f/50),q=(e?.height?e?.height:g.height)+v+c*2,W=q*0.1,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(h),X=aS(0,0,f,q,B,v,W),Q=nS(0,v,f,q,B,v),rt=Gt(e,{}),it=j.path(X,rt),ct=j.path(Q,rt);if(h.insert(()=>ct,":first-child").attr("class","line"),H=h.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=sS(0,0,f,q,B,v,W);H=h.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",tr(Y)).attr("style",s)}return H.attr("label-offset-y",v),H.attr("transform",`translate(${-f/2}, ${-(q/2+v)})`),I(e,H),y.attr("transform",`translate(${-(g.width/2)-(g.x-(g.left??0))}, ${-(g.height/2)+v-(g.y-(g.top??0))})`),e.intersect=function(j){let X=w.rect(e,j),Q=X.x-(e.x??0);if(B!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(X.y-(e.y??0))>(e.height??0)/2-v)){let rt=v*v*(1-Q*Q/(B*B));if(rt>0)rt=Math.sqrt(rt);if(rt=v-rt,j.y-(e.y??0)>0)rt=-rt;X.y+=rt}return X},h}t(Nx,"linedCylinder");async function Wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let rt=e.width;if(e.width=(rt??0)*10/11-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=(e?.width?e?.width:g.width)+(n??0)*2,B=(e?.height?e?.height:g.height)+(c??0)*2,v=e.look==="neo"?B/4:B/8,q=B+v,{cssStyles:W}=e,H=m.svg(h),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-f/2-f/2*0.1,y:-q/2},{x:-f/2-f/2*0.1,y:q/2},...Ko(-f/2-f/2*0.1,q/2,f/2+f/2*0.1,q/2,v,0.8),{x:f/2+f/2*0.1,y:-q/2},{x:-f/2-f/2*0.1,y:-q/2},{x:-f/2,y:-q/2},{x:-f/2,y:q/2*1.1},{x:-f/2,y:-q/2}],X=H.polygon(j.map((rt)=>[rt.x,rt.y]),Y),Q=h.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return Q.attr("transform",`translate(0,${-v/2})`),y.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*0.1/2-(g.x-(g.left??0))},${-B/2+(e.padding??0)-v-(g.y-(g.top??0))})`),I(e,Q),e.intersect=function(rt){return w.polygon(e,j,rt)},h}t(Wx,"linedWaveEdgedRect");var lS=56,Uf=72,Oy=8,Iy=2,hS=8,cS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},$y=Math.PI/3,Dy=0.6,jf=t((r,e)=>{let i=e*Dy,s=e*Math.sqrt(1-Dy**2),o=Math.cos($y),n=-Math.sin($y),c=i*-n,h=r+i*o,g=s*o,y=s*n;return`M ${c-g} ${h-y} L ${c+g} ${h+y}`},"businessMarkerPathForCircle"),uS={normal:jf(-24,12),hollow:jf(-23,9),awesome:jf(-21,13),icon:"M 12 -8 L 26 -26"},Py=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"),od=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let h=m.svg(r).path(i,Gt(e,o?{fill:"none"}:{}));return r.insert(()=>h,":first-child").attr("class",s)}let n=r.append("path").attr("class",s).attr("d",i);if(o)n.attr("fill","none");return n},"appendActorPath"),fS=t((r,e,i,s,o,n,c=!1)=>{if(e.look==="handDrawn"){let y=m.svg(r).circle(i,s,o*2,Gt(e,c?{fill:"none"}:{}));return r.insert(()=>y,":first-child").attr("class",n)}let h=r.append("circle").attr("class",n).attr("cx",i).attr("cy",s).attr("r",o);if(c)h.attr("fill","none");return h},"appendActorCircle");var dS=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",uS[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function gn(r,e,i,s){let{labelStyles:o,nodeStyles:n}=k(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:h,bbox:g,label:y}=await P(r,c,te(e,`usecase-actor-variant usecase-actor-${i}`)),f=e.accessibleName??e.label;if(f)h.attr("role","img").attr("aria-label",f);y.attr("class","label actor-label usecase-actor-label");let{theme:B,themeVariables:v}=l();Ze(h,e.colorIndex,B,v.borderColorArray);let q,W;if(e.stereotype){let pt=await ls(h,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});q=pt.label.attr("class","label usecase-stereotype"),W=pt.bbox}let H=h.append("g").attr("class",`usecase-actor-glyph ${cS[i]}`).attr("style",n||null);await s(H,e),dS(H,e,i);let Y=e.padding??hS,j=W?.height??0,X=Uf+Oy+g.height+(W?j+Iy:0),Q=Math.max(lS,g.width,W?.width??0)+Y*2,rt=X+Y*2,it=-X/2;H.attr("transform",`translate(0,${it+Uf/2})`);let ct=it+Uf+Oy;if(q&&W)ct+=j/2,Py(q,W,ct),ct+=j/2+Iy;Py(y,g,ct+g.height/2);let lt=h.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-Q/2).attr("y",-rt/2).attr("width",Q).attr("height",rt).attr("opacity",0).attr("aria-hidden","true");return I(e,lt),e.intersect=(pt)=>w.rect(e,pt),h}t(gn,"renderUsecaseActor");var pS=["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 zx(r,e){return gn(r,e,"normal",(i,s)=>{od(i,s,pS,"usecase-actor-stick")})}t(zx,"usecaseActor");var gS=["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 Hx(r,e){return gn(r,e,"awesome",(i,s)=>{od(i,s,gS,"usecase-actor-awesome-silhouette")})}t(Hx,"usecaseActorAwesome");var mS=["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 Yx(r,e){return gn(r,e,"hollow",(i,s)=>{fS(i,s,0,-23,9,"usecase-actor-hollow-head",!0),od(i,s,mS,"usecase-actor-hollow-body",!0)})}t(Yx,"usecaseActorHollow");var Ds=52,Ry=42,qy=-2,yS=t(async(r,e)=>{let i=-Ds/2,s=qy-Ds/2;if(e.look==="handDrawn"){let f=m.svg(r).rectangle(i,s,Ds,Ds,Gt(e,{}));r.insert(()=>f,":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",Ds).attr("height",Ds).attr("rx",4).attr("ry",4);let o=e.icon??"",n=await Dl(o.includes(":")?o:`fa:${o}`),c=await nt(o,{height:Ry,width:Ry,fallbackPrefix:"fa"}),h=r.append("g").attr("class",`usecase-actor-icon-symbol${n?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),g=h.node()?.getBBox();if(g)h.attr("transform",`translate(${-g.width/2-g.x},${qy-g.height/2-g.y})`)},"drawIconActor");async function Ux(r,e){return gn(r,e,"icon",yS)}t(Ux,"usecaseActorIcon");var Ny=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 jx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let n=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:h,halfPadding:g,label:y}=await P(r,n,te(e,"usecase-business-shape"));y.attr("class","label usecase-label");let{theme:f,themeVariables:B}=l();Ze(c,e.colorIndex,f,B.borderColorArray);let v,q;if(i.stereotype){let st=await ls(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});v=st.label.attr("class","label usecase-stereotype"),q=st.bbox}let W=q?2:0,H=h.height+(q?.height??0)+W,Y=Math.max(h.width,q?.width??0),j=g??10,X=Y/2+j*2,Q=H/2+j*2,rt=Math.min(Math.max(j/5,1),j/2),it=Y/2+rt,ct=X-rt,lt=it/X,pt=ct/X,bt=Q*Math.sqrt(Math.max(0,1-lt*lt)),vt=-Q*Math.sqrt(Math.max(0,1-pt*pt));if(v&&q)Ny(v,q,-H/2+q.height/2);Ny(y,h,H/2-h.height/2);let wt;if(e.look==="handDrawn"){let at=m.svg(c).ellipse(0,0,X*2,Q*2,Gt(e,{}));wt=c.insert(()=>at,":first-child").attr("class","basic label-container usecase-business-ellipse")}else wt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",X).attr("ry",Q).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${it} ${bt} L ${ct} ${vt}`).attr("fill","none").attr("style",o||null);let kt=i.accessibleName??i.label;if(kt)c.attr("role","img").attr("aria-label",kt);return I(e,wt),e.calcIntersect=(st,at)=>w.ellipse(st,st.width/2,st.height/2,at),e.intersect=(st)=>w.ellipse(e,X,Q,st),c}t(jx,"usecaseBusiness");var Gf=8,Wy=4,xS=1,Xf=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),n=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-n})`)},"positionLabel"),CS=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:xS},"numericStrokeWidth");async function Gx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e),{stylesMap:n}=Di(e);e.labelStyle=s;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);g.attr("class","label usecase-json-title");let y=c.append("g").attr("class","usecase-json-table-grid"),f=[];for(let st of i.jsonRows??[]){let at=await ls(y,st.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),xt=await ls(y,st.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});f.push({key:{label:at.label.attr("class","label usecase-json-key"),bbox:at.bbox},value:{label:xt.label.attr("class","label usecase-json-value"),bbox:xt.bbox}})}let B=Math.max(0,...f.map(({key:st})=>st.bbox.width))+Gf*2,v=Math.max(0,...f.map(({value:st})=>st.bbox.width))+Gf*2,q=h.width+Gf*2,W=Math.max(q,B+v),H=v+Math.max(0,W-B-v),Y=h.height+Wy*2,j=f.map(({key:st,value:at})=>Math.max(st.bbox.height,at.bbox.height)+Wy*2),X=Y+j.reduce((st,at)=>st+at,0),Q=CS(n.get("stroke-width")),rt=W+Q*2,it=X+Q*2,ct=-W/2,lt=-X/2,pt=e.look==="handDrawn"?m.svg(c):void 0,bt=pt?Gt(e,{}):void 0,vt=t((st,at,xt,ot,St,Lt)=>{if(pt&&bt){let Yt=pt.rectangle(xt,ot,St,Lt,bt);return st.insert(()=>Yt,":first-child").attr("class",at)}return st.insert("rect",":first-child").attr("class",at).attr("x",xt).attr("y",ot).attr("width",St).attr("height",Lt).attr("style",o)},"insertCell"),wt=vt(c,"label-container usecase-json-border",-rt/2,-it/2,rt,it);vt(y,"usecase-json-cell usecase-json-title-cell",ct,lt,W,Y),y.node()?.append(g.node()),Xf(g,h,0,lt+Y/2);let kt=lt+Y;return f.forEach(({key:st,value:at},xt)=>{let ot=j[xt],St=y.append("g").attr("class","usecase-json-row").attr("data-row-index",xt).attr("transform",`translate(0,${kt})`);vt(St,"usecase-json-cell usecase-json-key-cell",ct,0,B,ot),vt(St,"usecase-json-cell usecase-json-value-cell",ct+B,0,H,ot),St.node()?.append(st.label.node(),at.label.node()),Xf(st.label,st.bbox,ct+B/2,ot/2),Xf(at.label,at.bbox,ct+B+H/2,ot/2),kt+=ot}),I(e,wt),e.intersect=(st)=>w.rect(e,st),c}t(Gx,"usecaseJsonTable");async function Xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2-2*h,10),e.height=Math.max((e?.height??0)-c*2-2*h,10);let{shapeSvg:g,bbox:y,label:f}=await P(r,e,te(e)),B=(e?.width?e?.width:y.width)+n*2+2*h,v=(e?.height?e?.height:y.height)+c*2+2*h,q=B-2*h,W=v-2*h,H=-q/2,Y=-W/2,{cssStyles:j}=e,X=m.svg(g),Q=Gt(e,{}),rt=[{x:H-h,y:Y+h},{x:H-h,y:Y+W+h},{x:H+q-h,y:Y+W+h},{x:H+q-h,y:Y+W},{x:H+q,y:Y+W},{x:H+q,y:Y+W-h},{x:H+q+h,y:Y+W-h},{x:H+q+h,y:Y-h},{x:H+h,y:Y-h},{x:H+h,y:Y},{x:H,y:Y},{x:H,y:Y+h}],it=[{x:H,y:Y+h},{x:H+q-h,y:Y+h},{x:H+q-h,y:Y+W},{x:H+q,y:Y+W},{x:H+q,y:Y},{x:H,y:Y}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ct=Oe(rt),lt=X.path(ct,Q),pt=Oe(it),bt=X.path(pt,Q);if(e.look!=="handDrawn")lt=Kf(lt),bt=Kf(bt);let vt=g.insert("g",":first-child");if(vt.insert(()=>lt),vt.insert(()=>bt),vt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")vt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")vt.selectAll("path").attr("style",s);return f.attr("transform",`translate(${-(y.width/2)-h-(y.x-(y.left??0))}, ${-(y.height/2)+h-(y.y-(y.top??0))})`),I(e,vt),e.intersect=function(wt){return w.polygon(e,rt,wt)},g}t(Xx,"multiRect");async function Vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.padding??0,g=e.look==="neo"?16:h,y=e.look==="neo"?12:h,f=!0;if(e.width||e.height)f=!1,e.width=(e?.width??0)-g*2,e.height=(e?.height??0)-y*3;let B=Math.max(n.width,e?.width??0)+g*2,v=Math.max(n.height,e?.height??0)+y*3,q=e.look==="neo"?v/4:v/8,W=v+(f?q/2:-q/2),H=-B/2,Y=-W/2,j=10,{cssStyles:X}=e,Q=Ko(H-j,Y+W+j,H+B-j,Y+W+j,q,0.8),rt=Q?.[Q.length-1],it=[{x:H-j,y:Y+j},{x:H-j,y:Y+W+j},...Q,{x:H+B-j,y:rt.y-j},{x:H+B,y:rt.y-j},{x:H+B,y:rt.y-2*j},{x:H+B+j,y:rt.y-2*j},{x:H+B+j,y:Y-j},{x:H+j,y:Y-j},{x:H+j,y:Y},{x:H,y:Y},{x:H,y:Y+j}],ct=[{x:H,y:Y+j},{x:H+B-j,y:Y+j},{x:H+B-j,y:rt.y-j},{x:H+B,y:rt.y-j},{x:H+B,y:Y},{x:H,y:Y}],lt=m.svg(o),pt=Gt(e,{});if(e.look!=="handDrawn")pt.roughness=0,pt.fillStyle="solid";let bt=Oe(it),vt=lt.path(bt,pt),wt=Oe(ct),kt=lt.path(wt,pt),st=o.insert(()=>vt,":first-child");if(st.insert(()=>kt),st.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")st.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")st.selectAll("path").attr("style",s);return st.attr("transform",`translate(0,${-q/2})`),c.attr("transform",`translate(${-(n.width/2)-j-(n.x-(n.left??0))}, ${-(n.height/2)+j-q-(n.y-(n.top??0))})`),I(e,st),e.intersect=function(at){return w.polygon(e,it,at)},o}t(Vx,"multiWaveEdgedRectangle");async function Kx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);if(e.labelStyle=s,!(e.useHtmlLabels||Ce(x())))e.centerLabel=!0;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=Math.max(h.width+(e.padding??0)*2,e?.width??0),f=Math.max(h.height+(e.padding??0)*2,e?.height??0),B=-y/2,v=-f/2,{cssStyles:q}=e,W=m.svg(c),H=Gt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=W.rectangle(B,v,y,f,H),j=c.insert(()=>Y,":first-child");if(j.attr("class","basic label-container outer-path"),g.attr("class","label noteLabel"),q&&e.look!=="handDrawn")j.selectAll("path").attr("style",q);if(o&&e.look!=="handDrawn")j.selectAll("path").attr("style",o);return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,j),e.intersect=function(X){return w.rect(e,X)},c}t(Kx,"note");var bS=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 Zx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,te(e)),c=n.width+(e.padding??0),h=n.height+(e.padding??0),g=c+h,y=0.5,f=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],B,{cssStyles:v}=e;if(e.look==="handDrawn"){let q=m.svg(o),W=Gt(e,{}),H=bS(0,0,g),Y=q.path(H,W);if(B=o.insert(()=>Y,":first-child").attr("transform",`translate(${-g/2+y}, ${g/2})`),v)B.attr("style",v)}else B=ro(o,g,g,f),B.attr("transform",`translate(${-g/2+y}, ${g/2})`);if(s)B.attr("style",s);return I(e,B),e.calcIntersect=function(q,W){let H=q.width,Y=[{x:H/2,y:0},{x:H,y:-H/2},{x:H/2,y:-H},{x:0,y:-H/2}];return w.polygon(q,Y,W)},e.intersect=function(q){return this.calcIntersect(e,q)},o}t(Zx,"question");async function Qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=g.width+(e.look==="neo"?n*2:n),B=Math.max(g.height+(e.look==="neo"?c*2:c),e.height??0),v=B/4,W=-Math.max(f,(e.width??0)-v)/2,H=-B/2,Y=H/2,j=[{x:W+Y,y:H},{x:W,y:0},{x:W+Y,y:-H},{x:-W,y:-H},{x:-W,y:H}],{cssStyles:X}=e,Q=m.svg(h),rt=Gt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let it=Oe(j),ct=Q.path(it,rt),lt=h.insert(()=>ct,":first-child");if(lt.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")lt.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")lt.selectAll("path").attr("style",s);return lt.attr("transform",`translate(${-Y/2},0)`),y.attr("transform",`translate(${-Y/2-g.width/2-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,lt),e.intersect=function(pt){return w.polygon(e,j,pt)},h}t(Qx,"rect_left_inv_arrow");async function Jx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=n.insert("g"),h=n.insert("g").attr("class","label").attr("style",s),{description:g,label:y}=e,f=await Ti(h,y,e.labelStyle,!0,!0),B={width:0,height:0};if(Ce(l())){let pt=f.children[0],bt=p(f);B=pt.getBoundingClientRect(),bt.attr("width",B.width),bt.attr("height",B.height)}a.info("Text 2",g);let v=g||[],q=f.getBBox(),W=await Ti(h,Array.isArray(v)?v.join("<br/>"):v,e.labelStyle,!0,!0),H=W.children[0],Y=p(W);B=H.getBoundingClientRect(),Y.attr("width",B.width),Y.attr("height",B.height);let j=(e.padding||0)/2;p(W).attr("transform","translate( "+(B.width>q.width?0:(q.width-B.width)/2)+", "+(q.height+j+5)+")"),p(f).attr("transform","translate( "+(B.width<q.width?0:-(q.width-B.width)/2)+", 0)"),B=h.node().getBBox(),h.attr("transform","translate("+-B.width/2+", "+(-B.height/2-j+3)+")");let X=B.width+(e.padding||0),Q=B.height+(e.padding||0),rt=-B.width/2-j,it=-B.height/2-j,ct,lt;if(e.look==="handDrawn"){let pt=m.svg(n),bt=Gt(e,{}),vt=pt.path(jr(rt,it,X,Q,e.rx||0),bt),wt=pt.line(-B.width/2-j,-B.height/2-j+q.height+j,B.width/2+j,-B.height/2-j+q.height+j,bt);lt=n.insert(()=>(a.debug("Rough node insert CXC",vt),wt),":first-child"),ct=n.insert(()=>(a.debug("Rough node insert CXC",vt),vt),":first-child")}else ct=c.insert("rect",":first-child"),lt=c.insert("line"),ct.attr("class","outer title-state").attr("style",s).attr("x",-B.width/2-j).attr("y",-B.height/2-j).attr("width",B.width+(e.padding||0)).attr("height",B.height+(e.padding||0)),lt.attr("class","divider").attr("x1",-B.width/2-j).attr("x2",B.width/2+j).attr("y1",-B.height/2-j+q.height+j).attr("y2",-B.height/2-j+q.height+j);return I(e,ct),e.intersect=function(pt){return w.rect(e,pt)},n}t(Jx,"rectWithTitle");async function t0(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 Ns(r,e,o)}t(t0,"roundedRect");var ns=8;async function e0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=(e?.width??h.width)+o*2+(e.look==="neo"?ns:ns*2),f=(e?.height??h.height)+n*2,B=y-ns,v=f,q=ns-y/2,W=-f/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let X=[{x:q,y:W},{x:q+B,y:W},{x:q+B,y:W+v},{x:q-ns,y:W+v},{x:q-ns,y:W},{x:q,y:W},{x:q,y:W+v}],Q=Y.polygon(X.map((it)=>[it.x,it.y]),j),rt=c.insert(()=>Q,":first-child");if(rt.attr("class","basic label-container outer-path").attr("style",tr(H)),s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);if(H&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return g.attr("transform",`translate(${ns/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,rt),e.intersect=function(it){return w.rect(e,it)},c}t(e0,"shadedProcess");async function r0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=(e?.width?e?.width:g.width)+n*2,B=((e?.height?e?.height:g.height)+c*2)*1.5,v=f,q=B/1.5,W=-v/2,H=-q/2,{cssStyles:Y}=e,j=m.svg(h),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=[{x:W,y:H},{x:W,y:H+q},{x:W+v,y:H+q},{x:W+v,y:H-q/2}],rt=Oe(Q),it=j.path(rt,X),ct=h.insert(()=>it,":first-child");if(ct.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")ct.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")ct.selectChildren("path").attr("style",s);return ct.attr("transform",`translate(0, ${q/4})`),y.attr("transform",`translate(${-v/2+(e.padding??0)-(g.x-(g.left??0))}, ${-q/4+(e.padding??0)-(g.y-(g.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,Q,lt)},h}t(r0,"slopedRect");async function i0(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,n={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await Ns(r,e,n);if(e.colorIndex!==void 0){let{theme:h,themeVariables:g}=l();Ze(c,e.colorIndex,h,g.borderColorArray)}return c}t(i0,"squareRect");var Jf=50,kS=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(Jf-1))),n=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-n),h:s}},"stadiumDimensions");async function o0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),{w:y,h:f}=kS(g,n,c),B=f/2,{cssStyles:v}=e,q=m.svg(h),W=Gt(e,{});if(e.look!=="handDrawn")W.roughness=0,W.fillStyle="solid";let H=[{x:-y/2+B,y:-f/2},{x:y/2-B,y:-f/2},...Ni(-y/2+B,0,B,Jf,90,270),{x:y/2-B,y:f/2},...Ni(y/2-B,0,B,Jf,270,450)],Y=Oe(H),j=q.path(Y,W),X=h.insert(()=>j,":first-child");if(X.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")X.selectChildren("path").attr("style",v);if(s&&e.look!=="handDrawn")X.selectChildren("path").attr("style",s);return I(e,X),e.intersect=function(Q){return w.polygon(e,H,Q)},h}t(o0,"stadium");async function s0(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return Ns(r,e,i)}t(s0,"state");function a0(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{cssStyles:n}=e,{lineColor:c,stateBorder:h,nodeBorder:g,nodeShadow:y}=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 f=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),B=m.svg(f),v=Gt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let q=B.circle(0,0,e.width,{...v,stroke:c,strokeWidth:2}),W=h??g,H=(e.width??0)*5/14,Y=B.circle(0,0,H,{...v,fill:W,stroke:W,strokeWidth:2,fillStyle:"solid"}),j=f.insert(()=>q,":first-child");if(j.insert(()=>Y),e.look!=="handDrawn")j.attr("class","outer-path");if(n)j.selectAll("path").attr("style",n);if(o)j.selectAll("path").attr("style",o);if(e.width<25&&y&&e.look!=="handDrawn"){let X=r.node()?.ownerSVGElement?.id??"",Q=X?`${X}-drop-shadow-small`:"drop-shadow-small";j.attr("style",`filter:url(#${Q})`)}return I(e,j),e.intersect=function(X){return w.circle(e,(e.width??0)/2,X)},f}t(a0,"stateEnd");function n0(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 n=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let g=m.svg(n).circle(0,0,e.width,Gg(s));c=n.insert(()=>g),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=n.insert("circle",":first-child"),c.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 h=r.node()?.ownerSVGElement?.id??"",g=h?`${h}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${g})`)}return I(e,c),e.intersect=function(h){return w.circle(e,(e.width??7)/2,h)},n}t(n0,"stateStart");var Ps=8;async function l0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e?.padding??8,n=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.width+2*Ps+n,e.width??0),f=Math.max(g.height+c,e.height??0),B=y-2*Ps,v=f,q=-y/2,W=-f/2,H=[{x:0,y:0},{x:B,y:0},{x:B,y:-v},{x:0,y:-v},{x:0,y:0},{x:-8,y:0},{x:B+8,y:0},{x:B+8,y:-v},{x:-8,y:-v},{x:-8,y:0}];if(e.look==="handDrawn"){let Y=m.svg(h),j=Gt(e,{}),X=Y.rectangle(q,W,B+16,v,j),Q=Y.line(q+Ps,W,q+Ps,W+v,j),rt=Y.line(q+Ps+B,W,q+Ps+B,W+v,j);h.insert(()=>Q,":first-child"),h.insert(()=>rt,":first-child");let it=h.insert(()=>X,":first-child"),{cssStyles:ct}=e;it.attr("class","basic label-container").attr("style",tr(ct)),I(e,it)}else{let Y=ro(h,B,v,H);if(s)Y.attr("style",s);I(e,Y)}return e.intersect=function(Y){return w.polygon(e,H,Y)},h}t(l0,"subroutine");var Vf=0.2;async function h0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-n*2-Vf*(e.height+c*2),10);let{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=(e?.height?e?.height:g.height)+c*2,f=Vf*y,B=Vf*y,q=(e?.width?e?.width:g.width)+n*2+f-f,W=y,H=-q/2,Y=-W/2,{cssStyles:j}=e,X=m.svg(h),Q=Gt(e,{}),rt=[{x:H-f/2,y:Y},{x:H+q+f/2,y:Y},{x:H+q+f/2,y:Y+W},{x:H-f/2,y:Y+W}],it=[{x:H+q-f/2,y:Y+W},{x:H+q+f/2,y:Y+W},{x:H+q+f/2,y:Y+W-B}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ct=Oe(rt),lt=X.path(ct,Q),pt=Oe(it),bt=X.path(pt,{...Q,fillStyle:"solid"}),vt=h.insert(()=>bt,":first-child");if(vt.insert(()=>lt,":first-child"),vt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")vt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")vt.selectAll("path").attr("style",s);return I(e,vt),e.intersect=function(wt){return w.polygon(e,rt,wt)},h}t(h0,"taggedRect");async function c0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),g=Math.max(n.height+(e.padding??0)*2,e?.height??0),y=g/8,f=0.2*h,B=0.2*g,v=g+y,{cssStyles:q}=e,W=m.svg(o),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-h/2-h/2*0.1,y:v/2},...Ko(-h/2-h/2*0.1,v/2,h/2+h/2*0.1,v/2,y,0.8),{x:h/2+h/2*0.1,y:-v/2},{x:-h/2-h/2*0.1,y:-v/2}],j=-h/2+h/2*0.1,X=-v/2-B*0.4,Q=[{x:j+h-f,y:(X+g)*1.3},{x:j+h,y:X+g-B},{x:j+h,y:(X+g)*0.9},...Ko(j+h,(X+g)*1.25,j+h-f,(X+g)*1.3,-g*0.02,0.5)],rt=Oe(Y),it=W.path(rt,H),ct=Oe(Q),lt=W.path(ct,{...H,fillStyle:"solid"}),pt=o.insert(()=>lt,":first-child");if(pt.insert(()=>it,":first-child"),pt.attr("class","basic label-container outer-path"),q&&e.look!=="handDrawn")pt.selectAll("path").attr("style",q);if(s&&e.look!=="handDrawn")pt.selectAll("path").attr("style",s);return pt.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-g/2+(e.padding??0)-y/2-(n.y-(n.top??0))})`),I(e,pt),e.intersect=function(bt){return w.polygon(e,Y,bt)},o}t(c0,"taggedWaveEdgedRectangle");async function u0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,te(e)),c=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),g=-c/2,y=-h/2,f=o.insert("rect",":first-child");return f.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",g).attr("y",y).attr("width",c).attr("height",h),I(e,f),e.intersect=function(B){return w.rect(e,B)},o}t(u0,"text");var wS=t((r,e,i,s,o,n)=>`M${r},${e}
234
234
  a${o},${n} 0,0,1 0,${-s}
235
235
  l${i},0
236
236
  a${o},${n} 0,0,1 0,${s}
237
237
  M${i},${-s}
238
238
  a${o},${n} 0,0,0 0,${s}
239
- l${-i},0`,"createCylinderPathD"),SS=t((r,e,i,s,o,n)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${n} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${n} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),TS=t((r,e,i,s,o,n)=>[`M${r+i/2},${-s/2}`,`a${o},${n} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),zy=5,Hy=10;async function f0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-n,e.height<zy)e.height=zy}if(e.width){let j=c/2/(2.5+c/50);if(e.width=e.width-n-j*3,e.width<Hy)e.width=Hy}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,Zt(e)),f=Math.max(e.height??0,g.height)+n,b=f/2,F=b/(2.5+f/50),N=Math.max(e.width??0,g.width)+F+n,{cssStyles:W}=e,H;if(e.look==="handDrawn"){let Y=m.svg(h),j=SS(0,0,N,f,F,b),K=TS(0,0,N,f,F,b),Q=Y.path(j,Gt(e,{})),rt=Y.path(K,Gt(e,{fill:"none"}));if(H=h.insert(()=>rt,":first-child"),H=h.insert(()=>Q,":first-child"),H.attr("class","basic label-container"),W)H.attr("style",W)}else{let Y=wS(0,0,N,f,F,b);if(H=h.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",Je(W)).attr("style",s),H.attr("class","basic label-container outer-path"),W)H.selectAll("path").attr("style",W);if(s)H.selectAll("path").attr("style",s)}return H.attr("label-offset-x",F),H.attr("transform",`translate(${-N/2}, ${f/2} )`),y.attr("transform",`translate(${-(g.width/2)-F-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,H),e.intersect=function(Y){let j=w.rect(e,Y),K=j.y-(e.y??0);if(b!=0&&(Math.abs(K)<(e.height??0)/2||Math.abs(K)==(e.height??0)/2&&Math.abs(j.x-(e.x??0))>(e.width??0)/2-F)){let Q=F*F*(1-K*K/(b*b));if(Q!=0)Q=Math.sqrt(Math.abs(Q));if(Q=F-Q,Y.x-(e.x??0)>0)Q=-Q;j.x+=Q}return j},h}t(f0,"tiltedCylinder");async function d0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),b=[{x:-3*y/6,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:0,y:-y}],F,{cssStyles:N}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Ee(b),j=W.path(Y,H);if(F=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),N)F.attr("style",N)}else F=Xi(h,f,y,b);if(s)F.attr("style",s);return e.width=f,e.height=y,I(e,F),e.intersect=function(W){return w.polygon(e,b,W)},h}t(d0,"trapezoid");async function p0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=15,g=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<g)e.height=g;if(e.width=(e.width??0)-n*2,e.width<h)e.width=h}let{shapeSvg:y,bbox:f}=await P(r,e,Zt(e)),b=(e?.width?e?.width:f.width)+n*2,F=(e?.height?e?.height:f.height)+c*2,{cssStyles:N}=e,W=m.svg(y),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-b/2*0.8,y:-F/2},{x:b/2*0.8,y:-F/2},{x:b/2,y:-F/2*0.6},{x:b/2,y:F/2},{x:-b/2,y:F/2},{x:-b/2,y:-F/2*0.6}],j=Ee(Y),K=W.path(j,H),Q=y.insert(()=>K,":first-child");if(Q.attr("class","basic label-container outer-path"),N&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",N);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return I(e,Q),e.intersect=function(rt){return w.polygon(e,Y,rt)},y}t(p0,"trapezoidalPentagon");var Yy=10,Uy=10;async function g0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-n)/2,e.width<Uy)e.width=Uy;if(e.height=e?.height??0,e.height<Yy)e.height=Yy}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,Zt(e)),y=ft(l().flowchart?.htmlLabels),f=(e?.width?e?.width:h.width)+n,b=e?.height?e?.height:f+h.height,F=b,N=[{x:0,y:0},{x:F,y:0},{x:F/2,y:-b}],{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=Ee(N),K=H.path(j,Y),Q=c.insert(()=>K,":first-child").attr("transform",`translate(${-b/2}, ${b/2})`).attr("class","outer-path");if(W&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return e.width=f,e.height=b,I(e,Q),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${b/2-(h.height+(e.padding??0)/(y?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(rt){return a.info("Triangle intersect",e,N,rt),w.polygon(e,N,rt)},c}t(g0,"triangle");async function m0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=!0;if(e.width||e.height){if(h=!1,e.width=(e?.width??0)-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,Zt(e)),b=(e?.width?e?.width:y.width)+(n??0)*2,F=(e?.height?e?.height:y.height)+(c??0)*2,N=e.look==="neo"?F/4:F/8,W=F+(h?N:-N),{cssStyles:H}=e,j=14-b,K=j>0?j/2:0,Q=m.svg(g),rt=Gt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let it=[{x:-b/2-K,y:W/2},...Ho(-b/2-K,W/2,b/2+K,W/2,N,0.8),{x:b/2+K,y:-W/2},{x:-b/2-K,y:-W/2}],ct=Ee(it),lt=Q.path(ct,rt),pt=g.insert(()=>lt,":first-child");if(pt.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")pt.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")pt.selectAll("path").attr("style",s);return pt.attr("transform",`translate(0,${-N/2})`),f.attr("transform",`translate(${-b/2+(e.padding??0)-(y.x-(y.left??0))},${-F/2+(e.padding??0)-N-(y.y-(y.top??0))})`),I(e,pt),e.intersect=function(bt){return w.polygon(e,it,bt)},g}t(m0,"waveEdgedRectangle");async function y0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=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 rt=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-rt*2.2222222222222223),e.width=e.width-n*2}let{shapeSvg:h,bbox:g}=await P(r,e,Zt(e)),y=(e?.width?e?.width:g.width)+n*2,f=(e?.height?e?.height:g.height)+c,b=f/8,F=f+b*2,{cssStyles:N}=e,W=m.svg(h),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-y/2,y:F/2},...Ho(-y/2,F/2,y/2,F/2,b,1),{x:y/2,y:-F/2},...Ho(y/2,-F/2,-y/2,-F/2,b,-1)],j=Ee(Y),K=W.path(j,H),Q=h.insert(()=>K,":first-child");if(Q.attr("class","basic label-container"),N&&e.look!=="handDrawn")Q.selectAll("path").attr("style",N);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return I(e,Q),e.intersect=function(rt){return w.polygon(e,Y,rt)},h}t(y0,"waveRectangle");var er=10;async function x0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-er,10),e.height=Math.max((e?.height??0)-n*2-er,10);let{shapeSvg:c,bbox:h,label:g}=await P(r,e,Zt(e)),y=(e?.width?e?.width:h.width)+o*2+er,f=(e?.height?e?.height:h.height)+n*2+er,b=y-er,F=f-er,N=-b/2,W=-F/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{}),K=[{x:N-er,y:W-er},{x:N-er,y:W+F},{x:N+b,y:W+F},{x:N+b,y:W-er}],Q=`M${N-er},${W-er} L${N+b},${W-er} L${N+b},${W+F} L${N-er},${W+F} L${N-er},${W-er}
240
- M${N-er},${W} L${N+b},${W}
241
- M${N},${W-er} L${N},${W+F}`;if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let rt=Y.path(Q,j),it=c.insert(()=>rt,":first-child");if(it.attr("transform",`translate(${er/2}, ${er/2})`),it.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")it.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")it.selectAll("path").attr("style",s);return g.attr("transform",`translate(${-(h.width/2)+er/2-(h.x-(h.left??0))}, ${-(h.height/2)+er/2-(h.y-(h.top??0))})`),I(e,it),e.intersect=function(ct){return w.polygon(e,K,ct)},c}t(x0,"windowPane");var jy=new Set(["redux-color","redux-dark-color"]),_S=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function sd(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=x(),{rowEven:n,rowOdd:c,nodeBorder:h,borderColorArray:g}=o;if(e.look==="handDrawn"){let{themeVariables:Wt}=x(),{background:ee}=Wt,ce={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ee}`]};await sd(r,ce)}let y=x();e.useHtmlLabels=y.htmlLabels;let f=y.er?.diagramPadding??10,b=y.er?.entityPadding??6,{cssStyles:F}=e,{labelStyles:N,nodeStyles:W}=k(e);if(i.attributes.length===0&&e.label){let Wt={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5,classes:""};if(He(e.label,y)+Wt.labelPaddingX*2<y.er.minEntityWidth)e.width=y.er.minEntityWidth;let ee=await Os(r,e,Wt);if(s!=null&&jy.has(s)){let ce=i.colorIndex??0;ee.attr("data-color-id",`color-${ce%g.length}`)}if(!ft(y.htmlLabels)){let ce=ee.select("text"),ue=ce.node()?.getBBox();ce.attr("transform",`translate(${-ue.width/2}, 0)`)}return ee}if(!y.htmlLabels)f*=1.25,b*=1.25;let H=Zt(e);if(!H)H="node default";let Y=r.insert("g").attr("class",H).attr("id",e.domId||e.id),j=await Ms(Y,e.label??"",y,0,0,["name"],N);j.height+=b;let K=0,Q=[],rt=[],it=0,ct=0,lt=0,pt=0,bt=!0,vt=!0;for(let Wt of i.attributes){let ee=await Ms(Y,Wt.type,y,0,K,["attribute-type"],N);it=Math.max(it,ee.width+f);let ce=await Ms(Y,Wt.name,y,0,K,["attribute-name"],N);ct=Math.max(ct,ce.width+f);let ue=await Ms(Y,Wt.keys.join(),y,0,K,["attribute-keys"],N);lt=Math.max(lt,ue.width+f);let Xe=await Ms(Y,Wt.comment,y,0,K,["attribute-comment"],N);pt=Math.max(pt,Xe.width+f);let Ge=Math.max(ee.height,ce.height,ue.height,Xe.height)+b;rt.push({yOffset:K,rowHeight:Ge}),K+=Ge}let wt=4;if(lt<=f)bt=!1,lt=0,wt--;if(pt<=f)vt=!1,pt=0,wt--;let kt=Y.node().getBBox();if(j.width+f*2-(it+ct+lt+pt)>0){let Wt=j.width+f*2-(it+ct+lt+pt);if(it+=Wt/wt,ct+=Wt/wt,lt>0)lt+=Wt/wt;if(pt>0)pt+=Wt/wt}let st=it+ct+lt+pt,at=m.svg(Y),xt=Gt(e,{});if(e.look!=="handDrawn")xt.roughness=0,xt.fillStyle="solid";let ot=0;if(rt.length>0)ot=rt.reduce((Wt,ee)=>Wt+(ee?.rowHeight??0),0);let St=Math.max(kt.width+f*2,e?.width||0,st),Lt=Math.max((ot??0)+j.height,e?.height||0),Yt=-St/2,Ht=-Lt/2;if(Y.selectAll("g:not(:first-child)").each((Wt,ee,ce)=>{let ue=p(ce[ee]),Xe=ue.attr("transform"),Ge=0,ui=0;if(Xe){let si=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Xe);if(si){if(Ge=parseFloat(si[1]),ui=parseFloat(si[2]),ue.attr("class").includes("attribute-name"))Ge+=it;else if(ue.attr("class").includes("attribute-keys"))Ge+=it+ct;else if(ue.attr("class").includes("attribute-comment"))Ge+=it+ct+lt}}ue.attr("transform",`translate(${Yt+f/2+Ge}, ${ui+Ht+j.height+b/2})`)}),Y.select(".name").attr("transform","translate("+-j.width/2+", "+(Ht+b/2)+")"),s!=null&&jy.has(s)){let Wt=i.colorIndex??0;Y.attr("data-color-id",`color-${Wt%g.length}`)}let ne=at.rectangle(Yt,Ht,St,Lt,xt),ie=Y.insert(()=>ne,":first-child").attr("class","outer-path").attr("style",F.join(""));Q.push(0);for(let[Wt,ee]of rt.entries()){let ue=(Wt+1)%2===0&&ee.yOffset!==0,Xe=at.rectangle(Yt,j.height+Ht+ee?.yOffset,St,ee?.rowHeight,{...xt,fill:ue?n:c,stroke:h});Y.insert(()=>Xe,"g.label").attr("style",F.join("")).attr("class",`row-rect-${ue?"even":"odd"}`)}let be=0.0001,_e=Es(Yt,j.height+Ht,St+Yt,j.height+Ht,be),ge=at.polygon(_e.map((Wt)=>[Wt.x,Wt.y]),xt);if(Y.insert(()=>ge).attr("class","divider"),_e=Es(it+Yt,j.height+Ht,it+Yt,Lt+Ht,be),ge=at.polygon(_e.map((Wt)=>[Wt.x,Wt.y]),xt),Y.insert(()=>ge).attr("class","divider"),bt){let Wt=it+ct+Yt;_e=Es(Wt,j.height+Ht,Wt,Lt+Ht,be),ge=at.polygon(_e.map((ee)=>[ee.x,ee.y]),xt),Y.insert(()=>ge).attr("class","divider")}if(vt){let Wt=it+ct+lt+Yt;_e=Es(Wt,j.height+Ht,Wt,Lt+Ht,be),ge=at.polygon(_e.map((ee)=>[ee.x,ee.y]),xt),Y.insert(()=>ge).attr("class","divider")}for(let Wt of Q){let ee=j.height+Ht+Wt;_e=Es(Yt,ee,St+Yt,ee,be),ge=at.polygon(_e.map((ce)=>[ce.x,ce.y]),xt),Y.insert(()=>ge).attr("class","divider")}if(I(e,ie),W&&e.look!=="handDrawn")if(s!=null&&_S.has(s))Y.selectAll("path").attr("style",W);else{let ee=W.split(";")?.filter((ce)=>ce.includes("stroke"))?.map((ce)=>`${ce}`).join("; ");Y.selectAll("path").attr("style",ee??""),Y.selectAll(".row-rect-even path").attr("style",W)}return e.intersect=function(Wt){return w.rect(e,Wt)},Y}t(sd,"erBox");async function Ms(r,e,i,s=0,o=0,n=[],c=""){let h=r.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==en(e))e=en(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let g=h.node().appendChild(await Le(h,e,{width:He(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let f=g.children[0];f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(f.childNodes[0])f=f.childNodes[0],f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let y=g.getBBox();if(ft(i.htmlLabels)){let f=g.children[0];f.style.textAlign="start";let b=p(g);y=f.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}return y}t(Ms,"addText");function Es(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(Es,"lineToPolygon");async function C0(r,e,i,s,o=i.class.padding??12){let n=!s?3:0,c=r.insert("g").attr("class",Zt(e)).attr("id",e.domId||e.id),h=null,g=null,y=null,f=null,b=0,F=0,N=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let K=e.annotations[0];await pn(h,{text:`«${K}»`},0),b=h.node().getBBox().height}g=c.insert("g").attr("class","label-group text"),await pn(g,e,0,["font-weight: bolder"]);let W=g.node().getBBox();F=W.height,y=c.insert("g").attr("class","members-group text");let H=0;for(let K of e.members){let Q=await pn(y,K,H,[K.parseClassifier()]);H+=Q+n}if(N=y.node().getBBox().height,N<=0)N=o/2;f=c.insert("g").attr("class","methods-group text");let Y=0;for(let K of e.methods){let Q=await pn(f,K,Y,[K.parseClassifier()]);Y+=Q+n}let j=c.node().getBBox();if(h!==null){let K=h.node().getBBox();h.attr("transform",`translate(${-K.width/2})`)}return g.attr("transform",`translate(${-W.width/2}, ${b})`),j=c.node().getBBox(),y.attr("transform",`translate(0, ${b+F+o*2})`),j=c.node().getBBox(),f.attr("transform",`translate(0, ${b+F+(N?N+o*4:o*2)})`),j=c.node().getBBox(),{shapeSvg:c,bbox:j}}t(C0,"textHelper");async function pn(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),n=x(),c="useHtmlLabels"in e?e.useHtmlLabels:ft(n.htmlLabels)??!0,h="";if("text"in e)h=e.text;else h=e.label;if(!c&&h.startsWith("\\"))h=h.substring(1);if(he(h))c=!0;let g=await Le(o,sl(jt(h)),{width:He(h,n)+50,classes:"markdown-node-label",useHtmlLabels:c},n),y,f=1;if(!c){if(s.includes("font-weight: bolder"))p(g).selectAll("tspan").attr("font-weight","");f=g.children.length;let b=g.children[0];if(g.textContent===""||g.textContent.includes("&gt")){if(b.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" ")b.textContent=b.textContent[0]+" "+b.textContent.substring(1)}if(b.textContent==="undefined")b.textContent="";y=g.getBBox()}else{let b=g.children[0],F=p(g);if(f=b.innerHTML.split("<br>").length,b.innerHTML.includes("</math>"))f+=b.innerHTML.split("<mrow>").length-1;await td(b),y=b.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}return o.attr("transform","translate(0,"+(-y.height/(2*f)+i)+")"),y.height}t(pn,"addText");async function b0(r,e){let i=l(),{theme:s,themeVariables:o}=i,{useGradient:n,borderColorArray:c}=o,h=i.class.padding??12,g=h,y=e.useHtmlLabels??ft(i.htmlLabels)??!0,f=e;f.annotations=f.annotations??[],f.members=f.members??[],f.methods=f.methods??[];let{shapeSvg:b,bbox:F}=await C0(r,e,i,y,g);Ze(b,e.colorIndex,s,c);let{labelStyles:N,nodeStyles:W}=k(e);e.labelStyle=N,e.cssStyles=f.styles||"";let H=f.styles?.join(";")||W||"";if(!e.cssStyles)e.cssStyles=H.replaceAll("!important","").split(";");let Y=f.members.length===0&&f.methods.length===0&&!i.class?.hideEmptyMembersBox,j=m.svg(b),K=Gt(e,{});if(e.look!=="handDrawn")K.roughness=0,K.fillStyle="solid";let Q=Math.max(e.width??0,F.width),rt=Math.max(e.height??0,F.height),it=(e.height??0)>F.height;if(f.members.length===0&&f.methods.length===0)rt+=g;else if(f.members.length>0&&f.methods.length===0)rt+=g*2;let ct=-Q/2,lt=-rt/2,pt=Y?h*2:f.members.length===0&&f.methods.length===0?-h:0;if(it)pt=h*2;let bt=j.rectangle(ct-h,lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0),Q+2*h,rt+2*h+pt,K),vt=b.insert(()=>bt,":first-child");vt.attr("class","basic label-container outer-path");let wt=vt.node().getBBox(),kt=b.select(".annotation-group").node().getBBox().height-(Y?h/2:0)||0,st=b.select(".label-group").node().getBBox().height-(Y?h/2:0)||0,at=b.select(".members-group").node().getBBox().height-(Y?h/2:0)||0,xt=(kt+st+lt+h-(lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0)))/2;if(b.selectAll(".text").each((ot,St,Lt)=>{let Yt=p(Lt[St]),Ht=Yt.attr("transform"),ne=0;if(Ht){let ge=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ht);if(ge)ne=parseFloat(ge[2])}let ie=ne+lt+h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0);if(Yt.attr("class").includes("methods-group")){let _e=Math.max(at,g/2);if(it)ie=Math.max(xt,kt+st+_e+lt+g*2+h)+g*2;else ie=kt+st+_e+lt+g*4+h}if(f.members.length===0&&f.methods.length===0&&i.class?.hideEmptyMembersBox)if(f.annotations.length>0)ie=ne-g;else ie=ne;if(!y)ie-=4;let be=ct;if(Yt.attr("class").includes("label-group")||Yt.attr("class").includes("annotation-group"))be=-Yt.node()?.getBBox().width/2||0,b.selectAll("text").each(function(_e,ge,Wt){if(window.getComputedStyle(Wt[ge]).textAnchor==="middle")be=0});Yt.attr("transform",`translate(${be}, ${ie})`)}),f.members.length>0||f.methods.length>0||Y){let ot=kt+st+lt+h,St=j.line(wt.x,ot,wt.x+wt.width,ot+0.001,K);b.insert(()=>St).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(Y||f.members.length>0||f.methods.length>0){let ot=kt+st+at+lt+g*2+h,St=j.line(wt.x,it?Math.max(xt,ot):ot,wt.x+wt.width,(it?Math.max(xt,ot):ot)+0.001,K);b.insert(()=>St).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(f.look!=="handDrawn")b.selectAll("path").attr("style",H);if(vt.select(":nth-child(2)").attr("style",H),b.selectAll(".divider").select("path").attr("style",H),e.labelStyle)b.selectAll("span").attr("style",e.labelStyle);else b.selectAll("span").attr("style",H);if(!y){let ot=RegExp(/color\s*:\s*([^;]*)/),St=ot.exec(H);if(St){let Lt=St[0].replace("color","fill");b.selectAll("tspan").attr("style",Lt)}else if(N){let Lt=ot.exec(N);if(Lt){let Yt=Lt[0].replace("color","fill");b.selectAll("tspan").attr("style",Yt)}}}return I(e,vt),e.intersect=function(ot){return w.rect(e,ot)},b}t(b0,"classBox");async function k0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e,n=e,c=20,h=20,g="verifyMethod"in e,y=Zt(e),f=l(),{themeVariables:b}=f,{borderColorArray:F,requirementEdgeLabelBackground:N}=b,W=f.layout==="elk"?"start":"center",H=r.insert("g").attr("class",y).attr("id",e.domId??e.id),Y;if(g)Y=await Ei(H,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else Y=await Ei(H,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let j=Y,K=await Ei(H,o.name,j,e.labelStyle+"; font-weight: bold;");if(j+=K+h,g){let wt=await Ei(H,`${o.requirementId?`ID: ${o.requirementId}`:""}`,j,e.labelStyle,W);j+=wt;let kt=await Ei(H,`${o.text?`Text: ${o.text}`:""}`,j,e.labelStyle,W);j+=kt;let st=await Ei(H,`${o.risk?`Risk: ${o.risk}`:""}`,j,e.labelStyle,W);j+=st,await Ei(H,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,j,e.labelStyle,W)}else{let wt=await Ei(H,`${n.type?`Type: ${n.type}`:""}`,j,e.labelStyle,W);j+=wt,await Ei(H,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,j,e.labelStyle,W)}let Q=(H.node()?.getBBox().width??200)+c,rt=(H.node()?.getBBox().height??200)+c,it=-Q/2,ct=-rt/2,lt=m.svg(H),pt=Gt(e,{});if(e.look!=="handDrawn")pt.roughness=0,pt.fillStyle="solid";let bt=lt.rectangle(it,ct,Q,rt,pt),vt=H.insert(()=>bt,":first-child");if(vt.attr("class","basic label-container outer-path").attr("style",s),F?.length){let wt=e.colorIndex??0;H.attr("data-color-id",`color-${wt%F.length}`)}if(H.selectAll(".label").each((wt,kt,st)=>{let at=p(st[kt]),xt=at.attr("transform"),ot=0,St=0;if(xt){let ne=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(xt);if(ne)ot=parseFloat(ne[1]),St=parseFloat(ne[2])}let Lt=St-rt/2,Yt=it+c/2;if(kt===0||kt===1)Yt=ot;at.attr("transform",`translate(${Yt}, ${Lt+c})`)}),j>Y+K+h){let wt=ct+Y+K+h,kt;if(e.look==="neo"){let xt=[[it,wt],[it+Q,wt],[it+Q,wt+0.001],[it,wt+0.001]];kt=lt.polygon(xt,pt)}else kt=lt.line(it,wt,it+Q,wt,pt);H.insert(()=>kt).attr("class","divider")}if(I(e,vt),e.intersect=function(wt){return w.rect(e,wt)},s&&e.look!=="handDrawn"&&(N||F?.length))H.selectAll("path").attr("style",s);return H}t(k0,"requirementBox");async function Ei(r,e,i,s="",o="center"){if(e==="")return 0;let n=r.insert("g").attr("class","label").attr("style",s),c=l(),h=c.htmlLabels??!0,g=await Le(n,sl(jt(e)),{width:He(e,c)+50,classes:"markdown-node-label",useHtmlLabels:h,style:s},c),y;if(!h){let f=g.children[0];for(let b of f.children)if(s)b.setAttribute("style",s);if(o==="start"){f.setAttribute("text-anchor","start");for(let b of f.children)b.setAttribute("text-anchor","start")}y=g.getBBox(),y.height+=6}else{let f=g.children[0],b=p(g);if(o==="start")p(f).style("text-align","left");y=f.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}return n.attr("transform",`translate(${-y.width/2},${-y.height/2+i})`),y.height}t(Ei,"addText");var BS=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 w0(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s||"";let n=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:h,bbox:g,label:y}=await P(r,e,Zt(e)),f=e.padding||10,b="",F;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)b=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),F=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",b).attr("target","_blank");let N={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},W,H;if(F)({label:W,bbox:H}=await es(F,"ticket"in e&&e.ticket||"",N));else({label:W,bbox:H}=await es(h,"ticket"in e&&e.ticket||"",N));let{label:Y,bbox:j}=await es(h,"assigned"in e&&e.assigned||"",N);e.width=c;let K=10,Q=e?.width||0,rt=Math.max(H.height,j.height)/2,it=Math.max(g.height+K*2,e?.height||0)+rt,ct=-Q/2,lt=-it/2;y.attr("transform","translate("+(f-Q/2)+", "+(-rt-g.height/2)+")"),W.attr("transform","translate("+(f-Q/2)+", "+(-rt+g.height/2)+")"),Y.attr("transform","translate("+(f+Q/2-j.width-2*n)+", "+(-rt+g.height/2)+")");let pt,{rx:bt,ry:vt}=e,{cssStyles:wt}=e;if(e.look==="handDrawn"){let kt=m.svg(h),st=Gt(e,{}),at=bt||vt?kt.path(Jr(ct,lt,Q,it,bt||0),st):kt.rectangle(ct,lt,Q,it,st);pt=h.insert(()=>at,":first-child"),pt.attr("class","basic label-container").attr("style",wt?wt:null)}else{pt=h.insert("rect",":first-child"),pt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",bt??5).attr("ry",vt??5).attr("x",ct).attr("y",lt).attr("width",Q).attr("height",it);let kt="priority"in e&&e.priority;if(kt){let st=h.append("line"),at=ct+2,xt=lt+Math.floor((bt??0)/2),ot=lt+it-Math.floor((bt??0)/2);st.attr("x1",at).attr("y1",xt).attr("x2",at).attr("y2",ot).attr("stroke-width","4").attr("stroke",BS(kt))}}return I(e,pt),e.height=it,e.intersect=function(kt){return w.rect(e,kt)},h}t(w0,"kanbanItem");async function S0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,Zt(e)),g=n.width+10*c,y=n.height+8*c,f=0.15*g,{cssStyles:b}=e,F=n.width+20,N=n.height+20,W=Math.max(g,F),H=Math.max(y,N);h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let Y,j=`M0 0
239
+ l${-i},0`,"createCylinderPathD"),SS=t((r,e,i,s,o,n)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${n} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${n} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),TS=t((r,e,i,s,o,n)=>[`M${r+i/2},${-s/2}`,`a${o},${n} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),zy=5,Hy=10;async function f0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-n,e.height<zy)e.height=zy}if(e.width){let j=c/2/(2.5+c/50);if(e.width=e.width-n-j*3,e.width<Hy)e.width=Hy}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=Math.max(e.height??0,g.height)+n,B=f/2,v=B/(2.5+f/50),q=Math.max(e.width??0,g.width)+v+n,{cssStyles:W}=e,H;if(e.look==="handDrawn"){let Y=m.svg(h),j=SS(0,0,q,f,v,B),X=TS(0,0,q,f,v,B),Q=Y.path(j,Gt(e,{})),rt=Y.path(X,Gt(e,{fill:"none"}));if(H=h.insert(()=>rt,":first-child"),H=h.insert(()=>Q,":first-child"),H.attr("class","basic label-container"),W)H.attr("style",W)}else{let Y=wS(0,0,q,f,v,B);if(H=h.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",tr(W)).attr("style",s),H.attr("class","basic label-container outer-path"),W)H.selectAll("path").attr("style",W);if(s)H.selectAll("path").attr("style",s)}return H.attr("label-offset-x",v),H.attr("transform",`translate(${-q/2}, ${f/2} )`),y.attr("transform",`translate(${-(g.width/2)-v-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,H),e.intersect=function(Y){let j=w.rect(e,Y),X=j.y-(e.y??0);if(B!=0&&(Math.abs(X)<(e.height??0)/2||Math.abs(X)==(e.height??0)/2&&Math.abs(j.x-(e.x??0))>(e.width??0)/2-v)){let Q=v*v*(1-X*X/(B*B));if(Q!=0)Q=Math.sqrt(Math.abs(Q));if(Q=v-Q,Y.x-(e.x??0)>0)Q=-Q;j.x+=Q}return j},h}t(f0,"tiltedCylinder");async function d0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:-3*y/6,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:0,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(d0,"trapezoid");async function p0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=15,g=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<g)e.height=g;if(e.width=(e.width??0)-n*2,e.width<h)e.width=h}let{shapeSvg:y,bbox:f}=await P(r,e,te(e)),B=(e?.width?e?.width:f.width)+n*2,v=(e?.height?e?.height:f.height)+c*2,{cssStyles:q}=e,W=m.svg(y),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-B/2*0.8,y:-v/2},{x:B/2*0.8,y:-v/2},{x:B/2,y:-v/2*0.6},{x:B/2,y:v/2},{x:-B/2,y:v/2},{x:-B/2,y:-v/2*0.6}],j=Oe(Y),X=W.path(j,H),Q=y.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),q&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",q);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return I(e,Q),e.intersect=function(rt){return w.polygon(e,Y,rt)},y}t(p0,"trapezoidalPentagon");var Yy=10,Uy=10;async function g0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-n)/2,e.width<Uy)e.width=Uy;if(e.height=e?.height??0,e.height<Yy)e.height=Yy}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=ft(l().flowchart?.htmlLabels),f=(e?.width?e?.width:h.width)+n,B=e?.height?e?.height:f+h.height,v=B,q=[{x:0,y:0},{x:v,y:0},{x:v/2,y:-B}],{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=Oe(q),X=H.path(j,Y),Q=c.insert(()=>X,":first-child").attr("transform",`translate(${-B/2}, ${B/2})`).attr("class","outer-path");if(W&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return e.width=f,e.height=B,I(e,Q),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${B/2-(h.height+(e.padding??0)/(y?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(rt){return a.info("Triangle intersect",e,q,rt),w.polygon(e,q,rt)},c}t(g0,"triangle");async function m0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=!0;if(e.width||e.height){if(h=!1,e.width=(e?.width??0)-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,te(e)),B=(e?.width?e?.width:y.width)+(n??0)*2,v=(e?.height?e?.height:y.height)+(c??0)*2,q=e.look==="neo"?v/4:v/8,W=v+(h?q:-q),{cssStyles:H}=e,j=14-B,X=j>0?j/2:0,Q=m.svg(g),rt=Gt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let it=[{x:-B/2-X,y:W/2},...Ko(-B/2-X,W/2,B/2+X,W/2,q,0.8),{x:B/2+X,y:-W/2},{x:-B/2-X,y:-W/2}],ct=Oe(it),lt=Q.path(ct,rt),pt=g.insert(()=>lt,":first-child");if(pt.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")pt.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")pt.selectAll("path").attr("style",s);return pt.attr("transform",`translate(0,${-q/2})`),f.attr("transform",`translate(${-B/2+(e.padding??0)-(y.x-(y.left??0))},${-v/2+(e.padding??0)-q-(y.y-(y.top??0))})`),I(e,pt),e.intersect=function(bt){return w.polygon(e,it,bt)},g}t(m0,"waveEdgedRectangle");async function y0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=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 rt=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-rt*2.2222222222222223),e.width=e.width-n*2}let{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=(e?.width?e?.width:g.width)+n*2,f=(e?.height?e?.height:g.height)+c,B=f/8,v=f+B*2,{cssStyles:q}=e,W=m.svg(h),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-y/2,y:v/2},...Ko(-y/2,v/2,y/2,v/2,B,1),{x:y/2,y:-v/2},...Ko(y/2,-v/2,-y/2,-v/2,B,-1)],j=Oe(Y),X=W.path(j,H),Q=h.insert(()=>X,":first-child");if(Q.attr("class","basic label-container"),q&&e.look!=="handDrawn")Q.selectAll("path").attr("style",q);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return I(e,Q),e.intersect=function(rt){return w.polygon(e,Y,rt)},h}t(y0,"waveRectangle");var rr=10;async function x0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-rr,10),e.height=Math.max((e?.height??0)-n*2-rr,10);let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=(e?.width?e?.width:h.width)+o*2+rr,f=(e?.height?e?.height:h.height)+n*2+rr,B=y-rr,v=f-rr,q=-B/2,W=-v/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{}),X=[{x:q-rr,y:W-rr},{x:q-rr,y:W+v},{x:q+B,y:W+v},{x:q+B,y:W-rr}],Q=`M${q-rr},${W-rr} L${q+B},${W-rr} L${q+B},${W+v} L${q-rr},${W+v} L${q-rr},${W-rr}
240
+ M${q-rr},${W} L${q+B},${W}
241
+ M${q},${W-rr} L${q},${W+v}`;if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let rt=Y.path(Q,j),it=c.insert(()=>rt,":first-child");if(it.attr("transform",`translate(${rr/2}, ${rr/2})`),it.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")it.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")it.selectAll("path").attr("style",s);return g.attr("transform",`translate(${-(h.width/2)+rr/2-(h.x-(h.left??0))}, ${-(h.height/2)+rr/2-(h.y-(h.top??0))})`),I(e,it),e.intersect=function(ct){return w.polygon(e,X,ct)},c}t(x0,"windowPane");var jy=new Set(["redux-color","redux-dark-color"]),_S=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function sd(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=x(),{rowEven:n,rowOdd:c,nodeBorder:h,borderColorArray:g}=o;if(e.look==="handDrawn"){let{themeVariables:Wt}=x(),{background:re}=Wt,ce={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${re}`]};await sd(r,ce)}let y=x();e.useHtmlLabels=y.htmlLabels;let f=y.er?.diagramPadding??10,B=y.er?.entityPadding??6,{cssStyles:v}=e,{labelStyles:q,nodeStyles:W}=k(e);if(i.attributes.length===0&&e.label){let Wt={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5,classes:""};if(He(e.label,y)+Wt.labelPaddingX*2<y.er.minEntityWidth)e.width=y.er.minEntityWidth;let re=await Ns(r,e,Wt);if(s!=null&&jy.has(s)){let ce=i.colorIndex??0;re.attr("data-color-id",`color-${ce%g.length}`)}if(!ft(y.htmlLabels)){let ce=re.select("text"),ue=ce.node()?.getBBox();ce.attr("transform",`translate(${-ue.width/2}, 0)`)}return re}if(!y.htmlLabels)f*=1.25,B*=1.25;let H=te(e);if(!H)H="node default";let Y=r.insert("g").attr("class",H).attr("id",e.domId||e.id),j=await Rs(Y,e.label??"",y,0,0,["name"],q);j.height+=B;let X=0,Q=[],rt=[],it=0,ct=0,lt=0,pt=0,bt=!0,vt=!0;for(let Wt of i.attributes){let re=await Rs(Y,Wt.type,y,0,X,["attribute-type"],q);it=Math.max(it,re.width+f);let ce=await Rs(Y,Wt.name,y,0,X,["attribute-name"],q);ct=Math.max(ct,ce.width+f);let ue=await Rs(Y,Wt.keys.join(),y,0,X,["attribute-keys"],q);lt=Math.max(lt,ue.width+f);let Ke=await Rs(Y,Wt.comment,y,0,X,["attribute-comment"],q);pt=Math.max(pt,Ke.width+f);let Xe=Math.max(re.height,ce.height,ue.height,Ke.height)+B;rt.push({yOffset:X,rowHeight:Xe}),X+=Xe}let wt=4;if(lt<=f)bt=!1,lt=0,wt--;if(pt<=f)vt=!1,pt=0,wt--;let kt=Y.node().getBBox();if(j.width+f*2-(it+ct+lt+pt)>0){let Wt=j.width+f*2-(it+ct+lt+pt);if(it+=Wt/wt,ct+=Wt/wt,lt>0)lt+=Wt/wt;if(pt>0)pt+=Wt/wt}let st=it+ct+lt+pt,at=m.svg(Y),xt=Gt(e,{});if(e.look!=="handDrawn")xt.roughness=0,xt.fillStyle="solid";let ot=0;if(rt.length>0)ot=rt.reduce((Wt,re)=>Wt+(re?.rowHeight??0),0);let St=Math.max(kt.width+f*2,e?.width||0,st),Lt=Math.max((ot??0)+j.height,e?.height||0),Yt=-St/2,Ht=-Lt/2;if(Y.selectAll("g:not(:first-child)").each((Wt,re,ce)=>{let ue=p(ce[re]),Ke=ue.attr("transform"),Xe=0,xi=0;if(Ke){let di=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ke);if(di){if(Xe=parseFloat(di[1]),xi=parseFloat(di[2]),ue.attr("class").includes("attribute-name"))Xe+=it;else if(ue.attr("class").includes("attribute-keys"))Xe+=it+ct;else if(ue.attr("class").includes("attribute-comment"))Xe+=it+ct+lt}}ue.attr("transform",`translate(${Yt+f/2+Xe}, ${xi+Ht+j.height+B/2})`)}),Y.select(".name").attr("transform","translate("+-j.width/2+", "+(Ht+B/2)+")"),s!=null&&jy.has(s)){let Wt=i.colorIndex??0;Y.attr("data-color-id",`color-${Wt%g.length}`)}let he=at.rectangle(Yt,Ht,St,Lt,xt),ne=Y.insert(()=>he,":first-child").attr("class","outer-path").attr("style",v.join(""));Q.push(0);for(let[Wt,re]of rt.entries()){let ue=(Wt+1)%2===0&&re.yOffset!==0,Ke=at.rectangle(Yt,j.height+Ht+re?.yOffset,St,re?.rowHeight,{...xt,fill:ue?n:c,stroke:h});Y.insert(()=>Ke,"g.label").attr("style",v.join("")).attr("class",`row-rect-${ue?"even":"odd"}`)}let _e=0.0001,Ae=qs(Yt,j.height+Ht,St+Yt,j.height+Ht,_e),xe=at.polygon(Ae.map((Wt)=>[Wt.x,Wt.y]),xt);if(Y.insert(()=>xe).attr("class","divider"),Ae=qs(it+Yt,j.height+Ht,it+Yt,Lt+Ht,_e),xe=at.polygon(Ae.map((Wt)=>[Wt.x,Wt.y]),xt),Y.insert(()=>xe).attr("class","divider"),bt){let Wt=it+ct+Yt;Ae=qs(Wt,j.height+Ht,Wt,Lt+Ht,_e),xe=at.polygon(Ae.map((re)=>[re.x,re.y]),xt),Y.insert(()=>xe).attr("class","divider")}if(vt){let Wt=it+ct+lt+Yt;Ae=qs(Wt,j.height+Ht,Wt,Lt+Ht,_e),xe=at.polygon(Ae.map((re)=>[re.x,re.y]),xt),Y.insert(()=>xe).attr("class","divider")}for(let Wt of Q){let re=j.height+Ht+Wt;Ae=qs(Yt,re,St+Yt,re,_e),xe=at.polygon(Ae.map((ce)=>[ce.x,ce.y]),xt),Y.insert(()=>xe).attr("class","divider")}if(I(e,ne),W&&e.look!=="handDrawn")if(s!=null&&_S.has(s))Y.selectAll("path").attr("style",W);else{let re=W.split(";")?.filter((ce)=>ce.includes("stroke"))?.map((ce)=>`${ce}`).join("; ");Y.selectAll("path").attr("style",re??""),Y.selectAll(".row-rect-even path").attr("style",W)}return e.intersect=function(Wt){return w.rect(e,Wt)},Y}t(sd,"erBox");async function Rs(r,e,i,s=0,o=0,n=[],c=""){let h=r.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==Jt(e))e=Jt(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let g=h.node().appendChild(await Le(h,e,{width:He(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let f=g.children[0];f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(f.childNodes[0])f=f.childNodes[0],f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let y=g.getBBox();if(ft(i.htmlLabels)){let f=g.children[0];f.style.textAlign="start";let B=p(g);y=f.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}return y}t(Rs,"addText");function qs(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(qs,"lineToPolygon");async function C0(r,e,i,s,o=i.class.padding??12){let n=!s?3:0,c=r.insert("g").attr("class",te(e)).attr("id",e.domId||e.id),h=null,g=null,y=null,f=null,B=0,v=0,q=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let X=e.annotations[0];await pn(h,{text:`«${X}»`},0),B=h.node().getBBox().height}g=c.insert("g").attr("class","label-group text"),await pn(g,e,0,["font-weight: bolder"]);let W=g.node().getBBox();v=W.height,y=c.insert("g").attr("class","members-group text");let H=0;for(let X of e.members){let Q=await pn(y,X,H,[X.parseClassifier()]);H+=Q+n}if(q=y.node().getBBox().height,q<=0)q=o/2;f=c.insert("g").attr("class","methods-group text");let Y=0;for(let X of e.methods){let Q=await pn(f,X,Y,[X.parseClassifier()]);Y+=Q+n}let j=c.node().getBBox();if(h!==null){let X=h.node().getBBox();h.attr("transform",`translate(${-X.width/2})`)}return g.attr("transform",`translate(${-W.width/2}, ${B})`),j=c.node().getBBox(),y.attr("transform",`translate(0, ${B+v+o*2})`),j=c.node().getBBox(),f.attr("transform",`translate(0, ${B+v+(q?q+o*4:o*2)})`),j=c.node().getBBox(),{shapeSvg:c,bbox:j}}t(C0,"textHelper");async function pn(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),n=x(),c="useHtmlLabels"in e?e.useHtmlLabels:ft(n.htmlLabels)??!0,h="";if("text"in e)h=e.text;else h=e.label;if(!c&&h.startsWith("\\"))h=h.substring(1);if(fe(h))c=!0;let g=await Le(o,sl(jt(h)),{width:He(h,n)+50,classes:"markdown-node-label",useHtmlLabels:c},n),y,f=1;if(!c){if(s.includes("font-weight: bolder"))p(g).selectAll("tspan").attr("font-weight","");f=g.children.length;let B=g.children[0];if(g.textContent===""||g.textContent.includes("&gt")){if(B.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" ")B.textContent=B.textContent[0]+" "+B.textContent.substring(1)}if(B.textContent==="undefined")B.textContent="";y=g.getBBox()}else{let B=g.children[0],v=p(g);if(f=B.innerHTML.split("<br>").length,B.innerHTML.includes("</math>"))f+=B.innerHTML.split("<mrow>").length-1;await td(B),y=B.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}return o.attr("transform","translate(0,"+(-y.height/(2*f)+i)+")"),y.height}t(pn,"addText");async function b0(r,e){let i=l(),{theme:s,themeVariables:o}=i,{useGradient:n,borderColorArray:c}=o,h=i.class.padding??12,g=h,y=e.useHtmlLabels??ft(i.htmlLabels)??!0,f=e;f.annotations=f.annotations??[],f.members=f.members??[],f.methods=f.methods??[];let{shapeSvg:B,bbox:v}=await C0(r,e,i,y,g);Ze(B,e.colorIndex,s,c);let{labelStyles:q,nodeStyles:W}=k(e);e.labelStyle=q,e.cssStyles=f.styles||"";let H=f.styles?.join(";")||W||"";if(!e.cssStyles)e.cssStyles=H.replaceAll("!important","").split(";");let Y=f.members.length===0&&f.methods.length===0&&!i.class?.hideEmptyMembersBox,j=m.svg(B),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=Math.max(e.width??0,v.width),rt=Math.max(e.height??0,v.height),it=(e.height??0)>v.height;if(f.members.length===0&&f.methods.length===0)rt+=g;else if(f.members.length>0&&f.methods.length===0)rt+=g*2;let ct=-Q/2,lt=-rt/2,pt=Y?h*2:f.members.length===0&&f.methods.length===0?-h:0;if(it)pt=h*2;let bt=j.rectangle(ct-h,lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0),Q+2*h,rt+2*h+pt,X),vt=B.insert(()=>bt,":first-child");vt.attr("class","basic label-container outer-path");let wt=vt.node().getBBox(),kt=B.select(".annotation-group").node().getBBox().height-(Y?h/2:0)||0,st=B.select(".label-group").node().getBBox().height-(Y?h/2:0)||0,at=B.select(".members-group").node().getBBox().height-(Y?h/2:0)||0,xt=(kt+st+lt+h-(lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0)))/2;if(B.selectAll(".text").each((ot,St,Lt)=>{let Yt=p(Lt[St]),Ht=Yt.attr("transform"),he=0;if(Ht){let xe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ht);if(xe)he=parseFloat(xe[2])}let ne=he+lt+h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0);if(Yt.attr("class").includes("methods-group")){let Ae=Math.max(at,g/2);if(it)ne=Math.max(xt,kt+st+Ae+lt+g*2+h)+g*2;else ne=kt+st+Ae+lt+g*4+h}if(f.members.length===0&&f.methods.length===0&&i.class?.hideEmptyMembersBox)if(f.annotations.length>0)ne=he-g;else ne=he;if(!y)ne-=4;let _e=ct;if(Yt.attr("class").includes("label-group")||Yt.attr("class").includes("annotation-group"))_e=-Yt.node()?.getBBox().width/2||0,B.selectAll("text").each(function(Ae,xe,Wt){if(window.getComputedStyle(Wt[xe]).textAnchor==="middle")_e=0});Yt.attr("transform",`translate(${_e}, ${ne})`)}),f.members.length>0||f.methods.length>0||Y){let ot=kt+st+lt+h,St=j.line(wt.x,ot,wt.x+wt.width,ot+0.001,X);B.insert(()=>St).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(Y||f.members.length>0||f.methods.length>0){let ot=kt+st+at+lt+g*2+h,St=j.line(wt.x,it?Math.max(xt,ot):ot,wt.x+wt.width,(it?Math.max(xt,ot):ot)+0.001,X);B.insert(()=>St).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(f.look!=="handDrawn")B.selectAll("path").attr("style",H);if(vt.select(":nth-child(2)").attr("style",H),B.selectAll(".divider").select("path").attr("style",H),e.labelStyle)B.selectAll("span").attr("style",e.labelStyle);else B.selectAll("span").attr("style",H);if(!y){let ot=RegExp(/color\s*:\s*([^;]*)/),St=ot.exec(H);if(St){let Lt=St[0].replace("color","fill");B.selectAll("tspan").attr("style",Lt)}else if(q){let Lt=ot.exec(q);if(Lt){let Yt=Lt[0].replace("color","fill");B.selectAll("tspan").attr("style",Yt)}}}return I(e,vt),e.intersect=function(ot){return w.rect(e,ot)},B}t(b0,"classBox");async function k0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e,n=e,c=20,h=20,g="verifyMethod"in e,y=te(e),f=l(),{themeVariables:B}=f,{borderColorArray:v,requirementEdgeLabelBackground:q}=B,W=f.layout==="elk"?"start":"center",H=r.insert("g").attr("class",y).attr("id",e.domId??e.id),Y;if(g)Y=await Ri(H,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else Y=await Ri(H,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let j=Y,X=await Ri(H,o.name,j,e.labelStyle+"; font-weight: bold;");if(j+=X+h,g){let wt=await Ri(H,`${o.requirementId?`ID: ${o.requirementId}`:""}`,j,e.labelStyle,W);j+=wt;let kt=await Ri(H,`${o.text?`Text: ${o.text}`:""}`,j,e.labelStyle,W);j+=kt;let st=await Ri(H,`${o.risk?`Risk: ${o.risk}`:""}`,j,e.labelStyle,W);j+=st,await Ri(H,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,j,e.labelStyle,W)}else{let wt=await Ri(H,`${n.type?`Type: ${n.type}`:""}`,j,e.labelStyle,W);j+=wt,await Ri(H,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,j,e.labelStyle,W)}let Q=(H.node()?.getBBox().width??200)+c,rt=(H.node()?.getBBox().height??200)+c,it=-Q/2,ct=-rt/2,lt=m.svg(H),pt=Gt(e,{});if(e.look!=="handDrawn")pt.roughness=0,pt.fillStyle="solid";let bt=lt.rectangle(it,ct,Q,rt,pt),vt=H.insert(()=>bt,":first-child");if(vt.attr("class","basic label-container outer-path").attr("style",s),v?.length){let wt=e.colorIndex??0;H.attr("data-color-id",`color-${wt%v.length}`)}if(H.selectAll(".label").each((wt,kt,st)=>{let at=p(st[kt]),xt=at.attr("transform"),ot=0,St=0;if(xt){let he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(xt);if(he)ot=parseFloat(he[1]),St=parseFloat(he[2])}let Lt=St-rt/2,Yt=it+c/2;if(kt===0||kt===1)Yt=ot;at.attr("transform",`translate(${Yt}, ${Lt+c})`)}),j>Y+X+h){let wt=ct+Y+X+h,kt;if(e.look==="neo"){let xt=[[it,wt],[it+Q,wt],[it+Q,wt+0.001],[it,wt+0.001]];kt=lt.polygon(xt,pt)}else kt=lt.line(it,wt,it+Q,wt,pt);H.insert(()=>kt).attr("class","divider")}if(I(e,vt),e.intersect=function(wt){return w.rect(e,wt)},s&&e.look!=="handDrawn"&&(q||v?.length))H.selectAll("path").attr("style",s);return H}t(k0,"requirementBox");async function Ri(r,e,i,s="",o="center"){if(e==="")return 0;let n=r.insert("g").attr("class","label").attr("style",s),c=l(),h=c.htmlLabels??!0,g=await Le(n,sl(jt(e)),{width:He(e,c)+50,classes:"markdown-node-label",useHtmlLabels:h,style:s},c),y;if(!h){let f=g.children[0];for(let B of f.children)if(s)B.setAttribute("style",s);if(o==="start"){f.setAttribute("text-anchor","start");for(let B of f.children)B.setAttribute("text-anchor","start")}y=g.getBBox(),y.height+=6}else{let f=g.children[0],B=p(g);if(o==="start")p(f).style("text-align","left");y=f.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}return n.attr("transform",`translate(${-y.width/2},${-y.height/2+i})`),y.height}t(Ri,"addText");var BS=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 w0(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s||"";let n=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=e.padding||10,B="",v;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)B=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),v=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",B).attr("target","_blank");let q={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},W,H;if(v)({label:W,bbox:H}=await ls(v,"ticket"in e&&e.ticket||"",q));else({label:W,bbox:H}=await ls(h,"ticket"in e&&e.ticket||"",q));let{label:Y,bbox:j}=await ls(h,"assigned"in e&&e.assigned||"",q);e.width=c;let X=10,Q=e?.width||0,rt=Math.max(H.height,j.height)/2,it=Math.max(g.height+X*2,e?.height||0)+rt,ct=-Q/2,lt=-it/2;y.attr("transform","translate("+(f-Q/2)+", "+(-rt-g.height/2)+")"),W.attr("transform","translate("+(f-Q/2)+", "+(-rt+g.height/2)+")"),Y.attr("transform","translate("+(f+Q/2-j.width-2*n)+", "+(-rt+g.height/2)+")");let pt,{rx:bt,ry:vt}=e,{cssStyles:wt}=e;if(e.look==="handDrawn"){let kt=m.svg(h),st=Gt(e,{}),at=bt||vt?kt.path(jr(ct,lt,Q,it,bt||0),st):kt.rectangle(ct,lt,Q,it,st);pt=h.insert(()=>at,":first-child"),pt.attr("class","basic label-container").attr("style",wt?wt:null)}else{pt=h.insert("rect",":first-child"),pt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",bt??5).attr("ry",vt??5).attr("x",ct).attr("y",lt).attr("width",Q).attr("height",it);let kt="priority"in e&&e.priority;if(kt){let st=h.append("line"),at=ct+2,xt=lt+Math.floor((bt??0)/2),ot=lt+it-Math.floor((bt??0)/2);st.attr("x1",at).attr("y1",xt).attr("x2",at).attr("y2",ot).attr("stroke-width","4").attr("stroke",BS(kt))}}return I(e,pt),e.height=it,e.intersect=function(kt){return w.rect(e,kt)},h}t(w0,"kanbanItem");async function S0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,te(e)),g=n.width+10*c,y=n.height+8*c,f=0.15*g,{cssStyles:B}=e,v=n.width+20,q=n.height+20,W=Math.max(g,v),H=Math.max(y,q);h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let Y,j=`M0 0
242
242
  a${f},${f} 1 0,0 ${W*0.25},${-1*H*0.1}
243
243
  a${f},${f} 1 0,0 ${W*0.25},0
244
244
  a${f},${f} 1 0,0 ${W*0.25},0
@@ -256,21 +256,21 @@ ${o.join(`
256
256
  a${f},${f} 1 0,0 ${-1*W*0.1},${-1*H*0.33}
257
257
  a${f*0.8},${f*0.8} 1 0,0 0,${-1*H*0.34}
258
258
  a${f},${f} 1 0,0 ${W*0.1},${-1*H*0.33}
259
- H0 V0 Z`;if(e.look==="handDrawn"){let K=m.svg(o),Q=Gt(e,{}),rt=K.path(j,Q);Y=o.insert(()=>rt,":first-child"),Y.attr("class","basic label-container").attr("style",Je(b))}else Y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",j);return Y.attr("transform",`translate(${-W/2}, ${-H/2})`),I(e,Y),e.calcIntersect=function(K,Q){return w.rect(K,Q)},e.intersect=function(K){return a.info("Bang intersect",e,K),w.rect(e,K)},o}t(S0,"bang");async function T0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,Zt(e)),g=n.width+2*c,y=n.height+2*c,f=0.15*g,b=0.25*g,F=0.35*g,N=0.2*g,{cssStyles:W}=e,H,Y=`M0 0
259
+ H0 V0 Z`;if(e.look==="handDrawn"){let X=m.svg(o),Q=Gt(e,{}),rt=X.path(j,Q);Y=o.insert(()=>rt,":first-child"),Y.attr("class","basic label-container").attr("style",tr(B))}else Y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",j);return Y.attr("transform",`translate(${-W/2}, ${-H/2})`),I(e,Y),e.calcIntersect=function(X,Q){return w.rect(X,Q)},e.intersect=function(X){return a.info("Bang intersect",e,X),w.rect(e,X)},o}t(S0,"bang");async function T0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,te(e)),g=n.width+2*c,y=n.height+2*c,f=0.15*g,B=0.25*g,v=0.35*g,q=0.2*g,{cssStyles:W}=e,H,Y=`M0 0
260
260
  a${f},${f} 0 0,1 ${g*0.25},${-1*g*0.1}
261
- a${F},${F} 1 0,1 ${g*0.4},${-1*g*0.1}
262
- a${b},${b} 1 0,1 ${g*0.35},${g*0.2}
261
+ a${v},${v} 1 0,1 ${g*0.4},${-1*g*0.1}
262
+ a${B},${B} 1 0,1 ${g*0.35},${g*0.2}
263
263
 
264
264
  a${f},${f} 1 0,1 ${g*0.15},${y*0.35}
265
- a${N},${N} 1 0,1 ${-1*g*0.15},${y*0.65}
265
+ a${q},${q} 1 0,1 ${-1*g*0.15},${y*0.65}
266
266
 
267
- a${b},${f} 1 0,1 ${-1*g*0.25},${g*0.15}
268
- a${F},${F} 1 0,1 ${-1*g*0.5},0
267
+ a${B},${f} 1 0,1 ${-1*g*0.25},${g*0.15}
268
+ a${v},${v} 1 0,1 ${-1*g*0.5},0
269
269
  a${f},${f} 1 0,1 ${-1*g*0.25},${-1*g*0.15}
270
270
 
271
271
  a${f},${f} 1 0,1 ${-1*g*0.1},${-1*y*0.35}
272
- a${N},${N} 1 0,1 ${g*0.1},${-1*y*0.65}
273
- H0 V0 Z`;if(e.look==="handDrawn"){let j=m.svg(o),K=Gt(e,{}),Q=j.path(Y,K);H=o.insert(()=>Q,":first-child"),H.attr("class","basic label-container").attr("style",Je(W))}else H=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",Y);return h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),H.attr("transform",`translate(${-g/2}, ${-y/2})`),I(e,H),e.calcIntersect=function(j,K){return w.rect(j,K)},e.intersect=function(j){return a.info("Cloud intersect",e,j),w.rect(e,j)},o}t(T0,"cloud");async function _0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,Zt(e)),g=n.width+8*c,y=n.height+2*c,f=5,b=e.look==="neo"?`
272
+ a${q},${q} 1 0,1 ${g*0.1},${-1*y*0.65}
273
+ H0 V0 Z`;if(e.look==="handDrawn"){let j=m.svg(o),X=Gt(e,{}),Q=j.path(Y,X);H=o.insert(()=>Q,":first-child"),H.attr("class","basic label-container").attr("style",tr(W))}else H=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",Y);return h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),H.attr("transform",`translate(${-g/2}, ${-y/2})`),I(e,H),e.calcIntersect=function(j,X){return w.rect(j,X)},e.intersect=function(j){return a.info("Cloud intersect",e,j),w.rect(e,j)},o}t(T0,"cloud");async function _0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,te(e)),g=n.width+8*c,y=n.height+2*c,f=5,B=e.look==="neo"?`
274
274
  M${-g/2} ${y/2-f}
275
275
  v${-y+2*f}
276
276
  q0,-${f} ${f},-${f}
@@ -290,14 +290,14 @@ ${o.join(`
290
290
  h${-(g-2*f)}
291
291
  q${-f},0 ${-f},${-f}
292
292
  Z
293
- `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let F=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",b);return o.append("line").attr("class","node-line-").attr("x1",-g/2).attr("y1",y/2).attr("x2",g/2).attr("y2",y/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),o.append(()=>h.node()),I(e,F),e.calcIntersect=function(N,W){return w.rect(N,W)},e.intersect=function(N){return w.rect(e,N)},o}t(_0,"defaultMindmapNode");async function B0(r,e){let i={padding:e.padding??0};return id(r,e,i)}t(B0,"mindmapCircle");var vS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:i0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:t0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:o0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:l0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:xx},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Cx},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:_x},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:rx},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:cx},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ax},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:yx},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:id},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:S0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:T0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Zx},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Lx},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Rx},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Px},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:d0},{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:$x},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kx},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:u0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:nx},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:e0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:n0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:a0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Bx},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Fx},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:dx},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:px},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:gx},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:qx},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:m0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vx},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:f0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Nx},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:mx},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:bx},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:g0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:x0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Sx},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:p0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Tx},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:r0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Vx},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Xx},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ex},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:fx},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:c0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:h0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:y0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Qx},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Wx}],LS=t(()=>{let e=[...Object.entries({state:s0,choice:lx,note:Kx,composite:hx,rectWithTitle:Jx,labelRect:Dx,block_arrow:sx,collapsedGroup:ox,iconSquare:Ox,iconCircle:Mx,icon:Ax,iconRounded:Ex,imageSquare:Ix,anchor:Jy,kanbanItem:w0,mindmapCircle:B0,defaultMindmapNode:_0,classBox:b0,erBox:sd,requirementBox:k0,usecaseActor:zx,usecaseActorHollow:Yx,usecaseActorAwesome:Hx,usecaseActorIcon:Ux,usecaseBusiness:jx,usecaseEllipse:wx,usecaseJsonTable:Gx}),...vS.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Kr=LS();function Nr(r){return r in Kr}t(Nr,"isValidShape");var Tt=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"),lh=new Map;async function Et(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let n=e.shape?Kr[e.shape]:void 0;if(!n)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await n(s,e,i)}else o=await n(r,e,i),s=o;if(s.attr("data-look",Je(e.look)),e.tooltip)o.attr("title",e.tooltip);if(lh.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(Et,"insertNode");var go=t((r,e)=>{lh.set(e.id,r)},"setNodeElem"),yo=t(()=>{lh.clear()},"clear"),yt=t((r)=>{let e=lh.get(r.id);a.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 FS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,y=h,{labelStyles:f,nodeStyles:b,borderStyles:F,backgroundStyles:N}=k(e),W=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.domId??e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Ze(W,e.colorIndex,s,g);let H=ft(i.flowchart.htmlLabels),Y=e.direction==="LR",j=W.insert("g").attr("class","cluster-label swimlane-label"),K=await Le(j,e.label,{style:e.labelStyle,useHtmlLabels:H,isNode:!0,width:e.width}),Q=K.getBBox();if(H){let xt=K.children[0],ot=p(K);Q=xt.getBoundingClientRect(),ot.attr("width",Q.width),ot.attr("height",Q.height)}let rt=e.padding??0,it=e.width<=Q.width+rt?Q.width+rt:e.width;if(e.width<=Q.width+rt)e.diff=(it-e.width)/2-rt;else e.diff=-rt;let ct=e.height,lt=e.y-ct/2,pt=e.y+ct/2,bt=e.x-it/2,vt=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:lt+ct/3,wt=Y?4:0,kt=Q.height+2*wt,st,at;if(Y){let xt=Math.max(kt,Q.height+2*wt),ot=bt+xt,St=Math.max(0,it-xt);if(e.look==="handDrawn"){let Ht=m.svg(W),ne=Gt(e,{roughness:0.7,fill:c,stroke:y,seed:n}),ie=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),be=Ht.rectangle(bt,lt,xt,ct,ne);st=W.insert(()=>be,":first-child").attr("class","swimlane-title");let _e=Ht.rectangle(ot,lt,St,ct,ie);at=W.insert(()=>_e,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",F.join(";")),st.select("path").attr("style",N.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",b).attr("x",bt).attr("y",lt).attr("width",xt).attr("height",ct).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",b).attr("x",ot).attr("y",lt).attr("width",St).attr("height",ct).attr("fill","none").attr("stroke",y);let Lt=bt+xt/2,Yt=e.y;j.attr("transform",`translate(${Lt}, ${Yt}) rotate(-90) translate(${-Q.width/2}, ${-Q.height/2})`)}else{let xt=Math.max(0,vt-lt),ot=Math.min(kt,xt),St=lt+ot,Lt=Math.max(0,pt-St),Yt=e.x-it/2;if(e.look==="handDrawn"){let ie=m.svg(W),be=Gt(e,{roughness:0.7,fill:c,stroke:y,fillWeight:3,seed:n}),_e=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),ge=ie.rectangle(Yt,lt,it,ot,be);st=W.insert(()=>ge,":first-child").attr("class","swimlane-title");let Wt=ie.rectangle(Yt,St,it,Lt,_e);at=W.insert(()=>Wt,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",F.join(";")),st.select("path").attr("style",N.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",b).attr("x",Yt).attr("y",lt).attr("width",it).attr("height",ot).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",b).attr("x",Yt).attr("y",St).attr("width",it).attr("height",Lt).attr("fill","none").attr("stroke",y);let Ht=e.x-Q.width/2,ne=lt+(ot-Q.height)/2;j.attr("transform",`translate(${Ht}, ${ne})`)}if(a.trace("Swimlane data ",e,JSON.stringify(e)),f){let xt=j.select("span");if(xt)xt.attr("style",f)}return e.offsetX=0,e.width=it,e.height=ct,e.offsetY=Q.height-rt/2,e.intersect=function(xt){return Yi(e,xt)},{cluster:W,labelBBox:Q}},"swimlane"),v0=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f,borderStyles:b,backgroundStyles:F}=k(e),N=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Ze(N,e.colorIndex,s,g);let W=Ce(i),H=N.insert("g").attr("class","cluster-label "),Y;if(e.labelType==="markdown")Y=await Le(H,e.label,{style:e.labelStyle,useHtmlLabels:W,isNode:!0,width:e.width});else Y=await yi(H,e.label,e.labelStyle||"",!1,!0);let j=Y.getBBox();if(Ce(i)){let bt=Y.children[0],vt=p(Y);j=bt.getBoundingClientRect(),vt.attr("width",j.width),vt.attr("height",j.height)}let K=e.width<=j.width+e.padding?j.width+e.padding:e.width;if(e.width<=j.width+e.padding)e.diff=(K-e.width)/2-e.padding;else e.diff=-e.padding;let Q=e.height,rt=e.x-K/2,it=e.y-Q/2;a.trace("Data ",e,JSON.stringify(e));let ct;if(e.look==="handDrawn"){let bt=m.svg(N),vt=Gt(e,{roughness:0.7,fill:c,stroke:h,fillWeight:3,seed:n}),wt=bt.path(Jr(rt,it,K,Q,0),vt);ct=N.insert(()=>(a.debug("Rough node insert CXC",wt),wt),":first-child"),ct.select("path:nth-child(2)").attr("style",b.join(";")),ct.select("path").attr("style",F.join(";").replace("fill","stroke"))}else ct=N.insert("rect",":first-child"),ct.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",rt).attr("y",it).attr("width",K).attr("height",Q);let{subGraphTitleTopMargin:lt}=Tt(i);if(H.attr("transform",`translate(${e.x-j.width/2}, ${e.y-e.height/2+lt})`),y){let bt=H.select("span");if(bt)bt.attr("style",y)}let pt=ct.node().getBBox();return e.offsetX=0,e.width=pt.width,e.height=pt.height,e.offsetY=j.height-e.padding/2,e.intersect=function(bt){return Yi(e,bt)},{cluster:N,labelBBox:j}},"rect"),AS=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,n=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return Yi(e,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),MS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,borderColorArray:h,compositeBackground:g,compositeTitleBackground:y,nodeBorder:f}=o,b=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Ze(b,e.colorIndex,s,h);let F=b.insert("g",":first-child"),N=b.insert("g").attr("class","cluster-label"),W=b.append("rect"),H=await yi(N,e.label,e.labelStyle,void 0,!0),Y=H.getBBox();if(Ce(i)){let wt=H.children[0],kt=p(H);Y=wt.getBoundingClientRect(),kt.attr("width",Y.width),kt.attr("height",Y.height)}let j=0*e.padding,K=j/2,Q=(e.width<=Y.width+e.padding?Y.width+e.padding:e.width)+j;if(e.width<=Y.width+e.padding)e.diff=(Q-e.width)/2-e.padding;else e.diff=-e.padding;let rt=e.height+j,it=e.height+j-Y.height-6,ct=e.x-Q/2,lt=e.y-rt/2;e.width=Q;let pt=e.y-e.height/2-K+Y.height+2,bt;if(e.look==="handDrawn"){let wt=e.cssClasses.includes("statediagram-cluster-alt"),kt=m.svg(b),st=e.rx||e.ry?kt.path(Jr(ct,lt,Q,rt,10),{roughness:0.7,fill:y,fillStyle:"solid",stroke:f,seed:n}):kt.rectangle(ct,lt,Q,rt,{seed:n});bt=b.insert(()=>st,":first-child");let at=kt.rectangle(ct,pt,Q,it,{fill:wt?c:g,fillStyle:wt?"hachure":"solid",stroke:f,seed:n});bt=b.insert(()=>st,":first-child"),W=b.insert(()=>at),bt.attr("class","outer"),W.attr("class","inner")}else{bt=F.insert("rect",":first-child");let wt="outer";bt.attr("class",wt).attr("x",ct).attr("y",lt).attr("width",Q).attr("height",rt).attr("data-look",e.look),W.attr("class","inner").attr("x",ct).attr("y",pt).attr("width",Q).attr("height",it)}N.attr("transform",`translate(${e.x-Y.width/2}, ${lt+1-(Ce(i)?0:3)})`);let vt=bt.node().getBBox();return e.height=vt.height,e.offsetX=0,e.offsetY=Y.height-e.padding/2,e.labelBBox=Y,e.intersect=function(wt){return Yi(e,wt)},{cluster:b,labelBBox:Y}},"roundedWithTitle"),ES=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:n,clusterBorder:c}=s,{labelStyles:h,nodeStyles:g,borderStyles:y,backgroundStyles:f}=k(e),b=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),F=Ce(i),N=b.insert("g").attr("class","cluster-label "),W=await Le(N,e.label,{style:e.labelStyle,useHtmlLabels:F,isNode:!0,width:e.width}),H=W.getBBox();if(Ce(i)){let lt=W.children[0],pt=p(W);H=lt.getBoundingClientRect(),pt.attr("width",H.width),pt.attr("height",H.height)}let Y=e.width<=H.width+e.padding?H.width+e.padding:e.width;if(e.width<=H.width+e.padding)e.diff=(Y-e.width)/2-e.padding;else e.diff=-e.padding;let j=e.height,K=e.x-Y/2,Q=e.y-j/2;a.trace("Data ",e,JSON.stringify(e));let rt;if(e.look==="handDrawn"){let lt=m.svg(b),pt=Gt(e,{roughness:0.7,fill:n,stroke:c,fillWeight:4,seed:o}),bt=lt.path(Jr(K,Q,Y,j,e.rx),pt);rt=b.insert(()=>(a.debug("Rough node insert CXC",bt),bt),":first-child"),rt.select("path:nth-child(2)").attr("style",y.join(";")),rt.select("path").attr("style",f.join(";").replace("fill","stroke"))}else rt=b.insert("rect",":first-child"),rt.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",K).attr("y",Q).attr("width",Y).attr("height",j);let{subGraphTitleTopMargin:it}=Tt(i);if(N.attr("transform",`translate(${e.x-H.width/2}, ${e.y-e.height/2+it})`),h){let lt=N.select("span");if(lt)lt.attr("style",h)}let ct=rt.node().getBBox();return e.offsetX=0,e.width=ct.width,e.height=ct.height,e.offsetY=H.height-e.padding/2,e.intersect=function(lt){return Yi(e,lt)},{cluster:b,labelBBox:H}},"kanbanSection"),OS=t((r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,nodeBorder:h,borderColorArray:g}=o,y=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Ze(y,e.colorIndex,s,g);let f=y.insert("g",":first-child"),b=0*e.padding,F=e.width+b;e.diff=-e.padding;let N=e.height+b,W=e.x-F/2,H=e.y-N/2;e.width=F;let Y;if(e.look==="handDrawn"){let Q=m.svg(y).rectangle(W,H,F,N,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:h,seed:n});Y=y.insert(()=>Q,":first-child").attr("class","divider")}else{Y=f.insert("rect",":first-child");let K="outer";if(e.look==="neo")K="divider";else K="divider";Y.attr("class",K).attr("x",W).attr("y",H).attr("width",F).attr("height",N).attr("data-look",e.look)}let j=Y.node().getBBox();return e.height=j.height,e.offsetX=0,e.offsetY=0,e.intersect=function(K){return Yi(e,K)},{cluster:y,labelBBox:{}}},"divider"),IS=t(async(r,e,i)=>{a.info(`Creating ${i.cssClass} for `,e.id,e);let s=l(),{theme:o,themeVariables:n,handDrawnSeed:c}=s,{borderColorArray:h}=n,{labelStyles:g,borderStyles:y}=k(e),f=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Ze(f,e.colorIndex,o,h);let b=Ce(s),F=f.insert("g").attr("class","cluster-label"),N={width:0,height:0},W=e.label?.trim();if(W){let it;if(e.labelType==="markdown")it=await Le(F,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});else it=await yi(F,e.label,e.labelStyle||"",!1,!0);if(N=it.getBBox(),b){let ct=it.children[0],lt=p(it);N=ct.getBoundingClientRect(),lt.attr("width",N.width),lt.attr("height",N.height)}}let H=e.width<=N.width+e.padding?N.width+e.padding:e.width;if(e.width<=N.width+e.padding)e.diff=(H-e.width)/2-e.padding;else e.diff=-e.padding;let Y=e.height,j=e.x-H/2,K=e.y-Y/2,Q;if(e.look==="handDrawn"){let it=m.svg(f),ct=Gt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),lt=it.path(Jr(j,K,H,Y,i.rx),ct);Q=f.insert(()=>lt,":first-child"),Q.select("path:nth-child(2)").attr("style",y.join(";"))}else if(Q=f.insert("rect",":first-child"),Q.attr("rx",i.rx).attr("ry",i.rx).attr("x",j).attr("y",K).attr("width",H).attr("height",Y).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)Q.attr("stroke-dasharray",i.strokeDash.join(", "));if(W){let{subGraphTitleTopMargin:it}=Tt(s);if(F.attr("transform",`translate(${e.x-N.width/2}, ${e.y-e.height/2+it})`),g){let ct=F.select("span");if(ct)ct.attr("style",g)}}let rt=Q.node().getBBox();return e.offsetX=0,e.width=rt.width,e.height=rt.height,e.offsetY=N.height-e.padding/2,e.intersect=function(it){return Yi(e,it)},{cluster:f,labelBBox:N}},"createContainerGroup"),$S=t(async(r,e)=>{let{themeVariables:i}=l(),s=i.flowContainerStroke||i.secondaryBorderColor;return IS(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),DS=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,n=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,h=r.x-n/2,g=r.y-c/2;return{boundaryType:i,width:n,height:c,x:h,y:g,bodyY:g+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(n,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),PS=t(async(r,e)=>{a.info("Creating usecase system boundary for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f}=k(e),{stylesMap:b}=vi(e),F=e.boundaryType||"rect",N=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${F} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",F).attr("data-look",e.look);Ze(N,e.colorIndex,s,g);let W=Ce(i),H=N.insert("g").attr("class","cluster-label system-boundary-title"),Y=await Le(H,e.label,{style:y,useHtmlLabels:W,isNode:!0}),j=Y.getBBox();if(W){let st=Y.children[0],at=p(Y);j=st.getBoundingClientRect(),at.attr("width",j.width),at.attr("height",j.height)}let K=DS(e,j),{width:Q,height:rt,x:it,y:ct,bodyY:lt,bodyHeight:pt,tabHeight:bt,tabWidth:vt}=K;e.diff=e.width<=j.width+e.padding?(Q-e.width)/2-e.padding:-e.padding;let wt=Gt(e,{fill:b.get("fill")||c,stroke:b.get("stroke")||h,strokeWidth:b.get("stroke-width")?.replace("px","")||1,seed:n});if(e.look==="handDrawn"){let st=m.svg(N),at=st.rectangle(it,lt,Q,pt,wt);if(N.insert(()=>at,":first-child").attr("class","boundary-body label-container"),F==="package"){let xt=st.rectangle(it,ct,vt,bt,wt);N.insert(()=>xt,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(N.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",f).attr("x",it).attr("y",lt).attr("width",Q).attr("height",pt),F==="package")N.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",f).attr("x",it).attr("y",ct).attr("width",vt).attr("height",bt);let{subGraphTitleTopMargin:kt}=Tt(i);if(F==="package")H.attr("transform",`translate(${it+(vt-j.width)/2}, ${ct+(bt-j.height)/2})`);else H.attr("transform",`translate(${e.x-j.width/2}, ${ct+kt})`);if(y)H.attr("style",y),H.select("span").attr("style",y);return e.offsetX=0,e.width=Q,e.height=rt,e.offsetY=j.height-e.padding/2,e.labelBBox=j,e.intersect=function(st){return Yi(e,st)},{cluster:N,labelBBox:j}},"usecaseSystemBoundary"),RS=v0,qS={rect:v0,squareRect:RS,roundedWithTitle:MS,noteGroup:AS,divider:OS,kanbanSection:ES,flowGroup:$S,usecaseSystemBoundary:PS,swimlane:FS};var L0=new Map,tn=t(async(r,e)=>{let i=e.shape||"rect",s=await qS[i](r,e);return L0.set(e.id,s),s},"insertCluster"),vo=t(()=>{L0=new Map},"clear");var mn=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"),Ne={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},F0={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function xn(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=Qe(r),e=Qe(e);let[i,s]=[r.x,r.y],[o,n]=[e.x,e.y],c=o-i,h=n-s;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}t(xn,"calculateDeltaAndAngle");var Qe=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),NS=t((r)=>({x:t(function(e,i,s){let o=0,n=Qe(s[0]).x<Qe(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Ne,r.arrowTypeStart)){let{angle:N,deltaX:W}=xn(s[0],s[1]);o=Ne[r.arrowTypeStart]*Math.cos(N)*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ne,r.arrowTypeEnd)){let{angle:N,deltaX:W}=xn(s[s.length-1],s[s.length-2]);o=Ne[r.arrowTypeEnd]*Math.cos(N)*(W>=0?1:-1)}let c=Math.abs(Qe(e).x-Qe(s[s.length-1]).x),h=Math.abs(Qe(e).y-Qe(s[s.length-1]).y),g=Math.abs(Qe(e).x-Qe(s[0]).x),y=Math.abs(Qe(e).y-Qe(s[0]).y),f=Ne[r.arrowTypeStart],b=Ne[r.arrowTypeEnd],F=1;if(c<b&&c>0&&h<b){let N=b+F-c;N*=n==="right"?-1:1,o-=N}if(g<f&&g>0&&y<f){let N=f+F-g;N*=n==="right"?-1:1,o+=N}return Qe(e).x+o},"x"),y:t(function(e,i,s){let o=0,n=Qe(s[0]).y<Qe(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Ne,r.arrowTypeStart)){let{angle:N,deltaY:W}=xn(s[0],s[1]);o=Ne[r.arrowTypeStart]*Math.abs(Math.sin(N))*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ne,r.arrowTypeEnd)){let{angle:N,deltaY:W}=xn(s[s.length-1],s[s.length-2]);o=Ne[r.arrowTypeEnd]*Math.abs(Math.sin(N))*(W>=0?1:-1)}let c=Math.abs(Qe(e).y-Qe(s[s.length-1]).y),h=Math.abs(Qe(e).x-Qe(s[s.length-1]).x),g=Math.abs(Qe(e).y-Qe(s[0]).y),y=Math.abs(Qe(e).x-Qe(s[0]).x),f=Ne[r.arrowTypeStart],b=Ne[r.arrowTypeEnd],F=1;if(c<b&&c>0&&h<b){let N=b+F-c;N*=n==="up"?-1:1,o-=N}if(g<f&&g>0&&y<f){let N=f+F-g;N*=n==="up"?-1:1,o+=N}return Qe(e).y+o},"y")}),"getLineFunctionsWithOffset"),WS=t((r,e,i,s,o,n=!1,c)=>{if(e.arrowTypeStart)A0(r,"start",e.arrowTypeStart,i,s,o,n,c);if(e.arrowTypeEnd)A0(r,"end",e.arrowTypeEnd,i,s,o,n,c)},"addEdgeMarkers"),zS={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}},HS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],A0=t((r,e,i,s,o,n,c=!1,h)=>{if(!i||i==="none")return;let g=zS[i],y=g&&HS.includes(g.type);if(!g){a.warn(`Unknown arrow type: ${i}`);return}let f=g.type,N=`${o}_${n}-${f}${e==="start"?"Start":"End"}${c&&y?"-margin":""}`;if(h&&h.trim()!==""){let W=h.replace(/[^\dA-Za-z]/g,"_"),H=`${N}_${W}`;if(!document.getElementById(H)){let Y=document.getElementById(N);if(Y){let j=Y.cloneNode(!0);j.id=H,j.querySelectorAll("path, circle, line").forEach((Q)=>{if(Q.setAttribute("stroke",h),g.fill)Q.setAttribute("fill",h)}),Y.parentNode?.appendChild(j)}}r.attr(`marker-${e}`,`url(${s}#${H})`)}else r.attr(`marker-${e}`,`url(${s}#${N})`)},"addEdgeMarker"),YS=t((r)=>typeof r==="string"?r:l()?.flowchart?.curve,"resolveEdgeCurveType"),Hn=new Map,Me=new Map,bo=t(()=>{Hn.clear(),Me.clear()},"clear"),Wi=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),yn=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),At=t(async(r,e)=>{let i=l(),s=Ce(i),{labelStyles:o}=k(e);e.labelStyle=o;let n=r.insert("g").attr("class","edgeLabel"),c=n.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",g=void 0,y=await Le(r,e.label,{style:yn(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:h,width:h?g:void 0},i);c.node().appendChild(y),a.info("abc82",e,e.labelType);let f,b;if(s){let N=y.children[0],W=p(y);f=await _o.measure(()=>N.getBoundingClientRect()),b=f,W.attr("width",f.width),W.attr("height",f.height)}else{let N=p(y).select("text").node();await _o.measure(()=>{if(f=y.getBBox(),N&&typeof N.getBBox==="function")b=N.getBBox();else b=f})}c.attr("transform",mn(b,s)),Hn.set(e.id,n),e.width=f.width,e.height=f.height;let F;if(e.startLabelLeft){let N=r.insert("g").attr("class","edgeTerminals"),W=N.insert("g").attr("class","inner"),H=await yi(W,e.startLabelLeft,yn(e.labelStyle)||"",!1,!1);F=H;let Y=H.getBBox();if(s){let j=H.children[0],K=p(H);Y=j.getBoundingClientRect(),K.attr("width",Y.width),K.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).startLeft=N,bn(F,e.startLabelLeft,Y),Cn(e,"startLeft",Y)}if(e.startLabelRight){let N=r.insert("g").attr("class","edgeTerminals"),W=N.insert("g").attr("class","inner"),H=await yi(W,e.startLabelRight,yn(e.labelStyle)||"",!1,!1);F=H;let Y=H.getBBox();if(s){let j=H.children[0],K=p(H);Y=j.getBoundingClientRect(),K.attr("width",Y.width),K.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).startRight=N,bn(F,e.startLabelRight,Y),Cn(e,"startRight",Y)}if(e.endLabelLeft){let N=r.insert("g").attr("class","edgeTerminals"),W=N.insert("g").attr("class","inner"),H=await yi(W,e.endLabelLeft,yn(e.labelStyle)||"",!1,!1);F=H;let Y=H.getBBox();if(s){let j=H.children[0],K=p(H);Y=j.getBoundingClientRect(),K.attr("width",Y.width),K.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).endLeft=N,bn(F,e.endLabelLeft,Y),Cn(e,"endLeft",Y)}if(e.endLabelRight){let N=r.insert("g").attr("class","edgeTerminals"),W=N.insert("g").attr("class","inner"),H=await yi(W,e.endLabelRight,yn(e.labelStyle)||"",!1,!1);F=H;let Y=H.getBBox();if(s){let j=H.children[0],K=p(H);Y=j.getBoundingClientRect(),K.attr("width",Y.width),K.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).endRight=N,bn(F,e.endLabelRight,Y),Cn(e,"endRight",Y)}return y},"insertEdgeLabel");function Cn(r,e,i){r.terminalLabelSizes??={},r.terminalLabelSizes[e]={width:i.width,height:i.height}}t(Cn,"recordTerminalLabelSize");function bn(r,e,i){if(Ce(l())&&r)r.style.width=Math.max(e.length*9,i.width)+"px",r.style.height=i.height+"px"}t(bn,"setTerminalWidth");var Gi=t((r,e)=>{let{x:i,y:s}=r;if(e?.updatedPath){let o=M.calcLabelPosition(e.updatedPath);if(e.originalPath){let n=M.calcLabelPosition(e.originalPath);i=r.x+(o.x-n.x),s=r.y+(o.y-n.y)}else i=o.x,s=o.y}return{x:i,y:s}},"resolveEdgeLabelPosition"),Yn=t((r,e)=>{a.debug("Moving label abc88 ",r.id,r.label,Hn.get(r.id),e);let i=l(),{subGraphTitleTotalMargin:s}=Tt(i);if(r.label){let n=Hn.get(r.id),{x:c,y:h}=Gi(r,e);a.debug("Moving label "+r.label+" from (",r.x,",",r.y,") to (",c,",",h,") abc88"),n.attr("transform",`translate(${c}, ${h+s/2})`)}let o=e.updatedPath?e.updatedPath:e.originalPath;if(r.startLabelLeft){let n=Me.get(r.id).startLeft,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.startLabelRight){let n=Me.get(r.id).startRight,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelLeft){let n=Me.get(r.id).endLeft,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelRight){let n=Me.get(r.id).endRight,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),US=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),n=Math.abs(s.y-i.y);if(o<0.001||n<0.001)return e;if(n>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),jS=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),n=Math.abs(e.y-s),c=r.width/2,h=r.height/2;return o>=c||n>=h},"outsideNode"),GS=t((r,e,i)=>{a.debug(`intersection calc abc89:
293
+ `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let v=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",B);return o.append("line").attr("class","node-line-").attr("x1",-g/2).attr("y1",y/2).attr("x2",g/2).attr("y2",y/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),o.append(()=>h.node()),I(e,v),e.calcIntersect=function(q,W){return w.rect(q,W)},e.intersect=function(q){return w.rect(e,q)},o}t(_0,"defaultMindmapNode");async function B0(r,e){let i={padding:e.padding??0};return id(r,e,i)}t(B0,"mindmapCircle");var vS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:i0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:t0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:o0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:l0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:xx},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Cx},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:_x},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:rx},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:cx},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ax},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:yx},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:id},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:S0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:T0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Zx},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Lx},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Rx},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Px},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:d0},{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:$x},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kx},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:u0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:nx},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:e0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:n0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:a0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Bx},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Fx},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:dx},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:px},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:gx},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:qx},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:m0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vx},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:f0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Nx},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:mx},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:bx},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:g0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:x0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Sx},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:p0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Tx},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:r0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Vx},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Xx},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ex},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:fx},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:c0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:h0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:y0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Qx},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Wx}],LS=t(()=>{let e=[...Object.entries({state:s0,choice:lx,note:Kx,composite:hx,rectWithTitle:Jx,labelRect:Dx,block_arrow:sx,collapsedGroup:ox,iconSquare:Ox,iconCircle:Mx,icon:Ax,iconRounded:Ex,imageSquare:Ix,anchor:Jy,kanbanItem:w0,mindmapCircle:B0,defaultMindmapNode:_0,classBox:b0,erBox:sd,requirementBox:k0,usecaseActor:zx,usecaseActorHollow:Yx,usecaseActorAwesome:Hx,usecaseActorIcon:Ux,usecaseBusiness:jx,usecaseEllipse:wx,usecaseJsonTable:Gx}),...vS.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),ea=LS();function Nr(r){return r in ea}t(Nr,"isValidShape");var Tt=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"),lh=new Map;async function Et(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let n=e.shape?ea[e.shape]:void 0;if(!n)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await n(s,e,i)}else o=await n(r,e,i),s=o;if(s.attr("data-look",tr(e.look)),e.tooltip)o.attr("title",e.tooltip);if(lh.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(Et,"insertNode");var ko=t((r,e)=>{lh.set(e.id,r)},"setNodeElem"),Co=t(()=>{lh.clear()},"clear"),yt=t((r)=>{let e=lh.get(r.id);a.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 FS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,y=h,{labelStyles:f,nodeStyles:B,borderStyles:v,backgroundStyles:q}=k(e),W=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.domId??e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Ze(W,e.colorIndex,s,g);let H=ft(i.flowchart.htmlLabels),Y=e.direction==="LR",j=W.insert("g").attr("class","cluster-label swimlane-label"),X=await Le(j,e.label,{style:e.labelStyle,useHtmlLabels:H,isNode:!0,width:e.width}),Q=X.getBBox();if(H){let xt=X.children[0],ot=p(X);Q=xt.getBoundingClientRect(),ot.attr("width",Q.width),ot.attr("height",Q.height)}let rt=e.padding??0,it=e.width<=Q.width+rt?Q.width+rt:e.width;if(e.width<=Q.width+rt)e.diff=(it-e.width)/2-rt;else e.diff=-rt;let ct=e.height,lt=e.y-ct/2,pt=e.y+ct/2,bt=e.x-it/2,vt=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:lt+ct/3,wt=Y?4:0,kt=Q.height+2*wt,st,at;if(Y){let xt=Math.max(kt,Q.height+2*wt),ot=bt+xt,St=Math.max(0,it-xt);if(e.look==="handDrawn"){let Ht=m.svg(W),he=Gt(e,{roughness:0.7,fill:c,stroke:y,seed:n}),ne=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),_e=Ht.rectangle(bt,lt,xt,ct,he);st=W.insert(()=>_e,":first-child").attr("class","swimlane-title");let Ae=Ht.rectangle(ot,lt,St,ct,ne);at=W.insert(()=>Ae,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",v.join(";")),st.select("path").attr("style",q.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",B).attr("x",bt).attr("y",lt).attr("width",xt).attr("height",ct).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",B).attr("x",ot).attr("y",lt).attr("width",St).attr("height",ct).attr("fill","none").attr("stroke",y);let Lt=bt+xt/2,Yt=e.y;j.attr("transform",`translate(${Lt}, ${Yt}) rotate(-90) translate(${-Q.width/2}, ${-Q.height/2})`)}else{let xt=Math.max(0,vt-lt),ot=Math.min(kt,xt),St=lt+ot,Lt=Math.max(0,pt-St),Yt=e.x-it/2;if(e.look==="handDrawn"){let ne=m.svg(W),_e=Gt(e,{roughness:0.7,fill:c,stroke:y,fillWeight:3,seed:n}),Ae=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),xe=ne.rectangle(Yt,lt,it,ot,_e);st=W.insert(()=>xe,":first-child").attr("class","swimlane-title");let Wt=ne.rectangle(Yt,St,it,Lt,Ae);at=W.insert(()=>Wt,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",v.join(";")),st.select("path").attr("style",q.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",B).attr("x",Yt).attr("y",lt).attr("width",it).attr("height",ot).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",B).attr("x",Yt).attr("y",St).attr("width",it).attr("height",Lt).attr("fill","none").attr("stroke",y);let Ht=e.x-Q.width/2,he=lt+(ot-Q.height)/2;j.attr("transform",`translate(${Ht}, ${he})`)}if(a.trace("Swimlane data ",e,JSON.stringify(e)),f){let xt=j.select("span");if(xt)xt.attr("style",f)}return e.offsetX=0,e.width=it,e.height=ct,e.offsetY=Q.height-rt/2,e.intersect=function(xt){return to(e,xt)},{cluster:W,labelBBox:Q}},"swimlane"),v0=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f,borderStyles:B,backgroundStyles:v}=k(e),q=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Ze(q,e.colorIndex,s,g);let W=Ce(i),H=q.insert("g").attr("class","cluster-label "),Y;if(e.labelType==="markdown")Y=await Le(H,e.label,{style:e.labelStyle,useHtmlLabels:W,isNode:!0,width:e.width});else Y=await Ti(H,e.label,e.labelStyle||"",!1,!0);let j=Y.getBBox();if(Ce(i)){let bt=Y.children[0],vt=p(Y);j=bt.getBoundingClientRect(),vt.attr("width",j.width),vt.attr("height",j.height)}let X=e.width<=j.width+e.padding?j.width+e.padding:e.width;if(e.width<=j.width+e.padding)e.diff=(X-e.width)/2-e.padding;else e.diff=-e.padding;let Q=e.height,rt=e.x-X/2,it=e.y-Q/2;a.trace("Data ",e,JSON.stringify(e));let ct;if(e.look==="handDrawn"){let bt=m.svg(q),vt=Gt(e,{roughness:0.7,fill:c,stroke:h,fillWeight:3,seed:n}),wt=bt.path(jr(rt,it,X,Q,0),vt);ct=q.insert(()=>(a.debug("Rough node insert CXC",wt),wt),":first-child"),ct.select("path:nth-child(2)").attr("style",B.join(";")),ct.select("path").attr("style",v.join(";").replace("fill","stroke"))}else ct=q.insert("rect",":first-child"),ct.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",rt).attr("y",it).attr("width",X).attr("height",Q);let{subGraphTitleTopMargin:lt}=Tt(i);if(H.attr("transform",`translate(${e.x-j.width/2}, ${e.y-e.height/2+lt})`),y){let bt=H.select("span");if(bt)bt.attr("style",y)}let pt=ct.node().getBBox();return e.offsetX=0,e.width=pt.width,e.height=pt.height,e.offsetY=j.height-e.padding/2,e.intersect=function(bt){return to(e,bt)},{cluster:q,labelBBox:j}},"rect"),AS=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,n=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return to(e,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),MS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,borderColorArray:h,compositeBackground:g,compositeTitleBackground:y,nodeBorder:f}=o,B=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Ze(B,e.colorIndex,s,h);let v=B.insert("g",":first-child"),q=B.insert("g").attr("class","cluster-label"),W=B.append("rect"),H=await Ti(q,e.label,e.labelStyle,void 0,!0),Y=H.getBBox();if(Ce(i)){let wt=H.children[0],kt=p(H);Y=wt.getBoundingClientRect(),kt.attr("width",Y.width),kt.attr("height",Y.height)}let j=0*e.padding,X=j/2,Q=(e.width<=Y.width+e.padding?Y.width+e.padding:e.width)+j;if(e.width<=Y.width+e.padding)e.diff=(Q-e.width)/2-e.padding;else e.diff=-e.padding;let rt=e.height+j,it=e.height+j-Y.height-6,ct=e.x-Q/2,lt=e.y-rt/2;e.width=Q;let pt=e.y-e.height/2-X+Y.height+2,bt;if(e.look==="handDrawn"){let wt=e.cssClasses.includes("statediagram-cluster-alt"),kt=m.svg(B),st=e.rx||e.ry?kt.path(jr(ct,lt,Q,rt,10),{roughness:0.7,fill:y,fillStyle:"solid",stroke:f,seed:n}):kt.rectangle(ct,lt,Q,rt,{seed:n});bt=B.insert(()=>st,":first-child");let at=kt.rectangle(ct,pt,Q,it,{fill:wt?c:g,fillStyle:wt?"hachure":"solid",stroke:f,seed:n});bt=B.insert(()=>st,":first-child"),W=B.insert(()=>at),bt.attr("class","outer"),W.attr("class","inner")}else{bt=v.insert("rect",":first-child");let wt="outer";bt.attr("class",wt).attr("x",ct).attr("y",lt).attr("width",Q).attr("height",rt).attr("data-look",e.look),W.attr("class","inner").attr("x",ct).attr("y",pt).attr("width",Q).attr("height",it)}q.attr("transform",`translate(${e.x-Y.width/2}, ${lt+1-(Ce(i)?0:3)})`);let vt=bt.node().getBBox();return e.height=vt.height,e.offsetX=0,e.offsetY=Y.height-e.padding/2,e.labelBBox=Y,e.intersect=function(wt){return to(e,wt)},{cluster:B,labelBBox:Y}},"roundedWithTitle"),ES=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:n,clusterBorder:c}=s,{labelStyles:h,nodeStyles:g,borderStyles:y,backgroundStyles:f}=k(e),B=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),v=Ce(i),q=B.insert("g").attr("class","cluster-label "),W=await Le(q,e.label,{style:e.labelStyle,useHtmlLabels:v,isNode:!0,width:e.width}),H=W.getBBox();if(Ce(i)){let lt=W.children[0],pt=p(W);H=lt.getBoundingClientRect(),pt.attr("width",H.width),pt.attr("height",H.height)}let Y=e.width<=H.width+e.padding?H.width+e.padding:e.width;if(e.width<=H.width+e.padding)e.diff=(Y-e.width)/2-e.padding;else e.diff=-e.padding;let j=e.height,X=e.x-Y/2,Q=e.y-j/2;a.trace("Data ",e,JSON.stringify(e));let rt;if(e.look==="handDrawn"){let lt=m.svg(B),pt=Gt(e,{roughness:0.7,fill:n,stroke:c,fillWeight:4,seed:o}),bt=lt.path(jr(X,Q,Y,j,e.rx),pt);rt=B.insert(()=>(a.debug("Rough node insert CXC",bt),bt),":first-child"),rt.select("path:nth-child(2)").attr("style",y.join(";")),rt.select("path").attr("style",f.join(";").replace("fill","stroke"))}else rt=B.insert("rect",":first-child"),rt.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",X).attr("y",Q).attr("width",Y).attr("height",j);let{subGraphTitleTopMargin:it}=Tt(i);if(q.attr("transform",`translate(${e.x-H.width/2}, ${e.y-e.height/2+it})`),h){let lt=q.select("span");if(lt)lt.attr("style",h)}let ct=rt.node().getBBox();return e.offsetX=0,e.width=ct.width,e.height=ct.height,e.offsetY=H.height-e.padding/2,e.intersect=function(lt){return to(e,lt)},{cluster:B,labelBBox:H}},"kanbanSection"),OS=t((r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,nodeBorder:h,borderColorArray:g}=o,y=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Ze(y,e.colorIndex,s,g);let f=y.insert("g",":first-child"),B=0*e.padding,v=e.width+B;e.diff=-e.padding;let q=e.height+B,W=e.x-v/2,H=e.y-q/2;e.width=v;let Y;if(e.look==="handDrawn"){let Q=m.svg(y).rectangle(W,H,v,q,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:h,seed:n});Y=y.insert(()=>Q,":first-child").attr("class","divider")}else{Y=f.insert("rect",":first-child");let X="outer";if(e.look==="neo")X="divider";else X="divider";Y.attr("class",X).attr("x",W).attr("y",H).attr("width",v).attr("height",q).attr("data-look",e.look)}let j=Y.node().getBBox();return e.height=j.height,e.offsetX=0,e.offsetY=0,e.intersect=function(X){return to(e,X)},{cluster:y,labelBBox:{}}},"divider"),IS=t(async(r,e,i)=>{a.info(`Creating ${i.cssClass} for `,e.id,e);let s=l(),{theme:o,themeVariables:n,handDrawnSeed:c}=s,{borderColorArray:h}=n,{labelStyles:g,borderStyles:y}=k(e),f=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Ze(f,e.colorIndex,o,h);let B=Ce(s),v=f.insert("g").attr("class","cluster-label"),q={width:0,height:0},W=e.label?.trim();if(W){let it;if(e.labelType==="markdown")it=await Le(v,e.label,{style:e.labelStyle,useHtmlLabels:B,isNode:!0,width:e.width});else it=await Ti(v,e.label,e.labelStyle||"",!1,!0);if(q=it.getBBox(),B){let ct=it.children[0],lt=p(it);q=ct.getBoundingClientRect(),lt.attr("width",q.width),lt.attr("height",q.height)}}let H=e.width<=q.width+e.padding?q.width+e.padding:e.width;if(e.width<=q.width+e.padding)e.diff=(H-e.width)/2-e.padding;else e.diff=-e.padding;let Y=e.height,j=e.x-H/2,X=e.y-Y/2,Q;if(e.look==="handDrawn"){let it=m.svg(f),ct=Gt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),lt=it.path(jr(j,X,H,Y,i.rx),ct);Q=f.insert(()=>lt,":first-child"),Q.select("path:nth-child(2)").attr("style",y.join(";"))}else if(Q=f.insert("rect",":first-child"),Q.attr("rx",i.rx).attr("ry",i.rx).attr("x",j).attr("y",X).attr("width",H).attr("height",Y).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)Q.attr("stroke-dasharray",i.strokeDash.join(", "));if(W){let{subGraphTitleTopMargin:it}=Tt(s);if(v.attr("transform",`translate(${e.x-q.width/2}, ${e.y-e.height/2+it})`),g){let ct=v.select("span");if(ct)ct.attr("style",g)}}let rt=Q.node().getBBox();return e.offsetX=0,e.width=rt.width,e.height=rt.height,e.offsetY=q.height-e.padding/2,e.intersect=function(it){return to(e,it)},{cluster:f,labelBBox:q}},"createContainerGroup"),$S=t(async(r,e)=>{let{themeVariables:i}=l(),s=i.flowContainerStroke||i.secondaryBorderColor;return IS(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),DS=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,n=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,h=r.x-n/2,g=r.y-c/2;return{boundaryType:i,width:n,height:c,x:h,y:g,bodyY:g+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(n,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),PS=t(async(r,e)=>{a.info("Creating usecase system boundary for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f}=k(e),{stylesMap:B}=Di(e),v=e.boundaryType||"rect",q=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${v} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",v).attr("data-look",e.look);Ze(q,e.colorIndex,s,g);let W=Ce(i),H=q.insert("g").attr("class","cluster-label system-boundary-title"),Y=await Le(H,e.label,{style:y,useHtmlLabels:W,isNode:!0}),j=Y.getBBox();if(W){let st=Y.children[0],at=p(Y);j=st.getBoundingClientRect(),at.attr("width",j.width),at.attr("height",j.height)}let X=DS(e,j),{width:Q,height:rt,x:it,y:ct,bodyY:lt,bodyHeight:pt,tabHeight:bt,tabWidth:vt}=X;e.diff=e.width<=j.width+e.padding?(Q-e.width)/2-e.padding:-e.padding;let wt=Gt(e,{fill:B.get("fill")||c,stroke:B.get("stroke")||h,strokeWidth:B.get("stroke-width")?.replace("px","")||1,seed:n});if(e.look==="handDrawn"){let st=m.svg(q),at=st.rectangle(it,lt,Q,pt,wt);if(q.insert(()=>at,":first-child").attr("class","boundary-body label-container"),v==="package"){let xt=st.rectangle(it,ct,vt,bt,wt);q.insert(()=>xt,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(q.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",f).attr("x",it).attr("y",lt).attr("width",Q).attr("height",pt),v==="package")q.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",f).attr("x",it).attr("y",ct).attr("width",vt).attr("height",bt);let{subGraphTitleTopMargin:kt}=Tt(i);if(v==="package")H.attr("transform",`translate(${it+(vt-j.width)/2}, ${ct+(bt-j.height)/2})`);else H.attr("transform",`translate(${e.x-j.width/2}, ${ct+kt})`);if(y)H.attr("style",y),H.select("span").attr("style",y);return e.offsetX=0,e.width=Q,e.height=rt,e.offsetY=j.height-e.padding/2,e.labelBBox=j,e.intersect=function(st){return to(e,st)},{cluster:q,labelBBox:j}},"usecaseSystemBoundary"),RS=v0,qS={rect:v0,squareRect:RS,roundedWithTitle:MS,noteGroup:AS,divider:OS,kanbanSection:ES,flowGroup:$S,usecaseSystemBoundary:PS,swimlane:FS};var L0=new Map,en=t(async(r,e)=>{let i=e.shape||"rect",s=await qS[i](r,e);return L0.set(e.id,s),s},"insertCluster"),So=t(()=>{L0=new Map},"clear");var mn=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"),Ne={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},F0={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function xn(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=Je(r),e=Je(e);let[i,s]=[r.x,r.y],[o,n]=[e.x,e.y],c=o-i,h=n-s;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}t(xn,"calculateDeltaAndAngle");var Je=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),NS=t((r)=>({x:t(function(e,i,s){let o=0,n=Je(s[0]).x<Je(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Ne,r.arrowTypeStart)){let{angle:q,deltaX:W}=xn(s[0],s[1]);o=Ne[r.arrowTypeStart]*Math.cos(q)*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ne,r.arrowTypeEnd)){let{angle:q,deltaX:W}=xn(s[s.length-1],s[s.length-2]);o=Ne[r.arrowTypeEnd]*Math.cos(q)*(W>=0?1:-1)}let c=Math.abs(Je(e).x-Je(s[s.length-1]).x),h=Math.abs(Je(e).y-Je(s[s.length-1]).y),g=Math.abs(Je(e).x-Je(s[0]).x),y=Math.abs(Je(e).y-Je(s[0]).y),f=Ne[r.arrowTypeStart],B=Ne[r.arrowTypeEnd],v=1;if(c<B&&c>0&&h<B){let q=B+v-c;q*=n==="right"?-1:1,o-=q}if(g<f&&g>0&&y<f){let q=f+v-g;q*=n==="right"?-1:1,o+=q}return Je(e).x+o},"x"),y:t(function(e,i,s){let o=0,n=Je(s[0]).y<Je(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Ne,r.arrowTypeStart)){let{angle:q,deltaY:W}=xn(s[0],s[1]);o=Ne[r.arrowTypeStart]*Math.abs(Math.sin(q))*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ne,r.arrowTypeEnd)){let{angle:q,deltaY:W}=xn(s[s.length-1],s[s.length-2]);o=Ne[r.arrowTypeEnd]*Math.abs(Math.sin(q))*(W>=0?1:-1)}let c=Math.abs(Je(e).y-Je(s[s.length-1]).y),h=Math.abs(Je(e).x-Je(s[s.length-1]).x),g=Math.abs(Je(e).y-Je(s[0]).y),y=Math.abs(Je(e).x-Je(s[0]).x),f=Ne[r.arrowTypeStart],B=Ne[r.arrowTypeEnd],v=1;if(c<B&&c>0&&h<B){let q=B+v-c;q*=n==="up"?-1:1,o-=q}if(g<f&&g>0&&y<f){let q=f+v-g;q*=n==="up"?-1:1,o+=q}return Je(e).y+o},"y")}),"getLineFunctionsWithOffset"),WS=t((r,e,i,s,o,n=!1,c)=>{if(e.arrowTypeStart)A0(r,"start",e.arrowTypeStart,i,s,o,n,c);if(e.arrowTypeEnd)A0(r,"end",e.arrowTypeEnd,i,s,o,n,c)},"addEdgeMarkers"),zS={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}},HS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],A0=t((r,e,i,s,o,n,c=!1,h)=>{if(!i||i==="none")return;let g=zS[i],y=g&&HS.includes(g.type);if(!g){a.warn(`Unknown arrow type: ${i}`);return}let f=g.type,q=`${o}_${n}-${f}${e==="start"?"Start":"End"}${c&&y?"-margin":""}`;if(h&&h.trim()!==""){let W=h.replace(/[^\dA-Za-z]/g,"_"),H=`${q}_${W}`;if(!document.getElementById(H)){let Y=document.getElementById(q);if(Y){let j=Y.cloneNode(!0);j.id=H,j.querySelectorAll("path, circle, line").forEach((Q)=>{if(Q.setAttribute("stroke",h),g.fill)Q.setAttribute("fill",h)}),Y.parentNode?.appendChild(j)}}r.attr(`marker-${e}`,`url(${s}#${H})`)}else r.attr(`marker-${e}`,`url(${s}#${q})`)},"addEdgeMarker"),YS=t((r)=>typeof r==="string"?r:l()?.flowchart?.curve,"resolveEdgeCurveType"),Hn=new Map,Me=new Map,To=t(()=>{Hn.clear(),Me.clear()},"clear"),Qi=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),yn=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),At=t(async(r,e)=>{let i=l(),s=Ce(i),{labelStyles:o}=k(e);e.labelStyle=o;let n=r.insert("g").attr("class","edgeLabel"),c=n.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",g=void 0,y=await Le(r,e.label,{style:yn(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:h,width:h?g:void 0},i);c.node().appendChild(y),a.info("abc82",e,e.labelType);let f,B;if(s){let q=y.children[0],W=p(y);f=await Oo.measure(()=>q.getBoundingClientRect()),B=f,W.attr("width",f.width),W.attr("height",f.height)}else{let q=p(y).select("text").node();await Oo.measure(()=>{if(f=y.getBBox(),q&&typeof q.getBBox==="function")B=q.getBBox();else B=f})}c.attr("transform",mn(B,s)),Hn.set(e.id,n),e.width=f.width,e.height=f.height;let v;if(e.startLabelLeft){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.startLabelLeft,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).startLeft=q,bn(v,e.startLabelLeft,Y),Cn(e,"startLeft",Y)}if(e.startLabelRight){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.startLabelRight,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).startRight=q,bn(v,e.startLabelRight,Y),Cn(e,"startRight",Y)}if(e.endLabelLeft){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.endLabelLeft,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).endLeft=q,bn(v,e.endLabelLeft,Y),Cn(e,"endLeft",Y)}if(e.endLabelRight){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.endLabelRight,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).endRight=q,bn(v,e.endLabelRight,Y),Cn(e,"endRight",Y)}return y},"insertEdgeLabel");function Cn(r,e,i){r.terminalLabelSizes??={},r.terminalLabelSizes[e]={width:i.width,height:i.height}}t(Cn,"recordTerminalLabelSize");function bn(r,e,i){if(Ce(l())&&r)r.style.width=Math.max(e.length*9,i.width)+"px",r.style.height=i.height+"px"}t(bn,"setTerminalWidth");var Ji=t((r,e)=>{let{x:i,y:s}=r;if(e?.updatedPath){let o=M.calcLabelPosition(e.updatedPath);if(e.originalPath){let n=M.calcLabelPosition(e.originalPath);i=r.x+(o.x-n.x),s=r.y+(o.y-n.y)}else i=o.x,s=o.y}return{x:i,y:s}},"resolveEdgeLabelPosition"),Yn=t((r,e)=>{a.debug("Moving label abc88 ",r.id,r.label,Hn.get(r.id),e);let i=l(),{subGraphTitleTotalMargin:s}=Tt(i);if(r.label){let n=Hn.get(r.id),{x:c,y:h}=Ji(r,e);a.debug("Moving label "+r.label+" from (",r.x,",",r.y,") to (",c,",",h,") abc88"),n.attr("transform",`translate(${c}, ${h+s/2})`)}let o=e.updatedPath?e.updatedPath:e.originalPath;if(r.startLabelLeft){let n=Me.get(r.id).startLeft,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.startLabelRight){let n=Me.get(r.id).startRight,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelLeft){let n=Me.get(r.id).endLeft,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelRight){let n=Me.get(r.id).endRight,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),US=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),n=Math.abs(s.y-i.y);if(o<0.001||n<0.001)return e;if(n>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),jS=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),n=Math.abs(e.y-s),c=r.width/2,h=r.height/2;return o>=c||n>=h},"outsideNode"),GS=t((r,e,i)=>{a.debug(`intersection calc abc89:
294
294
  outsidePoint: ${JSON.stringify(e)}
295
295
  insidePoint : ${JSON.stringify(i)}
296
- node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,n=Math.abs(s-i.x),c=r.width/2,h=i.x<e.x?c-n:c+n,g=r.height/2,y=Math.abs(e.y-i.y),f=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*g){let b=i.y<e.y?e.y-g-o:o-g-e.y;h=f*b/y;let F={x:i.x<e.x?i.x+h:i.x-f+h,y:i.y<e.y?i.y+y-b:i.y-y+b};if(h===0)F.x=e.x,F.y=e.y;if(f===0)F.x=e.x;if(y===0)F.y=e.y;return a.debug(`abc89 top/bottom calc, Q ${y}, q ${b}, R ${f}, r ${h}`,F),F}else{if(i.x<e.x)h=e.x-c-s;else h=s-c-e.x;let b=y*h/f,F=i.x<e.x?i.x+f-h:i.x-f+h,N=i.y<e.y?i.y+b:i.y-b;if(a.debug(`sides calc abc89, Q ${y}, q ${b}, R ${f}, r ${h}`,{_x:F,_y:N}),h===0)F=e.x,N=e.y;if(f===0)F=e.x;if(y===0)N=e.y;return{x:F,y:N}}},"intersection"),M0=t((r,e)=>{a.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((n)=>{if(a.info("abc88 checking point",n,e),!jS(e,n)&&!o){let c=GS(e,s,n);a.debug("abc88 inside",n,s,c),a.debug("abc88 intersection",c,e);let h=!1;if(i.forEach((g)=>{h=h||g.x===c.x&&g.y===c.y}),!i.some((g)=>g.x===c.x&&g.y===c.y))i.push(c);else a.warn("abc88 no intersect",c,i);o=!0}else if(a.warn("abc88 outside",n,s),s=n,!o)i.push(n)}),a.debug("returning points",i),i},"cutPathAtIntersect");function O0(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],n=r[s],c=r[s+1];if(o.x===n.x&&n.y===c.y&&Math.abs(n.x-c.x)>5&&Math.abs(n.y-o.y)>5)e.push(n),i.push(s);else if(o.y===n.y&&n.x===c.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-c.y)>5)e.push(n),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(O0,"extractCornerPoints");var E0=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,n=Math.sqrt(s*s+o*o),c=i/n;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),XS=t(function(r){let{cornerPointPositions:e}=O0(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],n=r[s+1],c=r[s],h=E0(o,c,5),g=E0(n,c,5),y=g.x-h.x,f=g.y-h.y;i.push(h);let b=Math.sqrt(2)*2,F={x:c.x,y:c.y};if(Math.abs(n.x-o.x)>10&&Math.abs(n.y-o.y)>=10){a.debug("Corner point fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));let N=5;if(c.x===h.x)F={x:y<0?h.x-N+b:h.x+N-b,y:f<0?h.y-b:h.y+b};else F={x:y<0?h.x-b:h.x+b,y:f<0?h.y-N+b:h.y+N-b}}else a.debug("Corner point skipping fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));i.push(F,g)}else i.push(r[s]);return i},"fixCorners"),VS=t((r,e,i)=>{let s=r-e-i,o=2,n=2,c=4,h=Math.floor(s/4),g=Number.isFinite(h)?Math.max(0,h):0,y=Array(g).fill("2 2").join(" ");return`0 ${e} ${y} ${i}`},"generateDashArray"),nn=t(function(r,e,i,s,o,n,c,h=!1,g=void 0){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:y,layout:f}=l(),b=g??f,F=e.points,N=!1,W=o;var H=n;let Y=[];for(let Ht in e.cssCompiledStyles){if(Gr(Ht))continue;Y.push(e.cssCompiledStyles[Ht])}if(b==="swimlane"){if(!h&&H.intersect&&W.intersect&&Array.isArray(F)&&F.length>=2)if(F.length===2)F=[W.intersect(F[0]),H.intersect(F[1])];else{let Ht=F.slice(1,-1),ne=Ht[0],ie=Ht[Ht.length-1],be=0.5,_e=Math.abs(F[F.length-1].x-ie.x)<0.5&&Math.abs(F[F.length-1].y-ie.y)<0.5,ge=W.intersect(ne),Wt=_e?ie:H.intersect(ie),ee=Math.abs(Wt.x-ie.x)<0.5&&Math.abs(Wt.y-ie.y)<0.5,ue=Math.abs(ge.x-ne.x)<0.5&&Math.abs(ge.y-ne.y)<0.5?[]:[ge],Xe=ee?[]:[Wt];F=[...ue,...Ht,...Xe]}F=US(e,F)}else if(H.intersect&&W.intersect&&!h)F=F.slice(1,e.points.length-1),F.unshift(W.intersect(F[0])),F.push(H.intersect(F[F.length-1]));let j=btoa(JSON.stringify(F));if(e.toCluster)a.info("to cluster abc88",i.get(e.toCluster)),F=M0(e.points,i.get(e.toCluster).node),N=!0;if(e.fromCluster)a.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(F,null,2)),F=M0(F.reverse(),i.get(e.fromCluster).node).reverse(),N=!0;let K=F.filter((Ht)=>!Number.isNaN(Ht.y)),Q=YS(e.curve);if(Q!=="rounded")K=XS(K);let rt=_i;switch(Q){case"linear":rt=_i;break;case"basis":rt=Vo;break;case"cardinal":rt=fa;break;case"bumpX":rt=Wn;break;case"bumpY":rt=ca;break;case"catmullRom":rt=pa;break;case"monotoneX":rt=ga;break;case"monotoneY":rt=ma;break;case"natural":rt=bs;break;case"step":rt=ks;break;case"stepAfter":rt=xa;break;case"stepBefore":rt=ya;break;case"rounded":rt=_i;break;default:rt=Vo}let{x:it,y:ct}=NS(e),lt=Vn().x(it).y(ct).curve(rt),pt;switch(e.thickness){case"normal":pt="edge-thickness-normal";break;case"thick":pt="edge-thickness-thick";break;case"invisible":pt="edge-thickness-invisible";break;default:pt="edge-thickness-normal"}switch(e.pattern){case"solid":pt+=" edge-pattern-solid";break;case"dotted":pt+=" edge-pattern-dotted";break;case"dashed":pt+=" edge-pattern-dashed";break;default:pt+=" edge-pattern-solid"}let bt,vt=Q==="rounded"?I0($0(K,e),5):lt(K),wt=Array.isArray(e.style)?e.style:[e.style],kt=wt.find((Ht)=>Ht?.startsWith("stroke:")),st="";if(e.animate)st="edge-animation-fast";if(e.animation)st="edge-animation-"+e.animation;let at=!1;if(e.look==="handDrawn"){let Ht=m.svg(r);Object.assign([],K);let ne=Ht.path(vt,{roughness:0.3,seed:y});pt+=" transition",bt=p(ne).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+pt+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",wt?wt.reduce((be,_e)=>be+";"+_e,""):"");let ie=bt.attr("d");bt.attr("d",ie),r.node().appendChild(bt.node())}else{let Ht=Y.join(";"),ne=wt?wt.reduce((ee,ce)=>ee+ce+";",""):"",ie=(Ht?Ht+";"+ne+";":ne)+";"+(wt?wt.reduce((ee,ce)=>ee+";"+ce,""):"");bt=r.append("path").attr("d",vt).attr("id",`${c}-${e.id}`).attr("class"," "+pt+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",ie),kt=ie.match(/stroke:([^;]+)/)?.[1],at=e.animate===!0||!!e.animation||Ht.includes("animation");let be=bt.node(),_e=typeof be.getTotalLength==="function"?be.getTotalLength():0,ge=F0[e.arrowTypeStart]||0,Wt=F0[e.arrowTypeEnd]||0;if(e.look==="neo"&&!at){let ce=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?VS(_e,ge,Wt):`0 ${ge} ${_e-ge-Wt} ${Wt}`}; stroke-dashoffset: 0;`;bt.attr("style",ce+bt.attr("style"))}}if(bt.attr("data-edge",!0),bt.attr("data-et","edge"),bt.attr("data-id",e.id),bt.attr("data-points",j),bt.attr("data-look",Je(e.look)),e.showPoints)K.forEach((Ht)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Ht.x).attr("cy",Ht.y)});let xt="";if(l().flowchart.arrowMarkerAbsolute||l().state.arrowMarkerAbsolute)xt=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,xt=xt.replace(/\(/g,"\\(").replace(/\)/g,"\\)");a.info("arrowTypeStart",e.arrowTypeStart),a.info("arrowTypeEnd",e.arrowTypeEnd);let ot=!at&&e?.look==="neo";WS(bt,e,xt,c,s,ot,kt);let St=Math.floor(F.length/2),Lt=F[St];if(!M.isLabelCoordinateInPath(Lt,bt.attr("d")))N=!0;let Yt={};if(N)Yt.updatedPath=F;return Yt.originalPath=e.points,Yt},"insertEdge");function I0(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let n=0;n<s;n++){let c=r[n],h=r[n-1],g=r[n+1];if(n===0)i+=`M${c.x},${c.y}`;else if(n===s-1)i+=`L${c.x},${c.y}`;else{let y=c.x-h.x,f=c.y-h.y,b=g.x-c.x,F=g.y-c.y,N=Math.hypot(y,f),W=Math.hypot(b,F);if(N<o||W<o){i+=`L${c.x},${c.y}`;continue}let H=y/N,Y=f/N,j=b/W,K=F/W,Q=H*j+Y*K,rt=Math.max(-1,Math.min(1,Q)),it=Math.acos(rt);if(it<o||Math.abs(Math.PI-it)<o){i+=`L${c.x},${c.y}`;continue}let ct=Math.min(e/Math.sin(it/2),N/2,W/2),lt=c.x-H*ct,pt=c.y-Y*ct,bt=c.x+j*ct,vt=c.y+K*ct;i+=`L${lt},${pt}`,i+=`Q${c.x},${c.y} ${bt},${vt}`}}return i}t(I0,"generateRoundedPath");function ad(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(ad,"calculateDeltaAndAngle");function $0(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Ne[e.arrowTypeStart]){let o=Ne[e.arrowTypeStart],n=r[0],c=r[1],{angle:h}=ad(n,c),g=o*Math.cos(h),y=o*Math.sin(h);i[0].x=n.x+g,i[0].y=n.y+y}let s=r.length;if(s>=2&&Ne[e.arrowTypeEnd]){let o=Ne[e.arrowTypeEnd],n=r[s-1],c=r[s-2],{angle:h}=ad(c,n),g=o*Math.cos(h),y=o*Math.sin(h);i[s-1].x=n.x-g,i[s-1].y=n.y-y}return i}t($0,"applyMarkerOffsetsToPoints");var KS=t((r,e,i,s)=>{e.forEach((o)=>{bT[o](r,i,s)})},"insertMarkers"),ZS=t((r,e,i)=>{a.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"),QS=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"),JS=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"),tT=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"),eT=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"),rT=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"),iT=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"),oT=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"),sT=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"),aT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{transitionColor:n}=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",`${n}`)},"barbNeo"),nT=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"),lT=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"),hT=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"),cT=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"),uT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=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",`${n}`),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",`${n}`)},"only_one_neo"),fT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=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");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);let g=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");g.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),g.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),dT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=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",`${n}`),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",`${n}`)},"one_or_more_neo"),pT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=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");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);let g=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");g.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),g.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),gT=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
296
+ node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,n=Math.abs(s-i.x),c=r.width/2,h=i.x<e.x?c-n:c+n,g=r.height/2,y=Math.abs(e.y-i.y),f=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*g){let B=i.y<e.y?e.y-g-o:o-g-e.y;h=f*B/y;let v={x:i.x<e.x?i.x+h:i.x-f+h,y:i.y<e.y?i.y+y-B:i.y-y+B};if(h===0)v.x=e.x,v.y=e.y;if(f===0)v.x=e.x;if(y===0)v.y=e.y;return a.debug(`abc89 top/bottom calc, Q ${y}, q ${B}, R ${f}, r ${h}`,v),v}else{if(i.x<e.x)h=e.x-c-s;else h=s-c-e.x;let B=y*h/f,v=i.x<e.x?i.x+f-h:i.x-f+h,q=i.y<e.y?i.y+B:i.y-B;if(a.debug(`sides calc abc89, Q ${y}, q ${B}, R ${f}, r ${h}`,{_x:v,_y:q}),h===0)v=e.x,q=e.y;if(f===0)v=e.x;if(y===0)q=e.y;return{x:v,y:q}}},"intersection"),M0=t((r,e)=>{a.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((n)=>{if(a.info("abc88 checking point",n,e),!jS(e,n)&&!o){let c=GS(e,s,n);a.debug("abc88 inside",n,s,c),a.debug("abc88 intersection",c,e);let h=!1;if(i.forEach((g)=>{h=h||g.x===c.x&&g.y===c.y}),!i.some((g)=>g.x===c.x&&g.y===c.y))i.push(c);else a.warn("abc88 no intersect",c,i);o=!0}else if(a.warn("abc88 outside",n,s),s=n,!o)i.push(n)}),a.debug("returning points",i),i},"cutPathAtIntersect");function O0(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],n=r[s],c=r[s+1];if(o.x===n.x&&n.y===c.y&&Math.abs(n.x-c.x)>5&&Math.abs(n.y-o.y)>5)e.push(n),i.push(s);else if(o.y===n.y&&n.x===c.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-c.y)>5)e.push(n),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(O0,"extractCornerPoints");var E0=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,n=Math.sqrt(s*s+o*o),c=i/n;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),XS=t(function(r){let{cornerPointPositions:e}=O0(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],n=r[s+1],c=r[s],h=E0(o,c,5),g=E0(n,c,5),y=g.x-h.x,f=g.y-h.y;i.push(h);let B=Math.sqrt(2)*2,v={x:c.x,y:c.y};if(Math.abs(n.x-o.x)>10&&Math.abs(n.y-o.y)>=10){a.debug("Corner point fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));let q=5;if(c.x===h.x)v={x:y<0?h.x-q+B:h.x+q-B,y:f<0?h.y-B:h.y+B};else v={x:y<0?h.x-B:h.x+B,y:f<0?h.y-q+B:h.y+q-B}}else a.debug("Corner point skipping fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));i.push(v,g)}else i.push(r[s]);return i},"fixCorners"),VS=t((r,e,i)=>{let s=r-e-i,o=2,n=2,c=4,h=Math.floor(s/4),g=Number.isFinite(h)?Math.max(0,h):0,y=Array(g).fill("2 2").join(" ");return`0 ${e} ${y} ${i}`},"generateDashArray"),tn=t(function(r,e,i,s,o,n,c,h=!1,g=void 0){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:y,layout:f}=l(),B=g??f,v=e.points,q=!1,W=o;var H=n;let Y=[];for(let Ht in e.cssCompiledStyles){if(Zr(Ht))continue;Y.push(e.cssCompiledStyles[Ht])}if(B==="swimlane"){if(!h&&H.intersect&&W.intersect&&Array.isArray(v)&&v.length>=2)if(v.length===2)v=[W.intersect(v[0]),H.intersect(v[1])];else{let Ht=v.slice(1,-1),he=Ht[0],ne=Ht[Ht.length-1],_e=0.5,Ae=Math.abs(v[v.length-1].x-ne.x)<0.5&&Math.abs(v[v.length-1].y-ne.y)<0.5,xe=W.intersect(he),Wt=Ae?ne:H.intersect(ne),re=Math.abs(Wt.x-ne.x)<0.5&&Math.abs(Wt.y-ne.y)<0.5,ue=Math.abs(xe.x-he.x)<0.5&&Math.abs(xe.y-he.y)<0.5?[]:[xe],Ke=re?[]:[Wt];v=[...ue,...Ht,...Ke]}v=US(e,v)}else if(H.intersect&&W.intersect&&!h)v=v.slice(1,e.points.length-1),v.unshift(W.intersect(v[0])),v.push(H.intersect(v[v.length-1]));let j=btoa(JSON.stringify(v));if(e.toCluster)a.info("to cluster abc88",i.get(e.toCluster)),v=M0(e.points,i.get(e.toCluster).node),q=!0;if(e.fromCluster)a.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(v,null,2)),v=M0(v.reverse(),i.get(e.fromCluster).node).reverse(),q=!0;let X=v.filter((Ht)=>!Number.isNaN(Ht.y)),Q=YS(e.curve);if(Q!=="rounded")X=XS(X);let rt=Ii;switch(Q){case"linear":rt=Ii;break;case"basis":rt=rs;break;case"cardinal":rt=ba;break;case"bumpX":rt=Wn;break;case"bumpY":rt=xa;break;case"catmullRom":rt=wa;break;case"monotoneX":rt=Sa;break;case"monotoneY":rt=Ta;break;case"natural":rt=vs;break;case"step":rt=Ls;break;case"stepAfter":rt=va;break;case"stepBefore":rt=_a;break;case"rounded":rt=Ii;break;default:rt=rs}let{x:it,y:ct}=NS(e),lt=Vn().x(it).y(ct).curve(rt),pt;switch(e.thickness){case"normal":pt="edge-thickness-normal";break;case"thick":pt="edge-thickness-thick";break;case"invisible":pt="edge-thickness-invisible";break;default:pt="edge-thickness-normal"}switch(e.pattern){case"solid":pt+=" edge-pattern-solid";break;case"dotted":pt+=" edge-pattern-dotted";break;case"dashed":pt+=" edge-pattern-dashed";break;default:pt+=" edge-pattern-solid"}let bt,vt=Q==="rounded"?I0($0(X,e),5):lt(X),wt=Array.isArray(e.style)?e.style:[e.style],kt=wt.find((Ht)=>Ht?.startsWith("stroke:")),st="";if(e.animate)st="edge-animation-fast";if(e.animation)st="edge-animation-"+e.animation;let at=!1;if(e.look==="handDrawn"){let Ht=m.svg(r);Object.assign([],X);let he=Ht.path(vt,{roughness:0.3,seed:y});pt+=" transition",bt=p(he).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+pt+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",wt?wt.reduce((_e,Ae)=>_e+";"+Ae,""):"");let ne=bt.attr("d");bt.attr("d",ne),r.node().appendChild(bt.node())}else{let Ht=Y.join(";"),he=wt?wt.reduce((re,ce)=>re+ce+";",""):"",ne=(Ht?Ht+";"+he+";":he)+";"+(wt?wt.reduce((re,ce)=>re+";"+ce,""):"");bt=r.append("path").attr("d",vt).attr("id",`${c}-${e.id}`).attr("class"," "+pt+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",ne),kt=ne.match(/stroke:([^;]+)/)?.[1],at=e.animate===!0||!!e.animation||Ht.includes("animation");let _e=bt.node(),Ae=typeof _e.getTotalLength==="function"?_e.getTotalLength():0,xe=F0[e.arrowTypeStart]||0,Wt=F0[e.arrowTypeEnd]||0;if(e.look==="neo"&&!at){let ce=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?VS(Ae,xe,Wt):`0 ${xe} ${Ae-xe-Wt} ${Wt}`}; stroke-dashoffset: 0;`;bt.attr("style",ce+bt.attr("style"))}}if(bt.attr("data-edge",!0),bt.attr("data-et","edge"),bt.attr("data-id",e.id),bt.attr("data-points",j),bt.attr("data-look",tr(e.look)),e.showPoints)X.forEach((Ht)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Ht.x).attr("cy",Ht.y)});let xt="";if(l().flowchart.arrowMarkerAbsolute||l().state.arrowMarkerAbsolute)xt=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,xt=xt.replace(/\(/g,"\\(").replace(/\)/g,"\\)");a.info("arrowTypeStart",e.arrowTypeStart),a.info("arrowTypeEnd",e.arrowTypeEnd);let ot=!at&&e?.look==="neo";WS(bt,e,xt,c,s,ot,kt);let St=Math.floor(v.length/2),Lt=v[St];if(!M.isLabelCoordinateInPath(Lt,bt.attr("d")))q=!0;let Yt={};if(q)Yt.updatedPath=v;return Yt.originalPath=e.points,Yt},"insertEdge");function I0(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let n=0;n<s;n++){let c=r[n],h=r[n-1],g=r[n+1];if(n===0)i+=`M${c.x},${c.y}`;else if(n===s-1)i+=`L${c.x},${c.y}`;else{let y=c.x-h.x,f=c.y-h.y,B=g.x-c.x,v=g.y-c.y,q=Math.hypot(y,f),W=Math.hypot(B,v);if(q<o||W<o){i+=`L${c.x},${c.y}`;continue}let H=y/q,Y=f/q,j=B/W,X=v/W,Q=H*j+Y*X,rt=Math.max(-1,Math.min(1,Q)),it=Math.acos(rt);if(it<o||Math.abs(Math.PI-it)<o){i+=`L${c.x},${c.y}`;continue}let ct=Math.min(e/Math.sin(it/2),q/2,W/2),lt=c.x-H*ct,pt=c.y-Y*ct,bt=c.x+j*ct,vt=c.y+X*ct;i+=`L${lt},${pt}`,i+=`Q${c.x},${c.y} ${bt},${vt}`}}return i}t(I0,"generateRoundedPath");function ad(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(ad,"calculateDeltaAndAngle");function $0(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Ne[e.arrowTypeStart]){let o=Ne[e.arrowTypeStart],n=r[0],c=r[1],{angle:h}=ad(n,c),g=o*Math.cos(h),y=o*Math.sin(h);i[0].x=n.x+g,i[0].y=n.y+y}let s=r.length;if(s>=2&&Ne[e.arrowTypeEnd]){let o=Ne[e.arrowTypeEnd],n=r[s-1],c=r[s-2],{angle:h}=ad(c,n),g=o*Math.cos(h),y=o*Math.sin(h);i[s-1].x=n.x-g,i[s-1].y=n.y-y}return i}t($0,"applyMarkerOffsetsToPoints");var KS=t((r,e,i,s)=>{e.forEach((o)=>{bT[o](r,i,s)})},"insertMarkers"),ZS=t((r,e,i)=>{a.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"),QS=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"),JS=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"),tT=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"),eT=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"),rT=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"),iT=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"),oT=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"),sT=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"),aT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{transitionColor:n}=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",`${n}`)},"barbNeo"),nT=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"),lT=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"),hT=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"),cT=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"),uT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=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",`${n}`),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",`${n}`)},"only_one_neo"),fT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=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");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);let g=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");g.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),g.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),dT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=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",`${n}`),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",`${n}`)},"one_or_more_neo"),pT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=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");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);let g=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");g.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),g.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),gT=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
297
297
  L20,10
298
298
  M20,10
299
299
  L0,20`)},"requirement_arrow"),mT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=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",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
300
300
  L20,10
301
301
  M20,10
302
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),yT=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"),xT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o,c=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");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo"),CT=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"),bT={extension:ZS,composition:QS,aggregation:JS,dependency:tT,lollipop:eT,point:rT,circle:iT,cross:oT,barb:sT,barbNeo:aT,hierarchy:CT,only_one:nT,zero_or_one:lT,one_or_more:hT,zero_or_more:cT,only_one_neo:uT,zero_or_one_neo:fT,one_or_more_neo:dT,zero_or_more_neo:pT,requirement_arrow:gT,requirement_contains:yT,requirement_arrow_neo:mT,requirement_contains_neo:xT},Zn=KS;var kT={common:v,getConfig:x,insertCluster:tn,insertEdge:nn,insertEdgeLabel:At,insertMarkers:Zn,insertNode:Et,interpolateToCurve:Wl,labelHelper:P,log:a,positionEdgeLabel:Yn},wT=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],kn=Object.create(null),Hi=t((r)=>{for(let e of r)kn[e.name]=e},"registerLayoutLoaders"),ST=t(()=>{let r=t(async()=>await (_("r1rt48h9"),import("./chunk-r1rt48h9.js")),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...wT.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),TT=t(()=>{Hi([{name:"dagre",loader:t(async()=>await (_("433c80pc"),import("./chunk-433c80pc.js")),"loader")},{name:"swimlane",loader:t(async()=>await (_("dtg5yhhs"),import("./chunk-dtg5yhhs.js")),"loader")},{name:"cose-bilkent",loader:t(async()=>await (_("r4ffr96e"),import("./chunk-r4ffr96e.js")),"loader")},...ST()])},"registerDefaultLayoutLoaders");TT();var ye=t(async(r,e)=>{if(!Object.hasOwn(kn,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let n=o.domId||o.id;o.domId=`${r.diagramId}-${n}`}let i=kn[r.layoutAlgorithm],s=await i.loader();return Na(e,r.config),s.render(r,e,kT,{algorithm:i.algorithm})},"render"),nd="dagre",ve=t((r="",{fallback:e=nd}={})=>{if(Object.hasOwn(kn,r))return r;for(let i of[e,nd])if(Object.hasOwn(kn,i))return a.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${nd} is registered.`)},"getRegisteredLayoutAlgorithm");
303
- export{t,Qt,Ca,a,Ur,z,De,de,X,br,u,d,Re,Li,Ii,Tn,xr,Sa,no,oe,ke,Jt,D,Di,sn,ft,Ta,ro,ao,io,Ni,Mi,x,oo,jr,so,Ce,Fn,O,Pi,en,he,_r,wr,v,B,ht,Ea,lo,Aa,C,S,E,T,A,L,R,l,ln,En,kr,qr,Ra,p,An,Cr,Rn,zt,Oi,qe,Sr,co,cn,zn,Be,Tr,ae,$i,Ve,Ln,uo,La,Ut,Un,Fe,Er,Vr,jn,po,Bi,qn,mo,Wr,Ia,Da,Vn,Wn,V,et,tt,Na,Gr,k,Fi,In,nt,Gn,Dn,un,Ma,Ar,Rr,Lr,Ir,Pa,Oa,$a,Ba,Fa,za,Ua,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,dn,Dr,Hr,Qa,zi,fo,Ja,Ui,ji,Nn,Yr,He,Zr,ei,qi,We,U,M,ho,jt,ze,ti,ni,Vi,Le,Xr,pe,se,le,gt,Ye,Ze,m,P,I,w,Kr,Nr,Tt,Et,go,yo,yt,tn,vo,Ne,Hn,Me,bo,Wi,At,Gi,Yn,nn,Zn,Hi,ye,ve};
302
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),yT=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"),xT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o,c=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");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo"),CT=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"),bT={extension:ZS,composition:QS,aggregation:JS,dependency:tT,lollipop:eT,point:rT,circle:iT,cross:oT,barb:sT,barbNeo:aT,hierarchy:CT,only_one:nT,zero_or_one:lT,one_or_more:hT,zero_or_more:cT,only_one_neo:uT,zero_or_one_neo:fT,one_or_more_neo:dT,zero_or_more_neo:pT,requirement_arrow:gT,requirement_contains:yT,requirement_arrow_neo:mT,requirement_contains_neo:xT},Zn=KS;var kT={common:b,getConfig:x,insertCluster:en,insertEdge:tn,insertEdgeLabel:At,insertMarkers:Zn,insertNode:Et,interpolateToCurve:Wl,labelHelper:P,log:a,positionEdgeLabel:Yn},wT=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],kn=Object.create(null),eo=t((r)=>{for(let e of r)kn[e.name]=e},"registerLayoutLoaders"),ST=t(()=>{let r=t(async()=>await (_("wdq2tp9e"),import("./chunk-wdq2tp9e.js")),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...wT.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),TT=t(()=>{eo([{name:"dagre",loader:t(async()=>await (_("gv99c8zv"),import("./chunk-gv99c8zv.js")),"loader")},{name:"swimlane",loader:t(async()=>await (_("af9evdza"),import("./chunk-af9evdza.js")),"loader")},{name:"cose-bilkent",loader:t(async()=>await (_("ff1pmd3g"),import("./chunk-ff1pmd3g.js")),"loader")},...ST()])},"registerDefaultLayoutLoaders");TT();var ge=t(async(r,e)=>{if(!Object.hasOwn(kn,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let n=o.domId||o.id;o.domId=`${r.diagramId}-${n}`}let i=kn[r.layoutAlgorithm],s=await i.loader();return za(e,r.config),s.render(r,e,kT,{algorithm:i.algorithm})},"render"),nd="dagre",ye=t((r="",{fallback:e=nd}={})=>{if(Object.hasOwn(kn,r))return r;for(let i of[e,nd])if(Object.hasOwn(kn,i))return a.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${nd} is registered.`)},"getRegisteredLayoutAlgorithm");
303
+ export{t,Kt,Ia,a,Vr,z,De,de,K,br,u,d,Re,$i,Bi,Sn,xr,Da,co,oe,ke,Qt,N,Fi,on,ft,Na,uo,po,mo,zi,Ui,x,fo,Wr,ho,Ce,Fn,O,ji,Jt,fe,_r,wr,b,F,ht,Ma,go,Pa,C,S,E,T,A,L,R,l,sn,Tn,kr,Gr,Oa,p,En,Cr,An,zt,qi,qe,Sr,yo,ln,zn,Be,Tr,ae,Vi,Ve,Rn,vo,$a,Ut,Un,Fe,Er,Hr,jn,bo,Wi,qn,xo,Yr,Ba,Fa,Vn,Wn,V,et,tt,za,Zr,k,Gi,Ln,nt,Gn,In,cn,Ua,Ar,Rr,Lr,Ir,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,Qa,Ja,ei,ti,ni,ri,ai,un,Dr,Xr,ii,Hi,_o,oi,Yi,Zi,Dn,Kr,He,Qr,si,Xi,We,U,M,wo,jt,ze,li,ci,Ki,Le,Jr,pe,se,le,gt,Ye,Ze,m,P,I,w,ea,Nr,Tt,Et,ko,Co,yt,en,So,Ne,Hn,Me,To,Qi,At,Ji,Yn,tn,Zn,eo,ge,ye};