@elliemae/pui-app-sdk 5.40.3 → 5.40.4

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 (429) hide show
  1. package/demo/{6879.3434f1e9.iframe.bundle.js → 8201.6a8c0542.iframe.bundle.js} +449 -449
  2. package/demo/8201.6a8c0542.iframe.bundle.js.br +0 -0
  3. package/demo/8201.6a8c0542.iframe.bundle.js.gz +0 -0
  4. package/demo/docs/{6879.3434f1e9.iframe.bundle.js → 8201.6a8c0542.iframe.bundle.js} +449 -449
  5. package/demo/docs/8201.6a8c0542.iframe.bundle.js.br +0 -0
  6. package/demo/docs/8201.6a8c0542.iframe.bundle.js.gz +0 -0
  7. package/demo/docs/iframe.html +1 -1
  8. package/demo/docs/index.html +1 -1
  9. package/demo/docs/main.15fc50b1.iframe.bundle.js +5 -0
  10. package/demo/docs/main.15fc50b1.iframe.bundle.js.br +0 -0
  11. package/demo/docs/main.15fc50b1.iframe.bundle.js.gz +0 -0
  12. package/demo/docs/{main.f4b9fb997236ae69d894.manager.bundle.js → main.4b26e7c4efd9fa564d80.manager.bundle.js} +1 -1
  13. package/demo/docs/main.4b26e7c4efd9fa564d80.manager.bundle.js.br +0 -0
  14. package/demo/docs/{main.f4b9fb997236ae69d894.manager.bundle.js.gz → main.4b26e7c4efd9fa564d80.manager.bundle.js.gz} +0 -0
  15. package/demo/docs/project.json +1 -1
  16. package/demo/iframe.html +1 -1
  17. package/demo/index.html +1 -1
  18. package/demo/main.15fc50b1.iframe.bundle.js +5 -0
  19. package/demo/main.15fc50b1.iframe.bundle.js.br +0 -0
  20. package/demo/main.15fc50b1.iframe.bundle.js.gz +0 -0
  21. package/demo/{main.f4b9fb997236ae69d894.manager.bundle.js → main.4b26e7c4efd9fa564d80.manager.bundle.js} +1 -1
  22. package/demo/main.4b26e7c4efd9fa564d80.manager.bundle.js.br +0 -0
  23. package/demo/{main.f4b9fb997236ae69d894.manager.bundle.js.gz → main.4b26e7c4efd9fa564d80.manager.bundle.js.gz} +0 -0
  24. package/demo/project.json +1 -1
  25. package/dist/cjs/utils/micro-frontend/guest.js +4 -3
  26. package/dist/cjs/utils/micro-frontend/host.js +4 -3
  27. package/dist/cjs/utils/micro-frontend/index.js +4 -1
  28. package/dist/cjs/view/guest-microapp.js +14 -4
  29. package/dist/cjs/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +2 -2
  30. package/dist/esm/utils/micro-frontend/guest.js +4 -3
  31. package/dist/esm/utils/micro-frontend/host.js +4 -3
  32. package/dist/esm/utils/micro-frontend/index.js +4 -1
  33. package/dist/esm/view/guest-microapp.js +14 -4
  34. package/dist/esm/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +2 -2
  35. package/dist/types/lib/utils/micro-frontend/guest.d.ts +2 -1
  36. package/dist/types/lib/utils/micro-frontend/host.d.ts +2 -1
  37. package/dist/types/lib/utils/micro-frontend/module-so.d.ts +4 -4
  38. package/dist/types/lib/view/guest-microapp.d.ts +8 -1
  39. package/dist/types/tsconfig.tsbuildinfo +1 -1
  40. package/package.json +6 -6
  41. package/build/docs/404.html +0 -16
  42. package/build/docs/api/classes/Analytics/index.html +0 -270
  43. package/build/docs/api/classes/CMicroAppGuest/index.html +0 -261
  44. package/build/docs/api/classes/CMicroAppHost/index.html +0 -346
  45. package/build/docs/api/classes/ErrorBoundary/index.html +0 -354
  46. package/build/docs/api/classes/GuestModule/index.html +0 -148
  47. package/build/docs/api/functions/AppRoot/index.html +0 -27
  48. package/build/docs/api/functions/Autocomplete/index.html +0 -22
  49. package/build/docs/api/functions/CheckBox/index.html +0 -22
  50. package/build/docs/api/functions/ComboBox/index.html +0 -27
  51. package/build/docs/api/functions/ComboBoxV3/index.html +0 -22
  52. package/build/docs/api/functions/ConnectForm/index.html +0 -22
  53. package/build/docs/api/functions/DateInput/index.html +0 -22
  54. package/build/docs/api/functions/DatePicker/index.html +0 -27
  55. package/build/docs/api/functions/DateRangePicker/index.html +0 -22
  56. package/build/docs/api/functions/DateTimePicker/index.html +0 -22
  57. package/build/docs/api/functions/Form/index.html +0 -34
  58. package/build/docs/api/functions/FormItemLayout/index.html +0 -22
  59. package/build/docs/api/functions/FormLayoutBlockItem/index.html +0 -22
  60. package/build/docs/api/functions/FormSubmitButton/index.html +0 -22
  61. package/build/docs/api/functions/InputMask/index.html +0 -22
  62. package/build/docs/api/functions/InputText/index.html +0 -22
  63. package/build/docs/api/functions/LargeTextBox/index.html +0 -22
  64. package/build/docs/api/functions/MaskedInputText/index.html +0 -22
  65. package/build/docs/api/functions/Page/index.html +0 -22
  66. package/build/docs/api/functions/Radio/index.html +0 -22
  67. package/build/docs/api/functions/RadioGroup/index.html +0 -22
  68. package/build/docs/api/functions/RegisterService/index.html +0 -27
  69. package/build/docs/api/functions/RenderWithStateAddOns/index.html +0 -22
  70. package/build/docs/api/functions/RequireAuth/index.html +0 -28
  71. package/build/docs/api/functions/SessionTimeout/index.html +0 -19
  72. package/build/docs/api/functions/TextBox/index.html +0 -27
  73. package/build/docs/api/functions/Toggle/index.html +0 -22
  74. package/build/docs/api/functions/authSaga/index.html +0 -19
  75. package/build/docs/api/functions/authorize/index.html +0 -44
  76. package/build/docs/api/functions/buildModuleParams/index.html +0 -31
  77. package/build/docs/api/functions/cleanup/index.html +0 -20
  78. package/build/docs/api/functions/configureStore/index.html +0 -56
  79. package/build/docs/api/functions/createGuestModule/index.html +0 -39
  80. package/build/docs/api/functions/createManager/index.html +0 -41
  81. package/build/docs/api/functions/enableReactAppForHostIntegration/index.html +0 -22
  82. package/build/docs/api/functions/fetchHostAppData/index.html +0 -24
  83. package/build/docs/api/functions/fetchUserSettings/index.html +0 -22
  84. package/build/docs/api/functions/getApiActionCreator/index.html +0 -30
  85. package/build/docs/api/functions/getAppConfig/index.html +0 -19
  86. package/build/docs/api/functions/getAppConfigValue/index.html +0 -35
  87. package/build/docs/api/functions/getAuthHTTPClient/index.html +0 -38
  88. package/build/docs/api/functions/getAuthorizationHeader/index.html +0 -23
  89. package/build/docs/api/functions/getHTTPClient/index.html +0 -36
  90. package/build/docs/api/functions/getHostAppDataByKey/index.html +0 -27
  91. package/build/docs/api/functions/getLogger/index.html +0 -19
  92. package/build/docs/api/functions/getMicroFrontEndAppConfig/index.html +0 -23
  93. package/build/docs/api/functions/getNavigationLinks/index.html +0 -19
  94. package/build/docs/api/functions/getRedirectUrl/index.html +0 -19
  95. package/build/docs/api/functions/getSelectField/index.html +0 -33
  96. package/build/docs/api/functions/getStore/index.html +0 -23
  97. package/build/docs/api/functions/initServiceWorker/index.html +0 -22
  98. package/build/docs/api/functions/isCIBuild/index.html +0 -19
  99. package/build/docs/api/functions/isProd/index.html +0 -19
  100. package/build/docs/api/functions/isUserAuthorized/index.html +0 -23
  101. package/build/docs/api/functions/listenStorageEvents/index.html +0 -19
  102. package/build/docs/api/functions/loadAppConfig/index.html +0 -30
  103. package/build/docs/api/functions/loadable/index.html +0 -37
  104. package/build/docs/api/functions/login/index.html +0 -62
  105. package/build/docs/api/functions/notifyGuestUnloadComplete/index.html +0 -26
  106. package/build/docs/api/functions/onAuthorizationFailure/index.html +0 -28
  107. package/build/docs/api/functions/onGuestUnloadStart/index.html +0 -19
  108. package/build/docs/api/functions/redactPii/index.html +0 -32
  109. package/build/docs/api/functions/removeDoubleSlash/index.html +0 -22
  110. package/build/docs/api/functions/removeStorageEvents/index.html +0 -19
  111. package/build/docs/api/functions/render/index.html +0 -392
  112. package/build/docs/api/functions/renderHook/index.html +0 -37
  113. package/build/docs/api/functions/renderWithHostData/index.html +0 -22
  114. package/build/docs/api/functions/renderWithRedux/index.html +0 -392
  115. package/build/docs/api/functions/renderWithRouter/index.html +0 -392
  116. package/build/docs/api/functions/renderWithRouterRedux/index.html +0 -392
  117. package/build/docs/api/functions/sdkBaseQuery/index.html +0 -37
  118. package/build/docs/api/functions/sendBAEvent/index.html +0 -34
  119. package/build/docs/api/functions/sendMessageToHost/index.html +0 -24
  120. package/build/docs/api/functions/setAppConfig/index.html +0 -27
  121. package/build/docs/api/functions/setAppConfigValue/index.html +0 -35
  122. package/build/docs/api/functions/setHostAppData/index.html +0 -25
  123. package/build/docs/api/functions/setLoginParams/index.html +0 -29
  124. package/build/docs/api/functions/subscribeToResetSession/index.html +0 -28
  125. package/build/docs/api/functions/subscribeToSessionExpiry/index.html +0 -28
  126. package/build/docs/api/functions/subscribeToSessionExpiryWarning/index.html +0 -28
  127. package/build/docs/api/functions/trackActivity/index.html +0 -31
  128. package/build/docs/api/functions/useAppDispatch/index.html +0 -24
  129. package/build/docs/api/functions/useAppMiddleware/index.html +0 -25
  130. package/build/docs/api/functions/useInjectQuery/index.html +0 -35
  131. package/build/docs/api/functions/useInjectReducer/index.html +0 -31
  132. package/build/docs/api/functions/useInjectSaga/index.html +0 -33
  133. package/build/docs/api/functions/useInjectSideEffect/index.html +0 -25
  134. package/build/docs/api/functions/useMediaQueryList/index.html +0 -26
  135. package/build/docs/api/functions/useStateSelector/index.html +0 -38
  136. package/build/docs/api/functions/useStateSelectorShallow/index.html +0 -39
  137. package/build/docs/api/functions/waitFor/index.html +0 -27
  138. package/build/docs/api/functions/waitForElementToBeRemoved/index.html +0 -27
  139. package/build/docs/api/functions/withAppDecorator/index.html +0 -26
  140. package/build/docs/api/index.html +0 -29
  141. package/build/docs/api/interfaces/AppConfig/index.html +0 -46
  142. package/build/docs/api/interfaces/GuestProps/index.html +0 -86
  143. package/build/docs/api/interfaces/UseStateSelectorOptions/index.html +0 -25
  144. package/build/docs/api/type-aliases/AppDispatch/index.html +0 -17
  145. package/build/docs/api/type-aliases/AppStore/index.html +0 -17
  146. package/build/docs/api/type-aliases/Await/index.html +0 -20
  147. package/build/docs/api/type-aliases/EMUI/index.html +0 -62
  148. package/build/docs/api/type-aliases/HostOptions/index.html +0 -28
  149. package/build/docs/api/type-aliases/HostProvidedParams/index.html +0 -33
  150. package/build/docs/api/type-aliases/ModuleOverrides/index.html +0 -47
  151. package/build/docs/api/type-aliases/OnHostInitCallback/index.html +0 -22
  152. package/build/docs/api/type-aliases/OnInitCallback/index.html +0 -22
  153. package/build/docs/api/type-aliases/OnMountCallback/index.html +0 -22
  154. package/build/docs/api/type-aliases/OnUnMountCallback/index.html +0 -22
  155. package/build/docs/api/type-aliases/RootState/index.html +0 -17
  156. package/build/docs/api/type-aliases/SelectStateFieldFunction/index.html +0 -29
  157. package/build/docs/api/variables/ErrorToast/index.html +0 -17
  158. package/build/docs/api/variables/FormPropsContext/index.html +0 -24
  159. package/build/docs/api/variables/GuestMicroApp/index.html +0 -20
  160. package/build/docs/api/variables/MASK_PIPES/index.html +0 -17
  161. package/build/docs/api/variables/MASK_TYPES/index.html +0 -17
  162. package/build/docs/api/variables/MicroApp/index.html +0 -21
  163. package/build/docs/api/variables/MicroIFrameApp/index.html +0 -21
  164. package/build/docs/api/variables/NavigationPrompt/index.html +0 -17
  165. package/build/docs/api/variables/NavigationPromptActions/index.html +0 -22
  166. package/build/docs/api/variables/Themes/index.html +0 -22
  167. package/build/docs/api/variables/VisuallyHidden/index.html +0 -17
  168. package/build/docs/api/variables/WaitMessage/index.html +0 -17
  169. package/build/docs/api/variables/act/index.html +0 -20
  170. package/build/docs/api/variables/ariaLive/index.html +0 -17
  171. package/build/docs/api/variables/auth/index.html +0 -40
  172. package/build/docs/api/variables/authReducer/index.html +0 -17
  173. package/build/docs/api/variables/clearSideEffects/index.html +0 -21
  174. package/build/docs/api/variables/createSideEffect/index.html +0 -19
  175. package/build/docs/api/variables/decorators/index.html +0 -222
  176. package/build/docs/api/variables/endSession/index.html +0 -37
  177. package/build/docs/api/variables/error/index.html +0 -17
  178. package/build/docs/api/variables/errorMiddleware/index.html +0 -17
  179. package/build/docs/api/variables/fireEvent/index.html +0 -17
  180. package/build/docs/api/variables/globalConstants/index.html +0 -22
  181. package/build/docs/api/variables/history/index.html +0 -17
  182. package/build/docs/api/variables/httpClientProps/index.html +0 -17
  183. package/build/docs/api/variables/logout/index.html +0 -22
  184. package/build/docs/api/variables/memoryHistory/index.html +0 -17
  185. package/build/docs/api/variables/removeSideEffect/index.html +0 -20
  186. package/build/docs/api/variables/resetUserIdleTime/index.html +0 -23
  187. package/build/docs/api/variables/screen/index.html +0 -17
  188. package/build/docs/api/variables/startSideEffect/index.html +0 -21
  189. package/build/docs/api/variables/updateBAEventParameters/index.html +0 -27
  190. package/build/docs/api/variables/useAppSelector/index.html +0 -21
  191. package/build/docs/api/variables/waitMessageAction/index.html +0 -43
  192. package/build/docs/api/variables/within/index.html +0 -17
  193. package/build/docs/assets/css/styles.0fad824b.css +0 -1
  194. package/build/docs/assets/js/04ee7372.a9b3e0ad.js +0 -1
  195. package/build/docs/assets/js/05fd5745.f77a9872.js +0 -1
  196. package/build/docs/assets/js/075aa584.dde55d25.js +0 -1
  197. package/build/docs/assets/js/0a1bd0e5.3336afb7.js +0 -1
  198. package/build/docs/assets/js/0f302db7.690bba2c.js +0 -1
  199. package/build/docs/assets/js/10c70e6f.3a611c9f.js +0 -1
  200. package/build/docs/assets/js/110b6cba.2039a4be.js +0 -1
  201. package/build/docs/assets/js/1126.2b1e83b8.js +0 -1
  202. package/build/docs/assets/js/1127.ce24a599.js +0 -1
  203. package/build/docs/assets/js/1154937a.58ab70e0.js +0 -1
  204. package/build/docs/assets/js/1298.f98e394e.js +0 -1
  205. package/build/docs/assets/js/14efea89.c724a605.js +0 -1
  206. package/build/docs/assets/js/15f40f8f.62fbc501.js +0 -1
  207. package/build/docs/assets/js/1617.443ab77e.js +0 -1
  208. package/build/docs/assets/js/16427680.5a41da14.js +0 -1
  209. package/build/docs/assets/js/16fba083.0c978e4b.js +0 -1
  210. package/build/docs/assets/js/1700.bb38b1b9.js +0 -1
  211. package/build/docs/assets/js/17896441.87af09c7.js +0 -1
  212. package/build/docs/assets/js/1a5ba401.bdd09a56.js +0 -1
  213. package/build/docs/assets/js/1ad86f56.5c4d3ed7.js +0 -1
  214. package/build/docs/assets/js/1cc7c915.18a50af2.js +0 -1
  215. package/build/docs/assets/js/1dfec420.e8ed9238.js +0 -1
  216. package/build/docs/assets/js/1fcf59a8.501bb96b.js +0 -1
  217. package/build/docs/assets/js/2026.f4b8efbd.js +0 -1
  218. package/build/docs/assets/js/213.07804718.js +0 -1
  219. package/build/docs/assets/js/2297.998393a9.js +0 -1
  220. package/build/docs/assets/js/22c6ac39.38c10213.js +0 -1
  221. package/build/docs/assets/js/242.98ba961c.js +0 -1
  222. package/build/docs/assets/js/247.f91b8960.js +0 -1
  223. package/build/docs/assets/js/24b1c163.4390b04b.js +0 -1
  224. package/build/docs/assets/js/25ae0bf1.3ff15c6f.js +0 -1
  225. package/build/docs/assets/js/2673.1111af38.js +0 -1
  226. package/build/docs/assets/js/27c4a013.bceaff37.js +0 -1
  227. package/build/docs/assets/js/27c8b774.1ec1881a.js +0 -1
  228. package/build/docs/assets/js/2805.21b4fb8d.js +0 -1
  229. package/build/docs/assets/js/2b2c5b3b.41587ade.js +0 -1
  230. package/build/docs/assets/js/3072782a.825cd627.js +0 -1
  231. package/build/docs/assets/js/3204d46b.7af2b3bd.js +0 -1
  232. package/build/docs/assets/js/322ec2e7.529db700.js +0 -1
  233. package/build/docs/assets/js/336f5910.34c060aa.js +0 -1
  234. package/build/docs/assets/js/3395.f8117aa5.js +0 -1
  235. package/build/docs/assets/js/3499.2c20c6ff.js +0 -1
  236. package/build/docs/assets/js/3552.2d0559a3.js +0 -1
  237. package/build/docs/assets/js/365a2c17.6afbd7ba.js +0 -1
  238. package/build/docs/assets/js/379bbc32.cfc06360.js +0 -1
  239. package/build/docs/assets/js/3992.aa5529d1.js +0 -2
  240. package/build/docs/assets/js/3992.aa5529d1.js.LICENSE.txt +0 -1
  241. package/build/docs/assets/js/3accd241.850fb650.js +0 -1
  242. package/build/docs/assets/js/3b0e1261.9caf419d.js +0 -1
  243. package/build/docs/assets/js/3b333d5b.831324f6.js +0 -1
  244. package/build/docs/assets/js/3cb0b0a9.99866080.js +0 -1
  245. package/build/docs/assets/js/3cd01694.04367956.js +0 -1
  246. package/build/docs/assets/js/4069.77c5dcc9.js +0 -1
  247. package/build/docs/assets/js/4134.d6069e6e.js +0 -1
  248. package/build/docs/assets/js/413bfdf1.2e754bf4.js +0 -1
  249. package/build/docs/assets/js/41f4ce7f.8662231d.js +0 -1
  250. package/build/docs/assets/js/4257.60660403.js +0 -1
  251. package/build/docs/assets/js/46eb403d.e5123d24.js +0 -1
  252. package/build/docs/assets/js/4772.988b91f1.js +0 -1
  253. package/build/docs/assets/js/4780.8d49dc64.js +0 -1
  254. package/build/docs/assets/js/47f7a134.2369c86a.js +0 -1
  255. package/build/docs/assets/js/4884.48d16d5b.js +0 -1
  256. package/build/docs/assets/js/4acce17e.b84485e3.js +0 -1
  257. package/build/docs/assets/js/4b10ac31.ffdbb394.js +0 -1
  258. package/build/docs/assets/js/4eef183e.99934dfe.js +0 -1
  259. package/build/docs/assets/js/50ae2c89.ea85453c.js +0 -1
  260. package/build/docs/assets/js/50b500dc.b1dafbf4.js +0 -1
  261. package/build/docs/assets/js/5113883b.19fc9d2f.js +0 -1
  262. package/build/docs/assets/js/5196.dda420ed.js +0 -1
  263. package/build/docs/assets/js/51cd08ce.eedf6a77.js +0 -1
  264. package/build/docs/assets/js/5248.5442863c.js +0 -1
  265. package/build/docs/assets/js/533e434c.6a22f28d.js +0 -1
  266. package/build/docs/assets/js/53defe29.b34f5bfe.js +0 -1
  267. package/build/docs/assets/js/5428.28b1d8b6.js +0 -1
  268. package/build/docs/assets/js/54dea6f0.7b5fa5e6.js +0 -1
  269. package/build/docs/assets/js/550f7dc1.a569914a.js +0 -1
  270. package/build/docs/assets/js/5575829c.04c44eb2.js +0 -1
  271. package/build/docs/assets/js/58e12487.6e6066d3.js +0 -1
  272. package/build/docs/assets/js/59169cbb.2d2d02ce.js +0 -1
  273. package/build/docs/assets/js/5964.fbd55ce8.js +0 -1
  274. package/build/docs/assets/js/5968.7a565a4e.js +0 -1
  275. package/build/docs/assets/js/5c5cf8ae.cf6912f5.js +0 -1
  276. package/build/docs/assets/js/5ca2639d.8b06c9ea.js +0 -1
  277. package/build/docs/assets/js/5da011d0.872006f0.js +0 -1
  278. package/build/docs/assets/js/5e13701d.8a6b7fd6.js +0 -1
  279. package/build/docs/assets/js/5e7ee35c.01ca7414.js +0 -1
  280. package/build/docs/assets/js/5e8c322a.0391dec4.js +0 -1
  281. package/build/docs/assets/js/5e95c892.f11d5bd6.js +0 -1
  282. package/build/docs/assets/js/5ebc190f.49776b06.js +0 -1
  283. package/build/docs/assets/js/5f21eb71.536ccef3.js +0 -1
  284. package/build/docs/assets/js/60781fed.87f57230.js +0 -1
  285. package/build/docs/assets/js/61b0e64b.c86eca9e.js +0 -1
  286. package/build/docs/assets/js/61f3b5cc.197d138c.js +0 -1
  287. package/build/docs/assets/js/62e1e335.d54d1d6e.js +0 -1
  288. package/build/docs/assets/js/6486.776625d1.js +0 -1
  289. package/build/docs/assets/js/6611.481d87ff.js +0 -2
  290. package/build/docs/assets/js/6611.481d87ff.js.LICENSE.txt +0 -9
  291. package/build/docs/assets/js/6aac2d5c.95d7104d.js +0 -1
  292. package/build/docs/assets/js/6b345055.f4f6c3b9.js +0 -1
  293. package/build/docs/assets/js/6b7fcc15.290796d9.js +0 -1
  294. package/build/docs/assets/js/6ca90961.8833c635.js +0 -1
  295. package/build/docs/assets/js/6d1f0509.55213557.js +0 -1
  296. package/build/docs/assets/js/6daa33e8.c1c74588.js +0 -1
  297. package/build/docs/assets/js/7080.73a89c35.js +0 -1
  298. package/build/docs/assets/js/7201.26026979.js +0 -1
  299. package/build/docs/assets/js/7344.12628cac.js +0 -1
  300. package/build/docs/assets/js/749b3cb7.660b1c4b.js +0 -1
  301. package/build/docs/assets/js/7516.78c3385c.js +0 -1
  302. package/build/docs/assets/js/7525.69d857f8.js +0 -1
  303. package/build/docs/assets/js/7540.ee4aa270.js +0 -1
  304. package/build/docs/assets/js/78fde597.9598cb2a.js +0 -1
  305. package/build/docs/assets/js/7985.6aac4971.js +0 -1
  306. package/build/docs/assets/js/7b224b5a.d21317ac.js +0 -1
  307. package/build/docs/assets/js/7c822e85.3cc0a954.js +0 -1
  308. package/build/docs/assets/js/7cde3459.802fae28.js +0 -1
  309. package/build/docs/assets/js/7d256524.087a46e5.js +0 -1
  310. package/build/docs/assets/js/7d48b3e7.5d6ce912.js +0 -1
  311. package/build/docs/assets/js/80392bdc.dbd30f9e.js +0 -1
  312. package/build/docs/assets/js/8049.5b4457b0.js +0 -1
  313. package/build/docs/assets/js/805daf1e.305437dc.js +0 -1
  314. package/build/docs/assets/js/8152.32ad98ca.js +0 -1
  315. package/build/docs/assets/js/821.19f6a696.js +0 -1
  316. package/build/docs/assets/js/822e0178.3c0d623a.js +0 -1
  317. package/build/docs/assets/js/82894961.81f97aaf.js +0 -1
  318. package/build/docs/assets/js/8290.f0834113.js +0 -1
  319. package/build/docs/assets/js/8355.bcde11e0.js +0 -1
  320. package/build/docs/assets/js/8389.b3f6164d.js +0 -1
  321. package/build/docs/assets/js/8585.e50595e8.js +0 -1
  322. package/build/docs/assets/js/85dc4c9b.d835c54a.js +0 -1
  323. package/build/docs/assets/js/8788.c86aea45.js +0 -1
  324. package/build/docs/assets/js/88a4c043.ca8fd05b.js +0 -1
  325. package/build/docs/assets/js/90579cbd.0835e6a5.js +0 -1
  326. package/build/docs/assets/js/90bbfd1d.d0fd53f0.js +0 -1
  327. package/build/docs/assets/js/9178.f2e05b02.js +0 -1
  328. package/build/docs/assets/js/9210.b5a9980e.js +0 -1
  329. package/build/docs/assets/js/9354.77e86f51.js +0 -1
  330. package/build/docs/assets/js/936.275fbed5.js +0 -1
  331. package/build/docs/assets/js/9550cc1f.e19e7779.js +0 -1
  332. package/build/docs/assets/js/9574.c7203040.js +0 -1
  333. package/build/docs/assets/js/97.d2ed6ba9.js +0 -1
  334. package/build/docs/assets/js/9852.cf8f89a9.js +0 -1
  335. package/build/docs/assets/js/9953.90bfd954.js +0 -1
  336. package/build/docs/assets/js/999f4a99.31e9f0f9.js +0 -1
  337. package/build/docs/assets/js/99a35e8f.3cb224e6.js +0 -1
  338. package/build/docs/assets/js/9ab62f73.a44012b0.js +0 -1
  339. package/build/docs/assets/js/9ea6fe4d.ebd612bc.js +0 -1
  340. package/build/docs/assets/js/a09470d9.16bfeef9.js +0 -1
  341. package/build/docs/assets/js/a0eb976e.f6504d94.js +0 -1
  342. package/build/docs/assets/js/a17fb045.0c651699.js +0 -1
  343. package/build/docs/assets/js/a2537f00.c241e3f2.js +0 -1
  344. package/build/docs/assets/js/a29a6e44.58d6b878.js +0 -1
  345. package/build/docs/assets/js/a3ecf861.0f55d8fd.js +0 -1
  346. package/build/docs/assets/js/a48fd09c.50989621.js +0 -1
  347. package/build/docs/assets/js/a6c41565.0821af7d.js +0 -1
  348. package/build/docs/assets/js/a6c5c03c.0e69962a.js +0 -1
  349. package/build/docs/assets/js/a769954d.02ea4cc3.js +0 -1
  350. package/build/docs/assets/js/a7861986.e4d90417.js +0 -1
  351. package/build/docs/assets/js/a7bd4aaa.3faf623f.js +0 -1
  352. package/build/docs/assets/js/a8687130.681fc6b9.js +0 -1
  353. package/build/docs/assets/js/a94703ab.9865def5.js +0 -1
  354. package/build/docs/assets/js/a9ba6591.bcdf3f9d.js +0 -1
  355. package/build/docs/assets/js/ab05b3aa.63cf7d9f.js +0 -1
  356. package/build/docs/assets/js/aba21aa0.4d968e31.js +0 -1
  357. package/build/docs/assets/js/ac9d64ec.dd98824b.js +0 -1
  358. package/build/docs/assets/js/aeb9810c.f3c24439.js +0 -1
  359. package/build/docs/assets/js/b0125fa2.c7fba4da.js +0 -1
  360. package/build/docs/assets/js/b0ccf0d8.89a4a7e2.js +0 -1
  361. package/build/docs/assets/js/b1474780.0982f737.js +0 -1
  362. package/build/docs/assets/js/b2a255cc.df3fdd56.js +0 -1
  363. package/build/docs/assets/js/b31a5f55.9a4737ac.js +0 -1
  364. package/build/docs/assets/js/b4285021.67b039a1.js +0 -1
  365. package/build/docs/assets/js/b784b5bb.7d7bb82c.js +0 -1
  366. package/build/docs/assets/js/b8c1226b.a92653b3.js +0 -1
  367. package/build/docs/assets/js/b93b454c.f87b4896.js +0 -1
  368. package/build/docs/assets/js/bc717899.36b37795.js +0 -1
  369. package/build/docs/assets/js/bf1a96cc.8abf8470.js +0 -1
  370. package/build/docs/assets/js/c10ec81d.0dff1cac.js +0 -1
  371. package/build/docs/assets/js/c254daed.d6764cd8.js +0 -1
  372. package/build/docs/assets/js/c377a04b.a6a0a334.js +0 -1
  373. package/build/docs/assets/js/c52b5473.1a1069c1.js +0 -1
  374. package/build/docs/assets/js/c5e9787b.448cc7d9.js +0 -1
  375. package/build/docs/assets/js/c7710052.d061cfdd.js +0 -1
  376. package/build/docs/assets/js/c8a9fc86.daf30d50.js +0 -1
  377. package/build/docs/assets/js/c90572d4.42231642.js +0 -1
  378. package/build/docs/assets/js/cfad4bb4.edde6aa3.js +0 -1
  379. package/build/docs/assets/js/d071c513.a096e87e.js +0 -1
  380. package/build/docs/assets/js/d0fd4a71.1d53f49d.js +0 -1
  381. package/build/docs/assets/js/d1d7a857.424e14dc.js +0 -1
  382. package/build/docs/assets/js/d38c25bf.1430a667.js +0 -1
  383. package/build/docs/assets/js/d3d37933.d7f15fe8.js +0 -1
  384. package/build/docs/assets/js/d71e6c8a.f4306e16.js +0 -1
  385. package/build/docs/assets/js/d9084ecb.61eb0649.js +0 -1
  386. package/build/docs/assets/js/de3ee31a.0992aa16.js +0 -1
  387. package/build/docs/assets/js/e0db4c79.6fcade57.js +0 -1
  388. package/build/docs/assets/js/e4ad89b2.9ca87caa.js +0 -1
  389. package/build/docs/assets/js/e876cff6.7c7560ed.js +0 -1
  390. package/build/docs/assets/js/e917d7c9.b54a542b.js +0 -1
  391. package/build/docs/assets/js/e9f568e8.b96fc01f.js +0 -1
  392. package/build/docs/assets/js/ea5986e4.ff0e5037.js +0 -1
  393. package/build/docs/assets/js/eb84a108.be29052f.js +0 -1
  394. package/build/docs/assets/js/ed6a4585.c5d8bf90.js +0 -1
  395. package/build/docs/assets/js/f4180cff.dae060fd.js +0 -1
  396. package/build/docs/assets/js/f7084923.91b0c545.js +0 -1
  397. package/build/docs/assets/js/f72a372a.4118877c.js +0 -1
  398. package/build/docs/assets/js/f72c86d0.d74270de.js +0 -1
  399. package/build/docs/assets/js/f8fa0321.c4c3a620.js +0 -1
  400. package/build/docs/assets/js/fc7c782f.bc0ad1ab.js +0 -1
  401. package/build/docs/assets/js/fce396bf.9f7f818c.js +0 -1
  402. package/build/docs/assets/js/fdb0d9e1.d2893206.js +0 -1
  403. package/build/docs/assets/js/fed4ae4f.e788c07f.js +0 -1
  404. package/build/docs/assets/js/fefe9566.113c5960.js +0 -1
  405. package/build/docs/assets/js/ff0bf96e.e457283e.js +0 -1
  406. package/build/docs/assets/js/ff6d65a9.39317a08.js +0 -1
  407. package/build/docs/assets/js/main.7d445fc8.js +0 -2
  408. package/build/docs/assets/js/main.7d445fc8.js.LICENSE.txt +0 -51
  409. package/build/docs/assets/js/runtime~main.5c8a1e20.js +0 -1
  410. package/build/docs/img/favicon.ico +0 -0
  411. package/build/docs/img/logo.jpeg +0 -0
  412. package/build/docs/img/logo.svg +0 -22
  413. package/build/docs/img/readme.md +0 -1
  414. package/build/docs/index.html +0 -102
  415. package/build/docs/readme.md +0 -1
  416. package/build/docs/sitemap.xml +0 -1
  417. package/build/docs/usage-guide/index.html +0 -580
  418. package/demo/6879.3434f1e9.iframe.bundle.js.br +0 -0
  419. package/demo/6879.3434f1e9.iframe.bundle.js.gz +0 -0
  420. package/demo/docs/6879.3434f1e9.iframe.bundle.js.br +0 -0
  421. package/demo/docs/6879.3434f1e9.iframe.bundle.js.gz +0 -0
  422. package/demo/docs/main.703b0e4c.iframe.bundle.js +0 -5
  423. package/demo/docs/main.703b0e4c.iframe.bundle.js.br +0 -0
  424. package/demo/docs/main.703b0e4c.iframe.bundle.js.gz +0 -0
  425. package/demo/docs/main.f4b9fb997236ae69d894.manager.bundle.js.br +0 -0
  426. package/demo/main.703b0e4c.iframe.bundle.js +0 -5
  427. package/demo/main.703b0e4c.iframe.bundle.js.br +0 -0
  428. package/demo/main.703b0e4c.iframe.bundle.js.gz +0 -0
  429. package/demo/main.f4b9fb997236ae69d894.manager.bundle.js.br +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 3992.aa5529d1.js.LICENSE.txt */
2
- (globalThis.webpackChunk_elliemae_pui_app_sdk=globalThis.webpackChunk_elliemae_pui_app_sdk||[]).push([[3992],{4371(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},4674(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=n(t.trim());do{e=(r=n(r=o(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=r;if(!a)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var s=a.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return a;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var i=r(4371);function o(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function n(t){try{return decodeURIComponent(t)}catch(e){return t}}},527(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",n="minute",a="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},C={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,h),n=r-o<0,a=e.clone().add(i+(n?-1:1),h);return+(-(i+(r-o)/(n?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:s,D:u,h:a,m:n,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},x="en",b={};b[x]=y;var k="$isDayjsObject",w=function(t){return t instanceof v||!(!t||!t[k])},T=function t(e,r,i){var o;if(!e)return x;if("string"==typeof e){var n=e.toLowerCase();b[n]&&(o=n),r&&(b[n]=r,o=n);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var s=e.name;b[s]=e,o=s}return!i&&o&&(x=o),o||!i&&x},S=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new v(r)},B=C;B.l=T,B.i=w,B.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var v=function(){function y(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(B.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return B},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=S(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return S(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<S(t)},m.$g=function(t,e,r){return B.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!B.u(e)||e,c=B.p(t),p=function(t,e){var o=B.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?o:o.endOf(s)},g=function(t,e){return B.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,C="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var x=this.$locale().weekStart||0,b=(f<x?f+7:f)-x;return p(i?m-b:m+(6-b),y);case s:case u:return g(C+"Hours",0);case a:return g(C+"Minutes",1);case n:return g(C+"Seconds",2);case o:return g(C+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=B.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[s]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[a]=c+"Hours",r[n]=c+"Minutes",r[o]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===s?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[B.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=B.p(c),f=function(t){var e=S(p);return B.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return f(1);if(g===l)return f(7);var y=(u={},u[n]=e,u[a]=r,u[o]=t,u)[g]||1,m=this.$d.getTime()+i*y;return B.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=B.z(this),n=this.$H,a=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,o,n){return t&&(t[r]||t(e,i))||o[r].slice(0,n)},u=function(t){return B.s(n%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return B.s(e.$y,4,"0");case"M":return s+1;case"MM":return B.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,h,3);case"MMMM":return d(h,s);case"D":return e.$D;case"DD":return B.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return B.s(n,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(n,a,!0);case"A":return g(n,a,!1);case"m":return String(a);case"mm":return B.s(a,2,"0");case"s":return String(e.$s);case"ss":return B.s(e.$s,2,"0");case"SSS":return B.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=B.p(u),m=S(i),C=(m.utcOffset()-this.utcOffset())*e,x=this-m,b=function(){return B.m(f,m)};switch(y){case d:g=b()/12;break;case h:g=b();break;case c:g=b()/3;break;case l:g=(x-C)/6048e5;break;case s:g=(x-C)/864e5;break;case a:g=x/r;break;case n:g=x/e;break;case o:g=x/t;break;default:g=x}return p?g:B.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return b[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=T(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return B.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=v.prototype;return S.prototype=_,[["$ms",i],["$s",o],["$m",n],["$H",a],["$W",s],["$M",h],["$y",d],["$D",u]].forEach(function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),S.extend=function(t,e){return t.$i||(t(e,v,S),t.$i=!0),S},S.locale=T,S.isDayjs=w,S.unix=function(t){return S(1e3*t)},S.en=b[x],S.Ls=b,S.p={},S}()},726(t,e,r){"use strict";function i(t,e,r){if(t&&t.length){const[i,o]=e,n=Math.PI/180*r,a=Math.cos(n),s=Math.sin(n);for(const e of t){const[t,r]=e;e[0]=(t-i)*a-(r-o)*s+i,e[1]=(t-i)*s+(r-o)*a+o}}}function o(t,e){return t[0]===e[0]&&t[1]===e[1]}function n(t,e,r,n=1){const a=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(a)for(const o of l)i(o,h,a);const c=function(t,e,r){const i=[];for(const c of t){const t=[...c];o(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const n=[];e=Math.max(e,.1);const a=[];for(const o of i)for(let t=0;t<o.length-1;t++){const e=o[t],r=o[t+1];if(e[1]!==r[1]){const t=Math.min(e[1],r[1]);a.push({ymin:t,ymax:Math.max(e[1],r[1]),x:t===e[1]?e[0]:r[0],islope:(r[0]-e[0])/(r[1]-e[1])})}}if(a.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return n;let s=[],l=a[0].ymin,h=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;e<a.length&&!(a[e].ymin>l);e++)t=e;a.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;n.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return n}(l,s,n);if(a){for(const t of l)i(t,h,-a);!function(t,e,r){const o=[];t.forEach(t=>o.push(...t)),i(o,e,r)}(c,h,-a)}return c}function a(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=o),n(t,o,i,a||1)}r.d(e,{A:()=>ot});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=a(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=a(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,n=[],s=.5*r*Math.cos(o),h=.5*r*Math.sin(o);for(const[a,c]of i)l([a,c])&&n.push([[a[0]-s,a[1]+h],[...c]],[[a[0]+s,a[1]-h],[...c]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class c extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=a(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const n=i/4;for(const a of t){const t=l(a),s=t/i,h=Math.ceil(s)-1,c=t-h*i,d=(a[0][0]+a[1][0])/2-i/4,u=Math.min(a[0][1],a[1][1]);for(let a=0;a<h;a++){const t=u+c+a*i,s=d-n+2*Math.random()*n,l=t-n+2*Math.random()*n,h=this.helper.ellipse(s,l,o,o,e);r.push(...h.ops)}}return{type:"fillSketch",ops:r}}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=a(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const n=l(t),a=Math.floor(n/(r+i)),s=(n+i-a*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const d=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let l=0;l<a;l++){const t=l*(r+i),n=t+r,a=[h[0]+t*Math.cos(d)+s*Math.cos(d),h[1]+t*Math.sin(d)+s*Math.sin(d)],c=[h[0]+n*Math.cos(d)+s*Math.cos(d),h[1]+n*Math.sin(d)+s*Math.sin(d)];o.push(...this.helper.doubleLineOps(a[0],a[1],c[0],c[1],e))}}),o}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=a(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=l(t),n=Math.round(o/(2*e));let a=t[0],s=t[1];a[0]>s[0]&&(a=t[1],s=t[0]);const h=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let l=0;l<n;l++){const t=2*l*e,o=2*(l+1)*e,n=Math.sqrt(2*Math.pow(e,2)),s=[a[0]+t*Math.cos(h),a[1]+t*Math.sin(h)],c=[a[0]+o*Math.cos(h),a[1]+o*Math.sin(h)],d=[s[0]+n*Math.cos(h+Math.PI/4),s[1]+n*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(s[0],s[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const g={};class f{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const y={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 m(t,e){return t.type===e}function C(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",o=0,n=r[o];for(;!m(n,2);){let a=0;const s=[];if("BOD"===i){if("M"!==n.text&&"m"!==n.text)return C("M0,0"+t);o++,a=y[n.text],i=n.text}else m(n,1)?a=y[i]:(o++,a=y[n.text],i=n.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let t=o;t<o+a;t++){const e=r[t];if(!m(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof y[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),o+=a,n=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function x(t){let e=0,r=0,i=0,o=0;const n=[];for(const{key:a,data:s}of t)switch(a){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,o]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":n.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=o}return n}function b(t){const e=[];let r="",i=0,o=0,n=0,a=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[n,a]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-s),n=o+(o-l)):(t=i,n=o),e.push({key:"C",data:[t,n,...c]}),s=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,n]=c;let a=0,h=0;"Q"===r||"T"===r?(a=i+(i-s),h=o+(o-l)):(a=i,h=o);const d=i+2*(a-i)/3,u=o+2*(h-o)/3,p=t+2*(a-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),s=a,l=h,i=t,o=n;break}case"Q":{const[t,r,n,a]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=n+2*(t-n)/3,p=a+2*(r-a)/3;e.push({key:"C",data:[h,d,u,p,n,a]}),s=t,l=r,i=n,o=a;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],a=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(w(i,o,l,h,t,r,n,a,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,o=a}r=h}return e}function k(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,i,o,n,a,s,l,h){const c=(d=a,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=k(t,e,-c),[r,i]=k(r,i,-c);const a=(t-r)/2,h=(e-i)/2;let d=a*a/(o*o)+h*h/(n*n);d>1&&(d=Math.sqrt(d),o*=d,n*=d);const u=o*o,m=n*n,C=u*m-u*h*h-m*a*a,x=u*h*h+m*a*a,b=(s===l?-1:1)*Math.sqrt(Math.abs(C/x));f=b*o*h/n+(t+r)/2,y=b*-n*a/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=w(r=f+o*Math.cos(g),i=y+n*Math.sin(g),e,s,o,n,a,0,l,[g,t,f,y])}m=g-p;const C=Math.cos(p),x=Math.sin(p),b=Math.cos(g),T=Math.sin(g),S=Math.tan(m/4),B=4/3*o*S,v=4/3*n*S,_=[t,e],A=[t+B*x,e-v*C],L=[r+B*T,i-v*b],F=[r,i];if(A[0]=2*_[0]-A[0],A[1]=2*_[1]-A[1],h)return[A,L,F].concat(u);{u=[A,L,F].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=k(u[e][0],u[e][1],c),i=k(u[e+1][0],u[e+1][1],c),o=k(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const T={randOffset:function(t,e){return I(t,e)},randOffsetWithRange:function(t,e,r){return D(t,e,r)},ellipse:function(t,e,r,i,o){return A(t,e,o,_(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return q(t,e,r,i,o,!0)}};function S(t,e,r,i,o){return{type:"path",ops:q(t,e,r,i,o)}}function B(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...q(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...q(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?S(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function v(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=z(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:z(r[0],1.5*(1+.22*e.roughness),$(e));for(let t=1;t<r.length;t++){const n=r[t];if(n.length){const t=z(n,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:z(n,1.5*(1+.22*e.roughness),$(e));for(const e of t)"move"!==e.op&&i.push(e);for(const e of r)"move"!==e.op&&o.push(e)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function _(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/o;let a=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return a+=I(a*l,r),s+=I(s*l,r),{increment:n,rx:a,ry:s}}function A(t,e,r,i){const[o,n]=P(i.increment,t,e,i.rx,i.ry,1,i.increment*D(.1,D(.4,1,r),r),r);let a=K(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=P(i.increment,t,e,i.rx,i.ry,1.5,0,r),n=K(o,null,r);a=a.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:a}}}function L(t,e,r,i,o,n,a,s,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=I(.01*d,l),u+=I(.01*u,l);let p=o,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=N(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=N(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return a&&(s?m.push(...q(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...q(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function F(t,e){const r=b(x(C(t))),i=[];let o=[0,0],n=[0,0];for(const{key:a,data:s}of r)switch(a){case"M":n=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...q(n[0],n[1],s[0],s[1],e)),n=[s[0],s[1]];break;case"C":{const[t,r,o,a,l,h]=s;i.push(...W(t,r,o,a,l,h,n,e)),n=[l,h];break}case"Z":i.push(...q(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:i}}function M(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+I(t,e),i[0][1]+I(t,e)]});for(let n=1;n<o;n++)r.push({op:"lineTo",data:[i[n][0]+I(t,e),i[n][1]+I(t,e)]})}}return{type:"fillPath",ops:r}}function E(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!g[r])switch(r){case"zigzag":g[r]||(g[r]=new h(e));break;case"cross-hatch":g[r]||(g[r]=new c(e));break;case"dots":g[r]||(g[r]=new d(e));break;case"dashed":g[r]||(g[r]=new u(e));break;case"zigzag-line":g[r]||(g[r]=new p(e));break;default:r="hachure",g[r]||(g[r]=new s(e))}return g[r]}(e,T).fillPolygons(t,e)}function $(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function O(t){return t.randomizer||(t.randomizer=new f(t.seed||0)),t.randomizer.next()}function D(t,e,r,i=1){return r.roughness*i*(O(r)*(e-t)+t)}function I(t,e,r=1){return D(-t,t,e,r)}function q(t,e,r,i,o,n=!1){const a=n?o.disableMultiStrokeFill:o.disableMultiStroke,s=R(t,e,r,i,o,!0,!1);if(a)return s;const l=R(t,e,r,i,o,!0,!0);return s.concat(l)}function R(t,e,r,i,o,n,a){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*O(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=I(p,o,h),g=I(g,o,h);const f=[],y=()=>I(d,o,h),m=()=>I(c,o,h),C=o.preserveVertices;return n&&(a?f.push({op:"move",data:[t+(C?0:y()),e+(C?0:y())]}):f.push({op:"move",data:[t+(C?0:I(c,o,h)),e+(C?0:I(c,o,h))]})),a?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(C?0:y()),i+(C?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(C?0:m()),i+(C?0:m())]}),f}function z(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]),i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+I(e,r),t[o][1]+I(e,r)]),o===t.length-1&&i.push([t[o][0]+I(e,r),t[o][1]+I(e,r)]);return K(i,null,r)}function K(t,e,r){const i=t.length,o=[];if(i>3){const n=[],a=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];n[0]=[r[0],r[1]],n[1]=[r[0]+(a*t[e+1][0]-a*t[e-1][0])/6,r[1]+(a*t[e+1][1]-a*t[e-1][1])/6],n[2]=[t[e+1][0]+(a*t[e][0]-a*t[e+2][0])/6,t[e+1][1]+(a*t[e][1]-a*t[e+2][1])/6],n[3]=[t[e+1][0],t[e+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&&2===e.length){const t=r.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+I(t,r),e[1]+I(t,r)]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return o}function P(t,e,r,i,o,n,a,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){const t=[e+i*Math.cos(n),r+o*Math.sin(n)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=I(.5,s)-Math.PI/2;h.push([I(n,s)+e+.9*i*Math.cos(c-t),I(n,s)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let a=c;a<d;a+=t){const t=[I(n,s)+e+i*Math.cos(a),I(n,s)+r+o*Math.sin(a)];l.push(t),h.push(t)}h.push([I(n,s)+e+i*Math.cos(c+2*Math.PI+.5*a),I(n,s)+r+o*Math.sin(c+2*Math.PI+.5*a)]),h.push([I(n,s)+e+.98*i*Math.cos(c+a),I(n,s)+r+.98*o*Math.sin(c+a)]),h.push([I(n,s)+e+.9*i*Math.cos(c+.5*a),I(n,s)+r+.9*o*Math.sin(c+.5*a)])}return[h,l]}function N(t,e,r,i,o,n,a,s,l){const h=n+I(.1,l),c=[];c.push([I(s,l)+e+.9*i*Math.cos(h-t),I(s,l)+r+.9*o*Math.sin(h-t)]);for(let d=h;d<=a;d+=t)c.push([I(s,l)+e+i*Math.cos(d),I(s,l)+r+o*Math.sin(d)]);return c.push([e+i*Math.cos(a),r+o*Math.sin(a)]),c.push([e+i*Math.cos(a),r+o*Math.sin(a)]),K(c,null,l)}function W(t,e,r,i,o,n,a,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(u?0:I(h[0],s)),a[1]+(u?0:I(h[0],s))]}),c=u?[o,n]:[o+I(h[p],s),n+I(h[p],s)],l.push({op:"bcurveTo",data:[t+I(h[p],s),e+I(h[p],s),r+I(h[p],s),i+I(h[p],s),c[0],c[1]]});return l}function j(t){return[...t]}function H(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(j(t[0]),j(t[1]),j(t[2]),j(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],n=1-e;i.push(j(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(n*r[t+1][0]-n*r[t-1][0])/6,e[1]+(n*r[t+1][1]-n*r[t-1][1])/6],o[2]=[r[t+1][0]+(n*r[t][0]-n*r[t+2][0])/6,r[t+1][1]+(n*r[t][1]-n*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function U(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Y(t,e,r){const i=U(e,r);if(0===i)return U(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),U(t,G(e,r,o))}function G(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function X(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],n=t[e+3];let a=3*i[0]-2*r[0]-n[0];a*=a;let s=3*i[1]-2*r[1]-n[1];s*=s;let l=3*o[0]-2*n[0]-r[0];l*=l;let h=3*o[1]-2*n[1]-r[1];return h*=h,a<l&&(a=l),s<h&&(s=h),a+s}(t,e)<r){const r=t[e+0];o.length?(n=o[o.length-1],a=r,Math.sqrt(U(n,a))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,n=t[e+0],a=t[e+1],s=t[e+2],l=t[e+3],h=G(n,a,i),c=G(a,s,i),d=G(s,l,i),u=G(h,c,i),p=G(c,d,i),g=G(u,p,i);X([n,h,u,g],0,r,o),X([g,p,d,l],0,r,o)}var n,a;return o}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,o){const n=o||[],a=t[e],s=t[r-1];let l=0,h=1;for(let c=e+1;c<r-1;++c){const e=Y(t[c],a,s);e>l&&(l=e,h=c)}return Math.sqrt(l)>i?(Z(t,e,h+1,i,n),Z(t,h,r,i,n)):(n.length||n.push(a),n.push(s)),n}function Q(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let n=0;n<o;n++)X(t,3*n,e,i);return r&&r>0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const n=this._o(o);return this._d("line",[S(t,e,r,i,n)],n)}rectangle(t,e,r,i,o){const n=this._o(o),a=[],s=function(t,e,r,i,o){return function(t,e){return B(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,n);if(n.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?a.push(M([o],n)):a.push(E([o],n))}return n.stroke!==J&&a.push(s),this._d("rectangle",a,n)}ellipse(t,e,r,i,o){const n=this._o(o),a=[],s=_(r,i,n),l=A(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){const r=A(t,e,n,s).opset;r.type="fillPath",a.push(r)}else a.push(E([l.estimatedPoints],n));return n.stroke!==J&&a.push(l.opset),this._d("ellipse",a,n)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[B(t,!1,r)],r)}arc(t,e,r,i,o,n,a=!1,s){const l=this._o(s),h=[],c=L(t,e,r,i,o,n,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=L(t,e,r,i,o,n,!0,!1,a);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,o,n,a){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=I(.01*h,a),c+=I(.01*c,a);let d=o,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/a.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([s+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),E([g],a)}(t,e,r,i,o,n,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=v(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=v(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push(E([e],r))}return r.stroke!==J&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=B(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(M([t],r)):i.push(E([t],r))),r.stroke!==J&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==J,n=r.stroke!==J,a=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=b(x(C(t))),o=[];let n=[],a=[0,0],s=[];const l=()=>{s.length>=4&&n.push(...Q(s,1)),s=[]},h=()=>{l(),n.length&&(o.push(n),n=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),a=[u[0],u[1]],n.push(a);break;case"L":l(),n.push([u[0],u[1]]);break;case"C":if(!s.length){const t=n.length?n[n.length-1]:a;s.push([t[0],t[1]])}s.push([u[0],u[1]]),s.push([u[2],u[3]]),s.push([u[4],u[5]]);break;case"Z":l(),n.push([a[0],a[1]])}if(h(),!r)return o;const c=[];for(const d of o){const t=V(d,r);t.length&&c.push(t)}return c}(t,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=F(t,r);if(o)if("solid"===r.fillStyle)if(1===s.length){const e=F(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(M(s,r));else i.push(E(s,r));return n&&(a?s.forEach(t=>{i.push(B(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const o of e){let t=null;switch(o.type){case"path":t={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(o),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":t=this.fillSketch(o,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const n of e)switch(n.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,n,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,n,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,n,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const o of e.ops){const e="number"==typeof r&&r>=0?o.data.map(t=>+t.toFixed(r)):o.data;switch(o.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n),n}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n),n}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n),n}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,n,a=!1,s){const l=this.gen.arc(t,e,r,i,o,n,a,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(rt,"g"),n=t.options.fixedDecimalPlaceDigits;for(const a of e){let e=null;switch(a.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,a,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(rt,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n)}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n)}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,n,a=!1,s){const l=this.gen.arc(t,e,r,i,o,n,a,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ot={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},6793(t,e,r){"use strict";function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(o.length){var n=new RegExp("\n[\t ]{"+Math.min.apply(Math,o)+"}","g");i=i.map(function(t){return t.replace(n,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(t,e){var r=a.match(/(?:^|\n)( *)$/),o=r?r[1]:"",n=t;"string"==typeof t&&t.includes("\n")&&(n=String(t).split("\n").map(function(t,e){return 0===e?t:""+o+t}).join("\n")),a+=n+i[e+1]}),a}r.d(e,{T:()=>i})},7012(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r<i||void 0===r&&i>=i)&&(r=i);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}function o(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r>i||void 0===r&&i>=i)&&(r=i);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function n(t){return t}r.d(e,{JLW:()=>Zl,l78:()=>g,tlR:()=>p,qrM:()=>ch,Yu4:()=>uh,IA3:()=>gh,Wi0:()=>yh,PGM:()=>mh,OEq:()=>xh,y8u:()=>wh,olC:()=>Sh,IrU:()=>vh,oDi:()=>Lh,Q7f:()=>Mh,cVp:()=>$h,lUB:()=>th,Lx9:()=>Dh,nVG:()=>Wh,uxU:()=>jh,Xf2:()=>Yh,GZz:()=>Xh,UPb:()=>Zh,dyv:()=>Vh,GPZ:()=>Co,Sk5:()=>qo,bEH:()=>mn,n8j:()=>ih,T9B:()=>i,jkA:()=>o,rLf:()=>ah,WH:()=>vn,m4Y:()=>na,UMr:()=>Bn,w7C:()=>kl,zt:()=>Tl,Ltv:()=>Sl,UAC:()=>wa,DCK:()=>ts,TUC:()=>Ma,Agd:()=>ba,t6C:()=>ya,wXd:()=>Ca,ABi:()=>_a,Ui6:()=>Pa,rGn:()=>Ea,ucG:()=>ma,YPH:()=>va,Mol:()=>Fa,PGu:()=>Aa,GuW:()=>La,hkb:()=>Vo}),r.dn(n);var a=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function h(t){return e=>+t(e)}function c(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function d(){return!this.__axis}function u(t,e){var r=[],i=null,o=null,u=6,p=6,g=3,f="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",C=1===t||3===t?s:l;function x(s){var l=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,x=null==o?e.tickFormat?e.tickFormat.apply(e,r):n:o,b=Math.max(u,0)+g,k=e.range(),w=+k[0]+f,T=+k[k.length-1]+f,S=(e.bandwidth?c:h)(e.copy(),f),B=s.selection?s.selection():s,v=B.selectAll(".domain").data([null]),_=B.selectAll(".tick").data(l,e).order(),A=_.exit(),L=_.enter().append("g").attr("class","tick"),F=_.select("line"),M=_.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(L),F=F.merge(L.append("line").attr("stroke","currentColor").attr(m+"2",y*u)),M=M.merge(L.append("text").attr("fill","currentColor").attr(m,y*b).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==B&&(v=v.transition(s),_=_.transition(s),F=F.transition(s),M=M.transition(s),A=A.transition(s).attr("opacity",a).attr("transform",function(t){return isFinite(t=S(t))?C(t+f):this.getAttribute("transform")}),L.attr("opacity",a).attr("transform",function(t){var e=this.parentNode.__axis;return C((e&&isFinite(e=e(t))?e:S(t))+f)})),A.remove(),v.attr("d",4===t||2===t?p?"M"+y*p+","+w+"H"+f+"V"+T+"H"+y*p:"M"+f+","+w+"V"+T:p?"M"+w+","+y*p+"V"+f+"H"+T+"V"+y*p:"M"+w+","+f+"H"+T),_.attr("opacity",1).attr("transform",function(t){return C(S(t)+f)}),F.attr(m+"2",y*u),M.attr(m,y*b).text(x),B.filter(d).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),B.each(function(){this.__axis=S})}return x.scale=function(t){return arguments.length?(e=t,x):e},x.ticks=function(){return r=Array.from(arguments),x},x.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),x):r.slice()},x.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),x):i&&i.slice()},x.tickFormat=function(t){return arguments.length?(o=t,x):o},x.tickSize=function(t){return arguments.length?(u=p=+t,x):u},x.tickSizeInner=function(t){return arguments.length?(u=+t,x):u},x.tickSizeOuter=function(t){return arguments.length?(p=+t,x):p},x.tickPadding=function(t){return arguments.length?(g=+t,x):g},x.offset=function(t){return arguments.length?(f=+t,x):f},x}function p(t){return u(1,t)}function g(t){return u(3,t)}function f(){}function y(t){return null==t?f:function(){return this.querySelector(t)}}function m(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,a,s=e[o],l=s.length,h=i[o]=new Array(l),c=0;c<l;++c)(n=s[c])&&(a=t.call(n,n.__data__,c,s))&&("__data__"in n&&(a.__data__=n.__data__),h[c]=a);return new ae(i,this._parents)}function C(){return[]}function x(t){return null==t?C:function(){return this.querySelectorAll(t)}}function b(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function k(t){t="function"==typeof t?b(t):x(t);for(var e=this._groups,r=e.length,i=[],o=[],n=0;n<r;++n)for(var a,s=e[n],l=s.length,h=0;h<l;++h)(a=s[h])&&(i.push(t.call(a,a.__data__,h,s)),o.push(a));return new ae(i,o)}function w(t){return function(){return this.matches(t)}}function T(t){return function(e){return e.matches(t)}}r.dn(y),r.dn(m),r.dn(x),r.dn(k),r.dn(w),r.dn(v);var S=Array.prototype.find;function B(){return this.firstElementChild}function v(t){return this.select(null==t?B:function(t){return function(){return S.call(this.children,t)}}("function"==typeof t?t:T(t)))}r.dn(L);var _=Array.prototype.filter;function A(){return Array.from(this.children)}function L(t){return this.selectAll(null==t?A:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:T(t)))}function F(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,a=e[o],s=a.length,l=i[o]=[],h=0;h<s;++h)(n=a[h])&&t.call(n,n.__data__,h,a)&&l.push(n);return new ae(i,this._parents)}function M(t){return new Array(t.length)}function E(){return new ae(this._enter||this._groups.map(M),this._parents)}function $(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function O(t){return function(){return t}}function D(t,e,r,i,o,n){for(var a,s=0,l=e.length,h=n.length;s<h;++s)(a=e[s])?(a.__data__=n[s],i[s]=a):r[s]=new $(t,n[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function I(t,e,r,i,o,n,a){var s,l,h,c=new Map,d=e.length,u=n.length,p=new Array(d);for(s=0;s<d;++s)(l=e[s])&&(p[s]=h=a.call(l,l.__data__,s,e)+"",c.has(h)?o[s]=l:c.set(h,l));for(s=0;s<u;++s)h=a.call(t,n[s],s,n)+"",(l=c.get(h))?(i[s]=l,l.__data__=n[s],c.delete(h)):r[s]=new $(t,n[s]);for(s=0;s<d;++s)(l=e[s])&&c.get(p[s])===l&&(o[s]=l)}function q(t){return t.__data__}function R(t,e){if(!arguments.length)return Array.from(this,q);var r=e?I:D,i=this._parents,o=this._groups;"function"!=typeof t&&(t=O(t));for(var n=o.length,a=new Array(n),s=new Array(n),l=new Array(n),h=0;h<n;++h){var c=i[h],d=o[h],u=d.length,p=z(t.call(c,c&&c.__data__,h,i)),g=p.length,f=s[h]=new Array(g),y=a[h]=new Array(g);r(c,d,f,y,l[h]=new Array(u),p,e);for(var m,C,x=0,b=0;x<g;++x)if(m=f[x]){for(x>=b&&(b=x+1);!(C=y[b])&&++b<g;);m._next=C||null}}return(a=new ae(a,i))._enter=s,a._exit=l,a}function z(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function K(){return new ae(this._exit||this._groups.map(M),this._parents)}function P(t,e,r){var i=this.enter(),o=this,n=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?n.remove():r(n),i&&o?i.merge(o).order():o}function N(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,n=i.length,a=Math.min(o,n),s=new Array(o),l=0;l<a;++l)for(var h,c=r[l],d=i[l],u=c.length,p=s[l]=new Array(u),g=0;g<u;++g)(h=c[g]||d[g])&&(p[g]=h);for(;l<o;++l)s[l]=r[l];return new ae(s,this._parents)}function W(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],n=o.length-1,a=o[n];--n>=0;)(i=o[n])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this}function j(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=H);for(var r=this._groups,i=r.length,o=new Array(i),n=0;n<i;++n){for(var a,s=r[n],l=s.length,h=o[n]=new Array(l),c=0;c<l;++c)(a=s[c])&&(h[c]=a);h.sort(e)}return new ae(o,this._parents).order()}function H(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function U(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Y(){return Array.from(this)}function G(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,n=i.length;o<n;++o){var a=i[o];if(a)return a}return null}function X(){let t=0;for(const e of this)++t;return t}function V(){return!this.node()}function Z(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,n=e[r],a=0,s=n.length;a<s;++a)(o=n[a])&&t.call(o,o.__data__,a,n);return this}r.dn(F),r.dn(M),r.dn(E),$.prototype={constructor:$,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},r.dn(O),r.dn(R),r.dn(K),r.dn(P),r.dn(N),r.dn(W),r.dn(j),r.dn(U),r.dn(Y),r.dn(G),r.dn(X),r.dn(V),r.dn(Z);var Q="http://www.w3.org/1999/xhtml";const J={svg:"http://www.w3.org/2000/svg",xhtml:Q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tt(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),J.hasOwnProperty(e)?{space:J[e],local:t}:t}function et(t){return function(){this.removeAttribute(t)}}function rt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function it(t,e){return function(){this.setAttribute(t,e)}}function ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function nt(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function at(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function st(t,e){var r=tt(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?rt:et:"function"==typeof e?r.local?at:nt:r.local?ot:it)(r,e))}function lt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ht(t){return function(){this.style.removeProperty(t)}}function ct(t,e,r){return function(){this.style.setProperty(t,e,r)}}function dt(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function ut(t,e,r){return arguments.length>1?this.each((null==e?ht:"function"==typeof e?dt:ct)(t,e,null==r?"":r)):pt(this.node(),t)}function pt(t,e){return t.style.getPropertyValue(e)||lt(t).getComputedStyle(t,null).getPropertyValue(e)}function gt(t){return function(){delete this[t]}}function ft(t,e){return function(){this[t]=e}}function yt(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function mt(t,e){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?yt:ft)(t,e)):this.node()[t]}function Ct(t){return t.trim().split(/^|\s+/)}function xt(t){return t.classList||new bt(t)}function bt(t){this._node=t,this._names=Ct(t.getAttribute("class")||"")}function kt(t,e){for(var r=xt(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function wt(t,e){for(var r=xt(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function Tt(t){return function(){kt(this,t)}}function St(t){return function(){wt(this,t)}}function Bt(t,e){return function(){(e.apply(this,arguments)?kt:wt)(this,t)}}function vt(t,e){var r=Ct(t+"");if(arguments.length<2){for(var i=xt(this.node()),o=-1,n=r.length;++o<n;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?Bt:e?Tt:St)(r,e))}function _t(){this.textContent=""}function At(t){return function(){this.textContent=t}}function Lt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ft(t){return arguments.length?this.each(null==t?_t:("function"==typeof t?Lt:At)(t)):this.node().textContent}function Mt(){this.innerHTML=""}function Et(t){return function(){this.innerHTML=t}}function $t(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ot(t){return arguments.length?this.each(null==t?Mt:("function"==typeof t?$t:Et)(t)):this.node().innerHTML}function Dt(){this.nextSibling&&this.parentNode.appendChild(this)}function It(){return this.each(Dt)}function qt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Rt(){return this.each(qt)}function zt(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Q&&e.documentElement.namespaceURI===Q?e.createElement(t):e.createElementNS(r,t)}}function Kt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Pt(t){var e=tt(t);return(e.local?Kt:zt)(e)}function Nt(t){var e="function"==typeof t?t:Pt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wt(){return null}function jt(t,e){var r="function"==typeof t?t:Pt(t),i=null==e?Wt:"function"==typeof e?e:y(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Ht(){var t=this.parentNode;t&&t.removeChild(this)}function Ut(){return this.each(Ht)}function Yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xt(t){return this.select(t?Gt:Yt)}function Vt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Zt(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,n=e.length;i<n;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function Qt(t,e,r){return function(){var i,o=this.__on,n=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var a=0,s=o.length;a<s;++a)if((i=o[a]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=n,i.options=r),void(i.value=e);this.addEventListener(t.type,n,r),i={type:t.type,name:t.name,value:e,listener:n,options:r},o?o.push(i):this.__on=[i]}}function Jt(t,e,r){var i,o,n=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),a=n.length;if(!(arguments.length<2)){for(s=e?Qt:Zt,i=0;i<a;++i)this.each(s(n[i],e,r));return this}var s=this.node().__on;if(s)for(var l,h=0,c=s.length;h<c;++h)for(i=0,l=s[h];i<a;++i)if((o=n[i]).type===l.type&&o.name===l.name)return l.value}function te(t,e,r){var i=lt(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ee(t,e){return function(){return te(this,t,e)}}function re(t,e){return function(){return te(this,t,e.apply(this,arguments))}}function ie(t,e){return this.each(("function"==typeof e?re:ee)(t,e))}function*oe(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],n=0,a=o.length;n<a;++n)(i=o[n])&&(yield i)}r.dn(tt),r.dn(st),r.dn(lt),r.dn(ut),r.dn(mt),r.dn(vt),bt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},r.dn(Ft),r.dn(Ot),r.dn(It),r.dn(Rt),r.dn(Pt),r.dn(Nt),r.dn(jt),r.dn(Ut),r.dn(Xt),r.dn(Vt),r.dn(Jt),r.dn(ie),r.dn(oe);var ne=[null];function ae(t,e){this._groups=t,this._parents=e}function se(){return new ae([[document.documentElement]],ne)}ae.prototype=se.prototype={constructor:ae,select:m,selectAll:k,selectChild:v,selectChildren:L,filter:F,data:R,enter:E,exit:K,join:P,merge:N,selection:function(){return this},order:W,sort:j,call:U,nodes:Y,node:G,size:X,empty:V,each:Z,attr:st,style:ut,property:mt,classed:vt,text:Ft,html:Ot,raise:It,lower:Rt,append:Nt,insert:jt,remove:Ut,clone:Xt,datum:Vt,on:Jt,dispatch:ie,[Symbol.iterator]:oe};const le=se;var he={value:()=>{}};function ce(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new de(i)}function de(t){this._=t}function ue(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function pe(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=he,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}de.prototype=ce.prototype={constructor:de,on:function(t,e){var r,i,o=this._,n=(i=o,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(r=(t=n[a]).type)o[r]=pe(o[r],t.name,e);else if(null==e)for(r in o)o[r]=pe(o[r],t.name,null);return this}for(;++a<s;)if((r=(t=n[a]).type)&&(r=ue(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new de(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=new Array(r),n=0;n<r;++n)o[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(n=0,r=(i=this._[t]).length;n<r;++n)i[n].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,n=i.length;o<n;++o)i[o].value.apply(e,r)}};const ge=ce;var fe,ye,me=0,Ce=0,xe=0,be=0,ke=0,we=0,Te="object"==typeof performance&&performance.now?performance:Date,Se="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Be(){return ke||(Se(ve),ke=Te.now()+we)}function ve(){ke=0}function _e(){this._call=this._time=this._next=null}function Ae(t,e,r){var i=new _e;return i.restart(t,e,r),i}function Le(){ke=(be=Te.now())+we,me=Ce=0;try{!function(){Be(),++me;for(var t,e=fe;e;)(t=ke-e._time)>=0&&e._call.call(void 0,t),e=e._next;--me}()}finally{me=0,function(){var t,e,r=fe,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:fe=e);ye=t,Me(i)}(),ke=0}}function Fe(){var t=Te.now(),e=t-be;e>1e3&&(we-=e,be=t)}function Me(t){me||(Ce&&(Ce=clearTimeout(Ce)),t-ke>24?(t<1/0&&(Ce=setTimeout(Le,t-Te.now()-we)),xe&&(xe=clearInterval(xe))):(xe||(be=Te.now(),xe=setInterval(Fe,1e3)),me=1,Se(Le)))}function Ee(t,e,r){var i=new _e;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}_e.prototype=Ae.prototype={constructor:_e,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Be():+r)+(null==e?0:+e),this._next||ye===this||(ye?ye._next=this:fe=this,ye=this),this._call=t,this._time=r,Me()},stop:function(){this._call&&(this._call=null,this._time=1/0,Me())}},r.dn(Ee),r.dn(De);var $e=ge("start","end","cancel","interrupt"),Oe=[];function De(t,e,r,i,o,n){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function n(t){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)}function a(n){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return Ee(a);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(Ee(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(n))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function s(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),n=-1,a=i.length;++n<a;)i[n].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=Ae(n,0,r.time)}(t,r,{name:e,index:i,group:o,on:$e,tween:Oe,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:0})}function Ie(t,e){var r=Re(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function qe(t,e){var r=Re(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Re(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ze(t,e){var r,i,o,n=t.__transition,a=!0;if(n){for(o in e=null==e?null:e+"",n)(r=n[o]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]):a=!1;a&&delete t.__transition}}function Ke(t){return this.each(function(){ze(this,t)})}function Pe(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}r.dn(ze),r.dn(Ke),r.dn(Pe),r.dn(He);var Ne,We=180/Math.PI,je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function He(t,e,r,i,o,n){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:o,translateY:n,rotate:Math.atan2(e,t)*We,skewX:Math.atan(l)*We,scaleX:a,scaleY:s}}function Ue(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(n,a){var s=[],l=[];return n=t(n),a=t(a),function(t,i,o,n,a,s){if(t!==o||i!==n){var l=a.push("translate(",null,e,null,r);s.push({i:l-4,x:Pe(t,o)},{i:l-2,x:Pe(i,n)})}else(o||n)&&a.push("translate("+o+e+n+r)}(n.translateX,n.translateY,a.translateX,a.translateY,s,l),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(o(r)+"rotate(",null,i)-2,x:Pe(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(n.rotate,a.rotate,s,l),function(t,e,r,n){t!==e?n.push({i:r.push(o(r)+"skewX(",null,i)-2,x:Pe(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(n.skewX,a.skewX,s,l),function(t,e,r,i,n,a){if(t!==r||e!==i){var s=n.push(o(n)+"scale(",null,",",null,")");a.push({i:s-4,x:Pe(t,r)},{i:s-2,x:Pe(e,i)})}else 1===r&&1===i||n.push(o(n)+"scale("+r+","+i+")")}(n.scaleX,n.scaleY,a.scaleX,a.scaleY,s,l),n=a=null,function(t){for(var e,r=-1,i=l.length;++r<i;)s[(e=l[r]).i]=e.x(t);return s.join("")}}}var Ye=Ue(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?je:He(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Ge=Ue(function(t){return null==t?je:(Ne||(Ne=document.createElementNS("http://www.w3.org/2000/svg","g")),Ne.setAttribute("transform",t),(t=Ne.transform.baseVal.consolidate())?He((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):je)},", ",")",")");function Xe(t,e){var r,i;return function(){var o=qe(this,t),n=o.tween;if(n!==r)for(var a=0,s=(i=r=n).length;a<s;++a)if(i[a].name===e){(i=i.slice()).splice(a,1);break}o.tween=i}}function Ve(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var n=qe(this,t),a=n.tween;if(a!==i){o=(i=a).slice();for(var s={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=s;break}l===h&&o.push(s)}n.tween=o}}function Ze(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=Re(this.node(),r).tween,n=0,a=o.length;n<a;++n)if((i=o[n]).name===t)return i.value;return null}return this.each((null==e?Xe:Ve)(r,t,e))}function Qe(t,e,r){var i=t._id;return t.each(function(){var t=qe(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Re(t,i).value[e]}}function Je(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function tr(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function er(){}r.dn(Ze),r.dn(Je);var rr=.7,ir=1/rr,or="\\s*([+-]?\\d+)\\s*",nr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ar="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sr=/^#([0-9a-f]{3,8})$/,lr=new RegExp(`^rgb\\(${or},${or},${or}\\)$`),hr=new RegExp(`^rgb\\(${ar},${ar},${ar}\\)$`),cr=new RegExp(`^rgba\\(${or},${or},${or},${nr}\\)$`),dr=new RegExp(`^rgba\\(${ar},${ar},${ar},${nr}\\)$`),ur=new RegExp(`^hsl\\(${nr},${ar},${ar}\\)$`),pr=new RegExp(`^hsla\\(${nr},${ar},${ar},${nr}\\)$`),gr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fr(){return this.rgb().formatHex()}function yr(){return this.rgb().formatRgb()}function mr(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=sr.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Cr(e):3===r?new wr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?xr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?xr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lr.exec(t))?new wr(e[1],e[2],e[3],1):(e=hr.exec(t))?new wr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=cr.exec(t))?xr(e[1],e[2],e[3],e[4]):(e=dr.exec(t))?xr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ur.exec(t))?Ar(e[1],e[2]/100,e[3]/100,1):(e=pr.exec(t))?Ar(e[1],e[2]/100,e[3]/100,e[4]):gr.hasOwnProperty(t)?Cr(gr[t]):"transparent"===t?new wr(NaN,NaN,NaN,0):null}function Cr(t){return new wr(t>>16&255,t>>8&255,255&t,1)}function xr(t,e,r,i){return i<=0&&(t=e=r=NaN),new wr(t,e,r,i)}function br(t){return t instanceof er||(t=mr(t)),t?new wr((t=t.rgb()).r,t.g,t.b,t.opacity):new wr}function kr(t,e,r,i){return 1===arguments.length?br(t):new wr(t,e,r,null==i?1:i)}function wr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Tr(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}`}function Sr(){const t=Br(this.opacity);return`${1===t?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${1===t?")":`, ${t})`}`}function Br(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function vr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _r(t){return((t=vr(t))<16?"0":"")+t.toString(16)}function Ar(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Fr(t,e,r,i)}function Lr(t){if(t instanceof Fr)return new Fr(t.h,t.s,t.l,t.opacity);if(t instanceof er||(t=mr(t)),!t)return new Fr;if(t instanceof Fr)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),n=Math.max(e,r,i),a=NaN,s=n-o,l=(n+o)/2;return s?(a=e===n?(r-i)/s+6*(r<i):r===n?(i-e)/s+2:(e-r)/s+4,s/=l<.5?n+o:2-n-o,a*=60):s=l>0&&l<1?0:a,new Fr(a,s,l,t.opacity)}function Fr(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Mr(t){return(t=(t||0)%360)<0?t+360:t}function Er(t){return Math.max(0,Math.min(1,t||0))}function $r(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Or(t,e,r,i,o){var n=t*t,a=n*t;return((1-3*t+3*n-a)*e+(4-6*n+3*a)*r+(1+3*t+3*n-3*a)*i+a*o)/6}function Dr(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[i],n=t[i+1],a=i>0?t[i-1]:2*o-n,s=i<e-1?t[i+2]:2*n-o;return Or((r-i/e)*e,a,o,n,s)}}function Ir(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),o=t[(i+e-1)%e],n=t[i%e],a=t[(i+1)%e],s=t[(i+2)%e];return Or((r-i/e)*e,o,n,a,s)}}Je(er,mr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:fr,formatHex:fr,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Lr(this).formatHsl()},formatRgb:yr,toString:yr}),Je(wr,kr,tr(er,{brighter(t){return t=null==t?ir:Math.pow(ir,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wr(vr(this.r),vr(this.g),vr(this.b),Br(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Tr,formatHex:Tr,formatHex8:function(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}${_r(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Sr,toString:Sr})),Je(Fr,function(t,e,r,i){return 1===arguments.length?Lr(t):new Fr(t,e,r,null==i?1:i)},tr(er,{brighter(t){return t=null==t?ir:Math.pow(ir,t),new Fr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new Fr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new wr($r(t>=240?t-240:t+120,o,i),$r(t,o,i),$r(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Fr(Mr(this.h),Er(this.s),Er(this.l),Br(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(){const t=Br(this.opacity);return`${1===t?"hsl(":"hsla("}${Mr(this.h)}, ${100*Er(this.s)}%, ${100*Er(this.l)}%${1===t?")":`, ${t})`}`}})),r.dn(Dr),r.dn(Ir);const qr=t=>()=>t;function Rr(t,e){return function(r){return t+r*e}}function zr(t){return 1===(t=+t)?Kr:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):qr(isNaN(e)?r:e)}}function Kr(t,e){var r=e-t;return r?Rr(t,r):qr(isNaN(t)?e:t)}r.dn(qr);const Pr=function t(e){var r=zr(e);function i(t,e){var i=r((t=kr(t)).r,(e=kr(e)).r),o=r(t.g,e.g),n=r(t.b,e.b),a=Kr(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=n(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function Nr(t){return function(e){var r,i,o=e.length,n=new Array(o),a=new Array(o),s=new Array(o);for(r=0;r<o;++r)i=kr(e[r]),n[r]=i.r||0,a[r]=i.g||0,s[r]=i.b||0;return n=t(n),a=t(a),s=t(s),i.opacity=1,function(t){return i.r=n(t),i.g=a(t),i.b=s(t),i+""}}}Nr(Dr),Nr(Ir);r.dn(Hr);var Wr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jr=new RegExp(Wr.source,"g");function Hr(t,e){var r,i,o,n=Wr.lastIndex=jr.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(r=Wr.exec(t))&&(i=jr.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Pe(r,i)})),n=jr.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,i=0;i<e;++i)s[(r=l[i]).i]=r.x(t);return s.join("")})}function Ur(t,e){var r;return("number"==typeof e?Pe:e instanceof mr?Pr:(r=mr(e))?(e=r,Pr):Hr)(t,e)}function Yr(t){return function(){this.removeAttribute(t)}}function Gr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xr(t,e,r){var i,o,n=r+"";return function(){var a=this.getAttribute(t);return a===n?null:a===i?o:o=e(i=a,r)}}function Vr(t,e,r){var i,o,n=r+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?o:o=e(i=a,r)}}function Zr(t,e,r){var i,o,n;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===i&&s===o?n:(o=s,n=e(i=a,l));this.removeAttribute(t)}}function Qr(t,e,r){var i,o,n;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===i&&s===o?n:(o=s,n=e(i=a,l));this.removeAttributeNS(t.space,t.local)}}function Jr(t,e){var r=tt(t),i="transform"===r?Ge:Ur;return this.attrTween(t,"function"==typeof e?(r.local?Qr:Zr)(r,i,Qe(this,"attr."+t,e)):null==e?(r.local?Gr:Yr)(r):(r.local?Vr:Xr)(r,i,e))}function ti(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ei(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ri(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=tt(t);return this.tween(r,(i.local?ti:ei)(i,e))}function ii(t,e){return function(){Ie(this,t).delay=+e.apply(this,arguments)}}function oi(t,e){return e=+e,function(){Ie(this,t).delay=e}}function ni(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ii:oi)(e,t)):Re(this.node(),e).delay}function ai(t,e){return function(){qe(this,t).duration=+e.apply(this,arguments)}}function si(t,e){return e=+e,function(){qe(this,t).duration=e}}function li(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ai:si)(e,t)):Re(this.node(),e).duration}function hi(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){qe(this,t).ease=e}}(e,t)):Re(this.node(),e).ease}function ci(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;qe(this,t).ease=r}}(this._id,t))}function di(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,a=e[o],s=a.length,l=i[o]=[],h=0;h<s;++h)(n=a[h])&&t.call(n,n.__data__,h,a)&&l.push(n);return new _i(i,this._parents,this._name,this._id)}function ui(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,n=Math.min(i,o),a=new Array(i),s=0;s<n;++s)for(var l,h=e[s],c=r[s],d=h.length,u=a[s]=new Array(d),p=0;p<d;++p)(l=h[p]||c[p])&&(u[p]=l);for(;s<i;++s)a[s]=e[s];return new _i(a,this._parents,this._name,this._id)}function pi(t,e){var r=this._id;return arguments.length<2?Re(this.node(),r).on.on(t):this.each(function(t,e,r){var i,o,n=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?Ie:qe;return function(){var a=n(this,t),s=a.on;s!==i&&(o=(i=s).copy()).on(e,r),a.on=o}}(r,t,e))}function gi(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))}function fi(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=y(t));for(var i=this._groups,o=i.length,n=new Array(o),a=0;a<o;++a)for(var s,l,h=i[a],c=h.length,d=n[a]=new Array(c),u=0;u<c;++u)(s=h[u])&&(l=t.call(s,s.__data__,u,h))&&("__data__"in s&&(l.__data__=s.__data__),d[u]=l,De(d[u],e,r,u,d,Re(s,r)));return new _i(n,this._parents,e,r)}function yi(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=x(t));for(var i=this._groups,o=i.length,n=[],a=[],s=0;s<o;++s)for(var l,h=i[s],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,p=t.call(l,l.__data__,d,h),g=Re(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&De(u,e,r,f,p,g);n.push(p),a.push(l)}return new _i(n,a,e,r)}r.dn(Ur),r.dn(Jr),r.dn(ri),r.dn(ni),r.dn(li),r.dn(hi),r.dn(ci),r.dn(di),r.dn(ui),r.dn(pi),r.dn(gi),r.dn(fi),r.dn(yi),r.dn(Ci);var mi=le.prototype.constructor;function Ci(){return new mi(this._groups,this._parents)}function xi(t){return function(){this.style.removeProperty(t)}}function bi(t,e,r){var i="transform"==(t+="")?Ye:Ur;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var n=pt(this,t),a=(this.style.removeProperty(t),pt(this,t));return n===a?null:n===r&&a===i?o:o=e(r=n,i=a)}}(t,i)).on("end.style."+t,xi(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,n;return function(){var a=pt(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=pt(this,t)),a===l?null:a===i&&l===o?n:(o=l,n=e(i=a,s))}}(t,i,Qe(this,"style."+t,e))).each(function(t,e){var r,i,o,n,a="style."+e,s="end."+a;return function(){var l=qe(this,t),h=l.on,c=null==l.value[a]?n||(n=xi(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(s,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,n=r+"";return function(){var a=pt(this,t);return a===n?null:a===i?o:o=e(i=a,r)}}(t,i,e),r).on("end.style."+t,null)}function ki(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function n(){var n=e.apply(this,arguments);return n!==o&&(i=(o=n)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,n,r)),i}return n._value=e,n}(t,e,null==r?"":r))}function wi(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Qe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))}function Ti(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))}function Si(){for(var t=this._name,e=this._id,r=Ai(),i=this._groups,o=i.length,n=0;n<o;++n)for(var a,s=i[n],l=s.length,h=0;h<l;++h)if(a=s[h]){var c=Re(a,e);De(a,t,r,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _i(i,this._parents,t,r)}function Bi(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(n,a){var s={value:a},l={value:function(){0===--o&&n()}};r.each(function(){var r=qe(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),r.on=e}),0===o&&n()})}r.dn(bi),r.dn(ki),r.dn(wi),r.dn(Ti),r.dn(Si),r.dn(Bi);var vi=0;function _i(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ai(){return++vi}var Li=le.prototype;_i.prototype=function(t){return le().transition(t)}.prototype={constructor:_i,select:fi,selectAll:yi,selectChild:Li.selectChild,selectChildren:Li.selectChildren,filter:di,merge:ui,selection:Ci,transition:Si,call:Li.call,nodes:Li.nodes,node:Li.node,size:Li.size,empty:Li.empty,each:Li.each,on:pi,attr:Jr,attrTween:ri,style:bi,styleTween:ki,text:wi,textTween:Ti,remove:gi,tween:Ze,delay:ni,duration:li,ease:hi,easeVarying:ci,end:Bi,[Symbol.iterator]:Li[Symbol.iterator]},r.dn(qi);var Fi,Mi,Ei,$i,Oi,Di={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ii(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function qi(t){var e,r;t instanceof _i?(e=t._id,t=t._name):(e=Ai(),(r=Di).time=Be(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,n=0;n<o;++n)for(var a,s=i[n],l=s.length,h=0;h<l;++h)(a=s[h])&&De(a,t,e,h,s,r||Ii(a,e));return new _i(i,this._parents,t,e)}le.prototype.interrupt=Ke,le.prototype.transition=qi,r.dn(function(){return eo(Gi)});var Ri=null,zi=null,Ki=null;const{abs:Pi,max:Ni,min:Wi}=Math;function ji(t){return[+t[0],+t[1]]}function Hi(t){return[ji(t[0]),ji(t[1])]}var Ui={name:"x",handles:["w","e"].map(Vi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Yi={name:"y",handles:["n","s"].map(Vi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Gi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vi),input:function(t){return null==t?null:Hi(t)},output:function(t){return t}},Xi=null;function Vi(t){return{type:t}}function Zi(t){return!t.ctrlKey&&!t.button}function Qi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ji(){return navigator.maxTouchPoints||"ontouchstart"in this}function to(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function eo(t){var e,r=Qi,i=Zi,o=Ji,n=!0,a=(void 0)("start","brush","end"),s=6;function l(e){var r=e.property("__brush",f).selectAll(".overlay").data([Vi("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Xi.overlay).merge(r).each(function(){var t=to(this).extent;Mi(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([Vi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Xi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return Xi[t.type]}),e.each(h).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",u).filter(o).on("touchstart.brush",u).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){var t=Mi(this),e=to(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,r){var i=t.__brush.emitter;return!i||r&&i.clean?new d(t,e,r):i}function d(t,e,r){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=r}function u(r){if((!e||r.touches)&&i.apply(this,arguments)){var o,a,s,l,d,u,p,g,f,y,m,C=this,x=r.target.__data__.type,b="selection"===(n&&r.metaKey?x="overlay":x)?null:n&&r.altKey?Ki:zi,k=t===Yi?null:null[x],w=t===Ui?null:null[x],T=to(C),S=T.extent,B=T.selection,v=S[0][0],_=S[0][1],A=S[1][0],L=S[1][1],F=0,M=0,E=k&&w&&n&&r.shiftKey,$=Array.from(r.touches||[r],t=>{const e=t.identifier;return(t=Fi(t,C)).point0=t.slice(),t.identifier=e,t});Ei(C);var O=c(C,arguments,!0).beforestart();if("overlay"===x){B&&(f=!0);const e=[$[0],$[1]||$[0]];T.selection=B=[[o=t===Yi?v:Wi(e[0][0],e[1][0]),s=t===Ui?_:Wi(e[0][1],e[1][1])],[d=t===Yi?A:Ni(e[0][0],e[1][0]),p=t===Ui?L:Ni(e[0][1],e[1][1])]],$.length>1&&z(r)}else o=B[0][0],s=B[0][1],d=B[1][0],p=B[1][1];a=o,l=s,u=d,g=p;var D=Mi(C).attr("pointer-events","none"),I=D.selectAll(".overlay").attr("cursor",Xi[x]);if(r.touches)O.moved=R,O.ended=K;else{var q=Mi(r.view).on("mousemove.brush",R,!0).on("mouseup.brush",K,!0);n&&q.on("keydown.brush",function(t){switch(t.keyCode){case 16:E=k&&w;break;case 18:b===zi&&(k&&(d=u-F*k,o=a+F*k),w&&(p=g-M*w,s=l+M*w),b=Ki,z(t));break;case 32:b!==zi&&b!==Ki||(k<0?d=u-F:k>0&&(o=a-F),w<0?p=g-M:w>0&&(s=l-M),b=Ri,I.attr("cursor",Xi.selection),z(t));break;default:return}Oi(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:E&&(y=m=E=!1,z(t));break;case 18:b===Ki&&(k<0?d=u:k>0&&(o=a),w<0?p=g:w>0&&(s=l),b=zi,z(t));break;case 32:b===Ri&&(t.altKey?(k&&(d=u-F*k,o=a+F*k),w&&(p=g-M*w,s=l+M*w),b=Ki):(k<0?d=u:k>0&&(o=a),w<0?p=g:w>0&&(s=l),b=zi),I.attr("cursor",Xi[x]),z(t));break;default:return}Oi(t)},!0),(void 0)(r.view)}h.call(C),O.start(r,b.name)}function R(t){for(const e of t.changedTouches||[t])for(const t of $)t.identifier===e.identifier&&(t.cur=Fi(e,C));if(E&&!y&&!m&&1===$.length){const t=$[0];Pi(t.cur[0]-t[0])>Pi(t.cur[1]-t[1])?m=!0:y=!0}for(const e of $)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);f=!0,Oi(t),z(t)}function z(t){const e=$[0],r=e.point0;var i;switch(F=e[0]-r[0],M=e[1]-r[1],b){case Ri:case null:k&&(F=Ni(v-o,Wi(A-d,F)),a=o+F,u=d+F),w&&(M=Ni(_-s,Wi(L-p,M)),l=s+M,g=p+M);break;case zi:$[1]?(k&&(a=Ni(v,Wi(A,$[0][0])),u=Ni(v,Wi(A,$[1][0])),k=1),w&&(l=Ni(_,Wi(L,$[0][1])),g=Ni(_,Wi(L,$[1][1])),w=1)):(k<0?(F=Ni(v-o,Wi(A-o,F)),a=o+F,u=d):k>0&&(F=Ni(v-d,Wi(A-d,F)),a=o,u=d+F),w<0?(M=Ni(_-s,Wi(L-s,M)),l=s+M,g=p):w>0&&(M=Ni(_-p,Wi(L-p,M)),l=s,g=p+M));break;case Ki:k&&(a=Ni(v,Wi(A,o-F*k)),u=Ni(v,Wi(A,d+F*k))),w&&(l=Ni(_,Wi(L,s-M*w)),g=Ni(_,Wi(L,p+M*w)))}u<a&&(k*=-1,i=o,o=d,d=i,i=a,a=u,u=i,x in null&&I.attr("cursor",Xi[x=null[x]])),g<l&&(w*=-1,i=s,s=p,p=i,i=l,l=g,g=i,x in null&&I.attr("cursor",Xi[x=null[x]])),T.selection&&(B=T.selection),y&&(a=B[0][0],u=B[1][0]),m&&(l=B[0][1],g=B[1][1]),B[0][0]===a&&B[0][1]===l&&B[1][0]===u&&B[1][1]===g||(T.selection=[[a,l],[u,g]],h.call(C),O.brush(t,b.name))}function K(t){if((void 0)(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else(void 0)(t.view,f),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);D.attr("pointer-events","all"),I.attr("cursor",Xi.overlay),T.selection&&(B=T.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(B)&&(T.selection=null,h.call(C)),O.end(t,b.name)}}function p(t){c(this,arguments).moved(t)}function g(t){c(this,arguments).ended(t)}function f(){var e=this.__brush||{selection:null};return e.extent=Hi(r.apply(this,arguments)),e.dim=t,e}return l.move=function(e,r,i){e.tween?e.on("start.brush",function(t){c(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){c(this,arguments).end(t)}).tween("brush",function(){var e=this,i=e.__brush,o=c(e,arguments),n=i.selection,a=t.input("function"==typeof r?r.apply(this,arguments):r,i.extent),s=(void 0)(n,a);function l(t){i.selection=1===t&&null===a?null:s(t),h.call(e),o.brush()}return null!==n&&null!==a?l:l(1)}):e.each(function(){var e=this,o=arguments,n=e.__brush,a=t.input("function"==typeof r?r.apply(e,o):r,n.extent),s=c(e,o).beforestart();Ei(e),n.selection=null===a?null:a,h.call(e),s.start(i).brush(i).end(i)})},l.clear=function(t,e){l.move(t,null,e)},d.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,r,i){var o=Mi(this.that).datum();a.call(e,this.that,new(void 0)(e,{sourceEvent:r,target:l,selection:t.output(this.state.selection),mode:i,dispatch:a}),o)}},l.extent=function(t){return arguments.length?(r="function"==typeof t?t:$i(Hi(t)),l):r},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:$i(!!t),l):i},l.touchable=function(t){return arguments.length?(o="function"==typeof t?t:$i(!!t),l):o},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(n=!!t,l):n},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}function ro(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function io(t,e){if(!isFinite(t)||0===t)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function oo(t){return(t=io(Math.abs(t)))?t[1]:NaN}function no(t,e){return function(r,i){for(var o=r.length,n=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),n.push(r.substring(o-=s,o+s)),!((l+=s+1)>i));)s=t[a=(a+1)%t.length];return n.reverse().join(e)}}function ao(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}r.dn(ro),r.dn(oo),r.dn(no),r.dn(ao);var so,lo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ho(t){if(!(e=lo.exec(t)))throw new Error("invalid format: "+t);var e;return new co({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function co(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function uo(t){t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;default:if(!+t[i])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}function po(t,e){var r=io(t,e);if(!r)return so=void 0,t.toPrecision(e);var i=r[0],o=r[1],n=o-(so=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=i.length;return n===a?i:n>a?i+new Array(n-a+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+io(t,Math.max(0,e+n-1))[0]}function go(t,e){var r=io(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}ho.prototype=co.prototype,co.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},r.dn(uo),r.dn(po),r.dn(go);const fo={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ro,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>go(100*t,e),r:go,s:po,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function yo(t){return t}r.dn(yo),r.dn(wo);var mo,Co,xo,bo=Array.prototype.map,ko=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function wo(t){var e=void 0===t.grouping||void 0===t.thousands?yo:no(bo.call(t.grouping,Number),t.thousands+""),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",n=void 0===t.numerals?yo:ao(bo.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"\u2212":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t,h){var c=(t=ho(t)).fill,d=t.align,u=t.sign,p=t.symbol,g=t.zero,f=t.width,y=t.comma,m=t.precision,C=t.trim,x=t.type;"n"===x?(y=!0,x="g"):fo[x]||(void 0===m&&(m=12),C=!0,x="g"),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="=");var b=(h&&void 0!==h.prefix?h.prefix:"")+("$"===p?r:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),k=("$"===p?i:/[%p]/.test(x)?a:"")+(h&&void 0!==h.suffix?h.suffix:""),w=fo[x],T=/[defgprs%]/.test(x);function S(t){var r,i,a,h=b,p=k;if("c"===x)p=w(t)+p,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),m),C&&(t=uo(t)),S&&0===+t&&"+"!==u&&(S=!1),h=(S?"("===u?u:s:"-"===u||"("===u?"":u)+h,p=("s"!==x||isNaN(t)||void 0===so?"":ko[8+so/3])+p+(S&&"("===u?")":""),T)for(r=-1,i=t.length;++r<i;)if(48>(a=t.charCodeAt(r))||a>57){p=(46===a?o+t.slice(r+1):t.slice(r))+p,t=t.slice(0,r);break}}y&&!g&&(t=e(t,1/0));var B=h.length+t.length+p.length,v=B<f?new Array(f-B+1).join(c):"";switch(y&&g&&(t=e(v+t,v.length?f-p.length:1/0),v=""),d){case"<":t=h+t+p+v;break;case"=":t=h+v+t+p;break;case"^":t=v.slice(0,B=v.length>>1)+h+t+p+v.slice(B);break;default:t=v+h+t+p}return n(t)}return m=void 0===m?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return t+""},S}return{format:h,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3))),i=Math.pow(10,-r),o=h(((t=ho(t)).type="f",t),{suffix:ko[8+r/3]});return function(t){return o(i*t)}}}}function To(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function So(){return this.eachAfter(To)}function Bo(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this}function vo(t,e){for(var r,i,o=this,n=[o],a=-1;o=n.pop();)if(t.call(e,o,++a,this),r=o.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function _o(t,e){for(var r,i,o,n=this,a=[n],s=[],l=-1;n=a.pop();)if(s.push(n),r=n.children)for(i=0,o=r.length;i<o;++i)a.push(r[i]);for(;n=s.pop();)t.call(e,n,++l,this);return this}function Ao(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i}function Lo(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,o=i&&i.length;--o>=0;)r+=i[o].value;e.value=r})}function Fo(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function Mo(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),o=null;t=r.pop(),e=i.pop();for(;t===e;)o=t,t=r.pop(),e=i.pop();return o}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;t!==r;)i.splice(o,0,t),t=t.parent;return i}function Eo(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function $o(){return Array.from(this)}function Oo(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function Do(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*Io(){var t,e,r,i,o=this,n=[o];do{for(t=n.reverse(),n=[];o=t.pop();)if(yield o,e=o.children)for(r=0,i=e.length;r<i;++r)n.push(e[r])}while(n.length)}function qo(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=zo)):void 0===e&&(e=Ro);for(var r,i,o,n,a,s=new No(t),l=[s];r=l.pop();)if((o=e(r.data))&&(a=(o=Array.from(o)).length))for(r.children=o,n=a-1;n>=0;--n)l.push(i=o[n]=new No(o[n])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(Po)}function Ro(t){return t.children}function zo(t){return Array.isArray(t)?t[1]:null}function Ko(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Po(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function No(t){this.data=t,this.depth=this.height=0,this.parent=null}function Wo(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function jo(t,e,r,i,o){for(var n,a=t.children,s=-1,l=a.length,h=t.value&&(i-e)/t.value;++s<l;)(n=a[s]).y0=r,n.y1=o,n.x0=e,n.x1=e+=n.value*h}function Ho(t,e,r,i,o){for(var n,a=t.children,s=-1,l=a.length,h=t.value&&(o-r)/t.value;++s<l;)(n=a[s]).x0=e,n.x1=i,n.y0=r,n.y1=r+=n.value*h}mo=wo({thousands:",",grouping:[3],currency:["$",""]}),Co=mo.format,xo=mo.formatPrefix,r.dn(So),r.dn(Bo),r.dn(vo),r.dn(_o),r.dn(Ao),r.dn(Lo),r.dn(Fo),r.dn(Mo),r.dn(Eo),r.dn($o),r.dn(Oo),r.dn(Do),r.dn(Io),No.prototype=qo.prototype={constructor:No,count:So,each:Bo,eachAfter:_o,eachBefore:vo,find:Ao,sum:Lo,sort:Fo,path:Mo,ancestors:Eo,descendants:$o,leaves:Oo,links:Do,copy:function(){return qo(this).eachBefore(Ko)},[Symbol.iterator]:Io},r.dn(Wo),r.dn(jo),r.dn(Ho);const Uo=function t(e){function r(t,r,i,o,n){!function(t,e,r,i,o,n){for(var a,s,l,h,c,d,u,p,g,f,y,m=[],C=e.children,x=0,b=0,k=C.length,w=e.value;x<k;){l=o-r,h=n-i;do{c=C[b++].value}while(!c&&b<k);for(d=u=c,y=c*c*(f=Math.max(h/l,l/h)/(w*t)),g=Math.max(u/y,y/d);b<k;++b){if(c+=s=C[b].value,s<d&&(d=s),s>u&&(u=s),y=c*c*f,(p=Math.max(u/y,y/d))>g){c-=s;break}g=p}m.push(a={value:c,dice:l<h,children:C.slice(x,b)}),a.dice?jo(a,r,i,o,w?i+=h*c/w:n):Ho(a,r,i,w?r+=l*c/w:o,n),w-=c,x=b}}(e,t,r,i,o,n)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}((1+Math.sqrt(5))/2);function Yo(t){if("function"!=typeof t)throw new Error;return t}function Go(){return 0}function Xo(t){return function(){return t}}function Vo(){var t=Uo,e=!1,r=1,i=1,o=[0],n=Go,a=Go,s=Go,l=Go,h=Go;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(d),o=[0],e&&t.eachBefore(Wo),t}function d(e){var r=o[e.depth],i=e.x0+r,c=e.y0+r,d=e.x1-r,u=e.y1-r;d<i&&(i=d=(i+d)/2),u<c&&(c=u=(c+u)/2),e.x0=i,e.y0=c,e.x1=d,e.y1=u,e.children&&(r=o[e.depth+1]=n(e)/2,i+=h(e)-r,c+=a(e)-r,(d-=s(e)-r)<i&&(i=d=(i+d)/2),(u-=l(e)-r)<c&&(c=u=(c+u)/2),t(e,i,c,d,u))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=Yo(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(n="function"==typeof t?t:Xo(+t),c):n},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Xo(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Xo(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:Xo(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:Xo(+t),c):h},c}r.dn(Xo),r.dn(Vo);const Zo=Math.PI/180,Qo=180/Math.PI,Jo=.96422,tn=.82521,en=4/29,rn=6/29,on=3*rn*rn,nn=rn*rn*rn;function an(t){if(t instanceof sn)return new sn(t.l,t.a,t.b,t.opacity);if(t instanceof gn)return fn(t);t instanceof wr||(t=br(t));var e,r,i=dn(t.r),o=dn(t.g),n=dn(t.b),a=ln((.2225045*i+.7168786*o+.0606169*n)/1);return i===o&&o===n?e=r=a:(e=ln((.4360747*i+.3850649*o+.1430804*n)/Jo),r=ln((.0139322*i+.0971045*o+.7141733*n)/tn)),new sn(116*a-16,500*(e-a),200*(a-r),t.opacity)}function sn(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function ln(t){return t>nn?Math.pow(t,1/3):t/on+en}function hn(t){return t>rn?t*t*t:on*(t-en)}function cn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function dn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function un(t){if(t instanceof gn)return new gn(t.h,t.c,t.l,t.opacity);if(t instanceof sn||(t=an(t)),0===t.a&&0===t.b)return new gn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Qo;return new gn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function pn(t,e,r,i){return 1===arguments.length?un(t):new gn(t,e,r,null==i?1:i)}function gn(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function fn(t){if(isNaN(t.h))return new sn(t.l,0,0,t.opacity);var e=t.h*Zo;return new sn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function yn(t){return function(e,r){var i=t((e=pn(e)).h,(r=pn(r)).h),o=Kr(e.c,r.c),n=Kr(e.l,r.l),a=Kr(e.opacity,r.opacity);return function(t){return e.h=i(t),e.c=o(t),e.l=n(t),e.opacity=a(t),e+""}}}Je(sn,function(t,e,r,i){return 1===arguments.length?an(t):new sn(t,e,r,null==i?1:i)},tr(er,{brighter(t){return new sn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new sn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new wr(cn(3.1338561*(e=Jo*hn(e))-1.6168667*(t=1*hn(t))-.4906146*(r=tn*hn(r))),cn(-.9787684*e+1.9161415*t+.033454*r),cn(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Je(gn,pn,tr(er,{brighter(t){return new gn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new gn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return fn(this).rgb()}}));const mn=yn(function(t,e){var r=e-t;return r?Rr(t,r>180||r<-180?r-360*Math.round(r/360):r):qr(isNaN(t)?e:t)});yn(Kr);function Cn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class xn extends Map{constructor(t,e=Tn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(bn(this,t))}has(t){return super.has(bn(this,t))}set(t,e){return super.set(kn(this,t),e)}delete(t){return super.delete(wn(this,t))}}Set;function bn({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function kn({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function wn({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Tn(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Sn=Symbol("implicit");function Bn(){var t=new xn,e=[],r=[],i=Sn;function o(o){let n=t.get(o);if(void 0===n){if(i!==Sn)return i;t.set(o,n=e.push(o)-1)}return r[n%r.length]}return o.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new xn;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return Bn(e,r).unknown(i)},Cn.apply(o,arguments),o}function vn(){var t,e,r=Bn().unknown(void 0),i=r.domain,o=r.range,n=0,a=1,s=!1,l=0,h=0,c=.5;function d(){var r=i().length,d=a<n,u=d?a:n,p=d?n:a;t=(p-u)/Math.max(1,r-l+2*h),s&&(t=Math.floor(t)),u+=(p-u-t*(r-l))*c,e=t*(1-l),s&&(u=Math.round(u),e=Math.round(e));var g=function(t,e,r){t=+t,e=+e,r=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+r;for(var i=-1,o=0|Math.max(0,Math.ceil((e-t)/r)),n=new Array(o);++i<o;)n[i]=t+i*r;return n}(r).map(function(e){return u+t*e});return o(d?g.reverse():g)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),d()):i()},r.range=function(t){return arguments.length?([n,a]=t,n=+n,a=+a,d()):[n,a]},r.rangeRound=function(t){return[n,a]=t,n=+n,a=+a,s=!0,d()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(s=!!t,d()):s},r.padding=function(t){return arguments.length?(l=Math.min(1,h=+t),d()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},r.paddingOuter=function(t){return arguments.length?(h=+t,d()):h},r.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},r.copy=function(){return vn(i(),[n,a]).round(s).paddingInner(l).paddingOuter(h).align(c)},Cn.apply(d(),arguments)}const _n=Math.sqrt(50),An=Math.sqrt(10),Ln=Math.sqrt(2);function Fn(t,e,r){const i=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(i)),n=i/Math.pow(10,o),a=n>=_n?10:n>=An?5:n>=Ln?2:1;let s,l,h;return o<0?(h=Math.pow(10,-o)/a,s=Math.round(t*h),l=Math.round(e*h),s/h<t&&++s,l/h>e&&--l,h=-h):(h=Math.pow(10,o)*a,s=Math.round(t/h),l=Math.round(e/h),s*h<t&&++s,l*h>e&&--l),l<s&&.5<=r&&r<2?Fn(t,e,2*r):[s,l,h]}function Mn(t,e,r){return Fn(t=+t,e=+e,r=+r)[2]}function En(t,e,r){r=+r;const i=(e=+e)<(t=+t),o=i?Mn(e,t,r):Mn(t,e,r);return(i?-1:1)*(o<0?1/-o:o)}function $n(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function On(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dn(t){let e,r,i;function o(t,i,o=0,n=t.length){if(o<n){if(0!==e(i,i))return n;do{const e=o+n>>>1;r(t[e],i)<0?o=e+1:n=e}while(o<n)}return o}return 2!==t.length?(e=$n,r=(e,r)=>$n(t(e),r),i=(e,r)=>t(e)-r):(e=t===$n||t===On?t:In,r=t,i=t),{left:o,center:function(t,e,r=0,n=t.length){const a=o(t,e,r,n-1);return a>r&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,o=0,n=t.length){if(o<n){if(0!==e(i,i))return n;do{const e=o+n>>>1;r(t[e],i)<=0?o=e+1:n=e}while(o<n)}return o}}}function In(){return 0}const qn=Dn($n),Rn=qn.right,zn=(qn.left,Dn(function(t){return null===t?NaN:+t}).center,Rn);function Kn(t,e){var r,i=e?e.length:0,o=t?Math.min(i,t.length):0,n=new Array(o),a=new Array(i);for(r=0;r<o;++r)n[r]=jn(t[r],e[r]);for(;r<i;++r)a[r]=e[r];return function(t){for(r=0;r<o;++r)a[r]=n[r](t);return a}}function Pn(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function Nn(t,e){var r,i={},o={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?i[r]=jn(t[r],e[r]):o[r]=e[r];return function(t){for(r in i)o[r]=i[r](t);return o}}function Wn(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,o=e.slice();return function(n){for(r=0;r<i;++r)o[r]=t[r]*(1-n)+e[r]*n;return o}}function jn(t,e){var r,i,o=typeof e;return null==e||"boolean"===o?qr(e):("number"===o?Pe:"string"===o?(r=mr(e))?(e=r,Pr):Hr:e instanceof mr?Pr:e instanceof Date?Pn:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Kn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Nn:Pe:Wn))(t,e)}function Hn(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function Un(t){return+t}r.dn(function(t,e){return((void 0)(e)?void 0:Kn)(t,e)}),r.dn(Pn),r.dn(Nn),r.dn(Wn),r.dn(jn),r.dn(Hn);var Yn=[0,1];function Gn(t){return t}function Xn(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function Vn(t,e,r){var i=t[0],o=t[1],n=e[0],a=e[1];return o<i?(i=Xn(o,i),n=r(a,n)):(i=Xn(i,o),n=r(n,a)),function(t){return n(i(t))}}function Zn(t,e,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),n=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)o[a]=Xn(t[a],t[a+1]),n[a]=r(e[a],e[a+1]);return function(e){var r=zn(t,e,1,i)-1;return n[r](o[r](e))}}function Qn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Jn(){var t,e,r,i,o,n,a=Yn,s=Yn,l=jn,h=Gn;function c(){var t,e,r,l=Math.min(a.length,s.length);return h!==Gn&&(t=a[0],e=a[l-1],t>e&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?Zn:Vn,o=n=null,d}function d(e){return null==e||isNaN(e=+e)?r:(o||(o=i(a.map(t),s,l)))(t(h(e)))}return d.invert=function(r){return h(e((n||(n=i(s,a.map(t),Pe)))(r)))},d.domain=function(t){return arguments.length?(a=Array.from(t,Un),c()):a.slice()},d.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},d.rangeRound=function(t){return s=Array.from(t),l=Hn,c()},d.clamp=function(t){return arguments.length?(h=!!t||Gn,c()):h!==Gn},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,i){return t=r,e=i,c()}}function ta(){return Jn()(Gn,Gn)}function ea(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3)))-oo(Math.abs(t)))}function ra(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,oo(e)-oo(t))+1}function ia(t){return Math.max(0,-oo(Math.abs(t)))}function oa(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[o,n,a]=i?Fn(e,t,r):Fn(t,e,r);if(!(n>=o))return[];const s=n-o+1,l=new Array(s);if(i)if(a<0)for(let h=0;h<s;++h)l[h]=(n-h)/-a;else for(let h=0;h<s;++h)l[h]=(n-h)*a;else if(a<0)for(let h=0;h<s;++h)l[h]=(o+h)/-a;else for(let h=0;h<s;++h)l[h]=(o+h)*a;return l}(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var i=e();return function(t,e,r,i){var o,n=En(t,e,r);switch((i=ho(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=ea(n,a))||(i.precision=o),xo(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=ra(n,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=ia(n))||(i.precision=o-2*("%"===i.type))}return Co(i)}(i[0],i[i.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var i,o,n=e(),a=0,s=n.length-1,l=n[a],h=n[s],c=10;for(h<l&&(o=l,l=h,h=o,o=a,a=s,s=o);c-- >0;){if((o=Mn(l,h,r))===i)return n[a]=l,n[s]=h,e(n);if(o>0)l=Math.floor(l/o)*o,h=Math.ceil(h/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,h=Math.floor(h*o)/o}i=o}return t},t}function na(){var t=ta();return t.copy=function(){return Qn(t,na())},Cn.apply(t,arguments),oa(t)}r.dn(ea),r.dn(ra),r.dn(ia);const aa=1e3,sa=6e4,la=36e5,ha=864e5,ca=6048e5,da=2592e6,ua=31536e6,pa=new Date,ga=new Date;function fa(t,e,r,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,i,n)=>{const a=[];if(r=o.ceil(r),n=null==n?1:Math.floor(n),!(r<i&&n>0))return a;let s;do{a.push(s=new Date(+r)),e(r,n),t(r)}while(s<r&&r<i);return a},o.filter=r=>fa(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(o.count=(e,i)=>(pa.setTime(+e),ga.setTime(+i),t(pa),t(ga),Math.floor(r(pa,ga))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t===0:e=>o.count(0,e)%t===0):o:null)),o}const ya=fa(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ya.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?fa(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):ya:null);ya.range;const ma=fa(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*aa)},(t,e)=>(e-t)/aa,t=>t.getUTCSeconds()),Ca=(ma.range,fa(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*aa)},(t,e)=>{t.setTime(+t+e*sa)},(t,e)=>(e-t)/sa,t=>t.getMinutes())),xa=(Ca.range,fa(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*sa)},(t,e)=>(e-t)/sa,t=>t.getUTCMinutes())),ba=(xa.range,fa(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*aa-t.getMinutes()*sa)},(t,e)=>{t.setTime(+t+e*la)},(t,e)=>(e-t)/la,t=>t.getHours())),ka=(ba.range,fa(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*la)},(t,e)=>(e-t)/la,t=>t.getUTCHours())),wa=(ka.range,fa(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*sa)/ha,t=>t.getDate()-1)),Ta=(wa.range,fa(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ha,t=>t.getUTCDate()-1)),Sa=(Ta.range,fa(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ha,t=>Math.floor(t/ha)));Sa.range;function Ba(t){return fa(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*sa)/ca)}const va=Ba(0),_a=Ba(1),Aa=Ba(2),La=Ba(3),Fa=Ba(4),Ma=Ba(5),Ea=Ba(6);va.range,_a.range,Aa.range,La.range,Fa.range,Ma.range,Ea.range;function $a(t){return fa(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/ca)}const Oa=$a(0),Da=$a(1),Ia=$a(2),qa=$a(3),Ra=$a(4),za=$a(5),Ka=$a(6),Pa=(Oa.range,Da.range,Ia.range,qa.range,Ra.range,za.range,Ka.range,fa(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),Na=(Pa.range,fa(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),Wa=(Na.range,fa(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));Wa.every=t=>isFinite(t=Math.floor(t))&&t>0?fa(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null;Wa.range;const ja=fa(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ja.every=t=>isFinite(t=Math.floor(t))&&t>0?fa(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null;ja.range;function Ha(t,e,r,i,o,n){const a=[[ma,1,aa],[ma,5,5e3],[ma,15,15e3],[ma,30,3e4],[n,1,sa],[n,5,3e5],[n,15,9e5],[n,30,18e5],[o,1,la],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,ha],[i,2,1728e5],[r,1,ca],[e,1,da],[e,3,7776e6],[t,1,ua]];function s(e,r,i){const o=Math.abs(r-e)/i,n=Dn(([,,t])=>t).right(a,o);if(n===a.length)return t.every(En(e/ua,r/ua,i));if(0===n)return ya.every(Math.max(En(e,r,i),1));const[s,l]=a[o/a[n-1][2]<a[n][2]/o?n-1:n];return s.every(l)}return[function(t,e,r){const i=e<t;i&&([t,e]=[e,t]);const o=r&&"function"==typeof r.range?r:s(t,e,r),n=o?o.range(t,+e+1):[];return i?n.reverse():n},s]}const[Ua,Ya]=Ha(ja,Na,Oa,Sa,ka,xa),[Ga,Xa]=Ha(Wa,Pa,va,wa,ba,Ca);function Va(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Za(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Qa(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var Ja,ts,es={"-":"",_:" ",0:"0"},rs=/^\s*\d+/,is=/^%/,os=/[\\^$*+?|[\]().{}]/g;function ns(t,e,r){var i=t<0?"-":"",o=(i?-t:t)+"",n=o.length;return i+(n<r?new Array(r-n+1).join(e)+o:o)}function as(t){return t.replace(os,"\\$&")}function ss(t){return new RegExp("^(?:"+t.map(as).join("|")+")","i")}function ls(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function hs(t,e,r){var i=rs.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function cs(t,e,r){var i=rs.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function ds(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function us(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function ps(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function gs(t,e,r){var i=rs.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function fs(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function ys(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function ms(t,e,r){var i=rs.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function Cs(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function xs(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function bs(t,e,r){var i=rs.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function ks(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function ws(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Ts(t,e,r){var i=rs.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Ss(t,e,r){var i=rs.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Bs(t,e,r){var i=rs.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function vs(t,e,r){var i=is.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function _s(t,e,r){var i=rs.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function As(t,e,r){var i=rs.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Ls(t,e){return ns(t.getDate(),e,2)}function Fs(t,e){return ns(t.getHours(),e,2)}function Ms(t,e){return ns(t.getHours()%12||12,e,2)}function Es(t,e){return ns(1+wa.count(Wa(t),t),e,3)}function $s(t,e){return ns(t.getMilliseconds(),e,3)}function Os(t,e){return $s(t,e)+"000"}function Ds(t,e){return ns(t.getMonth()+1,e,2)}function Is(t,e){return ns(t.getMinutes(),e,2)}function qs(t,e){return ns(t.getSeconds(),e,2)}function Rs(t){var e=t.getDay();return 0===e?7:e}function zs(t,e){return ns(va.count(Wa(t)-1,t),e,2)}function Ks(t){var e=t.getDay();return e>=4||0===e?Fa(t):Fa.ceil(t)}function Ps(t,e){return t=Ks(t),ns(Fa.count(Wa(t),t)+(4===Wa(t).getDay()),e,2)}function Ns(t){return t.getDay()}function Ws(t,e){return ns(_a.count(Wa(t)-1,t),e,2)}function js(t,e){return ns(t.getFullYear()%100,e,2)}function Hs(t,e){return ns((t=Ks(t)).getFullYear()%100,e,2)}function Us(t,e){return ns(t.getFullYear()%1e4,e,4)}function Ys(t,e){var r=t.getDay();return ns((t=r>=4||0===r?Fa(t):Fa.ceil(t)).getFullYear()%1e4,e,4)}function Gs(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ns(e/60|0,"0",2)+ns(e%60,"0",2)}function Xs(t,e){return ns(t.getUTCDate(),e,2)}function Vs(t,e){return ns(t.getUTCHours(),e,2)}function Zs(t,e){return ns(t.getUTCHours()%12||12,e,2)}function Qs(t,e){return ns(1+Ta.count(ja(t),t),e,3)}function Js(t,e){return ns(t.getUTCMilliseconds(),e,3)}function tl(t,e){return Js(t,e)+"000"}function el(t,e){return ns(t.getUTCMonth()+1,e,2)}function rl(t,e){return ns(t.getUTCMinutes(),e,2)}function il(t,e){return ns(t.getUTCSeconds(),e,2)}function ol(t){var e=t.getUTCDay();return 0===e?7:e}function nl(t,e){return ns(Oa.count(ja(t)-1,t),e,2)}function al(t){var e=t.getUTCDay();return e>=4||0===e?Ra(t):Ra.ceil(t)}function sl(t,e){return t=al(t),ns(Ra.count(ja(t),t)+(4===ja(t).getUTCDay()),e,2)}function ll(t){return t.getUTCDay()}function hl(t,e){return ns(Da.count(ja(t)-1,t),e,2)}function cl(t,e){return ns(t.getUTCFullYear()%100,e,2)}function dl(t,e){return ns((t=al(t)).getUTCFullYear()%100,e,2)}function ul(t,e){return ns(t.getUTCFullYear()%1e4,e,4)}function pl(t,e){var r=t.getUTCDay();return ns((t=r>=4||0===r?Ra(t):Ra.ceil(t)).getUTCFullYear()%1e4,e,4)}function gl(){return"+0000"}function fl(){return"%"}function yl(t){return+t}function ml(t){return Math.floor(+t/1e3)}function Cl(t){return new Date(t)}function xl(t){return t instanceof Date?+t:+new Date(+t)}function bl(t,e,r,i,o,n,a,s,l,h){var c=ta(),d=c.invert,u=c.domain,p=h(".%L"),g=h(":%S"),f=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),C=h("%b %d"),x=h("%B"),b=h("%Y");function k(t){return(l(t)<t?p:s(t)<t?g:a(t)<t?f:n(t)<t?y:i(t)<t?o(t)<t?m:C:r(t)<t?x:b)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?u(Array.from(t,xl)):u().map(Cl)},c.ticks=function(e){var r=u();return t(r[0],r[r.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?k:h(e)},c.nice=function(t){var r=u();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],null==t?10:t)),t?u(function(t,e){var r,i=0,o=(t=t.slice()).length-1,n=t[i],a=t[o];return a<n&&(r=i,i=o,o=r,r=n,n=a,a=r),t[i]=e.floor(n),t[o]=e.ceil(a),t}(r,t)):c},c.copy=function(){return Qn(c,bl(t,e,r,i,o,n,a,s,l,h))},c}function kl(){return Cn.apply(bl(Ga,Xa,Wa,Pa,va,wa,ba,Ca,ma,ts).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function wl(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(6*i,6*++i);return r}!function(t){Ja=function(t){var e=t.dateTime,r=t.date,i=t.time,o=t.periods,n=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,h=ss(o),c=ls(o),d=ss(n),u=ls(n),p=ss(a),g=ls(a),f=ss(s),y=ls(s),m=ss(l),C=ls(l),x={a:function(t){return a[t.getDay()]},A:function(t){return n[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ls,e:Ls,f:Os,g:Hs,G:Ys,H:Fs,I:Ms,j:Es,L:$s,m:Ds,M:Is,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:yl,s:ml,S:qs,u:Rs,U:zs,V:Ps,w:Ns,W:Ws,x:null,X:null,y:js,Y:Us,Z:Gs,"%":fl},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return n[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Xs,e:Xs,f:tl,g:dl,G:pl,H:Vs,I:Zs,j:Qs,L:Js,m:el,M:rl,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:yl,s:ml,S:il,u:ol,U:nl,V:sl,w:ll,W:hl,x:null,X:null,y:cl,Y:ul,Z:gl,"%":fl},k={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=g.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=d.exec(e.slice(r));return i?(t.w=u.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=C.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=f.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return S(t,e,r,i)},d:xs,e:xs,f:Bs,g:fs,G:gs,H:ks,I:ks,j:bs,L:Ss,m:Cs,M:ws,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:ms,Q:_s,s:As,S:Ts,u:cs,U:ds,V:us,w:hs,W:ps,x:function(t,e,i){return S(t,r,e,i)},X:function(t,e,r){return S(t,i,e,r)},y:fs,Y:gs,Z:ys,"%":vs};function w(t,e){return function(r){var i,o,n,a=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s<h;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(o=es[i=t.charAt(++s)])?i=t.charAt(++s):o="e"===i?" ":"0",(n=e[i])&&(i=n(r,o)),a.push(i),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function T(t,e){return function(r){var i,o,n=Qa(1900,void 0,1);if(S(n,t,r+="",0)!=r.length)return null;if("Q"in n)return new Date(n.Q);if("s"in n)return new Date(1e3*n.s+("L"in n?n.L:0));if(e&&!("Z"in n)&&(n.Z=0),"p"in n&&(n.H=n.H%12+12*n.p),void 0===n.m&&(n.m="q"in n?n.q:0),"V"in n){if(n.V<1||n.V>53)return null;"w"in n||(n.w=1),"Z"in n?(o=(i=Za(Qa(n.y,0,1))).getUTCDay(),i=o>4||0===o?Da.ceil(i):Da(i),i=Ta.offset(i,7*(n.V-1)),n.y=i.getUTCFullYear(),n.m=i.getUTCMonth(),n.d=i.getUTCDate()+(n.w+6)%7):(o=(i=Va(Qa(n.y,0,1))).getDay(),i=o>4||0===o?_a.ceil(i):_a(i),i=wa.offset(i,7*(n.V-1)),n.y=i.getFullYear(),n.m=i.getMonth(),n.d=i.getDate()+(n.w+6)%7)}else("W"in n||"U"in n)&&("w"in n||(n.w="u"in n?n.u%7:"W"in n?1:0),o="Z"in n?Za(Qa(n.y,0,1)).getUTCDay():Va(Qa(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(o+5)%7:n.w+7*n.U-(o+6)%7);return"Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,Za(n)):Va(n)}}function S(t,e,r,i){for(var o,n,a=0,s=e.length,l=r.length;a<s;){if(i>=l)return-1;if(37===(o=e.charCodeAt(a++))){if(o=e.charAt(a++),!(n=k[o in es?e.charAt(a++):o])||(i=n(t,r,i))<0)return-1}else if(o!=r.charCodeAt(i++))return-1}return i}return x.x=w(r,x),x.X=w(i,x),x.c=w(e,x),b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}}}(t),ts=Ja.format,Ja.parse,Ja.utcFormat,Ja.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),r.dn(wl);const Tl=wl("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Sl(t){return"string"==typeof t?new ae([[document.querySelector(t)]],[document.documentElement]):new ae([[t]],ne)}function Bl(t){return function(){return t}}r.dn(Sl),r.dn(Bl);const vl=Math.abs,_l=Math.atan2,Al=Math.cos,Ll=Math.max,Fl=Math.min,Ml=Math.sin,El=Math.sqrt,$l=1e-12,Ol=Math.PI,Dl=Ol/2,Il=2*Ol;function ql(t){return t>=1?Dl:t<=-1?-Dl:Math.asin(t)}const Rl=Math.PI,zl=2*Rl,Kl=1e-6,Pl=zl-Kl;function Nl(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class Wl{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Nl:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Nl;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,o,n){this._append`C${+t},${+e},${+r},${+i},${this._x1=+o},${this._y1=+n}`}arcTo(t,e,r,i,o){if(t=+t,e=+e,r=+r,i=+i,(o=+o)<0)throw new Error(`negative radius: ${o}`);let n=this._x1,a=this._y1,s=r-t,l=i-e,h=n-t,c=a-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>Kl)if(Math.abs(c*s-l*h)>Kl&&o){let u=r-n,p=i-a,g=s*s+l*l,f=u*u+p*p,y=Math.sqrt(g),m=Math.sqrt(d),C=o*Math.tan((Rl-Math.acos((g+d-f)/(2*y*m)))/2),x=C/m,b=C/y;Math.abs(x-1)>Kl&&this._append`L${t+x*h},${e+x*c}`,this._append`A${o},${o},0,0,${+(c*u>h*p)},${this._x1=t+b*s},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,i,o,n){if(t=+t,e=+e,n=!!n,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),s=r*Math.sin(i),l=t+a,h=e+s,c=1^n,d=n?i-o:o-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Kl||Math.abs(this._y1-h)>Kl)&&this._append`L${l},${h}`,r&&(d<0&&(d=d%zl+zl),d>Pl?this._append`A${r},${r},0,1,${c},${t-a},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:d>Kl&&this._append`A${r},${r},0,${+(d>=Rl)},${c},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function jl(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Wl(e)}function Hl(t){return t.innerRadius}function Ul(t){return t.outerRadius}function Yl(t){return t.startAngle}function Gl(t){return t.endAngle}function Xl(t){return t&&t.padAngle}function Vl(t,e,r,i,o,n,a){var s=t-r,l=e-i,h=(a?n:-n)/El(s*s+l*l),c=h*l,d=-h*s,u=t+c,p=e+d,g=r+c,f=i+d,y=(u+g)/2,m=(p+f)/2,C=g-u,x=f-p,b=C*C+x*x,k=o-n,w=u*f-g*p,T=(x<0?-1:1)*El(Ll(0,k*k*b-w*w)),S=(w*x-C*T)/b,B=(-w*C-x*T)/b,v=(w*x+C*T)/b,_=(-w*C+x*T)/b,A=S-y,L=B-m,F=v-y,M=_-m;return A*A+L*L>F*F+M*M&&(S=v,B=_),{cx:S,cy:B,x01:-c,y01:-d,x11:S*(o/k-1),y11:B*(o/k-1)}}function Zl(){var t=Hl,e=Ul,r=Bl(0),i=null,o=Yl,n=Gl,a=Xl,s=null,l=jl(h);function h(){var h,c,d,u=+t.apply(this,arguments),p=+e.apply(this,arguments),g=o.apply(this,arguments)-Dl,f=n.apply(this,arguments)-Dl,y=vl(f-g),m=f>g;if(s||(s=h=l()),p<u&&(c=p,p=u,u=c),p>$l)if(y>Il-$l)s.moveTo(p*Al(g),p*Ml(g)),s.arc(0,0,p,g,f,!m),u>$l&&(s.moveTo(u*Al(f),u*Ml(f)),s.arc(0,0,u,f,g,m));else{var C,x,b=g,k=f,w=g,T=f,S=y,B=y,v=a.apply(this,arguments)/2,_=v>$l&&(i?+i.apply(this,arguments):El(u*u+p*p)),A=Fl(vl(p-u)/2,+r.apply(this,arguments)),L=A,F=A;if(_>$l){var M=ql(_/u*Ml(v)),E=ql(_/p*Ml(v));(S-=2*M)>$l?(w+=M*=m?1:-1,T-=M):(S=0,w=T=(g+f)/2),(B-=2*E)>$l?(b+=E*=m?1:-1,k-=E):(B=0,b=k=(g+f)/2)}var $=p*Al(b),O=p*Ml(b),D=u*Al(T),I=u*Ml(T);if(A>$l){var q,R=p*Al(k),z=p*Ml(k),K=u*Al(w),P=u*Ml(w);if(y<Ol)if(q=function(t,e,r,i,o,n,a,s){var l=r-t,h=i-e,c=a-o,d=s-n,u=d*l-c*h;if(!(u*u<$l))return[t+(u=(c*(e-n)-d*(t-o))/u)*l,e+u*h]}($,O,K,P,R,z,D,I)){var N=$-q[0],W=O-q[1],j=R-q[0],H=z-q[1],U=1/Ml(((d=(N*j+W*H)/(El(N*N+W*W)*El(j*j+H*H)))>1?0:d<-1?Ol:Math.acos(d))/2),Y=El(q[0]*q[0]+q[1]*q[1]);L=Fl(A,(u-Y)/(U-1)),F=Fl(A,(p-Y)/(U+1))}else L=F=0}B>$l?F>$l?(C=Vl(K,P,$,O,p,F,m),x=Vl(R,z,D,I,p,F,m),s.moveTo(C.cx+C.x01,C.cy+C.y01),F<A?s.arc(C.cx,C.cy,F,_l(C.y01,C.x01),_l(x.y01,x.x01),!m):(s.arc(C.cx,C.cy,F,_l(C.y01,C.x01),_l(C.y11,C.x11),!m),s.arc(0,0,p,_l(C.cy+C.y11,C.cx+C.x11),_l(x.cy+x.y11,x.cx+x.x11),!m),s.arc(x.cx,x.cy,F,_l(x.y11,x.x11),_l(x.y01,x.x01),!m))):(s.moveTo($,O),s.arc(0,0,p,b,k,!m)):s.moveTo($,O),u>$l&&S>$l?L>$l?(C=Vl(D,I,R,z,u,-L,m),x=Vl($,O,K,P,u,-L,m),s.lineTo(C.cx+C.x01,C.cy+C.y01),L<A?s.arc(C.cx,C.cy,L,_l(C.y01,C.x01),_l(x.y01,x.x01),!m):(s.arc(C.cx,C.cy,L,_l(C.y01,C.x01),_l(C.y11,C.x11),!m),s.arc(0,0,u,_l(C.cy+C.y11,C.cx+C.x11),_l(x.cy+x.y11,x.cx+x.x11),m),s.arc(x.cx,x.cy,L,_l(x.y11,x.x11),_l(x.y01,x.x01),!m))):s.arc(0,0,u,T,w,m):s.lineTo(D,I)}else s.moveTo(0,0);if(s.closePath(),h)return s=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+o.apply(this,arguments)+ +n.apply(this,arguments))/2-Ol/2;return[Al(i)*r,Ml(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Bl(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Bl(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:Bl(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Bl(+t),h):i},h.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:Bl(+t),h):o},h.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:Bl(+t),h):n},h.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Bl(+t),h):a},h.context=function(t){return arguments.length?(s=null==t?null:t,h):s},h}r.dn(Zl),r.dn(Ql);Array.prototype.slice;function Ql(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Jl(t){this._context=t}function th(t){return new Jl(t)}function eh(t){return t[0]}function rh(t){return t[1]}function ih(t,e){var r=Bl(!0),i=null,o=th,n=null,a=jl(s);function s(s){var l,h,c,d=(s=Ql(s)).length,u=!1;for(null==i&&(n=o(c=a())),l=0;l<=d;++l)!(l<d&&r(h=s[l],l,s))===u&&((u=!u)?n.lineStart():n.lineEnd()),u&&n.point(+t(h,l,s),+e(h,l,s));if(c)return n=null,c+""||null}return t="function"==typeof t?t:void 0===t?eh:Bl(t),e="function"==typeof e?e:void 0===e?rh:Bl(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Bl(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Bl(+t),s):e},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:Bl(!!t),s):r},s.curve=function(t){return arguments.length?(o=t,null!=i&&(n=o(i)),s):o},s.context=function(t){return arguments.length?(null==t?i=n=null:n=o(i=t),s):i},s}function oh(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function nh(t){return t}function ah(){var t=nh,e=oh,r=null,i=Bl(0),o=Bl(Il),n=Bl(0);function a(a){var s,l,h,c,d,u=(a=Ql(a)).length,p=0,g=new Array(u),f=new Array(u),y=+i.apply(this,arguments),m=Math.min(Il,Math.max(-Il,o.apply(this,arguments)-y)),C=Math.min(Math.abs(m)/u,n.apply(this,arguments)),x=C*(m<0?-1:1);for(s=0;s<u;++s)(d=f[g[s]=s]=+t(a[s],s,a))>0&&(p+=d);for(null!=e?g.sort(function(t,r){return e(f[t],f[r])}):null!=r&&g.sort(function(t,e){return r(a[t],a[e])}),s=0,h=p?(m-u*x)/p:0;s<u;++s,y=c)l=g[s],c=y+((d=f[l])>0?d*h:0)+x,f[l]={data:a[l],index:s,value:d,startAngle:y,endAngle:c,padAngle:C};return f}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Bl(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,r=null,a):e},a.sort=function(t){return arguments.length?(r=t,e=null,a):r},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Bl(+t),a):i},a.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Bl(+t),a):o},a.padAngle=function(t){return arguments.length?(n="function"==typeof t?t:Bl(+t),a):n},a}function sh(){}function lh(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function hh(t){this._context=t}function ch(t){return new hh(t)}function dh(t){this._context=t}function uh(t){return new dh(t)}function ph(t){this._context=t}function gh(t){return new ph(t)}r.dn(th),Jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},r.dn(ih),r.dn(oh),r.dn(nh),r.dn(ah),r.dn(sh),r.dn(ch),hh.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:lh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},r.dn(uh),dh.prototype={areaStart:sh,areaEnd:sh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:lh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},r.dn(gh),ph.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:lh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class fh{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function yh(t){return new fh(t,!0)}function mh(t){return new fh(t,!1)}function Ch(t,e){this._basis=new hh(t),this._beta=e}Ch.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],n=e[0],a=t[r]-o,s=e[r]-n,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*a),this._beta*e[l]+(1-this._beta)*(n+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const xh=function t(e){function r(t){return 1===e?new hh(t):new Ch(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function bh(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function kh(t,e){this._context=t,this._k=(1-e)/6}kh.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:bh(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:bh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const wh=function t(e){function r(t){return new kh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Th(t,e){this._context=t,this._k=(1-e)/6}Th.prototype={areaStart:sh,areaEnd:sh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Sh=function t(e){function r(t){return new Th(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Bh(t,e){this._context=t,this._k=(1-e)/6}Bh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vh=function t(e){function r(t){return new Bh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _h(t,e,r){var i=t._x1,o=t._y1,n=t._x2,a=t._y2;if(t._l01_a>$l){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>$l){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*h+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,o,n,a,t._x2,t._y2)}function Ah(t,e){this._context=t,this._alpha=e}Ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:_h(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Lh=function t(e){function r(t){return e?new Ah(t,e):new kh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Fh(t,e){this._context=t,this._alpha=e}Fh.prototype={areaStart:sh,areaEnd:sh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_h(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mh=function t(e){function r(t){return e?new Fh(t,e):new Th(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Eh(t,e){this._context=t,this._alpha=e}Eh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_h(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $h=function t(e){function r(t){return e?new Eh(t,e):new Bh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Oh(t){this._context=t}function Dh(t){return new Oh(t)}function Ih(t){return t<0?-1:1}function qh(t,e,r){var i=t._x1-t._x0,o=e-t._x1,n=(t._y1-t._y0)/(i||o<0&&-0),a=(r-t._y1)/(o||i<0&&-0),s=(n*o+a*i)/(i+o);return(Ih(n)+Ih(a))*Math.min(Math.abs(n),Math.abs(a),.5*Math.abs(s))||0}function Rh(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function zh(t,e,r){var i=t._x0,o=t._y0,n=t._x1,a=t._y1,s=(n-i)/3;t._context.bezierCurveTo(i+s,o+s*e,n-s,a-s*r,n,a)}function Kh(t){this._context=t}function Ph(t){this._context=new Nh(t)}function Nh(t){this._context=t}function Wh(t){return new Kh(t)}function jh(t){return new Ph(t)}function Hh(t){this._context=t}function Uh(t){var e,r,i=t.length-1,o=new Array(i),n=new Array(i),a=new Array(i);for(o[0]=0,n[0]=2,a[0]=t[0]+2*t[1],e=1;e<i-1;++e)o[e]=1,n[e]=4,a[e]=4*t[e]+2*t[e+1];for(o[i-1]=2,n[i-1]=7,a[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=o[e]/n[e-1],n[e]-=r,a[e]-=r*a[e-1];for(o[i-1]=a[i-1]/n[i-1],e=i-2;e>=0;--e)o[e]=(a[e]-o[e+1])/n[e];for(n[i-1]=(t[i]+o[i-1])/2,e=0;e<i-1;++e)n[e]=2*t[e+1]-o[e+1];return[o,n]}function Yh(t){return new Hh(t)}function Gh(t,e){this._context=t,this._t=e}function Xh(t){return new Gh(t,.5)}function Vh(t){return new Gh(t,0)}function Zh(t){return new Gh(t,1)}function Qh(t,e,r){this.k=t,this.x=e,this.y=r}r.dn(Dh),Oh.prototype={areaStart:sh,areaEnd:sh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Kh.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:zh(this,this._t0,Rh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,zh(this,Rh(this,r=qh(this,t,e)),r);break;default:zh(this,this._t0,r=qh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Ph.prototype=Object.create(Kh.prototype)).point=function(t,e){Kh.prototype.point.call(this,e,t)},Nh.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,n){this._context.bezierCurveTo(e,t,i,r,n,o)}},r.dn(Yh),Hh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=Uh(t),o=Uh(e),n=0,a=1;a<r;++n,++a)this._context.bezierCurveTo(i[0][n],o[0][n],i[1][n],o[1][n],t[a],e[a]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},r.dn(Xh),Gh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Qh.prototype={constructor:Qh,scale:function(t){return 1===t?this:new Qh(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Qh(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Jh,tc,ec,rc,ic,oc,nc,ac;new Qh(1,0,0);function sc(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function lc(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function hc(){return this.__zoom||ic}function cc(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function dc(){return navigator.maxTouchPoints||"ontouchstart"in this}function uc(t,e,r){var i=t.invertX(e[0][0])-r[0][0],o=t.invertX(e[1][0])-r[1][0],n=t.invertY(e[0][1])-r[0][1],a=t.invertY(e[1][1])-r[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a))}Qh.prototype,r.dn(function(){var t,e,r,i=sc,o=lc,n=uc,a=cc,s=dc,l=[0,1/0],h=[[-1/0,-1/0],[1/0,1/0]],c=250,d=void 0,u=(void 0)("start","zoom","end"),p=0,g=10;function f(t){t.property("__zoom",hc).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",S).filter(s).on("touchstart.zoom",B).on("touchmove.zoom",v).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new oc(e,t.x,t.y)}function m(t,e,r){var i=e[0]-r[0]*t.k,o=e[1]-r[1]*t.k;return i===t.x&&o===t.y?t:new oc(t.k,i,o)}function C(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,r,i){t.on("start.zoom",function(){b(this,arguments).event(i).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(i).end()}).tween("zoom",function(){var t=this,n=arguments,a=b(t,n).event(i),s=o.apply(t,n),l=null==r?C(s):"function"==typeof r?r.apply(t,n):r,h=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=t.__zoom,u="function"==typeof e?e.apply(t,n):e,p=d(c.invert(l).concat(h/c.k),u.invert(l).concat(h/u.k));return function(t){if(1===t)t=u;else{var e=p(t),r=h/e[2];t=new oc(r,l[0]-e[0]*r,l[1]-e[1]*r)}a.zoom(null,t)}})}function b(t,e,r){return!r&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function w(t,...e){if(i.apply(this,arguments)){var r=b(this,e).event(t),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,a.apply(this,arguments)))),c=Jh(t);if(r.wheel)r.mouse[0][0]===c[0]&&r.mouse[0][1]===c[1]||(r.mouse[1]=o.invert(r.mouse[0]=c)),clearTimeout(r.wheel);else{if(o.k===s)return;r.mouse=[c,o.invert(c)],ec(this),r.start()}nc(t),r.wheel=setTimeout(function(){r.wheel=null,r.end()},150),r.zoom("mouse",n(m(y(o,s),r.mouse[0],r.mouse[1]),r.extent,h))}}function T(t,...e){if(!r&&i.apply(this,arguments)){var o=t.currentTarget,a=b(this,e,!0).event(t),s=tc(t.view).on("mousemove.zoom",function(t){if(nc(t),!a.moved){var e=t.clientX-c,r=t.clientY-d;a.moved=e*e+r*r>p}a.event(t).zoom("mouse",n(m(a.that.__zoom,a.mouse[0]=Jh(t,o),a.mouse[1]),a.extent,h))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),(void 0)(t.view,a.moved),nc(t),a.event(t).end()},!0),l=Jh(t,o),c=t.clientX,d=t.clientY;(void 0)(t.view),ac(t),a.mouse=[l,this.__zoom.invert(l)],ec(this),a.start()}}function S(t,...e){if(i.apply(this,arguments)){var r=this.__zoom,a=Jh(t.changedTouches?t.changedTouches[0]:t,this),s=r.invert(a),l=r.k*(t.shiftKey?.5:2),d=n(m(y(r,l),a,s),o.apply(this,e),h);nc(t),c>0?tc(this).transition().duration(c).call(x,d,a,t):tc(this).call(f.transform,d,a,t)}}function B(r,...o){if(i.apply(this,arguments)){var n,a,s,l,h=r.touches,c=h.length,d=b(this,o,r.changedTouches.length===c).event(r);for(ac(r),a=0;a<c;++a)s=h[a],l=[l=Jh(s,this),this.__zoom.invert(l),s.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,n=!0,d.taps=1+!!t);t&&(t=clearTimeout(t)),n&&(d.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),ec(this),d.start())}}function v(t,...e){if(this.__zooming){var r,i,o,a,s=b(this,e).event(t),l=t.changedTouches,c=l.length;for(nc(t),r=0;r<c;++r)i=l[r],o=Jh(i,this),s.touch0&&s.touch0[2]===i.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===i.identifier&&(s.touch1[0]=o);if(i=s.that.__zoom,s.touch1){var d=s.touch0[0],u=s.touch0[1],p=s.touch1[0],g=s.touch1[1],f=(f=p[0]-d[0])*f+(f=p[1]-d[1])*f,C=(C=g[0]-u[0])*C+(C=g[1]-u[1])*C;i=y(i,Math.sqrt(f/C)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],a=[(u[0]+g[0])/2,(u[1]+g[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],a=s.touch0[1]}s.zoom("touch",n(m(i,o,a),s.extent,h))}}function _(t,...i){if(this.__zooming){var o,n,a=b(this,i).event(t),s=t.changedTouches,l=s.length;for(ac(t),r&&clearTimeout(r),r=setTimeout(function(){r=null},500),o=0;o<l;++o)n=s[o],a.touch0&&a.touch0[2]===n.identifier?delete a.touch0:a.touch1&&a.touch1[2]===n.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(n=Jh(n,this),Math.hypot(e[0]-n[0],e[1]-n[1])<g)){var h=tc(this).on("dblclick.zoom");h&&h.apply(this,arguments)}}}return f.transform=function(t,e,r,i){var o=t.selection?t.selection():t;o.property("__zoom",hc),t!==o?x(t,e,r,i):o.interrupt().each(function(){b(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},f.scaleBy=function(t,e,r,i){f.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},r,i)},f.scaleTo=function(t,e,r,i){f.transform(t,function(){var t=o.apply(this,arguments),i=this.__zoom,a=null==r?C(t):"function"==typeof r?r.apply(this,arguments):r,s=i.invert(a),l="function"==typeof e?e.apply(this,arguments):e;return n(m(y(i,l),a,s),t,h)},r,i)},f.translateBy=function(t,e,r,i){f.transform(t,function(){return n(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),o.apply(this,arguments),h)},null,i)},f.translateTo=function(t,e,r,i,a){f.transform(t,function(){var t=o.apply(this,arguments),a=this.__zoom,s=null==i?C(t):"function"==typeof i?i.apply(this,arguments):i;return n(ic.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof r?-r.apply(this,arguments):-r),t,h)},i,a)},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=tc(this.that).datum();u.call(t,this.that,new(void 0)(t,{sourceEvent:this.sourceEvent,target:f,type:t,transform:this.that.__zoom,dispatch:u}),e)}},f.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:rc(+t),f):a},f.filter=function(t){return arguments.length?(i="function"==typeof t?t:rc(!!t),f):i},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:rc(!!t),f):s},f.extent=function(t){return arguments.length?(o="function"==typeof t?t:rc([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),f):o},f.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],f):[l[0],l[1]]},f.translateExtent=function(t){return arguments.length?(h[0][0]=+t[0][0],h[1][0]=+t[1][0],h[0][1]=+t[0][1],h[1][1]=+t[1][1],f):[[h[0][0],h[0][1]],[h[1][0],h[1][1]]]},f.constrain=function(t){return arguments.length?(n=t,f):n},f.duration=function(t){return arguments.length?(c=+t,f):c},f.interpolate=function(t){return arguments.length?(d=t,f):d},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,f):Math.sqrt(p)},f.tapDistance=function(t){return arguments.length?(g=+t,f):g},f})},2527(t,e,r){"use strict";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,o,n,a,s=[],l=!0,h=!1;try{if(n=(r=r.call(t)).next,0===e);else for(;!(l=(i=n.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(h)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(e,{A:()=>yt});const n=Object.entries,a=Object.setPrototypeOf,s=Object.isFrozen,l=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let c=Object.freeze,d=Object.seal,u=Object.create,p="undefined"!=typeof Reflect&&Reflect,g=p.apply,f=p.construct;c||(c=function(t){return t}),d||(d=function(t){return t}),g||(g=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(e,i)}),f||(f=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const y=q(Array.prototype.forEach),m=q(Array.prototype.lastIndexOf),C=q(Array.prototype.pop),x=q(Array.prototype.push),b=q(Array.prototype.splice),k=Array.isArray,w=q(String.prototype.toLowerCase),T=q(String.prototype.toString),S=q(String.prototype.match),B=q(String.prototype.replace),v=q(String.prototype.indexOf),_=q(String.prototype.trim),A=q(Number.prototype.toString),L=q(Boolean.prototype.toString),F="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),M="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),E=q(Object.prototype.hasOwnProperty),$=q(Object.prototype.toString),O=q(RegExp.prototype.test),D=(I=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return f(I,e)});var I;function q(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return g(t,e,i)}}function R(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;if(a&&a(t,null),!k(e))return t;let i=e.length;for(;i--;){let o=e[i];if("string"==typeof o){const t=r(o);t!==o&&(s(e)||(e[i]=t),o=t)}t[o]=!0}return t}function z(t){for(let e=0;e<t.length;e++){E(t,e)||(t[e]=null)}return t}function K(t){const e=u(null);for(const i of n(t)){var r=o(i,2);const n=r[0],a=r[1];E(t,n)&&(k(a)?e[n]=z(a):a&&"object"==typeof a&&a.constructor===Object?e[n]=K(a):e[n]=a)}return e}function P(t,e){for(;null!==t;){const r=h(t,e);if(r){if(r.get)return q(r.get);if("function"==typeof r.value)return q(r.value)}t=l(t)}return function(){return null}}const N=c(["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"]),W=c(["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"]),j=c(["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"]),H=c(["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"]),U=c(["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"]),Y=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),G=c(["#text"]),X=c(["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"]),V=c(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Z=c(["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"]),Q=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J=d(/{{[\w\W]*|^[\w\W]*}}/g),tt=d(/<%[\w\W]*|^[\w\W]*%>/g),et=d(/\${[\w\W]*/g),rt=d(/^data-[\-\w.\u00B7-\uFFFF]+$/),it=d(/^aria-[\-\w]+$/),ot=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=d(/^(?:\w+script|data):/i),at=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),st=d(/^html$/i),lt=d(/^[a-z][.\w]*(-[.\w]+)+$/i),ht=1,ct=3,dt=7,ut=8,pt=9,gt=11,ft=function(){return"undefined"==typeof window?null:window};var yt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ft();const r=e=>t(e);if(r.version="3.4.7",r.removed=[],!e||!e.document||e.document.nodeType!==pt||!e.Element)return r.isSupported=!1,r;let i=e.document;const o=i,a=o.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,l=e.Node,h=e.Element,d=e.NodeFilter,p=e.NamedNodeMap;void 0===p&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const g=e.DOMParser,f=e.trustedTypes,I=h.prototype,q=P(I,"cloneNode"),z=P(I,"remove"),yt=P(I,"nextSibling"),mt=P(I,"childNodes"),Ct=P(I,"parentNode"),xt=P(I,"shadowRoot"),bt=P(I,"attributes"),kt=l&&l.prototype?P(l.prototype,"nodeType"):null,wt=l&&l.prototype?P(l.prototype,"nodeName"):null;if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let Tt,St="";const Bt=i,vt=Bt.implementation,_t=Bt.createNodeIterator,At=Bt.createDocumentFragment,Lt=Bt.getElementsByTagName,Ft=o.importNode;let Mt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof n&&"function"==typeof Ct&&vt&&void 0!==vt.createHTMLDocument;const Et=J,$t=tt,Ot=et,Dt=rt,It=it,qt=nt,Rt=at,zt=lt;let Kt=ot,Pt=null;const Nt=R({},[...N,...W,...j,...U,...G]);let Wt=null;const jt=R({},[...X,...V,...Z,...Q]);let Ht=Object.seal(u(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}})),Ut=null,Yt=null;const Gt=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Xt=!0,Vt=!0,Zt=!1,Qt=!0,Jt=!1,te=!0,ee=!1,re=!1,ie=!1,oe=!1,ne=!1,ae=!1,se=!0,le=!1;const he="user-content-";let ce=!0,de=!1,ue={},pe=null;const ge=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let fe=null;const ye=R({},["audio","video","img","source","image","track"]);let me=null;const Ce=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xe="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let we=ke,Te=!1,Se=null;const Be=R({},[xe,be,ke],T);let ve=R({},["mi","mo","mn","ms","mtext"]),_e=R({},["annotation-xml"]);const Ae=R({},["title","style","font","a","script"]);let Le=null;const Fe=["application/xhtml+xml","text/html"];let Me=null,Ee=null;const $e=i.createElement("form"),Oe=function(t){return t instanceof RegExp||t instanceof Function},De=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ee&&Ee===t)return;t&&"object"==typeof t||(t={}),t=K(t),Le=-1===Fe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Me="application/xhtml+xml"===Le?T:w,Pt=E(t,"ALLOWED_TAGS")&&k(t.ALLOWED_TAGS)?R({},t.ALLOWED_TAGS,Me):Nt,Wt=E(t,"ALLOWED_ATTR")&&k(t.ALLOWED_ATTR)?R({},t.ALLOWED_ATTR,Me):jt,Se=E(t,"ALLOWED_NAMESPACES")&&k(t.ALLOWED_NAMESPACES)?R({},t.ALLOWED_NAMESPACES,T):Be,me=E(t,"ADD_URI_SAFE_ATTR")&&k(t.ADD_URI_SAFE_ATTR)?R(K(Ce),t.ADD_URI_SAFE_ATTR,Me):Ce,fe=E(t,"ADD_DATA_URI_TAGS")&&k(t.ADD_DATA_URI_TAGS)?R(K(ye),t.ADD_DATA_URI_TAGS,Me):ye,pe=E(t,"FORBID_CONTENTS")&&k(t.FORBID_CONTENTS)?R({},t.FORBID_CONTENTS,Me):ge,Ut=E(t,"FORBID_TAGS")&&k(t.FORBID_TAGS)?R({},t.FORBID_TAGS,Me):K({}),Yt=E(t,"FORBID_ATTR")&&k(t.FORBID_ATTR)?R({},t.FORBID_ATTR,Me):K({}),ue=!!E(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?K(t.USE_PROFILES):t.USE_PROFILES),Xt=!1!==t.ALLOW_ARIA_ATTR,Vt=!1!==t.ALLOW_DATA_ATTR,Zt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Qt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Jt=t.SAFE_FOR_TEMPLATES||!1,te=!1!==t.SAFE_FOR_XML,ee=t.WHOLE_DOCUMENT||!1,oe=t.RETURN_DOM||!1,ne=t.RETURN_DOM_FRAGMENT||!1,ae=t.RETURN_TRUSTED_TYPE||!1,ie=t.FORCE_BODY||!1,se=!1!==t.SANITIZE_DOM,le=t.SANITIZE_NAMED_PROPS||!1,ce=!1!==t.KEEP_CONTENT,de=t.IN_PLACE||!1,Kt=function(t){try{return O(t,""),!0}catch(e){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:ot,we="string"==typeof t.NAMESPACE?t.NAMESPACE:ke,ve=E(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?K(t.MATHML_TEXT_INTEGRATION_POINTS):R({},["mi","mo","mn","ms","mtext"]),_e=E(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?K(t.HTML_INTEGRATION_POINTS):R({},["annotation-xml"]);const e=E(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?K(t.CUSTOM_ELEMENT_HANDLING):u(null);if(Ht=u(null),E(e,"tagNameCheck")&&Oe(e.tagNameCheck)&&(Ht.tagNameCheck=e.tagNameCheck),E(e,"attributeNameCheck")&&Oe(e.attributeNameCheck)&&(Ht.attributeNameCheck=e.attributeNameCheck),E(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(Ht.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),Jt&&(Vt=!1),ne&&(oe=!0),ue&&(Pt=R({},G),Wt=u(null),!0===ue.html&&(R(Pt,N),R(Wt,X)),!0===ue.svg&&(R(Pt,W),R(Wt,V),R(Wt,Q)),!0===ue.svgFilters&&(R(Pt,j),R(Wt,V),R(Wt,Q)),!0===ue.mathMl&&(R(Pt,U),R(Wt,Z),R(Wt,Q))),Gt.tagCheck=null,Gt.attributeCheck=null,E(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?Gt.tagCheck=t.ADD_TAGS:k(t.ADD_TAGS)&&(Pt===Nt&&(Pt=K(Pt)),R(Pt,t.ADD_TAGS,Me))),E(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?Gt.attributeCheck=t.ADD_ATTR:k(t.ADD_ATTR)&&(Wt===jt&&(Wt=K(Wt)),R(Wt,t.ADD_ATTR,Me))),E(t,"ADD_URI_SAFE_ATTR")&&k(t.ADD_URI_SAFE_ATTR)&&R(me,t.ADD_URI_SAFE_ATTR,Me),E(t,"FORBID_CONTENTS")&&k(t.FORBID_CONTENTS)&&(pe===ge&&(pe=K(pe)),R(pe,t.FORBID_CONTENTS,Me)),E(t,"ADD_FORBID_CONTENTS")&&k(t.ADD_FORBID_CONTENTS)&&(pe===ge&&(pe=K(pe)),R(pe,t.ADD_FORBID_CONTENTS,Me)),ce&&(Pt["#text"]=!0),ee&&R(Pt,["html","head","body"]),Pt.table&&(R(Pt,["tbody"]),delete Ut.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Tt=t.TRUSTED_TYPES_POLICY,St=Tt.createHTML("")}else void 0===Tt&&(Tt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(n){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(f,a)),null!==Tt&&"string"==typeof St&&(St=Tt.createHTML(""));(Mt.uponSanitizeElement.length>0||Mt.uponSanitizeAttribute.length>0)&&Pt===Nt&&(Pt=K(Pt)),Mt.uponSanitizeAttribute.length>0&&Wt===jt&&(Wt=K(Wt)),c&&c(t),Ee=t},Ie=R({},[...W,...j,...H]),qe=R({},[...U,...Y]),Re=function(t){x(r.removed,{element:t});try{Ct(t).removeChild(t)}catch(e){z(t)}},ze=function(t,e){try{x(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(i){x(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(oe||ne)try{Re(e)}catch(i){}else try{e.setAttribute(t,"")}catch(i){}},Ke=function(t){let e=null,r=null;if(ie)t="<remove></remove>"+t;else{const e=S(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===Le&&we===ke&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Tt?Tt.createHTML(t):t;if(we===ke)try{e=(new g).parseFromString(o,Le)}catch(a){}if(!e||!e.documentElement){e=vt.createDocument(we,"template",null);try{e.documentElement.innerHTML=Te?St:o}catch(a){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),we===ke?Lt.call(e,ee?"html":"body")[0]:ee?e.documentElement:n},Pe=function(t){return _t.call(t.ownerDocument||t,t,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Ne=function(t){t.normalize();const e=_t.call(t.ownerDocument||t,t,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let r=e.nextNode();for(;r;){let t=r.data;y([Et,$t,Ot],e=>{t=B(t,e," ")}),r.data=t,r=e.nextNode()}},We=function(t){const e=wt?wt(t):null;return"string"==typeof e&&("form"===Me(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==bt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==kt(t)||t.childNodes!==mt(t)))},je=function(t){if(!kt||"object"!=typeof t||null===t)return!1;try{return kt(t)===gt}catch(e){return!1}},He=function(t){if(!kt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof kt(t)}catch(e){return!1}};function Ue(t,e,i){y(t,t=>{t.call(r,e,i,Ee)})}const Ye=function(t){let e=null;if(Ue(Mt.beforeSanitizeElements,t,null),We(t))return Re(t),!0;const i=Me(t.nodeName);if(Ue(Mt.uponSanitizeElement,t,{tagName:i,allowedTags:Pt}),te&&t.hasChildNodes()&&!He(t.firstElementChild)&&O(/<[/\w!]/g,t.innerHTML)&&O(/<[/\w!]/g,t.textContent))return Re(t),!0;if(te&&t.namespaceURI===ke&&"style"===i&&He(t.firstElementChild))return Re(t),!0;if(t.nodeType===dt)return Re(t),!0;if(te&&t.nodeType===ut&&O(/<[/\w]/g,t.data))return Re(t),!0;if(Ut[i]||!(Gt.tagCheck instanceof Function&&Gt.tagCheck(i))&&!Pt[i]){if(!Ut[i]&&Ve(i)){if(Ht.tagNameCheck instanceof RegExp&&O(Ht.tagNameCheck,i))return!1;if(Ht.tagNameCheck instanceof Function&&Ht.tagNameCheck(i))return!1}if(ce&&!pe[i]){const e=Ct(t),r=mt(t);if(r&&e){for(let i=r.length-1;i>=0;--i){const o=q(r[i],!0);e.insertBefore(o,yt(t))}}}return Re(t),!0}return((kt?kt(t):t.nodeType)!==ht||function(t){let e=Ct(t);e&&e.tagName||(e={namespaceURI:we,tagName:"template"});const r=w(t.tagName),i=w(e.tagName);return!!Se[t.namespaceURI]&&(t.namespaceURI===be?e.namespaceURI===ke?"svg"===r:e.namespaceURI===xe?"svg"===r&&("annotation-xml"===i||ve[i]):Boolean(Ie[r]):t.namespaceURI===xe?e.namespaceURI===ke?"math"===r:e.namespaceURI===be?"math"===r&&_e[i]:Boolean(qe[r]):t.namespaceURI===ke?!(e.namespaceURI===be&&!_e[i])&&!(e.namespaceURI===xe&&!ve[i])&&!qe[r]&&(Ae[r]||!Ie[r]):!("application/xhtml+xml"!==Le||!Se[t.namespaceURI]))}(t))&&("noscript"!==i&&"noembed"!==i&&"noframes"!==i||!O(/<\/no(script|embed|frames)/i,t.innerHTML))?(Jt&&t.nodeType===ct&&(e=t.textContent,y([Et,$t,Ot],t=>{e=B(e,t," ")}),t.textContent!==e&&(x(r.removed,{element:t.cloneNode()}),t.textContent=e)),Ue(Mt.afterSanitizeElements,t,null),!1):(Re(t),!0)},Ge=function(t,e,r){if(Yt[e])return!1;if(se&&("id"===e||"name"===e)&&(r in i||r in $e))return!1;const o=Wt[e]||Gt.attributeCheck instanceof Function&&Gt.attributeCheck(e,t);if(Vt&&!Yt[e]&&O(Dt,e));else if(Xt&&O(It,e));else if(!o||Yt[e]){if(!(Ve(t)&&(Ht.tagNameCheck instanceof RegExp&&O(Ht.tagNameCheck,t)||Ht.tagNameCheck instanceof Function&&Ht.tagNameCheck(t))&&(Ht.attributeNameCheck instanceof RegExp&&O(Ht.attributeNameCheck,e)||Ht.attributeNameCheck instanceof Function&&Ht.attributeNameCheck(e,t))||"is"===e&&Ht.allowCustomizedBuiltInElements&&(Ht.tagNameCheck instanceof RegExp&&O(Ht.tagNameCheck,r)||Ht.tagNameCheck instanceof Function&&Ht.tagNameCheck(r))))return!1}else if(me[e]);else if(O(Kt,B(r,Rt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==v(r,"data:")||!fe[t]){if(Zt&&!O(qt,B(r,Rt,"")));else if(r)return!1}else;return!0},Xe=R({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ve=function(t){return!Xe[w(t)]&&O(zt,t)},Ze=function(t){Ue(Mt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||We(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Wt,forceKeepAttr:void 0};let o=e.length;for(;o--;){const a=e[o],s=a.name,l=a.namespaceURI,h=a.value,c=Me(s),d=h;let u="value"===s?d:_(d);if(i.attrName=c,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,Ue(Mt.uponSanitizeAttribute,t,i),u=i.attrValue,!le||"id"!==c&&"name"!==c||0===v(u,he)||(ze(s,t),u=he+u),te&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){ze(s,t);continue}if("attributename"===c&&S(u,"href")){ze(s,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ze(s,t);continue}if(!Qt&&O(/\/>/i,u)){ze(s,t);continue}Jt&&y([Et,$t,Ot],t=>{u=B(u,t," ")});const p=Me(t.nodeName);if(Ge(p,c,u)){if(Tt&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(l);else switch(f.getAttributeType(p,c)){case"TrustedHTML":u=Tt.createHTML(u);break;case"TrustedScriptURL":u=Tt.createScriptURL(u)}if(u!==d)try{l?t.setAttributeNS(l,s,u):t.setAttribute(s,u),We(t)?Re(t):C(r.removed)}catch(n){ze(s,t)}}else ze(s,t)}Ue(Mt.afterSanitizeAttributes,t,null)},Qe=function(t){let e=null;const r=Pe(t);for(Ue(Mt.beforeSanitizeShadowDOM,t,null);e=r.nextNode();){Ue(Mt.uponSanitizeShadowNode,e,null),Ye(e),Ze(e),je(e.content)&&Qe(e.content);if((kt?kt(e):e.nodeType)===ht){const t=xt?xt(e):e.shadowRoot;je(t)&&(Je(t),Qe(t))}}Ue(Mt.afterSanitizeShadowDOM,t,null)},Je=function(t){const e=kt?kt(t):t.nodeType;if(e===ht){const e=xt?xt(t):t.shadowRoot;je(e)&&(Je(e),Qe(e))}const r=mt?mt(t):t.childNodes;if(!r)return;const i=[];y(r,t=>{x(i,t)});for(const o of i)Je(o);if(e===ht){const e=wt?wt(t):null;if("string"==typeof e&&"template"===Me(e)){const e=t.content;je(e)&&Je(e)}}};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,a=null,s=null;if(Te=!t,Te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!He(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return A(t);case"boolean":return L(t);case"bigint":return F?F(t):"0";case"symbol":return M?M(t):"Symbol()";case"undefined":default:return $(t);case"function":case"object":{if(null===t)return $(t);const e=t,r=P(e,"toString");if("function"==typeof r){const t=r(e);return"string"==typeof t?t:$(t)}return $(t)}}}(t)))throw D("dirty is not a string, aborting");if(!r.isSupported)return t;if(re||De(e),r.removed=[],"string"==typeof t&&(de=!1),de){const e=wt?wt(t):t.nodeName;if("string"==typeof e){const t=Me(e);if(!Pt[t]||Ut[t])throw D("root node is forbidden and cannot be sanitized in-place")}if(We(t))throw D("root node is clobbered and cannot be sanitized in-place");Je(t)}else if(He(t))i=Ke("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===ht&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n),Je(n);else{if(!oe&&!Jt&&!ee&&-1===t.indexOf("<"))return Tt&&ae?Tt.createHTML(t):t;if(i=Ke(t),!i)return oe?null:ae?St:""}i&&ie&&Re(i.firstChild);const l=Pe(de?t:i);for(;a=l.nextNode();)Ye(a),Ze(a),je(a.content)&&Qe(a.content);if(de)return Jt&&Ne(t),t;if(oe){if(Jt&&Ne(i),ne)for(s=At.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(Wt.shadowroot||Wt.shadowrootmode)&&(s=Ft.call(o,s,!0)),s}let h=ee?i.outerHTML:i.innerHTML;return ee&&Pt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(st,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),Jt&&y([Et,$t,Ot],t=>{h=B(h,t," ")}),Tt&&ae?Tt.createHTML(h):h},r.setConfig=function(){De(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),re=!0},r.clearConfig=function(){Ee=null,re=!1},r.isValidAttribute=function(t,e,r){Ee||De({});const i=Me(t),o=Me(e);return Ge(i,o,r)},r.addHook=function(t,e){"function"==typeof e&&x(Mt[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=m(Mt[t],e);return-1===r?void 0:b(Mt[t],r,1)[0]}return C(Mt[t])},r.removeHooks=function(t){Mt[t]=[]},r.removeAllHooks=function(){Mt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},3168(t,e,r){"use strict";function i(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}r.d(e,{b:()=>i})},707(t,e,r){"use strict";r.d(e,{$V:()=>a,Av:()=>i,GX:()=>g,ML:()=>S,NA:()=>d,OG:()=>o,Qb:()=>y,R_:()=>s,Uw:()=>u,VP:()=>l,XZ:()=>b,ZR:()=>x,_u:()=>w,cT:()=>p,i1:()=>k,iq:()=>f,kj:()=>n,pj:()=>c,q:()=>m,ri:()=>T,vC:()=>h,x6:()=>C});const i="[object RegExp]",o="[object String]",n="[object Number]",a="[object Boolean]",s="[object Arguments]",l="[object Symbol]",h="[object Date]",c="[object Map]",d="[object Set]",u="[object Array]",p="[object ArrayBuffer]",g="[object Object]",f="[object DataView]",y="[object Uint8Array]",m="[object Uint8ClampedArray]",C="[object Uint16Array]",x="[object Uint32Array]",b="[object Int8Array]",k="[object Int16Array]",w="[object Int32Array]",T="[object Float32Array]",S="[object Float64Array]"},8331(t,e,r){"use strict";r.d(e,{N:()=>o});var i=r(3168);function o(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,i.b)(t)}},3819(t,e,r){"use strict";function i(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}r.d(e,{X:()=>i})},6526(t,e,r){"use strict";r.d(e,{i:()=>o});var i=r(4183);function o(t){return(0,i.i)(t)}},4100(t,e,r){"use strict";r.d(e,{P:()=>o});const i="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof globalThis&&globalThis||function(){return this}()||Function("return this")();function o(t){return void 0!==i.Buffer&&i.Buffer.isBuffer(t)}},1291(t,e,r){"use strict";function i(t){return null==t||"object"!=typeof t&&"function"!=typeof t}r.d(e,{s:()=>i})},4183(t,e,r){"use strict";function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r.d(e,{i:()=>i})},8676(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(6554),o=r(8819);const n=class{constructor(){this.type=o.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=o.Z.ALL}is(t){return this.type===t}};const a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new n}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=o.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:o}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===o&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:o}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===o&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},7766(t,e,r){"use strict";r.d(e,{A:()=>f});var i=r(8676),o=r(8819);const n={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(n.re);if(!e)return;const r=e[1],o=parseInt(r,16),a=r.length,s=a%4==0,l=a>4,h=l?1:17,c=l?8:4,d=s?0:-1,u=l?255:15;return i.A.set({r:(o>>c*(d+3)&u)*h,g:(o>>c*(d+2)&u)*h,b:(o>>c*(d+1)&u)*h,a:s?(o&u)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}${o.Y[Math.round(255*n)]}`:`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}`}},a=n;var s=r(6554);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,o,n,a,h,c]=r;return i.A.set({h:l._hue2deg(o),s:s.A.channel.clamp.s(parseFloat(n)),l:s.A.channel.clamp.l(parseFloat(a)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${o})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},h=l,c={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=c.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const r in c.colors)if(c.colors[r]===e)return r}},d=c,u={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(u.re);if(!r)return;const[,o,n,a,l,h,c,d,p]=r;return i.A.set({r:s.A.channel.clamp.r(n?2.55*parseFloat(o):parseFloat(o)),g:s.A.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:d?s.A.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(o)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=u,g={format:{keyword:c,hex:a,rgb:u,rgba:u,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||p.parse(t)||h.parse(t)||d.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(o.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):a.stringify(t)},f=g},8819(t,e,r){"use strict";r.d(e,{Y:()=>o,Z:()=>n});var i=r(6554);const o={};for(let a=0;a<=255;a++)o[a]=i.A.unit.dec2hex(a);const n={ALL:0,RGB:1,HSL:2}},1628(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(6554),o=r(7766);const n=(t,e,r)=>{const n=o.A.parse(t),a=n[e],s=i.A.channel.clamp[e](a+r);return a!==s&&(n[e]=s),o.A.stringify(n)}},1763(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(6554),o=r(7766);const n=(t,e)=>{const r=o.A.parse(t);for(const o in e)r[o]=i.A.channel.clamp[o](e[o]);return o.A.stringify(r)}},9515(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(1628);const o=(t,e)=>(0,i.A)(t,"l",-e)},3212(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(6554),o=r(7766);const n=t=>{const{r:e,g:r,b:n}=o.A.parse(t),a=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(n);return i.A.lang.round(a)},a=t=>n(t)>=.5,s=t=>!a(t)},8480(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(1628);const o=(t,e)=>(0,i.A)(t,"l",e)},941(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(6554),o=r(8676),n=r(7766),a=r(1763);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,a.A)(t,{a:e});const l=o.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return n.A.stringify(l)}},6554(t,e,r){"use strict";r.d(e,{A:()=>o});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return 2.55*r;t/=360,e/=100;const n=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(o){case"r":return 255*i.hue2rgb(a,n,t+1/3);case"g":return 255*i.hue2rgb(a,n,t);case"b":return 255*i.hue2rgb(a,n,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),n=Math.min(t,e,r),a=(o+n)/2;if("l"===i)return 100*a;if(o===n)return 0;const s=o-n;if("s"===i)return 100*(a>.5?s/(2-o-n):s/(o+n));switch(o){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},o={channel:i,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},3641(t,e,r){"use strict";r.d(e,{DA:()=>b,IU:()=>L,U:()=>A,U7:()=>Me,U_:()=>$e,Zk:()=>d,aP:()=>Ae,gh:()=>Ee,lC:()=>p,on:()=>Fe});var i=r(566),o=r(9478),n=r(2864),a=r(1546),s=r(3316),l=r(7970),h=r(7012),c=r(726),d=(0,l.K2)(async(t,e,r)=>{let o;const l=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);o=r||"node default";const c=t.insert("g").attr("class",o).attr("id",e.domId||e.id),d=c.insert("g").attr("class","label").attr("style",(0,a.KL)(e.labelStyle));let u;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,g="markdown"===e.labelType,f=await(0,n.GZ)(d,(0,s.jZ)((0,a.Sm)(u),(0,s.D7)()),{useHtmlLabels:l,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,classes:g?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:g},(0,s.D7)());let y=f.getBBox();const m=(e?.padding??0)/2;if(l){const t=f.children[0],e=(0,h.Ltv)(f);await(0,i.X)(t,u),y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return l?d.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):d.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:c,bbox:y,halfPadding:m,label:d}},"labelHelper"),u=(0,l.K2)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,s.E)((0,s.D7)()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,n.GZ)(o,(0,s.jZ)((0,a.Sm)(e),(0,s.D7)()),{useHtmlLabels:i,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=l.getBBox();const d=r.padding/2;if((0,s.E)((0,s.D7)())){const t=l.children[0],e=(0,h.Ltv)(l);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:c,halfPadding:d,label:o}},"insertLabel"),p=(0,l.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),g=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function f(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function y(t,e,r,i,o,n){const a=[],s=r-t,l=i-e,h=s/n,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*s,r=d+o*Math.sin(c*(e-t));a.push({x:e,y:r})}return a}function m(t,e,r,i,o,n){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),n=e+r*Math.sin(i);a.push({x:-o,y:-n})}return a}function C(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),n=e.find(t=>"none"!==t.getAttribute("stroke")),a=(0,l.K2)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(n){const t={stroke:a(n,"stroke"),"stroke-width":a(n,"stroke-width")??"1","stroke-opacity":a(n,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(r),s}(0,l.K2)(f,"createPathFromPoints"),(0,l.K2)(y,"generateFullSineWavePoints"),(0,l.K2)(m,"generateCirclePoints"),(0,l.K2)(C,"mergePaths");var x=(0,l.K2)((t,e)=>{var r,i,o=t.x,n=t.y,a=e.x-o,s=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(a)*h?(s<0&&(h=-h),r=0===s?0:h*a/s,i=h):(a<0&&(l=-l),r=l,i=0===a?0:l*s/a),{x:o+r,y:n+i}},"intersectRect"),b=(0,l.K2)(async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const l=(0,s.D7)(),h=(0,s.E)(l);return await(0,n.GZ)(t,a,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},l)},"createLabel"),k=(0,l.K2)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),w=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:a,handDrawnSeed:d}=r,{clusterBkg:u,clusterBorder:p}=a,{labelStyles:g,nodeStyles:f,borderStyles:y,backgroundStyles:m}=(0,o.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),w=(0,s.E)(r),T=C.insert("g").attr("class","cluster-label ");let S;S="markdown"===e.labelType?await(0,n.GZ)(T,e.label,{style:e.labelStyle,useHtmlLabels:w,isNode:!0,width:e.width}):await b(T,e.label,e.labelStyle||"",!1,!0);let B=S.getBBox();if((0,s.E)(r)){const t=S.children[0],e=(0,h.Ltv)(S);B=t.getBoundingClientRect(),e.attr("width",B.width),e.attr("height",B.height)}const v=e.width<=B.width+e.padding?B.width+e.padding:e.width;e.width<=B.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const _=e.height,A=e.x-v/2,L=e.y-_/2;let F;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(C),r=(0,o.Fr)(e,{roughness:.7,fill:u,stroke:p,fillWeight:3,seed:d}),i=t.path(k(A,L,v,_,0),r);F=C.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),F.select("path:nth-child(2)").attr("style",y.join(";")),F.select("path").attr("style",m.join(";").replace("fill","stroke"))}else F=C.insert("rect",":first-child"),F.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",L).attr("width",v).attr("height",_);const{subGraphTitleTopMargin:M}=(0,i.O)(r);if(T.attr("transform",`translate(${e.x-B.width/2}, ${e.y-e.height/2+M})`),g){const t=T.select("span");t&&t.attr("style",g)}const E=F.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=B.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:C,labelBBox:B}},"rect"),T=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,n=o/2;i.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");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,l.K2)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:n,compositeBackground:a,compositeTitleBackground:l,nodeBorder:d}=i,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=u.insert("g",":first-child"),g=u.insert("g").attr("class","cluster-label");let f=u.append("rect");const y=await b(g,e.label,e.labelStyle,void 0,!0);let m=y.getBBox();if((0,s.E)(r)){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}const C=0*e.padding,w=C/2,T=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+C;e.width<=m.width+e.padding?e.diff=(T-e.width)/2-e.padding:e.diff=-e.padding;const S=e.height+C,B=e.height+C-m.height-6,v=e.x-T/2,_=e.y-S/2;e.width=T;const A=e.y-e.height/2-w+m.height+2;let L;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=c.A.svg(u),i=e.rx||e.ry?r.path(k(v,_,T,S,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:d,seed:o}):r.rectangle(v,_,T,S,{seed:o});L=u.insert(()=>i,":first-child");const s=r.rectangle(v,A,T,B,{fill:t?n:a,fillStyle:t?"hachure":"solid",stroke:d,seed:o});L=u.insert(()=>i,":first-child"),f=u.insert(()=>s)}else{L=p.insert("rect",":first-child");const t="outer";L.attr("class",t).attr("x",v).attr("y",_).attr("width",T).attr("height",S).attr("data-look",e.look),f.attr("class","inner").attr("x",v).attr("y",A).attr("width",T).attr("height",B)}g.attr("transform",`translate(${e.x-m.width/2}, ${_+1-((0,s.E)(r)?0:3)})`);const F=L.node().getBBox();return e.height=F.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:u,labelBBox:m}},"roundedWithTitle"),B=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:a,handDrawnSeed:d}=r,{clusterBkg:u,clusterBorder:p}=a,{labelStyles:g,nodeStyles:f,borderStyles:y,backgroundStyles:m}=(0,o.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,s.E)(r),w=C.insert("g").attr("class","cluster-label "),T=await(0,n.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let S=T.getBBox();if((0,s.E)(r)){const t=T.children[0],e=(0,h.Ltv)(T);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}const B=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(B-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,_=e.x-B/2,A=e.y-v/2;let L;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(C),r=(0,o.Fr)(e,{roughness:.7,fill:u,stroke:p,fillWeight:4,seed:d}),i=t.path(k(_,A,B,v,e.rx),r);L=C.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),L.select("path:nth-child(2)").attr("style",y.join(";")),L.select("path").attr("style",m.join(";").replace("fill","stroke"))}else L=C.insert("rect",":first-child"),L.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",_).attr("y",A).attr("width",B).attr("height",v);const{subGraphTitleTopMargin:F}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-S.width/2}, ${e.y-e.height/2+F})`),g){const t=w.select("span");t&&t.attr("style",g)}const M=L.node().getBBox();return e.offsetX=0,e.width=M.width,e.height=M.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:C,labelBBox:S}},"kanbanSection"),v={rect:w,squareRect:w,roundedWithTitle:S,noteGroup:T,divider:(0,l.K2)((t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:n}=i,a=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),l=a.insert("g",":first-child"),h=0*e.padding,d=e.width+h;e.diff=-e.padding;const u=e.height+h,p=e.x-d/2,g=e.y-u/2;let f;if(e.width=d,"handDrawn"===e.look){const t=c.A.svg(a).rectangle(p,g,d,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:o});f=a.insert(()=>t,":first-child")}else{f=l.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),f.attr("class",t).attr("x",p).attr("y",g).attr("width",d).attr("height",u).attr("data-look",e.look)}const y=f.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{}}},"divider"),kanbanSection:B},_=new Map,A=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",i=await v[r](t,e);return _.set(e.id,i),i},"insertCluster"),L=(0,l.K2)(()=>{_=new Map},"clear");function F(t,e){return t.intersect(e)}(0,l.K2)(F,"intersectNode");var M=F;function E(t,e,r,i){var o=t.x,n=t.y,a=o-i.x,s=n-i.y,l=Math.sqrt(e*e*s*s+r*r*a*a),h=Math.abs(e*r*a/l);i.x<o&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<n&&(c=-c),{x:o+h,y:n+c}}(0,l.K2)(E,"intersectEllipse");var $=E;function O(t,e,r){return $(t,e,e,r)}(0,l.K2)(O,"intersectCircle");var D=O;function I(t,e,r,i){{const o=e.y-t.y,n=t.x-e.x,a=e.x*t.y-t.x*e.y,s=o*r.x+n*r.y+a,l=o*i.x+n*i.y+a,h=1e-6;if(0!==s&&0!==l&&q(s,l))return;const c=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+u,g=c*e.x+d*e.y+u;if(Math.abs(p)<h&&Math.abs(g)<h&&q(p,g))return;const f=o*d-c*n;if(0===f)return;const y=Math.abs(f/2);let m=n*u-d*a;const C=m<0?(m-y)/f:(m+y)/f;m=c*a-o*u;return{x:C,y:m<0?(m-y)/f:(m+y)/f}}}function q(t,e){return t*e>0}(0,l.K2)(I,"intersectLine"),(0,l.K2)(q,"sameSign");var R=I;function z(t,e,r){let i=t.x,o=t.y,n=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){a=Math.min(a,t.x),s=Math.min(s,t.y)}):(a=Math.min(a,e.x),s=Math.min(s,e.y));let l=i-t.width/2-a,h=o-t.height/2-s;for(let c=0;c<e.length;c++){let i=e[c],o=e[c<e.length-1?c+1:0],a=R(t,r,{x:l+i.x,y:h+i.y},{x:l+o.x,y:h+o.y});a&&n.push(a)}return n.length?(n.length>1&&n.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,n=Math.sqrt(i*i+o*o),a=e.x-r.x,s=e.y-r.y,l=Math.sqrt(a*a+s*s);return n<l?-1:n===l?0:1}),n[0]):t}(0,l.K2)(z,"intersectPolygon");var K={node:M,circle:D,ellipse:$,polygon:z,rect:x};function P(t,e){const{labelStyles:r}=(0,o.GX)(e);e.labelStyle=r;const i=g(e);let n=i;i||(n="anchor");const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),{cssStyles:h}=e,d=c.A.svg(s),u=(0,o.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const f=d.circle(0,0,2,u),y=s.insert(()=>f,":first-child");return y.attr("class","anchor").attr("style",(0,a.KL)(h)),p(e,y),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),K.circle(e,1,t)},s}function N(t,e,r,i,o,n,a){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*n*Math.sin(h)*(a?-1:1),f=l-p*o*Math.cos(h)*(a?-1:1),y=Math.atan2((e-f)/n,(t-g)/o);let m=Math.atan2((i-f)/n,(r-g)/o)-y;a&&m<0&&(m+=2*Math.PI),!a&&m>0&&(m-=2*Math.PI);const C=[];for(let x=0;x<20;x++){const t=y+x/19*m,e=g+o*Math.cos(t),r=f+n*Math.sin(t);C.push({x:e,y:r})}return C}function W(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function j(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,h=(0,l.K2)(t=>t+s,"calcTotalHeight"),u=(0,l.K2)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:y,bbox:m}=await d(t,e,g(e)),C=h(e?.height?e?.height:m.height),[x,b]=u(C),k=W(C,x,b),w=(e?.width?e?.width:m.width)+2*a+k-k,T=C,{cssStyles:S}=e,B=[{x:w/2,y:-T/2},{x:-w/2,y:-T/2},...N(-w/2,-T/2,-w/2,T/2,x,b,!1),{x:w/2,y:T/2},...N(w/2,T/2,w/2,-T/2,x,b,!0)],v=c.A.svg(y),_=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=f(B),L=v.path(A,_),F=y.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",S),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${x/2}, 0)`),p(e,F),e.intersect=function(t){return K.polygon(e,B,t)},y}function H(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,l.K2)(P,"anchor"),(0,l.K2)(N,"generateArcPoints"),(0,l.K2)(W,"calculateArcSagitta"),(0,l.K2)(j,"bowTieRect"),(0,l.K2)(H,"insertPolygonShape");async function U(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?28:n,s="neo"===e.look?24:n,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.width??h.width)+("neo"===e.look?2*a:a+12),y=(e?.height??h.height)+("neo"===e.look?2*s:s),m=-y,C=[{x:12,y:m},{x:u,y:m},{x:u,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}];let x;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(C),n=t.path(i,r);x=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${y/2})`),b&&x.attr("style",b)}else x=H(l,u,y,C);return i&&x.attr("style",i),p(e,x),e.intersect=function(t){return K.polygon(e,C,t)},l}function Y(t,e){const{nodeStyles:r}=(0,o.GX)(e);e.label="";const i=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=c.A.svg(i),h=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const d=f(s),u=l.path(d,h),p=i.insert(()=>u,":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return K.polygon(e,s,t)},i}async function G(t,e,r){const{labelStyles:i,nodeStyles:n}=(0,o.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:h,halfPadding:u}=await d(t,e,g(e)),f=r?.padding??u,y="neo"===e.look?h.width/2+32:h.width/2+f;let m;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=c.A.svg(s),r=(0,o.Fr)(e,{}),i=t.circle(0,0,2*y,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,a.KL)(C))}else m=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",y).attr("cx",0).attr("cy",0);return p(e,m),e.calcIntersect=function(t,e){const r=t.width/2;return K.circle(t,r,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,y,t),K.circle(e,y,t)},s}function X(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function V(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,h=c.A.svg(n),d=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=h.circle(0,0,2*a,d),f=X(a),y=h.path(f,d),m=n.insert(()=>u,":first-child");return m.insert(()=>y),m.attr("class","outer-path"),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),p(e,m),e.intersect=function(t){l.Rm.info("crossedCircle intersect",e,{radius:a,point:t});return K.circle(e,a,t)},n}function Z(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),n=e+r*Math.sin(i);a.push({x:-o,y:-n})}return a}async function Q(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await d(t,e,g(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,u=a.width+l,y=a.height+h,m=Math.max(5,.1*y),{cssStyles:C}=e,x=[...Z(u/2,-y/2,m,30,-90,0),{x:-u/2-m,y:m},...Z(u/2+2*m,-m,m,20,-180,-270),...Z(u/2+2*m,m,m,20,-90,-180),{x:-u/2-m,y:-y/2},...Z(u/2,y/2,m,20,0,90)],b=[{x:u/2,y:-y/2-m},{x:-u/2,y:-y/2-m},...Z(u/2,-y/2,m,20,-90,0),{x:-u/2-m,y:-m},...Z(u/2+.1*u,-m,m,20,-180,-270),...Z(u/2+.1*u,m,m,20,-90,-180),{x:-u/2-m,y:y/2},...Z(u/2,y/2,m,20,0,90),{x:-u/2,y:y/2+m},{x:u/2,y:y/2+m}],k=c.A.svg(n),w=(0,o.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=f(x).replace("Z",""),S=k.path(T,w),B=f(b),v=k.path(B,{...w}),_=n.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>S,":first-child"),_.attr("class","text"),C&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${m}, 0)`),s.attr("transform",`translate(${-u/2+m-(a.x-(a.left??0))},${-y/2+(e.padding??0)/2-(a.y-(a.top??0))})`),p(e,_),e.intersect=function(t){return K.polygon(e,b,t)},n}function J(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),n=e+r*Math.sin(i);a.push({x:o,y:n})}return a}async function tt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await d(t,e,g(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,u=a.width+("neo"===e.look?2*l:l),y=a.height+("neo"===e.look?2*h:h),m=Math.max(5,.1*y),{cssStyles:C}=e,x=[...J(u/2,-y/2,m,20,-90,0),{x:u/2+m,y:-m},...J(u/2+2*m,-m,m,20,-180,-270),...J(u/2+2*m,m,m,20,-90,-180),{x:u/2+m,y:y/2},...J(u/2,y/2,m,20,0,90)],b=[{x:-u/2,y:-y/2-m},{x:u/2,y:-y/2-m},...J(u/2,-y/2,m,20,-90,0),{x:u/2+m,y:-m},...J(u/2+2*m,-m,m,20,-180,-270),...J(u/2+2*m,m,m,20,-90,-180),{x:u/2+m,y:y/2},...J(u/2,y/2,m,20,0,90),{x:u/2,y:y/2+m},{x:-u/2,y:y/2+m}],k=c.A.svg(n),w=(0,o.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=f(x).replace("Z",""),S=k.path(T,w),B=f(b),v=k.path(B,{...w}),_=n.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>S,":first-child"),_.attr("class","text"),C&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-m}, 0)`),s.attr("transform",`translate(${-u/2+(e.padding??0)/2-(a.x-(a.left??0))},${-y/2+(e.padding??0)/2-(a.y-(a.top??0))})`),p(e,_),e.intersect=function(t){return K.polygon(e,b,t)},n}function et(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),n=e+r*Math.sin(i);a.push({x:-o,y:-n})}return a}async function rt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await d(t,e,g(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,u=a.width+("neo"===e.look?2*l:l),y=a.height+("neo"===e.look?2*h:h),m=Math.max(5,.1*y),{cssStyles:C}=e,x=[...et(u/2,-y/2,m,30,-90,0),{x:-u/2-m,y:m},...et(u/2+2*m,-m,m,20,-180,-270),...et(u/2+2*m,m,m,20,-90,-180),{x:-u/2-m,y:-y/2},...et(u/2,y/2,m,20,0,90)],b=[...et(-u/2+m+m/2,-y/2,m,20,-90,-180),{x:u/2-m/2,y:m},...et(-u/2-m/2,-m,m,20,0,90),...et(-u/2-m/2,m,m,20,-90,0),{x:u/2-m/2,y:-m},...et(-u/2+m+m/2,y/2,m,30,-180,-270)],k=[{x:u/2,y:-y/2-m},{x:-u/2,y:-y/2-m},...et(u/2,-y/2,m,20,-90,0),{x:-u/2-m,y:-m},...et(u/2+2*m,-m,m,20,-180,-270),...et(u/2+2*m,m,m,20,-90,-180),{x:-u/2-m,y:y/2},...et(u/2,y/2,m,20,0,90),{x:-u/2,y:y/2+m},{x:u/2-m-m/2,y:y/2+m},...et(-u/2+m+m/2,-y/2,m,20,-90,-180),{x:u/2-m/2,y:m},...et(-u/2-m/2,-m,m,20,0,90),...et(-u/2-m/2,m,m,20,-90,0),{x:u/2-m/2,y:-m},...et(-u/2+m+m/2,y/2,m,30,-180,-270)],w=c.A.svg(n),T=(0,o.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=f(x).replace("Z",""),B=w.path(S,T),v=f(b).replace("Z",""),_=w.path(v,T),A=f(k),L=w.path(A,{...T}),F=n.insert("g",":first-child");return F.insert(()=>L,":first-child").attr("stroke-opacity",0),F.insert(()=>B,":first-child"),F.insert(()=>_,":first-child"),F.attr("class","text"),C&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${m-m/4}, 0)`),s.attr("transform",`translate(${-u/2+(e.padding??0)/2-(a.x-(a.left??0))},${-y/2+(e.padding??0)/2-(a.y-(a.top??0))})`),p(e,F),e.intersect=function(t){return K.polygon(e,k,t)},n}async function it(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=Math.max(20,1.25*(h.width+2*a),e?.width??0),y=Math.max(5,h.height+2*s,e?.height??0),C=y/2,{cssStyles:x}=e,b=c.A.svg(l),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=u-C,T=y/4,S=[{x:w,y:0},{x:T,y:0},{x:0,y:y/2},{x:T,y:y},{x:w,y:y},...m(-w,-y/2,C,50,270,90)],B=f(S),v=b.path(B,k),_=l.insert(()=>v,":first-child");return _.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(${-u/2}, ${-y/2})`),p(e,_),e.intersect=function(t){return K.polygon(e,S,t)},l}(0,l.K2)(U,"card"),(0,l.K2)(Y,"choice"),(0,l.K2)(G,"circle"),(0,l.K2)(X,"createLine"),(0,l.K2)(V,"crossedCircle"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceLeft"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraceRight"),(0,l.K2)(et,"generateCirclePoints"),(0,l.K2)(rt,"curlyBraces"),(0,l.K2)(it,"curvedTrapezoid");var ot=(0,l.K2)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),nt=(0,l.K2)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),at=(0,l.K2)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function st(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?24:n,l="neo"===e.look?24:n;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-l,e.width<8&&(e.width=8);const r=t/2/(2.5+t/50);e.height=(e.height??0)-s-3*r,e.height<8&&(e.height=8)}const{shapeSvg:h,bbox:u,label:f}=await d(t,e,g(e)),y=(e.width?e.width:u.width)+l,m=y/2,C=m/(2.5+y/50),x=(e.height?e.height:u.height)+s+C;let b;const{cssStyles:k}=e;if("handDrawn"===e.look){const t=c.A.svg(h),r=nt(0,0,y,x,m,C),i=at(0,C,y,x,m,C),n=(0,o.Fr)(e,{}),a=t.path(r,n),s=t.path(i,(0,o.Fr)(e,{fill:"none"}));b=h.insert(()=>s,":first-child"),b=h.insert(()=>a,":first-child"),b.attr("class","basic label-container"),k&&b.attr("style",k)}else{const t=ot(0,0,y,x,m,C);b=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,a.KL)(k)).attr("style",i)}return b.attr("label-offset-y",C),b.attr("transform",`translate(${-y/2}, ${-(x/2+C)})`),p(e,b),f.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${-u.height/2+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){const r=K.rect(e,t),i=r.x-(e.x??0);if(0!=m&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(m*m));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function lt(t,e,r){const{labelStyles:i,nodeStyles:n}=(0,o.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:l}=await d(t,e,g(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),u=Math.max(l.height+2*r.labelPaddingY,e?.height||0),f=-h/2,y=-u/2;let m,{rx:C,ry:x}=e;const{cssStyles:b}=e;if(r?.rx&&r.ry&&(C=r.rx,x=r.ry),"handDrawn"===e.look){const t=c.A.svg(s),r=(0,o.Fr)(e,{}),i=C||x?t.path(k(f,y,h,u,C||0),r):t.rectangle(f,y,h,u,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,a.KL)(b))}else m=s.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",n).attr("rx",(0,a.KL)(C)).attr("ry",(0,a.KL)(x)).attr("x",f).attr("y",y).attr("width",h).attr("height",u);return p(e,m),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return K.rect(e,t)},s}async function ht(t,e){const{cssClasses:r,labelPaddingX:i,labelPaddingY:n,padding:a,width:s,height:l}=e,h={rx:0,ry:0,classes:r??"",labelPaddingX:i??2*(a??0),labelPaddingY:n??a??0},d=await lt(t,e,h);if("handDrawn"===e.look){const t=c.A.svg(d),r=(0,o.Fr)(e,{}),i=d.select(".basic.label-container > path:nth-child(2)"),n=i.node();if(!n)return d;let a=null;return n instanceof SVGGraphicsElement?(a=n.getBBox(),d.insert(()=>t.line(a.x,a.y,a.x+a.width,a.y,r),".basic.label-container g.label"),d.insert(()=>t.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,r),".basic.label-container g.label"),i.remove(),d):d}const u=d.select(".basic.label-container"),p=(Number(u.attr("width"))||s)??0,g=(Number(u.attr("height"))||l)??0;return p>0&&g>0&&u.attr("stroke-dasharray",`${p} ${g}`),d}async function ct(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:l,label:h}=await d(t,e,g(e)),u=l.width+n,f=l.height+a,y=.2*f,m=-u/2,C=-f/2-y/2,{cssStyles:x}=e,b=c.A.svg(s),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:m,y:C+y},{x:-m,y:C+y},{x:-m,y:-C},{x:m,y:-C},{x:m,y:C},{x:-m,y:C},{x:-m,y:C+y}],T=b.polygon(w.map(t=>[t.x,t.y]),k),S=s.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),h.attr("transform",`translate(${m+(e.padding??0)/2-(l.x-(l.left??0))}, ${C+y+(e.padding??0)/2-(l.y-(l.top??0))})`),p(e,S),e.intersect=function(t){return K.rect(e,t)},s}async function dt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e),n="neo"===e.look?12:5;e.labelStyle=r;const s=e.padding??0,h="neo"===e.look?16:s,{shapeSvg:u,bbox:f}=await d(t,e,g(e)),y=(e?.width?e?.width/2:f.width/2)+(h??0),m=y-n;let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(u),r=(0,o.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,o.Fr)(e,{roughness:.2,strokeWidth:1.5}),n=t.circle(0,0,2*y,r),s=t.circle(0,0,2*m,i);C=u.insert("g",":first-child"),C.attr("class",(0,a.KL)(e.cssClasses)).attr("style",(0,a.KL)(x)),C.node()?.appendChild(n),C.node()?.appendChild(s)}else{C=u.insert("g",":first-child");const t=C.insert("circle",":first-child"),e=C.insert("circle");C.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",y).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",m).attr("cx",0).attr("cy",0)}return p(e,C),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,y,t),K.circle(e,y,t)},u}function ut(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=(0,o.GX)(e);e.label="",e.labelStyle=i;const a=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,h=c.A.svg(a),{nodeBorder:d}=r,u=(0,o.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const f=h.circle(0,0,14,u),y=a.insert(()=>f,":first-child");return y.selectAll("path").attr("style",`fill: ${d} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),p(e,y),e.intersect=function(t){l.Rm.info("filledCircle intersect",e,{radius:7,point:t});return K.circle(e,7,t)},a}(0,l.K2)(st,"cylinder"),(0,l.K2)(lt,"drawRect"),(0,l.K2)(ht,"datastore"),(0,l.K2)(ct,"dividedRectangle"),(0,l.K2)(dt,"doublecircle"),(0,l.K2)(ut,"filledCircle");async function pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?2*n:n;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:h,label:u}=await d(t,e,g(e)),y=(e?.width?e?.width:h.width)+(a??0),m=e?.height?e?.height:y+h.height,C=[{x:0,y:-m},{x:m,y:-m},{x:m/2,y:0}],{cssStyles:x}=e,b=c.A.svg(s),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=f(C),T=b.path(w,k),S=s.insert(()=>T,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),e.width=y,e.height=m,p(e,S),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-m/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,C,t),K.polygon(e,C,t)},s}function gt(t,e,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=(0,o.GX)(e);e.label="";const s=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0));const u=-1*h/2,f=-1*d/2,y=c.A.svg(s),m=(0,o.Fr)(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=y.rectangle(u,f,h,d,m),x=s.insert(()=>C,":first-child");l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),a&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",a),p(e,x);const b=i?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return K.rect(e,t)},s}async function ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*n,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:h}=await d(t,e,g(e)),u=(e?.width?e?.width:Math.max(15,h.width))+2*n,y=(e?.height?e?.height:Math.max(10,h.height))+2*a,C=y/2,{cssStyles:x}=e,b=c.A.svg(s),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-u/2,y:-y/2},{x:u/2-C,y:-y/2},...m(-u/2+C,0,C,50,90,270),{x:u/2-C,y:y/2},{x:-u/2,y:y/2}],T=f(w),S=b.path(T,k),B=s.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",i),p(e,B),e.intersect=function(t){l.Rm.info("Pill intersect",e,{radius:C,point:t});return K.polygon(e,w,t)},s}(0,l.K2)(pt,"flippedTriangle"),(0,l.K2)(gt,"forkJoin"),(0,l.K2)(ft,"halfRoundedRectangle");var yt=(0,l.K2)((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function mt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?70:a,l="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/n;e.width=(e?.width??0)-2*t-l,e.height=(e.height??0)-s}const{shapeSvg:h,bbox:u}=await d(t,e,g(e)),f=(e?.height?e?.height:u.height)+s,y=f/n,m=(e?.width?e?.width:u.width)+2*y+l,C=[{x:y,y:0},{x:m-y,y:0},{x:m,y:-f/2},{x:m-y,y:-f},{x:y,y:-f},{x:0,y:-f/2}];let x;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=c.A.svg(h),r=(0,o.Fr)(e,{}),i=yt(0,0,m,f,y),n=t.path(i,r);x=h.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),b&&x.attr("style",b)}else x=H(h,m,f,C);return i&&x.attr("style",i),e.width=m,e.height=f,p(e,x),e.intersect=function(t){return K.polygon(e,C,t)},h}async function Ct(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await d(t,e,g(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:h}=e,u=c.A.svg(n),y=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],C=f(m),x=u.path(C,y),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",i),b.attr("transform",`translate(${-a/2}, ${-s/2})`),p(e,b),e.intersect=function(t){l.Rm.info("Pill intersect",e,{points:m});return K.polygon(e,m,t)},n}async function xt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=(0,o.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(s,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,label:m}=await d(t,e,"icon-shape default"),C="t"===e.pos,x=u,b=u,{nodeBorder:k}=r,{stylesMap:w}=(0,o.WW)(e),T=-b/2,S=-x/2,B=e.label?8:0,v=c.A.svg(f),_=(0,o.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=v.rectangle(T,S,b,x,_),L=Math.max(b,y.width),F=x+y.height+B,M=v.rectangle(-L/2,-F/2,L,F,{..._,fill:"transparent",stroke:"none"}),E=f.insert(()=>A,":first-child"),$=f.insert(()=>M);if(e.icon){const t=f.append("g");t.html(`<g>${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${C?y.height/2+B/2-o/2-s:-y.height/2-B/2-o/2-s})`),t.attr("style",`color: ${w.get("stroke")??k};`)}return m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${C?-F/2:F/2-y.height})`),E.attr("transform",`translate(0,${C?y.height/2+B/2:-y.height/2-B/2})`),p(e,$),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+B},{x:r+b/2,y:i-o/2+y.height+B},{x:r+b/2,y:i+o/2},{x:r-b/2,y:i+o/2},{x:r-b/2,y:i-o/2+y.height+B},{x:r-y.width/2,y:i-o/2+y.height+B}]:[{x:r-b/2,y:i-o/2},{x:r+b/2,y:i-o/2},{x:r+b/2,y:i-o/2+x},{x:r+y.width/2,y:i-o/2+x},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+x},{x:r-b/2,y:i-o/2+x}];return K.polygon(e,n,t)},f}async function bt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=(0,o.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(s,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,label:m}=await d(t,e,"icon-shape default"),C=e.label?8:0,x="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:w}=(0,o.WW)(e),T=c.A.svg(f),S=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const B=w.get("fill");S.stroke=B??k;const v=f.append("g");e.icon&&v.html(`<g>${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}</g>`);const _=v.node().getBBox(),A=_.width,L=_.height,F=_.x,M=_.y,E=Math.max(A,L)*Math.SQRT2+40,$=T.circle(0,0,E,S),O=Math.max(E,y.width),D=E+y.height+C,I=T.rectangle(-O/2,-D/2,O,D,{...S,fill:"transparent",stroke:"none"}),q=f.insert(()=>$,":first-child"),R=f.insert(()=>I);return v.attr("transform",`translate(${-A/2-F},${x?y.height/2+C/2-L/2-M:-y.height/2-C/2-L/2-M})`),v.attr("style",`color: ${w.get("stroke")??b};`),m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-D/2:D/2-y.height})`),q.attr("transform",`translate(0,${x?y.height/2+C/2:-y.height/2-C/2})`),p(e,R),e.intersect=function(t){l.Rm.info("iconSquare intersect",e,t);return K.rect(e,t)},f}async function kt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=(0,o.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(s,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,halfPadding:m,label:C}=await d(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*m,w=u+2*m,{nodeBorder:T,mainBkg:S}=r,{stylesMap:B}=(0,o.WW)(e),v=-w/2,_=-b/2,A=e.label?8:0,L=c.A.svg(f),F=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=B.get("fill");F.stroke=M??S;const E=L.path(k(v,_,w,b,5),F),$=Math.max(w,y.width),O=b+y.height+A,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),I=f.insert(()=>E,":first-child").attr("class","icon-shape2"),q=f.insert(()=>D);if(e.icon){const t=f.append("g");t.html(`<g>${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${x?y.height/2+A/2-o/2-s:-y.height/2-A/2-o/2-s})`),t.attr("style",`color: ${B.get("stroke")??T};`)}return C.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-O/2:O/2-y.height})`),I.attr("transform",`translate(0,${x?y.height/2+A/2:-y.height/2-A/2})`),p(e,q),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=x?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+A},{x:r+w/2,y:i-o/2+y.height+A},{x:r+w/2,y:i+o/2},{x:r-w/2,y:i+o/2},{x:r-w/2,y:i-o/2+y.height+A},{x:r-y.width/2,y:i-o/2+y.height+A}]:[{x:r-w/2,y:i-o/2},{x:r+w/2,y:i-o/2},{x:r+w/2,y:i-o/2+b},{x:r+y.width/2,y:i-o/2+b},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+b},{x:r-w/2,y:i-o/2+b}];return K.polygon(e,n,t)},f}async function wt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=(0,o.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(s,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,halfPadding:m,label:C}=await d(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*m,w=u+2*m,{nodeBorder:T,mainBkg:S}=r,{stylesMap:B}=(0,o.WW)(e),v=-w/2,_=-b/2,A=e.label?8:0,L=c.A.svg(f),F=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=B.get("fill");F.stroke=M??S;const E=L.path(k(v,_,w,b,.1),F),$=Math.max(w,y.width),O=b+y.height+A,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),I=f.insert(()=>E,":first-child"),q=f.insert(()=>D);if(e.icon){const t=f.append("g");t.html(`<g>${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${x?y.height/2+A/2-o/2-s:-y.height/2-A/2-o/2-s})`),t.attr("style",`color: ${B.get("stroke")??T};`)}return C.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-O/2:O/2-y.height})`),I.attr("transform",`translate(0,${x?y.height/2+A/2:-y.height/2-A/2})`),p(e,q),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=x?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+A},{x:r+w/2,y:i-o/2+y.height+A},{x:r+w/2,y:i+o/2},{x:r-w/2,y:i+o/2},{x:r-w/2,y:i-o/2+y.height+A},{x:r-y.width/2,y:i-o/2+y.height+A}]:[{x:r-w/2,y:i-o/2},{x:r+w/2,y:i-o/2},{x:r+w/2,y:i-o/2+b},{x:r+y.width/2,y:i-o/2+b},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+b},{x:r-w/2,y:i-o/2+b}];return K.polygon(e,n,t)},f}async function Tt(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/a;const{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;const h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const u=Math.max(e.label?h??0:0,e?.assetWidth??n),g="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:u,f="on"===e.constraint?g/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(g,h??0);const{shapeSvg:y,bbox:m,label:C}=await d(t,e,"image-shape default"),x="t"===e.pos,b=-g/2,k=-f/2,w=e.label?8:0,T=c.A.svg(y),S=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const B=T.rectangle(b,k,g,f,S),v=Math.max(g,m.width),_=f+m.height+w,A=T.rectangle(-v/2,-_/2,v,_,{...S,fill:"none",stroke:"none"}),L=y.insert(()=>B,":first-child"),F=y.insert(()=>A);if(e.img){const t=y.append("image");t.attr("href",e.img),t.attr("width",g),t.attr("height",f),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-g/2},${x?_/2-f:-_/2})`)}return C.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-f/2-m.height/2-w/2:f/2-m.height/2+w/2})`),L.attr("transform",`translate(0,${x?m.height/2+w/2:-m.height/2-w/2})`),p(e,F),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=x?[{x:r-m.width/2,y:i-o/2},{x:r+m.width/2,y:i-o/2},{x:r+m.width/2,y:i-o/2+m.height+w},{x:r+g/2,y:i-o/2+m.height+w},{x:r+g/2,y:i+o/2},{x:r-g/2,y:i+o/2},{x:r-g/2,y:i-o/2+m.height+w},{x:r-m.width/2,y:i-o/2+m.height+w}]:[{x:r-g/2,y:i-o/2},{x:r+g/2,y:i-o/2},{x:r+g/2,y:i-o/2+f},{x:r+m.width/2,y:i-o/2+f},{x:r+m.width/2/2,y:i+o/2},{x:r-m.width/2,y:i+o/2},{x:r-m.width/2,y:i-o/2+f},{x:r-g/2,y:i-o/2+f}];return K.polygon(e,n,t)},y}async function St(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=Math.max(h.width+2*(s??0),e?.width??0),y=Math.max(h.height+2*(a??0),e?.height??0),m=[{x:0,y:0},{x:u,y:0},{x:u+3*y/6,y:-y},{x:-3*y/6,y:-y}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),n=t.path(i,r);C=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${y/2})`),x&&C.attr("style",x)}else C=H(l,u,y,m);return i&&C.attr("style",i),e.width=u,e.height=y,p(e,C),e.intersect=function(t){return K.polygon(e,m,t)},l}async function Bt(t,e){const{shapeSvg:r,bbox:i,label:o}=await d(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),p(e,n),e.intersect=function(t){return K.rect(e,t)},r}async function vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height??h.height)+a,y=(e?.width??h.width)+s,m=[{x:0,y:0},{x:y+3*u/6,y:0},{x:y,y:-u},{x:-3*u/6,y:-u}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),n=t.path(i,r);C=l.insert(()=>n,":first-child").attr("transform",`translate(${-y/2}, ${u/2})`),x&&C.attr("style",x)}else C=H(l,y,u,m);return i&&C.attr("style",i),e.width=y,e.height=u,p(e,C),e.intersect=function(t){return K.polygon(e,m,t)},l}async function _t(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height??h.height)+a,y=(e?.width??h.width)+s,m=[{x:-3*u/6,y:0},{x:y,y:0},{x:y+3*u/6,y:-u},{x:0,y:-u}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),n=t.path(i,r);C=l.insert(()=>n,":first-child").attr("transform",`translate(${-y/2}, ${u/2})`),x&&C.attr("style",x)}else C=H(l,y,u,m);return i&&C.attr("style",i),e.width=y,e.height=u,p(e,C),e.intersect=function(t){return K.polygon(e,m,t)},l}function At(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),d=[{x:s,y:0},{x:0,y:h+3.5},{x:s-14,y:h+3.5},{x:0,y:2*h},{x:s,y:h-3.5},{x:14,y:h-3.5}],u=c.A.svg(n),y=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=f(d),C=u.path(m,y),x=n.insert(()=>C,":first-child");return x.attr("class","outer-path"),a&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(-${s/2},${-h})`),p(e,x),e.intersect=function(t){l.Rm.info("lightningBolt intersect",e,t);return K.polygon(e,d,t)},n}(0,l.K2)(mt,"hexagon"),(0,l.K2)(Ct,"hourglass"),(0,l.K2)(xt,"icon"),(0,l.K2)(bt,"iconCircle"),(0,l.K2)(kt,"iconRounded"),(0,l.K2)(wt,"iconSquare"),(0,l.K2)(Tt,"imageSquare"),(0,l.K2)(St,"inv_trapezoid"),(0,l.K2)(Bt,"labelRect"),(0,l.K2)(vt,"lean_left"),(0,l.K2)(_t,"lean_right"),(0,l.K2)(At,"lightningBolt");var Lt=(0,l.K2)((t,e,r,i,o,n,a)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+a}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Ft=(0,l.K2)((t,e,r,i,o,n,a)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+a}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Mt=(0,l.K2)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Et(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,l="neo"===e.look?24:n;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-l-3*r,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:f}=await d(t,e,g(e)),y=(e?.width?e?.width:u.width)+2*s,m=y/2,C=m/(2.5+y/50),x=(e?.height?e?.height:u.height)+C+2*l,b=.1*x;let k;const{cssStyles:w}=e;if("handDrawn"===e.look){const t=c.A.svg(h),r=Ft(0,0,y,x,m,C,b),i=Mt(0,C,y,x,m,C),n=(0,o.Fr)(e,{}),a=t.path(r,n),s=t.path(i,n);h.insert(()=>s,":first-child").attr("class","line"),k=h.insert(()=>a,":first-child"),k.attr("class","basic label-container"),w&&k.attr("style",w)}else{const t=Lt(0,0,y,x,m,C,b);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,a.KL)(w)).attr("style",i)}return k.attr("label-offset-y",C),k.attr("transform",`translate(${-y/2}, ${-(x/2+C)})`),p(e,k),f.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${-u.height/2+C-(u.y-(u.top??0))})`),e.intersect=function(t){const r=K.rect(e,t),i=r.x-(e.x??0);if(0!=m&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(m*m));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function $t(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),f=(e?.width?e?.width:h.width)+2*(a??0),m=(e?.height?e?.height:h.height)+2*(s??0),C="neo"===e.look?m/4:m/8,x=m+C,{cssStyles:b}=e,k=c.A.svg(l),w=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:-f/2-f/2*.1,y:-x/2},{x:-f/2-f/2*.1,y:x/2},...y(-f/2-f/2*.1,x/2,f/2+f/2*.1,x/2,C,.8),{x:f/2+f/2*.1,y:-x/2},{x:-f/2-f/2*.1,y:-x/2},{x:-f/2,y:-x/2},{x:-f/2,y:x/2*1.1},{x:-f/2,y:-x/2}],S=k.polygon(T.map(t=>[t.x,t.y]),w),B=l.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-C/2})`),u.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*.1/2-(h.x-(h.left??0))},${-m/2+(e.padding??0)-C/2-(h.y-(h.top??0))})`),p(e,B),e.intersect=function(t){return K.polygon(e,T,t)},l}async function Ot(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*l,10),e.height=Math.max((e?.height??0)-2*s-2*l,10));const{shapeSvg:h,bbox:u,label:y}=await d(t,e,g(e)),m=(e?.width?e?.width:u.width)+2*a+2*l-2*l,x=(e?.height?e?.height:u.height)+2*s+2*l-2*l,b=-m/2,k=-x/2,{cssStyles:w}=e,T=c.A.svg(h),S=(0,o.Fr)(e,{}),B=[{x:b-l,y:k+l},{x:b-l,y:k+x+l},{x:b+m-l,y:k+x+l},{x:b+m-l,y:k+x},{x:b+m,y:k+x},{x:b+m,y:k+x-l},{x:b+m+l,y:k+x-l},{x:b+m+l,y:k-l},{x:b+l,y:k-l},{x:b+l,y:k},{x:b,y:k},{x:b,y:k+l}],v=[{x:b,y:k+l},{x:b+m-l,y:k+l},{x:b+m-l,y:k+x},{x:b+m,y:k+x},{x:b+m,y:k},{x:b,y:k}];"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const _=f(B);let A=T.path(_,S);const L=f(v);let F=T.path(L,S);"handDrawn"!==e.look&&(A=C(A),F=C(F));const M=h.insert("g",":first-child");return M.insert(()=>A),M.insert(()=>F),M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),y.attr("transform",`translate(${-u.width/2-l-(u.x-(u.left??0))}, ${-u.height/2+l-(u.y-(u.top??0))})`),p(e,M),e.intersect=function(t){return K.polygon(e,B,t)},h}async function Dt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await d(t,e,g(e)),l=e.padding??0,h="neo"===e.look?16:l,u="neo"===e.look?12:l;let m=!0;(e.width||e.height)&&(m=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*u);const C=Math.max(a.width,e?.width??0)+2*h,x=Math.max(a.height,e?.height??0)+3*u,b="neo"===e.look?x/4:x/8,k=x+(m?b/2:-b/2),w=-C/2,T=-k/2,S=10,{cssStyles:B}=e,v=y(w-S,T+k+S,w+C-S,T+k+S,b,.8),_=v?.[v.length-1],A=[{x:w-S,y:T+S},{x:w-S,y:T+k+S},...v,{x:w+C-S,y:_.y-S},{x:w+C,y:_.y-S},{x:w+C,y:_.y-20},{x:w+C+S,y:_.y-20},{x:w+C+S,y:T-S},{x:w+S,y:T-S},{x:w+S,y:T},{x:w,y:T},{x:w,y:T+S}],L=[{x:w,y:T+S},{x:w+C-S,y:T+S},{x:w+C-S,y:_.y-S},{x:w+C,y:_.y-S},{x:w+C,y:T},{x:w,y:T}],F=c.A.svg(n),M=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const E=f(A),$=F.path(E,M),O=f(L),D=F.path(O,M),I=n.insert(()=>$,":first-child");return I.insert(()=>D),I.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",B),i&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-b/2})`),s.attr("transform",`translate(${-a.width/2-S-(a.x-(a.left??0))}, ${-a.height/2+S-b/2-(a.y-(a.top??0))})`),p(e,I),e.intersect=function(t){return K.polygon(e,A,t)},n}async function It(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=(0,o.GX)(e);e.labelStyle=i;e.useHtmlLabels||(0,s.E)((0,s.zj)())||(e.centerLabel=!0);const{shapeSvg:a,bbox:l,label:h}=await d(t,e,g(e)),u=Math.max(l.width+2*(e.padding??0),e?.width??0),f=Math.max(l.height+2*(e.padding??0),e?.height??0),y=-u/2,m=-f/2,{cssStyles:C}=e,x=c.A.svg(a),b=(0,o.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=x.rectangle(y,m,u,f,b),w=a.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),C&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",C),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,w),e.intersect=function(t){return K.rect(e,t)},a}(0,l.K2)(Et,"linedCylinder"),(0,l.K2)($t,"linedWaveEdgedRect"),(0,l.K2)(Ot,"multiRect"),(0,l.K2)(Dt,"multiWaveEdgedRectangle"),(0,l.K2)(It,"note");var qt=(0,l.K2)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Rt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await d(t,e,g(e)),s=a.width+(e.padding??0)+(a.height+(e.padding??0)),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=c.A.svg(n),r=(0,o.Fr)(e,{}),i=qt(0,0,s),a=t.path(i,r);h=n.insert(()=>a,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),u&&h.attr("style",u)}else h=H(n,s,s,l),h.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&h.attr("style",i),p(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=K.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function zt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?21:n??0,s="neo"===e.look?12:n??0,{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),y=-((e?.width??h.width)+("neo"===e.look?2*a:a))/2,m=-((e?.height??h.height)+("neo"===e.look?2*s:s))/2,C=m/2,x=[{x:y+C,y:m},{x:y,y:0},{x:y+C,y:-m},{x:-y,y:-m},{x:-y,y:m}],{cssStyles:b}=e,k=c.A.svg(l),w=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=f(x),S=k.path(T,w),B=l.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-C/2},0)`),u.attr("transform",`translate(${-C/2-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),p(e,B),e.intersect=function(t){return K.polygon(e,x,t)},l}async function Kt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);let n;e.labelStyle=r,n=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),d=a.insert("g"),u=a.insert("g").attr("class","label").attr("style",i),g=e.description,f=e.label,y=await b(u,f,e.labelStyle,!0,!0);let m={width:0,height:0};if((0,s.E)((0,s.D7)())){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}l.Rm.info("Text 2",g);const C=g||[],x=y.getBBox(),w=await b(u,Array.isArray(C)?C.join("<br/>"):C,e.labelStyle,!0,!0),T=w.children[0],S=(0,h.Ltv)(w);m=T.getBoundingClientRect(),S.attr("width",m.width),S.attr("height",m.height);const B=(e.padding||0)/2;(0,h.Ltv)(w).attr("transform","translate( "+(m.width>x.width?0:(x.width-m.width)/2)+", "+(x.height+B+5)+")"),(0,h.Ltv)(y).attr("transform","translate( "+(m.width<x.width?0:-(x.width-m.width)/2)+", 0)"),m=u.node().getBBox(),u.attr("transform","translate("+-m.width/2+", "+(-m.height/2-B+3)+")");const v=m.width+(e.padding||0),_=m.height+(e.padding||0),A=-m.width/2-B,L=-m.height/2-B;let F,M;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,o.Fr)(e,{}),i=t.path(k(A,L,v,_,e.rx||0),r),n=t.line(-m.width/2-B,-m.height/2-B+x.height+B,m.width/2+B,-m.height/2-B+x.height+B,r);M=a.insert(()=>(l.Rm.debug("Rough node insert CXC",i),n),":first-child"),F=a.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child")}else F=d.insert("rect",":first-child"),M=d.insert("line"),F.attr("class","outer title-state").attr("style",i).attr("x",-m.width/2-B).attr("y",-m.height/2-B).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),M.attr("class","divider").attr("x1",-m.width/2-B).attr("x2",m.width/2+B).attr("y1",-m.height/2-B+x.height+B).attr("y2",-m.height/2-B+x.height+B);return p(e,F),e.intersect=function(t){return K.rect(e,t)},a}async function Pt(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return lt(t,e,{rx:i,ry:i,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}(0,l.K2)(Rt,"question"),(0,l.K2)(zt,"rect_left_inv_arrow"),(0,l.K2)(Kt,"rectWithTitle"),(0,l.K2)(Pt,"roundedRect");async function Nt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),f=(e?.width??h.width)+2*n+("neo"===e.look?8:16),y=(e?.height??h.height)+2*s,m=f-8,C=y,x=8-f/2,b=-y/2,{cssStyles:k}=e,w=c.A.svg(l),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=[{x:x,y:b},{x:x+m,y:b},{x:x+m,y:b+C},{x:x-8,y:b+C},{x:x-8,y:b},{x:x,y:b},{x:x,y:b+C}],B=w.polygon(S.map(t=>[t.x,t.y]),T),v=l.insert(()=>B,":first-child");return v.attr("class","basic label-container outer-path").attr("style",(0,a.KL)(k)),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),k&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),u.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),p(e,v),e.intersect=function(t){return K.rect(e,t)},l}async function Wt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),y=(e?.width?e?.width:h.width)+2*a,m=1.5*((e?.height?e?.height:h.height)+2*s)/1.5,C=-y/2,x=-m/2,{cssStyles:b}=e,k=c.A.svg(l),w=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:C,y:x},{x:C,y:x+m},{x:C+y,y:x+m},{x:C+y,y:x-m/2}],S=f(T),B=k.path(S,w),v=l.insert(()=>B,":first-child");return v.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",b),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${m/4})`),u.attr("transform",`translate(${-y/2+(e.padding??0)-(h.x-(h.left??0))}, ${-m/4+(e.padding??0)-(h.y-(h.top??0))})`),p(e,v),e.intersect=function(t){return K.polygon(e,T,t)},l}async function jt(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return lt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function Ht(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?20:n,s="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=h.height+("neo"===e.look?2*s:s),y=h.width+u/4+("neo"===e.look?2*a:a),C=u/2,{cssStyles:x}=e,b=c.A.svg(l),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-y/2+C,y:-u/2},{x:y/2-C,y:-u/2},...m(-y/2+C,0,C,50,90,270),{x:y/2-C,y:u/2},...m(y/2-C,0,C,50,270,450)],T=f(w),S=b.path(T,k),B=l.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",i),p(e,B),e.intersect=function(t){return K.polygon(e,w,t)},l}async function Ut(t,e){return lt(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function Yt(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=(0,o.GX)(e);e.labelStyle=i;const{cssStyles:a}=e,{lineColor:s,stateBorder:l,nodeBorder:h,nodeShadow:d}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const u=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=c.A.svg(u),f=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=g.circle(0,0,e.width,{...f,stroke:s,strokeWidth:2}),m=l??h,C=5*(e.width??0)/14,x=g.circle(0,0,C,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),b=u.insert(()=>y,":first-child");if(b.insert(()=>x),"handDrawn"!==e.look&&b.attr("class","outer-path"),a&&b.selectAll("path").attr("style",a),n&&b.selectAll("path").attr("style",n),e.width<25&&d&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${r})`)}return p(e,b),e.intersect=function(t){return K.circle(e,(e.width??0)/2,t)},u}function Gt(t,e,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:n}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=c.A.svg(a).circle(0,0,e.width,(0,o.ue)(i));s=a.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return p(e,s),e.intersect=function(t){return K.circle(e,(e.width??7)/2,t)},a}(0,l.K2)(Nt,"shadedProcess"),(0,l.K2)(Wt,"slopedRect"),(0,l.K2)(jt,"squareRect"),(0,l.K2)(Ht,"stadium"),(0,l.K2)(Ut,"state"),(0,l.K2)(Yt,"stateEnd"),(0,l.K2)(Gt,"stateStart");async function Xt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e?.padding??8,s="neo"===e.look?28:n,l="neo"===e.look?12:n,{shapeSvg:h,bbox:u}=await d(t,e,g(e)),f=(e?.width??u.width)+16+s,y=(e?.height??u.height)+l,m=f-16,C=y,x=-f/2,b=-y/2,k=[{x:0,y:0},{x:m,y:0},{x:m,y:-C},{x:0,y:-C},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-C},{x:-8,y:-C},{x:-8,y:0}];if("handDrawn"===e.look){const t=c.A.svg(h),r=(0,o.Fr)(e,{}),i=t.rectangle(x,b,m+16,C,r),n=t.line(x+8,b,x+8,b+C,r),s=t.line(x+8+m,b,x+8+m,b+C,r);h.insert(()=>n,":first-child"),h.insert(()=>s,":first-child");const l=h.insert(()=>i,":first-child"),{cssStyles:d}=e;l.attr("class","basic label-container").attr("style",(0,a.KL)(d)),p(e,l)}else{const t=H(h,m,C,k);i&&t.attr("style",i),p(e,t)}return e.intersect=function(t){return K.polygon(e,k,t)},h}(0,l.K2)(Xt,"subroutine");async function Vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*s),10));const{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height?e?.height:h.height)+2*s,y=.2*u,m=.2*u,C=(e?.width?e?.width:h.width)+2*a+y-y,x=u,b=-C/2,k=-x/2,{cssStyles:w}=e,T=c.A.svg(l),S=(0,o.Fr)(e,{}),B=[{x:b-y/2,y:k},{x:b+C+y/2,y:k},{x:b+C+y/2,y:k+x},{x:b-y/2,y:k+x}],v=[{x:b+C-y/2,y:k+x},{x:b+C+y/2,y:k+x},{x:b+C+y/2,y:k+x-m}];"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const _=f(B),A=T.path(_,S),L=f(v),F=T.path(L,{...S,fillStyle:"solid"}),M=l.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),p(e,M),e.intersect=function(t){return K.polygon(e,B,t)},l}async function Zt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await d(t,e,g(e)),l=Math.max(a.width+2*(e.padding??0),e?.width??0),h=Math.max(a.height+2*(e.padding??0),e?.height??0),u=h/8,m=.2*l,C=.2*h,x=h+u,{cssStyles:b}=e,k=c.A.svg(n),w=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:-l/2-l/2*.1,y:x/2},...y(-l/2-l/2*.1,x/2,l/2+l/2*.1,x/2,u,.8),{x:l/2+l/2*.1,y:-x/2},{x:-l/2-l/2*.1,y:-x/2}],S=-l/2+l/2*.1,B=-x/2-.4*C,v=[{x:S+l-m,y:1.3*(B+h)},{x:S+l,y:B+h-C},{x:S+l,y:.9*(B+h)},...y(S+l,1.25*(B+h),S+l-m,1.3*(B+h),.02*-h,.5)],_=f(T),A=k.path(_,w),L=f(v),F=k.path(L,{...w,fillStyle:"solid"}),M=n.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-h/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),p(e,M),e.intersect=function(t){return K.polygon(e,T,t)},n}async function Qt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await d(t,e,g(e)),s=Math.max(a.width+(e.padding??0),e?.width||0),l=Math.max(a.height+(e.padding??0),e?.height||0),h=-s/2,c=-l/2,u=n.insert("rect",":first-child");return u.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",s).attr("height",l),p(e,u),e.intersect=function(t){return K.rect(e,t)},n}(0,l.K2)(Vt,"taggedRect"),(0,l.K2)(Zt,"taggedWaveEdgedRectangle"),(0,l.K2)(Qt,"text");var Jt=(0,l.K2)((t,e,r,i,o,n)=>`M${t},${e}\n a${o},${n} 0,0,1 0,${-i}\n l${r},0\n a${o},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${n} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),te=(0,l.K2)((t,e,r,i,o,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ee=(0,l.K2)((t,e,r,i,o,n)=>[`M${t+r/2},${-i/2}`,`a${o},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function re(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?12:n/2;if(e.width||e.height){const t=e.height??0;e.height=(e.height??0)-s,e.height<5&&(e.height=5);const r=t/2/(2.5+t/50);e.width=(e.width??0)-s-3*r,e.width<10&&(e.width=10)}const{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),f=(e.height?e.height:h.height)+s,y=f/2,m=y/(2.5+f/50),C=(e.width?e.width:h.width)+m+s,{cssStyles:x}=e;let b;if("handDrawn"===e.look){const t=c.A.svg(l),r=te(0,0,C,f,m,y),i=ee(0,0,C,f,m,y),n=t.path(r,(0,o.Fr)(e,{})),a=t.path(i,(0,o.Fr)(e,{fill:"none"}));b=l.insert(()=>a,":first-child"),b=l.insert(()=>n,":first-child"),b.attr("class","basic label-container"),x&&b.attr("style",x)}else{const t=Jt(0,0,C,f,m,y);b=l.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,a.KL)(x)).attr("style",i),b.attr("class","basic label-container outer-path"),x&&b.selectAll("path").attr("style",x),i&&b.selectAll("path").attr("style",i)}return b.attr("label-offset-x",m),b.attr("transform",`translate(${-C/2}, ${f/2} )`),u.attr("transform",`translate(${-h.width/2-m-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),p(e,b),e.intersect=function(t){const r=K.rect(e,t),i=r.y-(e.y??0);if(0!=y&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let o=m*m*(1-i*i/(y*y));0!=o&&(o=Math.sqrt(Math.abs(o))),o=m-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},l}async function ie(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a=(e.look,n),s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height??h.height)+a,y=(e?.width??h.width)+s,m=[{x:-3*u/6,y:0},{x:y+3*u/6,y:0},{x:y,y:-u},{x:0,y:-u}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),n=t.path(i,r);C=l.insert(()=>n,":first-child").attr("transform",`translate(${-y/2}, ${u/2})`),x&&C.attr("style",x)}else C=H(l,y,u,m);return i&&C.attr("style",i),e.width=y,e.height=u,p(e,C),e.intersect=function(t){return K.polygon(e,m,t)},l}async function oe(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.width?e?.width:h.width)+2*a,y=(e?.height?e?.height:h.height)+2*s,{cssStyles:m}=e,C=c.A.svg(l),x=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2*.8,y:-y/2},{x:u/2*.8,y:-y/2},{x:u/2,y:-y/2*.6},{x:u/2,y:y/2},{x:-u/2,y:y/2},{x:-u/2,y:-y/2*.6}],k=f(b),w=C.path(k,x),T=l.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",i),p(e,T),e.intersect=function(t){return K.polygon(e,b,t)},l}(0,l.K2)(re,"tiltedCylinder"),(0,l.K2)(ie,"trapezoid"),(0,l.K2)(oe,"trapezoidalPentagon");async function ne(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?2*n:n;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:u,label:y}=await d(t,e,g(e)),m=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),C=(e?.width?e?.width:u.width)+a,x=e?.height?e?.height:C+u.height,b=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-x}],{cssStyles:k}=e,w=c.A.svg(h),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=f(b),B=w.path(S,T),v=h.insert(()=>B,":first-child").attr("transform",`translate(${-x/2}, ${x/2})`).attr("class","outer-path");return k&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",k),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),e.width=C,e.height=x,p(e,v),y.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${x/2-(u.height+(e.padding??0)/(m?2:1)-(u.y-(u.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,b,t),K.polygon(e,b,t)},h}async function ae(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;let l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:u,label:m}=await d(t,e,g(e)),C=(e?.width?e?.width:u.width)+2*(a??0),x=(e?.height?e?.height:u.height)+2*(s??0),b="neo"===e.look?x/4:x/8,k=x+(l?b:-b),{cssStyles:w}=e,T=14-C,S=T>0?T/2:0,B=c.A.svg(h),v=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const _=[{x:-C/2-S,y:k/2},...y(-C/2-S,k/2,C/2+S,k/2,b,.8),{x:C/2+S,y:-k/2},{x:-C/2-S,y:-k/2}],A=f(_),L=B.path(A,v),F=h.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",w),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-b/2})`),m.attr("transform",`translate(${-C/2+(e.padding??0)-(u.x-(u.left??0))},${-x/2+(e.padding??0)-b-(u.y-(u.top??0))})`),p(e,F),e.intersect=function(t){return K.polygon(e,_,t)},h}async function se(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?20:n;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.width?e?.width:h.width)+2*a,m=(e?.height?e?.height:h.height)+s,C=m/8,x=m+2*C,{cssStyles:b}=e,k=c.A.svg(l),w=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:-u/2,y:x/2},...y(-u/2,x/2,u/2,x/2,C,1),{x:u/2,y:-x/2},...y(u/2,-x/2,-u/2,-x/2,C,-1)],S=f(T),B=k.path(S,w),v=l.insert(()=>B,":first-child");return v.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),p(e,v),e.intersect=function(t){return K.polygon(e,T,t)},l}(0,l.K2)(ne,"triangle"),(0,l.K2)(ae,"waveEdgedRectangle"),(0,l.K2)(se,"waveRectangle");var le=10;async function he(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-le,10),e.height=Math.max((e?.height??0)-2*a-le,10));const{shapeSvg:s,bbox:l,label:h}=await d(t,e,g(e)),u=(e?.width?e?.width:l.width)+2*n+le,f=(e?.height?e?.height:l.height)+2*a+le,y=u-le,m=f-le,C=-y/2,x=-m/2,{cssStyles:b}=e,k=c.A.svg(s),w=(0,o.Fr)(e,{}),T=[{x:C-le,y:x-le},{x:C-le,y:x+m},{x:C+y,y:x+m},{x:C+y,y:x-le}],S=`M${C-le},${x-le} L${C+y},${x-le} L${C+y},${x+m} L${C-le},${x+m} L${C-le},${x-le}\n M${C-le},${x} L${C+y},${x}\n M${C},${x-le} L${C},${x+m}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const B=k.path(S,w),v=s.insert(()=>B,":first-child");return v.attr("transform","translate(5, 5)"),v.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),h.attr("transform",`translate(${-l.width/2+5-(l.x-(l.left??0))}, ${-l.height/2+5-(l.y-(l.top??0))})`),p(e,v),e.intersect=function(t){return K.polygon(e,T,t)},s}(0,l.K2)(he,"windowPane");var ce=new Set(["redux-color","redux-dark-color"]),de=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function ue(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:i,themeVariables:n}=(0,s.zj)(),{rowEven:l,rowOdd:d,nodeBorder:u,borderColorArray:f}=n;if("handDrawn"===e.look){const{themeVariables:r}=(0,s.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await ue(t,o)}const y=(0,s.zj)();e.useHtmlLabels=y.htmlLabels;let m=y.er?.diagramPadding??10,C=y.er?.entityPadding??6;const{cssStyles:x}=e,{labelStyles:b,nodeStyles:k}=(0,o.GX)(e);if(0===r.attributes.length&&e.label){const o={rx:0,ry:0,labelPaddingX:m,labelPaddingY:1.5*m,classes:""};(0,a.Un)(e.label,y)+2*o.labelPaddingX<y.er.minEntityWidth&&(e.width=y.er.minEntityWidth);const n=await lt(t,e,o);if(null!=i&&ce.has(i)){const t=r.colorIndex??0;n.attr("data-color-id","color-"+t%f.length)}if(!(0,s._3)(y.htmlLabels)){const t=n.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return n}y.htmlLabels||(m*=1.25,C*=1.25);let w=g(e);w||(w="node default");const T=t.insert("g").attr("class",w).attr("id",e.domId||e.id),S=await pe(T,e.label??"",y,0,0,["name"],b);S.height+=C;let B=0;const v=[],_=[];let A=0,L=0,F=0,M=0,E=!0,$=!0;for(const o of r.attributes){const t=await pe(T,o.type,y,0,B,["attribute-type"],b);A=Math.max(A,t.width+m);const e=await pe(T,o.name,y,0,B,["attribute-name"],b);L=Math.max(L,e.width+m);const r=await pe(T,o.keys.join(),y,0,B,["attribute-keys"],b);F=Math.max(F,r.width+m);const i=await pe(T,o.comment,y,0,B,["attribute-comment"],b);M=Math.max(M,i.width+m);const n=Math.max(t.height,e.height,r.height,i.height)+C;_.push({yOffset:B,rowHeight:n}),B+=n}let O=4;F<=m&&(E=!1,F=0,O--),M<=m&&($=!1,M=0,O--);const D=T.node().getBBox();if(S.width+2*m-(A+L+F+M)>0){const t=S.width+2*m-(A+L+F+M);A+=t/O,L+=t/O,F>0&&(F+=t/O),M>0&&(M+=t/O)}const I=A+L+F+M,q=c.A.svg(T),R=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(R.roughness=0,R.fillStyle="solid");let z=0;_.length>0&&(z=_.reduce((t,e)=>t+(e?.rowHeight??0),0));const P=Math.max(D.width+2*m,e?.width||0,I),N=Math.max((z??0)+S.height,e?.height||0),W=-P/2,j=-N/2;if(T.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),o=i.attr("transform");let n=0,a=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),a=parseFloat(t[2]),i.attr("class").includes("attribute-name")?n+=A:i.attr("class").includes("attribute-keys")?n+=A+L:i.attr("class").includes("attribute-comment")&&(n+=A+L+F))}i.attr("transform",`translate(${W+m/2+n}, ${a+j+S.height+C/2})`)}),T.select(".name").attr("transform","translate("+-S.width/2+", "+(j+C/2)+")"),null!=i&&ce.has(i)){const t=r.colorIndex??0;T.attr("data-color-id","color-"+t%f.length)}const H=q.rectangle(W,j,P,N,R),U=T.insert(()=>H,":first-child").attr("class","outer-path").attr("style",x.join(""));v.push(0);for(const[o,a]of _.entries()){const t=(o+1)%2==0&&0!==a.yOffset,e=q.rectangle(W,S.height+j+a?.yOffset,P,a?.rowHeight,{...R,fill:t?l:d,stroke:u});T.insert(()=>e,"g.label").attr("style",x.join("")).attr("class","row-rect-"+(t?"even":"odd"))}const Y=1e-4;let G=ge(W,S.height+j,P+W,S.height+j,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R);if(T.insert(()=>X).attr("class","divider"),G=ge(A+W,S.height+j,A+W,N+j,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider"),E){const t=A+L+W;G=ge(t,S.height+j,t,N+j,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider")}if($){const t=A+L+F+W;G=ge(t,S.height+j,t,N+j,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider")}for(const o of v){const t=S.height+j+o;G=ge(W,t,P+W,t,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider")}if(p(e,U),k&&"handDrawn"!==e.look)if(null!=i&&de.has(i))T.selectAll("path").attr("style",k);else{const t=k.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");T.selectAll("path").attr("style",e??""),T.selectAll(".row-rect-even path").attr("style",k)}return e.intersect=function(t){return K.rect(e,t)},T}async function pe(t,e,r,i=0,o=0,l=[],c=""){const d=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",c);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=d.node().appendChild(await(0,n.GZ)(d,e,{width:(0,a.Un)(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let t=u.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let p=u.getBBox();if((0,s._3)(r.htmlLabels)){const t=u.children[0];t.style.textAlign="start";const e=(0,h.Ltv)(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}function ge(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function fe(t,e,r,i,o=r.class.padding??12){const n=i?0:3,a=t.insert("g").attr("class",g(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,d=0,u=0,p=0;if(s=a.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await ye(s,{text:`\xab${t}\xbb`},0);d=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await ye(l,e,0,["font-weight: bolder"]);const f=l.node().getBBox();u=f.height,h=a.insert("g").attr("class","members-group text");let y=0;for(const g of e.members){y+=await ye(h,g,y,[g.parseClassifier()])+n}p=h.node().getBBox().height,p<=0&&(p=o/2),c=a.insert("g").attr("class","methods-group text");let m=0;for(const g of e.methods){m+=await ye(c,g,m,[g.parseClassifier()])+n}let C=a.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-f.width/2}, ${d})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}async function ye(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),c=(0,s.zj)();let d="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(c.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!d&&u.startsWith("\\")&&(u=u.substring(1)),(0,s.Wi)(u)&&(d=!0);const p=await(0,n.GZ)(o,(0,s.oB)((0,a.Sm)(u)),{width:(0,a.Un)(u,c)+50,classes:"markdown-node-label",useHtmlLabels:d},c);let g,f=1;if(d){const t=p.children[0],e=(0,h.Ltv)(p);f=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(f+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,l.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{i.includes("font-weight: bolder")&&(0,h.Ltv)(p).selectAll("tspan").attr("font-weight",""),f=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes("&gt")){t.textContent=u[0]+u.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim();" "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),g=p.getBBox()}return o.attr("transform","translate(0,"+(-g.height/(2*f)+r)+")"),g.height}async function me(t,e){const r=(0,s.D7)(),{themeVariables:i}=r,{useGradient:n}=i,a=r.class.padding??12,l=a,d=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:g,bbox:f}=await fe(t,e,r,d,l),{labelStyles:y,nodeStyles:m}=(0,o.GX)(e);e.labelStyle=y,e.cssStyles=u.styles||"";const C=u.styles?.join(";")||m||"";e.cssStyles||(e.cssStyles=C.replaceAll("!important","").split(";"));const x=0===u.members.length&&0===u.methods.length&&!r.class?.hideEmptyMembersBox,b=c.A.svg(g),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=Math.max(e.width??0,f.width);let T=Math.max(e.height??0,f.height);const S=(e.height??0)>f.height;0===u.members.length&&0===u.methods.length?T+=l:u.members.length>0&&0===u.methods.length&&(T+=2*l);const B=-w/2,v=-T/2;let _=x?2*a:0===u.members.length&&0===u.methods.length?-a:0;S&&(_=2*a);const A=b.rectangle(B-a,v-a-(x?a:0===u.members.length&&0===u.methods.length?-a/2:0),w+2*a,T+2*a+_,k),L=g.insert(()=>A,":first-child");L.attr("class","basic label-container outer-path");const F=L.node().getBBox(),M=g.select(".annotation-group").node().getBBox().height-(x?a/2:0)||0,E=g.select(".label-group").node().getBBox().height-(x?a/2:0)||0,$=g.select(".members-group").node().getBBox().height-(x?a/2:0)||0,O=(M+E+v+a-(v-a-(x?a:0===u.members.length&&0===u.methods.length?-a/2:0)))/2;if(g.selectAll(".text").each((t,e,i)=>{const o=(0,h.Ltv)(i[e]),n=o.attr("transform");let s=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[2]))}let c=s+v+a-(x?a:0===u.members.length&&0===u.methods.length?-a/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max($,l/2);c=S?Math.max(O,M+E+t+v+2*l+a)+2*l:M+E+t+v+4*l+a}0===u.members.length&&0===u.methods.length&&r.class?.hideEmptyMembersBox&&(c=u.annotations.length>0?s-l:s),d||(c-=4);let p=B;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(p=-o.node()?.getBBox().width/2||0,g.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),o.attr("transform",`translate(${p}, ${c})`)}),u.members.length>0||u.methods.length>0||x){const t=M+E+v+a,r=b.line(F.x,t,F.x+F.width,t+.001,k);g.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",C)}if(x||u.members.length>0||u.methods.length>0){const t=M+E+$+v+2*l+a,r=b.line(F.x,S?Math.max(O,t):t,F.x+F.width,(S?Math.max(O,t):t)+.001,k);g.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",C)}if("handDrawn"!==u.look&&g.selectAll("path").attr("style",C),L.select(":nth-child(2)").attr("style",C),g.selectAll(".divider").select("path").attr("style",C),e.labelStyle?g.selectAll("span").attr("style",e.labelStyle):g.selectAll("span").attr("style",C),!d){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(C);if(e){const t=e[0].replace("color","fill");g.selectAll("tspan").attr("style",t)}else if(y){const e=t.exec(y);if(e){const t=e[0].replace("color","fill");g.selectAll("tspan").attr("style",t)}}}return p(e,L),e.intersect=function(t){return K.rect(e,t)},g}async function Ce(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const n=e,a=e,l="verifyMethod"in e,d=g(e),{themeVariables:u}=(0,s.D7)(),{borderColorArray:f,requirementEdgeLabelBackground:y}=u,m=t.insert("g").attr("class",d).attr("id",e.domId??e.id);let C;C=l?await xe(m,`&lt;&lt;${n.type}&gt;&gt;`,0,e.labelStyle):await xe(m,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let x=C;const b=await xe(m,n.name,x,e.labelStyle+"; font-weight: bold;");if(x+=b+20,l){x+=await xe(m,""+(n.requirementId?`ID: ${n.requirementId}`:""),x,e.labelStyle);x+=await xe(m,""+(n.text?`Text: ${n.text}`:""),x,e.labelStyle);x+=await xe(m,""+(n.risk?`Risk: ${n.risk}`:""),x,e.labelStyle),await xe(m,""+(n.verifyMethod?`Verification: ${n.verifyMethod}`:""),x,e.labelStyle)}else{x+=await xe(m,""+(a.type?`Type: ${a.type}`:""),x,e.labelStyle),await xe(m,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),x,e.labelStyle)}const k=(m.node()?.getBBox().width??200)+20,w=(m.node()?.getBBox().height??200)+20,T=-k/2,S=-w/2,B=c.A.svg(m),v=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const _=B.rectangle(T,S,k,w,v),A=m.insert(()=>_,":first-child");if(A.attr("class","basic label-container outer-path").attr("style",i),f?.length){const t=e.colorIndex??0;m.attr("data-color-id","color-"+t%f.length)}if(m.selectAll(".label").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),o=i.attr("transform");let n=0,a=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),a=parseFloat(t[2]))}const s=a-w/2;let l=T+10;0!==e&&1!==e||(l=n),i.attr("transform",`translate(${l}, ${s+20})`)}),x>C+b+20){const t=S+C+b+20;let r;if("neo"===e.look){const e=.001,i=[[T,t],[T+k,t],[T+k,t+e],[T,t+e]];r=B.polygon(i,v)}else r=B.line(T,t,T+k,t,v);m.insert(()=>r).attr("class","divider")}return p(e,A),e.intersect=function(t){return K.rect(e,t)},i&&"handDrawn"!==e.look&&(y||f?.length)&&m.selectAll("path").attr("style",i),m}async function xe(t,e,r,i=""){if(""===e)return 0;const o=t.insert("g").attr("class","label").attr("style",i),l=(0,s.D7)(),c=l.htmlLabels??!0,d=await(0,n.GZ)(o,(0,s.oB)((0,a.Sm)(e)),{width:(0,a.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:i},l);let u;if(c){const t=d.children[0],e=(0,h.Ltv)(d);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}else{const t=d.children[0];for(const e of t.children)i&&e.setAttribute("style",i);u=d.getBBox(),u.height+=6}return o.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}(0,l.K2)(ue,"erBox"),(0,l.K2)(pe,"addText"),(0,l.K2)(ge,"lineToPolygon"),(0,l.K2)(fe,"textHelper"),(0,l.K2)(ye,"addText"),(0,l.K2)(me,"classBox"),(0,l.K2)(Ce,"requirementBox"),(0,l.K2)(xe,"addText");var be=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ke(t,e,{config:r}){const{labelStyles:i,nodeStyles:n}=(0,o.GX)(e);e.labelStyle=i||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:h}=await d(t,e,g(e)),f=e.padding||10;let y,m="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(m=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),y=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const C={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,b;({label:x,bbox:b}=y?await u(y,"ticket"in e&&e.ticket||"",C):await u(s,"ticket"in e&&e.ticket||"",C));const{label:w,bbox:T}=await u(s,"assigned"in e&&e.assigned||"",C);e.width=a;const S=e?.width||0,B=Math.max(b.height,T.height)/2,v=Math.max(l.height+20,e?.height||0)+B,_=-S/2,A=-v/2;let L;h.attr("transform","translate("+(f-S/2)+", "+(-B-l.height/2)+")"),x.attr("transform","translate("+(f-S/2)+", "+(-B+l.height/2)+")"),w.attr("transform","translate("+(f+S/2-T.width-20)+", "+(-B+l.height/2)+")");const{rx:F,ry:M}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=c.A.svg(s),r=(0,o.Fr)(e,{}),i=F||M?t.path(k(_,A,S,v,F||0),r):t.rectangle(_,A,S,v,r);L=s.insert(()=>i,":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=s.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",n).attr("rx",F??5).attr("ry",M??5).attr("x",_).attr("y",A).attr("width",S).attr("height",v);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=_+2,i=A+Math.floor((F??0)/2),o=A+v-Math.floor((F??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",be(t))}}return p(e,L),e.height=v,e.intersect=function(t){return K.rect(e,t)},s}async function we(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:h,label:u}=await d(t,e,g(e)),f=s.width+10*h,y=s.height+8*h,m=.15*f,{cssStyles:C}=e,x=s.width+20,b=s.height+20,k=Math.max(f,x),w=Math.max(y,b);let T;u.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const S=`M0 0 \n a${m},${m} 1 0,0 ${.25*k},${-1*w*.1}\n a${m},${m} 1 0,0 ${.25*k},0\n a${m},${m} 1 0,0 ${.25*k},0\n a${m},${m} 1 0,0 ${.25*k},${.1*w}\n\n a${m},${m} 1 0,0 ${.15*k},${.33*w}\n a${.8*m},${.8*m} 1 0,0 0,${.34*w}\n a${m},${m} 1 0,0 ${-1*k*.15},${.33*w}\n\n a${m},${m} 1 0,0 ${-1*k*.25},${.15*w}\n a${m},${m} 1 0,0 ${-1*k*.25},0\n a${m},${m} 1 0,0 ${-1*k*.25},0\n a${m},${m} 1 0,0 ${-1*k*.25},${-1*w*.15}\n\n a${m},${m} 1 0,0 ${-1*k*.1},${-1*w*.33}\n a${.8*m},${.8*m} 1 0,0 0,${-1*w*.34}\n a${m},${m} 1 0,0 ${.1*k},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(n),r=(0,o.Fr)(e,{}),i=t.path(S,r);T=n.insert(()=>i,":first-child"),T.attr("class","basic label-container").attr("style",(0,a.KL)(C))}else T=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",S);return T.attr("transform",`translate(${-k/2}, ${-w/2})`),p(e,T),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),K.rect(e,t)},n}async function Te(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:h,label:u}=await d(t,e,g(e)),f=s.width+2*h,y=s.height+2*h,m=.15*f,C=.25*f,x=.35*f,b=.2*f,{cssStyles:k}=e;let w;const T=`M0 0 \n a${m},${m} 0 0,1 ${.25*f},${-1*f*.1}\n a${x},${x} 1 0,1 ${.4*f},${-1*f*.1}\n a${C},${C} 1 0,1 ${.35*f},${.2*f}\n\n a${m},${m} 1 0,1 ${.15*f},${.35*y}\n a${b},${b} 1 0,1 ${-1*f*.15},${.65*y}\n\n a${C},${m} 1 0,1 ${-1*f*.25},${.15*f}\n a${x},${x} 1 0,1 ${-1*f*.5},0\n a${m},${m} 1 0,1 ${-1*f*.25},${-1*f*.15}\n\n a${m},${m} 1 0,1 ${-1*f*.1},${-1*y*.35}\n a${b},${b} 1 0,1 ${.1*f},${-1*y*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(n),r=(0,o.Fr)(e,{}),i=t.path(T,r);w=n.insert(()=>i,":first-child"),w.attr("class","basic label-container").attr("style",(0,a.KL)(k))}else w=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",T);return u.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),w.attr("transform",`translate(${-f/2}, ${-y/2})`),p(e,w),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),K.rect(e,t)},n}async function Se(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:l}=await d(t,e,g(e)),h=a.width+8*s,c=a.height+2*s,u="neo"===e.look?`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-5}\n H${-h/2}\n Z\n `:`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${-(h-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);const f=n.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>l.node()),p(e,f),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return K.rect(e,t)},n}async function Be(t,e){return G(t,e,{padding:e.padding??0})}(0,l.K2)(ke,"kanbanItem"),(0,l.K2)(we,"bang"),(0,l.K2)(Te,"cloud"),(0,l.K2)(Se,"defaultMindmapNode"),(0,l.K2)(Be,"mindmapCircle");var ve=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:jt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ht},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Xt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:st},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ht},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:G},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:we},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Te},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Rt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:mt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_t},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:vt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ie},{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:St},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:dt},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Qt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:U},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Nt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Gt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:gt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ct},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Q},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:At},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ae},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ft},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:re},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Et},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:it},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ct},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ne},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:he},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ut},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:oe},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:pt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Wt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Dt},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ot},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:j},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:V},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Zt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Vt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:se},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:zt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:$t}],_e=(0,l.K2)(()=>{const t={state:Ut,choice:Y,note:It,rectWithTitle:Kt,labelRect:Bt,iconSquare:wt,iconCircle:bt,icon:xt,iconRounded:kt,imageSquare:Tt,anchor:P,kanbanItem:ke,mindmapCircle:Be,defaultMindmapNode:Se,classBox:me,erBox:ue,requirementBox:Ce},e=[...Object.entries(t),...ve.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Ae(t){return t in _e}(0,l.K2)(Ae,"isValidShape");var Le=new Map;async function Fe(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const n=e.shape?_e[e.shape]:void 0;if(!n)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let a;"sandbox"===r.config.securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a??null),o=await n(i,e,r)}else o=await n(t,e,r),i=o;return i.attr("data-look",(0,a.KL)(e.look)),e.tooltip&&o.attr("title",e.tooltip),Le.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,l.K2)(Fe,"insertNode");var Me=(0,l.K2)((t,e)=>{Le.set(e.id,t)},"setNodeElem"),Ee=(0,l.K2)(()=>{Le.clear()},"clear"),$e=(0,l.K2)(t=>{const e=Le.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},1546(t,e,r){"use strict";r.d(e,{pe:()=>A,PX:()=>it,ru:()=>tt,Un:()=>et,$t:()=>ht,Sm:()=>ut,C4:()=>dt,$C:()=>Y,rY:()=>pt,sM:()=>H,KL:()=>gt,Ib:()=>D,dq:()=>at,I5:()=>lt,yT:()=>X,vU:()=>$,_K:()=>ct,bH:()=>Q});var i=r(3316),o=r(7970),n=r(4674),a=r(7012);function s(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...i){const o=e?e.apply(this,i):i[0],n=r.cache;if(n.has(o))return n.get(o);const a=t.apply(this,i);return r.cache=n.set(o,a)||n,a};return r.cache=new(s.Cache||Map),r}function l(){}s.Cache=Map;var h=r(1291),c=r(4183);function d(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var u=r(4100);function p(t){return"__proto__"===t}function g(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var f=r(3168),y=r(707);function m(t,e,r,i=new Map,o=void 0){const n=o?.(t,e,r,i);if(void 0!==n)return n;if((0,h.s)(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=m(t[n],n,r,i,o);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;i.set(t,e);for(const[n,a]of t)e.set(n,m(a,n,r,i,o));return e}if(t instanceof Set){const e=new Set;i.set(t,e);for(const n of t)e.add(m(n,void 0,r,i,o));return e}if((0,u.P)(t))return t.subarray();if((0,c.i)(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=m(t[n],n,r,i,o);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),C(e,t,r,i,o),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return i.set(t,e),C(e,t,r,i,o),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof Error){const e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,C(e,t,r,i,o),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof Number){const e=new Number(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof String){const e=new String(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch((0,f.b)(t)){case y.R_:case y.Uw:case y.cT:case y.iq:case y.$V:case y.vC:case y.ri:case y.ML:case y.XZ:case y.i1:case y._u:case y.pj:case y.kj:case y.GX:case y.Av:case y.NA:case y.OG:case y.VP:case y.Qb:case y.q:case y.x6:case y.ZR:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),C(e,t,r,i,o),e}return t}function C(t,e,r=t,i,o){const n=[...Object.keys(e),...d(e)];for(let a=0;a<n.length;a++){const s=n[a],l=Object.getOwnPropertyDescriptor(t,s);(null==l||l.writable)&&(t[s]=m(e[s],s,r,i,o))}}function x(t,e){return function(t,e){return m(t,void 0,t,new Map,e)}(t,(r,i,o,n)=>{const a=e?.(r,i,o,n);if(void 0!==a)return a;if("object"==typeof t){if("[object Object]"===(0,f.b)(t)&&"function"!=typeof t.constructor){const e={};return n.set(t,e),C(e,t,o,n),e}switch(Object.prototype.toString.call(t)){case y.kj:case y.OG:case y.$V:{const e=new t.constructor(t?.valueOf());return C(e,t),e}case y.R_:{const e={};return C(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function b(t){return x(t)}var k=r(8331);function w(t){return"object"==typeof t&&null!==t}var T=r(3819);function S(t){return w(t)&&(0,T.X)(t)}var B=r(6526);function v(t,e,r,i){if((0,h.s)(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if((0,h.s)(t))return t;if(Array.isArray(t)||(0,c.i)(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return"undefined"!=typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const o=[...Object.keys(e),...d(e)];for(let n=0;n<o.length;n++){const a=o[n];if(p(a))continue;let s=e[a],l=t[a];if((0,k.N)(s)&&(s={...s}),(0,k.N)(l)&&(l={...l}),(0,u.P)(s)&&(s=b(s)),Array.isArray(s))if(Array.isArray(l)){const t=[],e=Reflect.ownKeys(l);for(let r=0;r<e.length;r++){const i=e[r];t[i]=l[i]}l=t}else if(S(l)){const t=[];for(let e=0;e<l.length;e++)t[e]=l[e];l=t}else l=[];const h=r(l,s,a,t,e,i);void 0!==h?t[a]=h:Array.isArray(s)||w(l)&&w(s)&&(g(l)||g(s)||(0,B.i)(l)||(0,B.i)(s))?t[a]=v(l,s,r,i):null==l&&g(s)?t[a]=v({},s,r,i):null==l&&(0,B.i)(s)?t[a]=b(s):void 0!==l&&void 0===s||(t[a]=s)}return t}function _(t,...e){return function(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let o=t;for(let n=0;n<r.length;n++)o=v(o,r[n],i,new Map);return o}(t,...e,l)}var A="\u200b",L={curveBasis:a.qrM,curveBasisClosed:a.Yu4,curveBasisOpen:a.IA3,curveBumpX:a.Wi0,curveBumpY:a.PGM,curveBundle:a.OEq,curveCardinalClosed:a.olC,curveCardinalOpen:a.IrU,curveCardinal:a.y8u,curveCatmullRomClosed:a.Q7f,curveCatmullRomOpen:a.cVp,curveCatmullRom:a.oDi,curveLinear:a.lUB,curveLinearClosed:a.Lx9,curveMonotoneX:a.nVG,curveMonotoneY:a.uxU,curveNatural:a.Xf2,curveStep:a.GZz,curveStepAfter:a.UPb,curveStepBefore:a.dyv},F=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,M=(0,o.K2)(function(t,e){const r=E(t,/(?:init\b)|(?:initialize\b)/);let o={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),o=(0,i.hH)(o,[...t])}else o=r.args;if(!o)return;let n=(0,i.Ch)(t,e);const a="config";return void 0!==o[a]&&("flowchart-v2"===n&&(n="flowchart"),o[n]=o[a],delete o[a]),o},"detectInit"),E=(0,o.K2)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${F.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),o.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const a=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;a.push({type:t,args:e})}return 0===a.length?{type:t,args:null}:1===a.length?a[0]:a}catch(r){return o.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),$=(0,o.K2)(function(t){return t.replace(i.DB,"")},"removeDirectives"),O=(0,o.K2)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function D(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return L[r]??e}function I(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,n.J)(r):r}(0,o.K2)(D,"interpolateToCurve"),(0,o.K2)(I,"formatUrl");var q=(0,o.K2)((t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a)return void o.Rm.error(`Function name: ${t} not found in window`);a[n](...e)},"runFunc");function R(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function z(t){let e,r=0;t.forEach(t=>{r+=R(t,e),e=t});return N(t,r/2)}function K(t){return 1===t.length?t[0]:z(t)}(0,o.K2)(R,"distance"),(0,o.K2)(z,"traverseEdge"),(0,o.K2)(K,"calcLabelPosition");var P=(0,o.K2)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),N=(0,o.K2)((t,e)=>{let r,i=e;for(const o of t){if(r){const t=R(o,r);if(0===t)return r;if(t<i)i-=t;else{const e=i/t;if(e<=0)return r;if(e>=1)return{x:o.x,y:o.y};if(e>0&&e<1)return{x:P((1-e)*r.x+e*o.x,5),y:P((1-e)*r.y+e*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),W=(0,o.K2)((t,e,r)=>{o.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=N(e,25),n=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*n+(e[0].x+i.x)/2,s.y=-Math.cos(a)*n+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function j(t,e,r){const i=structuredClone(r);o.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const n=N(i,25+t),a=10+.5*t,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*a+(i[0].y+n.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(i[0].y+n.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2),l}function H(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,o.K2)(j,"calcTerminalLabelPosition"),(0,o.K2)(H,"getStylesFromArray");var U=0,Y=(0,o.K2)(()=>(U++,"id-"+Math.random().toString(36).substr(2,12)+"-"+U),"generateId");function G(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}(0,o.K2)(G,"makeRandomHex");var X=(0,o.K2)(t=>G(t.length),"random"),V=(0,o.K2)(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"),Z=(0,o.K2)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,o]=lt(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",o),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),n},"drawSimpleText"),Q=s((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),i.Y2.lineBreakRegex.test(t))return t;const o=t.split(" ").filter(Boolean),n=[];let a="";return o.forEach((t,i)=>{const s=et(`${t} `,r),l=et(a,r);if(s>e){const{hyphenatedStrings:i,remainingWord:o}=J(t,e,"-",r);n.push(a,...i),a=o}else l+s>=e?(n.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===o.length&&n.push(a)}),n.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),J=s((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],n=[];let a="";return o.forEach((t,s)=>{const l=`${a}${t}`;if(et(l,i)>=e){const t=s+1,e=o.length===t,i=`${l}${r}`;n.push(e?l:i),a=""}else a=l}),{hyphenatedStrings:n,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function tt(t,e){return it(t,e).height}function et(t,e){return it(t,e).width}(0,o.K2)(tt,"calculateTextHeight"),(0,o.K2)(et,"calculateTextWidth");var rt,it=s((t,e)=>{const{fontSize:r=12,fontFamily:o="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,s]=lt(r),l=["sans-serif",o],h=t.split(i.Y2.lineBreakRegex),c=[],d=(0,a.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const u=d.append("svg");for(const i of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of h){const o=V();o.text=r||A;const a=Z(u,o).style("font-size",s).style("font-weight",n).style("font-family",i),l=(a._groups||a)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}c.push(e)}u.remove();return c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),ot=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,o.K2)(this,"InitIDGenerator")}},nt=(0,o.K2)(function(t){return rt=rt||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),rt.innerHTML=t,unescape(rt.textContent)},"entityDecode");function at(t){return"str"in t}(0,o.K2)(at,"isDetailedError");var st=(0,o.K2)((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),lt=(0,o.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function ht(t,e){return _({},t,e)}(0,o.K2)(ht,"cleanAndMerge");var ct={assignWithDepth:i.hH,wrapLabel:Q,calculateTextHeight:tt,calculateTextWidth:et,calculateTextDimensions:it,cleanAndMerge:ht,detectInit:M,detectDirective:E,isSubstringInArray:O,interpolateToCurve:D,calcLabelPosition:K,calcCardinalityPosition:W,calcTerminalLabelPosition:j,formatUrl:I,getStylesFromArray:H,generateId:Y,random:X,runFunc:q,entityDecode:nt,insertTitle:st,isLabelCoordinateInPath:ft,parseFontSize:lt,InitIDGenerator:ot},dt=(0,o.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"}),e},"encodeEntities"),ut=(0,o.K2)(function(t){return t.replace(/\ufb02\xb0\xb0/g,"&#").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},"decodeEntities"),pt=(0,o.K2)((t,e,{counter:r=0,prefix:i,suffix:o},n)=>n||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function gt(t){return t??null}function ft(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,o.K2)(gt,"handleUndefinedAttr"),(0,o.K2)(ft,"isLabelCoordinateInPath")},7970(t,e,r){"use strict";r.d(e,{He:()=>h,K2:()=>n,Rm:()=>l,VA:()=>a});var i=r(527),o=Object.defineProperty,n=(t,e)=>o(t,"name",{value:e,configurable:!0}),a=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:n((...t)=>{},"trace"),debug:n((...t)=>{},"debug"),info:n((...t)=>{},"info"),warn:n((...t)=>{},"warn"),error:n((...t)=>{},"error"),fatal:n((...t)=>{},"fatal")},h=n(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",c("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",c("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",c("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",c("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",c("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,c("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",c("TRACE")))},"setLogLevel"),c=n(t=>`%c${i().format("ss.SSS")} : ${t} : `,"format")},2993(t,e,r){"use strict";r.d(e,{Nq:()=>a,RI:()=>h,Wg:()=>o,hq:()=>n});var i=r(7970),o=(0,i.K2)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),n={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},a={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function s(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=l(t),e=l(e);const[r,i]=[t.x,t.y],[o,n]=[e.x,e.y],a=o-r,s=n-i;return{angle:Math.atan(s/a),deltaX:a,deltaY:s}}(0,i.K2)(s,"calculateDeltaAndAngle");var l=(0,i.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),h=(0,i.K2)(t=>({x:(0,i.K2)(function(e,r,i){let o=0;const a=l(i[0]).x<l(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(n,t.arrowTypeStart)){const{angle:e,deltaX:r}=s(i[0],i[1]);o=n[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaX:r}=s(i[i.length-1],i[i.length-2]);o=n[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const h=Math.abs(l(e).x-l(i[i.length-1]).x),c=Math.abs(l(e).y-l(i[i.length-1]).y),d=Math.abs(l(e).x-l(i[0]).x),u=Math.abs(l(e).y-l(i[0]).y),p=n[t.arrowTypeStart],g=n[t.arrowTypeEnd];if(h<g&&h>0&&c<g){let t=g+1-h;t*="right"===a?-1:1,o-=t}if(d<p&&d>0&&u<p){let t=p+1-d;t*="right"===a?-1:1,o+=t}return l(e).x+o},"x"),y:(0,i.K2)(function(e,r,i){let o=0;const a=l(i[0]).y<l(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(n,t.arrowTypeStart)){const{angle:e,deltaY:r}=s(i[0],i[1]);o=n[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaY:r}=s(i[i.length-1],i[i.length-2]);o=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const h=Math.abs(l(e).y-l(i[i.length-1]).y),c=Math.abs(l(e).x-l(i[i.length-1]).x),d=Math.abs(l(e).y-l(i[0]).y),u=Math.abs(l(e).x-l(i[0]).x),p=n[t.arrowTypeStart],g=n[t.arrowTypeEnd];if(h<g&&h>0&&c<g){let t=g+1-h;t*="up"===a?-1:1,o-=t}if(d<p&&d>0&&u<p){let t=p+1-d;t*="up"===a?-1:1,o+=t}return l(e).y+o},"y")}),"getLineFunctionsWithOffset")},3316(t,e,r){"use strict";r.d(e,{C0:()=>C,xA:()=>mt,hH:()=>B,Dl:()=>Yt,IU:()=>de,Wt:()=>ae,Y2:()=>Vt,a$:()=>Jt,KG:()=>re,sb:()=>ot,ME:()=>we,UI:()=>et,Ch:()=>b,mW:()=>x,DB:()=>y,_3:()=>nt,EJ:()=>f,m7:()=>fe,iN:()=>pe,zj:()=>ft,D7:()=>be,Gs:()=>Ae,J$:()=>T,ab:()=>me,E:()=>St,Q2:()=>pt,P$:()=>O,ID:()=>qt,TM:()=>Tt,Wi:()=>Ut,H1:()=>Bt,QO:()=>Kt,Js:()=>_e,Xd:()=>k,dj:()=>Xt,cL:()=>Ct,Df:()=>it,$i:()=>rt,jZ:()=>Mt,oB:()=>Te,wZ:()=>dt,EI:()=>ge,SV:()=>ue,Nk:()=>gt,XV:()=>ke,ke:()=>ye,UU:()=>ct,ot:()=>te,mj:()=>Se,tM:()=>ne,H$:()=>V,B6:()=>ut});var i=r(7970),o=r(7766),n=r(1763);const a=(t,e)=>{const r=o.A.parse(t),i={};for(const o in e)e[o]&&(i[o]=r[o]+e[o]);return(0,n.A)(t,i)};var s=r(941);const l=(t,e,r=50)=>{const{r:i,g:n,b:a,a:l}=o.A.parse(t),{r:h,g:c,b:d,a:u}=o.A.parse(e),p=r/100,g=2*p-1,f=l-u,y=((g*f===-1?g:(g+f)/(1+g*f))+1)/2,m=1-y,C=i*y+h*m,x=n*y+c*m,b=a*y+d*m,k=l*p+u*(1-p);return(0,s.A)(C,x,b,k)},h=(t,e=100)=>{const r=o.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,l(r,t,e)};var c,d=r(9515),u=r(8480),p=r(3212),g=r(2527),f=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,y=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,m=/\s*%%.*\n/gm,C=class extends Error{static{(0,i.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},x={},b=(0,i.K2)(function(t,e){t=t.replace(f,"").replace(y,"").replace(m,"\n");for(const[r,{detector:i}]of Object.entries(x)){if(i(t,e))return r}throw new C(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),k=(0,i.K2)((...t)=>{for(const{id:e,detector:r,loader:i}of t)w(e,r,i)},"registerLazyLoadedDiagrams"),w=(0,i.K2)((t,e,r)=>{x[t]&&i.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),x[t]={detector:e,loader:r},i.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),T=(0,i.K2)(t=>x[t].loader,"getDiagramLoader"),S=(0,i.K2)((t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>S(t,e,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(o=>{"object"!=typeof e[o]||null===e[o]||void 0!==t[o]&&"object"!=typeof t[o]?(i||"object"!=typeof t[o]&&"object"!=typeof e[o])&&(t[o]=e[o]):(void 0===t[o]&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=S(t[o],e[o],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),B=S,v="#ffffff",_="#f2f2f2",A=(0,i.K2)((t,e)=>a(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),L=class{static{(0,i.K2)(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||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(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||(0,d.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,d.A)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,d.A)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||h(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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??a(this.primaryColor,{l:-30}),this.venn2=this.venn2??a(this.secondaryColor,{l:-30}),this.venn3=this.venn3??a(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??a(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??a(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??a(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??a(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??a(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},F=(0,i.K2)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),M=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=(0,d.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,d.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(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||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,u.A)(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=(0,u.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,u.A)(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=h(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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,u.A)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,u.A)(this.secondaryColor,20),this.git1=(0,u.A)(this.pie2||this.secondaryColor,20),this.git2=(0,u.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,u.A)(this.pie4||a(this.primaryColor,{h:-30}),20),this.git4=(0,u.A)(this.pie5||a(this.primaryColor,{h:-60}),20),this.git5=(0,u.A)(this.pie6||a(this.primaryColor,{h:-90}),10),this.git6=(0,u.A)(this.pie7||a(this.primaryColor,{h:60}),10),this.git7=(0,u.A)(this.pie8||a(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||h(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||h(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||(0,u.A)("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||(0,u.A)("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||(0,u.A)("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||(0,u.A)("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||(0,u.A)(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||(0,u.A)(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,u.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,u.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,i.K2)(t=>{const e=new M;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=a(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=A(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=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,d.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,d.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,d.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||a(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||h(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||h(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||a(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-30}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||a(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||a(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??a(this.primaryColor,{l:-30}),this.venn2=this.venn2??a(this.secondaryColor,{l:-30}),this.venn3=this.venn3??a(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??a(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??a(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??a(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??a(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??a(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(h(this.git0),25),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||h(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,i.K2)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,i.K2)(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=(0,u.A)("#cde498",10),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.primaryColor),this.lineColor=h(this.background),this.textColor=h(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=(0,d.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,d.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,d.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,d.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||a(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(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||a(this.primaryColor,{l:-30}),this.pie5=this.pie5||a(this.secondaryColor,{l:-30}),this.pie6=this.pie6||a(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||a(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??a(this.primaryColor,{l:-30}),this.venn2=this.venn2??a(this.secondaryColor,{l:-30}),this.venn3=this.venn3??a(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??a(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??a(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??a(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??a(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??a(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||h(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},I=(0,i.K2)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables"),q=class{static{(0,i.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(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||(0,u.A)(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=(0,u.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,u.A)(this.contrast,30),this.sectionBkgColor2=(0,u.A)(this.contrast,30),this.taskBorderColor=(0,d.A)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,u.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,d.A)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,d.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||a(this.primaryColor,{h:-30}),this.git4=this.pie5||a(this.primaryColor,{h:-60}),this.git5=this.pie6||a(this.primaryColor,{h:-90}),this.git6=this.pie7||a(this.primaryColor,{h:60}),this.git7=this.pie8||a(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},R=(0,i.K2)(t=>{const e=new q;return e.calculate(t),e},"getThemeVariables"),z=class{static{(0,i.K2)(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=A(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||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=a(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||a(t,{h:30}),this.cScale4=this.cScale4||a(t,{h:60}),this.cScale5=this.cScale5||a(t,{h:90}),this.cScale6=this.cScale6||a(t,{h:120}),this.cScale7=this.cScale7||a(t,{h:150}),this.cScale8=this.cScale8||a(t,{h:210,l:150}),this.cScale9=this.cScale9||a(t,{h:270}),this.cScale10=this.cScale10||a(t,{h:300}),this.cScale11=this.cScale11||a(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=(0,d.A)(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=(0,d.A)(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||h(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||(0,u.A)(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||(0,d.A)(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||a(this.mainBkg,{h:180,s:-15,l:i*(5+3*o)}),this["surfacePeer"+o]=this["surfacePeer"+o]||a(this.mainBkg,{h:180,s:-15,l:i*(8+3*o)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||a(t,{h:64}),this.fillType3=this.fillType3||a(e,{h:64}),this.fillType4=this.fillType4||a(t,{h:-64}),this.fillType5=this.fillType5||a(e,{h:-64}),this.fillType6=this.fillType6||a(t,{h:128}),this.fillType7=this.fillType7||a(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||a(t,{l:-10}),this.pie5=this.pie5||a(e,{l:-10}),this.pie6=this.pie6||a(r,{l:-10}),this.pie7=this.pie7||a(t,{h:60,l:-10}),this.pie8=this.pie8||a(t,{h:-60,l:-10}),this.pie9=this.pie9||a(t,{h:120,l:0}),this.pie10=this.pie10||a(t,{h:60,l:-20}),this.pie11=this.pie11||a(t,{h:-60,l:-20}),this.pie12=this.pie12||a(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||a(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||a(t,{h:-30}),this.git4=this.git4||a(t,{h:-60}),this.git5=this.git5||a(t,{h:-90}),this.git6=this.git6||a(t,{h:60}),this.git7=this.git7||a(t,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},K=(0,i.K2)(t=>{const e=new z;return e.calculate(t),e},"getThemeVariables"),P=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor=h(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||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,d.A)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,d.A)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||h(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N=(0,i.K2)(t=>{const e=new P;return e.calculate(t),e},"getThemeVariables"),W=class{static{(0,i.K2)(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=A("#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||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=a(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let 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]=(0,d.A)(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=(0,d.A)(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||h(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||(0,u.A)(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||(0,d.A)(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||a(this.mainBkg,{h:180,s:-15,l:i*(5+3*o)}),this["surfacePeer"+o]=this["surfacePeer"+o]||a(this.mainBkg,{h:180,s:-15,l:i*(8+3*o)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||a(t,{h:64}),this.fillType3=this.fillType3||a(e,{h:64}),this.fillType4=this.fillType4||a(t,{h:-64}),this.fillType5=this.fillType5||a(e,{h:-64}),this.fillType6=this.fillType6||a(t,{h:128}),this.fillType7=this.fillType7||a(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||a(t,{l:-10}),this.pie5=this.pie5||a(e,{l:-10}),this.pie6=this.pie6||a(r,{l:-10}),this.pie7=this.pie7||a(t,{h:60,l:-10}),this.pie8=this.pie8||a(t,{h:-60,l:-10}),this.pie9=this.pie9||a(t,{h:120,l:0}),this.pie10=this.pie10||a(t,{h:60,l:-20}),this.pie11=this.pie11||a(t,{h:-60,l:-20}),this.pie12=this.pie12||a(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||a(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||a(t,{h:-30}),this.git4=this.git4||a(t,{h:-60}),this.git5=this.git5||a(t,{h:-90}),this.git6=this.git6||a(t,{h:60}),this.git7=this.git7||a(t,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},j=(0,i.K2)(t=>{const e=new W;return e.calculate(t),e},"getThemeVariables"),H=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor=h(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||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,d.A)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,d.A)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||h(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},U=(0,i.K2)(t=>{const e=new H;return e.calculate(t),e},"getThemeVariables"),Y=class{static{(0,i.K2)(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=A(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=a(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||h(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||(0,u.A)(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||(0,d.A)(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||a(this.mainBkg,{h:180,s:-15,l:i*(5+3*o)}),this["surfacePeer"+o]=this["surfacePeer"+o]||a(this.mainBkg,{h:180,s:-15,l:i*(8+3*o)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||a(t,{h:64}),this.fillType3=this.fillType3||a(e,{h:64}),this.fillType4=this.fillType4||a(t,{h:-64}),this.fillType5=this.fillType5||a(e,{h:-64}),this.fillType6=this.fillType6||a(t,{h:128}),this.fillType7=this.fillType7||a(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||a(t,{l:-10}),this.pie5=this.pie5||a(e,{l:-10}),this.pie6=this.pie6||a(r,{l:-10}),this.pie7=this.pie7||a(t,{h:60,l:-10}),this.pie8=this.pie8||a(t,{h:-60,l:-10}),this.pie9=this.pie9||a(t,{h:120,l:0}),this.pie10=this.pie10||a(t,{h:60,l:-20}),this.pie11=this.pie11||a(t,{h:-60,l:-20}),this.pie12=this.pie12||a(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||a(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||a(t,{h:-30}),this.git4=this.git4||a(t,{h:-60}),this.git5=this.git5||a(t,{h:-90}),this.git6=this.git6||a(t,{h:60}),this.git7=this.git7||a(t,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},G=(0,i.K2)(t=>{const e=new Y;return e.calculate(t),e},"getThemeVariables"),X=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor=h(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||h(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=(0,d.A)(this["cScale"+e],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,d.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,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?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||v,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},V={base:{getThemeVariables:F},dark:{getThemeVariables:E},default:{getThemeVariables:O},forest:{getThemeVariables:I},neutral:{getThemeVariables:R},neo:{getThemeVariables:K},"neo-dark":{getThemeVariables:N},redux:{getThemeVariables:j},"redux-dark":{getThemeVariables:U},"redux-color":{getThemeVariables:G},"redux-dark-color":{getThemeVariables:(0,i.K2)(t=>{const e=new X;return e.calculate(t),e},"getThemeVariables")}},Z={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Q={...Z,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:V.default.getThemeVariables(),sequence:{...Z.sequence,messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,i.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,i.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Z.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Z.c4,useWidth:void 0,personFont:(0,i.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Z.flowchart,inheritDir:!1},external_personFont:(0,i.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,i.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,i.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,i.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,i.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,i.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,i.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,i.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,i.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,i.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,i.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,i.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,i.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,i.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Z.pie,useWidth:984},xyChart:{...Z.xyChart,useWidth:void 0},requirement:{...Z.requirement,useWidth:void 0},packet:{...Z.packet},eventmodeling:{...Z.eventmodeling},treeView:{...Z.treeView,useWidth:void 0},radar:{...Z.radar},ishikawa:{...Z.ishikawa},sankey:{...Z.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:{...Z.venn}},J=(0,i.K2)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...J(t[i],"")]:[...r,e+i],[]),"keyify"),tt=new Set(J(Q,"")),et=Q,rt=(0,i.K2)(t=>{if(i.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>rt(t));else{for(const e of Object.keys(t)){if(i.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!tt.has(e)||null==t[e]){i.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){if("nodeColors"===e){const r=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const o of Object.keys(t[e]))"string"==typeof t[e][o]&&r.test(t[e][o])||(i.Rm.debug("sanitize deleting invalid color:",o,t[e][o]),delete t[e][o])}else i.Rm.debug("sanitizing object",e),rt(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const o of r)e.includes(o)&&(i.Rm.debug("sanitizing css option",e),t[e]=it(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.Rm.debug("After sanitization",t)}},"sanitizeDirective"),it=(0,i.K2)(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),ot=Object.freeze(et),nt=(0,i.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),at=B({},ot),st=[],lt=B({},ot),ht=(0,i.K2)((t,e)=>{let r=B({},t),i={};for(const o of e)yt(o),i=B(i,o);if(r=B(r,i),i.theme&&i.theme in V){const t=B({},c),e=B(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in V&&(r.themeVariables=V[r.theme].getThemeVariables(e))}return wt(lt=r),lt},"updateCurrentConfig"),ct=(0,i.K2)(t=>(at=B({},ot),at=B(at,t),t.theme&&V[t.theme]&&(at.themeVariables=V[t.theme].getThemeVariables(t.themeVariables)),ht(at,st),at),"setSiteConfig"),dt=(0,i.K2)(t=>{c=B({},t)},"saveConfigFromInitialize"),ut=(0,i.K2)(t=>(at=B(at,t),ht(at,st),at),"updateSiteConfig"),pt=(0,i.K2)(()=>B({},at),"getSiteConfig"),gt=(0,i.K2)(t=>(wt(t),B(lt,t),ft()),"setConfig"),ft=(0,i.K2)(()=>B({},lt),"getConfig"),yt=(0,i.K2)(t=>{t&&(["secure",...at.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&yt(t[e])}))},"sanitize"),mt=(0,i.K2)(t=>{rt(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),st.push(t),ht(at,st)},"addDirective"),Ct=(0,i.K2)((t=at)=>{ht(t,st=[])},"reset"),xt={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."},bt={},kt=(0,i.K2)(t=>{bt[t]||(i.Rm.warn(xt[t]),bt[t]=!0)},"issueWarning"),wt=(0,i.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&kt("LAZY_LOAD_DEPRECATED")},"checkConfig"),Tt=(0,i.K2)(()=>{let t={};c&&(t=B(t,c));for(const e of st)t=B(t,e);return t},"getUserDefinedConfig"),St=(0,i.K2)(t=>(null!=t.flowchart?.htmlLabels&&kt("FLOWCHART_HTML_LABELS_DEPRECATED"),nt(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Bt=/<br\s*\/?>/gi,vt=(0,i.K2)(t=>{if(!t)return[""];return It(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),_t=(()=>{let t=!1;return()=>{t||(At(),t=!0)}})();function At(){const t="data-temp-href-target";g.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),g.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,i.K2)(At,"setupDompurifyHooks");var Lt=(0,i.K2)(t=>{_t();return g.A.sanitize(t)},"removeScript"),Ft=(0,i.K2)((t,e)=>{if(St(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Lt(t):"loose"!==r&&(t=(t=(t=It(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Dt(t))}return t},"sanitizeMore"),Mt=(0,i.K2)((t,e)=>t?t=e.dompurifyConfig?g.A.sanitize(Ft(t,e),e.dompurifyConfig).toString():g.A.sanitize(Ft(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Et=(0,i.K2)((t,e)=>"string"==typeof t?Mt(t,e):t.flat().map(t=>Mt(t,e)),"sanitizeTextOrArray"),$t=(0,i.K2)(t=>Bt.test(t),"hasBreaks"),Ot=(0,i.K2)(t=>t.split(Bt),"splitBreaks"),Dt=(0,i.K2)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),It=(0,i.K2)(t=>t.replace(Bt,"#br#"),"breakToPlaceholder"),qt=(0,i.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Rt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),zt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Kt=(0,i.K2)(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let t=e[i];if(","===t&&i>0&&i+1<e.length){const o=e[i-1],n=e[i+1];Nt(o,n)&&(t=o+","+n,i++,r.pop())}r.push(Wt(t))}return r.join("")},"parseGenericTypes"),Pt=(0,i.K2)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Nt=(0,i.K2)((t,e)=>{const r=Pt(t,"~"),i=Pt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Wt=(0,i.K2)(t=>{const e=Pt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==o&&-1!==n&&o!==n;)i[o]="<",i[n]=">",o=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),jt=(0,i.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ht=/\$\$(.*)\$\$/g,Ut=(0,i.K2)(t=>(t.match(Ht)?.length??0)>0,"hasKatex"),Yt=(0,i.K2)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Xt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Gt=(0,i.K2)(async(t,e)=>{if(!Ut(t))return t;if(!(jt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ht,"MathML is unsupported in this environment.");{const{default:i}=await r.e(213).then(r.bind(r,213)),o=e.forceLegacyMathML||!jt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Bt).map(t=>Ut(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Ht,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Xt=(0,i.K2)(async(t,e)=>Mt(await Gt(t,e),e),"renderKatexSanitized"),Vt={getRows:vt,sanitizeText:Mt,sanitizeTextOrArray:Et,hasBreaks:$t,splitBreaks:Ot,lineBreakRegex:Bt,removeScript:Lt,getUrl:qt,evaluate:nt,getMax:Rt,getMin:zt},Zt=(0,i.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Qt=(0,i.K2)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Jt=(0,i.K2)(function(t,e,r,i){const o=Qt(e,r,i);Zt(t,o)},"configureSvgSize"),te=(0,i.K2)(function(t,e,r,o){const n=e.node().getBBox(),a=n.width,s=n.height;i.Rm.info(`SVG bounds: ${a}x${s}`,n);let l=0,h=0;i.Rm.info(`Graph bounds: ${l}x${h}`,t),l=a+2*r,h=s+2*r,i.Rm.info(`Calculated bounds: ${l}x${h}`),Jt(e,h,l,o);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),ee={};function re(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,i.K2)(re,"cssStyleSheetToString");var ie=(0,i.K2)((t,e,r,o)=>{let n="";return t in ee&&ee[t]?n=ee[t]({...r,svgId:o}):i.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),oe=(0,i.K2)((t,e)=>{void 0!==e&&(ee[t]=e)},"addStylesForDiagram"),ne=ie,ae={};(0,i.VA)(ae,{clear:()=>de,getAccDescription:()=>fe,getAccTitle:()=>pe,getDiagramTitle:()=>me,setAccDescription:()=>ge,setAccTitle:()=>ue,setDiagramTitle:()=>ye});var se="",le="",he="",ce=(0,i.K2)(t=>Mt(t,ft()),"sanitizeText"),de=(0,i.K2)(()=>{se="",he="",le=""},"clear"),ue=(0,i.K2)(t=>{se=ce(t).replace(/^\s+/g,"")},"setAccTitle"),pe=(0,i.K2)(()=>se,"getAccTitle"),ge=(0,i.K2)(t=>{he=ce(t).replace(/\n\s+/g,"\n")},"setAccDescription"),fe=(0,i.K2)(()=>he,"getAccDescription"),ye=(0,i.K2)(t=>{le=ce(t)},"setDiagramTitle"),me=(0,i.K2)(()=>le,"getDiagramTitle"),Ce=i.Rm,xe=i.He,be=ft,ke=gt,we=ot,Te=(0,i.K2)(t=>Mt(t,be()),"sanitizeText"),Se=te,Be=(0,i.K2)(()=>ae,"getCommonDb"),ve={},_e=(0,i.K2)((t,e,r)=>{ve[t]&&Ce.warn(`Diagram with id ${t} already registered. Overwriting.`),ve[t]=e,r&&w(t,r),oe(t,e.styles),e.injectUtils?.(Ce,xe,be,Te,Se,Be(),()=>{})},"registerDiagram"),Ae=(0,i.K2)(t=>{if(t in ve)return ve[t];throw new Le(t)},"getDiagram"),Le=class extends Error{static{(0,i.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},2452(t,e,r){"use strict";r.d(e,{IU:()=>b,Jo:()=>E,T_:()=>S,g0:()=>ot,jP:()=>w});var i=r(2993),o=r(3641),n=r(566),a=r(9478),s=r(2864),l=r(1546),h=r(3316),c=r(7970),d=r(7012),u=r(726),p=(0,c.K2)((t,e,r,i,o,n=!1,a)=>{e.arrowTypeStart&&y(t,"start",e.arrowTypeStart,r,i,o,n,a),e.arrowTypeEnd&&y(t,"end",e.arrowTypeEnd,r,i,o,n,a)},"addEdgeMarkers"),g={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},f=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],y=(0,c.K2)((t,e,r,i,o,n,a=!1,s)=>{const l=g[r],h=l&&f.includes(l.type);if(!l)return void c.Rm.warn(`Unknown arrow type: ${r}`);const d=`${o}_${n}-${l.type}${"start"===e?"Start":"End"}${a&&h?"-margin":""}`;if(s&&""!==s.trim()){const r=`${d}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(d);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),l.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${d})`)},"addEdgeMarker"),m=(0,c.K2)(t=>"string"==typeof t?t:(0,h.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),C=new Map,x=new Map,b=(0,c.K2)(()=>{C.clear(),x.clear()},"clear"),k=(0,c.K2)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),w=(0,c.K2)(async(t,e)=>{const r=(0,h.D7)();let n=(0,h.E)(r);const{labelStyles:l}=(0,a.GX)(e);e.labelStyle=l;const u=t.insert("g").attr("class","edgeLabel"),p=u.insert("g").attr("class","label").attr("data-id",e.id),g="markdown"===e.labelType,f=await(0,s.GZ)(t,e.label,{style:k(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:g,width:void 0},r);p.node().appendChild(f),c.Rm.info("abc82",e,e.labelType);let y,m=f.getBBox(),b=m;if(n){const t=f.children[0],e=(0,d.Ltv)(f);m=t.getBoundingClientRect(),b=m,e.attr("width",m.width),e.attr("height",m.height)}else{const t=(0,d.Ltv)(f).select("text").node();t&&"function"==typeof t.getBBox&&(b=t.getBBox())}if(p.attr("transform",(0,i.Wg)(b,n)),C.set(e.id,u),e.width=m.width,e.height=m.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(a,e.startLabelLeft,k(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(n){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",(0,i.Wg)(l,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startLeft=r,T(y,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(a,e.startLabelRight,k(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(n){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",(0,i.Wg)(l,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startRight=r,T(y,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(r,e.endLabelLeft,k(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(n){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",(0,i.Wg)(l,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endLeft=r,T(y,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(r,e.endLabelRight,k(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(n){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",(0,i.Wg)(l,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endRight=r,T(y,e.endLabelRight)}return f},"insertEdgeLabel");function T(t,e){(0,h.E)((0,h.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(T,"setTerminalWidth");var S=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,C.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,h.D7)(),{subGraphTitleTotalMargin:o}=(0,n.O)(i);if(t.label){const i=C.get(t.id);let n=t.x,a=t.y;if(r){const i=l._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",n,",",a,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,a=i.y)}i.attr("transform",`translate(${n}, ${a+o/2})`)}if(t.startLabelLeft){const e=x.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=x.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=x.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=x.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),B=(0,c.K2)((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),n=Math.abs(e.y-i),a=t.width/2,s=t.height/2;return o>=a||n>=s},"outsideNode"),v=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,n=Math.abs(i-r.x),a=t.width/2;let s=r.x<e.x?a-n:a+n;const l=t.height/2,h=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*a>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;s=d*t/h;const i={x:r.x<e.x?r.x+s:r.x-d+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===d&&(i.x=e.x),0===h&&(i.y=e.y),c.Rm.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${d}, r ${s}`,i),i}{s=r.x<e.x?e.x-a-i:i-a-e.x;let t=h*s/d,o=r.x<e.x?r.x+d-s:r.x-d+s,n=r.y<e.y?r.y+t:r.y-t;return c.Rm.debug(`sides calc abc89, Q ${h}, q ${t}, R ${d}, r ${s}`,{_x:o,_y:n}),0===s&&(o=e.x,n=e.y),0===d&&(o=e.x),0===h&&(n=e.y),{x:o,y:n}}},"intersection"),_=(0,c.K2)((t,e)=>{c.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(c.Rm.info("abc88 checking point",t,e),B(e,t)||o)c.Rm.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const n=v(e,i,t);c.Rm.debug("abc88 inside",t,i,n),c.Rm.debug("abc88 intersection",n,e);let a=!1;r.forEach(t=>{a=a||t.x===n.x&&t.y===n.y}),r.some(t=>t.x===n.x&&t.y===n.y)?c.Rm.warn("abc88 no intersect",n,r):r.push(n),o=!0}}),c.Rm.debug("returning points",r),r},"cutPathAtIntersect");function A(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],n=t[i],a=t[i+1];(o.x===n.x&&n.y===a.y&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5||o.y===n.y&&n.x===a.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K2)(A,"extractCornerPoints");var L=(0,c.K2)(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,n=r/Math.sqrt(i*i+o*o);return{x:e.x-n*i,y:e.y-n*o}},"findAdjacentPoint"),F=(0,c.K2)(function(t){const{cornerPointPositions:e}=A(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],n=t[i],a=L(e,n,5),s=L(o,n,5),l=s.x-a.x,h=s.y-a.y;r.push(a);const d=2*Math.sqrt(2);let u={x:n.x,y:n.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){c.Rm.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;u=n.x===a.x?{x:l<0?a.x-t+d:a.x+t-d,y:h<0?a.y-d:a.y+d}:{x:l<0?a.x-d:a.x+d,y:h<0?a.y-t+d:a.y+t-d}}else c.Rm.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(u,s)}else r.push(t[i]);return r},"fixCorners"),M=(0,c.K2)((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4);return`0 ${e} ${Array(o).fill("2 2").join(" ")} ${r}`},"generateDashArray"),E=(0,c.K2)(function(t,e,r,o,n,s,g,f=!1){if(!g)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:y}=(0,h.D7)();let C=e.points,x=!1;const b=n;var k=s;const w=[];for(const i in e.cssCompiledStyles)(0,a.KX)(i)||w.push(e.cssCompiledStyles[i]);c.Rm.debug("UIO intersect check",e.points,k.x,b.x),k.intersect&&b.intersect&&!f&&(C=C.slice(1,e.points.length-1),C.unshift(b.intersect(C[0])),c.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,C[C.length-1],k,k.intersect(C[C.length-1])),C.push(k.intersect(C[C.length-1])));const T=btoa(JSON.stringify(C));e.toCluster&&(c.Rm.info("to cluster abc88",r.get(e.toCluster)),C=_(e.points,r.get(e.toCluster).node),x=!0),e.fromCluster&&(c.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(C,null,2)),C=_(C.reverse(),r.get(e.fromCluster).node).reverse(),x=!0);let S=C.filter(t=>!Number.isNaN(t.y));const B=m(e.curve);"rounded"!==B&&(S=F(S));let v=d.lUB;switch(B){case"linear":case"rounded":v=d.lUB;break;case"basis":default:v=d.qrM;break;case"cardinal":v=d.y8u;break;case"bumpX":v=d.Wi0;break;case"bumpY":v=d.PGM;break;case"catmullRom":v=d.oDi;break;case"monotoneX":v=d.nVG;break;case"monotoneY":v=d.uxU;break;case"natural":v=d.Xf2;break;case"step":v=d.GZz;break;case"stepAfter":v=d.UPb;break;case"stepBefore":v=d.dyv}const{x:A,y:L}=(0,i.RI)(e),E=(0,d.n8j)().x(A).y(L).curve(v);let O,I;switch(e.thickness){case"normal":default:O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible"}switch(e.pattern){case"solid":default:O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed"}let q="rounded"===B?$(D(S,e),5):E(S);const R=Array.isArray(e.style)?e.style:[e.style];let z=R.find(t=>t?.startsWith("stroke:")),K="";e.animate&&(K="edge-animation-fast"),e.animation&&(K="edge-animation-"+e.animation);let P=!1;if("handDrawn"===e.look){const r=u.A.svg(t);Object.assign([],S);const i=r.path(q,{roughness:.3,seed:y});O+=" transition",I=(0,d.Ltv)(i).select("path").attr("id",`${g}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+(K?" "+K:"")).attr("style",R?R.reduce((t,e)=>t+";"+e,""):"");let o=I.attr("d");I.attr("d",o),t.node().appendChild(I.node())}else{const r=w.join(";"),o=R?R.reduce((t,e)=>t+e+";",""):"",n=(r?r+";"+o+";":o)+";"+(R?R.reduce((t,e)=>t+";"+e,""):"");I=t.append("path").attr("d",q).attr("id",`${g}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+(K?" "+K:"")).attr("style",n),z=n.match(/stroke:([^;]+)/)?.[1],P=!0===e.animate||!!e.animation||r.includes("animation");const a=I.node(),s="function"==typeof a.getTotalLength?a.getTotalLength():0,l=i.Nq[e.arrowTypeStart]||0,h=i.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!P){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?M(s,l,h):`0 ${l} ${s-l-h} ${h}`}; stroke-dashoffset: 0;`;I.attr("style",t+I.attr("style"))}}I.attr("data-edge",!0),I.attr("data-et","edge"),I.attr("data-id",e.id),I.attr("data-points",T),I.attr("data-look",(0,l.KL)(e.look)),e.showPoints&&S.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let N="";((0,h.D7)().flowchart.arrowMarkerAbsolute||(0,h.D7)().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),c.Rm.info("arrowTypeStart",e.arrowTypeStart),c.Rm.info("arrowTypeEnd",e.arrowTypeEnd);p(I,e,N,g,o,!P&&"neo"===e?.look,z);const W=C[Math.floor(C.length/2)];l._K.isLabelCoordinateInPath(W,I.attr("d"))||(x=!0);let j={};return x&&(j.updatedPath=C),j.originalPath=e.points,j},"insertEdge");function $(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let n=0;n<i;n++){const a=t[n],s=t[n-1],l=t[n+1];if(0===n)r+=`M${a.x},${a.y}`;else if(n===i-1)r+=`L${a.x},${a.y}`;else{const t=a.x-s.x,i=a.y-s.y,n=l.x-a.x,h=l.y-a.y,c=Math.hypot(t,i),d=Math.hypot(n,h);if(c<o||d<o){r+=`L${a.x},${a.y}`;continue}const u=t/c,p=i/c,g=n/d,f=h/d,y=u*g+p*f,m=Math.max(-1,Math.min(1,y)),C=Math.acos(m);if(C<o||Math.abs(Math.PI-C)<o){r+=`L${a.x},${a.y}`;continue}const x=Math.min(e/Math.sin(C/2),c/2,d/2),b=a.x-u*x,k=a.y-p*x,w=a.x+g*x,T=a.y+f*x;r+=`L${b},${k}`,r+=`Q${a.x},${a.y} ${w},${T}`}}return r}function O(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function D(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&i.hq[e.arrowTypeStart]){const o=i.hq[e.arrowTypeStart],n=t[0],a=t[1],{angle:s}=O(n,a),l=o*Math.cos(s),h=o*Math.sin(s);r[0].x=n.x+l,r[0].y=n.y+h}const o=t.length;if(o>=2&&i.hq[e.arrowTypeEnd]){const n=i.hq[e.arrowTypeEnd],a=t[o-1],s=t[o-2],{angle:l}=O(s,a),h=n*Math.cos(l),c=n*Math.sin(l);r[o-1].x=a.x-h,r[o-1].y=a.y-c}return r}(0,c.K2)($,"generateRoundedPath"),(0,c.K2)(O,"calculateDeltaAndAngle"),(0,c.K2)(D,"applyMarkerOffsetsToPoints");var I=(0,c.K2)((t,e,r,i)=>{e.forEach(e=>{it[e](t,r,i)})},"insertMarkers"),q=(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),R=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),z=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),K=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),P=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),N=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),W=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),j=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),H=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),U=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{transitionColor:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${n}`)},"barbNeo"),Y=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),G=(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),X=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),V=(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Z=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${n}`)},"only_one_neo"),Q=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),J=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${n}`)},"one_or_more_neo"),tt=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),et=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),rt=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),it={extension:q,composition:R,aggregation:z,dependency:K,lollipop:P,point:N,circle:W,cross:j,barb:H,barbNeo:U,only_one:Y,zero_or_one:G,one_or_more:X,zero_or_more:V,only_one_neo:Z,zero_or_one_neo:Q,one_or_more_neo:J,zero_or_more_neo:tt,requirement_arrow:et,requirement_contains:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:rt,requirement_contains_neo:(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo")},ot=I},566(t,e,r){"use strict";r.d(e,{O:()=>a,X:()=>s});var i=r(1546),o=r(3316),n=r(7970),a=(0,n.K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function s(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const a=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",a){const e=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=o.UI.fontSize]=(0,i.I5)(e),a=n*r+"px";t.style.minWidth=a,t.style.maxWidth=a}else t.style.width="100%";e(t)}(0,n.K2)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}(0,n.K2)(s,"configureLabelImages")},7019(t,e,r){"use strict";r.d(e,{XX:()=>d,q7:()=>u,sO:()=>c});var i=r(2452),o=r(3641),n=r(1546),a=r(3316),s=r(7970),l={common:a.Y2,getConfig:a.zj,insertCluster:o.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:o.on,interpolateToCurve:n.Ib,labelHelper:o.Zk,log:s.Rm,positionEdgeLabel:i.T_},h={},c=(0,s.K2)(t=>{for(const e of t)h[e.name]=e},"registerLayoutLoaders");(0,s.K2)(()=>{c([{name:"dagre",loader:(0,s.K2)(async()=>await Promise.all([r.e(4780),r.e(8585),r.e(5968)]).then(r.bind(r,5968)),"loader")},{name:"cose-bilkent",loader:(0,s.K2)(async()=>await Promise.all([r.e(6611),r.e(97)]).then(r.bind(r,97)),"loader")}])},"registerDefaultLayoutLoaders")();var d=(0,s.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in h))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const l of t.nodes){const e=l.domId||l.id;l.domId=`${t.diagramId}-${e}`}const r=h[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:n}=t.config,{useGradient:a,gradientStart:s,gradientStop:c}=n,d=e.attr("id");if(e.append("defs").append("filter").attr("id",`${d}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${d}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),a){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",s).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return i.render(t,e,l,{algorithm:r.algorithm})},"render"),u=(0,s.K2)((t="",{fallback:e="dagre"}={})=>{if(t in h)return t;if(e in h)return s.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},9478(t,e,r){"use strict";r.d(e,{Fr:()=>c,GX:()=>h,KX:()=>l,WW:()=>a,ue:()=>n});var i=r(3316),o=r(7970),n=(0,o.K2)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),a=(0,o.K2)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,o.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),l=(0,o.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),h=(0,o.K2)(t=>{const{stylesArray:e}=a(t),r=[],i=[],o=[],n=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),c=(0,o.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:l}=a(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||n,seed:o,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:d(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),d=(0,o.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},2864(t,e,r){"use strict";r.d(e,{W6:()=>ne,GZ:()=>ce,WY:()=>jt,pC:()=>Pt,Gc:()=>Rt});var i=r(1546),o=r(3316),n=r(7970);const a=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...s,...l}),c=Object.freeze({...h,body:"",hidden:!1});function d(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function u(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let n={};function a(t){n=d(i[t]||o[t],n)}return a(e),r.forEach(a),d(t,n)}function p(t,e){if(t.icons[e])return u(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(o[e]=[r].concat(n))}return o[e]}),o}(t,[e])[e];return r?u(t,e,r):null}const g=Object.freeze({width:null,height:null}),f=Object.freeze({...g,...l}),y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(y);if(null===i||!i.length)return t;const o=[];let n=i.shift(),a=m.test(n);for(;;){if(a){const t=parseFloat(n);isNaN(t)?o.push(n):o.push(Math.ceil(t*e*r)/r)}else o.push(n);if(n=i.shift(),void 0===n)return o.join("");a=!a}}const x=/\sid="(\S+)"/g,b=new Map;function k(t){const e=[];let r;for(;r=x.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var w=r(7012);function T(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var S={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function B(t){S=t}var v={exec:()=>null};function _(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(L.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var A=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),L={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},F=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,M=/(?:[*+-]|\d{1,9}[.)])/,E=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$=_(E).replace(/bull/g,M).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(),O=_(E).replace(/bull/g,M).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(),D=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,I=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,q=_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",I).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),R=_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,M).getRegex(),z="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",K=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P=_("^ {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",K).replace("tag",z).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N=_(D).replace("hr",F).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",z).getRegex(),W={blockquote:_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",N).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:q,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:F,html:P,lheading:$,list:R,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:N,table:v,text:/^[^\n]+/},j=_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",F).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",z).getRegex(),H={...W,lheading:O,table:j,paragraph:_(D).replace("hr",F).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",j).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",z).getRegex()},U={...W,html:_("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",K).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:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_(D).replace("hr",F).replace("heading"," *#{1,6} *[^\n]").replace("lheading",$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Y=/^( {2,}|\\)\n(?!\s*$)/,G=/[\p{P}\p{S}]/u,X=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,Z=_(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X).getRegex(),Q=/(?!~)[\p{P}\p{S}]/u,J=_(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",A?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,et=_(tt,"u").replace(/punct/g,G).getRegex(),rt=_(tt,"u").replace(/punct/g,Q).getRegex(),it="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ot=_(it,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,X).replace(/punct/g,G).getRegex(),nt=_(it,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Q).getRegex(),at=_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,X).replace(/punct/g,G).getRegex(),st=_(/\\(punct)/,"gu").replace(/punct/g,G).getRegex(),lt=_(/^<(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(),ht=_(K).replace("(?:--\x3e|$)","--\x3e").getRegex(),ct=_("^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",ht).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ut=_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",dt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pt=_(/^!?\[(label)\]\[(ref)\]/).replace("label",dt).replace("ref",I).getRegex(),gt=_(/^!?\[(ref)\](?:\[\])?/).replace("ref",I).getRegex(),ft=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yt={_backpedal:v,anyPunctuation:st,autolink:lt,blockSkip:J,br:Y,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:v,emStrongLDelim:et,emStrongRDelimAst:ot,emStrongRDelimUnd:at,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ut,nolink:gt,punctuation:Z,reflink:pt,reflinkSearch:_("reflink|nolink(?!\\()","g").replace("reflink",pt).replace("nolink",gt).getRegex(),tag:ct,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:v},mt={...yt,link:_(/^!?\[(label)\]\((.*?)\)/).replace("label",dt).getRegex(),reflink:_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dt).getRegex()},Ct={...yt,emStrongRDelimAst:nt,emStrongLDelim:rt,url:_(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ft).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:_(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ft).getRegex()},xt={...Ct,br:_(Y).replace("{2,}","*").getRegex(),text:_(Ct.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bt={normal:W,gfm:H,pedantic:U},kt={normal:yt,gfm:Ct,breaks:xt,pedantic:mt},wt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Tt=t=>wt[t];function St(t,e){if(e){if(L.escapeTest.test(t))return t.replace(L.escapeReplace,Tt)}else if(L.escapeTestNoEncode.test(t))return t.replace(L.escapeReplaceNoEncode,Tt);return t}function Bt(t){try{t=encodeURI(t).replace(L.percentDecode,"%")}catch{return null}return t}function vt(t,e){let r=t.replace(L.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}).split(L.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(L.slashPipe,"|");return r}function _t(t,e,r){let i=t.length;if(0===i)return"";let o=0;for(;o<i;){let n=t.charAt(i-o-1);if(n!==e||r){if(n===e||!r)break;o++}else o++}return t.slice(0,i-o)}function At(t,e,r,i,o){let n=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:n,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}var Lt=class{options;rules;lexer;constructor(t){this.options=t||S}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:_t(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=_t(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:_t(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=_t(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,n=!1,a=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))a.push(t[e]),n=!0;else{if(n)break;a.push(t[e])}t=t.slice(e);let s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=h,0===t.length)break;let c=o.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,n=e.raw+"\n"+t.join("\n"),a=this.blockquote(n);o[o.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,i=i.substring(0,i.length-e.text.length)+a.text;break}if("list"===c?.type){let e=c,n=e.raw+"\n"+t.join("\n"),a=this.list(n);o[o.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,i=i.substring(0,i.length-e.raw.length)+a.raw,t=n.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let n=this.rules.other.listItemRegex(r),a=!1;for(;t;){let r=!1,i="",s="";if(!(e=n.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),n=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||n.test(h)||a.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())s+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||n.test(l)||r.test(l))break;s+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(a=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),o.raw+=i}let s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){let e=o.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=vt(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?n.align.push("right"):this.rules.other.tableAlignCenter.test(t)?n.align.push("center"):this.rules.other.tableAlignLeft.test(t)?n.align.push("left"):n.align.push(null);for(let t=0;t<r.length;t++)n.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:n.align[t]});for(let t of o)n.rows.push(vt(t,n.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=_t(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),At(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return At(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,n=[...i[0]].length-1,a=n,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){a+=o;continue}if((i[5]||i[6])&&n%3&&!((n+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);let e=[...i[0]][0].length,l=t.slice(0,n+i.index+e+o);if(Math.min(n,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Ft=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||S,this.options.tokenizer=this.options.tokenizer||new Lt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:L,block:bt.normal,inline:kt.normal};this.options.pedantic?(e.block=bt.pedantic,e.inline=kt.pedantic):this.options.gfm&&(e.block=bt.gfm,this.options.breaks?e.inline=kt.breaks:e.inline=kt.gfm),this.tokenizer.rules=e}static get rules(){return{block:bt,inline:kt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(L.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(L.tabCharGlobal," ").replace(L.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let n=e.at(-1);r&&"paragraph"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,a="";for(;t;){let r;if(n||(a=""),n=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,a)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),n=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Mt=class{options;parser;constructor(t){this.options=t||S}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(L.notSpaceStart)?.[0],o=t.replace(L.endingNewline,"")+"\n";return i?'<pre><code class="language-'+St(i)+'">'+(r?o:St(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:St(o,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let n=0;n<t.items.length;n++){let e=t.items[n];i+=this.listitem(e)}let o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+St(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let o=0;o<t.header.length;o++)r+=this.tablecell(t.header[o]);e+=this.tablerow({text:r});let i="";for(let o=0;o<t.rows.length;o++){let e=t.rows[o];r="";for(let t=0;t<e.length;t++)r+=this.tablecell(e[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${St(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=Bt(t);if(null===o)return i;let n='<a href="'+(t=o)+'"';return e&&(n+=' title="'+St(e)+'"'),n+=">"+i+"</a>",n}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=Bt(t);if(null===o)return St(r);let n=`<img src="${t=o}" alt="${r}"`;return e&&(n+=` title="${St(e)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:St(t.text)}},Et=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},$t=class t{options;renderer;textRenderer;constructor(t){this.options=t||S,this.options.renderer=this.options.renderer||new Mt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Et}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let n=o;switch(n.type){case"space":r+=this.renderer.space(n);continue;case"hr":r+=this.renderer.hr(n);continue;case"heading":r+=this.renderer.heading(n);continue;case"code":r+=this.renderer.code(n);continue;case"table":r+=this.renderer.table(n);continue;case"blockquote":r+=this.renderer.blockquote(n);continue;case"list":r+=this.renderer.list(n);continue;case"html":r+=this.renderer.html(n);continue;case"def":r+=this.renderer.def(n);continue;case"paragraph":r+=this.renderer.paragraph(n);continue;case"text":{let o=n,a=this.renderer.text(o);for(;i+1<t.length&&"text"===t[i+1].type;)o=t[++i],a+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{let t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}let n=o;switch(n.type){case"escape":case"text":r+=e.text(n);break;case"html":r+=e.html(n);break;case"link":r+=e.link(n);break;case"image":r+=e.image(n);break;case"strong":r+=e.strong(n);break;case"em":r+=e.em(n);break;case"codespan":r+=e.codespan(n);break;case"br":r+=e.br(n);break;case"del":r+=e.del(n);break;default:{let t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},Ot=class{options;block;constructor(t){this.options=t||S}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ft.lex:Ft.lexInline}provideParser(){return this.block?$t.parse:$t.parseInline}},Dt=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=$t;Renderer=Mt;TextRenderer=Et;Lexer=Ft;Tokenizer=Lt;Hooks=Ot;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Mt(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Lt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ot;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],n=e[i];Ot.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&Ot.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return n.call(e,r)})();let i=o.call(e,t);return n.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await n.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Ft.lex(t,e??this.defaults)}parser(t,e){return $t.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},n=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return n(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?Ft.lex:Ft.lexInline)(r,o),n=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(n,o.walkTokens));let a=await(o.hooks?await o.hooks.provideParser():t?$t.parse:$t.parseInline)(n,o);return o.hooks?await o.hooks.postprocess(a):a})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?Ft.lex:Ft.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?$t.parse:$t.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(a){return n(a)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+St(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function It(t,e){return Dt.parse(t,e)}It.options=It.setOptions=function(t){return Dt.setOptions(t),It.defaults=Dt.defaults,B(It.defaults),It},It.getDefaults=T,It.defaults=S,It.use=function(...t){return Dt.use(...t),It.defaults=Dt.defaults,B(It.defaults),It},It.walkTokens=function(t,e){return Dt.walkTokens(t,e)},It.parseInline=Dt.parseInline,It.Parser=$t,It.parser=$t.parse,It.Renderer=Mt,It.TextRenderer=Et,It.Lexer=Ft,It.lexer=Ft.lex,It.Tokenizer=Lt,It.Hooks=Ot,It.parse=It;It.options,It.setOptions,It.use,It.walkTokens,It.parseInline,$t.parse,Ft.lex;var qt=r(6793),Rt={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},zt=new Map,Kt=new Map,Pt=(0,n.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(n.Rm.debug("Registering icon pack:",e.name),"loader"in e)Kt.set(e.name,e.loader);else{if(!("icons"in e))throw n.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');zt.set(e.name,e.icons)}}},"registerIconPacks"),Nt=(0,n.K2)(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),r=o.pop(),n={provider:o.length>0?o[0]:i,prefix:r,name:t};return e&&!a(n)?null:n}const n=o[0],s=n.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!a(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:n};return e&&!a(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=zt.get(i);if(!o){const t=Kt.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},zt.set(i,o)}catch(l){throw n.Rm.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=p(o,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),Wt=(0,n.K2)(async t=>{try{return await Nt(t),!0}catch{return!1}},"isIconAvailable"),jt=(0,n.K2)(async(t,e,r)=>{let i;try{i=await Nt(t,e?.fallbackPrefix)}catch(l){n.Rm.error(l),i=Rt}const a=function(t,e){const r={...h,...t},i={...f,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let a,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=o.height/2+o.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:a=o.width/2+o.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height&&(a=o.width,o.width=o.height,o.height=a)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===o||-1===n)break;const a=t.indexOf(">",n);if(-1===a)break;r+=t.slice(o+1,n).trim(),t=t.slice(0,i).trim()+t.slice(a+1)}return{defs:r,content:t}}(t);return o=i.defs,n=e+i.content+r,o?"<defs>"+o+"</defs>"+n:n;var o,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))});const a=i.width,s=i.height,l=o.width,c=o.height;let d,u;null===a?(u=null===s?"1em":"auto"===s?c:s,d=C(u,l/c)):(d="auto"===a?l:a,u=null===s?C(d,c/l):"auto"===s?c:s);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const y=[o.left,o.top,l,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:n}}(i,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(k(a.body),{...a.attributes,...r});return(0,o.jZ)(s,(0,o.zj)())},"getIconSVG");function Ht(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,qt.T)(r)}function Ut(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function Yt(t,e={}){const r=Ht(t,e),i=It.lexer(r),o=[[]];let a=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&o[a].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return(0,n.K2)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?o[a].push({content:t.text,type:"normal"}):o[a].push({content:t.raw,type:"normal"})}),o}function Gt(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Xt(t,{markdownAutoWrap:e}={}){const r=It.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(n.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,n.K2)(i,"output"),r.map(i).join("")}function Vt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Zt(t,e){return Qt(t,[],Vt(e.content),e.type)}function Qt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...n]=r,a=[...e,o];return t([{content:a.join(""),type:i}])?Qt(t,a,n,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Jt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return te(t,e)}function te(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},a=[...i];if(""!==o&&a.push({content:o,type:"normal"}),a.push(n),e(a))return te(t,e,r,a);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,o]=Zt(e,n);r.push([i]),o.content&&t.unshift(o)}return te(t,e,r)}function ee(t,e){e&&t.attr("style",e)}(0,n.K2)(Ht,"preprocessMarkdown"),(0,n.K2)(Ut,"nonMarkdownToLines"),(0,n.K2)(Yt,"markdownToLines"),(0,n.K2)(Gt,"nonMarkdownToHTML"),(0,n.K2)(Xt,"markdownToHTML"),(0,n.K2)(Vt,"splitTextToChars"),(0,n.K2)(Zt,"splitWordToFitWidth"),(0,n.K2)(Qt,"splitWordToFitWidthRecursion"),(0,n.K2)(Jt,"splitLineToFitWidth"),(0,n.K2)(te,"splitLineToFitWidthRecursion"),(0,n.K2)(ee,"applyStyle");async function re(t,e,r,i,n=!1,a=(0,o.zj)()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const l=s.append("xhtml:div"),h=(0,o.Wi)(e.label)?await(0,o.dj)(e.label.replace(o.Y2.lineBreakRegex,"\n"),a):(0,o.jZ)(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(h),ee(d,e.labelStyle),d.attr("class",`${c} ${i}`),ee(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&l.attr("class","labelBkg");let u=l.node().getBoundingClientRect();return u.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),u=l.node().getBoundingClientRect()),s.node()}function ie(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function oe(t,e,r){const i=t.append("text"),o=ie(i,1,e);le(o,r);const n=o.node().getComputedTextLength();return i.remove(),n}function ne(t,e,r){const i=t.append("text"),o=ie(i,1,e);le(o,[{content:r,type:"normal"}]);const n=o.node()?.getBoundingClientRect();return n&&i.remove(),n}function ae(t,e,r,i=!1,o=!1){const a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(const c of r){const e=(0,n.K2)(e=>oe(a,1.1,e)<=t,"checkWidth"),r=e(c)?[c]:Jt(c,e);for(const t of r){le(ie(l,h,1.1,o),t),h++}}if(i){const t=l.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return l.node()}function se(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function le(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(se(e.content)):i.text(" "+se(e.content))})}async function he(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,n)=>(r.push((async()=>{const r=`${i}:${n}`;return await Wt(r)?await jt(r,void 0,{class:"label-icon"}):`<i class='${(0,o.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}(0,n.K2)(re,"addHtmlSpan"),(0,n.K2)(ie,"createTspan"),(0,n.K2)(oe,"computeWidthOfText"),(0,n.K2)(ne,"computeDimensionOfText"),(0,n.K2)(ae,"createFormattedText"),(0,n.K2)(se,"decodeHTMLEntities"),(0,n.K2)(le,"updateTextContentAndStyles"),(0,n.K2)(he,"replaceIconSubstring");var ce=(0,n.K2)(async(t,e="",{style:r="",isTitle:a=!1,classes:s="",useHtmlLabels:l=!0,markdown:h=!0,isNode:c=!0,width:d=200,addSvgBackground:u=!1}={},p)=>{if(n.Rm.debug("XYZ createText",e,r,a,s,l,c,"addSvgBackground: ",u),l){const n=h?Xt(e,p):Gt(e),a=await he((0,i.Sm)(n),p),l=e.replace(/\\\\/g,"\\"),g={isNode:c,label:(0,o.Wi)(e)?l:a,labelStyle:r.replace("fill:","color:")};return await re(t,g,d,s,u,p)}{const o=(0,i.Sm)(e.replace(/<br\s*\/?>/g,"<br/>")),n=ae(d,t,h?Yt(o.replace("<br>","<br/>"),p):Ut(o),!!e&&u,!c);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,w.Ltv)(n).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,w.Ltv)(n).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,w.Ltv)(n).select("text").attr("style",e)}return a?(0,w.Ltv)(n).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,w.Ltv)(n).selectAll("tspan.text-outer-tspan").classed("row",!0),n}},"createText")},5717(t,e,r){"use strict";r.d(e,{D:()=>a});var i=r(3316),o=r(7970),n=r(7012),a=(0,o.K2)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,n.Ltv)("body");if("sandbox"===e){const e=(0,n.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},9164(t,e,r){"use strict";r.d(e,{H:()=>ir,r:()=>rr});var i=r(7970);function o(t){return null==t}function n(t){return"object"==typeof t&&null!==t}function a(t){return Array.isArray(t)?t:o(t)?[]:[t]}function s(t,e){var r,i,o,n;if(e)for(r=0,i=(n=Object.keys(e)).length;r<i;r+=1)t[o=n[r]]=e[o];return t}function l(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function h(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,i.K2)(o,"isNothing"),(0,i.K2)(n,"isObject"),(0,i.K2)(a,"toArray"),(0,i.K2)(s,"extend"),(0,i.K2)(l,"repeat"),(0,i.K2)(h,"isNegativeZero");var c={isNothing:o,isObject:n,toArray:a,repeat:l,isNegativeZero:h,extend:s};function d(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function u(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=d(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,i.K2)(d,"formatError"),(0,i.K2)(u,"YAMLException$1"),u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,u.prototype.toString=(0,i.K2)(function(t){return this.name+": "+d(this,t)},"toString");var p=u;function g(t,e,r,i,o){var n="",a="",s=Math.floor(o/2)-1;return i-e>s&&(e=i-s+(n=" ... ").length),r-i>s&&(r=i+s-(a=" ...").length),{str:n+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:i-e+n.length}}function f(t,e){return c.repeat(" ",e-t.length)+t}function y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,o=[0],n=[],a=-1;r=i.exec(t.buffer);)n.push(r.index),o.push(r.index+r[0].length),t.position<=r.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s,l,h="",d=Math.min(t.line+e.linesAfter,n.length).toString().length,u=e.maxLength-(e.indent+d+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=g(t.buffer,o[a-s],n[a-s],t.position-(o[a]-o[a-s]),u),h=c.repeat(" ",e.indent)+f((t.line-s+1).toString(),d)+" | "+l.str+"\n"+h;for(l=g(t.buffer,o[a],n[a],t.position,u),h+=c.repeat(" ",e.indent)+f((t.line+1).toString(),d)+" | "+l.str+"\n",h+=c.repeat("-",e.indent+d+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=n.length);s++)l=g(t.buffer,o[a+s],n[a+s],t.position-(o[a]-o[a+s]),u),h+=c.repeat(" ",e.indent)+f((t.line+s+1).toString(),d)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,i.K2)(g,"getLine"),(0,i.K2)(f,"padStart"),(0,i.K2)(y,"makeSnippet");var m=y,C=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"];function b(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function k(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===C.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=b(e.styleAliases||null),-1===x.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,i.K2)(b,"compileStyleAliases"),(0,i.K2)(k,"Type$1");var w=k;function T(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function S(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,i.K2)(o,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(o);return r}function B(t){return this.extend(t)}(0,i.K2)(T,"compileList"),(0,i.K2)(S,"compileMap"),(0,i.K2)(B,"Schema$1"),B.prototype.extend=(0,i.K2)(function(t){var e=[],r=[];if(t instanceof w)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(B.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=T(i,"implicit"),i.compiledExplicit=T(i,"explicit"),i.compiledTypeMap=S(i.compiledImplicit,i.compiledExplicit),i},"extend");var v=new B({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,i.K2)(function(t){return null!==t?t:""},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,i.K2)(function(t){return null!==t?t:[]},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,i.K2)(function(t){return null!==t?t:{}},"construct")})]});function _(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function A(){return null}function L(t){return null===t}(0,i.K2)(_,"resolveYamlNull"),(0,i.K2)(A,"constructYamlNull"),(0,i.K2)(L,"isNull");var F=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:_,construct:A,predicate:L,represent:{canonical:(0,i.K2)(function(){return"~"},"canonical"),lowercase:(0,i.K2)(function(){return"null"},"lowercase"),uppercase:(0,i.K2)(function(){return"NULL"},"uppercase"),camelcase:(0,i.K2)(function(){return"Null"},"camelcase"),empty:(0,i.K2)(function(){return""},"empty")},defaultStyle:"lowercase"});function M(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function E(t){return"true"===t||"True"===t||"TRUE"===t}function $(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,i.K2)(M,"resolveYamlBoolean"),(0,i.K2)(E,"constructYamlBoolean"),(0,i.K2)($,"isBoolean");var O=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:M,construct:E,predicate:$,represent:{lowercase:(0,i.K2)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,i.K2)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,i.K2)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function D(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function I(t){return 48<=t&&t<=55}function q(t){return 48<=t&&t<=57}function R(t){if(null===t)return!1;var e,r=t.length,i=0,o=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;o=!0}return o&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!D(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!I(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!q(t.charCodeAt(i)))return!1;o=!0}return!(!o||"_"===e)}function z(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function K(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!c.isNegativeZero(t)}(0,i.K2)(D,"isHexCode"),(0,i.K2)(I,"isOctCode"),(0,i.K2)(q,"isDecCode"),(0,i.K2)(R,"resolveYamlInteger"),(0,i.K2)(z,"constructYamlInteger"),(0,i.K2)(K,"isInteger");var P=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:R,construct:z,predicate:K,represent:{binary:(0,i.K2)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),N=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function W(t){return null!==t&&!(!N.test(t)||"_"===t[t.length-1])}function j(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K2)(W,"resolveYamlFloat"),(0,i.K2)(j,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function U(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(c.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||c.isNegativeZero(t))}(0,i.K2)(U,"representYamlFloat"),(0,i.K2)(Y,"isFloat");var G=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:W,construct:j,predicate:Y,represent:U,defaultStyle:"lowercase"}),X=v.extend({implicit:[F,O,P,G]}),V=X,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=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 J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,i,o,n,a,s,l,h=0,c=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(n=+e[4],a=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,o,n,a,s,h)),c&&l.setTime(l.getTime()-c),l}function et(t){return t.toISOString()}(0,i.K2)(J,"resolveYamlTimestamp"),(0,i.K2)(tt,"constructYamlTimestamp"),(0,i.K2)(et,"representYamlTimestamp");var rt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function it(t){return"<<"===t||null===t}(0,i.K2)(it,"resolveYamlMerge");var ot=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:it}),nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function at(t){if(null===t)return!1;var e,r,i=0,o=t.length,n=nt;for(r=0;r<o;r++)if(!((e=n.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function st(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,n=nt,a=0,s=[];for(e=0;e<o;e++)e%4==0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|n.indexOf(i.charAt(e));return 0===(r=o%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function lt(t){var e,r,i="",o=0,n=t.length,a=nt;for(e=0;e<n;e++)e%3==0&&e&&(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]),o=(o<<8)+t[e];return 0===(r=n%3)?(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]):2===r?(i+=a[o>>10&63],i+=a[o>>4&63],i+=a[o<<2&63],i+=a[64]):1===r&&(i+=a[o>>2&63],i+=a[o<<4&63],i+=a[64],i+=a[64]),i}function ht(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,i.K2)(at,"resolveYamlBinary"),(0,i.K2)(st,"constructYamlBinary"),(0,i.K2)(lt,"representYamlBinary"),(0,i.K2)(ht,"isBinary");var ct=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:at,construct:st,predicate:ht,represent:lt}),dt=Object.prototype.hasOwnProperty,ut=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,i,o,n,a=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],n=!1,"[object Object]"!==ut.call(i))return!1;for(o in i)if(dt.call(i,o)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0}function gt(t){return null!==t?t:[]}(0,i.K2)(pt,"resolveYamlOmap"),(0,i.K2)(gt,"constructYamlOmap");var ft=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pt,construct:gt}),yt=Object.prototype.toString;function mt(t){if(null===t)return!0;var e,r,i,o,n,a=t;for(n=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],"[object Object]"!==yt.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;n[e]=[o[0],i[o[0]]]}return!0}function Ct(t){if(null===t)return[];var e,r,i,o,n,a=t;for(n=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],o=Object.keys(i),n[e]=[o[0],i[o[0]]];return n}(0,i.K2)(mt,"resolveYamlPairs"),(0,i.K2)(Ct,"constructYamlPairs");var xt=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:mt,construct:Ct}),bt=Object.prototype.hasOwnProperty;function kt(t){if(null===t)return!0;var e,r=t;for(e in r)if(bt.call(r,e)&&null!==r[e])return!1;return!0}function wt(t){return null!==t?t:{}}(0,i.K2)(kt,"resolveYamlSet"),(0,i.K2)(wt,"constructYamlSet");var Tt=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:kt,construct:wt}),St=V.extend({implicit:[rt,ot],explicit:[ct,ft,xt,Tt]}),Bt=Object.prototype.hasOwnProperty,vt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_t=/[\x85\u2028\u2029]/,At=/[,\[\]\{\}]/,Lt=/^(?:!|!!|![a-z\-]+!)$/i,Ft=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Mt(t){return Object.prototype.toString.call(t)}function Et(t){return 10===t||13===t}function $t(t){return 9===t||32===t}function Ot(t){return 9===t||32===t||10===t||13===t}function Dt(t){return 44===t||91===t||93===t||123===t||125===t}function It(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function qt(t){return 120===t?2:117===t?4:85===t?8:0}function Rt(t){return 48<=t&&t<=57?t-48:-1}function zt(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}function Kt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Pt(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.K2)(Mt,"_class"),(0,i.K2)(Et,"is_EOL"),(0,i.K2)($t,"is_WHITE_SPACE"),(0,i.K2)(Ot,"is_WS_OR_EOL"),(0,i.K2)(Dt,"is_FLOW_INDICATOR"),(0,i.K2)(It,"fromHexCode"),(0,i.K2)(qt,"escapedHexLen"),(0,i.K2)(Rt,"fromDecimalCode"),(0,i.K2)(zt,"simpleEscapeSequence"),(0,i.K2)(Kt,"charFromCodepoint"),(0,i.K2)(Pt,"setProperty");var Nt,Wt=new Array(256),jt=new Array(256);for(Nt=0;Nt<256;Nt++)Wt[Nt]=zt(Nt)?1:0,jt[Nt]=zt(Nt);function Ht(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||St,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ut(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=m(r),new p(e,r)}function Yt(t,e){throw Ut(t,e)}function Gt(t,e){t.onWarning&&t.onWarning.call(null,Ut(t,e))}(0,i.K2)(Ht,"State$1"),(0,i.K2)(Ut,"generateError"),(0,i.K2)(Yt,"throwError"),(0,i.K2)(Gt,"throwWarning");var Xt={YAML:(0,i.K2)(function(t,e,r){var i,o,n;null!==t.version&&Yt(t,"duplication of %YAML directive"),1!==r.length&&Yt(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Yt(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),n=parseInt(i[2],10),1!==o&&Yt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&Gt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K2)(function(t,e,r){var i,o;2!==r.length&&Yt(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Lt.test(i)||Yt(t,"ill-formed tag handle (first argument) of the TAG directive"),Bt.call(t.tagMap,i)&&Yt(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ft.test(o)||Yt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(n){Yt(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function Vt(t,e,r,i){var o,n,a,s;if(e<r){if(s=t.input.slice(e,r),i)for(o=0,n=s.length;o<n;o+=1)9===(a=s.charCodeAt(o))||32<=a&&a<=1114111||Yt(t,"expected valid JSON character");else vt.test(s)&&Yt(t,"the stream contains non-printable characters");t.result+=s}}function Zt(t,e,r,i){var o,n,a,s;for(c.isObject(r)||Yt(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(o=Object.keys(r)).length;a<s;a+=1)n=o[a],Bt.call(e,n)||(Pt(e,n,r[n]),i[n]=!0)}function Qt(t,e,r,i,o,n,a,s,l){var h,c;if(Array.isArray(o))for(h=0,c=(o=Array.prototype.slice.call(o)).length;h<c;h+=1)Array.isArray(o[h])&&Yt(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===Mt(o[h])&&(o[h]="[object Object]");if("object"==typeof o&&"[object Object]"===Mt(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(n))for(h=0,c=n.length;h<c;h+=1)Zt(t,e,n[h],r);else Zt(t,e,n,r);else t.json||Bt.call(r,o)||!Bt.call(e,o)||(t.line=a||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Yt(t,"duplicated mapping key")),Pt(e,o,n),delete r[o];return e}function Jt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Yt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function te(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);0!==o;){for(;$t(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!Et(o))break;for(Jt(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&Gt(t,"deficient indentation"),i}function ee(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Ot(e)))}function re(t,e){1===e?t.result+=" ":e>1&&(t.result+=c.repeat("\n",e-1))}function ie(t,e,r){var i,o,n,a,s,l,h,c,d=t.kind,u=t.result;if(Ot(c=t.input.charCodeAt(t.position))||Dt(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Ot(i=t.input.charCodeAt(t.position+1))||r&&Dt(i)))return!1;for(t.kind="scalar",t.result="",o=n=t.position,a=!1;0!==c;){if(58===c){if(Ot(i=t.input.charCodeAt(t.position+1))||r&&Dt(i))break}else if(35===c){if(Ot(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ee(t)||r&&Dt(c))break;if(Et(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,te(t,!1,-1),t.lineIndent>=e){a=!0,c=t.input.charCodeAt(t.position);continue}t.position=n,t.line=s,t.lineStart=l,t.lineIndent=h;break}}a&&(Vt(t,o,n,!1),re(t,t.line-s),o=n=t.position,a=!1),$t(c)||(n=t.position+1),c=t.input.charCodeAt(++t.position)}return Vt(t,o,n,!1),!!t.result||(t.kind=d,t.result=u,!1)}function oe(t,e){var r,i,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Vt(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else Et(r)?(Vt(t,i,o,!0),re(t,te(t,!1,e)),i=o=t.position):t.position===t.lineStart&&ee(t)?Yt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Yt(t,"unexpected end of the stream within a single quoted scalar")}function ne(t,e){var r,i,o,n,a,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Vt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Vt(t,r,t.position,!0),Et(s=t.input.charCodeAt(++t.position)))te(t,!1,e);else if(s<256&&Wt[s])t.result+=jt[s],t.position++;else if((a=qt(s))>0){for(o=a,n=0;o>0;o--)(a=It(s=t.input.charCodeAt(++t.position)))>=0?n=(n<<4)+a:Yt(t,"expected hexadecimal character");t.result+=Kt(n),t.position++}else Yt(t,"unknown escape sequence");r=i=t.position}else Et(s)?(Vt(t,r,i,!0),re(t,te(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ee(t)?Yt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Yt(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var r,i,o,n,a,s,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))a=93,h=!1,n=[];else{if(123!==p)return!1;a=125,h=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(++t.position);0!==p;){if(te(t,!0,e),(p=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=n,!0;g?44===p&&Yt(t,"expected the node content, but found ','"):Yt(t,"missed comma between flow collection entries"),u=null,s=l=!1,63===p&&Ot(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,te(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,pe(t,e,1,!1,!0),d=t.tag,c=t.result,te(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),te(t,!0,e),pe(t,e,1,!1,!0),u=t.result),h?Qt(t,n,m,d,c,u,r,i,o):s?n.push(Qt(t,null,m,d,c,u,r,i,o)):n.push(c),te(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}Yt(t,"unexpected end of the stream within a flow collection")}function se(t,e){var r,i,o,n,a=1,s=!1,l=!1,h=e,d=0,u=!1;if(124===(n=t.input.charCodeAt(t.position)))i=!1;else{if(62!==n)return!1;i=!0}for(t.kind="scalar",t.result="";0!==n;)if(43===(n=t.input.charCodeAt(++t.position))||45===n)1===a?a=43===n?3:2:Yt(t,"repeat of a chomping mode identifier");else{if(!((o=Rt(n))>=0))break;0===o?Yt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Yt(t,"repeat of an indentation width identifier"):(h=e+o-1,l=!0)}if($t(n)){do{n=t.input.charCodeAt(++t.position)}while($t(n));if(35===n)do{n=t.input.charCodeAt(++t.position)}while(!Et(n)&&0!==n)}for(;0!==n;){for(Jt(t),t.lineIndent=0,n=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),Et(n))d++;else{if(t.lineIndent<h){3===a?t.result+=c.repeat("\n",s?1+d:d):1===a&&s&&(t.result+="\n");break}for(i?$t(n)?(u=!0,t.result+=c.repeat("\n",s?1+d:d)):u?(u=!1,t.result+=c.repeat("\n",d+1)):0===d?s&&(t.result+=" "):t.result+=c.repeat("\n",d):t.result+=c.repeat("\n",s?1+d:d),s=!0,l=!0,d=0,r=t.position;!Et(n)&&0!==n;)n=t.input.charCodeAt(++t.position);Vt(t,r,t.position,!1)}}return!0}function le(t,e){var r,i,o=t.tag,n=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),45===i)&&Ot(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,te(t,!0,-1)&&t.lineIndent<=e)a.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,pe(t,e,3,!1,!0),a.push(t.result),te(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)Yt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=o,t.anchor=n,t.kind="sequence",t.result=a,!0)}function he(t,e,r){var i,o,n,a,s,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,C=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,63!==h&&58!==h||!Ot(i)){if(a=t.line,s=t.lineStart,l=t.position,!pe(t,r,2,!1,!0))break;if(t.line===n){for(h=t.input.charCodeAt(t.position);$t(h);)h=t.input.charCodeAt(++t.position);if(58===h)Ot(h=t.input.charCodeAt(++t.position))||Yt(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Qt(t,u,p,g,f,null,a,s,l),g=f=y=null),C=!0,m=!1,o=!1,g=t.tag,f=t.result;else{if(!C)return t.tag=c,t.anchor=d,!0;Yt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return t.tag=c,t.anchor=d,!0;Yt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(Qt(t,u,p,g,f,null,a,s,l),g=f=y=null),C=!0,m=!0,o=!0):m?(m=!1,o=!0):Yt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===n||t.lineIndent>e)&&(m&&(a=t.line,s=t.lineStart,l=t.position),pe(t,e,4,!0,o)&&(m?f=t.result:y=t.result),m||(Qt(t,u,p,g,f,y,a,s,l),g=f=y=null),te(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&0!==h)Yt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Qt(t,u,p,g,f,null,a,s,l),C&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),C}function ce(t){var e,r,i,o,n=!1,a=!1;if(33!==(o=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Yt(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(n=!0,o=t.input.charCodeAt(++t.position)):33===o?(a=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,n){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&62!==o);t.position<t.length?(i=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):Yt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!Ot(o);)33===o&&(a?Yt(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Lt.test(r)||Yt(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),At.test(i)&&Yt(t,"tag suffix cannot contain flow indicator characters")}i&&!Ft.test(i)&&Yt(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(s){Yt(t,"tag name is malformed: "+i)}return n?t.tag=i:Bt.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:Yt(t,'undeclared tag handle "'+r+'"'),!0}function de(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Yt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Ot(r)&&!Dt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function ue(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Ot(i)&&!Dt(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Bt.call(t.anchorMap,r)||Yt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],te(t,!0,-1),!0}function pe(t,e,r,i,o){var n,a,s,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=a=s=4===r||3===r,i&&te(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;ce(t)||de(t);)te(t,!0,-1)?(f=!0,s=n,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):s=!1;if(s&&(s=f||o),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?s&&(le(t,p)||he(t,p,u))||ae(t,u)?y=!0:(a&&se(t,u)||oe(t,u)||ne(t,u)?y=!0:ue(t)?(y=!0,null===t.tag&&null===t.anchor||Yt(t,"alias node should not have any properties")):ie(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=s&&le(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Yt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Bt.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||Yt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&Yt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Yt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function ge(t){var e,r,i,o,n=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(te(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(a=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Ot(o);)o=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Yt(t,"directive name must not be less than one character in length");0!==o;){for(;$t(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!Et(o));break}if(Et(o))break;for(e=t.position;0!==o&&!Ot(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&Jt(t),Bt.call(Xt,r)?Xt[r](t,r,i):Gt(t,'unknown document directive "'+r+'"')}te(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,te(t,!0,-1)):a&&Yt(t,"directives end mark is expected"),pe(t,t.lineIndent-1,4,!1,!0),te(t,!0,-1),t.checkLineBreaks&&_t.test(t.input.slice(n,t.position))&&Gt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ee(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,te(t,!0,-1)):t.position<t.length-1&&Yt(t,"end of the stream or a document separator is expected")}function fe(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new Ht(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,Yt(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ge(r);return r.documents}function ye(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=fe(t,r);if("function"!=typeof e)return i;for(var o=0,n=i.length;o<n;o+=1)e(i[o])}function me(t,e){var r=fe(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new p("expected a single document in the stream, but found more")}}(0,i.K2)(Vt,"captureSegment"),(0,i.K2)(Zt,"mergeMappings"),(0,i.K2)(Qt,"storeMappingPair"),(0,i.K2)(Jt,"readLineBreak"),(0,i.K2)(te,"skipSeparationSpace"),(0,i.K2)(ee,"testDocumentSeparator"),(0,i.K2)(re,"writeFoldedLines"),(0,i.K2)(ie,"readPlainScalar"),(0,i.K2)(oe,"readSingleQuotedScalar"),(0,i.K2)(ne,"readDoubleQuotedScalar"),(0,i.K2)(ae,"readFlowCollection"),(0,i.K2)(se,"readBlockScalar"),(0,i.K2)(le,"readBlockSequence"),(0,i.K2)(he,"readBlockMapping"),(0,i.K2)(ce,"readTagProperty"),(0,i.K2)(de,"readAnchorProperty"),(0,i.K2)(ue,"readAlias"),(0,i.K2)(pe,"composeNode"),(0,i.K2)(ge,"readDocument"),(0,i.K2)(fe,"loadDocuments"),(0,i.K2)(ye,"loadAll$1"),(0,i.K2)(me,"load$1");var Ce={loadAll:ye,load:me},xe=Object.prototype.toString,be=Object.prototype.hasOwnProperty,ke=65279,we={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Se=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Be(t,e){var r,i,o,n,a,s,l;if(null===e)return{};for(r={},o=0,n=(i=Object.keys(e)).length;o<n;o+=1)a=i[o],s=String(e[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=t.compiledTypeMap.fallback[a])&&be.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}function ve(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new p("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+c.repeat("0",i-e.length)+e}(0,i.K2)(Be,"compileStyleMap"),(0,i.K2)(ve,"encodeHex");function _e(t){this.schema=t.schema||St,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=c.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Be(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ae(t,e){for(var r,i=c.repeat(" ",e),o=0,n=-1,a="",s=t.length;o<s;)-1===(n=t.indexOf("\n",o))?(r=t.slice(o),o=s):(r=t.slice(o,n+1),o=n+1),r.length&&"\n"!==r&&(a+=i),a+=r;return a}function Le(t,e){return"\n"+c.repeat(" ",t.indent*e)}function Fe(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Me(t){return 32===t||9===t}function Ee(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==ke||65536<=t&&t<=1114111}function $e(t){return Ee(t)&&t!==ke&&13!==t&&10!==t}function Oe(t,e,r){var i=$e(t),o=i&&!Me(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||$e(e)&&!Me(e)&&35===t||58===e&&o}function De(t){return Ee(t)&&t!==ke&&!Me(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Ie(t){return!Me(t)&&58!==t}function qe(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Re(t){return/^\n* /.test(t)}(0,i.K2)(_e,"State"),(0,i.K2)(Ae,"indentString"),(0,i.K2)(Le,"generateNextLine"),(0,i.K2)(Fe,"testImplicitResolving"),(0,i.K2)(Me,"isWhitespace"),(0,i.K2)(Ee,"isPrintable"),(0,i.K2)($e,"isNsCharOrWhitespace"),(0,i.K2)(Oe,"isPlainSafe"),(0,i.K2)(De,"isPlainSafeFirst"),(0,i.K2)(Ie,"isPlainSafeLast"),(0,i.K2)(qe,"codePointAt"),(0,i.K2)(Re,"needIndentIndicator");function ze(t,e,r,i,o,n,a,s){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=De(qe(t,0))&&Ie(qe(t,t.length-1));if(e||a)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!Ee(h=qe(t,l)))return 5;f=f&&Oe(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=qe(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!Ee(h))return 5;f=f&&Oe(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&Re(t)?5:a?2===n?5:2:u?4:3:!f||a||o(t)?2===n?5:2:1}function Ke(t,e,r,o,n){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Te.indexOf(e)||Se.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=o||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return Fe(t,e)}switch((0,i.K2)(h,"testAmbiguity"),ze(e,l,t.indent,s,h,t.quotingType,t.forceQuotes&&!o,n)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Pe(e,t.indent)+Ne(Ae(e,a));case 4:return">"+Pe(e,t.indent)+Ne(Ae(We(e,s),a));case 5:return'"'+He(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Pe(t,e){var r=Re(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function Ne(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function We(t,e){for(var r,i,o,n=/(\n+)([^\n]*)/g,a=(r=-1!==(r=t.indexOf("\n"))?r:t.length,n.lastIndex=r,je(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];o=n.exec(t);){var l=o[1],h=o[2];i=" "===h[0],a+=l+(s||i||""===h?"":"\n")+je(h,e),s=i}return a}function je(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,n=0,a=0,s=0,l="";r=o.exec(t);)(s=r.index)-n>e&&(i=a>n?a:s,l+="\n"+t.slice(n,i),n=i+1),a=s;return l+="\n",t.length-n>e&&a>n?l+=t.slice(n,a)+"\n"+t.slice(a+1):l+=t.slice(n),l.slice(1)}function He(t){for(var e,r="",i=0,o=0;o<t.length;i>=65536?o+=2:o++)i=qe(t,o),!(e=we[i])&&Ee(i)?(r+=t[o],i>=65536&&(r+=t[o+1])):r+=e||ve(i);return r}function Ue(t,e,r){var i,o,n,a="",s=t.tag;for(i=0,o=r.length;i<o;i+=1)n=r[i],t.replacer&&(n=t.replacer.call(r,String(i),n)),(Ze(t,e,n,!1,!1)||void 0===n&&Ze(t,e,null,!1,!1))&&(""!==a&&(a+=","+(t.condenseFlow?"":" ")),a+=t.dump);t.tag=s,t.dump="["+a+"]"}function Ye(t,e,r,i){var o,n,a,s="",l=t.tag;for(o=0,n=r.length;o<n;o+=1)a=r[o],t.replacer&&(a=t.replacer.call(r,String(o),a)),(Ze(t,e+1,a,!0,!0,!1,!0)||void 0===a&&Ze(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=Le(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Ge(t,e,r){var i,o,n,a,s,l="",h=t.tag,c=Object.keys(r);for(i=0,o=c.length;i<o;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),a=r[n=c[i]],t.replacer&&(a=t.replacer.call(r,n,a)),Ze(t,e,n,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Xe(t,e,r,i){var o,n,a,s,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(o=0,n=u.length;o<n;o+=1)h="",i&&""===c||(h+=Le(t,e)),s=r[a=u[o]],t.replacer&&(s=t.replacer.call(r,a,s)),Ze(t,e+1,a,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Le(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function Ve(t,e,r){var i,o,n,a,s,l;for(n=0,a=(o=r?t.explicitTypes:t.implicitTypes).length;n<a;n+=1)if(((s=o[n]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===xe.call(s.represent))i=s.represent(e,l);else{if(!be.call(s.represent,l))throw new p("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Ze(t,e,r,i,o,n,a){t.tag=null,t.dump=r,Ve(t,r,!1)||Ve(t,r,!0);var s,l=xe.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(o=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Xe(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Ge(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?Ye(t,e-1,t.dump,o):Ye(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Ue(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Ke(t,t.dump,e,n,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Qe(t,e){var r,i,o=[],n=[];for(Je(t,o,n),r=0,i=n.length;r<i;r+=1)e.duplicates.push(o[n[r]]);e.usedDuplicates=new Array(i)}function Je(t,e,r){var i,o,n;if(null!==t&&"object"==typeof t)if(-1!==(o=e.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(e.push(t),Array.isArray(t))for(o=0,n=t.length;o<n;o+=1)Je(t[o],e,r);else for(o=0,n=(i=Object.keys(t)).length;o<n;o+=1)Je(t[i[o]],e,r)}function tr(t,e){var r=new _e(e=e||{});r.noRefs||Qe(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ze(r,0,i,!0,!0)?r.dump+"\n":""}(0,i.K2)(ze,"chooseScalarStyle"),(0,i.K2)(Ke,"writeScalar"),(0,i.K2)(Pe,"blockHeader"),(0,i.K2)(Ne,"dropEndingNewline"),(0,i.K2)(We,"foldString"),(0,i.K2)(je,"foldLine"),(0,i.K2)(He,"escapeString"),(0,i.K2)(Ue,"writeFlowSequence"),(0,i.K2)(Ye,"writeBlockSequence"),(0,i.K2)(Ge,"writeFlowMapping"),(0,i.K2)(Xe,"writeBlockMapping"),(0,i.K2)(Ve,"detectType"),(0,i.K2)(Ze,"writeNode"),(0,i.K2)(Qe,"getDuplicateReferences"),(0,i.K2)(Je,"inspectNode"),(0,i.K2)(tr,"dump$1");function er(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}(0,i.K2)(er,"renamed");var rr=X,ir=Ce.load;er("safeLoad","load"),er("safeLoadAll","loadAll"),er("safeDump","dump")},3992(t,e,r){"use strict";r.r(e),r.d(e,{default:()=>cr});var i=r(5717),o=r(9164),n=r(7019),a=(r(2452),r(2993),r(3641),r(566),r(9478),r(2864)),s=r(1546),l=r(3316),h=r(7970),c=r(6793),d=r(7012),u="comm",p="rule",g="decl",f="@keyframes",y="@layer",m=Math.abs,C=String.fromCharCode;Object.assign;function x(t){return t.trim()}function b(t,e,r){return t.replace(e,r)}function k(t,e){return 0|t.charCodeAt(e)}function w(t,e,r){return t.slice(e,r)}function T(t){return t.length}function S(t){return t.length}function B(t,e){return e.push(t),t}function v(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function _(t,e,r,i){switch(t.type){case y:if(t.children.length)break;case"@import":case"@namespace":case g:return t.return=t.return||t.value;case u:return"";case f:return t.return=t.value+"{"+v(t.children,i)+"}";case p:if(!T(t.value=t.props.join(",")))return""}return T(r=v(t.children,i))?t.return=t.value+"{"+r+"}":""}var A=1,L=1,F=0,M=0,E=0,$="";function O(t,e,r,i,o,n,a,s){return{value:t,root:e,parent:r,type:i,props:o,children:n,line:A,column:L,length:a,return:"",siblings:s}}function D(){return E=M>0?k($,--M):0,L--,10===E&&(L=1,A--),E}function I(){return E=M<F?k($,M++):0,L++,10===E&&(L=1,A++),E}function q(){return k($,M)}function R(){return M}function z(t,e){return w($,t,e)}function K(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function P(t){return A=L=1,F=T($=t),M=0,[]}function N(t){return $="",t}function W(t){return x(z(M-1,U(91===t?t+2:40===t?t+1:t)))}function j(t){for(;(E=q())&&E<33;)I();return K(t)>2||K(E)>3?"":" "}function H(t,e){for(;--e&&I()&&!(E<48||E>102||E>57&&E<65||E>70&&E<97););return z(t,R()+(e<6&&32==q()&&32==I()))}function U(t){for(;I();)switch(E){case t:return M;case 34:case 39:34!==t&&39!==t&&U(E);break;case 40:41===t&&U(t);break;case 92:I()}return M}function Y(t,e){for(;I()&&t+E!==57&&(t+E!==84||47!==q()););return"/*"+z(e,M-1)+"*"+C(47===t?t:I())}function G(t){for(;!K(q());)I();return z(t,M)}function X(t){return N(V("",null,null,null,[""],t=P(t),0,[0],t))}function V(t,e,r,i,o,n,a,s,l){for(var h=0,c=0,d=a,u=0,p=0,g=0,f=1,y=1,m=1,x=0,S=0,v="",_=o,A=n,L=i,F=v;y;)switch(g=S,S=I()){case 40:108!=g&&58==k(F,d-1)?(x++,F+="("):F+=W(S);break;case 41:x--,F+=")";break;case 34:case 39:case 91:F+=W(S);break;case 9:case 10:case 13:case 32:if(x>0){F+=C(S);break}F+=j(g);break;case 92:F+=H(R()-1,7);continue;case 47:switch(q()){case 42:case 47:B(Q(Y(I(),R()),e,r,l),l),5!=K(g||1)&&5!=K(q()||1)||!T(F)||" "===w(F,-1,void 0)||(F+=" ");break;default:F+="/"}break;case 123*f:s[h++]=T(F)*m;case 125*f:case 59:case 0:if(x>0&&S){F+=C(S);break}switch(S){case 0:case 125:y=0;case 59+c:-1==m&&(F=b(F,/\f/g,"")),p>0&&(T(F)-d||0===f)&&B(p>32?J(F+";",i,r,d-1,l):J(b(F," ","")+";",i,r,d-2,l),l);break;case 59:F+=";";default:if(B(L=Z(F,e,r,h,c,o,s,v,_=[],A=[],d,n),n),123===S)if(0===c)V(F,e,L,L,_,n,d,s,A);else{switch(u){case 99:if(110===k(F,3))break;case 108:if(97===k(F,2))break;default:c=0;case 100:case 109:case 115:}c?V(t,L,L,i&&B(Z(t,L,L,0,0,o,s,v,o,_=[],d,A),A),o,A,d,s,i?_:A):V(F,L,L,L,[""],A,0,s,A)}}h=c=p=0,f=m=1,v=F="",d=a;break;case 58:d=1+T(F),p=g;default:if(f<1)if(123==S)--f;else if(125==S&&0==f++&&125==D())continue;switch(F+=C(S),S*f){case 38:m=c>0?1:(F+="\f",-1);break;case 44:if(x>0)break;s[h++]=(T(F)-1)*m,m=1;break;case 64:45===q()&&(F+=W(I())),u=q(),c=d=T(v=F+=G(R())),S++;break;case 45:45===g&&2==T(F)&&(f=0)}}return n}function Z(t,e,r,i,o,n,a,s,l,h,c,d){for(var u=o-1,g=0===o?n:[""],f=S(g),y=0,C=0,k=0;y<i;++y)for(var T=0,B=w(t,u+1,u=m(C=a[y])),v=t;T<f;++T)(v=x(C>0?g[T]+" "+B:b(B,/&\f/g,g[T])))&&(l[k++]=v);return O(t,e,r,0===o?p:s,l,h,c,d)}function Q(t,e,r,i){return O(t,e,r,u,C(E),w(t,2,-2),0,i)}function J(t,e,r,i,o){return O(t,e,r,g,w(t,0,i),w(t,i+1,-1),i,o)}var tt=r(2527),et=r(4100),rt=r(3819),it=r(8331);var ot=r(6526);function nt(t){if(null==t)return!0;if((0,rt.X)(t))return!!("function"==typeof t.splice||"string"==typeof t||(0,et.P)(t)||(0,ot.i)(t)||(0,it.N)(t))&&0===t.length;if("object"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}var at={id:"c4",detector:(0,h.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(9574).then(r.bind(r,9574));return{id:"c4",diagram:t}},"loader")},st="flowchart",lt={id:st,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5428).then(r.bind(r,5428));return{id:st,diagram:t}},"loader")},ht="flowchart-v2",ct={id:ht,detector:(0,h.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5428).then(r.bind(r,5428));return{id:ht,diagram:t}},"loader")},dt={id:"er",detector:(0,h.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(1126).then(r.bind(r,1126));return{id:"er",diagram:t}},"loader")},ut="gitGraph",pt={id:ut,detector:(0,h.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(7344)]).then(r.bind(r,7344));return{id:ut,diagram:t}},"loader")},gt="gantt",ft={id:gt,detector:(0,h.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(7516).then(r.bind(r,7516));return{id:gt,diagram:t}},"loader")},yt="info",mt={id:yt,detector:(0,h.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(2673)]).then(r.bind(r,2673));return{id:yt,diagram:t}},"loader")},Ct={id:"pie",detector:(0,h.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(7080)]).then(r.bind(r,7080));return{id:"pie",diagram:t}},"loader")},xt="quadrantChart",bt={id:xt,detector:(0,h.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2805).then(r.bind(r,2805));return{id:xt,diagram:t}},"loader")},kt="xychart",wt={id:kt,detector:(0,h.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(7985).then(r.bind(r,7985));return{id:kt,diagram:t}},"loader")},Tt="requirement",St={id:Tt,detector:(0,h.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5964).then(r.bind(r,5964));return{id:Tt,diagram:t}},"loader")},Bt="sequence",vt={id:Bt,detector:(0,h.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(8389).then(r.bind(r,8389));return{id:Bt,diagram:t}},"loader")},_t="class",At={id:_t,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(5196),r.e(4069)]).then(r.bind(r,4069));return{id:_t,diagram:t}},"loader")},Lt="classDiagram",Ft={id:Lt,detector:(0,h.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(5196),r.e(8049)]).then(r.bind(r,8049));return{id:Lt,diagram:t}},"loader")},Mt="state",Et={id:Mt,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(4780),r.e(8585),r.e(4134),r.e(6486)]).then(r.bind(r,6486));return{id:Mt,diagram:t}},"loader")},$t="stateDiagram",Ot={id:$t,detector:(0,h.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(4134),r.e(4772)]).then(r.bind(r,4772));return{id:$t,diagram:t}},"loader")},Dt="journey",It={id:Dt,detector:(0,h.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(4257).then(r.bind(r,6638));return{id:Dt,diagram:t}},"loader")},qt={draw:(0,h.K2)((t,e,r)=>{h.Rm.debug("rendering svg for syntax error\n");const o=(0,i.D)(e),n=o.append("g");o.attr("viewBox","0 0 2412 512"),(0,l.a$)(o,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},Rt=qt,zt={db:{},renderer:qt,parser:{parse:(0,h.K2)(()=>{},"parse")}},Kt="flowchart-elk",Pt={id:Kt,detector:(0,h.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5428).then(r.bind(r,5428));return{id:Kt,diagram:t}},"loader")},Nt="timeline",Wt={id:Nt,detector:(0,h.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(8290).then(r.bind(r,8290));return{id:Nt,diagram:t}},"loader")},jt="mindmap",Ht={id:jt,detector:(0,h.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(1298).then(r.bind(r,1298));return{id:jt,diagram:t}},"loader")},Ut="kanban",Yt={id:Ut,detector:(0,h.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(8788).then(r.bind(r,8788));return{id:Ut,diagram:t}},"loader")},Gt="sankey",Xt={id:Gt,detector:(0,h.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(8355).then(r.bind(r,8355));return{id:Gt,diagram:t}},"loader")},Vt="packet",Zt={id:Vt,detector:(0,h.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(8152)]).then(r.bind(r,8152));return{id:Vt,diagram:t}},"loader")},Qt="radar",Jt={id:Qt,detector:(0,h.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(2297)]).then(r.bind(r,2297));return{id:Qt,diagram:t}},"loader")},te="block",ee={id:te,detector:(0,h.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(4780),r.e(3552)]).then(r.bind(r,3552));return{id:te,diagram:t}},"loader")},re="treeView",ie={id:re,detector:(0,h.K2)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(3499)]).then(r.bind(r,3499));return{id:re,diagram:t}},"loader")},oe="architecture",ne={id:oe,detector:(0,h.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(6611),r.e(242)]).then(r.bind(r,242));return{id:oe,diagram:t}},"loader")},ae="eventmodeling",se={id:ae,detector:(0,h.K2)(t=>/^\s*eventmodeling/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(3395)]).then(r.bind(r,3395));return{id:ae,diagram:t}},"loader")},le="ishikawa",he={id:le,detector:(0,h.K2)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(7540).then(r.bind(r,7540));return{id:le,diagram:t}},"loader")},ce="venn",de={id:ce,detector:(0,h.K2)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(247).then(r.bind(r,247));return{id:ce,diagram:t}},"loader")},ue="treemap",pe={id:ue,detector:(0,h.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(5248)]).then(r.bind(r,5248));return{id:ue,diagram:t}},"loader")},ge="wardley-beta",fe={id:ge,detector:(0,h.K2)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(9953),r.e(9852)]).then(r.bind(r,9852));return{id:ge,diagram:t}},"loader")},ye=!1,me=(0,h.K2)(()=>{ye||(ye=!0,(0,l.Js)("error",zt,t=>"error"===t.toLowerCase().trim()),(0,l.Js)("---",{db:{clear:(0,h.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,h.K2)(()=>{},"draw")},parser:{parse:(0,h.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,h.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,l.Xd)(Pt,Ht,ne),(0,l.Xd)(at,Yt,Ft,At,dt,ft,mt,Ct,St,vt,ct,lt,Wt,pt,Ot,Et,It,bt,Xt,Zt,wt,ee,se,ie,Jt,he,pe,de,fe))},"addDiagrams"),Ce=(0,h.K2)(async()=>{h.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(l.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,l.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,l.Js)(i,t,e)}catch(i){throw h.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete l.mW[t],i}}}))).filter(t=>"rejected"===t.status);if(t.length>0){h.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)h.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function xe(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function be(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,h.K2)(xe,"setA11yDiagramInfo"),(0,h.K2)(be,"addSVGa11yTitleDescription");var ke=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,h.K2)(this,"Diagram")}static async fromText(e,r={}){const i=(0,l.zj)(),o=(0,l.Ch)(e,i);e=(0,s.C4)(e)+"\n";try{(0,l.Gs)(o)}catch{const t=(0,l.J$)(o);if(!t)throw new l.C0(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();(0,l.Js)(e,r)}const{db:n,parser:a,renderer:h,init:c}=(0,l.Gs)(o);return a.parser&&(a.parser.yy=n),n.clear?.(),c?.(i),r.title&&n.setDiagramTitle?.(r.title),await a.parse(e),new t(o,e,n,a,h)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},we=[],Te=(0,h.K2)(()=>{we.forEach(t=>{t()}),we=[]},"attachFunctions"),Se=(0,h.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Be(t){const e=t.match(l.EJ);if(!e)return{text:t,metadata:{}};let r=(0,o.H)(e[1],{schema:o.r})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}(0,h.K2)(Be,"extractFrontMatter");var ve=(0,h.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),_e=(0,h.K2)(t=>{const{text:e,metadata:r}=Be(t),{displayMode:i,title:o,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},"processFrontmatter"),Ae=(0,h.K2)(t=>{const e=s._K.detectInit(t)??{},r=s._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,s.vU)(t),directive:e}},"processDirectives");function Le(t){const e=ve(t),r=_e(e),i=Ae(r.text),o=(0,s.$t)(r.config,i.directive);return{code:t=Se(i.text),title:r.title,config:o}}function Fe(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,h.K2)(Le,"preprocessDiagram"),(0,h.K2)(Fe,"toBase64");var Me=["foreignobject"],Ee=["dominant-baseline"];function $e(t){const e=Le(t);return(0,l.cL)(),(0,l.xA)(e.config??{}),e}async function Oe(t,e){me();try{const{code:e,config:r}=$e(t);return{diagramType:(await Ue(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}}(0,h.K2)($e,"processAndSetConfigs"),(0,h.K2)(Oe,"parse");var De=(0,h.K2)((t,e,r=[])=>`.${t} ${e} ${(0,l.Df)(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),Ie=(0,h.K2)((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=(0,l.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{nt(t.styles)||i.forEach(e=>{r.insertRule(De(t.id,e,t.styles),r.cssRules.length)}),nt(t.textStyles)||r.insertRule(De(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,l.KG)(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+(0,l.KG)(r)},"createCssStyles"),qe=(0,h.K2)((t,e)=>{return v(X(`${t}{${e}}`),(i=S(r=[(0,h.K2)(function(e,r,i,o){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===f)return;e.props=e.props.map(e=>e.startsWith(t)?e:`${t} ${e}`)}else e.type.startsWith("@")&&(["@media","@supports",y,"@scope","@container","@starting-style",f].includes(e.type)||(h.Rm.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=u))},"addNamespace"),_]),function(t,e,o,n){for(var a="",s=0;s<i;s++)a+=r[s](t,e,o,n)||"";return a}));var r,i},"compileCSS"),Re=(0,h.K2)((t,e,r,i)=>{const o=Ie(t,r),n=(0,l.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return qe(i,n)},"createUserStyles"),ze=(0,h.K2)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,s.Sm)(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Ke=(0,h.K2)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${Fe(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),Pe=(0,h.K2)((t,e,r,i,o)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const a=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&a.attr("xmlns:xlink",o),a.append("g"),t},"appendDivSvgG");function Ne(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.K2)(Ne,"sandboxedIframe");var We=(0,h.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),je=(0,h.K2)(async function(t,e,r){me();const i=$e(e);e=i.code;const o=(0,l.zj)();h.Rm.debug(o),e.length>(o?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const n=`#${t}`,a="i"+t,s="#"+a,c="d"+t,u="#"+c,p=(0,h.K2)(()=>{const t=f?s:u,e=(0,d.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,d.Ltv)(document.body);const f="sandbox"===o.securityLevel,y="loose"===o.securityLevel,m=o.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),f){const t=Ne((0,d.Ltv)(r),a);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=(0,d.Ltv)(r);Pe(g,t,c,`font-family: ${m}`,"http://www.w3.org/1999/xlink")}else{if(We(document,t,c,a),f){const t=Ne((0,d.Ltv)(document.body),a);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=(0,d.Ltv)("body");Pe(g,t,c)}let C,x;try{C=await ke.fromText(e,{title:i.title})}catch(M){if(o.suppressErrorRendering)throw p(),M;C=await ke.fromText("error"),x=M}const b=g.select(u).node(),k=C.type,w=b.firstChild,T=w.firstChild,S=C.renderer.getClasses?.(e,C),B=Re(o,k,S,n),v=document.createElement("style");v.innerHTML=B,w.insertBefore(v,T);try{await C.renderer.draw(e,t,"11.15.0",C)}catch(E){throw o.suppressErrorRendering?p():Rt.draw(e,t,"11.15.0"),E}const _=g.select(`${u} svg`),A=C.db.getAccTitle?.(),L=C.db.getAccDescription?.();Ye(k,_,A,L),g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=g.select(u).node().innerHTML;if(h.Rm.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),F=ze(F,f,(0,l._3)(o.arrowMarkerAbsolute)),f){const t=g.select(u+" svg").node();F=Ke(F,t)}else y||(F=tt.A.sanitize(F,{ADD_TAGS:Me,ADD_ATTR:Ee,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Te(),x)throw x;return p(),{diagramType:k,svg:F,bindFunctions:C.db.bindFunctions}},"render");function He(t={}){const e=(0,l.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,l.wZ)(e),e?.theme&&e.theme in l.H$?e.themeVariables=l.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=l.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,l.UU)(e):(0,l.Q2)();(0,h.He)(r.logLevel),me()}(0,h.K2)(He,"initialize");var Ue=(0,h.K2)((t,e={})=>{const{code:r}=Le(t);return ke.fromText(r,e)},"getDiagramFromText");function Ye(t,e,r,i){xe(e,t),be(e,r,i,e.attr("id"))}(0,h.K2)(Ye,"addA11yInfo");var Ge=Object.freeze({render:je,parse:Oe,getDiagramFromText:Ue,initialize:He,getConfig:l.zj,setConfig:l.Nk,getSiteConfig:l.Q2,updateSiteConfig:l.B6,reset:(0,h.K2)(()=>{(0,l.cL)()},"reset"),globalReset:(0,h.K2)(()=>{(0,l.cL)(l.sb)},"globalReset"),defaultConfig:l.sb});(0,h.He)((0,l.zj)().logLevel),(0,l.cL)((0,l.zj)());var Xe=(0,h.K2)((t,e,r)=>{h.Rm.warn(t),(0,s.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Ve=(0,h.K2)(async function(t={querySelector:".mermaid"}){try{await Ze(t)}catch(e){if((0,s.dq)(e)&&h.Rm.error(e.str),hr.parseError&&hr.parseError(e),!t.suppressErrors)throw h.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Ze=(0,h.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Ge.getConfig();let o;if(h.Rm.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}h.Rm.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(h.Rm.debug("Start On Load: "+i?.startOnLoad),Ge.updateSiteConfig({startOnLoad:i?.startOnLoad}));const n=new s._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const l=[];for(const u of Array.from(o)){if(h.Rm.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const e=`mermaid-${n.next()}`;a=u.innerHTML,a=(0,c.T)(s._K.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=s._K.detectInit(a);r&&h.Rm.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await sr(e,a,u);u.innerHTML=r,t&&await t(e),i&&i(u)}catch(d){Xe(d,l,hr.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),Qe=(0,h.K2)(function(t){Ge.initialize(t)},"initialize"),Je=(0,h.K2)(async function(t,e,r){h.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Qe(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Ve(i)},"init"),tr=(0,h.K2)(async(t,{lazyLoad:e=!0}={})=>{me(),(0,l.Xd)(...t),!1===e&&await Ce()},"registerExternalDiagrams"),er=(0,h.K2)(function(){if(hr.startOnLoad){const{startOnLoad:t}=Ge.getConfig();t&&hr.run().catch(t=>h.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",er,!1);var rr=(0,h.K2)(function(t){hr.parseError=t},"setParseErrorHandler"),ir=[],or=!1,nr=(0,h.K2)(async()=>{if(!or){for(or=!0;ir.length>0;){const e=ir.shift();if(e)try{await e()}catch(t){h.Rm.error("Error executing queue",t)}}or=!1}},"executeQueue"),ar=(0,h.K2)(async(t,e)=>new Promise((r,i)=>{const o=(0,h.K2)(()=>new Promise((o,n)=>{Ge.parse(t,e).then(t=>{o(t),r(t)},t=>{h.Rm.error("Error parsing",t),hr.parseError?.(t),n(t),i(t)})}),"performCall");ir.push(o),nr().catch(i)}),"parse"),sr=(0,h.K2)((t,e,r)=>new Promise((i,o)=>{const n=(0,h.K2)(()=>new Promise((n,a)=>{Ge.render(t,e,r).then(t=>{n(t),i(t)},t=>{h.Rm.error("Error parsing",t),hr.parseError?.(t),a(t),o(t)})}),"performCall");ir.push(n),nr().catch(o)}),"render"),lr=(0,h.K2)(()=>Object.keys(l.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),hr={startOnLoad:!0,mermaidAPI:Ge,parse:ar,render:sr,init:Je,run:Ve,registerExternalDiagrams:tr,registerLayoutLoaders:n.sO,initialize:Qe,parseError:void 0,contentLoaded:er,setParseErrorHandler:rr,detectType:l.Ch,registerIconPacks:a.pC,getRegisteredDiagramsMetadata:lr},cr=hr}}]);