halleyx-ui-framework 11.7.80 → 11.7.81-beta.2

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 (309) hide show
  1. package/dist/assets/ColorPicker-BOnYaHEp.js +3 -0
  2. package/dist/assets/ColorPicker-rNhgOgit.css +1 -0
  3. package/dist/assets/ad-BHJIFYSO.svg +148 -0
  4. package/dist/assets/ad-DxzHjwdb.svg +150 -0
  5. package/dist/assets/af-BoK6yVn0.svg +81 -0
  6. package/dist/assets/af-DrRB8xk8.svg +81 -0
  7. package/dist/assets/apexcharts.ssr.esm-fe46cd2d-DXg5bQoL.js +957 -0
  8. package/dist/assets/arab-BXm7FCVW.svg +109 -0
  9. package/dist/assets/arab-CS5qeNay.svg +109 -0
  10. package/dist/assets/as-D0o6y06s.svg +73 -0
  11. package/dist/assets/as-y6rKV0gP.svg +72 -0
  12. package/dist/assets/aw-CsqKuH4N.svg +186 -0
  13. package/dist/assets/aw-kMcMi5Rd.svg +186 -0
  14. package/dist/assets/bm-BDce7749.svg +97 -0
  15. package/dist/assets/bm-D8pdz-bF.svg +97 -0
  16. package/dist/assets/bn-BvelTi54.svg +36 -0
  17. package/dist/assets/bn-DZvr776X.svg +36 -0
  18. package/dist/assets/bo-FFeXNqKi.svg +678 -0
  19. package/dist/assets/bo-OkRePYri.svg +676 -0
  20. package/dist/assets/br-BevDKjWV.svg +45 -0
  21. package/dist/assets/br-yD1Bsfyi.svg +45 -0
  22. package/dist/assets/bt-BMyVy5ha.svg +89 -0
  23. package/dist/assets/bt-COfv741Y.svg +89 -0
  24. package/dist/assets/by-EkqhOCLw.svg +22 -0
  25. package/dist/assets/by-oPm0zKcB.svg +20 -0
  26. package/dist/assets/bz-CBSl8sZF.svg +145 -0
  27. package/dist/assets/bz-CFTMzyr2.svg +145 -0
  28. package/dist/assets/cy-BFnWblrZ.svg +6 -0
  29. package/dist/assets/cy-CHDUy5eD.svg +6 -0
  30. package/dist/assets/dg-Bbrt9NGS.svg +130 -0
  31. package/dist/assets/dg-Cw_owxTN.svg +130 -0
  32. package/dist/assets/dm-1y7pMT9p.svg +152 -0
  33. package/dist/assets/dm-hJ6fku4A.svg +152 -0
  34. package/dist/assets/do-C7tcJbnV.svg +123 -0
  35. package/dist/assets/do-Cy0Lgjq5.svg +121 -0
  36. package/dist/assets/eac-DAycUDyA.svg +48 -0
  37. package/dist/assets/eac-DivXbRQK.svg +48 -0
  38. package/dist/assets/ec-4yhEjDNG.svg +138 -0
  39. package/dist/assets/ec-gBBifr0j.svg +138 -0
  40. package/dist/assets/eg-BS0KMoqH.svg +38 -0
  41. package/dist/assets/eg-BoRC_5b8.svg +38 -0
  42. package/dist/assets/es--B7UgIMY.svg +547 -0
  43. package/dist/assets/es-ga-BKM8aBaU.svg +187 -0
  44. package/dist/assets/es-ga-MJucOKvz.svg +187 -0
  45. package/dist/assets/es-mjGyAbGt.svg +544 -0
  46. package/dist/assets/fj-CbEDDjTX.svg +123 -0
  47. package/dist/assets/fj-DgBNKx3L.svg +120 -0
  48. package/dist/assets/fk-D9U4Vq1t.svg +90 -0
  49. package/dist/assets/fk-xSiwjKus.svg +89 -0
  50. package/dist/assets/gb-nir-BP_lLrtU.svg +131 -0
  51. package/dist/assets/gb-nir-DyBJpwiB.svg +132 -0
  52. package/dist/assets/gb-wls-C4LdH8Nd.svg +9 -0
  53. package/dist/assets/gb-wls-lLp_JivI.svg +9 -0
  54. package/dist/assets/gq-7TPEDItK.svg +23 -0
  55. package/dist/assets/gq-BbDDT8eO.svg +23 -0
  56. package/dist/assets/gs-WWyyj-hg.svg +132 -0
  57. package/dist/assets/gs-adY7nyVl.svg +133 -0
  58. package/dist/assets/gt-Bjjd1gTJ.svg +204 -0
  59. package/dist/assets/gt-Db6I__LC.svg +204 -0
  60. package/dist/assets/gu-2lXXtQYh.svg +23 -0
  61. package/dist/assets/gu-BDUIdN0d.svg +23 -0
  62. package/dist/assets/hr-DBYmCHya.svg +56 -0
  63. package/dist/assets/hr-XALXB04A.svg +58 -0
  64. package/dist/assets/ht-Bp_BB3u8.svg +116 -0
  65. package/dist/assets/ht-JlkdqIlQ.svg +116 -0
  66. package/dist/assets/im-9RhvN80y.svg +36 -0
  67. package/dist/assets/im-MV303kBE.svg +36 -0
  68. package/dist/assets/index-BzPdiFxa.css +1 -0
  69. package/dist/assets/index-CPcEfAJ0.js +10705 -0
  70. package/dist/assets/io-BZEDDIFS.svg +130 -0
  71. package/dist/assets/io-DeScwfLt.svg +130 -0
  72. package/dist/assets/ir-BhLxJNJe.svg +219 -0
  73. package/dist/assets/ir-DDmpnpmw.svg +219 -0
  74. package/dist/assets/je-CU_EWkTs.svg +45 -0
  75. package/dist/assets/je-DDrCsxDX.svg +44 -0
  76. package/dist/assets/kh-CAffWc0R.svg +61 -0
  77. package/dist/assets/kh-V4Sa3vlt.svg +61 -0
  78. package/dist/assets/ki-D8-uynS0.svg +36 -0
  79. package/dist/assets/ki-DR2enrsY.svg +36 -0
  80. package/dist/assets/ky-Dc5cfYKp.svg +103 -0
  81. package/dist/assets/ky-ededn6f9.svg +103 -0
  82. package/dist/assets/kz-Cxk6isv5.svg +36 -0
  83. package/dist/assets/kz-DumNHv_Y.svg +36 -0
  84. package/dist/assets/li-BHrKTYsl.svg +43 -0
  85. package/dist/assets/li-DSXxKHRg.svg +43 -0
  86. package/dist/assets/lk-B3k2yiKb.svg +22 -0
  87. package/dist/assets/lk-Kj0WqqQ6.svg +22 -0
  88. package/dist/assets/md-Cz-vcLfl.svg +71 -0
  89. package/dist/assets/md-HmhRr1LF.svg +70 -0
  90. package/dist/assets/me-Bh3GE2Mw.svg +116 -0
  91. package/dist/assets/me-CRPx6jfh.svg +118 -0
  92. package/dist/assets/mp-MEoT_oic.svg +86 -0
  93. package/dist/assets/mp-xeCllHrB.svg +86 -0
  94. package/dist/assets/ms-BUbG2Mvc.svg +29 -0
  95. package/dist/assets/ms-BY95aG1W.svg +25 -0
  96. package/dist/assets/mt-8i8lIqCl.svg +50 -0
  97. package/dist/assets/mt-ChlIR6D_.svg +49 -0
  98. package/dist/assets/mx-DrAOOt3a.svg +382 -0
  99. package/dist/assets/mx-OjePrkg2.svg +378 -0
  100. package/dist/assets/nf-BIinStC1.svg +9 -0
  101. package/dist/assets/nf-CV85_wcL.svg +11 -0
  102. package/dist/assets/ni-BcwXkIX4.svg +129 -0
  103. package/dist/assets/ni-CFtRs_sk.svg +129 -0
  104. package/dist/assets/om-CLlua2I8.svg +115 -0
  105. package/dist/assets/om-D76v1TyB.svg +115 -0
  106. package/dist/assets/pf-BdRIwrkd.svg +19 -0
  107. package/dist/assets/pf-TYGgZSsu.svg +18 -0
  108. package/dist/assets/pn-46QRODPu.svg +53 -0
  109. package/dist/assets/pn-ByabMDa1.svg +53 -0
  110. package/dist/assets/pt-BlLO0XSl.svg +57 -0
  111. package/dist/assets/pt-bwoXBn5v.svg +57 -0
  112. package/dist/assets/py--AwwVDGI.svg +157 -0
  113. package/dist/assets/py-Dq1HMTUZ.svg +156 -0
  114. package/dist/assets/rs-BMsKFqbR.svg +296 -0
  115. package/dist/assets/rs-CCLwLZ1i.svg +292 -0
  116. package/dist/assets/sa-BNDoOU2S.svg +25 -0
  117. package/dist/assets/sa-pYWh8z6l.svg +25 -0
  118. package/dist/assets/sh-ac-BRbPRQRT.svg +689 -0
  119. package/dist/assets/sh-ac-DZjJ4N9s.svg +690 -0
  120. package/dist/assets/sh-hl-Dv4uRr5Z.svg +164 -0
  121. package/dist/assets/sh-hl-Dz4izNFd.svg +164 -0
  122. package/dist/assets/sh-ta-CDSRtqKG.svg +76 -0
  123. package/dist/assets/sh-ta-DWHJnt-_.svg +76 -0
  124. package/dist/assets/sm-BMJzBA4m.svg +75 -0
  125. package/dist/assets/sm-ChSbRMAO.svg +73 -0
  126. package/dist/assets/sv-j9pxwqVQ.svg +594 -0
  127. package/dist/assets/sv-zWfA2gU5.svg +594 -0
  128. package/dist/assets/sx-Cums8IXB.svg +56 -0
  129. package/dist/assets/sx-DJPuB9xo.svg +56 -0
  130. package/dist/assets/sz-DoeqaoFY.svg +34 -0
  131. package/dist/assets/sz-DrJj9K7U.svg +34 -0
  132. package/dist/assets/tc-U-W42OTF.svg +50 -0
  133. package/dist/assets/tc-Vpsd8BDn.svg +50 -0
  134. package/dist/assets/tm-D_7TRZyU.svg +204 -0
  135. package/dist/assets/tm-Ewt8PkP5.svg +205 -0
  136. package/dist/assets/un-CJoUS1_J.svg +16 -0
  137. package/dist/assets/un-CXjUhQ1T.svg +16 -0
  138. package/dist/assets/va-B7h68Db-.svg +190 -0
  139. package/dist/assets/va-BwebPqpw.svg +190 -0
  140. package/dist/assets/vg-C8uhUbMv.svg +59 -0
  141. package/dist/assets/vg-DM8jOyPE.svg +59 -0
  142. package/dist/assets/vi-BT2RX-NR.svg +28 -0
  143. package/dist/assets/vi-xGWAVdGM.svg +28 -0
  144. package/dist/assets/xk-BOGoRkzZ.svg +5 -0
  145. package/dist/assets/xk-BftLirx4.svg +5 -0
  146. package/dist/assets/zm-4yqbxxr7.svg +27 -0
  147. package/dist/assets/zm-B4DXStgu.svg +27 -0
  148. package/dist/assets/zw-C1IgOuU_.svg +21 -0
  149. package/dist/assets/zw-CUCThRVS.svg +21 -0
  150. package/dist/favicon.ico +0 -0
  151. package/dist/index.html +18 -0
  152. package/package.json +1 -1
  153. package/dist/cjs/index.css +0 -1
  154. package/dist/cjs/index.js +0 -32
  155. package/dist/es/index.css +0 -1
  156. package/dist/es/index.js +0 -31
  157. package/dist/src/assets/data/countries.json +0 -47232
  158. package/dist/src/assets/icons/fonts/JosefinSans-Regular.ttf +0 -0
  159. package/dist/src/assets/icons/fonts/OpenSans.ttf +0 -0
  160. package/dist/src/assets/icons/fonts/Pacifico.ttf +0 -0
  161. package/dist/src/assets/icons/fonts/Quicksand.ttf +0 -0
  162. package/dist/src/assets/icons/fonts/magicoon-icons.eot +0 -0
  163. package/dist/src/assets/icons/fonts/magicoon-icons.svg +0 -2310
  164. package/dist/src/assets/icons/fonts/magicoon-icons.ttf +0 -0
  165. package/dist/src/assets/icons/fonts/magicoon-icons.woff +0 -0
  166. package/dist/src/assets/icons/fonts/ostrich-regular.ttf +0 -0
  167. package/dist/src/assets/icons/icon-style.css +0 -6927
  168. package/dist/src/assets/img/Group_12640.png +0 -0
  169. package/dist/src/assets/img/Halleyx-Logo-Black.png +0 -0
  170. package/dist/src/assets/img/Halleyx-Logo-Line-Dark.png +0 -0
  171. package/dist/src/assets/img/Halleyx-Logo-Line-Lite.png +0 -0
  172. package/dist/src/assets/img/Halleyx-Logo-Only.png +0 -0
  173. package/dist/src/assets/img/Halleyx-Logo-White.png +0 -0
  174. package/dist/src/assets/img/Halleyx-collage-login.svg +0 -29
  175. package/dist/src/assets/img/illustration1.png +0 -0
  176. package/dist/src/assets/img/login_collage.svg +0 -29
  177. package/dist/src/assets/img/logo.png +0 -0
  178. package/dist/src/assets/img/new_logo/logo-black.svg +0 -10
  179. package/dist/src/assets/img/new_logo/logo-large.png +0 -0
  180. package/dist/src/assets/img/new_logo/logo-large.svg +0 -3
  181. package/dist/src/assets/img/new_logo/logo-line-black-large.png +0 -0
  182. package/dist/src/assets/img/new_logo/logo-line-black-large.svg +0 -10
  183. package/dist/src/assets/img/new_logo/logo-line-black-medium.png +0 -0
  184. package/dist/src/assets/img/new_logo/logo-line-black-medium.svg +0 -10
  185. package/dist/src/assets/img/new_logo/logo-line-black-small.png +0 -0
  186. package/dist/src/assets/img/new_logo/logo-line-black-small.svg +0 -10
  187. package/dist/src/assets/img/new_logo/logo-medium.png +0 -0
  188. package/dist/src/assets/img/new_logo/logo-medium.svg +0 -3
  189. package/dist/src/assets/img/new_logo/logo-small.png +0 -0
  190. package/dist/src/assets/img/new_logo/logo-small.svg +0 -3
  191. package/dist/src/assets/img/new_logo/logo-white.svg +0 -10
  192. package/dist/src/assets/img/no_image.jpg +0 -0
  193. package/dist/src/assets/img/search3.svg +0 -11
  194. package/dist/src/assets/img/search3_active.svg +0 -11
  195. package/dist/src/assets/img/search3_hover.svg +0 -11
  196. package/dist/src/assets/img/verification-mail-sent.png +0 -0
  197. package/dist/src/assets/img/vscode-icons_file-type-pdf2.svg +0 -11
  198. package/dist/src/assets/img/vscode-icons_file-type-word.svg +0 -19
  199. package/dist/src/assets/styles/accordion.scss +0 -120
  200. package/dist/src/assets/styles/alert.scss +0 -473
  201. package/dist/src/assets/styles/badge.scss +0 -34
  202. package/dist/src/assets/styles/base.scss +0 -5
  203. package/dist/src/assets/styles/breadcrumb.scss +0 -153
  204. package/dist/src/assets/styles/buttonGroup.scss +0 -211
  205. package/dist/src/assets/styles/buttons.scss +0 -762
  206. package/dist/src/assets/styles/calendar.scss +0 -367
  207. package/dist/src/assets/styles/calendarfilter.scss +0 -114
  208. package/dist/src/assets/styles/cards.scss +0 -94
  209. package/dist/src/assets/styles/cascader.scss +0 -215
  210. package/dist/src/assets/styles/colorPicker.scss +0 -15
  211. package/dist/src/assets/styles/colorpalette.scss +0 -161
  212. package/dist/src/assets/styles/common/var.css +0 -61
  213. package/dist/src/assets/styles/common/var.css.map +0 -1
  214. package/dist/src/assets/styles/common/var.scss +0 -325
  215. package/dist/src/assets/styles/componentlayout.scss +0 -148
  216. package/dist/src/assets/styles/contextMenu.scss +0 -58
  217. package/dist/src/assets/styles/customdropdown.scss +0 -115
  218. package/dist/src/assets/styles/dashboard.scss +0 -1956
  219. package/dist/src/assets/styles/dataview.scss +0 -269
  220. package/dist/src/assets/styles/datepicker.scss +0 -411
  221. package/dist/src/assets/styles/divider.scss +0 -9
  222. package/dist/src/assets/styles/dottedPagination.scss +0 -46
  223. package/dist/src/assets/styles/draggables.scss +0 -141
  224. package/dist/src/assets/styles/drawer.scss +0 -128
  225. package/dist/src/assets/styles/errorpage.scss +0 -75
  226. package/dist/src/assets/styles/fileupload.scss +0 -332
  227. package/dist/src/assets/styles/filterandsearch.scss +0 -230
  228. package/dist/src/assets/styles/fonts/JosefinSans-Regular.ttf +0 -0
  229. package/dist/src/assets/styles/fonts/OpenSans.ttf +0 -0
  230. package/dist/src/assets/styles/fonts/Pacifico.ttf +0 -0
  231. package/dist/src/assets/styles/fonts/Quicksand.ttf +0 -0
  232. package/dist/src/assets/styles/fonts/ostrich-regular.ttf +0 -0
  233. package/dist/src/assets/styles/fonts.scss +0 -45
  234. package/dist/src/assets/styles/icon.scss +0 -1424
  235. package/dist/src/assets/styles/imagegallery.scss +0 -197
  236. package/dist/src/assets/styles/importProgress.scss +0 -48
  237. package/dist/src/assets/styles/index.scss +0 -19
  238. package/dist/src/assets/styles/inputfields.scss +0 -556
  239. package/dist/src/assets/styles/inputitems.scss +0 -554
  240. package/dist/src/assets/styles/label.scss +0 -88
  241. package/dist/src/assets/styles/loaders.scss +0 -147
  242. package/dist/src/assets/styles/mixins/_var.scss +0 -83
  243. package/dist/src/assets/styles/mixins/config.css +0 -1
  244. package/dist/src/assets/styles/mixins/config.css.map +0 -1
  245. package/dist/src/assets/styles/mixins/config.scss +0 -4
  246. package/dist/src/assets/styles/mixins/functions.css +0 -1
  247. package/dist/src/assets/styles/mixins/functions.css.map +0 -1
  248. package/dist/src/assets/styles/mixins/functions.scss +0 -36
  249. package/dist/src/assets/styles/modalwindow.scss +0 -201
  250. package/dist/src/assets/styles/newtable.scss +0 -305
  251. package/dist/src/assets/styles/objectViewer.scss +0 -195
  252. package/dist/src/assets/styles/overlay.scss +0 -15
  253. package/dist/src/assets/styles/pagination.scss +0 -244
  254. package/dist/src/assets/styles/partials.scss +0 -8
  255. package/dist/src/assets/styles/rating.scss +0 -41
  256. package/dist/src/assets/styles/scrollbar.scss +0 -15
  257. package/dist/src/assets/styles/search.scss +0 -191
  258. package/dist/src/assets/styles/select.scss +0 -1279
  259. package/dist/src/assets/styles/sidebar.scss +0 -473
  260. package/dist/src/assets/styles/signup.scss +0 -140
  261. package/dist/src/assets/styles/slideControl.scss +0 -117
  262. package/dist/src/assets/styles/source_content.scss +0 -14
  263. package/dist/src/assets/styles/speeddial.scss +0 -189
  264. package/dist/src/assets/styles/status.scss +0 -41
  265. package/dist/src/assets/styles/stepControl.scss +0 -76
  266. package/dist/src/assets/styles/style.css +0 -252
  267. package/dist/src/assets/styles/style.css.map +0 -13
  268. package/dist/src/assets/styles/switch.scss +0 -488
  269. package/dist/src/assets/styles/tablev2.scss +0 -248
  270. package/dist/src/assets/styles/tabs.scss +0 -54
  271. package/dist/src/assets/styles/tag.scss +0 -122
  272. package/dist/src/assets/styles/tagcount.scss +0 -61
  273. package/dist/src/assets/styles/texteditor.scss +0 -483
  274. package/dist/src/assets/styles/timeline.scss +0 -610
  275. package/dist/src/assets/styles/tooltip.scss +0 -154
  276. package/dist/src/assets/styles/tree.scss +0 -1050
  277. package/dist/src/assets/styles/treeSelect.scss +0 -286
  278. package/dist/src/assets/styles/variables.scss +0 -77
  279. package/dist/src/assets/styles/visualbuilder.scss +0 -509
  280. package/dist/src/assets/svg/activitylogArrow.svg +0 -3
  281. package/dist/src/assets/svg/arrow.svg +0 -3
  282. package/dist/src/assets/svg/color-palette.svg +0 -15
  283. package/dist/src/assets/svg/file.svg +0 -5
  284. package/dist/src/assets/svg/multiUpload/excel.svg +0 -20
  285. package/dist/src/assets/svg/multiUpload/jpeg.svg +0 -3
  286. package/dist/src/assets/svg/multiUpload/jpg.svg +0 -10
  287. package/dist/src/assets/svg/multiUpload/json.svg +0 -4
  288. package/dist/src/assets/svg/multiUpload/msg.svg +0 -1
  289. package/dist/src/assets/svg/multiUpload/png.svg +0 -4
  290. package/dist/src/assets/svg/multiUpload/text.svg +0 -3
  291. package/dist/src/assets/svg/multiUpload/word.svg +0 -19
  292. package/dist/src/assets/svg/pdf.svg +0 -11
  293. package/dist/src/assets/svg/search3.svg +0 -11
  294. package/dist/src/assets/svg/search3_active.svg +0 -11
  295. package/dist/src/assets/svg/search3_hover.svg +0 -11
  296. package/dist/src/assets/svg/word.svg +0 -19
  297. package/dist/umd/index.css +0 -1
  298. package/dist/umd/index.umd.js +0 -33
  299. package/dist/umd/index.umd.js.map +0 -1
  300. /package/dist/{src/assets/fonts/JosefinSans-Regular.ttf → assets/JosefinSans-Regular-TWyIlGKu.ttf} +0 -0
  301. /package/dist/{src/assets/fonts/OpenSans.ttf → assets/OpenSans-C58Z07Fu.ttf} +0 -0
  302. /package/dist/{src/assets/fonts/Pacifico.ttf → assets/Pacifico-DCsxY0Bj.ttf} +0 -0
  303. /package/dist/{src/assets/fonts/Quicksand.ttf → assets/Quicksand-B48b7_Vl.ttf} +0 -0
  304. /package/dist/{src/assets/fonts/magicoon-icons.ttf → assets/magicoon-icons-CtwZG5N0.ttf} +0 -0
  305. /package/dist/{src/assets/fonts/magicoon-icons.svg → assets/magicoon-icons-DMKsEDH_.svg} +0 -0
  306. /package/dist/{src/assets/fonts/magicoon-icons.woff → assets/magicoon-icons-DTEbJHlq.woff} +0 -0
  307. /package/dist/{src/assets/fonts/magicoon-icons.eot → assets/magicoon-icons-D_gqoiQy.eot} +0 -0
  308. /package/dist/{src/assets/fonts/ostrich-regular.ttf → assets/ostrich-regular-CfLsoGUU.ttf} +0 -0
  309. /package/dist/{src/assets/svg/multiUpload/pdf.svg → assets/pdf-Dv9HsMy3.svg} +0 -0
@@ -0,0 +1,957 @@
1
+ var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,s=(e,t)=>{for(var n in t||={})i.call(t,n)&&o(e,n,t[n]);if(r)for(var n of r(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,r)=>t(e,n(r)),l=(e,t,n)=>o(e,typeof t==`symbol`?t:t+``,n),u=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),d=class{static isSSR(){return typeof window>`u`||typeof document>`u`}static isBrowser(){return!this.isSSR()}static hasAPI(e){return this.isSSR()?!1:typeof window[e]<`u`}static getApex(){return typeof window<`u`&&window.Apex?window.Apex:typeof global<`u`&&global.Apex?global.Apex:{}}},f=class e{constructor(e,t=null){this.nodeName=e,this.namespaceURI=t,this.attributes=new Map,this.children=[],this.textContent=``,this.style={},this.classList=new p,this.parentNode=null}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return e&&e!==this&&(e.parentNode=this,this.children.push(e)),e}removeChild(e){let t=this.children.indexOf(e);return t!==-1&&(this.children.splice(t,1),e.parentNode=null),e}insertBefore(e,t){if(!t)return this.appendChild(e);let n=this.children.indexOf(t);return n!==-1&&(e.parentNode=this,this.children.splice(n,0,e)),e}cloneNode(t=!1){let n=new e(this.nodeName,this.namespaceURI);return n.textContent=this.textContent,this.attributes.forEach((e,t)=>{n.attributes.set(t,e)}),Object.assign(n.style,this.style),t&&this.children.forEach(e=>{e.cloneNode&&n.appendChild(e.cloneNode(!0))}),n}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e=``;if(this.attributes.forEach((t,n)=>{e+=` ${n}="${t}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;let t=this.children.map(e=>e.toString()).join(``);return`<${this.nodeName}${e}>${this.textContent}${t}</${this.nodeName}>`}get innerHTML(){return this.children.map(e=>e.toString()).join(``)}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}},p=class{constructor(){this.classes=new Set}add(...e){e.forEach(e=>this.classes.add(e))}remove(...e){e.forEach(e=>this.classes.delete(e))}contains(e){return this.classes.has(e)}toggle(e,t){return t===!0?(this.classes.add(e),!0):t===!1||this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(` `)}},m=class{constructor(){this.SVGNS=`http://www.w3.org/2000/svg`,this.XLINKNS=`http://www.w3.org/1999/xlink`}createElementNS(e,t){return new f(t,e)}createTextNode(e){return{nodeName:`#text`,nodeType:3,textContent:e,toString(){return this.textContent}}}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():``}}}createDOMParser(){return{parseFromString(e,t){let n=new f(`root`);return n.innerHTML=e,{documentElement:n}}}}},h=null,g=null,_=null,v=class{static init(){d.isSSR()&&!h&&(h=new m)}static createElement(e){return d.isSSR()?(h||this.init(),h.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,t){return d.isSSR()?(h||this.init(),h.createElementNS(e,t)):document.createElementNS(e,t)}static createTextNode(e){return d.isSSR()?(h||this.init(),h.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return d.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return d.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return d.isSSR()?{}:window.getComputedStyle(e)}static getBoundingClientRect(e){return d.isSSR()?(h||this.init(),h.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return d.isSSR()?(h||this.init(),g||=h.createXMLSerializer(),g):(g||=new XMLSerializer,g)}static getDOMParser(){return d.isSSR()?(h||this.init(),_||=h.createDOMParser(),_):(_||=new DOMParser,_)}static addWindowEventListener(e,t,n){d.isBrowser()&&window.addEventListener(e,t,n)}static removeWindowEventListener(e,t,n){d.isBrowser()&&window.removeEventListener(e,t,n)}static requestAnimationFrame(e){return d.isBrowser()?window.requestAnimationFrame(e):(e(),null)}static cancelAnimationFrame(e){d.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?d.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}static getWindow(){return d.isBrowser()?window:null}static getDocument(){return d.isBrowser()?document:null}static _getShim(){return h}static _resetShim(){h=null,g=null,_=null}},y=class e{static isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}static is(e,t){return Object.prototype.toString.call(t)===`[object `+e+`]`}static isSafari(){return d.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,t){let n=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(r=>{this.isObject(t[r])&&r in e?n[r]=this.extend(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}static extendArray(t,n){let r=[];return t.map(t=>{r.push(e.extend(n,t))}),t=r,t}static monthMod(e){return e%12}static clone(e,t=new WeakMap,n=!1){if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e))if(n)r=e.slice();else{r=[],t.set(e,r);for(let n=0;n<e.length;n++)r[n]=this.clone(e[n],t,!1)}else if(e instanceof Date)r=new Date(e.getTime());else if(n)r=Object.assign({},e);else{r={},t.set(e,r);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=this.clone(e[n],t,!1))}return r}static shallowClone(e){return typeof e!=`object`||!e?e:Array.isArray(e)?e.slice():Object.assign({},e)}static shallowEqual(e,t){if(e===t)return!0;if(!e||!t)return!1;if(typeof e!=`object`||typeof t!=`object`)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return 10**Math.floor(Math.log10(e))}static roundToBase(e,t){return t**+Math.floor(Math.log(e)/Math.log(t))}static parseNumber(e){return typeof e==`number`||e===null?e:parseFloat(e)}static stripNumber(e,t=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes(`e`)?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static isInShadowDOM(t){if(!t||!t.getRootNode)return!1;let n=t.getRootNode();return n&&n!==document&&e.is(`ShadowRoot`,n)}static getShadowRootHost(t){return e.isInShadowDOM(t)&&t.getRootNode().host||null}static getDimensions(e){if(!e)return[0,0];if(d.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let t=e.getRootNode&&e.getRootNode();if(t&&t!==document&&t.host){let e=t.host.getBoundingClientRect();return[e.width,e.height]}let n;try{n=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let r=e.clientHeight,i=e.clientWidth;return r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),i-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),[i,r]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(d.isSSR())return v.getBoundingClientRect(e);let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}static getLargestStringFromArr(e){return e.reduce((e,t)=>(Array.isArray(t)&&(t=t.reduce((e,t)=>e.length>t.length?e:t)),e.length>t.length?e:t),0)}static hexToRgba(e=`#999999`,t=.6){e.substring(0,1)!==`#`&&(e=`#999999`);let n=e.replace(`#`,``);n=n.match(RegExp(`(.{`+n.length/3+`})`,`g`));for(let e=0;e<n.length;e++)n[e]=parseInt(n[e].length===1?n[e]+n[e]:n[e],16);return typeof t<`u`&&n.push(t),`rgba(`+n.join(`,`)+`)`}static getOpacityFromRGBA(e){return parseFloat(e.replace(/^.*,(.+)\)/,`$1`))}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?`#`+(`0`+parseInt(e[1],10).toString(16)).slice(-2)+(`0`+parseInt(e[2],10).toString(16)).slice(-2)+(`0`+parseInt(e[3],10).toString(16)).slice(-2):``}shadeRGBColor(e,t){let n=t.split(`,`),r=e<0?0:255,i=e<0?e*-1:e,a=parseInt(n[0].slice(4),10),o=parseInt(n[1],10),s=parseInt(n[2],10);return`rgb(`+(Math.round((r-a)*i)+a)+`,`+(Math.round((r-o)*i)+o)+`,`+(Math.round((r-s)*i)+s)+`)`}shadeHexColor(e,t){let n=parseInt(t.slice(1),16),r=e<0?0:255,i=e<0?e*-1:e,a=n>>16,o=n>>8&255,s=n&255;return`#`+(16777216+(Math.round((r-a)*i)+a)*65536+(Math.round((r-o)*i)+o)*256+(Math.round((r-s)*i)+s)).toString(16).slice(1)}shadeColor(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.startsWith(`var(`)&&t.endsWith(`)`)}static getThemeColor(t){if(!e.isCSSVariable(t)||d.isSSR())return t;let n=document.createElement(`div`);n.style.cssText=`position:fixed; left: -9999px; visibility:hidden;`,n.style.color=t,document.body.appendChild(n);let r;try{r=window.getComputedStyle(n).color}finally{n.parentNode&&n.parentNode.removeChild(n)}return r}static getPolygonPos(e,t){let n=[],r=Math.PI*2/t;for(let i=0;i<t;i++){let t={};t.x=e*Math.sin(i*r),t.y=-e*Math.cos(i*r),n.push(t)}return n}static polarToCartesian(e,t,n,r){let i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}static escapeString(e,t=`x`){let n=e.toString().slice();return n=n.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,t),n}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,t,n){if(n>=e.length){let t=n-e.length+1;for(;t--;)e.push(void 0)}return e.splice(n,0,e.splice(t,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,``))}static findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}static setELstyles(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e.style.key=t[n])}static preciseAddition(e,t){let n=(String(e).split(`.`)[1]||``).length,r=(String(t).split(`.`)[1]||``).length,i=10**Math.max(n,r);return(Math.round(e*i)+Math.round(t*i))/i}static isNumber(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!=0}static isMsEdge(){if(d.isSSR())return!1;let e=window.navigator.userAgent,t=e.indexOf(`Edge/`);return t>0?parseInt(e.substring(t+5,e.indexOf(`.`,t)),10):!1}static getGCD(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));for(r>1?(e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r)):r=1;t;){let n=t;t=e%t,e=n}return e/r}static getPrimeFactors(e){let t=[],n=2;for(;e>=2;)e%n==0?(t.push(n),e/=n):n++;return t}static mod(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));return e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r),e%t/r}},b=class{constructor(e){this.w=e,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(e){return typeof e==`number`?!1:!isNaN(this.parseDate(e))}getTimeStamp(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){if(!isNaN(Date.parse(e)))return this.getTimeStamp(e);let t=Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `));return t=this.getTimeStamp(t),t}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `))}formatDate(e,t){let n=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,i=[`\0`,...n.months],a=[``,...n.shortMonths],o=[``,...n.days],s=[``,...n.shortDays];function c(e,t){let n=e+``;for(t||=2;n.length<t;)n=`0`+n;return n}let l=r?e.getUTCFullYear():e.getFullYear();t=t.replace(/(^|[^\\])yyyy+/g,`$1`+l),t=t.replace(/(^|[^\\])yy/g,`$1`+l.toString().substr(2,2)),t=t.replace(/(^|[^\\])y/g,`$1`+l);let u=(r?e.getUTCMonth():e.getMonth())+1;t=t.replace(/(^|[^\\])MMMM+/g,`$1`+i[0]),t=t.replace(/(^|[^\\])MMM/g,`$1`+a[0]),t=t.replace(/(^|[^\\])MM/g,`$1`+c(u)),t=t.replace(/(^|[^\\])M/g,`$1`+u);let d=r?e.getUTCDate():e.getDate();t=t.replace(/(^|[^\\])dddd+/g,`$1`+o[0]),t=t.replace(/(^|[^\\])ddd/g,`$1`+s[0]),t=t.replace(/(^|[^\\])dd/g,`$1`+c(d)),t=t.replace(/(^|[^\\])d/g,`$1`+d);let f=r?e.getUTCHours():e.getHours();t=t.replace(/(^|[^\\])HH+/g,`$1`+c(f)),t=t.replace(/(^|[^\\])H/g,`$1`+f);let p=f>12?f-12:f===0?12:f;t=t.replace(/(^|[^\\])hh+/g,`$1`+c(p)),t=t.replace(/(^|[^\\])h/g,`$1`+p);let m=r?e.getUTCMinutes():e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,`$1`+c(m)),t=t.replace(/(^|[^\\])m/g,`$1`+m);let h=r?e.getUTCSeconds():e.getSeconds();t=t.replace(/(^|[^\\])ss+/g,`$1`+c(h)),t=t.replace(/(^|[^\\])s/g,`$1`+h);let g=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,`$1`+c(g,3)),g=Math.round(g/10),t=t.replace(/(^|[^\\])ff/g,`$1`+c(g)),g=Math.round(g/10),t=t.replace(/(^|[^\\])f/g,`$1`+g);let _=f<12?`AM`:`PM`;t=t.replace(/(^|[^\\])TT+/g,`$1`+_),t=t.replace(/(^|[^\\])T/g,`$1`+_.charAt(0));let v=_.toLowerCase();t=t.replace(/(^|[^\\])tt+/g,`$1`+v),t=t.replace(/(^|[^\\])t/g,`$1`+v.charAt(0));let y=-e.getTimezoneOffset(),b=r||!y?`Z`:y>0?`+`:`-`;if(!r){y=Math.abs(y);let e=Math.floor(y/60),t=y%60;b+=c(e)+`:`+c(t)}t=t.replace(/(^|[^\\])K/g,`$1`+b);let x=(r?e.getUTCDay():e.getDay())+1;return t=t.replace(new RegExp(o[0],`g`),o[x]),t=t.replace(new RegExp(s[0],`g`),s[x]),t=t.replace(new RegExp(i[0],`g`),i[u]),t=t.replace(new RegExp(a[0],`g`),a[u]),t=t.replace(/\\(.)/g,`$1`),t}getTimeUnitsfromTimestamp(e,t){let n=this.w;n.config.xaxis.min!==void 0&&(e=n.config.xaxis.min),n.config.xaxis.max!==void 0&&(t=n.config.xaxis.max);let r=this.getDate(e),i=this.getDate(t),a=this.formatDate(r,`yyyy MM dd HH mm ss fff`).split(` `),o=this.formatDate(i,`yyyy MM dd HH mm ss fff`).split(` `);return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}calculcateLastDaysOfMonth(e,t,n){return this.determineDaysOfMonths(e,t)-n}determineDaysOfYear(e){let t=365;return this.isLeapYear(e)&&(t=366),t}determineRemainingDaysOfYear(e,t,n){let r=this.daysCntOfYear[t]+n;return t>1&&this.isLeapYear()&&r++,r}determineDaysOfMonths(e,t){let n=30;switch(e=y.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(n=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:n=31;break;default:n=31;break}return n}},x=class{constructor(e){this.w=e,this.tooltipKeyFormat=`dd MMM`}xLabelFormat(e,t,n,r){let i=this.w;if(i.config.xaxis.type===`datetime`&&i.config.xaxis.labels.formatter===void 0&&i.config.tooltip.x.formatter===void 0){let e=new b(this.w);return e.formatDate(e.getDate(t),i.config.tooltip.x.format)}return e(t,n,r)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(e=>e):e}defaultYFormatter(e,t){let n=this.w;if(y.isNumber(e))if(n.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat===void 0?n.globals.yValueDecimal:t.decimalsInFloat);else{let t=e.toFixed(0);e=e==t?t:e.toFixed(1)}return e}setLabelFormatters(){let e=this.w,t=e.formatters;return t.xaxisTooltipFormatter=e=>this.defaultGeneralFormatter(e),t.ttKeyFormatter=e=>this.defaultGeneralFormatter(e),t.ttZFormatter=e=>e,t.legendFormatter=e=>this.defaultGeneralFormatter(e),e.config.xaxis.labels.formatter===void 0?t.xLabelFormatter=t=>{if(y.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&e.config.xaxis.type===`numeric`){if(y.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);{let n=e.globals.maxX-e.globals.minX;return n>0&&n<100?t.toFixed(1):t.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t}:t.xLabelFormatter=e.config.xaxis.labels.formatter,typeof e.config.tooltip.x.formatter==`function`?t.ttKeyFormatter=e.config.tooltip.x.formatter:t.ttKeyFormatter=t.xLabelFormatter,typeof e.config.xaxis.tooltip.formatter==`function`&&(t.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(t.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(t.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(t.legendFormatter=e.config.legend.formatter),t.yLabelFormatters=[],e.config.yaxis.forEach((n,r)=>{n.labels.formatter===void 0?t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(e=>this.defaultYFormatter(e,n,r)):this.defaultYFormatter(t,n,r):t:t.yLabelFormatters[r]=n.labels.formatter}),e.globals}heatmapLabelFormatters(){let e=this.w;if(e.config.chart.type===`heatmap`){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();let t=e.seriesData.seriesNames.reduce((e,t)=>e.length>t.length?e:t,0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}},S=({isTimeline:e,seriesIndex:t,dataPointIndex:n,y1:r,y2:i,w:a})=>{var o;let s=a.rangeData.seriesRangeStart[t][n],c=a.rangeData.seriesRangeEnd[t][n],l=a.labelData.labels[n],u=a.config.series[t].name?a.config.series[t].name:``,d=a.formatters.ttKeyFormatter,f=a.config.tooltip.y.title.formatter,p={w:a,seriesIndex:t,dataPointIndex:n,start:s,end:c};typeof f==`function`&&(u=f(u,p)),(o=a.config.series[t].data[n])!=null&&o.x&&(l=a.config.series[t].data[n].x),e||a.config.xaxis.type===`datetime`&&(l=new x(a).xLabelFormat(a.formatters.ttKeyFormatter,l,l,{i:void 0,dateFormatter:new b(a).formatDate,w:a})),typeof d==`function`&&(l=d(l,p)),Number.isFinite(r)&&Number.isFinite(i)&&(s=r,c=i);let m=``,h=``,g=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type===`datetime`){let e=new b(a);m=e.formatDate(e.getDate(s),a.config.tooltip.x.format),h=e.formatDate(e.getDate(c),a.config.tooltip.x.format)}else m=s,h=c;else m=a.config.tooltip.x.formatter(s),h=a.config.tooltip.x.formatter(c);return{start:s,end:c,startVal:m,endVal:h,ylabel:l,color:g,seriesName:u}},C=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a,seriesIndex:o,dataPointIndex:s}=e,c=e.w.globals.tooltip.tooltipLabels.getFormatters(o);i=c.yLbFormatter(i),a=c.yLbFormatter(a);let l=c.yLbFormatter(e.w.seriesData.series[o][s]),u=``,d=`<span class="value start-value">
2
+ ${i}
3
+ </span> <span class="separator">-</span> <span class="value end-value">
4
+ ${a}
5
+ </span>`;return u=e.w.globals.comboCharts?e.w.config.series[o].type===`rangeArea`||e.w.config.series[o].type===`rangeBar`?d:`<span>${l}</span>`:d,`<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: `+t+`">`+(n||``)+`</span></div><div> <span class="category">`+r+`: </span> `+u+` </div></div>`},w=class{constructor(e){this.opts=e}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text=``,this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:`straight`},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(e){return this.hideYAxis(),y.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,t){let n=t.w.config.series[t.seriesIndex].name;return e===null?``:n+`: `+e},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:`top`,labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:`straight`}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:`center`}}},dataLabels:{style:{colors:[`#fff`]},background:{enabled:!1}},stroke:{width:0,lineCap:`square`},fill:{opacity:.85},legend:{markers:{shape:`square`}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:`between`,crosshairs:{width:`barWidth`,position:`back`,fill:{type:`gradient`},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),c(s({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:`around`,borderRadius:0,dataLabels:{position:`center`}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Open`,`High`,``,`Low`,`Close`],`candlestick`)},states:{active:{filter:{type:`none`}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:[`#24292e`]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Minimum`,`Q1`,`Median`,`Q3`,`Maximum`],`boxPlot`)},markers:{size:7,strokeWidth:1,strokeColors:`#111`},xaxis:{crosshairs:{width:1}}}}rangeBar(){let e=e=>{let{color:t,seriesName:n,ylabel:r,startVal:i,endVal:a}=S(c(s({},e),{isTimeline:!0}));return C(c(s({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))},t=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=S(e);return C(c(s({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:`square`},plotOptions:{bar:{borderRadius:0,dataLabels:{position:`center`}}},dataLabels:{enabled:!1,formatter(e,{seriesIndex:t,dataPointIndex:n,w:r}){let i=()=>{let e=r.rangeData.seriesRangeStart[t][n];return r.rangeData.seriesRangeEnd[t][n]-e};return r.globals.comboCharts?r.config.series[t].type===`rangeBar`||r.config.series[t].type===`rangeArea`?i():e:i()},background:{enabled:!1},style:{colors:[`#fff`]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom(n){return n.w.config.plotOptions&&n.w.config.plotOptions.bar&&n.w.config.plotOptions.bar.horizontal?e(n):t(n)}},xaxis:{tickPlacement:`between`,tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(e){var t,n;return(t=e.plotOptions.bar)!=null&&t.barHeight||(e.plotOptions.bar.barHeight=2),(n=e.plotOptions.bar)!=null&&n.columnWidth||(e.plotOptions.bar.columnWidth=2),e}area(){return{stroke:{width:4,fill:{type:`solid`,gradient:{inverseColors:!1,shade:`light`,type:`vertical`,opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:`gradient`,gradient:{inverseColors:!1,shade:`light`,type:`vertical`,opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){let e=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=S(e);return C(c(s({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{stroke:{curve:`straight`,width:0},fill:{type:`solid`,opacity:.6},markers:{size:0},states:{hover:{filter:{type:`none`}},active:{filter:{type:`none`}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom(t){return e(t)}}}}brush(e){return y.extend(e,{chart:{toolbar:{autoSelected:`selection`,show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;let t=e.dataLabels.formatter;return e.yaxis.forEach((t,n)=>{e.yaxis[n].min=0,e.yaxis[n].max=100}),e.chart.type===`bar`&&(e.dataLabels.formatter=t||function(e){return typeof e==`number`?e&&e.toFixed(0)+`%`:e}),e}stackedBars(){let e=this.bar();return c(s({},e),{plotOptions:c(s({},e.plotOptions),{bar:c(s({},e.plotOptions.bar),{borderRadiusApplication:`end`,borderRadiusWhenStacked:`last`})})})}convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,t){e.xaxis.type=`numeric`,e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return y.isNumber(e)?Math.floor(e):e};let n=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return t&&t.length&&(r=t.map(e=>Array.isArray(e)?e:String(e))),r&&r.length&&(e.xaxis.labels.formatter=function(e){return y.isNumber(e)?n(r[Math.floor(e)-1]):n(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||`dataPoints`,e}bubble(){return{dataLabels:{style:{colors:[`#fff`]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:`solid`,gradient:{shade:`light`,inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:[`#fff`]}},stroke:{colors:[`#fff`]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:`top`,markers:{shape:`square`}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:[`#fff`]}},stroke:{show:!0,width:2,colors:[`#fff`]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(e){return e.toFixed(1)+`%`},style:{colors:[`#fff`]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1,gradient:{shade:`light`,stops:[0,100]}},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return e.toFixed(1)+`%`},style:{colors:[`#fff`]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1,gradient:{shade:`light`,shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return e.toFixed(1)+`%`},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:`11px`}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:e=>e,style:{colors:[`#a8a8a8`],fontSize:`11px`}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:`dark`,shadeIntensity:.4,inverseColors:!1,type:`diagonal2`,opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:`right`},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(e,t,n,r,i){let a=e.candleData.seriesCandleO[t][n],o=e.candleData.seriesCandleH[t][n],s=e.candleData.seriesCandleM[t][n],c=e.candleData.seriesCandleL[t][n],l=e.candleData.seriesCandleC[t][n];return e.config.series[t].type&&e.config.series[t].type!==i?`<div class="apexcharts-custom-tooltip">
6
+ ${e.config.series[t].name?e.config.series[t].name:`series-`+(t+1)}: <strong>${e.seriesData.series[t][n]}</strong>
7
+ </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div>${r[0]}: <span class="value">`+a+`</span></div><div>${r[1]}: <span class="value">`+o+`</span></div>`+(s?`<div>${r[2]}: <span class="value">`+s+`</span></div>`:``)+`<div>${r[3]}: <span class="value">`+c+`</span></div><div>${r[4]}: <span class="value">`+l+`</span></div></div>`}},T={name:`en`,options:{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`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],toolbar:{exportToSVG:`Download SVG`,exportToPNG:`Download PNG`,exportToCSV:`Download CSV`,menu:`Menu`,selection:`Selection`,selectionZoom:`Selection Zoom`,zoomIn:`Zoom In`,zoomOut:`Zoom Out`,pan:`Panning`,reset:`Reset Zoom`}}},E=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:`11px`,fontWeight:400,fontFamily:void 0,cssClass:``},formatter:void 0},axisBorder:{show:!1,color:`#e0e0e0`,width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:`#e0e0e0`,width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:`11px`,fontWeight:900,fontFamily:void 0,cssClass:``}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:`front`,stroke:{color:`#b6b6b6`,width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:`#fff`,strokeWidth:2,strokeColor:`#333`,shape:`circle`,offsetX:0,offsetY:0,cssClass:``},label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:`100%`,yAxisIndex:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`end`,position:`right`,offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,orientation:`vertical`,position:`top`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:``,textAnchor:`start`,foreColor:void 0,fontSize:`13px`,fontFamily:void 0,fontWeight:400,appendTo:`.apexcharts-annotations`,backgroundColor:`transparent`,borderColor:`#c2c2c2`,borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:``,locales:[T],defaultLocale:`en`,dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:`#000`,opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,keyDown:void 0,keyUp:void 0},foreColor:`#373d3f`,fontFamily:`Helvetica, Arial, sans-serif`,height:`auto`,parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:`x`,fill:{color:`#24292e`,opacity:.1},stroke:{width:1,color:`#24292e`,opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:`normal`,toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:`,`,headerCategory:`category`,headerValue:`value`,categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:`zoom`},type:`line`,width:`100%`,zoom:{enabled:!0,type:`x`,autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:`#90CAF9`,opacity:.4},stroke:{color:`#0D47A1`,opacity:.4,width:1}}},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:`origin`},bar:{horizontal:!1,columnWidth:`70%`,barHeight:`70%`,distributed:!1,borderRadius:0,borderRadiusApplication:`around`,borderRadiusWhenStacked:`last`,rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:`top`,maxItems:100,hideOverflowingLabels:!0,orientation:`horizontal`,total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:`#373d3f`,fontSize:`12px`,fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:`#00B746`,downward:`#EF403C`},wick:{useFillColor:!0}},boxPlot:{colors:{upper:`#00E396`,lower:`#008FFB`}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:`scale`},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:`#000`,borderWidth:1,borderRadius:2,style:{background:`rgba(0, 0, 0, 0.6)`,color:`#fff`,fontSize:`12px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:`50%`,background:`transparent`,image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:`front`,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:`#f2f2f2`,strokeWidth:`97%`,opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(e){return e}},value:{show:!0,fontSize:`14px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+`%`}},total:{show:!1,label:`Total`,fontSize:`16px`,fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)/e.seriesData.series.length+`%`}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:`16px`,formatter(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:`65%`,background:`transparent`,labels:{show:!1,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(e){return e}},value:{show:!0,fontSize:`20px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:`Total`,fontSize:`16px`,fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:`#e8e8e8`},spokes:{strokeWidth:1,connectorColors:`#e8e8e8`}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:`#e8e8e8`,connectorColors:`#e8e8e8`,fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(e){return e===null?``:e},textAnchor:`middle`,distributed:!1,offsetX:0,offsetY:0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:`#fff`,backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:`#fff`,dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8}},fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:`squares`,width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:`#e0e0e0`,strokeDashArray:0,position:`back`,xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:`bottom`,horizontalAlign:`center`,inverseOrder:!1,fontSize:`12px`,fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:`vertical`,labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:`#fff`,strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:`circle`,offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:`center`,verticalAlign:`middle`,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`14px`,fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:`lighten`}},active:{allowMultipleDataPointsSelection:!1,filter:{type:`darken`}}},title:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:`14px`,fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:`12px`,fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:`smooth`,lineCap:`butt`,width:2,colors:void 0,dashArray:0,fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:`light`,cssClass:``,style:{fontSize:`12px`,fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:`dd MMM`,formatter:void 0},y:{formatter:void 0,title:{formatter(e){return e?e+`: `:``}}},z:{formatter:void 0,title:`Size: `},marker:{show:!0,fillColors:void 0},items:{display:`flex`},fixed:{enabled:!1,position:`topRight`,offsetX:0,offsetY:0}},xaxis:{type:`category`,categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:`yyyy`,month:`MMM 'yy`,day:`dd MMM`,hour:`HH:mm`,minute:`HH:mm:ss`,second:`HH:mm:ss`}},group:{groups:[],style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``}},axisBorder:{show:!0,color:`#e0e0e0`,width:`100%`,height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:`#e0e0e0`,height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:`on`,min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:`bottom`,title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`12px`,fontWeight:900,fontFamily:void 0,cssClass:``}},crosshairs:{show:!0,width:1,position:`back`,opacity:.9,stroke:{color:`#b6b6b6`,width:1,dashArray:3},fill:{type:`solid`,color:`#B1B9C4`,gradient:{colorFrom:`#D8E3F0`,colorTo:`#BED1E6`,stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:``,palette:`palette1`,monochrome:{enabled:!1,color:`#008FFB`,shadeTo:`light`,shadeIntensity:.65},accessibility:{colorBlindMode:``}}}}},D=class{constructor(e){this.opts=e}init({responsiveOverride:e}){var t,n,r,i,a,o;let s=this.opts,c=new E,l=new w(s);this.chartType=s.chart.type,s=this.extendYAxis(s),s=this.extendAnnotations(s);let u=c.init(),f={};if(s&&typeof s==`object`){let c={};c=[`line`,`area`,`bar`,`candlestick`,`boxPlot`,`rangeBar`,`rangeArea`,`bubble`,`scatter`,`heatmap`,`treemap`,`pie`,`polarArea`,`donut`,`radar`,`radialBar`].indexOf(s.chart.type)===-1?l.line():l[s.chart.type](),(t=s.plotOptions?.bar)!=null&&t.isFunnel&&(c=l.funnel()),s.chart.stacked&&s.chart.type===`bar`&&(c=l.stackedBars()),(n=s.chart.brush)!=null&&n.enabled&&(c=l.brush(c)),(r=s.plotOptions?.line)!=null&&r.isSlopeChart&&(c=l.slope()),s.chart.stacked&&s.chart.stackType===`100%`&&(s=l.stacked100(s)),(i=s.plotOptions?.bar)!=null&&i.isDumbbell&&(s=l.dumbbell(s)),this.checkForDarkTheme(d.getApex()),this.checkForDarkTheme(s),s.xaxis=s.xaxis||d.getApex().xaxis||{},e||(s.xaxis.convertedCatToNumeric=!1),s=this.checkForCatToNumericXAxis(this.chartType,c,s),((a=s.chart.sparkline)!=null&&a.enabled||(o=d.getApex().chart?.sparkline)!=null&&o.enabled)&&(c=l.sparkline(c)),f=y.extend(u,c)}let p=y.extend(f,d.getApex());return u=y.extend(p,s),u=this.handleUserInputErrors(u),u}checkForCatToNumericXAxis(e,t,n){let r=new w(n),i=(e===`bar`||e===`boxPlot`)&&n.plotOptions?.bar?.horizontal,a=e===`pie`||e===`polarArea`||e===`donut`||e===`radar`||e===`radialBar`||e===`heatmap`,o=n.xaxis.type!==`datetime`&&n.xaxis.type!==`numeric`,s=n.xaxis.tickPlacement?n.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return!i&&!a&&o&&s!==`between`&&(n=r.convertCatToNumeric(n)),n}extendYAxis(e,t){let n=new E;(typeof e.yaxis>`u`||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});let r=d.getApex();e.yaxis.constructor!==Array&&r.yaxis&&r.yaxis.constructor!==Array&&(e.yaxis=y.extend(e.yaxis,r.yaxis)),e.yaxis.constructor===Array?e.yaxis=y.extendArray(e.yaxis,n.yAxis):e.yaxis=[y.extend(n.yAxis,e.yaxis)];let i=!1;e.yaxis.forEach(e=>{e.logarithmic&&(i=!0)});let a=e.series;return t&&!a&&(a=t.config.series),i&&a.length!==e.yaxis.length&&a.length&&(e.yaxis=a.map((t,r)=>{if(t.name||(a[r].name=`series-${r+1}`),e.yaxis[r])return e.yaxis[r].seriesName=a[r].name,e.yaxis[r];{let t=y.extend(n.yAxis,e.yaxis[0]);return t.show=!1,t}})),i&&a.length>1&&a.length!==e.yaxis.length&&console.warn(`A multi-series logarithmic chart should have equal number of series and y-axes`),e}extendAnnotations(e){return typeof e.annotations>`u`&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){let t=new E;return e.annotations.yaxis=y.extendArray(typeof e.annotations.yaxis<`u`?e.annotations.yaxis:[],t.yAxisAnnotation),e}extendXAxisAnnotations(e){let t=new E;return e.annotations.xaxis=y.extendArray(typeof e.annotations.xaxis<`u`?e.annotations.xaxis:[],t.xAxisAnnotation),e}extendPointAnnotations(e){let t=new E;return e.annotations.points=y.extendArray(typeof e.annotations.points<`u`?e.annotations.points:[],t.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode===`dark`&&(e.tooltip||={},e.tooltip.theme!==`light`&&(e.tooltip.theme=`dark`),e.chart.foreColor||(e.chart.foreColor=`#f6f7f8`),e.theme.palette||(e.theme.palette=`palette4`))}handleUserInputErrors(e){let t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw Error(`tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.`);if(t.chart.type===`bar`&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw Error(`Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false`);t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return(t.chart.type===`bar`||t.chart.type===`rangeBar`)&&t.tooltip.shared&&t.xaxis.crosshairs.width===`barWidth`&&t.series.length>1&&(t.xaxis.crosshairs.width=`tickWidth`),(t.chart.type===`candlestick`||t.chart.type===`boxPlot`)&&t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),t}},O=1.618,k=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],A=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],j=class{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){let t=(t,n,r=n)=>{Object.defineProperty(t,r,{get(){return e[n]},set(t){e[n]=t},enumerable:!0,configurable:!0})},n={};t(n,`series`,`data`);for(let e of`seriesNames.seriesX.seriesZ.seriesXvalues.seriesYvalues.seriesGoals.seriesLog.seriesColors.seriesPercent.seriesTotals.stackedSeriesTotals.seriesCandleO.seriesCandleH.seriesCandleM.seriesCandleL.seriesCandleC.seriesRangeStart.seriesRangeEnd.seriesRange.seriesYAxisMap.seriesYAxisReverseMap.seriesGroups.barGroups.lineGroups.areaGroups.originalSeries.collapsedSeries.collapsedSeriesIndices.ancillaryCollapsedSeries.ancillaryCollapsedSeriesIndices.allSeriesCollapsed.risingSeries.previousPaths.ignoreYAxisIndexes.labels.categoryLabels.timescaleLabels.groups`.split(`.`))t(n,e);Object.defineProperty(e,`seriesNS`,{value:n,writable:!1,enumerable:!1,configurable:!0});let r={};for(let e of`minX.maxX.initialMinX.initialMaxX.minY.maxY.minYArr.maxYArr.minZ.maxZ.minDate.maxDate.minXDiff.xRange.yRange.zRange.xAxisScale.yAxisScale.xAxisTicksPositions.xTickAmount.multiAxisTickAmount.dataPoints.maxValsInArrayIndex.isXNumeric.isMultipleYAxis.isMultiLineX.isDataXYZ.dataFormatXNumeric.allSeriesHasEqualX.hasNullValues.dataWasParsed.hasXaxisGroups.hasSeriesGroups.skipFirstTimelinelabel.skipLastTimelinelabel.yValueDecimal.invalidLogScale.noLabelsProvided`.split(`.`))t(r,e);Object.defineProperty(e,`axes`,{value:r,writable:!1,enumerable:!1,configurable:!0});let i={};for(let e of[`svgWidth`,`svgHeight`,`gridWidth`,`gridHeight`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`translateYAxisX`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yAxisLabelsWidth`,`yAxisWidths`,`yLabelsCoords`,`yTitleCoords`,`padHorizontal`,`barPadForNumericAxis`,`rotateXLabels`,`scaleX`,`scaleY`,`radialSize`,`defaultLabels`,`overlappingXLabels`])t(i,e);Object.defineProperty(e,`layout`,{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let e of[`domCache`,`dimensionCache`,`cachedSelectors`,`textRectsCache`,`pointsArray`,`dataLabelsRects`,`lastDrawnDataLabelsIndexes`,`delayedElements`,`resizeTimer`,`selectionResizeTimer`,`resizeObserver`])t(a,e);Object.defineProperty(e,`cache`,{value:a,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},LINE_HEIGHT_RATIO:O,axisCharts:!0,isSlopeChart:e.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,invalidLogScale:!1,hasNullValues:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:k,niceScaleDefaultTicks:A,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(e){let t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=y.extend({},e),t.initialSeries=y.clone(e.series),t.lastXAxis=y.clone(t.initialConfig.xaxis),t.lastYAxis=y.clone(t.initialConfig.yaxis),t}},M=class{constructor(e){this.opts=e}init(){let e=new D(this.opts).init({responsiveOverride:!1}),t=new j().init(e),n={config:e,globals:t,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected===`zoom`&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected===`pan`&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected===`selection`&&e.chart.toolbar.tools.selection,zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},lastWheelExecution:0,capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:d.isBrowser()?`ontouchstart`in window||navigator.msMaxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[]}};Object.defineProperty(t,`dom`,{get(){return n.dom},set(e){n.dom=e},enumerable:!1,configurable:!0});for(let e of[`xLabelFormatter`,`yLabelFormatters`,`xaxisTooltipFormatter`,`ttKeyFormatter`,`ttVal`,`ttZFormatter`,`legendFormatter`])Object.defineProperty(t,e,{get(){return n.formatters[e]},set(t){n.formatters[e]=t},enumerable:!1,configurable:!0});for(let e of[`zoomEnabled`,`panEnabled`,`selectionEnabled`,`zoomed`,`selection`,`visibleXRange`,`selectedDataPoints`,`mousedown`,`clientX`,`clientY`,`lastClientPosition`,`lastWheelExecution`,`capturedSeriesIndex`,`capturedDataPointIndex`,`disableZoomIn`,`disableZoomOut`,`isTouchDevice`])Object.defineProperty(t,e,{get(){return n.interact[e]},set(t){n.interact[e]=t},enumerable:!1,configurable:!0});for(let e of[`gridHeight`,`gridWidth`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`rotateXLabels`,`xAxisHeight`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yLabelsCoords`,`yTitleCoords`])Object.defineProperty(t,e,{get(){return n.layout[e]},set(t){n.layout[e]=t},enumerable:!1,configurable:!0});for(let e of[`series`,`seriesNames`,`seriesX`,`seriesZ`,`seriesColors`,`seriesGoals`,`stackedSeriesTotals`,`stackedSeriesTotalsByGroups`])Object.defineProperty(t,e,{get(){return n.seriesData[e]},set(t){n.seriesData[e]=t},enumerable:!1,configurable:!0});for(let e of[`isXNumeric`,`dataFormatXNumeric`,`isDataXYZ`,`isRangeData`,`isRangeBar`,`isMultiLineX`,`noLabelsProvided`,`dataWasParsed`])Object.defineProperty(t,e,{get(){return n.axisFlags[e]},set(t){n.axisFlags[e]=t},enumerable:!1,configurable:!0});for(let e of[`labels`,`categoryLabels`,`timescaleLabels`,`hasXaxisGroups`,`groups`,`seriesGroups`])Object.defineProperty(t,e,{get(){return n.labelData[e]},set(t){n.labelData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesRangeStart`,`seriesRangeEnd`,`seriesRange`])Object.defineProperty(t,e,{get(){return n.rangeData[e]},set(t){n.rangeData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesCandleO`,`seriesCandleH`,`seriesCandleM`,`seriesCandleL`,`seriesCandleC`])Object.defineProperty(t,e,{get(){return n.candleData[e]},set(t){n.candleData[e]=t},enumerable:!1,configurable:!0});return n}},N=class{constructor(e){this.w=e}static checkComboSeries(e,t){let n=!1,r=0,i=0;return t===void 0&&(t=`line`),e.length&&typeof e[0].type<`u`&&e.forEach(e=>{(e.type===`bar`||e.type===`column`||e.type===`candlestick`||e.type===`boxPlot`)&&r++,typeof e.type<`u`&&e.type!==t&&i++}),i>0&&(n=!0),{comboBarCount:r,comboCharts:n}}getStackedSeriesTotals(e=[]){let t=this.w,n=[];if(t.seriesData.series.length===0)return n;for(let r=0;r<t.seriesData.series[t.globals.maxValsInArrayIndex].length;r++){let i=0;for(let n=0;n<t.seriesData.series.length;n++)typeof t.seriesData.series[n][r]<`u`&&e.indexOf(n)===-1&&(i+=t.seriesData.series[n][r]);n.push(i)}return n}getSeriesTotalByIndex(e=null){return e===null?this.w.config.series.reduce((e,t)=>e+t,0):this.w.seriesData.series[e].reduce((e,t)=>e+t,0)}getStackedSeriesTotalsByGroups(){let e=this.w,t=[];return e.labelData.seriesGroups.forEach(n=>{let r=[];e.config.series.forEach((t,i)=>{n.indexOf(e.seriesData.seriesNames[i])>-1&&r.push(i)});let i=e.seriesData.series.map((e,t)=>r.indexOf(t)===-1?t:-1).filter(e=>e!==-1);t.push(this.getStackedSeriesTotals(i))}),t}setSeriesYAxisMappings(){let e=this.w.globals,t=this.w.config,n=[],r=[],i=[],a=this.w.seriesData.series.length>t.yaxis.length||t.yaxis.some(e=>Array.isArray(e.seriesName));t.series.forEach((e,t)=>{i.push(t),r.push(null)}),t.yaxis.forEach((e,t)=>{n[t]=[]});let o=[];t.yaxis.forEach((e,r)=>{let s=!1;if(e.seriesName){let o=[];Array.isArray(e.seriesName)?o=e.seriesName:o.push(e.seriesName),o.forEach(e=>{t.series.forEach((t,o)=>{if(t.name===e){let e=o;r===o||a?!a||i.indexOf(o)>-1?n[r].push([r,o]):console.warn(`Series '`+t.name+`' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.`):(n[o].push([o,r]),e=r),s=!0,e=i.indexOf(e),e!==-1&&i.splice(e,1)}})})}s||o.push(r)}),n=n.map(e=>{let t=[];return e.forEach(e=>{r[e[1]]=e[0],t.push(e[1])}),t});let s=t.yaxis.length-1;for(let e=0;e<o.length&&(s=o[e],n[s]=[],i);e++){let e=i[0];i.shift(),n[s].push(e),r[e]=s}i.forEach(e=>{n[s].push(e),r[e]=s}),e.seriesYAxisMap=n.map(e=>e),e.seriesYAxisReverseMap=r.map(e=>e),e.seriesYAxisMap.forEach((e,n)=>{e.forEach(e=>{t.series[e]&&t.series[e].group===void 0&&(t.series[e].group=`apexcharts-axis-${n.toString()}`)})})}isSeriesNull(e=null){let t=[];return t=e===null?this.w.config.series.filter(e=>e!==null):this.w.config.series[e].data.filter(e=>e!==null),t.length===0}seriesHaveSameValues(e){return this.w.seriesData.series[e].every((e,t,n)=>e===n[0])}getCategoryLabels(e){let t=this.w,n=e.slice();return t.config.xaxis.convertedCatToNumeric&&(n=e.map(e=>t.config.xaxis.labels.formatter(e-t.globals.minX+1))),n}getLargestSeries(){let e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let e=this.w,t=0;return e.globals.markers.size.forEach(e=>{t=Math.max(t,e)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(e=>{t=Math.max(t,e.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}getSeriesTotals(){let e=this.w;e.globals.seriesTotals=e.seriesData.series.map(e=>{let t=0;if(Array.isArray(e))for(let n=0;n<e.length;n++)t+=e[n];else t+=e;return t})}getSeriesTotalsXRange(e,t){let n=this.w;return n.seriesData.series.map((r,i)=>{let a=0;for(let o=0;o<r.length;o++)n.seriesData.seriesX[i][o]>e&&n.seriesData.seriesX[i][o]<t&&(a+=r[o]);return a})}getPercentSeries(){let e=this.w;e.globals.seriesPercent=e.seriesData.series.map(t=>{let n=[];if(Array.isArray(t))for(let r=0;r<t.length;r++){let i=e.seriesData.stackedSeriesTotals[r],a=0;i&&(a=100*t[r]/i),n.push(a)}else{let r=e.globals.seriesTotals.reduce((e,t)=>e+t,0),i=100*t/r;n.push(i)}return n})}getCalculatedRatios(){let e=this.w,t=e.globals,n=[],r=0,i=0,a=0,o=0,s=[],c=.1,l=0;if(t.yRange=[],t.isMultipleYAxis)for(let e=0;e<t.minYArr.length;e++)t.yRange.push(Math.abs(t.minYArr[e]-t.maxYArr[e])),s.push(0);else t.yRange.push(Math.abs(t.minY-t.maxY));t.xRange=Math.abs(t.maxX-t.minX),t.zRange=Math.abs(t.maxZ-t.minZ);for(let e=0;e<t.yRange.length;e++)n.push(t.yRange[e]/this.w.layout.gridHeight);if(i=t.xRange/this.w.layout.gridWidth,r=t.yRange/this.w.layout.gridWidth,a=t.xRange/this.w.layout.gridHeight,o=t.zRange/this.w.layout.gridHeight*16,o||=1,t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(t.hasNegs=!0),e.globals.seriesYAxisReverseMap.length>0){let a=(t,r)=>{let i=e.config.yaxis[e.globals.seriesYAxisReverseMap[r]],a=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=this.getBaseLog(i.logBase,t)),-a*t/n[r]};if(t.isMultipleYAxis){s=[];for(let e=0;e<n.length;e++)s.push(a(t.minYArr[e],e))}else s=[],s.push(a(t.minY,0)),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(c=-t.minY/r,l=t.minX/i)}else s=[],s.push(0),c=0,l=0;return{yRatio:n,invertedYRatio:r,zRatio:o,xRatio:i,invertedXRatio:a,baseLineInvertedY:c,baseLineY:s,baseLineX:l}}getLogSeries(e){let t=this.w;return t.globals.seriesLog=e.map((e,n)=>{let r=t.globals.seriesYAxisReverseMap[n];return t.config.yaxis[r]&&t.config.yaxis[r].logarithmic?e.map(e=>e===null?null:this.getLogVal(t.config.yaxis[r].logBase,e,n)):e}),t.globals.invalidLogScale?e:t.globals.seriesLog}getLogValAtSeriesIndex(e,t){if(e===null)return null;let n=this.w,r=n.globals.seriesYAxisReverseMap[t];return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?this.getLogVal(n.config.yaxis[r].logBase,e,t):e}getBaseLog(e,t){return Math.log(t)/Math.log(e)}getLogVal(e,t,n){if(t<=0)return 0;let r=this.w,i=r.globals.minYArr[n]===0?-1:this.getBaseLog(e,r.globals.minYArr[n]),a=(r.globals.maxYArr[n]===0?0:this.getBaseLog(e,r.globals.maxYArr[n]))-i;return t<1?t/a:(this.getBaseLog(e,t)-i)/a}getLogYRatios(e){let t=this.w,n=this.w.globals;return n.yLogRatio=e.slice(),n.logYRange=n.yRange.map((e,r)=>{let i=t.globals.seriesYAxisReverseMap[r];if(t.config.yaxis[i]&&this.w.config.yaxis[i].logarithmic){let e=-Number.MAX_VALUE,i=Number.MIN_VALUE,a=1;return n.seriesLog.forEach((n,r)=>{n.forEach(n=>{t.config.yaxis[r]&&t.config.yaxis[r].logarithmic&&(e=Math.max(n,e),i=Math.min(n,i))})}),a=n.yRange[r]**+(Math.abs(i-e)/n.yRange[r]),n.yLogRatio[r]=a/this.w.layout.gridHeight,a}}),n.invalidLogScale?e.slice():n.yLogRatio}static extendArrayProps(e,t,n){var r,i;return t!=null&&t.yaxis&&(t=e.extendYAxis(t,n)),t!=null&&t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),(r=t?.annotations)!=null&&r.xaxis&&(t=e.extendXAxisAnnotations(t)),(i=t?.annotations)!=null&&i.points&&(t=e.extendPointAnnotations(t))),t}drawSeriesByGroup(e,t,n,r){let i=this.w,a=[];return e.series.length>0&&t.forEach(t=>{let o=[],s=[];e.i.forEach((n,r)=>{i.config.series[n].group===t&&(o.push(e.series[r]),s.push(n))}),o.length>0&&a.push(r.draw(o,n,s))}),a}},P=class{constructor(e,t){this.w=e,this.ctx=t}animateLine(e,t,n,r){e.attr(t).animate(r).attr(n)}animateMarker(e,t,n,r){e.attr({opacity:0}).animate(t).attr({opacity:1}).after(()=>{r()})}animateRect(e,t,n,r,i){e.attr(t).animate(r).attr(n).after(()=>i())}animatePathsGradually(e){let{el:t,realIndex:n,j:r,fill:i,pathFrom:a,pathTo:o,speed:s,delay:c}=e,l=this,u=this.w,d=0;u.config.chart.animations.animateGradually.enabled&&(d=u.config.chart.animations.animateGradually.delay),u.config.chart.animations.dynamicAnimation.enabled&&u.globals.dataChanged&&u.config.chart.type!==`bar`&&(d=0),l.morphSVG(t,n,r,u.config.chart.type===`line`&&!u.globals.comboCharts?`stroke`:i,a,o,s,c*d)}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{let t=e.el;t.classList.remove(`apexcharts-element-hidden`),t.classList.add(`apexcharts-hidden-element-shown`)})}animationCompleted(e){let t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd==`function`&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}morphSVG(e,t,n,r,i,a,o,s){let c=this.w;i||=e.attr(`pathFrom`),a||=e.attr(`pathTo`);let l=()=>(c.config.chart.type===`radar`&&(o=1),`M 0 ${c.layout.gridHeight}`);(!i||i.indexOf(`undefined`)>-1||i.indexOf(`NaN`)>-1)&&(i=l()),(!a.trim()||a.indexOf(`undefined`)>-1||a.indexOf(`NaN`)>-1)&&(a=l()),c.globals.shouldAnimate||(o=1),e.plot(i).animate(1,s).plot(i).animate(o,s).plot(a).after(()=>{y.isNumber(n)?n===c.seriesData.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&this.animationCompleted(e):r!==`none`&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.seriesData.series.length-1||c.globals.comboCharts)&&this.animationCompleted(e),this.showDelayedElements()})}},F=class{constructor(e){this.w=e}getDefaultFilter(e,t){let n=this.w;e.unfilter&&e.unfilter(!0),n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,t)}applyFilter(e,t,n){var r;let i=this.w;if(e.unfilter&&e.unfilter(!0),n===`none`){this.getDefaultFilter(e,t);return}let a=i.config.chart.dropShadow,o=n===`lighten`?2:.3;e.filterWith&&(e.filterWith(e=>{e.colorMatrix({type:`matrix`,values:`
8
+ ${o} 0 0 0 0
9
+ 0 ${o} 0 0 0
10
+ 0 0 ${o} 0 0
11
+ 0 0 0 1 0
12
+ `,in:`SourceGraphic`,result:`brightness`}),a.enabled&&this.addShadow(e,t,a,`brightness`)}),a.noUserSpaceOnUse||(r=e.filterer()?.node)==null||r.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node))}addShadow(e,t,n,r){let i=this.w,{blur:a,top:o,left:s,color:c,opacity:l}=n;if(c=Array.isArray(c)?c[t]:c,i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:r,dx:s,dy:o,result:`offset`}),e.gaussianBlur({in:`offset`,stdDeviation:a,result:`blur`}),e.flood({"flood-color":c,"flood-opacity":l,result:`flood`}),e.composite({in:`flood`,in2:`blur`,operator:`in`,result:`shadow`}),e.merge([`shadow`,r])}dropShadow(e,t,n=0){var r;let i=this.w;return e.unfilter&&e.unfilter(!0),y.isMsEdge()&&i.config.chart.type===`radialBar`||i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries?.indexOf(n)===-1||e.filterWith&&(e.filterWith(e=>{this.addShadow(e,n,t,`SourceGraphic`)}),t.noUserSpaceOnUse||(r=e.filterer()?.node)==null||r.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node)),e}setSelectionFilter(e,t,n){let r=this.w;if(typeof r.interact.selectedDataPoints[t]<`u`&&r.interact.selectedDataPoints[t].indexOf(n)>-1){e.node.setAttribute(`selected`,!0);let n=r.config.states.active.filter;n!==`none`&&this.applyFilter(e,t,n.type)}}_scaleFilterSize(e){e&&(t=>{for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])})({width:`200%`,height:`200%`,x:`-50%`,y:`-50%`})}},I=class e{constructor(e,t=null){this.w=e,this.ctx=t}roundPathCorners(e,t){e.indexOf(`NaN`)>-1&&(e=``);function n(e,t,n){var i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a);return r(e,t,Math.min(1,n/o))}function r(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var o=e.split(/[,\s]/).reduce(function(e,t){var n=t.match(/^([a-zA-Z])(.+)/);return n?(e.push(n[1]),e.push(n[2])):e.push(t),e},[]).reduce(function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e},[]),s=[];if(o.length>1){var c=a(o[0]),l=null;o[o.length-1][0]==`Z`&&o[0].length>2&&(l=[`L`,c.x,c.y],o[o.length-1]=l),s.push(o[0]);for(var u=1;u<o.length;u++){var d=s[s.length-1],f=o[u],p=f==l?o[1]:o[u+1];if(p&&d&&d.length>2&&f[0]==`L`&&p.length>2&&p[0]==`L`){var m=a(d),h=a(f),g=a(p),_=n(h,m,t),v=n(h,g,t);i(f,_),f.origPoint=h,s.push(f);var y=r(_,h,.5),b=r(h,v,.5),x=[`C`,y.x,y.y,b.x,b.y,v.x,v.y];x.origPoint=h,s.push(x)}else s.push(f)}if(l){var S=a(s[s.length-1]);s.push([`Z`]),i(s[0],S)}}else s=o;return s.reduce(function(e,t){return e+t.join(` `)+` `},``)}drawLine(e,t,n,r,i=`#a8a8a8`,a=0,o=null,s=`butt`){return this.w.dom.Paper.line().attr({x1:e,y1:t,x2:n,y2:r,stroke:i,"stroke-dasharray":a,"stroke-width":o,"stroke-linecap":s})}drawRect(e=0,t=0,n=0,r=0,i=0,a=`#fefefe`,o=1,s=null,c=null,l=0){let u=this.w.dom.Paper.rect();return u.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,rx:i,ry:i,opacity:o,"stroke-width":s===null?0:s,stroke:c===null?`none`:c,"stroke-dasharray":l}),u.node.setAttribute(`fill`,a),u}drawPolygon(e,t=`#e1e1e1`,n=1,r=`none`){return this.w.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":n})}drawCircle(e,t=null){let n=this.w;e<0&&(e=0);let r=n.dom.Paper.circle(e*2);return t!==null&&r.attr(t),r}drawPath({d:e=``,stroke:t=`#a8a8a8`,strokeWidth:n=1,fill:r,fillOpacity:i=1,strokeOpacity:a=1,classes:o,strokeLinecap:s=null,strokeDashArray:c=0}){let l=this.w;return s===null&&(s=l.config.stroke.lineCap),(e.indexOf(`undefined`)>-1||e.indexOf(`NaN`)>-1)&&(e=`M 0 ${l.layout.gridHeight}`),l.dom.Paper.path(e).attr({fill:r,"fill-opacity":i,stroke:t,"stroke-opacity":a,"stroke-linecap":s,"stroke-width":n,"stroke-dasharray":c,class:o})}group(e=null){let t=this.w.dom.Paper.group();return e!==null&&t.attr(e),t}move(e,t){return[`M`,e,t].join(` `)}line(e,t,n=null){let r=null;return n===null?r=[` L`,e,t].join(` `):n===`H`?r=[` H`,e].join(` `):n===`V`&&(r=[` V`,t].join(` `)),r}curve(e,t,n,r,i,a){return[`C`,e,t,n,r,i,a].join(` `)}quadraticCurve(e,t,n,r){return[`Q`,e,t,n,r].join(` `)}arc(e,t,n,r,i,a,o,s=!1){let c=`A`;return s&&(c=`a`),[c,e,t,n,r,i,a,o].join(` `)}renderPaths({j:e,realIndex:t,pathFrom:n,pathTo:r,stroke:i,strokeWidth:a,strokeLinecap:o,fill:l,animationDelay:u,initialSpeed:d,dataChangeSpeed:f,className:p,chartType:m,shouldClipToGrid:h=!0,bindEventsOnPaths:g=!0,drawShadow:_=!0}){let v=this.w,y=new F(this.w),b=new P(this.w),x=this.w.config.chart.animations.enabled,S=x&&this.w.config.chart.animations.dynamicAnimation.enabled;if(n&&n.startsWith(`M 0 0`)&&r){let e=r.match(/^M\s+[\d.-]+\s+[\d.-]+/);e&&(n=n.replace(/^M\s+0\s+0/,e[0]))}let C,w=!!(x&&!v.globals.resized||S&&v.globals.dataChanged&&v.globals.shouldAnimate);w?C=n:(C=r,v.globals.animationEnded=!0);let T=v.config.stroke.dashArray,E=0;E=Array.isArray(T)?T[t]:v.config.stroke.dashArray;let D=this.drawPath({d:C,stroke:i,strokeWidth:a,fill:l,fillOpacity:1,classes:p,strokeLinecap:o,strokeDashArray:E});D.attr(`index`,t),h&&(m===`bar`&&!v.globals.isHorizontal||v.globals.comboCharts?D.attr({"clip-path":`url(#gridRectBarMask${v.globals.cuid})`}):D.attr({"clip-path":`url(#gridRectMask${v.globals.cuid})`})),v.config.chart.dropShadow.enabled&&_&&y.dropShadow(D,v.config.chart.dropShadow,t),g&&(D.node.addEventListener(`mouseenter`,this.pathMouseEnter.bind(this,D)),D.node.addEventListener(`mouseleave`,this.pathMouseLeave.bind(this,D)),D.node.addEventListener(`mousedown`,this.pathMouseDown.bind(this,D))),D.attr({pathTo:r,pathFrom:n});let O={el:D,j:e,realIndex:t,pathFrom:n,pathTo:r,fill:l,strokeWidth:a,delay:u};return x&&!v.globals.resized&&!v.globals.dataChanged?b.animatePathsGradually(c(s({},O),{speed:d})):(v.globals.resized||!v.globals.dataChanged)&&b.showDelayedElements(),v.globals.dataChanged&&S&&w&&b.animatePathsGradually(c(s({},O),{speed:f})),D}drawPattern(e,t,n,r=`#a8a8a8`,i=0){return this.w.dom.Paper.pattern(t,n,a=>{e===`horizontalLines`?a.line(0,0,n,0).stroke({color:r,width:i+1}):e===`verticalLines`?a.line(0,0,0,t).stroke({color:r,width:i+1}):e===`slantedLines`?a.line(0,0,t,n).stroke({color:r,width:i}):e===`squares`?a.rect(t,n).fill(`none`).stroke({color:r,width:i}):e===`circles`&&a.circle(t).fill(`none`).stroke({color:r,width:i})})}drawGradient(e,t,n,r,i,a=null,o=null,s=[],c=0){let l=this.w,u;t.length<9&&t.indexOf(`#`)===0&&(t=y.hexToRgba(t,r)),n.length<9&&n.indexOf(`#`)===0&&(n=y.hexToRgba(n,i));let d=0,f=1,p=1,m=null;o!==null&&(d=typeof o[0]<`u`?o[0]/100:0,f=typeof o[1]<`u`?o[1]/100:1,p=typeof o[2]<`u`?o[2]/100:1,m=typeof o[3]<`u`?o[3]/100:null);let h=l.config.chart.type===`donut`||l.config.chart.type===`pie`||l.config.chart.type===`polarArea`||l.config.chart.type===`bubble`;if(u=!s||s.length===0?l.dom.Paper.gradient(h?`radial`:`linear`,e=>{e.stop(d,t,r),e.stop(f,n,i),e.stop(p,n,i),m!==null&&e.stop(m,t,r)}):l.dom.Paper.gradient(h?`radial`:`linear`,e=>{(Array.isArray(s[c])?s[c]:s).forEach(t=>{e.stop(t.offset/100,t.color,t.opacity)})}),!h)e===`vertical`?u.from(0,0).to(0,1):e===`diagonal`?u.from(0,0).to(1,1):e===`horizontal`?u.from(0,1).to(1,1):e===`diagonal2`&&u.from(1,0).to(0,1);else{let e=l.layout.gridWidth/2,t=l.layout.gridHeight/2;l.config.chart.type===`bubble`?u.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):u.attr({gradientUnits:`userSpaceOnUse`,cx:e,cy:t,r:a})}return u}getTextBasedOnMaxWidth({text:e,maxWidth:t,fontSize:n,fontFamily:r}){let i=this.getTextRects(e,n,r),a=i.width/e.length,o=Math.floor(t/a);return t<i.width?e.slice(0,o-3)+`...`:e}drawText({x:e,y:t,text:n,textAnchor:r,fontSize:i,fontFamily:a,fontWeight:o,foreColor:c,opacity:l,maxWidth:u,cssClass:d=``,isPlainText:f=!0,dominantBaseline:p=`auto`}){let m=this.w;typeof n>`u`&&(n=``);let h=n;r||=`start`,(!c||!c.length)&&(c=m.config.chart.foreColor),a||=m.config.chart.fontFamily,i||=`11px`,o||=`regular`;let g={maxWidth:u,fontSize:i,fontFamily:a},_;return Array.isArray(n)?_=m.dom.Paper.text(e=>{for(let t=0;t<n.length;t++)h=n[t],u&&(h=this.getTextBasedOnMaxWidth(s({text:n[t]},g))),t===0?e.tspan(h):e.tspan(h).newLine()}):(u&&(h=this.getTextBasedOnMaxWidth(s({text:n},g))),_=f?m.dom.Paper.plain(n):m.dom.Paper.text(e=>e.tspan(h))),_.attr({x:e,y:t,"text-anchor":r,"dominant-baseline":p,"font-size":i,"font-family":a,"font-weight":o,fill:c,class:`apexcharts-text `+d}),_.node.style.fontFamily=a,_.node.style.opacity=l,_}getMarkerPath(e,t,n,r){let i=``;switch(n){case`cross`:r/=1.4,i=`M ${e-r} ${t-r} L ${e+r} ${t+r} M ${e-r} ${t+r} L ${e+r} ${t-r}`;break;case`plus`:r/=1.12,i=`M ${e-r} ${t} L ${e+r} ${t} M ${e} ${t-r} L ${e} ${t+r}`;break;case`star`:case`sparkle`:{let a=5;r*=1.15,n===`sparkle`&&(r/=1.1,a=4);let o=Math.PI/a;for(let n=0;n<=2*a;n++){let a=n*o,s=n%2==0?r:r/2,c=e+s*Math.sin(a),l=t-s*Math.cos(a);i+=(n===0?`M`:`L`)+c+`,`+l}i+=`Z`;break}case`triangle`:i=`M ${e} ${t-r}
13
+ L ${e+r} ${t+r}
14
+ L ${e-r} ${t+r}
15
+ Z`;break;case`square`:case`rect`:r/=1.125,i=`M ${e-r} ${t-r}
16
+ L ${e+r} ${t-r}
17
+ L ${e+r} ${t+r}
18
+ L ${e-r} ${t+r}
19
+ Z`;break;case`diamond`:r*=1.05,i=`M ${e} ${t-r}
20
+ L ${e+r} ${t}
21
+ L ${e} ${t+r}
22
+ L ${e-r} ${t}
23
+ Z`;break;case`line`:r/=1.1,i=`M ${e-r} ${t}
24
+ L ${e+r} ${t}`;break;default:r*=2,i=`M ${e}, ${t}
25
+ m -${r/2}, 0
26
+ a ${r/2},${r/2} 0 1,0 ${r},0
27
+ a ${r/2},${r/2} 0 1,0 -${r},0`;break}return i}drawMarkerShape(e,t,n,r,i){let a=this.drawPath({d:this.getMarkerPath(e,t,n,r,i),stroke:i.pointStrokeColor,strokeDashArray:i.pointStrokeDashArray,strokeWidth:i.pointStrokeWidth,fill:i.pointFillColor,fillOpacity:i.pointFillOpacity,strokeOpacity:i.pointStrokeOpacity});return a.attr({cx:e,cy:t,shape:i.shape,class:i.class?i.class:``}),a}drawMarker(e,t,n){e||=0;let r=n.pSize||0;return y.isNumber(t)||(r=0,t=0),this.drawMarkerShape(e,t,n?.shape,r,s(s({},n),n.shape===`line`||n.shape===`plus`||n.shape===`cross`?{pointStrokeColor:n.pointFillColor,pointStrokeOpacity:n.pointFillOpacity}:{}))}pathMouseEnter(t,n){let r=this.w,i=new F(this.w),a=parseInt(t.node.getAttribute(`index`),10),o=parseInt(t.node.getAttribute(`j`),10);if(typeof r.config.chart.events.dataPointMouseEnter==`function`&&r.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}),e._fireEvent(r,`dataPointMouseEnter`,[n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}]),!(r.config.states.active.filter.type!==`none`&&t.node.getAttribute(`selected`)===`true`)&&r.config.states.hover.filter.type!==`none`&&!r.interact.isTouchDevice){let e=r.config.states.hover.filter;i.applyFilter(t,a,e.type)}}pathMouseLeave(t,n){let r=this.w,i=new F(this.w),a=parseInt(t.node.getAttribute(`index`),10),o=parseInt(t.node.getAttribute(`j`),10);typeof r.config.chart.events.dataPointMouseLeave==`function`&&r.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}),e._fireEvent(r,`dataPointMouseLeave`,[n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}]),!(r.config.states.active.filter.type!==`none`&&t.node.getAttribute(`selected`)===`true`)&&r.config.states.hover.filter.type!==`none`&&i.getDefaultFilter(t,a)}pathMouseDown(t,n){let r=this.w,i=new F(this.w),a=parseInt(t.node.getAttribute(`index`),10),o=parseInt(t.node.getAttribute(`j`),10),s=`false`;if(t.node.getAttribute(`selected`)===`true`){if(t.node.setAttribute(`selected`,`false`),r.interact.selectedDataPoints[a].indexOf(o)>-1){let e=r.interact.selectedDataPoints[a].indexOf(o);r.interact.selectedDataPoints[a].splice(e,1)}}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.interact.selectedDataPoints.length>0){r.interact.selectedDataPoints=[];let e=r.dom.Paper.find(`.apexcharts-series path:not(.apexcharts-decoration-element)`),t=r.dom.Paper.find(`.apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)`),n=e=>{Array.prototype.forEach.call(e,e=>{e.node.setAttribute(`selected`,`false`),i.getDefaultFilter(e,a)})};n(e),n(t)}t.node.setAttribute(`selected`,`true`),s=`true`,typeof r.interact.selectedDataPoints[a]>`u`&&(r.interact.selectedDataPoints[a]=[]),r.interact.selectedDataPoints[a].push(o)}if(s===`true`){let e=r.config.states.active.filter;if(e!==`none`)i.applyFilter(t,a,e.type);else if(r.config.states.hover.filter!==`none`&&!r.interact.isTouchDevice){let e=r.config.states.hover.filter;i.applyFilter(t,a,e.type)}}else if(r.config.states.active.filter.type!==`none`)if(r.config.states.hover.filter.type!==`none`&&!r.interact.isTouchDevice){let e=r.config.states.hover.filter;i.applyFilter(t,a,e.type)}else i.getDefaultFilter(t,a);typeof r.config.chart.events.dataPointSelection==`function`&&r.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:a,dataPointIndex:o,w:r}),n&&e._fireEvent(r,`dataPointSelection`,[n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:a,dataPointIndex:o,w:r}])}rotateAroundCenter(e){let t={};return e&&typeof e.getBBox==`function`&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}setupEventDelegation(t,n){let r=null;t.node.addEventListener(`mouseover`,i=>{let a=e._findDelegateTarget(i.target,t.node,n);!a||a===r||(r&&r.instance&&this.pathMouseLeave(r.instance,i),r=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener(`mouseout`,i=>{r&&(i.relatedTarget?e._findDelegateTarget(i.relatedTarget,t.node,n):null)!==r&&(r&&r.instance&&this.pathMouseLeave(r.instance,i),r=null)}),t.node.addEventListener(`mousedown`,r=>{let i=e._findDelegateTarget(r.target,t.node,n);i&&i.instance&&this.pathMouseDown(i.instance,r)})}static _fireEvent(e,t,n){let r=e.globals.events;if(!r||!Object.prototype.hasOwnProperty.call(r,t))return;let i=r[t];for(let e=0;e<i.length;e++)i[e].apply(null,n)}static _findDelegateTarget(e,t,n){for(;e&&e!==t&&e!==document;){if(e.matches&&e.matches(n))return e;e=e.parentNode}return null}static setAttrs(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])}getTextRects(e,t,n,r,i=!0){let a=this.w,o=`${e}|${t}|${n}|${r}|${i}`,s=a.globals.textRectsCache;if(s&&s.has(o))return s.get(o);let c=this.drawText({x:-200,y:-200,text:e,textAnchor:`start`,fontSize:t,fontFamily:n,foreColor:`#fff`,opacity:0});r&&c.attr(`transform`,r),a.dom.Paper.add(c);let l=c.bbox();i||(l=c.node.getBoundingClientRect()),c.remove();let u={width:l.width,height:l.height};return s&&s.set(o,u),u}placeTextWithEllipsis(e,t,n){if(typeof e.getComputedTextLength==`function`&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=n/1.1)){for(let r=t.length-3;r>0;r-=3)if(e.getSubStringLength(0,r)<=n/1.1){e.textContent=t.substring(0,r)+`...`;return}e.textContent=`.`}}},L=`http://www.w3.org/2000/svg`,R=class e{constructor(e,t){typeof e==`object`?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=t||0)}transform(e){return e.apply(this)}clone(){return new e(this.x,this.y)}},ee=class e{constructor(e,t,n,r,i,a){this.a=e??1,this.b=t??0,this.c=n??0,this.d=r??1,this.e=i??0,this.f=a??0}rotate(t){let n=t*Math.PI/180,r=Math.cos(n),i=Math.sin(n);return this.multiply(new e(r,i,-i,r,0,0))}scale(t,n){return this.multiply(new e(t,0,0,n??t,0,0))}multiply(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(e){return new R(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}},te=class{constructor(e,t,n,r){this.x=e,this.y=t,this.w=n,this.h=r,this.width=n,this.height=r,this.x2=e+n,this.y2=t+r}},z=class{constructor(e){this.w=e,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(e){let t=this.w,n=t.config,r=parseInt(t.layout.gridWidth,10),i=parseInt(t.layout.gridHeight,10),a=r>i?r:i,o=e.image,s=0,c=0;typeof e.width>`u`&&typeof e.height>`u`?n.fill.image.width!==void 0&&n.fill.image.height!==void 0?(s=n.fill.image.width+1,c=n.fill.image.height):(s=a+1,c=a):(s=e.width,c=e.height);let l=v.createElementNS(L,`pattern`);I.setAttrs(l,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:`userSpaceOnUse`,width:s+`px`,height:c+`px`});let u=v.createElementNS(L,`image`);l.appendChild(u);let f=d.isBrowser()?window.SVG:global.SVG;u.setAttributeNS(f.xlink,`href`,o),I.setAttrs(u,{x:0,y:0,preserveAspectRatio:`none`,width:s+`px`,height:c+`px`}),u.style.opacity=e.opacity,t.dom.elDefs.node.appendChild(l)}getSeriesIndex(e){let t=this.w,n=t.config.chart.type;return(n===`bar`||n===`rangeBar`)&&t.config.plotOptions.bar.distributed||n===`heatmap`||n===`treemap`?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.seriesData.series.length,this.seriesIndex}computeColorStops(e,t){let n=this.w,r=null,i=null;for(let n of e)n>=t.threshold?(r===null||n>r)&&(r=n):(i===null||n<i)&&(i=n);r===null&&(r=t.threshold),i===null&&(i=t.threshold);let a=r-t.threshold+(t.threshold-i);a===0&&(a=1);let o=100-(t.threshold-i)/a*100;return o=Math.max(0,Math.min(o,100)),[{offset:o,color:t.colorAboveThreshold,opacity:n.config.fill.opacity},{offset:0,color:t.colorBelowThreshold,opacity:n.config.fill.opacity}]}fillPath(e){var t;let n=this.w;this.opts=e;let r=this.w.config,i,a,o;this.seriesIndex=this.getSeriesIndex(e);let s=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold,c=this.getFillColors()[this.seriesIndex];n.seriesData.seriesColors[this.seriesIndex]!==void 0&&(c=n.seriesData.seriesColors[this.seriesIndex]),typeof c==`function`&&(c=c({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:n}));let l=e.fillType?e.fillType:this.getFillType(this.seriesIndex),u=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity,d=l===`gradient`||s;e.color&&(c=e.color),(t=n.config.series[this.seriesIndex]?.data?.[e.dataPointIndex])!=null&&t.fillColor&&(c=n.config.series[this.seriesIndex]?.data?.[e.dataPointIndex]?.fillColor),c||(c=`#fff`,console.warn(`undefined color - ApexCharts`)),y.isCSSVariable(c)&&(c=y.getThemeColor(c));let f=c;if(c.indexOf(`rgb`)===-1?c.indexOf(`#`)===-1?f=c:c.length<9&&(f=y.hexToRgba(c,u)):c.indexOf(`rgba`)>-1?u=y.getOpacityFromRGBA(c):f=y.hexToRgba(y.rgb2hex(c),u),e.opacity&&(u=e.opacity),l===`pattern`&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:c,fillOpacity:u,defaultColor:f})),d){let t=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[],i=r.fill.gradient.type;s&&(t[this.seriesIndex]=this.computeColorStops(n.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),i=`vertical`),o=this.handleGradientFill({type:i,fillConfig:e.fillConfig,fillColor:c,fillOpacity:u,colorStops:t,i:this.seriesIndex})}if(l===`image`){let t=r.fill.image.src,a=e.patternID?e.patternID:``,o=`pattern${n.globals.cuid}${e.seriesNumber+1}${a}`;this.patternIDs.indexOf(o)===-1&&(this.clippedImgArea({opacity:u,image:Array.isArray(t)?e.seriesNumber<t.length?t[e.seriesNumber]:t[0]:t,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:o}),this.patternIDs.push(o)),i=`url(#${o})`}else i=d?o:l===`pattern`?a:f;return e.solid&&(i=f),i}getFillType(e){let t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}getFillColors(){let e=this.w,t=e.config,n=this.opts,r=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type===`line`?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors):t.chart.type===`line`?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors),typeof n.fillColors<`u`&&(r=[],Array.isArray(n.fillColors)?r=n.fillColors.slice():r.push(n.fillColors)),r}handlePatternFill({fillConfig:e,patternFill:t,fillColor:n,fillOpacity:r,defaultColor:i}){let a=this.w.config.fill;e&&(a=e);let o=this.opts,s=new I(this.w),c=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=n;return t=Array.isArray(a.pattern.style)?typeof a.pattern.style[o.seriesNumber]<`u`?s.drawPattern(a.pattern.style[o.seriesNumber],a.pattern.width,a.pattern.height,l,c,r):i:s.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,c,r),t}handleGradientFill({type:e,fillColor:t,fillOpacity:n,fillConfig:r,colorStops:i,i:a}){let o=this.w.config.fill;r&&(o=s(s({},o),r));let c=this.opts,l=new I(this.w),u=new y;e||=o.gradient.type;let d=t,f,p=o.gradient.opacityFrom===void 0?n:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[a]:o.gradient.opacityFrom;d.indexOf(`rgba`)>-1&&(p=y.getOpacityFromRGBA(d));let m=o.gradient.opacityTo===void 0?n:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[a]:o.gradient.opacityTo;if(o.gradient.gradientToColors===void 0||o.gradient.gradientToColors.length===0)f=o.gradient.shade===`dark`?u.shadeColor(parseFloat(o.gradient.shadeIntensity)*-1,t.indexOf(`rgb`)>-1?y.rgb2hex(t):t):u.shadeColor(parseFloat(o.gradient.shadeIntensity),t.indexOf(`rgb`)>-1?y.rgb2hex(t):t);else if(o.gradient.gradientToColors[c.seriesNumber]){let e=o.gradient.gradientToColors[c.seriesNumber];f=e,e.indexOf(`rgba`)>-1&&(m=y.getOpacityFromRGBA(e))}else f=t;if(o.gradient.gradientFrom&&(d=o.gradient.gradientFrom),o.gradient.gradientTo&&(f=o.gradient.gradientTo),o.gradient.inverseColors){let e=d;d=f,f=e}return d.indexOf(`rgb`)>-1&&(d=y.rgb2hex(d)),f.indexOf(`rgb`)>-1&&(f=y.rgb2hex(f)),l.drawGradient(e,d,f,p,m,c.size,o.gradient.stops,i,a)}},B=class{constructor(e,t){this.w=e,this.ctx=t,this._filters=new F(this.w),this._graphics=new I(this.w,this.ctx)}setGlobalMarkerSize(){let e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.seriesData.series.length+1)for(let t=0;t<=e.seriesData.series.length;t++)typeof e.globals.markers.size[t]>`u`&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(()=>e.config.markers.size)}plotChartMarkers({pointsPos:e,seriesIndex:t,j:n,pSize:r,alwaysDrawMarker:i=!1,isVirtualPoint:a=!1}){let o=this.w,s=t,c=e,l=null,u=new I(this.w),d=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(c.x))for(let e=0;e<c.x.length;e++){let f,p=n,m=!y.isNumber(c.y[e]);o.globals.markers.largestSize===0&&o.globals.hasNullValues&&o.seriesData.series[s][n+1]!==null&&!a&&(m=!0),n===1&&e===0&&(p=0),n===1&&e===1&&(p=1);let h=`apexcharts-marker`;if((o.config.chart.type===`line`||o.config.chart.type===`area`)&&!o.globals.comboCharts&&!o.config.tooltip.intersect&&(h+=` no-pointer-events`),(Array.isArray(o.config.markers.size)?o.globals.markers.size[t]>0:o.config.markers.size>0)||i||d){m||(h+=` w${y.randomId()}`);let n=this.getMarkerConfig({cssClass:h,seriesIndex:t,dataPointIndex:p});o.config.series[s].data[p]&&(o.config.series[s].data[p].fillColor&&(n.pointFillColor=o.config.series[s].data[p].fillColor),o.config.series[s].data[p].strokeColor&&(n.pointStrokeColor=o.config.series[s].data[p].strokeColor)),typeof r<`u`&&(n.pSize=r),(c.x[e]<-o.globals.markers.largestSize||c.x[e]>o.layout.gridWidth+o.globals.markers.largestSize||c.y[e]<-o.globals.markers.largestSize||c.y[e]>o.layout.gridHeight+o.globals.markers.largestSize)&&(n.pSize=0),m||((o.globals.markers.size[t]>0||i||d)&&!l&&(l=u.group({class:i||d?``:`apexcharts-series-markers`}),l.attr(`clip-path`,`url(#gridRectMarkerMask${o.globals.cuid})`),this.setupMarkerDelegation(l)),f=u.drawMarker(c.x[e],c.y[e],n),f.attr(`rel`,p),f.attr(`j`,p),f.attr(`index`,t),f.node.setAttribute(`default-marker-size`,n.pSize),this._filters.setSelectionFilter(f,t,p),l&&l.add(f))}else typeof o.globals.pointsArray[t]>`u`&&(o.globals.pointsArray[t]=[]),o.globals.pointsArray[t].push([c.x[e],c.y[e]])}return l}getMarkerConfig({cssClass:e,seriesIndex:t,dataPointIndex:n=null,radius:r=null,size:i=null,strokeWidth:a=null}){let o=this.w,s=this.getMarkerStyle(t),c=i===null?o.globals.markers.size[t]:i,l=o.config.markers;return n!==null&&l.discrete.length&&l.discrete.map(e=>{e.seriesIndex===t&&e.dataPointIndex===n&&(s.pointStrokeColor=e.strokeColor,s.pointFillColor=e.fillColor,c=e.size,s.pointShape=e.shape)}),{pSize:r===null?c:r,pRadius:r===null?l.radius:r,pointStrokeWidth:a===null?Array.isArray(l.strokeWidth)?l.strokeWidth[t]:l.strokeWidth:a,pointStrokeColor:s.pointStrokeColor,pointFillColor:s.pointFillColor,shape:s.pointShape||(Array.isArray(l.shape)?l.shape[t]:l.shape),class:e,pointStrokeOpacity:Array.isArray(l.strokeOpacity)?l.strokeOpacity[t]:l.strokeOpacity,pointStrokeDashArray:Array.isArray(l.strokeDashArray)?l.strokeDashArray[t]:l.strokeDashArray,pointFillOpacity:Array.isArray(l.fillOpacity)?l.fillOpacity[t]:l.fillOpacity,seriesIndex:t}}setupMarkerDelegation(e){let t=this.w,n=`.apexcharts-marker`;this._graphics.setupEventDelegation(e,n),e.node.addEventListener(`click`,r=>{t.config.markers.onClick&&I._findDelegateTarget(r.target,e.node,n)&&t.config.markers.onClick(r)}),e.node.addEventListener(`dblclick`,r=>{t.config.markers.onDblClick&&I._findDelegateTarget(r.target,e.node,n)&&t.config.markers.onDblClick(r)}),e.node.addEventListener(`touchstart`,t=>{let r=I._findDelegateTarget(t.target,e.node,n);r&&r.instance&&this._graphics.pathMouseDown(r.instance,t)},{passive:!0})}addEvents(e){let t=this.w;e.node.addEventListener(`mouseenter`,this._graphics.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener(`mouseleave`,this._graphics.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener(`mousedown`,this._graphics.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener(`click`,t.config.markers.onClick),e.node.addEventListener(`dblclick`,t.config.markers.onDblClick),e.node.addEventListener(`touchstart`,this._graphics.pathMouseDown.bind(this.ctx,e),{passive:!0})}getMarkerStyle(e){let t=this.w,n=t.globals.markers.colors,r=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(r)?r[e]:r,pointFillColor:Array.isArray(n)?n[e]:n}}},ne=class{constructor(e,t){this.ctx=t,this.w=e,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new P(this.w),this.filters=new F(this.w),this.fill=new z(this.w),this.markers=new B(this.w,this.ctx),this.graphics=new I(this.w)}draw(e,t,n){let r=this.w,i=this.graphics,a=n.realIndex,o=n.pointsPos,s=n.zRatio,c=n.elParent,l=i.group({class:`apexcharts-series-markers apexcharts-series-${r.config.chart.type}`});if(l.attr(`clip-path`,`url(#gridRectMarkerMask${r.globals.cuid})`),this.markers.setupMarkerDelegation(l),Array.isArray(o.x))for(let e=0;e<o.x.length;e++){let n=t+1,i=!0;t===0&&e===0&&(n=0),t===0&&e===1&&(n=1);let u=r.globals.markers.size[a];if(s!==1/0){let e=r.config.plotOptions.bubble;u=r.seriesData.seriesZ[a][n],e.zScaling&&(u/=s),e.minBubbleRadius&&u<e.minBubbleRadius&&(u=e.minBubbleRadius),e.maxBubbleRadius&&u>e.maxBubbleRadius&&(u=e.maxBubbleRadius)}let d=o.x[e],f=o.y[e];if(u||=0,(f===null||typeof r.seriesData.series[a][n]>`u`)&&(i=!1),i){let e=this.drawPoint(d,f,u,a,n,t);l.add(e)}c.add(l)}}drawPoint(e,t,n,r,i,a){let o=this.w,s=r,c=this.anim,l=this.filters,u=this.fill,d=this.markers,f=this.graphics,p=d.getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:s,dataPointIndex:i,radius:o.config.chart.type===`bubble`||o.globals.comboCharts&&o.config.series[r]&&o.config.series[r].type===`bubble`?n:null}),m=u.fillPath({seriesNumber:r,dataPointIndex:i,color:p.pointFillColor,patternUnits:`objectBoundingBox`,value:o.seriesData.series[r][a]}),h=f.drawMarker(e,t,p);if(o.config.series[s].data[i]&&o.config.series[s].data[i].fillColor&&(m=o.config.series[s].data[i].fillColor),h.attr({fill:m}),o.config.chart.dropShadow.enabled){let e=o.config.chart.dropShadow;l.dropShadow(h,e,r)}if(this.initialAnim&&!o.globals.dataChanged&&!o.globals.resized){let e=o.config.chart.animations.speed;c.animateMarker(h,e,o.globals.easing,()=>{window.setTimeout(()=>{c.animationCompleted(h)},100)})}else o.globals.animationEnded=!0;return h.attr({rel:i,j:i,index:r,"default-marker-size":p.pSize}),l.setSelectionFilter(h,r,i),h.node.classList.add(`apexcharts-marker`),h}centerTextInBubble(e){let t=this.w;return e+=parseInt(t.config.dataLabels.style.fontSize,10)/4,{y:e}}},V=class{constructor(e,t=null){this.w=e,this.ctx=t}dataLabelsCorrection(e,t,n,r,i,a,o){let s=this.w,c=new I(this.w),l=!1,u=c.getTextRects(n,o),d=u.width,f=u.height;t<0&&(t=0),t>s.layout.gridHeight+f&&(t=s.layout.gridHeight+f/2),typeof s.globals.dataLabelsRects[r]>`u`&&(s.globals.dataLabelsRects[r]=[]),s.globals.dataLabelsRects[r].push({x:e,y:t,width:d,height:f});let p=s.globals.dataLabelsRects[r].length-2,m=typeof s.globals.lastDrawnDataLabelsIndexes[r]<`u`?s.globals.lastDrawnDataLabelsIndexes[r][s.globals.lastDrawnDataLabelsIndexes[r].length-1]:0;if(typeof s.globals.dataLabelsRects[r][p]<`u`){let n=s.globals.dataLabelsRects[r][m];(e>n.x+n.width||t>n.y+n.height||t+f<n.y||e+d<n.x)&&(l=!0)}return(i===0||a)&&(l=!0),{x:e,y:t,textRects:u,drawnextLabel:l}}drawDataLabel({type:e,pos:t,i:n,j:r,isRangeStart:i,strokeWidth:a=2}){let o=this.w,s=new I(this.w),c=o.config.dataLabels,l=0,u=0,d=r,f=null;if(o.globals.collapsedSeriesIndices.indexOf(n)!==-1||!c.enabled||!Array.isArray(t.x))return f;f=s.group({class:`apexcharts-data-labels`});for(let s=0;s<t.x.length;s++)if(l=t.x[s]+c.offsetX,u=t.y[s]+c.offsetY+a,!isNaN(l)){r===1&&s===0&&(d=0),r===1&&s===1&&(d=1);let a=o.seriesData.series[n][d];e===`rangeArea`&&(a=i?o.rangeData.seriesRangeStart[n][d]:o.rangeData.seriesRangeEnd[n][d]);let c=``,p=e=>o.config.dataLabels.formatter(e,{seriesIndex:n,dataPointIndex:d,w:o});o.config.chart.type===`bubble`?(a=o.seriesData.seriesZ[n][d],c=p(a),u=t.y[s],u=new ne(this.w,this.ctx).centerTextInBubble(u,n,d).y):typeof a<`u`&&(c=p(a));let m=o.config.dataLabels.textAnchor;o.globals.isSlopeChart&&(m=d===0?`end`:d===o.config.series[n].data.length-1?`start`:`middle`),this.plotDataLabelsText({x:l,y:u,text:c,i:n,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels,textAnchor:m})}return f}plotDataLabelsText(e){let t=this.w,n=new I(this.w),{x:r,y:i,i:a,j:o,text:s,textAnchor:c,fontSize:l,parent:u,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:p,offsetCorrection:m,className:h}=e,g=null;if(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(a)<0)return g;let _={x:r,y:i,drawnextLabel:!0,textRects:null};m&&(_=this.dataLabelsCorrection(r,i,s,a,o,p,parseInt(d.style.fontSize,10))),t.interact.zoomed||(r=_.x,i=_.y),_.textRects&&(r<-20-_.textRects.width||r>t.layout.gridWidth+_.textRects.width+30)&&(s=``);let v=t.globals.dataLabels.style.colors[a];((t.config.chart.type===`bar`||t.config.chart.type===`rangeBar`)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[o]),typeof v==`function`&&(v=v({series:t.seriesData.series,seriesIndex:a,dataPointIndex:o,w:t})),f&&(v=f);let y=d.offsetX,b=d.offsetY;if((t.config.chart.type===`bar`||t.config.chart.type===`rangeBar`)&&(y=0,b=0),t.globals.isSlopeChart&&(o!==0&&(y=d.offsetX*-2+5),o!==0&&o!==t.config.series[a].data.length-1&&(y=0)),_.drawnextLabel){if(c===`middle`&&r===t.layout.gridWidth&&(c=`end`),g=n.drawText({width:100,height:parseInt(d.style.fontSize,10),x:r+y,y:i+b,foreColor:v,textAnchor:c||d.textAnchor,text:s,fontSize:l||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||`normal`}),g.attr({class:h||`apexcharts-datalabel`,cx:r,cy:i}),d.dropShadow.enabled){let e=d.dropShadow;new F(this.w).dropShadow(g,e)}u.add(g),typeof t.globals.lastDrawnDataLabelsIndexes[a]>`u`&&(t.globals.lastDrawnDataLabelsIndexes[a]=[]),t.globals.lastDrawnDataLabelsIndexes[a].push(o)}return g}addBackgroundToDataLabel(e,t){let n=this.w,r=n.config.dataLabels.background,i=r.padding,a=r.padding/2,o=t.width,s=t.height,c=new I(this.w).drawRect(t.x-i,t.y-a/2,o+i*2,s+a,r.borderRadius,n.config.chart.background===`transparent`||!n.config.chart.background?`#fff`:n.config.chart.background,r.opacity,r.borderWidth,r.borderColor);return r.dropShadow.enabled&&new F(this.w).dropShadow(c,r.dropShadow),c}dataLabelsBackground(){let e=this.w;if(e.config.chart.type===`bubble`)return;let t=e.dom.baseEl.querySelectorAll(`.apexcharts-datalabels text`);for(let n=0;n<t.length;n++){let r=t[n],i=r.getBBox(),a=null;if(i.width&&i.height&&(a=this.addBackgroundToDataLabel(r,i)),a){r.parentNode.insertBefore(a.node,r);let t=e.config.dataLabels.background.backgroundColor||r.getAttribute(`fill`);e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?a.animate().attr({fill:t}):a.attr({fill:t}),r.setAttribute(`fill`,e.config.dataLabels.background.foreColor)}}}bringForward(){let e=this.w,t=e.dom.baseEl.querySelectorAll(`.apexcharts-datalabels`),n=e.dom.baseEl.querySelector(`.apexcharts-plot-series:last-child`);for(let e=0;e<t.length;e++)n&&n.insertBefore(t[e],n.nextSibling)}},H=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n}getLabel(e,t,n,r,i=[],a=`12px`,o=!0){let s=this.w,c=typeof e[r]>`u`?``:e[r],l=c,u=s.formatters.xLabelFormatter,d=s.config.xaxis.labels.formatter,f=!1,p=new x(this.w),m=c;o&&(l=p.xLabelFormat(u,c,m,{i:r,dateFormatter:new b(this.w).formatDate,w:s}),d!==void 0&&(l=d(c,e[r],{i:r,dateFormatter:new b(this.w).formatDate,w:s}))),t.length>0?(f=(e=>{let n=null;return t.forEach(e=>{e.unit===`month`?n=`year`:e.unit===`day`?n=`month`:e.unit===`hour`?n=`day`:e.unit===`minute`&&(n=`hour`)}),n===e})(t[r].unit),n=t[r].position,l=t[r].value):s.config.xaxis.type===`datetime`&&d===void 0&&(l=``),typeof l>`u`&&(l=``),l=Array.isArray(l)?l:l.toString();let h=new I(this.w),g={};g=s.layout.rotateXLabels&&o?h.getTextRects(l,parseInt(a,10),null,`rotate(${s.config.xaxis.labels.rotate} 0 0)`,!1):h.getTextRects(l,parseInt(a,10));let _=!s.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(l)&&(String(l)===`NaN`||i.indexOf(l)>=0&&_)&&(l=``),{x:n,text:l,textRect:g,isBold:f}}checkLabelBasedOnTickamount(e,t,n){let r=this.w,i=r.config.xaxis.tickAmount;return i===`dataPoints`&&(i=Math.round(r.layout.gridWidth/120)),i>n||e%Math.round(n/(i+1))===0||(t.text=``),t}checkForOverflowingLabels(e,t,n,r,i){let a=this.w;if(e===0&&a.globals.skipFirstTimelinelabel&&(t.text=``),e===n-1&&a.globals.skipLastTimelinelabel&&(t.text=``),a.config.xaxis.labels.hideOverlappingLabels&&r.length>0){let e=i[i.length-1];if(a.config.xaxis.labels.trim&&a.config.xaxis.type!==`datetime`)return t;t.x<e.textRect.width/(a.layout.rotateXLabels?Math.abs(a.config.xaxis.labels.rotate)/12:1.01)+e.x&&(t.text=``)}return t}checkForReversedLabels(e,t){let n=this.w;return n.config.yaxis[e]&&n.config.yaxis[e].reversed&&t.reverse(),t}yAxisAllSeriesCollapsed(e){let t=this.w.globals;return!t.seriesYAxisMap[e].some(e=>t.collapsedSeriesIndices.indexOf(e)===-1)}translateYAxisIndex(e){let t=this.w,n=t.globals,r=t.config.yaxis;return t.seriesData.series.length>r.length||r.some(e=>Array.isArray(e.seriesName))?e:n.seriesYAxisReverseMap[e]}isYAxisHidden(e){let t=this.w,n=t.config.yaxis[e];if(!n.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!n.showForNullSeries){let n=t.globals.seriesYAxisMap[e],r=new N(this.w);return n.every(e=>r.isSeriesNull(e))}return!1}getYAxisForeColor(e,t){var n;let r=this.w;return Array.isArray(e)&&r.globals.yAxisScale[t]&&((n=this.theme)==null||n.pushExtraColors(e,r.globals.yAxisScale[t].result.length,!1)),e}drawYAxisTicks(e,t,n,r,i,a,o){let s=this.w,c=new I(this.w),l=s.layout.translateY+s.config.yaxis[i].labels.offsetY;if(s.globals.isBarHorizontal?l=0:s.config.chart.type===`heatmap`&&(l+=a/2),r.show&&t>0){s.config.yaxis[i].opposite===!0&&(e+=r.width);for(let i=t;i>=0;i--){let t=c.drawLine(e+n.offsetX-r.width+r.offsetX,l+r.offsetY,e+n.offsetX+r.offsetX,l+r.offsetY,r.color);o.add(t),l+=a}}}},U=class{constructor(e,t,n){this.w=e,this.ctx=t,this.elgrid=n,this.axesUtils=new H(e,{theme:t.theme,timeScale:t.timeScale}),this.xaxisLabels=e.labelData.labels.slice(),e.labelData.timescaleLabels.length>0&&!e.globals.isBarHorizontal&&(this.xaxisLabels=e.labelData.timescaleLabels.slice()),e.config.xaxis.overwriteCategories&&(this.xaxisLabels=e.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],e.config.xaxis.position===`top`?this.offY=0:this.offY=e.layout.gridHeight,this.offY+=e.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=e.config.chart.type===`bar`&&e.config.plotOptions.bar.horizontal,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.xaxisBorderWidth=e.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=e.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf(`%`)>-1?this.xaxisBorderWidth=e.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=e.config.xaxis.axisBorder.height,this.yaxis=e.config.yaxis[0]}drawXaxis(){let e=this.w,t=new I(this.w),n=t.group({class:`apexcharts-xaxis`,transform:`translate(${e.config.xaxis.offsetX}, ${e.config.xaxis.offsetY})`}),r=t.group({class:`apexcharts-xaxis-texts-g`,transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});n.add(r);let i=[];for(let e=0;e<this.xaxisLabels.length;e++)i.push(this.xaxisLabels[e]);if(this.drawXAxisLabelAndGroup(!0,t,r,i,e.axisFlags.isXNumeric,(e,t)=>t),e.labelData.hasXaxisGroups){let n=e.labelData.groups;i=[];for(let e=0;e<n.length;e++)i.push(n[e].title);let a={};e.config.xaxis.group.style&&(a.xaxisFontSize=e.config.xaxis.group.style.fontSize,a.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,a.xaxisForeColors=e.config.xaxis.group.style.colors,a.fontWeight=e.config.xaxis.group.style.fontWeight,a.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,r,i,!1,(e,t)=>n[e].cols*t,a)}if(e.config.xaxis.title.text!==void 0){let r=t.group({class:`apexcharts-xaxis-title`}),i=t.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position===`bottom`?e.layout.xAxisLabelsHeight:-e.layout.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:`middle`,fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text `+e.config.xaxis.title.style.cssClass});r.add(i),n.add(r)}if(e.config.xaxis.axisBorder.show){let r=e.globals.barPadForNumericAxis,i=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-r,this.offY,this.xaxisBorderWidth+r,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(i):n.add(i)}return n}drawXAxisLabelAndGroup(e,t,n,r,i,a,o={}){let s=[],c=[],l=this.w,u=o.xaxisFontSize||this.xaxisFontSize,d=o.xaxisFontFamily||this.xaxisFontFamily,f=o.xaxisForeColors||this.xaxisForeColors,p=o.fontWeight||l.config.xaxis.labels.style.fontWeight,m=o.cssClass||l.config.xaxis.labels.style.cssClass,h,g=l.globals.padHorizontal,_=r.length,y=l.config.xaxis.type===`category`?l.globals.dataPoints:_;if(y===0&&_>y&&(y=_),i){let e=Math.max(Number(l.config.xaxis.tickAmount)||1,y>1?y-1:y);h=l.layout.gridWidth/Math.min(e,_-1),g=g+a(0,h)/2+l.config.xaxis.labels.offsetX}else h=l.layout.gridWidth/y,g=g+a(0,h)+l.config.xaxis.labels.offsetX;for(let i=0;i<=_-1;i++){let o=g-a(i,h)/2+l.config.xaxis.labels.offsetX;i===0&&_===1&&h/2===g&&y===1&&(o=l.layout.gridWidth/2);let b=this.axesUtils.getLabel(r,l.labelData.timescaleLabels,o,i,s,u,e),x=28;l.layout.rotateXLabels&&e&&(x=22),l.config.xaxis.title.text&&l.config.xaxis.position===`top`&&(x+=parseFloat(l.config.xaxis.title.style.fontSize)+2),e||(x=x+parseFloat(u)+(l.layout.xAxisLabelsHeight-l.layout.xAxisGroupLabelsHeight)+(l.layout.rotateXLabels?10:0)),b=typeof l.config.xaxis.tickAmount<`u`&&l.config.xaxis.tickAmount!==`dataPoints`&&l.config.xaxis.type!==`datetime`?this.axesUtils.checkLabelBasedOnTickamount(i,b,_):this.axesUtils.checkForOverflowingLabels(i,b,_,s,c);let S=()=>e&&l.config.xaxis.convertedCatToNumeric?f[l.globals.minX+i-1]:f[i];if(l.config.xaxis.labels.show){let r=t.drawText({x:b.x,y:this.offY+l.config.xaxis.labels.offsetY+x-(l.config.xaxis.position===`top`?l.layout.xAxisHeight+l.config.xaxis.axisTicks.height-2:0),text:b.text,textAnchor:`middle`,fontWeight:b.isBold?600:p,fontSize:u,fontFamily:d,foreColor:Array.isArray(f)?S():f,isPlainText:!1,cssClass:(e?`apexcharts-xaxis-label `:`apexcharts-xaxis-group-label `)+m});if(n.add(r),r.on(`click`,e=>{if(typeof l.config.chart.events.xAxisLabelClick==`function`){let t=Object.assign({},l,{labelIndex:i});l.config.chart.events.xAxisLabelClick(e,this.ctx,t)}}),e){let e=v.createElementNS(L,`title`);e.textContent=Array.isArray(b.text)?b.text.join(` `):b.text,r.node.appendChild(e),b.text!==``&&(s.push(b.text),c.push(b))}}i<_-1&&(g+=a(i+1,h))}}drawXaxisInversed(e){let t=this.w,n=new I(this.w),r=t.config.yaxis[0].opposite?t.globals.translateYAxisX[e]:0,i=n.group({class:`apexcharts-yaxis apexcharts-xaxis-inversed`,rel:e}),a=n.group({class:`apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g`,transform:`translate(`+r+`, 0)`});i.add(a);let o=[];if(t.config.yaxis[e].show)for(let e=0;e<this.xaxisLabels.length;e++)o.push(this.xaxisLabels[e]);let s=t.layout.gridHeight/o.length,c=-(s/2.2),l=t.formatters.yLabelFormatters[0],u=t.config.yaxis[0].labels;if(u.show)for(let r=0;r<=o.length-1;r++){let i=typeof o[r]>`u`?``:o[r];i=l(i,{seriesIndex:e,dataPointIndex:r,w:t});let d=this.axesUtils.getYAxisForeColor(u.style.colors,e),f=()=>Array.isArray(d)?d[r]:d,p=0;Array.isArray(i)&&(p=i.length/2*parseInt(u.style.fontSize,10));let m=u.offsetX-15,h=`end`;this.yaxis.opposite&&(h=`start`),t.config.yaxis[0].labels.align===`left`?(m=u.offsetX,h=`start`):t.config.yaxis[0].labels.align===`center`?(m=u.offsetX,h=`middle`):t.config.yaxis[0].labels.align===`right`&&(h=`end`);let g=n.drawText({x:m,y:c+s+u.offsetY-p,text:i,textAnchor:h,foreColor:f(),fontSize:u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-yaxis-label `+u.style.cssClass,maxWidth:u.maxWidth});a.add(g),g.on(`click`,e=>{if(typeof t.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},t,{labelIndex:r});t.config.chart.events.xAxisLabelClick(e,this.ctx,n)}});let _=v.createElementNS(L,`title`);if(_.textContent=Array.isArray(i)?i.join(` `):i,g.node.appendChild(_),t.config.yaxis[e].labels.rotate!==0){let r=n.rotateAroundCenter(g.node);g.node.setAttribute(`transform`,`rotate(${t.config.yaxis[e].labels.rotate} 0 ${r.y})`)}c+=s}if(t.config.yaxis[0].title.text!==void 0){let e=n.group({class:`apexcharts-yaxis-title apexcharts-xaxis-title-inversed`,transform:`translate(`+r+`, 0)`}),a=n.drawText({x:t.config.yaxis[0].title.offsetX,y:t.layout.gridHeight/2+t.config.yaxis[0].title.offsetY,text:t.config.yaxis[0].title.text,textAnchor:`middle`,foreColor:t.config.yaxis[0].title.style.color,fontSize:t.config.yaxis[0].title.style.fontSize,fontWeight:t.config.yaxis[0].title.style.fontWeight,fontFamily:t.config.yaxis[0].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text `+t.config.yaxis[0].title.style.cssClass});e.add(a),i.add(e)}let d=0;this.isCategoryBarHorizontal&&t.config.yaxis[0].opposite&&(d=t.layout.gridWidth);let f=t.config.xaxis.axisBorder;if(f.show){let e=n.drawLine(t.globals.padHorizontal+f.offsetX+d,1+f.offsetY,t.globals.padHorizontal+f.offsetX+d,t.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(e):i.add(e)}return t.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,o.length,t.config.yaxis[0].axisBorder,t.config.yaxis[0].axisTicks,0,s,i),i}drawXaxisTicks(e,t,n){let r=this.w,i=e;if(e<0||e-2>r.layout.gridWidth)return;let a=this.offY+r.config.xaxis.axisTicks.offsetY;if(t=t+a+r.config.xaxis.axisTicks.height,r.config.xaxis.position===`top`&&(t=a-r.config.xaxis.axisTicks.height),r.config.xaxis.axisTicks.show){let o=new I(this.w).drawLine(e+r.config.xaxis.axisTicks.offsetX,a+r.config.xaxis.offsetY,i+r.config.xaxis.axisTicks.offsetX,t+r.config.xaxis.offsetY,r.config.xaxis.axisTicks.color);n.add(o),o.node.classList.add(`apexcharts-xaxis-tick`)}}getXAxisTicksPositions(){let e=this.w,t=[],n=this.xaxisLabels.length,r=e.globals.padHorizontal;if(e.labelData.timescaleLabels.length>0)for(let e=0;e<n;e++)r=this.xaxisLabels[e].position,t.push(r);else{let i=n;for(let n=0;n<i;n++){let n=i;e.axisFlags.isXNumeric&&e.config.chart.type!==`bar`&&--n,r+=e.layout.gridWidth/n,t.push(r)}}return t}xAxisLabelCorrections(){let e=this.w,t=new I(this.w),n=e.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g`),r=e.dom.baseEl.querySelectorAll(`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)`),i=e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-inversed text`),a=e.dom.baseEl.querySelectorAll(`.apexcharts-xaxis-inversed-texts-g text tspan`);if(e.layout.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(let i=0;i<r.length;i++){let a=t.rotateAroundCenter(r[i]);--a.y,a.x+=1,r[i].setAttribute(`transform`,`rotate(${e.config.xaxis.labels.rotate} ${a.x} ${a.y})`),r[i].setAttribute(`text-anchor`,`end`),n.setAttribute(`transform`,`translate(0, -10)`);let o=r[i].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(o,n=>{t.placeTextWithEllipsis(n,n.textContent,e.layout.xAxisLabelsHeight-(e.config.legend.position===`bottom`?20:10))})}else{let n=e.layout.gridWidth/(e.labelData.labels.length+1);for(let i=0;i<r.length;i++){let a=r[i].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!==`datetime`&&Array.prototype.forEach.call(a,e=>{t.placeTextWithEllipsis(e,e.textContent,n)})}}if(i.length>0){let n=i[i.length-1].getBBox(),r=i[0].getBBox();n.x<-20&&i[i.length-1].parentNode.removeChild(i[i.length-1]),r.x+r.width>e.layout.gridWidth&&!e.globals.isBarHorizontal&&i[0].parentNode.removeChild(i[0]);for(let n=0;n<a.length;n++)t.placeTextWithEllipsis(a[n],a[n].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?parseFloat(e.config.yaxis[0].title.style.fontSize)*2:0)-15)}}},re=class{constructor(e,t){this.w=e,this.ctx=t,this.xaxisLabels=e.labelData.labels.slice(),this.axesUtils=new H(t.w,{theme:t.theme,timeScale:t.timeScale}),this.isRangeBar=e.rangeData.seriesRange.length&&e.globals.isBarHorizontal,e.labelData.timescaleLabels.length>0&&(this.xaxisLabels=e.labelData.timescaleLabels.slice())}drawGridArea(e=null){let t=this.w,n=new I(this.w);e||=n.group({class:`apexcharts-grid`});let r=n.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.layout.gridHeight,`transparent`),i=n.drawLine(t.globals.padHorizontal,t.layout.gridHeight,t.layout.gridWidth,t.layout.gridHeight,`transparent`);return e.add(i),e.add(r),e}drawGrid(){if(this.w.globals.axisCharts){let e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){let e=this.w,t=e.globals,n=new I(this.w),r=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,i=e=>{let t=v.createElementNS(L,`clipPath`);return t.setAttribute(`id`,e),t};e.dom.elGridRectMask=i(`gridRectMask${t.cuid}`),e.dom.elGridRectBarMask=i(`gridRectBarMask${t.cuid}`),e.dom.elGridRectMarkerMask=i(`gridRectMarkerMask${t.cuid}`),e.dom.elForecastMask=i(`forecastMask${t.cuid}`),e.dom.elNonForecastMask=i(`nonForecastMask${t.cuid}`);let a=[`bar`,`rangeBar`,`candlestick`,`boxPlot`].includes(e.config.chart.type)||e.globals.comboBarCount>0,o=0,s=0;a&&e.axisFlags.isXNumeric&&!e.globals.isBarHorizontal&&(o=Math.max(e.config.grid.padding.left,t.barPadForNumericAxis),s=Math.max(e.config.grid.padding.right,t.barPadForNumericAxis)),e.dom.elGridRect=n.drawRect(-r/2-2,-r/2-2,e.layout.gridWidth+r+4,e.layout.gridHeight+r+4,0,`#fff`),e.dom.elGridRectBar=n.drawRect(-r/2-o-2,-r/2-2,e.layout.gridWidth+r+s+o+4,e.layout.gridHeight+r+4,0,`#fff`);let c=e.globals.markers.largestSize;e.dom.elGridRectMarker=n.drawRect(Math.min(-r/2-o-2,-c),-c,e.layout.gridWidth+Math.max(r+s+o+4,c*2),e.layout.gridHeight+c*2,0,`#fff`),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);let l=e.dom.elDefs.node;l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}_drawGridLines({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o}){let s=this.w;if(!(e===0&&s.globals.skipFirstTimelinelabel||e===a-1&&s.globals.skipLastTimelinelabel&&!s.config.xaxis.labels.formatter||s.config.chart.type===`radar`)){s.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o});let c=0;if(s.labelData.hasXaxisGroups&&s.config.xaxis.tickPlacement===`between`){let t=s.labelData.groups;if(t){let n=0;for(let r=0;n<e&&r<t.length;r++)n+=t[r].cols;n===e&&(c=s.layout.xAxisLabelsHeight*.6)}}new U(this.w,this.ctx).drawXaxisTicks(t,c,s.dom.elGraphical)}}_drawGridLine({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o}){let s=this.w,c=o.node.classList.contains(`apexcharts-gridlines-horizontal`),l=s.globals.barPadForNumericAxis,u=n===0&&i===0||t===0&&r===0||n===s.layout.gridHeight&&i===s.layout.gridHeight||s.globals.isBarHorizontal&&(e===0||e===a-1),d=new I(this.w).drawLine(t-(c?l:0),n,r+(c?l:0),i,s.config.grid.borderColor,s.config.grid.strokeDashArray);d.node.classList.add(`apexcharts-gridline`),u&&s.config.grid.show?this.elGridBorders.add(d):o.add(d)}_drawGridBandRect({c:e,x1:t,y1:n,x2:r,y2:i,type:a}){let o=this.w,s=new I(this.w),c=o.globals.barPadForNumericAxis,l=o.config.grid[a].colors[e],u=s.drawRect(t-(a===`row`?c:0),n,r+(a===`row`?c*2:0),i,0,l,o.config.grid[a].opacity);this.elg.add(u),u.attr(`clip-path`,`url(#gridRectMask${o.globals.cuid})`),u.node.classList.add(`apexcharts-grid-${a}`)}_drawXYLines({xCount:e,tickAmount:t}){let n=this.w,r=({xC:t,x1:n,y1:r,x2:i,y2:a})=>{for(let o=0;o<t;o++)n=this.xaxisLabels[o].position,i=this.xaxisLabels[o].position,this._drawGridLines({i:o,x1:n,y1:r,x2:i,y2:a,xCount:e,parent:this.elgridLinesV})},i=({xC:t,x1:r,y1:i,x2:a,y2:o})=>{for(let s=0;s<t+ +!n.axisFlags.isXNumeric;s++)s===0&&t===1&&n.globals.dataPoints===1&&(r=n.layout.gridWidth/2,a=r),this._drawGridLines({i:s,x1:r,y1:i,x2:a,y2:o,xCount:e,parent:this.elgridLinesV}),r+=n.layout.gridWidth/(n.axisFlags.isXNumeric?t-1:t),a=r};if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show){let t=n.globals.padHorizontal,a=n.layout.gridHeight;n.labelData.timescaleLabels.length?r({xC:e,x1:t,y1:0,x2:void 0,y2:a}):(n.axisFlags.isXNumeric&&(e=n.globals.xAxisScale.result.length),i({xC:e,x1:t,y1:0,x2:void 0,y2:a}))}if(n.config.grid.yaxis.lines.show){let e=0,r=0,i=n.layout.gridWidth,a=t+1;this.isRangeBar&&(a=n.labelData.labels.length);for(let o=0;o<a+ +!!this.isRangeBar;o++)this._drawGridLine({i:o,xCount:a+ +!!this.isRangeBar,x1:0,y1:e,x2:i,y2:r,parent:this.elgridLinesH}),e+=n.layout.gridHeight/(this.isRangeBar?a:t),r=e}}_drawInvertedXYLines({xCount:e}){let t=this.w;if(t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show){let n=t.globals.padHorizontal,r,i=t.layout.gridHeight;for(let a=0;a<e+1;a++)t.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:e+1,x1:n,y1:0,x2:r,y2:i,parent:this.elgridLinesV}),new U(this.w,this.ctx).drawXaxisTicks(n,0,t.dom.elGraphical),n+=t.layout.gridWidth/e,r=n}if(t.config.grid.yaxis.lines.show){let e=0,n=0,r=t.layout.gridWidth;for(let i=0;i<t.globals.dataPoints+1;i++)this._drawGridLine({i,xCount:t.globals.dataPoints+1,x1:0,y1:e,x2:r,y2:n,parent:this.elgridLinesH}),e+=t.layout.gridHeight/t.globals.dataPoints,n=e}}renderGrid(){let e=this.w,t=e.globals,n=new I(this.w);this.elg=n.group({class:`apexcharts-grid`}),this.elgridLinesH=n.group({class:`apexcharts-gridlines-horizontal`}),this.elgridLinesV=n.group({class:`apexcharts-gridlines-vertical`}),this.elGridBorders=n.group({class:`apexcharts-grid-borders`}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let r=0;for(;r<t.seriesYAxisMap.length&&t.ignoreYAxisIndexes.includes(r);)r++;r===t.seriesYAxisMap.length&&(r=0);let i=t.yAxisScale[r].result.length-1,a;return!t.isBarHorizontal||this.isRangeBar?(a=this.xaxisLabels.length,this.isRangeBar&&(i=e.labelData.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(a=e.config.xaxis.tickAmount),t.yAxisScale?.[r]?.result?.length>0&&e.config.xaxis.type!==`datetime`&&(a=t.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:a,tickAmount:i})):(a=i,i=t.xTickAmount,this._drawInvertedXYLines({xCount:a,tickAmount:i})),this.drawGridBands(a,i),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.layout.gridWidth/a}}drawGridBands(e,t){let n=this.w;if(n.config.grid.row.colors?.length>0&&((e,r,i,a,o,s)=>{for(let c=0,l=0;c<r;c++,l++)l>=n.config.grid[e].colors.length&&(l=0),this._drawGridBandRect({c:l,x1:i,y1:a,x2:o,y2:s,type:e}),a+=n.layout.gridHeight/t})(`row`,t,0,0,n.layout.gridWidth,n.layout.gridHeight/t),n.config.grid.column.colors?.length>0){let t=!n.globals.isBarHorizontal&&n.config.xaxis.tickPlacement===`on`&&(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)?e-1:e;n.axisFlags.isXNumeric&&(t=n.globals.xAxisScale.result.length-1);let r=n.globals.padHorizontal,i=n.globals.padHorizontal+n.layout.gridWidth/t,a=n.layout.gridHeight;for(let o=0,s=0;o<e;o++,s++)s>=n.config.grid.column.colors.length&&(s=0),n.config.xaxis.type===`datetime`&&(r=this.xaxisLabels[o].position,i=(this.xaxisLabels[o+1]?.position||n.layout.gridWidth)-this.xaxisLabels[o].position),this._drawGridBandRect({c:s,x1:r,y1:0,x2:i,y2:a,type:`column`}),r+=n.layout.gridWidth/t}}},ie=class{constructor(e){this.w=e,this.coreUtils=new N(this.w)}niceScale(e,t,n=0){let r=this.w,i=r.globals,a,o,s,c;i.isBarHorizontal?(a=r.config.xaxis,o=Math.max((i.svgWidth-100)/25,2)):(a=r.config.yaxis[n],o=Math.max((i.svgHeight-100)/15,2)),y.isNumber(o)||(o=10),s=a.min!==void 0&&a.min!==null,c=a.max!==void 0&&a.min!==null;let l=a.stepSize!==void 0&&a.stepSize!==null,u=a.tickAmount!==void 0&&a.tickAmount!==null,d=u?a.tickAmount:A[Math.min(Math.round(o/2),A.length-1)];if(i.isMultipleYAxis&&!u&&i.multiAxisTickAmount>0&&(d=i.multiAxisTickAmount,u=!0),d=d===`dataPoints`?i.dataPoints-1:Math.abs(Math.round(d)),(e===Number.MIN_VALUE&&t===0||!y.isNumber(e)&&!y.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=y.isNumber(a.min)?a.min:0,t=y.isNumber(a.max)?a.max:e+d,i.allSeriesCollapsed=!1),e>t){console.warn(`axis.min cannot be greater than axis.max: swapping min and max`);let n=t;t=e,e=n}else e===t&&(e=e===0?0:e-1,t=t===0?2:t+1);let f=[];d<1&&(d=1);let p=d,m=Math.abs(t-e),h=.15;!s&&e>0&&e/m<h&&(e=0,s=!0),!c&&t<0&&-t/m<h&&(t=0,c=!0),m=Math.abs(t-e);let g=m/p,_=g,v=Math.floor(Math.log10(_)),b=10**v,x=Math.ceil(_/b);if(x=k[i.yValueDecimal===0?0:1][x],_=x*b,g=_,i.isBarHorizontal&&a.stepSize&&a.type!==`datetime`?(g=a.stepSize,l=!0):l&&(g=a.stepSize),l&&a.forceNiceScale&&(g*=10**(v-Math.floor(Math.log10(g)))),s&&c){let e=m/p;if(u)if(l)if(y.mod(m,g)!=0){let t=y.getGCD(g,e);g=e/t<10?t:e}else y.mod(g,e)==0?g=e:(e=g,u=!1);else g=e;else if(l)y.mod(m,g)==0?e=g:g=e;else if(y.mod(m,g)==0)e=g;else{p=Math.ceil(m/g),e=m/p;let t=y.getGCD(m,g);m/t<o&&(e=t),g=e}p=Math.round(m/g)}else{if(!s&&!c)if(i.isMultipleYAxis&&u){let n=g*Math.floor(e/g),r=n+g*p;r<t&&(g*=2),e=n,r=t,t=e+g*p,m=Math.abs(t-e),e>0&&e<Math.abs(r-t)&&(e=0,t=g*p),t<0&&-t<Math.abs(n-e)&&(t=0,e=-g*p)}else e=g*Math.floor(e/g),t=g*Math.ceil(t/g);else if(c)if(u)e=t-g*p;else{let n=e;e=g*Math.floor(e/g),Math.abs(t-e)/y.getGCD(m,g)>o&&(e=t-g*d,e+=g*Math.floor((n-e)/g))}else if(s)if(u)t=e+g*p;else{let n=t;t=g*Math.ceil(t/g),Math.abs(t-e)/y.getGCD(m,g)>o&&(t=e+g*d,t+=g*Math.ceil((n-t)/g))}m=Math.abs(t-e),g=y.getGCD(m,g),p=Math.round(m/g)}if(!u&&!(s||c)&&(p=Math.ceil((m-1e-11)/(g+1e-11)),p>16&&y.getPrimeFactors(p).length<2&&p++),!u&&a.forceNiceScale&&i.yValueDecimal===0&&p>m&&(p=m,g=Math.round(m/p)),p>o&&(!(u||l)||a.forceNiceScale)){let e=y.getPrimeFactors(p),t=e.length-1,n=p;t:for(var S=0;S<t;S++)for(var C=0;C<=t-S;C++){let r=Math.min(C+S,t),i=n,a=1;for(var w=C;w<=r;w++)a*=e[w];if(i/=a,i<o){n=i;break t}}g=n===p?m:m/n,p=Math.round(m/g)}i.isMultipleYAxis&&i.multiAxisTickAmount==0&&i.ignoreYAxisIndexes.indexOf(n)<0&&(i.multiAxisTickAmount=p);let T=e-g,E=g*1e-11;do T+=g,f.push(y.stripNumber(T,7));while(t-T>E);return{result:f,niceMin:f[0],niceMax:f[f.length-1]}}linearScale(e,t,n=10,r=0,i=void 0){let a=Math.abs(t-e),o=[];if(e===t)return o=[e],{result:o,niceMin:o[0],niceMax:o[o.length-1]};if(n=this._adjustTicksForSmallRange(n,r,a),n===`dataPoints`&&(n=this.w.globals.dataPoints-1),i||=a/n,i!==0&&isFinite(i)){let e=10**Math.max(2,-Math.floor(Math.log10(Math.abs(i)))+2);i=Math.round((i+2**-52)*e)/e}n===Number.MAX_VALUE&&(n=5,i=1);let s=e;for(;n>=0;)o.push(s),s=y.preciseAddition(s,i),--n;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}logarithmicScaleNice(e,t,n){t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n));let r=[],i=Math.ceil(Math.log(t)/Math.log(n)+1),a=Math.floor(Math.log(e)/Math.log(n));for(let e=a;e<i;e++)r.push(n**+e);return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScale(e,t,n){t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n));let r=[],i=Math.log(t)/Math.log(n),a=Math.log(e)/Math.log(n),o=i-a,s=Math.round(o),c=o/s;for(let e=0,t=a;e<s;e++,t+=c)r.push(n**+t);return r.push(n**+i),{result:r,niceMin:e,niceMax:t}}_adjustTicksForSmallRange(e,t,n){let r=e;if(typeof t<`u`&&this.w.config.yaxis[t].labels.formatter&&this.w.config.yaxis[t].tickAmount===void 0){let e=Number(this.w.config.yaxis[t].labels.formatter(1));y.isNumber(e)&&this.w.globals.yValueDecimal===0&&(r=Math.ceil(n))}return r<e?r:e}setYScaleForIndex(e,t,n){let r=this.w.globals,i=this.w.config,a=r.isBarHorizontal?i.xaxis:i.yaxis[e];typeof r.yAxisScale[e]>`u`&&(r.yAxisScale[e]=[]);let o=Math.abs(n-t);a.logarithmic&&o<=5&&(r.invalidLogScale=!0),a.logarithmic&&o>5?(r.allSeriesCollapsed=!1,r.yAxisScale[e]=a.forceNiceScale?this.logarithmicScaleNice(t,n,a.logBase):this.logarithmicScale(t,n,a.logBase)):n===-Number.MAX_VALUE||!y.isNumber(n)||t===Number.MAX_VALUE||!y.isNumber(t)?r.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e):(r.allSeriesCollapsed=!1,r.yAxisScale[e]=this.niceScale(t,n,e))}setXScale(e,t){let n=this.w,r=n.globals;if(t===-Number.MAX_VALUE||!y.isNumber(t))r.xAxisScale=this.linearScale(0,10,10);else{let i=r.xTickAmount;r.xAxisScale=this.linearScale(e,t,i,0,n.config.xaxis.max===void 0?n.config.xaxis.stepSize:void 0)}return r.xAxisScale}scaleMultipleYAxes(){let e=this.w.config,t=this.w.globals;this.coreUtils.setSeriesYAxisMappings();let n=t.seriesYAxisMap,r=t.minYArr,i=t.maxYArr;t.allSeriesCollapsed=!0,t.barGroups=[],n.forEach((n,a)=>{let o=[];if(n.forEach(t=>{let n=e.series[t]?.group;o.indexOf(n)<0&&o.push(n)}),n.length>0){let s=Number.MAX_VALUE,c=-Number.MAX_VALUE,l=s,u=c,d,f;if(e.chart.stacked){let r=Array(t.dataPoints).fill(0),i=[],p=[],m=[];o.forEach(()=>{i.push(r.map(()=>Number.MIN_VALUE)),p.push(r.map(()=>Number.MIN_VALUE)),m.push(r.map(()=>Number.MIN_VALUE))});for(let r=0;r<n.length;r++){!d&&e.series[n[r]].type&&(d=e.series[n[r]].type);let s=n[r];f=e.series[s].group?e.series[s].group:`axis-${a}`,!(t.collapsedSeriesIndices.indexOf(s)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(s)<0)||(t.allSeriesCollapsed=!1,o.forEach((t,n)=>{if(e.series[s].group===t)for(let e=0;e<this.w.seriesData.series[s].length;e++){let t=this.w.seriesData.series[s][e];t>=0?p[n][e]+=t:m[n][e]+=t,i[n][e]+=t,l=Math.min(l,t),u=Math.max(u,t)}})),(d===`bar`||d===`column`)&&t.barGroups.push(f)}d||=e.chart.type,d===`bar`||d===`column`?o.forEach((e,t)=>{s=Math.min(s,Math.min.apply(null,m[t])),c=Math.max(c,Math.max.apply(null,p[t]))}):(o.forEach((e,t)=>{l=Math.min(l,Math.min.apply(null,i[t])),u=Math.max(u,Math.max.apply(null,i[t]))}),s=l,c=u),s===Number.MIN_VALUE&&c===Number.MIN_VALUE&&(c=-Number.MAX_VALUE)}else for(let e=0;e<n.length;e++){let a=n[e];s=Math.min(s,r[a]),c=Math.max(c,i[a]),!(t.collapsedSeriesIndices.indexOf(a)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(a)<0)||(t.allSeriesCollapsed=!1)}e.yaxis[a].min!==void 0&&(s=typeof e.yaxis[a].min==`function`?e.yaxis[a].min(s):e.yaxis[a].min),e.yaxis[a].max!==void 0&&(c=typeof e.yaxis[a].max==`function`?e.yaxis[a].max(c):e.yaxis[a].max),t.barGroups=t.barGroups.filter((e,t,n)=>n.indexOf(e)===t),this.setYScaleForIndex(a,s,c),n.forEach(e=>{r[e]=t.yAxisScale[a].niceMin,i[e]=t.yAxisScale[a].niceMax})}else this.setYScaleForIndex(a,0,-Number.MAX_VALUE)})}},ae=class{constructor(e){this.w=e,this.scales=new ie(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(e,t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=null){let i=this.w.config,a=this.w.globals,o=-Number.MAX_VALUE,s=Number.MIN_VALUE;r===null&&(r=e+1);let c=this.w.seriesData.series,l=c,u=c;i.chart.type===`candlestick`?(l=this.w.candleData.seriesCandleL,u=this.w.candleData.seriesCandleH):i.chart.type===`boxPlot`?(l=this.w.candleData.seriesCandleO,u=this.w.candleData.seriesCandleC):this.w.axisFlags.isRangeData&&(l=this.w.rangeData.seriesRangeStart,u=this.w.rangeData.seriesRangeEnd);let d=!1;if(this.w.seriesData.seriesX.length>=r){let e=a.brushSource?.w.config.chart.brush;(i.chart.zoom.enabled&&i.chart.zoom.autoScaleYaxis||e!=null&&e.enabled&&e!=null&&e.autoScaleYaxis)&&(d=!0)}for(let f=e;f<r;f++){a.dataPoints=Math.max(a.dataPoints,c[f].length);let e=i.series[f].type;this.w.labelData.categoryLabels.length&&(a.dataPoints=this.w.labelData.categoryLabels.filter(e=>typeof e<`u`).length),this.w.labelData.labels.length&&i.xaxis.type!==`datetime`&&this.w.seriesData.series.reduce((e,t)=>e+t.length,0)!==0&&(a.dataPoints=Math.max(a.dataPoints,this.w.labelData.labels.length));let r=0,p=c[f].length-1;if(d){if(i.xaxis.min)for(;r<p&&this.w.seriesData.seriesX[f][r]<i.xaxis.min;r++);if(i.xaxis.max)for(;p>r&&this.w.seriesData.seriesX[f][p]>i.xaxis.max;p--);}for(let i=r;i<=p&&i<this.w.seriesData.series[f].length;i++){let r=c[f][i];if(r!==null&&y.isNumber(r)){switch(typeof u[f]?.[i]<`u`&&(o=Math.max(o,u[f][i]),t=Math.min(t,u[f][i])),typeof l[f]?.[i]<`u`&&(t=Math.min(t,l[f][i]),n=Math.max(n,l[f][i])),e){case`candlestick`:typeof this.w.candleData.seriesCandleC[f][i]<`u`&&(o=Math.max(o,this.w.candleData.seriesCandleH[f][i]),t=Math.min(t,this.w.candleData.seriesCandleL[f][i]));break;case`boxPlot`:typeof this.w.candleData.seriesCandleC[f][i]<`u`&&(o=Math.max(o,this.w.candleData.seriesCandleC[f][i]),t=Math.min(t,this.w.candleData.seriesCandleO[f][i]));break}e&&e!==`candlestick`&&e!==`boxPlot`&&e!==`rangeArea`&&e!==`rangeBar`&&(o=Math.max(o,this.w.seriesData.series[f][i]),t=Math.min(t,this.w.seriesData.series[f][i])),this.w.seriesData.seriesGoals[f]&&this.w.seriesData.seriesGoals[f][i]&&Array.isArray(this.w.seriesData.seriesGoals[f][i])&&this.w.seriesData.seriesGoals[f][i].forEach(e=>{o=Math.max(o,e.value),t=Math.min(t,e.value)}),n=o,r=y.noExponents(r),y.isFloat(r)&&(a.yValueDecimal=Math.max(a.yValueDecimal,r.toString().split(`.`)[1].length)),s>l[f]?.[i]&&l[f]?.[i]<0&&(s=l[f][i])}else a.hasNullValues=!0}(e===`bar`||e===`column`)&&(s<0&&o<0&&(o=0,n=Math.max(n,0)),s===Number.MIN_VALUE&&(s=0,t=Math.min(t,0)))}return i.chart.type===`rangeBar`&&this.w.rangeData.seriesRangeStart.length&&a.isBarHorizontal&&(s=t),i.chart.type===`bar`&&(s<0&&o<0&&(o=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:o,lowestY:t,highestY:n}}setYRange(){let e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;let n=Number.MAX_VALUE,r;if(e.isMultipleYAxis){n=Number.MAX_VALUE;for(let t=0;t<this.w.seriesData.series.length;t++)r=this.getMinYMaxY(t),e.minYArr[t]=r.lowestY,e.maxYArr[t]=r.highestY,n=Math.min(n,r.lowestY)}return r=this.getMinYMaxY(0,n,null,this.w.seriesData.series.length),t.chart.type===`bar`?(e.minY=r.minY,e.maxY=r.maxY):(e.minY=r.lowestY,e.maxY=r.highestY),n=r.lowestY,t.chart.stacked&&this._setStackedMinMax(),t.chart.type===`line`||t.chart.type===`area`||t.chart.type===`scatter`||t.chart.type===`candlestick`||t.chart.type===`boxPlot`||t.chart.type===`rangeBar`&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&n!==-Number.MAX_VALUE&&n!==e.maxY&&(e.minY=n):e.minY=e.minY===Number.MIN_VALUE?r.minY:Math.min(r.minY,e.minY),t.yaxis.forEach((t,n)=>{t.max!==void 0&&(typeof t.max==`number`?e.maxYArr[n]=t.max:typeof t.max==`function`&&(e.maxYArr[n]=t.max(e.isMultipleYAxis?e.maxYArr[n]:e.maxY)),e.maxY=e.maxYArr[n]),t.min!==void 0&&(typeof t.min==`number`?e.minYArr[n]=t.min:typeof t.min==`function`&&(e.minYArr[n]=t.min(e.isMultipleYAxis?e.minYArr[n]===Number.MIN_VALUE?0:e.minYArr[n]:e.minY)),e.minY=e.minYArr[n])}),e.isBarHorizontal&&[`min`,`max`].forEach(n=>{t.xaxis[n]!==void 0&&typeof t.xaxis[n]==`number`&&(n===`min`?e.minY=t.xaxis[n]:e.maxY=t.xaxis[n])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=n):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],t.series.forEach(n=>{switch(n.type||t.chart.type){case`bar`:case`column`:e.barGroups.push(n.group);break;case`line`:e.lineGroups.push(n.group);break;case`area`:e.areaGroups.push(n.group);break}}),e.barGroups=e.barGroups.filter((e,t,n)=>n.indexOf(e)===t),e.lineGroups=e.lineGroups.filter((e,t,n)=>n.indexOf(e)===t),e.areaGroups=e.areaGroups.filter((e,t,n)=>n.indexOf(e)===t),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}setXRange(){let e=this.w.globals,t=this.w.config,n=t.xaxis.type===`numeric`||t.xaxis.type===`datetime`||t.xaxis.type===`category`&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric;if(this.w.axisFlags.isXNumeric&&(()=>{for(let t=0;t<this.w.seriesData.series.length;t++)if(this.w.labelData.labels[t])for(let n=0;n<this.w.labelData.labels[t].length;n++)this.w.labelData.labels[t][n]!==null&&y.isNumber(this.w.labelData.labels[t][n])&&(e.maxX=Math.max(e.maxX,this.w.labelData.labels[t][n]),e.initialMaxX=Math.max(e.maxX,this.w.labelData.labels[t][n]),e.minX=Math.min(e.minX,this.w.labelData.labels[t][n]),e.initialMinX=Math.min(e.minX,this.w.labelData.labels[t][n]))})(),this.w.axisFlags.noLabelsProvided&&t.xaxis.categories.length===0&&(e.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.minX=1,e.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let r=10;if(t.xaxis.tickAmount===void 0)r=Math.round(e.svgWidth/150),t.xaxis.type===`numeric`&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&e.dataPoints!==0&&(r=e.dataPoints-1);else if(t.xaxis.tickAmount===`dataPoints`){if(this.w.seriesData.series.length>1&&(r=this.w.seriesData.series[e.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){let t=Math.round(e.maxX-e.minX);t<30&&(r=t)}}else r=t.xaxis.tickAmount;if(e.xTickAmount=r,t.xaxis.max!==void 0&&typeof t.xaxis.max==`number`&&(e.maxX=t.xaxis.max),t.xaxis.min!==void 0&&typeof t.xaxis.min==`number`&&(e.minX=t.xaxis.min),t.xaxis.range!==void 0&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){let t=[];for(let n=e.minX-1;n<e.maxX;n++)t.push(n+1);e.xAxisScale={result:t,niceMin:t[0],niceMax:t[t.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,r,r,0,t.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,r-1,0,t.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());n&&(this.w.labelData.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&this.w.labelData.labels.length&&(e.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}setZRange(){let e=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let t=0;t<this.w.seriesData.series.length;t++)if(typeof this.w.seriesData.seriesZ[t]<`u`)for(let n=0;n<this.w.seriesData.seriesZ[t].length;n++)this.w.seriesData.seriesZ[t][n]!==null&&y.isNumber(this.w.seriesData.seriesZ[t][n])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][n]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][n]))}}_handleSingleDataPoint(){let e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){let n=new b(this.w);if(t.xaxis.type===`datetime`){let r=n.getDate(e.minX);t.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()-2):r.setDate(r.getDate()-2),e.minX=new Date(r).getTime();let i=n.getDate(e.maxX);t.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()+2):i.setDate(i.getDate()+2),e.maxX=new Date(i).getTime()}else (t.xaxis.type===`numeric`||t.xaxis.type===`category`&&!this.w.axisFlags.noLabelsProvided)&&(e.minX-=2,e.initialMinX=e.minX,e.maxX+=2,e.initialMaxX=e.maxX)}}_getMinXDiff(){let e=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach(t=>{if(t.length){t.length===1&&t.push(this.w.seriesData.seriesX[e.maxValsInArrayIndex][this.w.seriesData.seriesX[e.maxValsInArrayIndex].length-1]);let n=t.slice();n.sort((e,t)=>e-t),n.forEach((t,r)=>{if(r>0){let i=t-n[r-1];i>0&&(e.minXDiff=Math.min(i,e.minXDiff))}}),(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5)}})}_setStackedMinMax(){let e=this.w.globals;if(!this.w.seriesData.series.length)return;let t=this.w.labelData.seriesGroups;t.length||(t=[this.w.seriesData.seriesNames.map(e=>e)]);let n={},r={};t.forEach(t=>{n[t]=[],r[t]=[],this.w.config.series.map((e,n)=>t.indexOf(this.w.seriesData.seriesNames[n])>-1?n:null).filter(e=>e!==null).forEach(i=>{for(let a=0;a<this.w.seriesData.series[e.maxValsInArrayIndex].length;a++)typeof n[t][a]>`u`&&(n[t][a]=0,r[t][a]=0),(this.w.config.chart.stacked&&!e.comboCharts||this.w.config.chart.stacked&&e.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series?.[i]?.type===`bar`||this.w.config.series?.[i]?.type===`column`))&&this.w.seriesData.series[i][a]!==null&&y.isNumber(this.w.seriesData.series[i][a])&&(this.w.seriesData.series[i][a]>0?n[t][a]+=parseFloat(this.w.seriesData.series[i][a])+1e-4:r[t][a]+=parseFloat(this.w.seriesData.series[i][a]))})}),Object.entries(n).forEach(([t])=>{n[t].forEach((i,a)=>{e.maxY=Math.max(e.maxY,n[t][a]),e.minY=Math.min(e.minY,r[t][a])})})}};function oe(){return{palette1:[`#008FFB`,`#00E396`,`#FEB019`,`#FF4560`,`#775DD0`],palette2:[`#3F51B5`,`#03A9F4`,`#4CAF50`,`#F9CE1D`,`#FF9800`],palette3:[`#33B2DF`,`#546E7A`,`#D4526E`,`#13D8AA`,`#A5978B`],palette4:[`#4ECDC4`,`#C7F464`,`#81D4FA`,`#FD6A6A`,`#546E7A`],palette5:[`#2B908F`,`#F9A3A4`,`#90EE7E`,`#FA4443`,`#69D2E7`],palette6:[`#449DD1`,`#F86624`,`#EA3546`,`#662E9B`,`#C5D86D`],palette7:[`#D7263D`,`#1B998B`,`#2E294E`,`#F46036`,`#E2C044`],palette8:[`#662E9B`,`#F86624`,`#F9C80E`,`#EA3546`,`#43BCCD`],palette9:[`#5C4742`,`#A5978B`,`#8D5B4C`,`#5A2A27`,`#C4BBAF`],palette10:[`#A300D6`,`#7D02EB`,`#5653FE`,`#2983FF`,`#00B1F2`],cvdDeuteranopia:[`#0072B2`,`#E69F00`,`#56B4E9`,`#009E73`,`#F0E442`,`#D55E00`,`#CC79A7`],cvdProtanopia:[`#0077BB`,`#EE7733`,`#009988`,`#EE3377`,`#BBBBBB`,`#33BBEE`,`#CC3311`],cvdTritanopia:[`#CC3311`,`#009988`,`#EE7733`,`#0077BB`,`#EE3377`,`#BBBBBB`,`#33BBEE`],highContrast:[`#005A9C`,`#C00000`,`#007A33`,`#6C3483`,`#7B3F00`,`#0097A7`,`#4A235A`]}}var se=class{constructor(e,{theme:t=null,timeScale:n=null}={},r){this.w=e,this.elgrid=r,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.axisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=e.config.chart.type===`bar`&&e.config.plotOptions.bar.horizontal,this.xAxisoffX=e.config.xaxis.position===`bottom`?e.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new H(e,{theme:t,timeScale:n})}drawYaxis(e){let t=this.w,n=new I(this.w),r=t.config.yaxis[e].labels.style,{fontSize:i,fontFamily:a,fontWeight:o}=r,s=n.group({class:`apexcharts-yaxis`,rel:e,transform:`translate(${t.globals.translateYAxisX[e]}, 0)`});if(this.axesUtils.isYAxisHidden(e))return s;let c=n.group({class:`apexcharts-yaxis-texts-g`});s.add(c);let l=t.globals.yAxisScale[e].result.length-1,u=t.layout.gridHeight/l,d=t.formatters.yLabelFormatters[e],f=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice());if(t.config.yaxis[e].labels.show){let s=t.layout.translateY+t.config.yaxis[e].labels.offsetY;t.globals.isBarHorizontal?s=0:t.config.chart.type===`heatmap`&&(s-=u/2),s+=parseInt(i,10)/3;let p=null;for(let m=l;m>=0;m--){let l=d(f[m],m,t),h=t.config.yaxis[e].labels.padding;t.config.yaxis[e].opposite&&t.config.yaxis.length!==0&&(h*=-1);let g=this.getTextAnchor(t.config.yaxis[e].labels.align,t.config.yaxis[e].opposite),_=this.axesUtils.getYAxisForeColor(r.colors,e),v=Array.isArray(_)?_[m]:_,y=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-label tspan`)).map(e=>e.textContent),b=n.drawText({x:h,y:s,text:y.includes(l)&&!t.config.yaxis[e].labels.showDuplicates?``:l,textAnchor:g,fontSize:i,fontFamily:a,fontWeight:o,maxWidth:t.config.yaxis[e].labels.maxWidth,foreColor:v,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${r.cssClass}`});c.add(b),this.addTooltip(b,l),p===null&&(p=b),t.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(n,b,p,t.config.yaxis[e].labels.rotate),s+=u}}return this.addYAxisTitle(n,s,e),this.addAxisBorder(n,s,e,l,u),s}getTextAnchor(e,t){return e===`left`?`start`:e===`center`?`middle`:e===`right`?`end`:t?`start`:`end`}addTooltip(e,t){let n=v.createElementNS(L,`title`);n.textContent=Array.isArray(t)?t.join(` `):t,e.node.appendChild(n)}rotateLabel(e,t,n,r){let i=e.rotateAroundCenter(n.node),a=e.rotateAroundCenter(t.node);t.node.setAttribute(`transform`,`rotate(${r} ${i.x} ${a.y})`)}addYAxisTitle(e,t,n){let r=this.w;if(r.config.yaxis[n].title.text!==void 0){let i=e.group({class:`apexcharts-yaxis-title`}),a=r.config.yaxis[n].opposite?r.globals.translateYAxisX[n]:0,o=e.drawText({x:a,y:r.layout.gridHeight/2+r.layout.translateY+r.config.yaxis[n].title.offsetY,text:r.config.yaxis[n].title.text,textAnchor:`end`,foreColor:r.config.yaxis[n].title.style.color,fontSize:r.config.yaxis[n].title.style.fontSize,fontWeight:r.config.yaxis[n].title.style.fontWeight,fontFamily:r.config.yaxis[n].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${r.config.yaxis[n].title.style.cssClass}`});i.add(o),t.add(i)}}addAxisBorder(e,t,n,r,i){let a=this.w,o=a.config.yaxis[n].axisBorder,s=31+o.offsetX;if(a.config.yaxis[n].opposite&&(s=-31-o.offsetX),o.show){let n=e.drawLine(s,a.layout.translateY+o.offsetY-2,s,a.layout.gridHeight+a.layout.translateY+o.offsetY+2,o.color,0,o.width);t.add(n)}a.config.yaxis[n].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,r,o,a.config.yaxis[n].axisTicks,n,i,t)}drawYaxisInversed(e){let t=this.w,n=new I(this.w),r=n.group({class:`apexcharts-xaxis apexcharts-yaxis-inversed`}),i=n.group({class:`apexcharts-xaxis-texts-g`,transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});r.add(i);let a=t.globals.yAxisScale[e].result.length-1,o=t.layout.gridWidth/a+.1,s=o+t.config.xaxis.labels.offsetX,c=t.formatters.xLabelFormatter,l=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice()),u=t.labelData.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),l=u.slice(),a=l.length),t.config.xaxis.labels.show)for(let r=u.length?0:a;u.length?r<u.length:r>=0;u.length?r++:r--){let a=c(l[r],r,t),d=t.layout.gridWidth+t.globals.padHorizontal-(s-o+t.config.xaxis.labels.offsetX);if(u.length){let e=this.axesUtils.getLabel(l,u,d,r,this.drawnLabels,this.xaxisFontSize);d=e.x,a=e.text,this.drawnLabels.push(e.text),r===0&&t.globals.skipFirstTimelinelabel&&(a=``),r===l.length-1&&t.globals.skipLastTimelinelabel&&(a=``)}let f=n.drawText({x:d,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-(t.config.xaxis.position===`top`?t.layout.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:a,textAnchor:`middle`,foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${t.config.xaxis.labels.style.cssClass}`});i.add(f),this.addTooltip(f,a),s+=o}return this.inversedYAxisTitleText(r),this.inversedYAxisBorder(r),r}inversedYAxisBorder(e){let t=this.w,n=new I(this.w),r=t.config.xaxis.axisBorder;if(r.show){let i=0;t.config.chart.type===`bar`&&t.axisFlags.isXNumeric&&(i-=15);let a=n.drawLine(t.globals.padHorizontal+i+r.offsetX,this.xAxisoffX,t.layout.gridWidth,this.xAxisoffX,r.color,0,r.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):e.add(a)}}inversedYAxisTitleText(e){let t=this.w,n=new I(this.w);if(t.config.xaxis.title.text!==void 0){let r=n.group({class:`apexcharts-xaxis-title apexcharts-yaxis-title-inversed`}),i=n.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:`middle`,fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${t.config.xaxis.title.style.cssClass}`});r.add(i),e.add(r)}}yAxisTitleRotate(e,t){let n=this.w,r=new I(this.w),i=n.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),a=i?i.getBoundingClientRect():{width:0,height:0},o=n.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-title text`),s=o?o.getBoundingClientRect():{width:0,height:0};if(o){let i=this.xPaddingForYAxisTitle(e,a,s,t);o.setAttribute(`x`,i.xPos-(t?10:0));let c=r.rotateAroundCenter(o);o.setAttribute(`transform`,`rotate(${t?n.config.yaxis[e].title.rotate*-1:n.config.yaxis[e].title.rotate} ${c.x} ${c.y})`)}}xPaddingForYAxisTitle(e,t,n,r){let i=this.w,a=0,o=10;return i.config.yaxis[e].title.text===void 0||e<0?{xPos:a,padd:0}:(r?a=t.width+i.config.yaxis[e].title.offsetX+n.width/2+o/2:(a=t.width*-1+i.config.yaxis[e].title.offsetX+o/2+n.width/2,i.globals.isBarHorizontal&&(o=25,a=t.width*-1-i.config.yaxis[e].title.offsetX-o)),{xPos:a,padd:o})}setYAxisXPosition(e,t){let n=this.w,r=0,i=0,a=18,o=1;n.config.yaxis.length>1&&(this.multipleYs=!0),n.config.yaxis.forEach((s,c)=>{let l=n.globals.ignoreYAxisIndexes.includes(c)||!s.show||s.floating||e[c].width===0,u=e[c].width+t[c].width;s.opposite?n.globals.isBarHorizontal?(i=n.layout.gridWidth+n.layout.translateX-1,n.globals.translateYAxisX[c]=i-s.labels.offsetX):(i=n.layout.gridWidth+n.layout.translateX+o,l||(o+=u+20),n.globals.translateYAxisX[c]=i-s.labels.offsetX+20):(r=n.layout.translateX-a,l||(a+=u+20),n.globals.translateYAxisX[c]=r+s.labels.offsetX)})}setYAxisTextAlignments(){let e=this.w;Array.from(e.dom.baseEl.getElementsByClassName(`apexcharts-yaxis`)).forEach((t,n)=>{let r=e.config.yaxis[n];if(r&&!r.floating&&r.labels.align!==void 0){let t=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${n}'] .apexcharts-yaxis-texts-g`),i=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${n}'] .apexcharts-yaxis-label`)),a=t.getBoundingClientRect();i.forEach(e=>{e.setAttribute(`text-anchor`,r.labels.align)}),r.labels.align===`left`&&!r.opposite?t.setAttribute(`transform`,`translate(-${a.width}, 0)`):r.labels.align===`center`?t.setAttribute(`transform`,`translate(${a.width/2*(r.opposite?1:-1)}, 0)`):r.labels.align===`right`&&r.opposite&&t.setAttribute(`transform`,`translate(${a.width}, 0)`)}})}},ce=class{constructor(e,t){this.w=e,this.ctx=t,this.documentEvent=this.documentEvent.bind(this)}addEventListener(e,t){let n=this.w;Object.prototype.hasOwnProperty.call(n.globals.events,e)?n.globals.events[e].push(t):n.globals.events[e]=[t]}removeEventListener(e,t){let n=this.w;if(!Object.prototype.hasOwnProperty.call(n.globals.events,e))return;let r=n.globals.events[e].indexOf(t);r!==-1&&n.globals.events[e].splice(r,1)}fireEvent(e,t){let n=this.w;if(!Object.prototype.hasOwnProperty.call(n.globals.events,e))return;(!t||!t.length)&&(t=[]);let r=n.globals.events[e],i=r.length;for(let e=0;e<i;e++)r[e].apply(null,t)}setupEventHandlers(){let e=this.w,t=this.ctx,n=e.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach(r=>{n.addEventListener(r,n=>{let r=n.target.getAttribute(`i`)===null&&e.interact.capturedSeriesIndex!==-1?e.interact.capturedSeriesIndex:n.target.getAttribute(`i`),i=n.target.getAttribute(`j`)===null&&e.interact.capturedDataPointIndex!==-1?e.interact.capturedDataPointIndex:n.target.getAttribute(`j`),a=Object.assign({},e,{seriesIndex:e.globals.axisCharts?r:0,dataPointIndex:i});n.type===`keydown`?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(t.ctx.keyboardNavigation&&t.ctx.keyboardNavigation.handleKey(n),typeof e.config.chart.events.keyDown==`function`&&e.config.chart.events.keyDown(n,t,a),t.ctx.events.fireEvent(`keydown`,[n,t,a])):n.type===`keyup`?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(typeof e.config.chart.events.keyUp==`function`&&e.config.chart.events.keyUp(n,t,a),t.ctx.events.fireEvent(`keyup`,[n,t,a])):n.type===`mousemove`||n.type===`touchmove`?typeof e.config.chart.events.mouseMove==`function`&&e.config.chart.events.mouseMove(n,t,a):n.type===`mouseleave`||n.type===`touchleave`?typeof e.config.chart.events.mouseLeave==`function`&&e.config.chart.events.mouseLeave(n,t,a):(n.type===`mouseup`&&n.which===1||n.type===`touchend`)&&(typeof e.config.chart.events.click==`function`&&e.config.chart.events.click(n,t,a),t.ctx.events.fireEvent(`click`,[n,t,a]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(t=>{e.dom.baseEl.addEventListener(t,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(e){let t=this.w,n=e.target.className;if(e.type===`click`){let e=t.dom.baseEl.querySelector(`.apexcharts-menu`);e&&e.classList.contains(`apexcharts-menu-open`)&&n!==`apexcharts-menu-icon`&&e.classList.remove(`apexcharts-menu-open`)}t.interact.clientX=e.type===`touchmove`?e.touches[0].clientX:e.clientX,t.interact.clientY=e.type===`touchmove`?e.touches[0].clientY:e.clientY}},le=class{constructor(e){this.w=e}setCurrentLocaleValues(e){let t=this.w.config.chart.locales,n=d.getApex();n.chart&&n.chart.locales&&n.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(n.chart.locales));let r=t.filter(t=>t.name===e)[0];if(r){let e=y.extend(T,r);this.w.globals.locale=e.options}else throw Error(`Wrong locale name provided. Please make sure you set the correct locale name in options`)}},ue=class{constructor(e,t){this.w=e,this.ctx=t}drawAxis(e,t){let n=this.w.globals,r=this.w.config,i=new U(this.w,this.ctx,t),a=new se(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},t);if(n.axisCharts&&e!==`radar`){let e,t;n.isBarHorizontal?(t=a.drawYaxisInversed(0),e=i.drawXaxisInversed(0),this.w.dom.elGraphical.add(e),this.w.dom.elGraphical.add(t)):(e=i.drawXaxis(),this.w.dom.elGraphical.add(e),r.yaxis.map((e,r)=>{if(n.ignoreYAxisIndexes.indexOf(r)===-1&&(t=a.drawYaxis(r),this.w.dom.Paper.add(t),this.w.config.grid.position===`back`)){let e=this.w.dom.Paper.children()[1];e&&(e.remove(),this.w.dom.Paper.add(e))}}))}}},de=class{constructor(e){this.w=e}drawXCrosshairs(){let e=this.w,t=new I(this.w),n=new F(this.w),r=e.config.xaxis.crosshairs.fill.gradient,i=e.config.xaxis.crosshairs.dropShadow,a=e.config.xaxis.crosshairs.fill.type,o=r.colorFrom,s=r.colorTo,c=r.opacityFrom,l=r.opacityTo,u=r.stops,d=i.enabled,f=i.left,p=i.top,m=i.blur,h=i.color,g=i.opacity,_=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){a===`gradient`&&(_=t.drawGradient(`vertical`,o,s,c,l,null,u,null));let r=t.drawRect();e.config.xaxis.crosshairs.width===1&&(r=t.drawLine());let i=e.layout.gridHeight;(!y.isNumber(i)||i<0)&&(i=0);let v=e.config.xaxis.crosshairs.width;(!y.isNumber(v)||v<0)&&(v=0),r.attr({class:`apexcharts-xcrosshairs`,x:0,y:0,y2:i,width:v,height:i,fill:_,filter:`none`,"fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),d&&(r=n.dropShadow(r,{left:f,top:p,blur:m,color:h,opacity:g})),e.dom.elGraphical.add(r)}}drawYCrosshairs(){let e=this.w,t=new I(this.w),n=e.config.yaxis[0].crosshairs,r=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){let i=t.drawLine(-r,0,e.layout.gridWidth+r,0,n.stroke.color,n.stroke.dashArray,n.stroke.width);i.attr({class:`apexcharts-ycrosshairs`}),e.dom.elGraphical.add(i)}let i=t.drawLine(-r,0,e.layout.gridWidth+r,0,n.stroke.color,0,0);i.attr({class:`apexcharts-ycrosshairs-hidden`}),e.dom.elGraphical.add(i)}},fe=class{constructor(e){this.w=e}checkResponsiveConfig(e){let t=this.w,n=t.config;if(n.responsive.length===0)return;let r=n.responsive.slice();r.sort((e,t)=>e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0).reverse();let i=new D({}),a=(e={})=>{let n=r[0].breakpoint,a=d.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(a>n){let n=y.clone(t.globals.initialConfig);n.series=y.clone(t.config.series);let r=N.extendArrayProps(i,n,t);e=y.extend(r,e),e=y.extend(t.config,e),this.overrideResponsiveOptions(e)}else for(let n=0;n<r.length;n++)a<r[n].breakpoint&&(e=N.extendArrayProps(i,r[n].options,t),e=y.extend(t.config,e),this.overrideResponsiveOptions(e))};if(e){let n=N.extendArrayProps(i,e,t);n=y.extend(t.config,n),n=y.extend(n,e),a(n)}else a({})}overrideResponsiveOptions(e){let t=new D(e).init({responsiveOverride:!0});this.w.config=t}},W=class e{constructor(e,{toggleDataSeries:t,revertDefaultAxisMinMax:n,updateSeries:r}={}){this.w=e,this._toggleDataSeries=t||null,this._revertDefaultAxisMinMax=n||null,this._updateSeries=r||null,this.legendInactiveClass=`legend-mouseover-inactive`}clearSeriesCache(){let e=this.w;e.globals.cachedSelectors&&(delete e.globals.cachedSelectors.allSeriesEls,delete e.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){let e=this.w,t=`allSeriesEls`;return e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=e.dom.baseEl.getElementsByClassName(`apexcharts-series`)),e.globals.cachedSelectors[t]}getSeriesByName(e){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${y.escapeString(e)}']`)}isSeriesHidden(e){let t=this.getSeriesByName(e),n=parseInt(t.getAttribute(`data:realIndex`),10);return{isHidden:t.classList.contains(`apexcharts-series-collapsed`),realIndex:n}}addCollapsedClassToSeries(t,n){e.addCollapsedClassToSeries(this.w,t,n)}static addCollapsedClassToSeries(e,t,n){function r(e){for(let r=0;r<e.length;r++)e[r].index===n&&t.node.classList.add(`apexcharts-series-collapsed`)}r(e.globals.collapsedSeries),r(e.globals.ancillaryCollapsedSeries)}toggleSeries(e){var t;let n=this.isSeriesHidden(e);return(t=this._toggleDataSeries)==null||t.call(this,n.realIndex,n.isHidden),n.isHidden}showSeries(e){var t;let n=this.isSeriesHidden(e);n.isHidden&&((t=this._toggleDataSeries)==null||t.call(this,n.realIndex,!0))}hideSeries(e){var t;let n=this.isSeriesHidden(e);n.isHidden||(t=this._toggleDataSeries)==null||t.call(this,n.realIndex,!1)}resetSeries(e=!0,t=!0,n=!0){var r,i;let a=this.w;this.clearSeriesCache();let o=y.clone(a.globals.initialSeries);a.globals.previousPaths=[],n?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),a.config.series=o,e&&(t&&(a.interact.zoomed=!1,(r=this._revertDefaultAxisMinMax)==null||r.call(this)),(i=this._updateSeries)==null||i.call(this,o,a.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(e){let t=this.w;for(let n=0;n<e.length;n++)t.globals.collapsedSeriesIndices.indexOf(n)>-1&&(e[n].data=[]);return e}highlightSeries(e){let t=this.w,n=this.getSeriesByName(e),r=parseInt(n?.getAttribute(`data:realIndex`),10),i=`highlightSeriesEls`,a=t.globals.cachedSelectors[i];a||(a=t.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`),t.globals.cachedSelectors[i]=a);let o=null,s=null,c=null;if(t.globals.axisCharts||t.config.chart.type===`radialBar`)if(t.globals.axisCharts){o=t.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${r}']`),s=t.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${r}']`);let e=t.globals.seriesYAxisReverseMap[r];c=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}']`)}else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}']`);else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}'] path`);for(let e=0;e<a.length;e++)a[e].classList.add(this.legendInactiveClass);if(o)t.globals.axisCharts||o.parentNode.classList.remove(this.legendInactiveClass),o.classList.remove(this.legendInactiveClass),s!==null&&s.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass);else for(let e=0;e<a.length;e++)a[e].classList.remove(this.legendInactiveClass)}toggleSeriesOnHover(e,t){let n=this.w;t||=e.target;let r=n.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`);if(e.type===`mousemove`){let e=parseInt(t.getAttribute(`rel`),10)-1;this.highlightSeries(n.seriesData.seriesNames[e])}else if(e.type===`mouseout`)for(let e=0;e<r.length;e++)r[e].classList.remove(this.legendInactiveClass)}highlightRangeInSeries(e,t){let n=this.w,r=n.dom.baseEl.getElementsByClassName(`apexcharts-heatmap-rect`),i=e=>{for(let t=0;t<r.length;t++)r[t].classList[e](this.legendInactiveClass)},a=(e,t)=>{for(let n=0;n<r.length;n++){let i=Number(r[n].getAttribute(`val`));i>=e.from&&(i<e.to||e.to===t&&i===t)&&r[n].classList.remove(this.legendInactiveClass)}};if(e.type===`mousemove`){let e=parseInt(t.getAttribute(`rel`),10)-1;i(`add`);let r=n.config.plotOptions.heatmap.colorScale.ranges,o=r[e];a(o,r.reduce((e,t)=>Math.max(e,t.to),0))}else e.type===`mouseout`&&i(`remove`)}getActiveConfigSeriesIndex(e=`asc`,t=[]){let n=this.w,r=0;if(n.config.series.length>1){let i=n.config.series.map((e,r)=>e.data&&e.data.length>0&&n.globals.collapsedSeriesIndices.indexOf(r)===-1&&(!n.globals.comboCharts||t.length===0||t.length&&t.indexOf(n.config.series[r].type)>-1)?r:-1);for(let t=e===`asc`?0:i.length-1;e===`asc`?t<i.length:t>=0;e===`asc`?t++:t--)if(i[t]!==-1){r=i[t];break}}return r}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,t)=>e.type===`bar`||e.type===`column`?t:-1).filter(e=>e!==-1):this.w.config.series.map((e,t)=>t)}getPreviousPaths(){let e=this.w;e.globals.previousPaths=[];function t(t,n,r){let i=t[n].childNodes,a={type:r,paths:[],realIndex:t[n].getAttribute(`data:realIndex`)};for(let e=0;e<i.length;e++)if(i[e].hasAttribute(`pathTo`)){let t=i[e].getAttribute(`pathTo`);a.paths.push({d:t})}e.globals.previousPaths.push(a)}let n=t=>e.dom.baseEl.querySelectorAll(`.apexcharts-${t}-series .apexcharts-series`);[`line`,`area`,`bar`,`rangebar`,`rangeArea`,`candlestick`,`radar`].forEach(e=>{let r=n(e);for(let n=0;n<r.length;n++)t(r,n,e)});let r=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series`);if(r.length>0)for(let t=0;t<r.length;t++){let n=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series[data\\:realIndex='${t}'] rect`),r=[];for(let e=0;e<n.length;e++){let t=t=>n[e].getAttribute(t),i={x:parseFloat(t(`x`)),y:parseFloat(t(`y`)),width:parseFloat(t(`width`)),height:parseFloat(t(`height`))};r.push({rect:i,color:n[e].getAttribute(`color`)})}e.globals.previousPaths.push(r)}e.globals.axisCharts||(e.globals.previousPaths=e.seriesData.series)}clearPreviousPaths(){let e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}handleNoData(){let e=this.w,t=this,n=e.config.noData,r=new I(t.w),i=e.globals.svgWidth/2,a=e.globals.svgHeight/2,o=`middle`;if(e.globals.noData=!0,e.globals.animationEnded=!0,n.align===`left`?(i=10,o=`start`):n.align===`right`&&(i=e.globals.svgWidth-10,o=`end`),n.verticalAlign===`top`?a=50:n.verticalAlign===`bottom`&&(a=e.globals.svgHeight-50),i+=n.offsetX,a=a+parseInt(n.style.fontSize,10)+2+n.offsetY,n.text!==void 0&&n.text!==``){let t=r.drawText({x:i,y:a,text:n.text,textAnchor:o,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,foreColor:n.style.color,opacity:1,class:`apexcharts-text-nodata`});e.dom.Paper.add(t)}}setNullSeriesToZeroValues(e){let t=this.w;for(let n=0;n<e.length;n++)if(e[n].length===0)for(let r=0;r<e[t.globals.maxValsInArrayIndex].length;r++)e[n].push(0);return e}hasAllSeriesEqualX(){let e=!0,t=this.w,n=this.filteredSeriesX();for(let t=0;t<n.length-1;t++)if(n[t][0]!==n[t+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}filteredSeriesX(){return this.w.seriesData.seriesX.map(e=>e.length>0?e:[])}},pe=class{constructor(e){this.w=e,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){let{chart:e,plotOptions:t}=this.w.config;return e.type===`treemap`&&t.treemap&&t.treemap.distributed||e.type===`heatmap`&&t.heatmap&&t.heatmap.distributed}checkBarDistributed(){let{chart:e,plotOptions:t}=this.w.config;return t.bar&&t.bar.distributed&&(e.type===`bar`||e.type===`rangeBar`)}init(){this.setDefaultColors()}setDefaultColors(){let e=this.w,t=new y;e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||`light`}`);let n=e.config.theme.accessibility?.colorBlindMode;if(n){e.globals.colors=this.getColorBlindColors(n),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);let t=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes([`fill`,`stroke`],t),this.applyDataLabelsColors(t),this.applyRadarPolygonsColors(),this.applyMarkersColors(t),n===`highContrast`&&e.dom.elWrap.classList.add(`apexcharts-high-contrast`);return}let r=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(r),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,t));let i=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes([`fill`,`stroke`],i),this.applyDataLabelsColors(i),this.applyRadarPolygonsColors(),this.applyMarkersColors(i)}getColors(e){let t=this.w;return!e||e.length===0?this.predefined():Array.isArray(e)&&e.length>0&&typeof e[0]==`function`?(this.isColorFn=!0,t.config.series.map((n,r)=>{let i=e[r]||e[0];return typeof i==`function`?i({value:t.globals.axisCharts?t.seriesData.series[r][0]||0:t.seriesData.series[r],seriesIndex:r,dataPointIndex:r,w:this.w}):i})):e}applySeriesColors(e,t){e.forEach((e,n)=>{e&&(t[n]=e)})}getMonochromeColors(e,t,n){let{color:r,shadeIntensity:i,shadeTo:a}=e,o=this.isBarDistributed||this.isHeatmapDistributed?t[0].length*t.length:t.length,s=1/(o/i),c=0;return Array.from({length:o},()=>{let e=a===`dark`?n.shadeColor(c*-1,r):n.shadeColor(c,r);return c+=s,e})}applyColorTypes(e,t){let n=this.w;e.forEach(e=>{n.globals[e].colors=n.config[e].colors===void 0?this.isColorFn?n.config.colors:t:n.config[e].colors.slice(),this.pushExtraColors(n.globals[e].colors)})}applyDataLabelsColors(e){let t=this.w;t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors===void 0?e:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){let e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode===`dark`?`#343A3F`:`none`]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}applyMarkersColors(e){let t=this.w;t.globals.markers.colors=t.config.markers.colors===void 0?e:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}pushExtraColors(e,t,n=null){let r=this.w,i=t||r.seriesData.series.length;if(n===null&&(n=this.isBarDistributed||this.isHeatmapDistributed||r.config.chart.type===`heatmap`&&r.config.plotOptions.heatmap&&r.config.plotOptions.heatmap.colorScale.inverse),n&&r.seriesData.series.length&&(i=r.seriesData.series[r.globals.maxValsInArrayIndex].length*r.seriesData.series.length),e.length<i){let t=i-e.length;for(let n=0;n<t;n++)e.push(e[n])}}getColorBlindColors(e){let t=oe();return({deuteranopia:t.cvdDeuteranopia,protanopia:t.cvdProtanopia,tritanopia:t.cvdTritanopia,highContrast:t.highContrast}[e]||t.palette1).slice()}updateThemeOptions(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};let t=e.theme.mode,n=t===`dark`?`palette4`:t===`light`?`palette1`:e.theme.palette||`palette1`,r=t===`dark`?`#f6f7f8`:t===`light`?`#373d3f`:e.chart.foreColor||`#373d3f`;return e.tooltip.theme=t||`light`,e.chart.foreColor=r,e.theme.palette=n,e}predefined(){let e=this.w.config.theme.palette,t=oe();return t[e]||t.palette1}},me=class{constructor(e){this.w=e}draw(){this.drawTitleSubtitle(`title`),this.drawTitleSubtitle(`subtitle`)}drawTitleSubtitle(e){let t=this.w,n=e===`title`?t.config.title:t.config.subtitle,r=t.globals.svgWidth/2,i=n.offsetY,a=`middle`;if(n.align===`left`?(r=10,a=`start`):n.align===`right`&&(r=t.globals.svgWidth-10,a=`end`),r+=n.offsetX,i=i+parseInt(n.style.fontSize,10)+n.margin/2,n.text!==void 0){let o=new I(this.w).drawText({x:r,y:i,text:n.text,textAnchor:a,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,fontWeight:n.style.fontWeight,foreColor:n.style.color,opacity:1});o.node.setAttribute(`class`,`apexcharts-${e}-text`),t.dom.Paper.add(o)}}},he=class{constructor(e){this.w=e.w,this.dCtx=e}getTitleSubtitleCoords(e){let t=this.w,n=0,r=0,i=e===`title`?t.config.title.floating:t.config.subtitle.floating,a=t.dom.baseEl.querySelector(`.apexcharts-${e}-text`);if(a!==null&&!i){let e=a.getBoundingClientRect();n=e.width,r=t.globals.axisCharts?e.height+5:e.height}return{width:n,height:r}}getLegendsRect(){let e=this.w,t=e.dom.elLegendWrap;!e.config.legend.height&&(e.config.legend.position===`top`||e.config.legend.position===`bottom`)&&(t.style.maxHeight=e.globals.svgHeight/2+`px`);let n=Object.assign({},y.getBoundingClientRect(t));return t!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:n.x,y:n.y,height:n.height,width:n.height===0?0:n.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},(e.config.legend.position===`left`||e.config.legend.position===`right`)&&this.dCtx.lgRect.width*1.5>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){let e=this.w,t=[];e.config.series.forEach((n,r)=>{n.data.forEach((n,i)=>{let a=(t=>e.config.dataLabels.formatter(t,{seriesIndex:r,dataPointIndex:i,w:e}))(e.seriesData.series[r][i]);t.push(a)})});let n=y.getLargestStringFromArr(t),r=new I(this.w),i=e.config.dataLabels.style,a=r.getTextRects(n,parseInt(i.fontSize),i.fontFamily);return{width:a.width*1.05,height:a.height}}getLargestStringFromMultiArr(e,t){let n=this.w,r=e;if(n.axisFlags.isMultiLineX){let e=t.map(e=>Array.isArray(e)?e.length:1),n=Math.max(...e);r=t[e.indexOf(n)]}return r}},ge=class{constructor(e){this.w=e.w,this.dCtx=e}getxAxisLabelsCoords(){let e=this.w,t=e.labelData.labels.slice();e.config.xaxis.convertedCatToNumeric&&t.length===0&&(t=e.labelData.categoryLabels);let n;if(e.labelData.timescaleLabels.length>0){let t=this.getxAxisTimeScaleLabelsCoords();n={width:t.width,height:t.height},e.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(e.config.legend.position===`left`||e.config.legend.position===`right`)&&!e.config.legend.floating?this.dCtx.lgRect.width:0;let r=e.formatters.xLabelFormatter,i=y.getLargestStringFromArr(t),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,t);e.globals.isBarHorizontal&&(i=e.globals.yAxisScale[0].result.reduce((e,t)=>e.length>t.length?e:t,0),a=i);let o=new x(this.w),s=i;i=o.xLabelFormat(r,i,s,{i:void 0,dateFormatter:new b(this.w).formatDate,w:e}),a=o.xLabelFormat(r,a,s,{i:void 0,dateFormatter:new b(this.w).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&typeof i>`u`||String(i).trim()===``)&&(i=`1`,a=i);let c=new I(this.w),l=c.getTextRects(i,e.config.xaxis.labels.style.fontSize),u=l;if(i!==a&&(u=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),n={width:l.width>=u.width?l.width:u.width,height:l.height>=u.height?l.height:u.height},n.width*t.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&e.config.xaxis.labels.rotate!==0||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.layout.rotateXLabels=!0;let t=t=>c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,`rotate(${e.config.xaxis.labels.rotate} 0 0)`,!1);l=t(i),i!==a&&(u=t(a)),n.height=(l.height>u.height?l.height:u.height)/1.5,n.width=l.width>u.width?l.width:u.width}}else e.layout.rotateXLabels=!1}return e.config.xaxis.labels.show||(n={width:0,height:0}),{width:n.width,height:n.height}}getxAxisGroupLabelsCoords(){let e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};let t=e.config.xaxis.group.style?.fontSize||e.config.xaxis.labels.style.fontSize,n=e.labelData.groups.map(e=>e.title),r,i=y.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,n),o=new I(this.w),s=o.getTextRects(i,t),c=s;return i!==a&&(c=o.getTextRects(a,t)),r={width:s.width>=c.width?s.width:c.width,height:s.height>=c.height?s.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}getxAxisTitleCoords(){let e=this.w,t=0,n=0;if(e.config.xaxis.title.text!==void 0){let r=new I(this.w).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=r.width,n=r.height}return{width:t,height:n}}getxAxisTimeScaleLabelsCoords(){let e=this.w;this.dCtx.timescaleLabels=e.labelData.timescaleLabels.slice();let t=this.dCtx.timescaleLabels.map(e=>e.value),n=t.reduce((e,t)=>typeof e>`u`?(console.error(`You have possibly supplied invalid Date format. Please supply a valid JavaScript Date`),0):e.length>t.length?e:t,0),r=new I(this.w).getTextRects(n,e.config.xaxis.labels.style.fontSize);return r.width*1.05*t.length>e.layout.gridWidth&&e.config.xaxis.labels.rotate!==0&&(e.globals.overlappingXLabels=!0),r}additionalPaddingXLabels(e){let t=this.w,n=t.globals,r=t.config,i=r.xaxis.type,a=e.width;n.skipLastTimelinelabel=!1,n.skipFirstTimelinelabel=!1;let o=t.config.yaxis[0].opposite&&t.globals.isBarHorizontal,s=e=>n.collapsedSeriesIndices.indexOf(e)!==-1,c=e=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){let i=this.dCtx.timescaleLabels[0],o=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+a/1.75-this.dCtx.yAxisWidthRight,s=i.position-a/1.75+this.dCtx.yAxisWidthLeft,c=t.config.legend.position===`right`&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;o>n.svgWidth-t.layout.translateX-c&&(n.skipLastTimelinelabel=!0),s<-((!e.show||e.floating)&&(r.chart.type===`bar`||r.chart.type===`candlestick`||r.chart.type===`rangeBar`||r.chart.type===`boxPlot`)?a/1.75:10)&&(n.skipFirstTimelinelabel=!0)}else i===`datetime`?this.dCtx.gridPad.right<a&&!t.layout.rotateXLabels&&(n.skipLastTimelinelabel=!0):i!==`datetime`&&this.dCtx.gridPad.right<a/2-this.dCtx.yAxisWidthRight&&!t.layout.rotateXLabels&&!t.config.xaxis.labels.trim&&(this.dCtx.xPadRight=a/2+1)},l=(e,t)=>{r.yaxis.length>1&&s(t)||c(e)};r.yaxis.forEach((e,t)=>{o?(this.dCtx.gridPad.left<a&&(this.dCtx.xPadLeft=a/2+1),this.dCtx.xPadRight=a/2+1):l(e,t)})}},_e=class{constructor(e){this.w=e.w,this.dCtx=e}getyAxisLabelsCoords(){let e=this.w,t=[],n=10,r=new H(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return e.config.yaxis.map((i,a)=>{let o={seriesIndex:a,dataPointIndex:-1,w:e},s=e.globals.yAxisScale[a],c=0;if(!r.isYAxisHidden(a)&&i.labels.show&&i.labels.minWidth!==void 0&&(c=i.labels.minWidth),!r.isYAxisHidden(a)&&i.labels.show&&s.result.length){let r=e.formatters.yLabelFormatters[a],l=s.niceMin===Number.MIN_VALUE?0:s.niceMin,u=s.result.reduce((e,t)=>String(r(e,o))?.length>String(r(t,o))?.length?e:t,l);u=r(u,o);let d=u;if((typeof u>`u`||u.length===0)&&(u=s.niceMax),String(u).length===1&&(u+=`.0`,d=u),e.globals.isBarHorizontal){n=0;let t=e.labelData.labels.slice();u=y.getLargestStringFromArr(t),u=r(u,{seriesIndex:a,dataPointIndex:-1,w:e}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,t)}let f=new I(this.w),p=`rotate(${i.labels.rotate} 0 0)`,m=f.getTextRects(u,i.labels.style.fontSize,i.labels.style.fontFamily,p,!1),h=m;u!==d&&(h=f.getTextRects(d,i.labels.style.fontSize,i.labels.style.fontFamily,p,!1)),t.push({width:(c>h.width||c>m.width?c:h.width>m.width?h.width:m.width)+n,height:h.height>m.height?h.height:m.height})}else t.push({width:0,height:0})}),t}getyAxisTitleCoords(){let e=this.w,t=[];return e.config.yaxis.map(e=>{if(e.show&&e.title.text!==void 0){let n=new I(this.w),r=`rotate(${e.title.rotate} 0 0)`,i=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);t.push({width:i.width,height:i.height})}else t.push({width:0,height:0})}),t}getTotalYAxisWidth(){let e=this.w,t=0,n=0,r=0,i=e.globals.yAxisScale.length>1?10:0,a=new H(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),o=function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1},s=(s,c)=>{let l=e.config.yaxis[c].floating,u=0;s.width>0&&!l?(u=s.width+i,o(c)&&(u=u-s.width-i)):u=l||a.isYAxisHidden(c)?0:5,e.config.yaxis[c].opposite?r+=u:n+=u,t+=u};return e.layout.yLabelsCoords.map((e,t)=>{s(e,t)}),e.layout.yTitleCoords.map((e,t)=>{s(e,t)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.layout.yLabelsCoords[0].width+e.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=n,this.dCtx.yAxisWidthRight=r,t}},ve=class{constructor(e){this.w=e.w,this.dCtx=e}gridPadForColumnsInNumericAxis(e){let{w:t}=this,{config:n,globals:r}=t;if(r.noData||r.collapsedSeries.length+r.ancillaryCollapsedSeries.length===n.series.length)return 0;let i=e=>[`bar`,`rangeBar`,`candlestick`,`boxPlot`].includes(e),a=n.chart.type,o=0,s=i(a)?n.series.length:1;r.comboBarCount>0&&(s=r.comboBarCount),r.collapsedSeries.forEach(e=>{i(e.type)&&--s}),n.chart.stacked&&(s=1);let c=i(a)||r.comboBarCount>0,l=Math.abs(r.initialMaxX-r.initialMinX);if(c&&t.axisFlags.isXNumeric&&!r.isBarHorizontal&&s>0&&l!==0){l<=3&&(l=r.dataPoints);let t=l/e,i=r.minXDiff&&r.minXDiff/t>0?r.minXDiff/t:0;i>e/2&&(i/=2),o=i*parseInt(n.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1),r.barPadForNumericAxis=o}return o}gridPadFortitleSubtitle(){let{w:e}=this,{globals:t}=e,n=this.dCtx.isSparkline||!t.axisCharts?0:10;[`title`,`subtitle`].forEach(r=>{e.config[r].text===void 0?n+=this.dCtx.isSparkline||!t.axisCharts?0:5:n+=e.config[r].margin}),e.config.legend.show&&e.config.legend.position===`bottom`&&!e.config.legend.floating&&!t.axisCharts&&(n+=10);let r=this.dCtx.dimHelpers.getTitleSubtitleCoords(`title`),i=this.dCtx.dimHelpers.getTitleSubtitleCoords(`subtitle`);e.layout.gridHeight-=r.height+i.height+n,e.layout.translateY+=r.height+i.height+n}setGridXPosForDualYAxis(e,t){let{w:n}=this,r=new H(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});n.config.yaxis.forEach((i,a)=>{n.globals.ignoreYAxisIndexes.indexOf(a)===-1&&!i.floating&&!r.isYAxisHidden(a)&&(i.opposite&&(n.layout.translateX-=t[a].width+e[a].width+parseInt(i.labels.style.fontSize,10)/1.2+12),n.layout.translateX<2&&(n.layout.translateX=2))})}},G=class{constructor(e,t){this.w=e,this.ctx=t,this.theme=t.theme,this.timeScale=t.timeScale,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new he(this),this.dimYAxis=new _e(this),this.dimXAxis=new ge(this),this.dimGrid=new ve(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}plotCoords(){let e=this.w,t=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};let n=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([e,t])=>{this.gridPad[e]=Math.max(t,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(n/2,this.gridPad.top),this.gridPad.bottom=Math.max(n/2,this.gridPad.bottom)),t.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),e.layout.gridHeight=e.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,e.layout.gridWidth=e.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;let r=this.dimGrid.gridPadForColumnsInNumericAxis(e.layout.gridWidth);return e.layout.gridWidth=e.layout.gridWidth-r*2,e.layout.translateX=e.layout.translateX+this.gridPad.left+this.xPadLeft+(r>0?r:0),e.layout.translateY=e.layout.translateY+this.gridPad.top,{layout:{gridHeight:e.layout.gridHeight,gridWidth:e.layout.gridWidth,translateX:e.layout.translateX,translateY:e.layout.translateY,translateXAxisX:e.layout.translateXAxisX,translateXAxisY:e.layout.translateXAxisY,rotateXLabels:e.layout.rotateXLabels,xAxisHeight:e.layout.xAxisHeight,xAxisLabelsHeight:e.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:e.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:e.layout.xAxisLabelsWidth,yLabelsCoords:e.layout.yLabelsCoords,yTitleCoords:e.layout.yTitleCoords}}}setDimensionsForAxisCharts(){let e=this.w,t=e.globals,n=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();t.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((t,i)=>{e.layout.yLabelsCoords.push({width:n[i].width,index:i}),e.layout.yTitleCoords.push({width:r[i].width,index:i})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();let i=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(i,o,a),e.layout.translateXAxisY=e.layout.rotateXLabels?this.xAxisHeight/8:-4,e.layout.translateXAxisX=e.layout.rotateXLabels&&e.axisFlags.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(e.layout.rotateXLabels=!1,e.layout.translateXAxisY=-1*(parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5)),e.layout.translateXAxisY=e.layout.translateXAxisY+e.config.xaxis.labels.offsetY,e.layout.translateXAxisX=e.layout.translateXAxisX+e.config.xaxis.labels.offsetX;let s=this.yAxisWidth,c=this.xAxisHeight;e.layout.xAxisLabelsHeight=this.xAxisHeight-o.height,e.layout.xAxisGroupLabelsHeight=e.layout.xAxisLabelsHeight-i.height,e.layout.xAxisLabelsWidth=this.xAxisWidth,e.layout.xAxisHeight=this.xAxisHeight;let l=10;(e.config.chart.type===`radar`||this.isSparkline)&&(s=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||e.config.chart.type===`treemap`)&&(s=0,c=0,l=0),!this.isSparkline&&e.config.chart.type!==`treemap`&&this.dimXAxis.additionalPaddingXLabels(i);let u=()=>{e.layout.translateX=s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-this.lgRect.height-c-(!this.isSparkline&&e.config.chart.type!==`treemap`?e.layout.rotateXLabels?10:15:0),e.layout.gridWidth=t.svgWidth-s-this.datalabelsCoords.width*2};switch(e.config.xaxis.position===`top`&&(l=e.layout.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case`bottom`:e.layout.translateY=l,u();break;case`top`:e.layout.translateY=this.lgRect.height+l,u();break;case`left`:e.layout.translateY=l,e.layout.translateX=this.lgRect.width+s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-s-this.datalabelsCoords.width*2;break;case`right`:e.layout.translateY=l,e.layout.translateX=s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-s-this.datalabelsCoords.width*2-5;break;default:throw Error(`Legend position not supported`)}this.dimGrid.setGridXPosForDualYAxis(r,n),new se(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(n,r)}setDimensionsForNonAxisCharts(){let e=this.w,t=e.globals,n=e.config,r=0;e.config.legend.show&&!e.config.legend.floating&&(r=20);let i=n.chart.type===`pie`||n.chart.type===`polarArea`||n.chart.type===`donut`?`pie`:`radialBar`,a=n.plotOptions[i].offsetY,o=n.plotOptions[i].offsetX;if(!n.legend.show||n.legend.floating){e.layout.gridHeight=t.svgHeight;let n=e.dom.elWrap.getBoundingClientRect().width;e.layout.gridWidth=Math.min(n,e.layout.gridHeight),e.layout.translateY=a,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;return}switch(n.legend.position){case`bottom`:e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=a-10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case`top`:e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=this.lgRect.height+a+10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case`left`:e.layout.gridWidth=t.svgWidth-this.lgRect.width-r,e.layout.gridHeight=n.chart.height===`auto`?e.layout.gridWidth:t.svgHeight,e.layout.translateY=a,e.layout.translateX=o+this.lgRect.width+r;break;case`right`:e.layout.gridWidth=t.svgWidth-this.lgRect.width-r-5,e.layout.gridHeight=n.chart.height===`auto`?e.layout.gridWidth:t.svgHeight,e.layout.translateY=a,e.layout.translateX=o+10;break;default:throw Error(`Legend position not supported`)}}conditionalChecksForAxisCoords(e,t,n){let r=this.w,i=r.labelData.hasXaxisGroups?2:1,a=n.height+e.height+t.height,o=r.axisFlags.isMultiLineX?1.2:O,s=r.layout.rotateXLabels?22:10,c=r.layout.rotateXLabels&&r.config.legend.position===`bottom`?10:0;this.xAxisHeight=a*o+i*s+c,this.xAxisWidth=e.width,this.xAxisHeight-t.height>r.config.xaxis.labels.maxHeight&&(this.xAxisHeight=r.config.xaxis.labels.maxHeight),r.config.xaxis.labels.minHeight&&this.xAxisHeight<r.config.xaxis.labels.minHeight&&(this.xAxisHeight=r.config.xaxis.labels.minHeight),r.config.xaxis.floating&&(this.xAxisHeight=0);let l=0,u=0;r.config.yaxis.forEach(e=>{l+=e.labels.minWidth,u+=e.labels.maxWidth}),this.yAxisWidth<l&&(this.yAxisWidth=l),this.yAxisWidth>u&&(this.yAxisWidth=u)}},ye=1440,be=ye*60,xe=10/be,Se=class{constructor(e,t){this.w=e,this.ctx=t,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(e,t){let n=this.w;if(n.globals.allSeriesCollapsed)return n.labelData.labels=[],n.labelData.timescaleLabels=[],[];let r=new b(this.w),i=(t-e)/(1e3*be);this.determineInterval(i),n.interact.disableZoomIn=!1,n.interact.disableZoomOut=!1,i<xe?n.interact.disableZoomIn=!0:i>5e4&&(n.interact.disableZoomOut=!0);let a=r.getTimeUnitsfromTimestamp(e,t,this.utc),o=n.layout.gridWidth/i,l=o/24,u=l/60,d=u/60,f=Math.floor(i*24),p=Math.floor(i*ye),m=Math.floor(i*be),h=Math.floor(i),g=Math.floor(i/30),_=Math.floor(i/365),v={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},y={firstVal:v,currentMillisecond:v.minMillisecond,currentSecond:v.minSecond,currentMinute:v.minMinute,currentHour:v.minHour,currentMonthDate:v.minDate,currentDate:v.minDate,currentMonth:v.minMonth,currentYear:v.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:u,secondsWidthOnXAxis:d,numberOfSeconds:m,numberOfMinutes:p,numberOfHours:f,numberOfDays:h,numberOfMonths:g,numberOfYears:_};switch(this.tickInterval){case`years`:this.generateYearScale(y);break;case`months`:case`half_year`:this.generateMonthScale(y);break;case`months_days`:case`months_fortnight`:case`days`:case`week_days`:this.generateDayScale(y);break;case`hours`:this.generateHourScale(y);break;case`minutes_fives`:case`minutes`:this.generateMinuteScale(y);break;case`seconds_tens`:case`seconds_fives`:case`seconds`:this.generateSecondScale(y);break}let x=this.timeScaleArray.map(e=>{let t={position:e.position,unit:e.unit,year:e.year,day:e.day?e.day:1,hour:e.hour?e.hour:0,month:e.month+1};return e.unit===`month`?c(s({},t),{day:1,value:e.value+1}):e.unit===`day`||e.unit===`hour`?c(s({},t),{value:e.value}):e.unit===`minute`?c(s({},t),{value:e.value,minute:e.value}):e.unit===`second`?c(s({},t),{value:e.value,minute:e.minute,second:e.second}):e});return x.filter(e=>{let t=1,r=Math.ceil(n.layout.gridWidth/120),i=e.value;n.config.xaxis.tickAmount!==void 0&&(r=n.config.xaxis.tickAmount),x.length>r&&(t=Math.floor(x.length/r));let a=!1,o=!1;switch(this.tickInterval){case`years`:e.unit===`year`&&(a=!0);break;case`half_year`:t=7,e.unit===`year`&&(a=!0);break;case`months`:t=1,e.unit===`year`&&(a=!0);break;case`months_fortnight`:t=15,(e.unit===`year`||e.unit===`month`)&&(a=!0),i===30&&(o=!0);break;case`months_days`:t=10,e.unit===`month`&&(a=!0),i===30&&(o=!0);break;case`week_days`:t=8,e.unit===`month`&&(a=!0);break;case`days`:t=1,e.unit===`month`&&(a=!0);break;case`hours`:e.unit===`day`&&(a=!0);break;case`minutes_fives`:i%5!=0&&(o=!0);break;case`seconds_tens`:i%10!=0&&(o=!0);break;case`seconds_fives`:i%5!=0&&(o=!0);break}if(this.tickInterval===`hours`||this.tickInterval===`minutes_fives`||this.tickInterval===`seconds_tens`||this.tickInterval===`seconds_fives`){if(!o)return!0}else if((i%t===0||a)&&!o)return!0})}recalcDimensionsBasedOnFormat(e){let t=this.w,n=this.formatDates(e),r=this.removeOverlappingTS(n);t.labelData.timescaleLabels=r.slice();let i=new G(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(i.layout)}determineInterval(e){let t=e/365,n=e*24,r=n*60,i=r*60;switch(!0){case t>5:this.tickInterval=`years`;break;case e>800:this.tickInterval=`half_year`;break;case e>180:this.tickInterval=`months`;break;case e>90:this.tickInterval=`months_fortnight`;break;case e>60:this.tickInterval=`months_days`;break;case e>30:this.tickInterval=`week_days`;break;case e>2:this.tickInterval=`days`;break;case n>2.4:this.tickInterval=`hours`;break;case r>15:this.tickInterval=`minutes_fives`;break;case r>5:this.tickInterval=`minutes`;break;case r>1:this.tickInterval=`seconds_tens`;break;case i>20:this.tickInterval=`seconds_fives`;break;default:this.tickInterval=`seconds`;break}}generateYearScale({firstVal:e,currentMonth:t,currentYear:n,daysWidthOnXAxis:r,numberOfYears:i}){let a=e.minYear,o=0,s=new b(this.w),c=`year`;if(e.minDate>1||e.minMonth>0){let n=s.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(s.determineDaysOfYear(e.minYear)-n+1)*r,a=e.minYear+1,this.timeScaleArray.push({position:o,value:a,unit:c,year:a,month:y.monthMod(t+1)})}else e.minDate===1&&e.minMonth===0&&this.timeScaleArray.push({position:o,value:a,unit:c,year:n,month:y.monthMod(t+1)});let l=a,u=o;for(let e=0;e<i;e++)l++,u=s.determineDaysOfYear(l-1)*r+u,this.timeScaleArray.push({position:u,value:l,unit:c,year:l,month:1})}generateMonthScale({firstVal:e,currentMonthDate:t,currentMonth:n,currentYear:r,daysWidthOnXAxis:i,numberOfMonths:a}){let o=n,s=0,c=new b(this.w),l=`month`,u=0;if(e.minDate>1){s=(c.determineDaysOfMonths(n+1,e.minYear)-t+1)*i,o=y.monthMod(n+1);let a=r+u,d=y.monthMod(o),f=o;o===0&&(l=`year`,f=a,d=1,u+=1,a+=u),this.timeScaleArray.push({position:s,value:f,unit:l,year:a,month:d})}else this.timeScaleArray.push({position:s,value:o,unit:l,year:r,month:y.monthMod(n)});let d=o+1,f=s;for(let e=0,t=1;e<a;e++,t++){d=y.monthMod(d),d===0?(l=`year`,u+=1):l=`month`;let e=this._getYear(r,d,u);f=c.determineDaysOfMonths(d,e)*i+f;let t=d===0?e:d;this.timeScaleArray.push({position:f,value:t,unit:l,year:e,month:d===0?1:d}),d++}}generateDayScale({firstVal:e,currentMonth:t,currentYear:n,hoursWidthOnXAxis:r,numberOfDays:i}){let a=new b(this.w),o=`day`,s=e.minDate+1,c=s,l=(e,t,n)=>(e>a.determineDaysOfMonths(t+1,n)&&(t+=1,c=1,o=`month`,d=t),t),u=(24-e.minHour)*r,d=s,f=l(c,t,n);e.minHour===0&&e.minDate===1?(u=0,d=y.monthMod(e.minMonth),o=`month`,c=e.minDate):e.minDate!==1&&e.minHour===0&&e.minMinute===0&&(u=0,s=e.minDate,c=s,d=s,f=l(c,t,n),d!==1&&(o=`day`)),this.timeScaleArray.push({position:u,value:d,unit:o,year:this._getYear(n,f,0),month:y.monthMod(f),day:c});let p=u;for(let e=0;e<i;e++){c+=1,o=`day`,f=l(c,f,this._getYear(n,f,0));let e=this._getYear(n,f,0);p=24*r+p;let t=c===1?y.monthMod(f):c;this.timeScaleArray.push({position:p,value:t,unit:o,year:e,month:y.monthMod(f),day:t})}}generateHourScale({firstVal:e,currentDate:t,currentMonth:n,currentYear:r,minutesWidthOnXAxis:i,numberOfHours:a}){let o=new b(this.w),s=`hour`,c=(e,t)=>(e>o.determineDaysOfMonths(t+1,r)&&(m=1,t+=1),{month:t,date:m}),l=(e,t)=>(e>o.determineDaysOfMonths(t+1,r)&&(t+=1),t),u=60-(e.minMinute+e.minSecond/60),d=u*i,f=e.minHour+1,p=f;u===60&&(d=0,f=e.minHour,p=f);let m=t;p>=24&&(p=0,m+=1,s=`day`,f=m);let h=c(m,n).month;h=l(m,h),f>31&&(m=1,f=m),this.timeScaleArray.push({position:d,value:f,unit:s,day:m,hour:p,year:r,month:y.monthMod(h)}),p++;let g=d;for(let e=0;e<a;e++){s=`hour`,p>=24&&(p=0,m+=1,s=`day`,h=c(m,h).month,h=l(m,h));let e=this._getYear(r,h,0);g=60*i+g;let t=p===0?m:p;this.timeScaleArray.push({position:g,value:t,unit:s,hour:p,day:m,year:e,month:y.monthMod(h)}),p++}}generateMinuteScale({currentMillisecond:e,currentSecond:t,currentMinute:n,currentHour:r,currentDate:i,currentMonth:a,currentYear:o,minutesWidthOnXAxis:s,secondsWidthOnXAxis:c,numberOfMinutes:l}){let u=(60-t-e/1e3)*c,d=n+1,f=i,p=a,m=o,h=r,g=u;for(let e=0;e<l;e++)d>=60&&(d=0,h+=1,h===24&&(h=0)),this.timeScaleArray.push({position:g,value:d,unit:`minute`,hour:h,minute:d,day:f,year:this._getYear(m,p,0),month:y.monthMod(p)}),g+=s,d++}generateSecondScale({currentMillisecond:e,currentSecond:t,currentMinute:n,currentHour:r,currentDate:i,currentMonth:a,currentYear:o,secondsWidthOnXAxis:s,numberOfSeconds:c}){let l=(1e3-e)/1e3*s,u=t+1,d=n,f=i,p=a,m=o,h=r,g=l;for(let e=0;e<c;e++)u>=60&&(d++,u=0,d>=60&&(h++,d=0,h===24&&(h=0))),this.timeScaleArray.push({position:g,value:u,unit:`second`,hour:h,minute:d,second:u,day:f,year:this._getYear(m,p,0),month:y.monthMod(p)}),g+=s,u++}createRawDateString(e,t){let n=e.year;return e.month===0&&(e.month=1),n+=`-`+(`0`+e.month.toString()).slice(-2),e.unit===`day`?n+=e.unit===`day`?`-`+(`0`+t).slice(-2):`-01`:n+=`-`+(`0`+(e.day?e.day:`1`)).slice(-2),e.unit===`hour`?n+=e.unit===`hour`?`T`+(`0`+t).slice(-2):`T00`:n+=`T`+(`0`+(e.hour?e.hour:`0`)).slice(-2),e.unit===`minute`?n+=`:`+(`0`+t).slice(-2):n+=`:`+(e.minute?(`0`+e.minute).slice(-2):`00`),e.unit===`second`?n+=`:`+(`0`+t).slice(-2):n+=`:00`,this.utc&&(n+=`.000Z`),n}formatDates(e){let t=this.w;return e.map(e=>{let n=e.value.toString(),r=new b(this.w),i=this.createRawDateString(e,n),a=r.getDate(r.parseDate(i));if(this.utc||(a=r.getDate(r.parseDateWithTimezone(i))),t.config.xaxis.labels.format===void 0){let i=`dd MMM`,o=t.config.xaxis.labels.datetimeFormatter;e.unit===`year`&&(i=o.year),e.unit===`month`&&(i=o.month),e.unit===`day`&&(i=o.day),e.unit===`hour`&&(i=o.hour),e.unit===`minute`&&(i=o.minute),e.unit===`second`&&(i=o.second),n=r.formatDate(a,i)}else n=r.formatDate(a,t.config.xaxis.labels.format);return{dateString:i,position:e.position,value:n,unit:e.unit,year:e.year,month:e.month}})}removeOverlappingTS(e){let t=new I(this.w),n=!1,r;e.length>0&&e[0].value&&e.every(t=>t.value.length===e[0].value.length)&&(n=!0,r=t.getTextRects(e[0].value).width);let i=0,a=e.map((a,o)=>{if(o>0&&this.w.config.xaxis.labels.hideOverlappingLabels){let s=n?r:t.getTextRects(e[i].value).width,c=e[i].position;return a.position>c+s+10?(i=o,a):null}else return a});return a=a.filter(e=>e!==null),a}_getYear(e,t,n){return e+Math.floor(t/12)+n}},Ce={};function we(e){Object.assign(Ce,e)}function K(e){let t=Ce[e];if(!t)throw Error(`ApexCharts: chart type "${e}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.
28
+ If you already imported the entry (e.g. 'apexcharts/${e}'), your bundler may have created two separate copies of the ApexCharts module so the registration was lost. Add all apexcharts sub-entries to your bundler's deduplication config — for Vite add them to optimizeDeps.include in vite.config.`);return t}var Te=class{constructor(e,t,n){this.w=t,this.ctx=n,this.el=e}setupElements(){let{globals:e,config:t}=this.w,n=t.chart.type;e.axisCharts=[`line`,`area`,`bar`,`rangeBar`,`rangeArea`,`candlestick`,`boxPlot`,`scatter`,`bubble`,`radar`,`heatmap`,`treemap`].includes(n),e.xyCharts=[`line`,`area`,`bar`,`rangeBar`,`rangeArea`,`candlestick`,`boxPlot`,`scatter`,`bubble`].includes(n),e.isBarHorizontal=[`bar`,`rangeBar`,`boxPlot`].includes(n)&&t.plotOptions.bar.horizontal,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),I.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);let r=d.isBrowser()?window.SVG:global.SVG;if(this.w.dom.Paper=r().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:`apexcharts-svg`,"xmlns:data":`ApexChartsNS`,transform:`translate(${t.chart.offsetX}, ${t.chart.offsetY})`}),this.w.dom.Paper.node.style.background=t.theme.mode===`dark`&&!t.chart.background?`#343A3F`:t.theme.mode===`light`&&!t.chart.background?`#fff`:t.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=v.createElementNS(L,`foreignObject`),I.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),this.w.dom.elLegendWrap.classList.add(`apexcharts-legend`),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),t.chart.accessibility.enabled){let e=this.getAccessibleChartLabel(),n=t.chart.accessibility.keyboard.enabled&&t.chart.accessibility.keyboard.navigation.enabled?`application`:`img`;this.w.dom.Paper.attr({role:n,"aria-label":e});let r=v.createElementNS(L,`title`);if(r.textContent=t.title.text||`Chart`,this.w.dom.Paper.node.insertBefore(r,this.w.dom.elLegendForeign.nextSibling),t.chart.accessibility.description){let e=v.createElementNS(L,`desc`);e.textContent=t.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(e,r.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:`apexcharts-inner apexcharts-graphical`}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}plotChartType(e,t){let{w:n,ctx:r}=this,{config:i,globals:a}=n,o={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},s=i.chart.type||`line`,c=null,l=0;this.w.seriesData.series.forEach((t,r)=>{let i=e[r]?.type===`column`?`bar`:e[r]?.type||(s===`column`?`bar`:s);o[i]?(i===`rangeArea`?(o[i].series.push(this.w.rangeData.seriesRangeStart[r]),o[i].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[r])):o[i].series.push(t),o[i].i.push(r),i===`bar`&&(n.globals.columnSeries=o.bar)):[`heatmap`,`treemap`,`pie`,`donut`,`polarArea`,`radialBar`,`radar`].includes(i)?c=i:console.warn(`You have specified an unrecognized series type (${i}).`),s!==i&&i!==`scatter`&&l++}),l>0&&(c&&console.warn(`Chart or series type ${c} cannot appear with other chart or series types.`),o.bar.series.length>0&&i.plotOptions.bar.horizontal&&(l-=o.bar.series.length,o.bar={series:[],i:[]},n.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),a.comboCharts||=l>0;let u=o.line.series.length>0||o.area.series.length>0||o.scatter.series.length>0||o.bubble.series.length>0||o.rangeArea.series.length>0||!a.comboCharts&&[`line`,`area`,`scatter`,`bubble`,`rangeArea`].includes(i.chart.type)?new(K(`line`))(r.w,r,t):null,d=o.candlestick.series.length>0||o.boxPlot.series.length>0||!a.comboCharts&&[`candlestick`,`boxPlot`].includes(i.chart.type)?new(K(`candlestick`))(r.w,r,t):null;r.pie=!a.comboCharts&&[`pie`,`donut`,`polarArea`].includes(i.chart.type)?new(K(`pie`))(r.w,r):null,r.rangeBar=o.rangeBar.series.length>0||!a.comboCharts&&i.chart.type===`rangeBar`?new(K(`rangeBar`))(r.w,r,t):null;let f=[];if(a.comboCharts){let e=new N(this.w);if(o.area.series.length>0&&f.push(...e.drawSeriesByGroup(o.area,a.areaGroups,`area`,u)),o.bar.series.length>0)if(i.chart.stacked){let e=new(K(`barStacked`))(r.w,r,t);f.push(e.draw(o.bar.series,o.bar.i))}else r.bar=new(K(`bar`))(r.w,r,t),f.push(r.bar.draw(o.bar.series,o.bar.i));if(o.rangeArea.series.length>0&&f.push(u.draw(o.rangeArea.series,`rangeArea`,o.rangeArea.i,o.rangeArea.seriesRangeEnd)),o.line.series.length>0&&f.push(...e.drawSeriesByGroup(o.line,a.lineGroups,`line`,u)),o.candlestick.series.length>0&&f.push(d.draw(o.candlestick.series,`candlestick`,o.candlestick.i)),o.boxPlot.series.length>0&&f.push(d.draw(o.boxPlot.series,`boxPlot`,o.boxPlot.i)),o.rangeBar.series.length>0&&f.push(r.rangeBar.draw(o.rangeBar.series,o.rangeBar.i)),o.scatter.series.length>0){let e=new(K(`line`))(r.w,r,t,!0);f.push(e.draw(o.scatter.series,`scatter`,o.scatter.i))}if(o.bubble.series.length>0){let e=new(K(`line`))(r.w,r,t,!0);f.push(e.draw(o.bubble.series,`bubble`,o.bubble.i))}}else{let e=i.chart.type;switch(e){case`line`:f=u.draw(this.w.seriesData.series,`line`);break;case`area`:f=u.draw(this.w.seriesData.series,`area`);break;case`bar`:i.chart.stacked?f=new(K(`barStacked`))(r.w,r,t).draw(this.w.seriesData.series):(r.bar=new(K(`bar`))(r.w,r,t),f=r.bar.draw(this.w.seriesData.series));break;case`candlestick`:f=d.draw(this.w.seriesData.series,`candlestick`);break;case`boxPlot`:f=d.draw(this.w.seriesData.series,e);break;case`rangeBar`:f=r.rangeBar.draw(this.w.seriesData.series);break;case`rangeArea`:f=u.draw(this.w.rangeData.seriesRangeStart,`rangeArea`,void 0,this.w.rangeData.seriesRangeEnd);break;case`heatmap`:f=new(K(`heatmap`))(r.w,r,t).draw(this.w.seriesData.series);break;case`treemap`:f=new(K(`treemap`))(r.w,r).draw(this.w.seriesData.series);break;case`pie`:case`donut`:case`polarArea`:f=r.pie.draw(this.w.seriesData.series);break;case`radialBar`:f=new(K(`radialBar`))(r.w,r).draw(this.w.seriesData.series);break;case`radar`:f=new(K(`radar`))(r.w,r).draw(this.w.seriesData.series);break;default:f=u.draw(this.w.seriesData.series)}}return f}setSVGDimensions(){let{globals:e,config:t}=this.w;t.chart.width=t.chart.width||`100%`,t.chart.height=t.chart.height||`auto`,e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;let n=y.getDimensions(this.el),r=t.chart.width.toString().split(/[0-9]+/g).pop();r===`%`?y.isNumber(n[0])&&(n[0].width===0&&(n=y.getDimensions(this.el.parentNode)),e.svgWidth=n[0]*parseInt(t.chart.width,10)/100):(r===`px`||r===``)&&(e.svgWidth=parseInt(t.chart.width,10));let i=String(t.chart.height).toString().split(/[0-9]+/g).pop();if(e.svgHeight!==`auto`&&e.svgHeight!==``?i===`%`?e.svgHeight=y.getDimensions(this.el.parentNode)[1]*parseInt(t.chart.height,10)/100:e.svgHeight=parseInt(t.chart.height,10):e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2,e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),I.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),i!==`%`&&d.isBrowser()){let n=t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0;this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${e.svgHeight+n}px`}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`}shiftGraphPosition(){let{globals:e}=this.w,{translateY:t,translateX:n}=e;I.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${n}, ${t})`})}resizeNonAxisCharts(){let{w:e}=this,t=0,n=e.config.chart.sparkline.enabled?1:15;n+=e.config.grid.padding.bottom,[`top`,`bottom`].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(t=(this.ctx.legend?.legendHelpers.getLegendDimensions().clwh??0)+7);let r=e.dom.baseEl.querySelector(`.apexcharts-radialbar, .apexcharts-pie`),i=e.globals.radialSize*2.05;if(r&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){let t=y.getBoundingClientRect(r);i=t.bottom;let n=t.bottom-t.top;i=Math.max(e.globals.radialSize*2.05,n)}let a=Math.ceil(i+this.w.layout.translateY+t+n);this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute(`height`,a),!(e.config.chart.height&&String(e.config.chart.height).includes(`%`))&&(this.w.dom.elWrap.style.height=`${a}px`,I.setAttrs(this.w.dom.Paper.node,{height:a}),d.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${a}px`))}coreCalculations(){new ae(this.w).init()}resetGlobals(){let e=()=>this.w.config.series.map(()=>[]),t=new j,{globals:n}=this.w,r={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:n.originalSeries};t.initGlobalVars(n),n.seriesXvalues=e(),n.seriesYvalues=e(),r.dataWasParsed&&(this.w.axisFlags.dataWasParsed=r.dataWasParsed,n.originalSeries=r.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){let{w:e}=this,t=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position===`back`&&new de(this.w).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position===`back`&&new de(this.w).drawYCrosshairs(),e.config.xaxis.type===`datetime`&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Se(this.w,this.ctx);let t=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(t)}t=new N(this.w).getCalculatedRatios()}return t}updateSourceChart(e){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){let{ctx:e,w:t}=this;if(t.config.chart.brush.enabled&&typeof t.config.chart.events.selection!=`function`){let n=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];n.forEach(t=>{let n=e.constructor.getChartByID(t);n.w.globals.brushSource=this.ctx,typeof n.w.config.chart.events.zoomed!=`function`&&(n.w.config.chart.events.zoomed=()=>this.updateSourceChart(n)),typeof n.w.config.chart.events.scrolled!=`function`&&(n.w.config.chart.events.scrolled=()=>this.updateSourceChart(n))}),t.config.chart.events.selection=(t,r)=>{n.forEach(t=>{e.constructor.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){let e=this.w,t=e.config,n=``;if(t.chart.accessibility&&t.chart.accessibility.description)n=t.chart.accessibility.description;else if(t.title.text){let e=t.chart.type;n=`${t.title.text}. ${e} chart`,t.subtitle.text&&(n+=`. ${t.subtitle.text}`)}else n=`${t.chart.type} chart with ${e.seriesData.series.length||(t.series?t.series.length:0)} data series`;return n}},Ee=class{constructor(e,{resetGlobals:t=()=>{},isMultipleY:n=()=>{}}={}){this.w=e,this.resetGlobals=t,this.isMultipleY=n,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new N(this.w)}getFirstDataPoint(){let e=this.w.config.series,t=new W(this.w);return this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex]&&e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&typeof e[this.activeSeriesIndex].data[0]<`u`?e[this.activeSeriesIndex].data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){let e=this.getFirstDataPoint();return e&&typeof e.x<`u`}isFormat2DArray(){let e=this.getFirstDataPoint();return e&&Array.isArray(e)}handleFormat2DArray(e,t){let n=this.w.config,r=e[t].data,i=n.chart.type===`boxPlot`||n.series[t].type===`boxPlot`;for(let e=0;e<r.length;e++){let t=r[e],a=t[0],o=t[1],s=t[2];if(typeof o<`u`&&(Array.isArray(o)&&o.length===4&&!i?this.twoDSeries.push(y.parseNumber(o[3])):t.length>=5?this.twoDSeries.push(y.parseNumber(t[4])):this.twoDSeries.push(y.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),n.xaxis.type===`datetime`){let e=new Date(a);e=e.getTime(),this.twoDSeriesX.push(e)}else this.twoDSeriesX.push(a);typeof s<`u`&&(this.threeDSeries.push(s),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(e,t){let n=this.w.config,r=this.w.globals,i=new b(this.w),a=e[t].data,o=t;r.collapsedSeriesIndices.indexOf(t)>-1&&(o=this.activeSeriesIndex);let s=e[o].data;for(let e=0;e<a.length;e++){let n=a[e];if(typeof n.y<`u`){let e=Array.isArray(n.y)?y.parseNumber(n.y[n.y.length-1]):y.parseNumber(n.y);this.twoDSeries.push(e)}typeof this.seriesGoals[t]>`u`&&(this.seriesGoals[t]=[]),typeof n.goals<`u`&&Array.isArray(n.goals)?this.seriesGoals[t].push(n.goals):this.seriesGoals[t].push(null),typeof n.z<`u`&&(this.threeDSeries.push(n.z),this.w.axisFlags.isDataXYZ=!0)}for(let e=0;e<s.length;e++){let t=s[e].x,a=typeof t==`string`,o=Array.isArray(t),c=!o&&!!i.isValidDate(t);if(a||c)if(a||n.xaxis.convertedCatToNumeric){let e=r.isBarHorizontal&&this.w.axisFlags.isRangeData;n.xaxis.type===`datetime`&&!e?this.twoDSeriesX.push(i.parseDate(t)):(this.fallbackToCategory=!0,this.twoDSeriesX.push(t),!isNaN(t)&&this.w.config.xaxis.type!==`category`&&typeof t!=`string`&&(this.w.axisFlags.isXNumeric=!0))}else n.xaxis.type===`datetime`?this.twoDSeriesX.push(i.parseDate(t.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(t)));else o?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(t))}}handleRangeData(e,t){let n={};return this.isFormat2DArray()?n=this.handleRangeDataFormat(`array`,e,t):this.isFormatXY()&&(n=this.handleRangeDataFormat(`xy`,e,t)),this.w.rangeData.seriesRangeStart[t]=n.start===void 0?[]:n.start,this.w.rangeData.seriesRangeEnd[t]=n.end===void 0?[]:n.end,this.w.rangeData.seriesRange[t]=n.rangeUniques,this.w.rangeData.seriesRange.forEach(e=>{e&&e.forEach(e=>{let t=e.y,n=t.length;if(!(n<=1))for(let r=0;r<n;r++){let i=t[r],a=i.y1,o=i.y2;for(let s=r+1;s<n;s++){let n=t[s],r=n.y1;a<=n.y2&&r<=o&&(e.overlaps.indexOf(i.rangeName)<0&&e.overlaps.push(i.rangeName),e.overlaps.indexOf(n.rangeName)<0&&e.overlaps.push(n.rangeName))}}})}),n}handleCandleStickBoxData(e,t){let n={};return this.isFormat2DArray()?n=this.handleCandleStickBoxDataFormat(`array`,e,t):this.isFormatXY()&&(n=this.handleCandleStickBoxDataFormat(`xy`,e,t)),this.w.candleData.seriesCandleO[t]=n.o,this.w.candleData.seriesCandleH[t]=n.h,this.w.candleData.seriesCandleM[t]=n.m,this.w.candleData.seriesCandleL[t]=n.l,this.w.candleData.seriesCandleC[t]=n.c,n}handleRangeDataFormat(e,t,n){let r=[],i=[],a=new Map,o=[];if(t[n].data.forEach(e=>{if(!a.has(e.x)){let t={x:e.x,overlaps:[],y:[]};a.set(e.x,t),o.push(t)}}),e===`array`)for(let e=0;e<t[n].data.length;e++)Array.isArray(t[n].data[e])?(r.push(t[n].data[e][1][0]),i.push(t[n].data[e][1][1])):(r.push(t[n].data[e]),i.push(t[n].data[e]));else if(e===`xy`)for(let e=0;e<t[n].data.length;e++){let o=Array.isArray(t[n].data[e].y),s=y.randomId(),c=t[n].data[e].x,l={y1:o?t[n].data[e].y[0]:t[n].data[e].y,y2:o?t[n].data[e].y[1]:t[n].data[e].y,rangeName:s};t[n].data[e].rangeName=s;let u=a.get(c);u&&u.y.push(l),r.push(l.y1),i.push(l.y2)}return{start:r,end:i,rangeUniques:o}}handleCandleStickBoxDataFormat(e,t,n){let r=this.w,i=r.config.chart.type===`boxPlot`||r.config.series[n].type===`boxPlot`,a=[],o=[],s=[],c=[],l=[],u=t[n].data,d;d=e===`array`?i&&u[0].length===6||!i&&u[0].length===5?e=>e.slice(1):e=>Array.isArray(e[1])?e[1]:[]:e=>Array.isArray(e.y)?e.y:[];for(let e=0;e<u.length;e++){let t=d(u[e]);t&&t.length>=2&&(a.push(t[0]),o.push(t[1]),i?(s.push(t[2]),c.push(t[3]),l.push(t[4])):(c.push(t[2]),l.push(t[3])))}return{o:a,h:o,m:s,l:c,c:l}}parseDataAxisCharts(e){let t=this.w.config,n=this.w.globals,r=new b(this.w),i=t.labels.length>0?t.labels.slice():t.xaxis.categories.slice();this.w.axisFlags.isRangeBar=t.chart.type===`rangeBar`&&n.isBarHorizontal,this.w.labelData.hasXaxisGroups=t.xaxis.type===`category`&&t.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=t.xaxis.group.groups),e.forEach((e,t)=>{e.name===void 0?this.w.seriesData.seriesNames.push(`series-`+parseInt(t+1,10)):this.w.seriesData.seriesNames.push(e.name)}),this.coreUtils.setSeriesYAxisMappings();let a=[],o=[...new Set(t.series.map(e=>e.group))];t.series.forEach((e,t)=>{let n=o.indexOf(e.group);a[n]||(a[n]=[]),a[n].push(this.w.seriesData.seriesNames[t])}),this.w.labelData.seriesGroups=a;let s=()=>{for(let e=0;e<i.length;e++)if(typeof i[e]==`string`)if(r.isValidDate(i[e]))this.twoDSeriesX.push(r.parseDate(i[e]));else throw Error(`You have provided invalid Date format. Please provide a valid JavaScript Date`);else this.twoDSeriesX.push(i[e])};for(let n=0;n<e.length;n++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],typeof e[n].data>`u`){console.error(`It is a possibility that you may have not included 'data' property in series.`);return}if((t.chart.type===`rangeBar`||t.chart.type===`rangeArea`||e[n].type===`rangeBar`||e[n].type===`rangeArea`)&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(e,n)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,n):this.isFormatXY()&&this.handleFormatXY(e,n),(t.chart.type===`candlestick`||e[n].type===`candlestick`||t.chart.type===`boxPlot`||e[n].type===`boxPlot`)&&this.handleCandleStickBoxData(e,n),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,n===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{t.xaxis.type===`datetime`?(this.w.axisFlags.isXNumeric=!0,s(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):t.xaxis.type===`numeric`&&(this.w.axisFlags.isXNumeric=!0,i.length>0&&(this.twoDSeriesX=i,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);let r=e[n].data.map(e=>y.parseNumber(e));this.w.seriesData.series.push(r)}this.w.seriesData.seriesZ.push(this.threeDSeries),e[n].color===void 0?this.w.seriesData.seriesColors.push(void 0):this.w.seriesData.seriesColors.push(e[n].color)}return this.w}parseDataNonAxisCharts(e){let t=this.w.config,n=Array.isArray(e)&&e.every(e=>typeof e==`number`)&&t.labels.length>0,r=Array.isArray(e)&&e.some(e=>e&&typeof e==`object`&&e.data||e&&typeof e==`object`&&e.parsing);if(n&&r&&console.warn(`ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility.`),n){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=t.labels.slice();for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames[e]===void 0&&this.w.seriesData.seriesNames.push(`series-`+(e+1));return this.w}if(Array.isArray(e)&&e.every(e=>typeof e==`number`)){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=[];for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames.push(t.labels[e]||`series-${e+1}`);return this.w}let i=this.extractPieDataFromSeries(e);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,t.chart.type===`radialBar`&&(this.w.seriesData.series=this.w.seriesData.series.map(e=>{let t=y.parseNumber(e);return t>100&&console.warn(`ApexCharts: RadialBar value ${t} > 100, consider using percentage values (0-100)`),t}));for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames[e]===void 0&&this.w.seriesData.seriesNames.push(`series-`+(e+1));return this.w}resetParsingFlags(){let e=this.w;e.axisFlags.dataWasParsed=!1,e.globals.originalSeries=null,e.config.series&&e.config.series.forEach(e=>{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(e){let t=[],n=[];if(!Array.isArray(e))return console.warn(`ApexCharts: Expected array for series data`),{values:[],labels:[]};if(e.length===0)return console.warn(`ApexCharts: Empty series array`),{values:[],labels:[]};let r=e[0];if(typeof r==`object`&&r&&r.data)this.extractPieDataFromSeriesObjects(e,t,n);else return console.warn(`ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property.`),{values:[],labels:[]};return{values:t,labels:n}}extractPieDataFromSeriesObjects(e,t,n){e.forEach((e,r)=>{if(!e.data||!Array.isArray(e.data)){console.warn(`ApexCharts: Series ${r} has no valid data array`);return}e.data.forEach(e=>{typeof e==`object`&&e?e.x!==void 0&&e.y!==void 0?(n.push(String(e.x)),t.push(y.parseNumber(e.y))):console.warn(`ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:`,e):console.warn(`ApexCharts: Expected object data point, got:`,typeof e)})})}handleExternalLabelsData(e){let t=this.w.config;t.xaxis.categories.length>0?this.w.labelData.labels=t.xaxis.categories:t.labels.length>0?this.w.labelData.labels=t.labels.slice():this.fallbackToCategory?(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length&&(this.w.rangeData.seriesRange.map(e=>{e.forEach(e=>{this.w.labelData.labels.indexOf(e.x)<0&&e.x&&this.w.labelData.labels.push(e.x)})}),this.w.labelData.labels=Array.from(new Set(this.w.labelData.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new w(t).convertCatToNumericXaxis(t,this.w.seriesData.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}_generateExternalLabels(e){let t=this.w.globals,n=this.w.config,r=[];if(t.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){let e=n.series.map(e=>e.data.filter((e,t,n)=>n.findIndex(t=>t.x===e.x)===t)),t=e.reduce((e,t,n,r)=>r[e].length>t.length?e:n,0);for(let n=0;n<e[t].length;n++)r.push(n+1)}else for(let e=0;e<this.w.seriesData.series[t.maxValsInArrayIndex].length;e++)r.push(e+1);this.w.seriesData.seriesX=[];for(let t=0;t<e.length;t++)this.w.seriesData.seriesX.push(r);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(r.length===0){r=t.axisCharts?[]:this.w.seriesData.series.map((e,t)=>t+1);for(let t=0;t<e.length;t++)this.w.seriesData.seriesX.push(r)}this.w.labelData.labels=r,n.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=r.map(e=>n.xaxis.labels.formatter(e))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(e){let t=this.w.config,n=this.w.globals,r=t.parsing;if(this.w.axisFlags.dataWasParsed||!r&&!e.some(e=>e.parsing))return e;let i=e.map((e,t)=>{if(!e.data||!Array.isArray(e.data)||e.data.length===0)return e;let n={x:e.parsing?.x||r?.x,y:e.parsing?.y||r?.y,z:e.parsing?.z||r?.z};if(!n.x&&!n.y)return e;let i=e.data[0];if(typeof i==`object`&&i&&(Object.prototype.hasOwnProperty.call(i,`x`)||Object.prototype.hasOwnProperty.call(i,`y`))||Array.isArray(i))return e;if(!n.x||!n.y||Array.isArray(n.y)&&n.y.length===0)return console.warn(`ApexCharts: Series ${t} has parsing config but missing x or y field specification`),e;let a=e.data.map((e,r)=>{if(typeof e!=`object`||!e)return console.warn(`ApexCharts: Series ${t}, data point ${r} is not an object, skipping parsing`),e;let i=this.getNestedValue(e,n.x),a,o;if(Array.isArray(n.y)){let t=n.y.map(t=>this.getNestedValue(e,t));a=this.w.config.chart.type===`bubble`&&t.length===2?t[0]:t}else a=this.getNestedValue(e,n.y);n.z&&(o=this.getNestedValue(e,n.z)),i===void 0&&console.warn(`ApexCharts: Series ${t}, data point ${r} missing field '${n.x}'`),a===void 0&&console.warn(`ApexCharts: Series ${t}, data point ${r} missing field '${n.y}'`);let s={x:i,y:a};if(this.w.config.chart.type===`bubble`&&Array.isArray(n.y)&&n.y.length===2){let t=this.getNestedValue(e,n.y[1]);t!==void 0&&(s.z=t)}return o!==void 0&&(s.z=o),s});return c(s({},e),{data:a,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,n.originalSeries||=y.clone(e),i}getNestedValue(e,t){if(!e||typeof e!=`object`||!t)return;if(t.indexOf(`.`)===-1)return e[t];let n=t.split(`.`),r=e;for(let e=0;e<n.length;e++){if(typeof r!=`object`||!r)return;r=r[n[e]]}return r}parseData(e){let t=this.w,n=t.config,r=t.globals;if(e=this.parseRawDataIfNeeded(e),n.series=e,r.initialSeries=y.clone(e),this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),r.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),n.chart.stacked){let e=new W(this.w);this.w.seriesData.series=e.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),r.axisCharts&&(this.w.seriesData.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),this.w.seriesData.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||n.xaxis.type===`numeric`&&n.labels.length===0&&n.xaxis.categories.length===0)&&this.handleExternalLabelsData(e);let i=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let e=0;e<i.length;e++)if(Array.isArray(i[e])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,initialSeries:r.initialSeries,originalSeries:r.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}excludeCollapsedSeriesInYAxis(){let e=this.w,t=[];e.globals.seriesYAxisMap.forEach((n,r)=>{let i=0;n.forEach(t=>{e.globals.collapsedSeriesIndices.indexOf(t)!==-1&&i++}),i>0&&i==n.length&&t.push(r)}),e.globals.ignoreYAxisIndexes=t.map(e=>e)}},De=class{static invalidateAll(e){!e||!e.globals||(e.globals.cachedSelectors&&(e.globals.cachedSelectors={}),e.globals.domCache&&e.globals.domCache.clear(),e.globals.dimensionCache={})}static invalidateDimensions(e){!e||!e.globals||(e.globals.dimensionCache={})}static invalidateSelectors(e){!e||!e.globals||e.globals.cachedSelectors&&(e.globals.cachedSelectors={})}static getCachedSelector(e,t,n){return!e||!e.globals?n():(e.globals.cachedSelectors||(e.globals.cachedSelectors={}),e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=n()),e.globals.cachedSelectors[t])}static getCachedDimension(e,t,n,r=1e3){if(!e||!e.globals)return n();e.globals.dimensionCache||(e.globals.dimensionCache={});let i=e.globals.dimensionCache[t],a=Date.now();if(i&&i.lastUpdate&&a-i.lastUpdate<r)return i.value;let o=n();return e.globals.dimensionCache[t]={value:o,lastUpdate:a},o}static cacheDOMElement(e,t,n){!e||!e.globals||(e.globals.domCache||(e.globals.domCache=new Map),e.globals.domCache.set(t,n))}static getCachedDOMElement(e,t){return!e||!e.globals||!e.globals.domCache?null:e.globals.domCache.get(t)||null}},Oe=class{constructor(e,t){this.w=e,this.ctx=t}_updateOptions(e,t=!1,n=!0,r=!0,i=!1){return new Promise(a=>{let o=[this.ctx];r&&(o=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(o=[this.ctx],this.w.globals.isExecCalled=!1),o.forEach((r,s)=>{let c=r.w;if(c.globals.shouldAnimate=n,t||(c.globals.resized=!0,c.globals.dataChanged=!0,n&&r.series.getPreviousPaths()),e&&typeof e==`object`&&(r.config=new D(e),e=N.extendArrayProps(r.config,e,c),r.w.globals.chartID!==this.w.globals.chartID&&delete e.series,c.config=y.extend(c.config,e),i&&(c.globals.lastXAxis=e.xaxis?y.clone(e.xaxis):[],c.globals.lastYAxis=e.yaxis?y.clone(e.yaxis):[],c.globals.initialConfig=y.extend({},c.config),c.globals.initialSeries=y.clone(c.config.series),e.series))){for(let e=0;e<c.globals.collapsedSeriesIndices.length;e++){let t=c.config.series[c.globals.collapsedSeriesIndices[e]];c.globals.collapsedSeries[e].data=c.globals.axisCharts?t.data.slice():t}for(let e=0;e<c.globals.ancillaryCollapsedSeriesIndices.length;e++){let t=c.config.series[c.globals.ancillaryCollapsedSeriesIndices[e]];c.globals.ancillaryCollapsedSeries[e].data=c.globals.axisCharts?t.data.slice():t}r.series.emptyCollapsedSeries(c.config.series)}return r.update(e).then(()=>{s===o.length-1&&a(r)})})})}_updateSeries(e,t,n=!1){return new Promise(r=>{let i=this.w;i.globals.shouldAnimate=t,i.globals.dataChanged=!0,De.invalidateSelectors(i),t&&this.ctx.series.getPreviousPaths(),this.ctx.data.resetParsingFlags();let a=this.ctx.data.parseData(e);return this.ctx._writeParsedSeriesData(a.seriesData),this.ctx._writeParsedRangeData(a.rangeData),this.ctx._writeParsedCandleData(a.candleData),this.ctx._writeParsedLabelData(a.labelData),this.ctx._writeParsedAxisFlags(a.axisFlags),n&&(i.globals.initialConfig.series=y.clone(i.config.series),i.globals.initialSeries=y.clone(i.config.series)),this.ctx.update().then(()=>{r(this.ctx)})})}_extendSeries(e,t){let n=this.w,r=n.config.series[t];return c(s({},n.config.series[t]),{name:e.name?e.name:r?.name,color:e.color?e.color:r?.color,type:e.type?e.type:r?.type,group:e.group?e.group:r?.group,hidden:typeof e.hidden<`u`?e.hidden:r?.hidden,data:e.data?e.data:r?.data,zIndex:typeof e.zIndex<`u`?e.zIndex:t})}toggleDataPointSelection(e,t){let n=this.w,r=null,i=`.apexcharts-series[data\\:realIndex='${e}']`;if(n.globals.axisCharts?r=n.dom.Paper.findOne(`${i} path[j='${t}'], ${i} circle[j='${t}'], ${i} rect[j='${t}']`):typeof t>`u`&&(r=n.dom.Paper.findOne(`${i} path[j='${e}']`),(n.config.chart.type===`pie`||n.config.chart.type===`polarArea`||n.config.chart.type===`donut`)&&this.ctx.pie.pieClicked(e)),r)new I(this.w).pathMouseDown(r,null);else return console.warn(`toggleDataPointSelection: Element not found`),null;return r.node?r.node:null}forceXAxisUpdate(e){let t=this.w;return[`min`,`max`].forEach(n=>{typeof e.xaxis[n]<`u`&&(t.config.xaxis[n]=e.xaxis[n],t.globals.lastXAxis[n]=e.xaxis[n])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric&&(e=new w(e).convertCatToNumericXaxis(e,this.ctx)),e}forceYAxisUpdate(e){return e.chart&&e.chart.stacked&&e.chart.stackType===`100%`&&(Array.isArray(e.yaxis)?e.yaxis.forEach((t,n)=>{e.yaxis[n].min=0,e.yaxis[n].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}revertDefaultAxisMinMax(e){let t=this.w,n=t.globals.lastXAxis,r=t.globals.lastYAxis;e&&e.xaxis&&(n=e.xaxis),e&&e.yaxis&&(r=e.yaxis),t.config.xaxis.min=n.min,t.config.xaxis.max=n.max;let i=e=>{typeof r[e]<`u`&&(t.config.yaxis[e].min=r[e].min,t.config.yaxis[e].max=r[e].max)};t.config.yaxis.map((e,n)=>{t.interact.zoomed||typeof r[n]<`u`?i(n):typeof this.ctx.opts.yaxis[n]<`u`&&(e.min=this.ctx.opts.yaxis[n].min,e.max=this.ctx.opts.yaxis[n].max)})}},ke=class{constructor(e){this.w=e.w,this.ttCtx=e}getNearestValues({hoverArea:e,elGrid:t,clientX:n,clientY:r}){let i=this.w,a=t.getBoundingClientRect(),o=a.width,s=a.height,c=o/(i.globals.dataPoints-1),l=s/i.globals.dataPoints,u=this.hasBars();(i.globals.comboCharts||u)&&!i.config.xaxis.convertedCatToNumeric&&(c=o/i.globals.dataPoints);let d=n-a.left-i.globals.barPadForNumericAxis,f=r-a.top;d<0||f<0||d>o||f>s?(e.classList.remove(`hovering-zoom`),e.classList.remove(`hovering-pan`)):i.interact.zoomEnabled?(e.classList.remove(`hovering-pan`),e.classList.add(`hovering-zoom`)):i.interact.panEnabled&&(e.classList.remove(`hovering-zoom`),e.classList.add(`hovering-pan`));let p=Math.round(d/c),m=Math.floor(f/l);u&&!i.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(d/c),--p);let h=null,g=null,_=i.globals.seriesXvalues.map(e=>e.filter(e=>y.isNumber(e))),v=i.globals.seriesYvalues.map(e=>e.filter(e=>y.isNumber(e)));if(i.axisFlags.isXNumeric){let e=this.ttCtx.getElGrid().getBoundingClientRect(),t=d*(e.width/o),n=f*(e.height/s);g=this.closestInMultiArray(t,n,_,v),h=g.index,p=g.j,h!==null&&i.globals.hasNullValues&&(_=i.globals.seriesXvalues[h],g=this.closestInArray(t,_),p=g.j)}return i.interact.capturedSeriesIndex=h===null?-1:h,(!p||p<1)&&(p=0),i.globals.isBarHorizontal?i.interact.capturedDataPointIndex=m:i.interact.capturedDataPointIndex=p,{capturedSeries:h,j:i.globals.isBarHorizontal?m:p,hoverX:d,hoverY:f}}getFirstActiveXArray(e){let t=this.w,n=0,r=e.map((e,t)=>e.length>0?t:-1);for(let e=0;e<r.length;e++)if(r[e]!==-1&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1){n=r[e];break}return n}closestInMultiArray(e,t,n,r){let i=this.w,a=e=>i.globals.collapsedSeriesIndices.indexOf(e)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1,o=1/0,s=null,c=null;for(let l=0;l<n.length;l++){if(!a(l))continue;let u=n[l],d=r[l],f=Math.min(u.length,d.length);for(let n=0;n<f;n++){let r=e-u[n],a=Math.sqrt(r*r);if(!i.globals.allSeriesHasEqualX){let e=t-d[n];a=Math.sqrt(r*r+e*e)}a<o&&(o=a,s=l,c=n)}}return{index:s,j:c}}closestInArray(e,t){let n=t[0],r=null,i=Math.abs(e-n);for(let n=0;n<t.length;n++){let a=Math.abs(e-t[n]);a<i&&(i=a,r=n)}return{j:r}}isXoverlap(e){let t=this.w,n=[],r=t.seriesData.seriesX.filter(e=>typeof e[0]<`u`);if(r.length>0)for(let t=0;t<r.length-1;t++)typeof r[t][e]<`u`&&typeof r[t+1][e]<`u`&&r[t][e]!==r[t+1][e]&&n.push(`unEqual`);return n.length===0}isInitialSeriesSameLen(){var e,t;let n=!0,r=this.w.globals.initialSeries?.filter((e,t)=>{var n;return!((n=this.w.globals.collapsedSeriesIndices)!=null&&n.includes(t))})||[];for(let i=0;i<r.length-1;i++){if(!((e=r[i])!=null&&e.data)||!((t=r[i+1])!=null&&t.data))return!0;if(r[i].data.length!==r[i+1].data.length){n=!1;break}}return n}getBarsHeight(e){return[...e].reduce((e,t)=>e+t.getBBox().height,0)}getElMarkers(e){return typeof e==`number`?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers-wrap > *`)}getAllMarkers(e=!1){let t=this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers-wrap`);t=[...t],e&&(t=t.filter(e=>{let t=Number(e.getAttribute(`data:realIndex`));return this.w.globals.collapsedSeriesIndices.indexOf(t)===-1})),t.sort((e,t)=>{var n=Number(e.getAttribute(`data:realIndex`)),r=Number(t.getAttribute(`data:realIndex`));return r<n?1:r>n?-1:0});let n=[];return t.forEach(e=>{n.push(e.querySelector(`.apexcharts-marker`))}),n}hasMarkers(e){return this.getElMarkers(e).length>0}getPathFromPoint(e,t){let n=Number(e.getAttribute(`cx`)),r=Number(e.getAttribute(`cy`)),i=e.getAttribute(`shape`);return new I(this.w).getMarkerPath(n,r,i,t)}getElBars(){return this.w.dom.baseEl.querySelectorAll(`.apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series`)}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(e){let t=this.w,n=t.config.markers.hover.size;return n===void 0&&(n=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),n}toggleAllTooltipSeriesGroups(e){let t=this.w,n=this.ttCtx;n.allTooltipSeriesGroups.length===0&&(n.allTooltipSeriesGroups=t.dom.baseEl.querySelectorAll(`.apexcharts-tooltip-series-group`));let r=n.allTooltipSeriesGroups;for(let n=0;n<r.length;n++)e===`enable`?(r[n].classList.add(`apexcharts-active`),r[n].style.display=t.config.tooltip.items.display):(r[n].classList.remove(`apexcharts-active`),r[n].style.display=`none`)}},Ae=class{constructor(e){this.w=e.w,this.ttCtx=e,this.tooltipUtil=new ke(e)}drawSeriesTexts({shared:e=!0,ttItems:t,i:n=0,j:r=null,y1:i,y2:a,e:o}){let s=this.w;s.config.tooltip.custom===void 0?this.toggleActiveInactiveSeries(e,n):this.handleCustomTooltip({i:n,j:r,y1:i,y2:a,w:s});let c=this.getValuesToPrint({i:n,j:r});this.printLabels({i:n,j:r,values:c,ttItems:t,shared:e,e:o});let l=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=l.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=l.getBoundingClientRect().height}printLabels({i:e,j:t,values:n,ttItems:r,shared:i,e:a}){let o=this.w,l,u=[],d=e=>o.seriesData.seriesGoals[e]&&o.seriesData.seriesGoals[e][t]&&Array.isArray(o.seriesData.seriesGoals[e][t]),{xVal:f,zVal:p,xAxisTTVal:m}=n,h=``,g=o.globals.colors[e];t!==null&&o.config.plotOptions.bar.distributed&&(g=o.globals.colors[t]);for(let n=0,_=o.seriesData.series.length-1;n<o.seriesData.series.length;n++,_--){let v=this.getFormatters(e);h=this.getSeriesName({fn:v.yLbTitleFormatter,index:e,seriesIndex:e,j:t}),o.config.chart.type===`treemap`&&(h=v.yLbTitleFormatter(String(o.config.series[e].data[t].x),{series:o.seriesData.series,seriesIndex:e,dataPointIndex:t,w:o}));let y=o.config.tooltip.inverseOrder?_:n;if(o.globals.axisCharts){let n=e=>o.axisFlags.isRangeData?v.yLbFormatter(o.rangeData.seriesRangeStart?.[e]?.[t],{series:o.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:t,w:o})+` - `+v.yLbFormatter(o.rangeData.seriesRangeEnd?.[e]?.[t],{series:o.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:t,w:o}):v.yLbFormatter(o.seriesData.series[e][t],{series:o.seriesData.series,seriesIndex:e,dataPointIndex:t,w:o});if(i)v=this.getFormatters(y),h=this.getSeriesName({fn:v.yLbTitleFormatter,index:y,seriesIndex:e,j:t}),g=o.globals.colors[y],l=n(y),d(y)&&(u=o.seriesData.seriesGoals[y][t].map(e=>({attrs:e,val:v.yLbFormatter(e.value,{seriesIndex:y,dataPointIndex:t,w:o})})));else{let r=(a?.target)?.getAttribute(`fill`);r&&(r.indexOf(`url`)===-1?g=r:r.indexOf(`Pattern`)!==-1&&(g=o.dom.baseEl.querySelector(r.substr(4).slice(0,-1)).childNodes[0].getAttribute(`stroke`))),l=n(e),d(e)&&Array.isArray(o.seriesData.seriesGoals[e][t])&&(u=o.seriesData.seriesGoals[e][t].map(n=>({attrs:n,val:v.yLbFormatter(n.value,{seriesIndex:e,dataPointIndex:t,w:o})})))}}t===null&&(l=v.yLbFormatter(o.seriesData.series[e],c(s({},o),{seriesIndex:e,dataPointIndex:e}))),this.DOMHandling({i:e,t:y,j:t,ttItems:r,values:{val:l,goalVals:u,xVal:f,xAxisTTVal:m,zVal:p},seriesName:h,shared:i,pColor:g})}}getFormatters(e){let t=this.w,n=t.formatters.yLabelFormatters[e],r;return t.formatters.ttVal===void 0?r=t.config.tooltip.y.title.formatter:Array.isArray(t.formatters.ttVal)?(n=t.formatters.ttVal[e]&&t.formatters.ttVal[e].formatter,r=t.formatters.ttVal[e]&&t.formatters.ttVal[e].title&&t.formatters.ttVal[e].title.formatter):(n=t.formatters.ttVal.formatter,typeof t.formatters.ttVal.title.formatter==`function`&&(r=t.formatters.ttVal.title.formatter)),typeof n!=`function`&&(n=t.formatters.yLabelFormatters[0]?t.formatters.yLabelFormatters[0]:function(e){return e}),typeof r!=`function`&&(r=function(e){return e?e+`: `:``}),{yLbFormatter:n,yLbTitleFormatter:r}}getSeriesName({fn:e,index:t,seriesIndex:n,j:r}){let i=this.w;return e(String(i.seriesData.seriesNames[t]),{series:i.seriesData.series,seriesIndex:n,dataPointIndex:r,w:i})}DOMHandling({t:e,j:t,ttItems:n,values:r,seriesName:i,shared:a,pColor:o}){let s=this.w,c=this.ttCtx,{val:l,goalVals:u,xVal:d,xAxisTTVal:f,zVal:p}=r,m=null;m=n[e].children,s.config.tooltip.fillSeriesColor&&(n[e].style.backgroundColor=o,m[0].style.display=`none`),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=s.dom.baseEl.querySelector(`.apexcharts-tooltip-title`)),c.tooltipTitle.innerHTML=d),c.isXAxisTooltipEnabled&&(c.xaxisTooltipText.innerHTML=f===``?d:f);let h=n[e].querySelector(`.apexcharts-tooltip-text-y-label`);h&&(h.innerHTML=i||``);let g=n[e].querySelector(`.apexcharts-tooltip-text-y-value`);g&&(g.innerHTML=typeof l<`u`?l:``),m[0]&&m[0].classList.contains(`apexcharts-tooltip-marker`)&&(s.config.tooltip.marker.fillColors&&Array.isArray(s.config.tooltip.marker.fillColors)&&(o=s.config.tooltip.marker.fillColors[e]),s.config.tooltip.fillSeriesColor?m[0].style.backgroundColor=o:m[0].style.color=o),s.config.tooltip.marker.show||(m[0].style.display=`none`);let _=n[e].querySelector(`.apexcharts-tooltip-text-goals-label`),v=n[e].querySelector(`.apexcharts-tooltip-text-goals-value`);if(u.length&&s.seriesData.seriesGoals[e]){let n=()=>{let e=`<div>`,t=`<div>`;u.forEach(n=>{e+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${n.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${n.attrs.name}</div>`,t+=`<div>${n.val}</div>`}),_.innerHTML=e+`</div>`,v.innerHTML=t+`</div>`};a?s.seriesData.seriesGoals[e][t]&&Array.isArray(s.seriesData.seriesGoals[e][t])?n():(_.innerHTML=``,v.innerHTML=``):n()}else _.innerHTML=``,v.innerHTML=``;if(p!==null){let t=n[e].querySelector(`.apexcharts-tooltip-text-z-label`);t.innerHTML=s.config.tooltip.z.title;let r=n[e].querySelector(`.apexcharts-tooltip-text-z-value`);r.innerHTML=typeof p<`u`?p:``}if(a&&m[0]){if(s.config.tooltip.hideEmptySeries){let t=n[e].querySelector(`.apexcharts-tooltip-marker`),r=n[e].querySelector(`.apexcharts-tooltip-text`);parseFloat(l)==0?(t.style.display=`none`,r.style.display=`none`):(t.style.display=`block`,r.style.display=`block`)}typeof l>`u`||l===null||s.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||s.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1?m[0].parentNode.style.display=`none`:m[0].parentNode.style.display=s.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1&&(m[0].parentNode.style.display=`none`)}toggleActiveInactiveSeries(e,t){let n=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups(`enable`);else{this.tooltipUtil.toggleAllTooltipSeriesGroups(`disable`);let e=n.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${t}`);e&&(e.classList.add(`apexcharts-active`),e.style.display=n.config.tooltip.items.display)}}getValuesToPrint({i:e,j:t}){let n=this.w,r=n.seriesData.seriesX.map(e=>e.length>0?e:[]),i=``,a=``,o=null,s=null,c={series:n.seriesData.series,seriesIndex:e,dataPointIndex:t,w:n},l=n.formatters.ttZFormatter;t===null?s=n.seriesData.series[e]:n.axisFlags.isXNumeric&&n.config.chart.type!==`treemap`?(i=r[e][t],r[e].length===0&&(i=r[this.tooltipUtil.getFirstActiveXArray(r)][t])):i=new Ee(this.w).isFormatXY()?typeof n.config.series[e].data[t]<`u`?n.config.series[e].data[t].x:``:typeof n.labelData.labels[t]<`u`?n.labelData.labels[t]:``;let u=i;return i=n.axisFlags.isXNumeric&&n.config.xaxis.type===`datetime`?new x(this.w).xLabelFormat(n.formatters.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new b(this.w).formatDate,w:this.w}):n.globals.isBarHorizontal?n.formatters.yLabelFormatters[0](u,c):n.formatters.xLabelFormatter(u,c),n.config.tooltip.x.formatter!==void 0&&(i=n.formatters.ttKeyFormatter(u,c)),n.seriesData.seriesZ.length>0&&n.seriesData.seriesZ[e].length>0&&(o=l(n.seriesData.seriesZ[e][t],n)),a=typeof n.config.xaxis.tooltip.formatter==`function`?n.formatters.xaxisTooltipFormatter(u,c):i,{val:Array.isArray(s)?s.join(` `):s,xVal:Array.isArray(i)?i.join(` `):i,xAxisTTVal:Array.isArray(a)?a.join(` `):a,zVal:o}}handleCustomTooltip({i:e,j:t,y1:n,y2:r,w:i}){let a=this.ttCtx.getElTooltip(),o=i.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]);let s=o({series:i.seriesData.series,seriesIndex:e,dataPointIndex:t,y1:n,y2:r,w:i});typeof s==`string`||typeof s==`number`?a.innerHTML=s:(s instanceof Element||typeof s.nodeName==`string`)&&(a.innerHTML=``,a.appendChild(s.cloneNode(!0)))}},je=class{constructor(e){this.ttCtx=e,this.w=e.w}moveXCrosshairs(e,t=null){let n=this.ttCtx,r=this.w,i=n.getElXCrosshairs(),a=e-n.xcrosshairsWidth/2,o=r.labelData.labels.slice().length;if(t!==null&&(a=r.layout.gridWidth/o*t),i!==null&&!r.globals.isBarHorizontal&&(i.setAttribute(`x`,a),i.setAttribute(`x1`,a),i.setAttribute(`x2`,a),i.setAttribute(`y2`,r.layout.gridHeight),i.classList.add(`apexcharts-active`)),a<0&&(a=0),a>r.layout.gridWidth&&(a=r.layout.gridWidth),n.isXAxisTooltipEnabled){let e=a;(r.config.xaxis.crosshairs.width===`tickWidth`||r.config.xaxis.crosshairs.width===`barWidth`)&&(e=a+n.xcrosshairsWidth/2),this.moveXAxisTooltip(e)}}moveYCrosshairs(e){let t=this.ttCtx;t.ycrosshairs!==null&&I.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&I.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}moveXAxisTooltip(e){let t=this.w,n=this.ttCtx;if(n.xaxisTooltip!==null&&n.xcrosshairsWidth!==0){n.xaxisTooltip.classList.add(`apexcharts-active`);let r=n.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.layout.translateY+1+t.config.xaxis.offsetY,i=n.xaxisTooltip.getBoundingClientRect().width;if(e-=i/2,!isNaN(e)){e+=t.layout.translateX;let i=0;i=new I(this.w).getTextRects(n.xaxisTooltipText.innerHTML),n.xaxisTooltipText.style.minWidth=i.width+`px`,n.xaxisTooltip.style.left=e+`px`,n.xaxisTooltip.style.top=r+`px`}}}moveYAxisTooltip(e){let t=this.w,n=this.ttCtx;n.yaxisTTEls===null&&(n.yaxisTTEls=t.dom.baseEl.querySelectorAll(`.apexcharts-yaxistooltip`));let r=parseInt(n.ycrosshairsHidden.getAttribute(`y1`),10),i=t.layout.translateY+r,a=n.yaxisTTEls[e].getBoundingClientRect(),o=a.height,s=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(s-=a.width),i-=o/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1&&i>0&&i<t.layout.gridHeight?(n.yaxisTTEls[e].classList.add(`apexcharts-active`),n.yaxisTTEls[e].style.top=i+`px`,n.yaxisTTEls[e].style.left=s+t.config.yaxis[e].tooltip.offsetX+`px`):n.yaxisTTEls[e].classList.remove(`apexcharts-active`)}moveTooltip(e,t,n=null){let r=this.w,i=this.ttCtx,a=i.getElTooltip(),o=i.tooltipRect,s=n===null?1:parseFloat(n),c=parseFloat(e)+s+5,l=parseFloat(t)+s/2;if(c>r.layout.gridWidth/2&&(c=c-o.ttWidth-s-10),c>r.layout.gridWidth-o.ttWidth-10&&(c=r.layout.gridWidth-o.ttWidth),c<-20&&(c=-20),r.config.tooltip.followCursor){let e=i.getElGrid().getBoundingClientRect();c=i.e.clientX-e.left,c>r.layout.gridWidth/2&&(c-=i.tooltipRect.ttWidth),l=i.e.clientY+r.layout.translateY-e.top,l>r.layout.gridHeight/2&&(l-=i.tooltipRect.ttHeight)}else r.globals.isBarHorizontal||o.ttHeight/2+l>r.layout.gridHeight&&(l=r.layout.gridHeight-o.ttHeight+r.layout.translateY);isNaN(c)||(c+=r.layout.translateX,a.style.left=c+`px`,a.style.top=l+`px`)}moveMarkers(e,t){let n=this.w,r=this.ttCtx;if(n.globals.markers.size[e]>0){let i=n.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker`);for(let e=0;e<i.length;e++)parseInt(i[e].getAttribute(`rel`),10)===t&&(r.marker.resetPointsSize(),r.marker.enlargeCurrentPoint(t,i[e]))}else r.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}moveDynamicPointOnHover(e,t){let n=this.w,r=this.ttCtx,i=0,a=0,o=new I(this.w),s=n.globals.pointsArray,c=r.tooltipUtil.getHoverMarkerSize(t),l=n.config.series[t].type;if(l&&(l===`column`||l===`candlestick`||l===`boxPlot`))return;i=s[t]?.[e]?.[0],a=s[t]?.[e]?.[1]||0;let u=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers path`);if(u&&a<n.layout.gridHeight&&a>0){let e=u.getAttribute(`shape`),t=o.getMarkerPath(i,a,e,c*1.5);u.setAttribute(`d`,t)}this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,a,c)}moveDynamicPointsOnHover(e){var t;let n=this.ttCtx,r=n.w,i=0,a=0,o=0,s=r.globals.pointsArray,c=new W(this.w),l=new I(this.w);o=c.getActiveConfigSeriesIndex(`asc`,[`line`,`area`,`scatter`,`bubble`]);let u=n.tooltipUtil.getHoverMarkerSize(o);if((t=s[o])!=null&&t[e]&&(i=s[o][e][0],a=s[o][e][1]),isNaN(i))return;let d=n.tooltipUtil.getAllMarkers();if(d.length)for(let t=0;t<r.seriesData.series.length;t++){let n=s[t];if(r.globals.comboCharts&&typeof n>`u`&&d.splice(t,0,null),n&&n.length){let n=s[t][e][1],a;d[t].setAttribute(`cx`,i);let o=d[t].getAttribute(`shape`);if(r.config.chart.type===`rangeArea`&&!r.globals.comboCharts){let i=e+r.seriesData.series[t].length;a=s[t][i][1];let o=Math.abs(n-a)/2;n-=o}if(n!==null&&!isNaN(n)&&n<r.layout.gridHeight+u&&n+u>0){let e=l.getMarkerPath(i,n,o,u);d[t].setAttribute(`d`,e)}else d[t].setAttribute(`d`,``)}}this.moveXCrosshairs(i),n.fixedTooltip||this.moveTooltip(i,a||r.layout.gridHeight,u)}moveStickyTooltipOverBars(e,t){let n=this.w,r=this.ttCtx,i=n.globals.columnSeries?n.globals.columnSeries.length:n.seriesData.series.length;n.config.chart.stacked&&(i=n.globals.barGroups.length);let a=i>=2&&i%2==0?Math.floor(i/2):Math.floor(i/2)+1;n.globals.isBarHorizontal&&(a=new W(this.w).getActiveConfigSeriesIndex(`desc`)+1);let o=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-rangebar-series .apexcharts-series[rel='${a}'] path[j='${e}']`);!o&&typeof t==`number`&&(o=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
29
+ .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
30
+ .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
31
+ .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`));let s=o?parseFloat(o.getAttribute(`cx`)):0,c=o?parseFloat(o.getAttribute(`cy`)):0,l=o?parseFloat(o.getAttribute(`barWidth`)):0,u=r.getElGrid().getBoundingClientRect(),d=o&&(o.classList.contains(`apexcharts-candlestick-area`)||o.classList.contains(`apexcharts-boxPlot-area`));n.axisFlags.isXNumeric?(o&&!d&&(s-=i%2==0?0:l/2),o&&d&&(s-=l/2)):n.globals.isBarHorizontal||(s=r.xAxisTicksPositions[e-1]+r.dataPointsDividedWidth/2,isNaN(s)&&(s=r.xAxisTicksPositions[e]-r.dataPointsDividedWidth/2)),n.globals.isBarHorizontal?c-=r.tooltipRect.ttHeight:n.config.tooltip.followCursor?c=r.e.clientY-u.top-r.tooltipRect.ttHeight/2:c+r.tooltipRect.ttHeight+15>n.layout.gridHeight&&(c=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(s),r.fixedTooltip||this.moveTooltip(s,c||n.layout.gridHeight)}},Me=class{constructor(e){this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new je(e)}drawDynamicPoints(){let e=this.w,t=new I(this.w),n=new B(this.w,this.ctx),r=e.dom.baseEl.querySelectorAll(`.apexcharts-series`);r=[...r],e.config.chart.stacked&&r.sort((e,t)=>parseFloat(e.getAttribute(`data:realIndex`))-parseFloat(t.getAttribute(`data:realIndex`)));for(let i=0;i<r.length;i++){let a=r[i].querySelector(`.apexcharts-series-markers-wrap`);if(a!==null){let r=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(e.config.chart.type===`line`||e.config.chart.type===`area`)&&!e.globals.comboCharts&&!e.config.tooltip.intersect&&(r+=` no-pointer-events`);let i=n.getMarkerConfig({cssClass:r,seriesIndex:Number(a.getAttribute(`data:realIndex`))}),o=t.drawMarker(0,0,i);o.node.setAttribute(`default-marker-size`,0);let s=v.createElementNS(L,`g`);s.classList.add(`apexcharts-series-markers`),s.appendChild(o.node),a.appendChild(s)}}}enlargeCurrentPoint(e,t,n=null,r=null){let i=this.w;i.config.chart.type!==`bubble`&&this.newPointSize(e,t);let a=t.getAttribute(`cx`),o=t.getAttribute(`cy`);if(n!==null&&r!==null&&(a=n,o=r),this.tooltipPosition.moveXCrosshairs(a),!this.fixedTooltip){if(i.config.chart.type===`radar`){let e=this.ttCtx.getElGrid().getBoundingClientRect();a=this.ttCtx.e.clientX-e.left}this.tooltipPosition.moveTooltip(a,o,i.config.markers.hover.size)}}enlargePoints(e){let t=this.w,n=this,r=this.ttCtx,i=e,a=t.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker`),o=t.config.markers.hover.size;for(let e=0;e<a.length;e++){let s=a[e].getAttribute(`rel`),c=a[e].getAttribute(`index`);if(o===void 0&&(o=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),i===parseInt(s,10)){n.newPointSize(i,a[e]);let t=a[e].getAttribute(`cx`),s=a[e].getAttribute(`cy`);n.tooltipPosition.moveXCrosshairs(t),r.fixedTooltip||n.tooltipPosition.moveTooltip(t,s,o)}else n.oldPointSize(a[e])}}newPointSize(e,t){let n=this.w,r=n.config.markers.hover.size,i=e===0?t.parentNode.firstChild:t.parentNode.lastChild;if(i.getAttribute(`default-marker-size`)!==`0`){let e=parseInt(i.getAttribute(`index`),10);r===void 0&&(r=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),r<0&&(r=0);let a=this.ttCtx.tooltipUtil.getPathFromPoint(t,r);t.setAttribute(`d`,a)}}oldPointSize(e){let t=parseFloat(e.getAttribute(`default-marker-size`)),n=this.ttCtx.tooltipUtil.getPathFromPoint(e,t);e.setAttribute(`d`,n)}resetPointsSize(){let e=this.w.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker`);for(let t=0;t<e.length;t++){let n=parseFloat(e[t].getAttribute(`default-marker-size`));if(y.isNumber(n)&&n>0){let r=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],n);e[t].setAttribute(`d`,r)}else e[t].setAttribute(`d`,`M0,0`)}}},Ne=class{constructor(e){this.w=e.w;let t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type===`rangeBar`&&t.config.plotOptions.bar.rangeBarGroupRows}getAttr(e,t){return parseFloat(e.target.getAttribute(t))}handleHeatTreeTooltip({e,opt:t,x:n,y:r,type:i}){let a=this.ttCtx,o=this.w;if(e.target.classList.contains(`apexcharts-${i}-rect`)){let i=this.getAttr(e,`i`),s=this.getAttr(e,`j`),c=this.getAttr(e,`cx`),l=this.getAttr(e,`cy`),u=this.getAttr(e,`width`),d=this.getAttr(e,`height`);if(a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i,j:s,shared:!1,e}),o.interact.capturedSeriesIndex=i,o.interact.capturedDataPointIndex=s,n=c+a.tooltipRect.ttWidth/2+u,r=l+a.tooltipRect.ttHeight/2-d/2,a.tooltipPosition.moveXCrosshairs(c+u/2),n>o.layout.gridWidth/2&&(n=c-a.tooltipRect.ttWidth/2+u),a.w.config.tooltip.followCursor){let e=o.dom.elWrap.getBoundingClientRect();n=o.interact.clientX-e.left-(n>o.layout.gridWidth/2?a.tooltipRect.ttWidth:0),r=o.interact.clientY-e.top-(r>o.layout.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:n,y:r}}handleMarkerTooltip({e,opt:t,x:n,y:r}){let i=this.w,a=this.ttCtx,o,s;if(e.target.classList.contains(`apexcharts-marker`)){let c=parseInt(t.paths.getAttribute(`cx`),10),l=parseInt(t.paths.getAttribute(`cy`),10),u=parseFloat(t.paths.getAttribute(`val`));if(s=parseInt(t.paths.getAttribute(`rel`),10),o=parseInt(t.paths.parentNode.parentNode.parentNode.getAttribute(`rel`),10)-1,a.intersect){let e=y.findAncestor(t.paths,`apexcharts-series`);e&&(o=parseInt(e.getAttribute(`data:realIndex`),10))}if(a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:o,j:s,shared:a.showOnIntersect?!1:i.config.tooltip.shared,e}),e.type===`mouseup`&&a.markerClick(e,o,s),i.interact.capturedSeriesIndex=o,i.interact.capturedDataPointIndex=s,n=c,r=l+i.layout.translateY-a.tooltipRect.ttHeight*1.4,a.w.config.tooltip.followCursor){let e=a.getElGrid().getBoundingClientRect();r=a.e.clientY+i.layout.translateY-e.top}u<0&&(r=l),a.marker.enlargeCurrentPoint(s,t.paths,n,r)}return{x:n,y:r}}handleBarTooltip({e,opt:t}){let n=this.w,r=this.ttCtx,i=r.getElTooltip(),a=0,o=0,s=0,c=0,l,u=this.getBarTooltipXY({e,opt:t});if(u.j===null&&u.barHeight===0&&u.barWidth===0)return;c=u.i;let d=u.j;if(n.interact.capturedSeriesIndex=c,n.interact.capturedDataPointIndex=d,n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!n.config.tooltip.shared?(o=u.x,s=u.y,l=Array.isArray(n.config.stroke.width)?n.config.stroke.width[c]:n.config.stroke.width,a=o):!n.globals.comboCharts&&!n.config.tooltip.shared&&(a/=2),isNaN(s)&&(s=n.globals.svgHeight-r.tooltipRect.ttHeight),o+r.tooltipRect.ttWidth>n.layout.gridWidth?o-=r.tooltipRect.ttWidth:o<0&&(o=0),r.w.config.tooltip.followCursor){let e=r.getElGrid().getBoundingClientRect();s=r.e.clientY-e.top}r.tooltip===null&&(r.tooltip=n.dom.baseEl.querySelector(`.apexcharts-tooltip`)),n.config.tooltip.shared||(n.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(a+l/2):r.tooltipPosition.moveXCrosshairs(a)),!r.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(s=s+n.layout.translateY-r.tooltipRect.ttHeight/2,i.style.left=o+n.layout.translateX+`px`,i.style.top=s+`px`)}getBarTooltipXY({e,opt:t}){let n=this.w,r=null,i=this.ttCtx,a=0,o=0,s=0,c=0,l=0,u=e.target.classList;if(u.contains(`apexcharts-bar-area`)||u.contains(`apexcharts-candlestick-area`)||u.contains(`apexcharts-boxPlot-area`)||u.contains(`apexcharts-rangebar-area`)){let u=e.target,d=u.getBoundingClientRect(),f=t.elGrid.getBoundingClientRect(),p=d.height;l=d.height;let m=d.width,h=parseInt(u.getAttribute(`cx`),10),g=parseInt(u.getAttribute(`cy`),10);c=parseFloat(u.getAttribute(`barWidth`));let _=e.type===`touchmove`?e.touches[0].clientX:e.clientX;r=parseInt(u.getAttribute(`j`),10),a=parseInt(u.parentNode.getAttribute(`rel`),10)-1;let v=u.getAttribute(`data-range-y1`),y=u.getAttribute(`data-range-y2`);n.globals.comboCharts&&(a=parseInt(u.parentNode.getAttribute(`data:realIndex`),10));let b=e=>(e=n.axisFlags.isXNumeric?h-m/2:this.isVerticalGroupedRangeBar?h+m/2:h-i.dataPointsDividedWidth+m/2,e),x=()=>g-i.dataPointsDividedHeight+p/2-i.tooltipRect.ttHeight/2;i.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:a,j:r,y1:v?parseInt(v,10):null,y2:y?parseInt(y,10):null,shared:i.showOnIntersect?!1:n.config.tooltip.shared,e}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(o=_-f.left+15,s=x()):(o=b(o),s=e.clientY-f.top-i.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?(o=h,o<i.xyRatios.baseLineInvertedY&&(o=h-i.tooltipRect.ttWidth),s=x()):(o=b(o),s=g)}return{x:o,y:s,barHeight:l,barWidth:c,i:a,j:r}}},Pe=class{constructor(e){this.w=e.w,this.ttCtx=e}drawXaxisTooltip(){let e=this.w,t=this.ttCtx,n=e.config.xaxis.position===`bottom`;t.xaxisOffY=n?e.layout.gridHeight+1:-e.layout.xAxisHeight-e.config.xaxis.axisTicks.height+3;let r=n?`apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom`:`apexcharts-xaxistooltip apexcharts-xaxistooltip-top`,i=e.dom.elWrap;t.isXAxisTooltipEnabled&&e.dom.baseEl.querySelector(`.apexcharts-xaxistooltip`)===null&&(t.xaxisTooltip=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.xaxisTooltip.setAttribute(`class`,r+` apexcharts-theme-`+e.config.tooltip.theme),i.appendChild(t.xaxisTooltip),t.xaxisTooltipText=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.xaxisTooltipText.classList.add(`apexcharts-xaxistooltip-text`),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}drawYaxisTooltip(){let e=this.w,t=this.ttCtx;for(let n=0;n<e.config.yaxis.length;n++){let r=e.config.yaxis[n].opposite||e.config.yaxis[n].crosshairs.opposite;t.yaxisOffX=r?e.layout.gridWidth+1:1;let i=r?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${n} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${n} apexcharts-yaxistooltip-left`,a=e.dom.elWrap;e.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${n}`)===null&&(t.yaxisTooltip=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.yaxisTooltip.setAttribute(`class`,i+` apexcharts-theme-`+e.config.tooltip.theme),a.appendChild(t.yaxisTooltip),n===0&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[n]=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.yaxisTooltipText[n].classList.add(`apexcharts-yaxistooltip-text`),t.yaxisTooltip.appendChild(t.yaxisTooltipText[n]))}}setXCrosshairWidth(){let e=this.w,t=this.ttCtx,n=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){let n=e.dom.baseEl.querySelector(`.apexcharts-bar-area`);if(n!==null&&e.config.xaxis.crosshairs.width===`barWidth`)t.xcrosshairsWidth=parseFloat(n.getAttribute(`barWidth`));else if(e.config.xaxis.crosshairs.width===`tickWidth`){let n=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/n}}else if(e.config.xaxis.crosshairs.width===`tickWidth`){let n=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/n}else if(e.config.xaxis.crosshairs.width===`barWidth`){let n=e.dom.baseEl.querySelector(`.apexcharts-bar-area`);n===null?t.xcrosshairsWidth=1:t.xcrosshairsWidth=parseFloat(n.getAttribute(`barWidth`))}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),n!==null&&t.xcrosshairsWidth>0&&n.setAttribute(`width`,t.xcrosshairsWidth)}handleYCrosshair(){let e=this.w,t=this.ttCtx;t.ycrosshairs=e.dom.baseEl.querySelector(`.apexcharts-ycrosshairs`),t.ycrosshairsHidden=e.dom.baseEl.querySelector(`.apexcharts-ycrosshairs-hidden`)}drawYaxisTooltipText(e,t,n){let r=this.ttCtx,i=this.w,a=i.globals,o=a.seriesYAxisMap[e];if(r.yaxisTooltips[e]&&o.length>0){let s=i.formatters.yLabelFormatters[e],c=r.getElGrid().getBoundingClientRect(),l=o[0],u=0;n.yRatio.length>1&&(u=l);let d=(t-c.top)*n.yRatio[u],f=a.maxYArr[l]-a.minYArr[l],p=a.minYArr[l]+(f-d);i.config.yaxis[e].reversed&&(p=a.maxYArr[l]-(f-d)),r.tooltipPosition.moveYCrosshairs(t-c.top),r.yaxisTooltipText[e].innerHTML=s(p),r.tooltipPosition.moveYAxisTooltip(e)}}},Fe=class{constructor(e,t){this.w=e,this.ctx=t,this.tConfig=e.config.tooltip,this.tooltipUtil=new ke(this),this.tooltipLabels=new Ae(this),this.tooltipPosition=new je(this),this.marker=new Me(this),this.intersect=new Ne(this),this.axesTooltip=new Pe(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!e.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1}setupDimensionCache(){let e=this.w,t=this.getElTooltip();t&&(this.updateDimensionCache(),typeof ResizeObserver<`u`&&!e.globals.resizeObserver&&(e.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),e.globals.resizeObserver.observe(t)))}updateDimensionCache(){let e=this.w,t=this.getElTooltip();if(!t)return;let n=t.getBoundingClientRect();e.globals.dimensionCache.tooltip={width:n.width,height:n.height,lastUpdate:Date.now()}}getCachedDimensions(){let e=this.w;if(e.globals.dimensionCache.tooltip){let t=e.globals.dimensionCache.tooltip;if(Date.now()-t.lastUpdate<1e3)return{ttWidth:t.width,ttHeight:t.height}}this.updateDimensionCache();let t=e.globals.dimensionCache.tooltip;return t?{ttWidth:t.width,ttHeight:t.height}:{ttWidth:0,ttHeight:0}}getElTooltip(e){return e||=this,e.w.dom.baseEl?e.w.dom.baseEl.querySelector(`.apexcharts-tooltip`):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(`.apexcharts-xcrosshairs`)}getElGrid(){return this.w.dom.baseEl.querySelector(`.apexcharts-grid`)}drawTooltip(e){let t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(e=>!!(e.show&&e.tooltip.enabled&&t.globals.axisCharts)),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);let n=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);if(n.classList.add(`apexcharts-tooltip`),t.config.tooltip.cssClass&&n.classList.add(t.config.tooltip.cssClass),n.classList.add(`apexcharts-theme-${this.tConfig.theme||`light`}`),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&(n.setAttribute(`role`,`tooltip`),n.setAttribute(`aria-live`,`polite`),n.setAttribute(`aria-atomic`,`true`),n.setAttribute(`aria-hidden`,`true`)),t.dom.elWrap.appendChild(n),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();let e=new U(this.w,this.ctx);this.xAxisTicksPositions=e.getXAxisTicksPositions()}if((t.globals.comboCharts||this.tConfig.intersect||t.config.chart.type===`rangeBar`)&&!this.tConfig.shared&&(this.showOnIntersect=!0),(t.config.markers.size===0||t.globals.markers.largestSize===0)&&this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length===t.seriesData.series.length)return;this.dataPointsDividedHeight=t.layout.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.layout.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),this.tooltipTitle.classList.add(`apexcharts-tooltip-title`),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,n.appendChild(this.tooltipTitle));let r=t.seriesData.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:t.seriesData.series.length),this.legendLabels=t.dom.baseEl.querySelectorAll(`.apexcharts-legend-text`),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(e){let t=this.w,n=[],r=this.getElTooltip();for(let i=0;i<e;i++){let a=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);a.classList.add(`apexcharts-tooltip-series-group`,`apexcharts-tooltip-series-group-${i}`),a.style.order=t.config.tooltip.inverseOrder?e-i:i+1;let o=v.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);o.classList.add(`apexcharts-tooltip-marker`),t.config.tooltip.fillSeriesColor?o.style.backgroundColor=t.globals.colors[i]:o.style.color=t.globals.colors[i];let s=t.config.markers.shape,c=s;Array.isArray(s)&&(c=s[i]),o.setAttribute(`shape`,c),a.appendChild(o);let l=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);l.classList.add(`apexcharts-tooltip-text`),l.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,l.style.fontSize=this.tConfig.style.fontSize,[`y`,`goals`,`z`].forEach(e=>{let t=v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);t.classList.add(`apexcharts-tooltip-${e}-group`);let n=v.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);n.classList.add(`apexcharts-tooltip-text-${e}-label`),t.appendChild(n);let r=v.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);r.classList.add(`apexcharts-tooltip-text-${e}-value`),t.appendChild(r),l.appendChild(t)}),a.appendChild(l),r.appendChild(a),n.push(a)}return n}addSVGEvents(){let e=this.w,t=e.config.chart.type,n=this.getElTooltip(),r=t===`bar`||t===`candlestick`||t===`boxPlot`||t===`rangeBar`,i=t===`area`||t===`line`||t===`scatter`||t===`bubble`||t===`radar`,a=e.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());let s=[],c=[],l={hoverArea:a,elGrid:o,tooltipEl:n,tooltipY:s,tooltipX:c,ttItems:this.ttItems},u;if(e.globals.axisCharts&&(i?u=e.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker`):r?u=e.dom.baseEl.querySelectorAll(`.apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area`):(t===`heatmap`||t===`treemap`)&&(u=e.dom.baseEl.querySelectorAll(`.apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap`)),u&&u.length))for(let e=0;e<u.length;e++)s.push(u[e].getAttribute(`cy`)),c.push(u[e].getAttribute(`cx`));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||r&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([a],l);else if(r&&!e.globals.comboCharts||i&&this.showOnIntersect)this.addDatapointEventsListeners(l);else if(!e.globals.axisCharts||t===`heatmap`||t===`treemap`){let t=e.dom.baseEl.querySelectorAll(`.apexcharts-series`);this.addPathsEventListeners(t,l)}if(this.showOnIntersect){let t=e.dom.baseEl.querySelectorAll(`.apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker`);t.length>0&&this.addPathsEventListeners(t,l),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(l)}}drawFixedTooltipRect(){let e=this.w,t=this.getElTooltip(),n=t.getBoundingClientRect(),r=n.width+10,i=n.height+10,a=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf(`right`)>-1&&(a=a+e.globals.svgWidth-r+10),s.indexOf(`bottom`)>-1&&(o=o+e.globals.svgHeight-i-10),t.style.left=a+`px`,t.style.top=o+`px`,{x:a,y:o,ttWidth:r,ttHeight:i}}addDatapointEventsListeners(e){let t=this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area`);this.addPathsEventListeners(t,e)}addPathsEventListeners(e,t){let n=this;for(let r=0;r<e.length;r++){let i={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};[`mousemove`,`mouseup`,`touchmove`,`mouseout`,`touchend`].map(t=>e[r].addEventListener(t,n.onSeriesHover.bind(n,i),{capture:!1,passive:!0}))}}onSeriesHover(e,t){let n=Date.now()-this.lastHoverTime;n>=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(e,t)},20-n))}seriesHover(e,t){this.lastHoverTime=Date.now();let n=[],r=this.w;r.config.chart.group&&(n=this.ctx.getGroupedCharts()),!(r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||r.globals.dataPoints===0))&&(n.length?n.forEach(n=>{let r=this.getElTooltip(n),i={paths:e.paths,tooltipEl:r,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===this.w.globals.minX&&n.w.globals.maxX===this.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:i,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}seriesHoverByContext({chartCtx:e,ttCtx:t,opt:n,e:r}){let i=e.w;if(!this.getElTooltip(e))return;let a=t.getCachedDimensions();t.tooltipRect={x:0,y:0,ttWidth:a.ttWidth,ttHeight:a.ttHeight},t.e=r,t.tooltipUtil.hasBars()&&!i.globals.comboCharts&&!t.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new W(e.w).toggleSeriesOnHover(r,r.target.parentNode),i.globals.axisCharts?t.axisChartsTooltips({e:r,opt:n,tooltipRect:t.tooltipRect}):t.nonAxisChartsTooltips({e:r,opt:n,tooltipRect:t.tooltipRect}),t.fixedTooltip&&t.drawFixedTooltipRect()}axisChartsTooltips({e,opt:t}){let n=this.w,r,i,a=t.elGrid.getBoundingClientRect(),o=e.type===`touchmove`?e.touches[0].clientX:e.clientX,s=e.type===`touchmove`?e.touches[0].clientY:e.clientY;if(this.clientY=s,this.clientX=o,n.interact.capturedSeriesIndex=-1,n.interact.capturedDataPointIndex=-1,s<a.top||s>a.top+a.height){this.handleMouseOut(t);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!n.config.tooltip.shared){let e=parseInt(t.paths.getAttribute(`index`),10);if(this.tConfig.enabledOnSeries.indexOf(e)<0){this.handleMouseOut(t);return}}let c=this.getElTooltip(),l=this.getElXCrosshairs(),u=[];n.config.chart.group&&(u=this.ctx.getSyncedCharts());let d=n.globals.xyCharts||n.config.chart.type===`bar`&&!n.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||n.globals.comboCharts&&this.tooltipUtil.hasBars();if(e.type===`mousemove`||e.type===`touchmove`||e.type===`mouseup`){if(n.globals.collapsedSeries.length+n.globals.ancillaryCollapsedSeries.length===n.seriesData.series.length)return;l!==null&&l.classList.add(`apexcharts-active`);let a=this.yaxisTooltips.filter(e=>e===!0);if(this.ycrosshairs!==null&&a.length&&this.ycrosshairs.classList.add(`apexcharts-active`),d&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(e,o,s,t);else if(n.config.chart.type===`heatmap`||n.config.chart.type===`treemap`){let a=this.intersect.handleHeatTreeTooltip({e,opt:t,x:r,y:i,type:n.config.chart.type});r=a.x,i=a.y,c.style.left=r+`px`,c.style.top=i+`px`}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e,opt:t}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e,opt:t,x:r,y:i});if(this.yaxisTooltips.length)for(let e=0;e<n.config.yaxis.length;e++)this.axesTooltip.drawYaxisTooltipText(e,s,this.xyRatios);n.dom.baseEl.classList.add(`apexcharts-tooltip-active`),t.tooltipEl.classList.add(`apexcharts-active`),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&t.tooltipEl.removeAttribute(`aria-hidden`)}else (e.type===`mouseout`||e.type===`touchend`)&&this.handleMouseOut(t)}nonAxisChartsTooltips({e,opt:t,tooltipRect:n}){let r=this.w,i=t.paths.getAttribute(`rel`),a=this.getElTooltip(),o=r.dom.elWrap.getBoundingClientRect();if(e.type===`mousemove`||e.type===`touchmove`){r.dom.baseEl.classList.add(`apexcharts-tooltip-active`),a.classList.add(`apexcharts-active`),r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&a.removeAttribute(`aria-hidden`),this.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:parseInt(i,10)-1,shared:!1});let e,s,c=t.paths.querySelector(`path[data\\:cx]`)||t.paths;if(r.config.tooltip.intersect&&c.hasAttribute(`data:cx`)&&c.hasAttribute(`data:cy`)){let t=r.dom.Paper.node.getBoundingClientRect();e=t.left-o.left+parseFloat(c.getAttribute(`data:cx`))-n.ttWidth/2,s=t.top-o.top+parseFloat(c.getAttribute(`data:cy`))-n.ttHeight-10}else e=r.interact.clientX-o.left-n.ttWidth/2,s=r.interact.clientY-o.top-n.ttHeight-10;if(a.style.left=e+`px`,a.style.top=s+`px`,r.config.legend.tooltipHoverFormatter){let e=r.config.legend.tooltipHoverFormatter,t=i-1,n=e(this.legendLabels[t].getAttribute(`data:default-text`),{seriesIndex:t,dataPointIndex:t,w:r});this.legendLabels[t].innerHTML=n}}else (e.type===`mouseout`||e.type===`touchend`)&&(a.classList.remove(`apexcharts-active`),r.dom.baseEl.classList.remove(`apexcharts-tooltip-active`),r.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t)}))}handleStickyTooltip(e,t,n,r){let i=this.w,a=this.tooltipUtil.getNearestValues({context:this,hoverArea:r.hoverArea,elGrid:r.elGrid,clientX:t,clientY:n}),o=a.j,s=a.capturedSeries;i.globals.collapsedSeriesIndices.includes(s)&&(s=null);let c=r.elGrid.getBoundingClientRect();if(a.hoverX<0||a.hoverX>c.width){this.handleMouseOut(r);return}if(s!==null)this.handleStickyCapturedSeries(e,s,r,o);else if(this.tooltipUtil.isXoverlap(o)||i.globals.isBarHorizontal){let t=i.seriesData.series.findIndex((e,t)=>!i.globals.collapsedSeriesIndices.includes(t));this.create(e,this,t,o,r.ttItems)}}handleStickyCapturedSeries(e,t,n,r){let i=this.w;if(!this.tConfig.shared&&i.seriesData.series[t][r]===null){this.handleMouseOut(n);return}if(typeof i.seriesData.series[t][r]<`u`)this.tConfig.shared&&this.tooltipUtil.isXoverlap(r)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,r,n.ttItems):this.create(e,this,t,r,n.ttItems,!1);else if(this.tooltipUtil.isXoverlap(r)){let t=i.seriesData.series.findIndex((e,t)=>!i.globals.collapsedSeriesIndices.includes(t));this.create(e,this,t,r,n.ttItems)}}deactivateHoverFilter(){let e=this.w,t=new I(this.w,this.ctx),n=e.dom.Paper.find(`.apexcharts-bar-area`);for(let e=0;e<n.length;e++)t.pathMouseLeave(n[e])}handleMouseOut(e){let t=this.w,n=this.getElXCrosshairs();if(t.dom.baseEl.classList.remove(`apexcharts-tooltip-active`),e.tooltipEl.classList.remove(`apexcharts-active`),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&e.tooltipEl.setAttribute(`aria-hidden`,`true`),this.deactivateHoverFilter(),t.config.chart.type!==`bubble`&&this.marker.resetPointsSize(),n!==null&&n.classList.remove(`apexcharts-active`),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove(`apexcharts-active`),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove(`apexcharts-active`),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=t.dom.baseEl.querySelectorAll(`.apexcharts-yaxistooltip`));for(let e=0;e<this.yaxisTTEls.length;e++)this.yaxisTTEls[e].classList.remove(`apexcharts-active`)}t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t)})}markerClick(e,t,n){let r=this.w;typeof r.config.chart.events.markerClick==`function`&&r.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}),this.ctx.events.fireEvent(`markerClick`,[e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}])}create(e,t,n,r,i,a=null){let o=this.w,l=t;e.type===`mouseup`&&this.markerClick(e,n,r),a===null&&(a=this.tConfig.shared);let u=this.tooltipUtil.hasMarkers(n),d=this.tooltipUtil.getElBars(),f=()=>{o.globals.markers.largestSize>0?l.marker.enlargePoints(r):l.tooltipPosition.moveDynamicPointsOnHover(r)};if(o.config.legend.tooltipHoverFormatter){let e=o.config.legend.tooltipHoverFormatter,t=Array.from(this.legendLabels);t.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t)});for(let i=0;i<t.length;i++){let s=t[i],c=parseInt(s.getAttribute(`i`),10),l=decodeURIComponent(s.getAttribute(`data:default-text`)),u=e(l,{seriesIndex:a?c:n,dataPointIndex:r,w:o});if(a)s.innerHTML=o.globals.collapsedSeriesIndices.indexOf(c)<0?u:l;else if(s.innerHTML=c===n?u:l,n===c)break}}let p=s(s({ttItems:i,i:n,j:r},typeof(o.rangeData.seriesRange?.[n]?.[r])?.y[0]?.y1<`u`&&{y1:(o.rangeData.seriesRange?.[n]?.[r])?.y[0]?.y1}),typeof(o.rangeData.seriesRange?.[n]?.[r])?.y[0]?.y2<`u`&&{y2:(o.rangeData.seriesRange?.[n]?.[r])?.y[0]?.y2});if(a){if(l.tooltipLabels.drawSeriesTexts(c(s({},p),{shared:this.showOnIntersect?!1:this.tConfig.shared})),u)f();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(d),this.barSeriesHeight>0)){let e=new I(this.w,this.ctx),t=o.dom.Paper.find(`.apexcharts-bar-area[j='${r}']`);this.deactivateHoverFilter(),l.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&f(),l.tooltipPosition.moveStickyTooltipOverBars(r,n);for(let n=0;n<t.length;n++)e.pathMouseEnter(t[n])}}else l.tooltipLabels.drawSeriesTexts(s({shared:!1},p)),this.tooltipUtil.hasBars()&&l.tooltipPosition.moveStickyTooltipOverBars(r,n),u&&l.tooltipPosition.moveMarkers(n,r)}},q=class e{constructor(e){this.node=e,e&&(e.instance=this),this._listeners=[],this._filter=null}attr(e,t){if(typeof e==`string`&&t===void 0)return this.node.getAttribute(e);let n=typeof e==`string`?{[e]:t}:e;for(let e in n){let t=n[e];t===null?this.node.removeAttribute(e):t!==void 0&&(typeof t==`number`&&isNaN(t)&&(t=0),this.node.setAttribute(e,t))}if(this.node.nodeName===`text`&&n.x!=null){let e=this.node.querySelectorAll(`tspan[data-newline]`);for(let t=0;t<e.length;t++)e[t].setAttribute(`x`,n.x)}return this}css(e){for(let t in e)this.node.style[t]=e[t];return this}fill(e){return typeof e==`object`?this.attr(e):this.attr(`fill`,e)}stroke(e){return typeof e==`object`?(e.color!==void 0&&this.attr(`stroke`,e.color),e.width!==void 0&&this.attr(`stroke-width`,e.width),e.dasharray!==void 0&&this.attr(`stroke-dasharray`,e.dasharray),e.linecap!==void 0&&this.attr(`stroke-linecap`,e.linecap),e.opacity!==void 0&&this.attr(`stroke-opacity`,e.opacity),this):this.attr(`stroke`,e)}size(e,t){return this.attr({width:e,height:t})}move(e,t){return this.attr({x:e,y:t})}center(e,t){if(this.node.nodeName===`g`){let n=this.bbox(),r=e-(n.x+n.width/2),i=t-(n.y+n.height/2);return this.attr(`transform`,`translate(${r}, ${i})`)}return this.attr({cx:e,cy:t})}add(e){return this.node.appendChild(e.node||e),this}addTo(e){return(e.node||e).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(t=>t.instance||new e(t))}findOne(t){let n=this.node.querySelector(t);return n?n.instance||new e(n):null}on(e,t){let n=e.split(`.`)[0];return this._listeners.push({event:e,eventType:n,handler:t}),this.node.addEventListener(n,t),this}off(e,t){if(!e&&!t)this._listeners.forEach(e=>{this.node.removeEventListener(e.eventType,e.handler)}),this._listeners=[];else if(e&&!t){let t=e.split(`.`)[0];this._listeners=this._listeners.filter(e=>e.eventType===t?(this.node.removeEventListener(e.eventType,e.handler),!1):!0)}else{let n=e.split(`.`)[0];this._listeners=this._listeners.filter(e=>e.eventType===n&&e.handler===t?(this.node.removeEventListener(e.eventType,e.handler),!1):!0)}return this}each(t,n){return Array.from(this.node.children).forEach(r=>{let i=r.instance||new e(r);t.call(i),n&&i.each(t,n)}),this}removeClass(e){return e===`*`?this.node.removeAttribute(`class`):this.node.classList.remove(e),this}children(){return Array.from(this.node.childNodes).filter(e=>e.nodeType===1).map(t=>t.instance||new e(t))}hide(){return this.node.style.display=`none`,this}show(){return this.node.style.display=``,this}bbox(){if(typeof this.node.getBBox==`function`)try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){let n=v.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);return n.textContent=t,this.node.appendChild(n),new e(n)}plot(e){return typeof e==`string`&&this.attr(`d`,e),this}animate(){throw Error(`Animation module not loaded`)}filterWith(){throw Error(`Filter module not loaded`)}unfilter(e){return this._filter&&=(this.node.removeAttribute(`filter`),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),null),this}filterer(){return this._filter}},Ie=0,Le=class extends q{constructor(e,t,n){let r=t===`radial`?`radialGradient`:`linearGradient`,i=v.createElementNS(L,r);super(i),this._id=`SvgjsGradient`+ ++Ie,this.attr(`id`,this._id),typeof n==`function`&&n(new Re(this));let a=e.node.querySelector(`defs`);a||(a=v.createElementNS(L,`defs`),e.node.appendChild(a)),a.appendChild(this.node)}stop(e,t,n){let r=v.createElementNS(L,`stop`);return r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n!==void 0&&r.setAttribute(`stop-opacity`,n),this.node.appendChild(r),this}from(e,t){return this.attr({x1:e,y1:t})}to(e,t){return this.attr({x2:e,y2:t})}url(){return`url(#`+this._id+`)`}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},Re=class{constructor(e){this.gradient=e}stop(e,t,n){return this.gradient.stop(e,t,n),this}},ze=0,Be=class extends q{constructor(e,t,n,r){let i=v.createElementNS(L,`pattern`);super(i),this._id=`SvgjsPattern`+ ++ze,this.attr({id:this._id,width:t,height:n,patternUnits:`userSpaceOnUse`}),typeof r==`function`&&r(new Ve(this.node));let a=e.node.querySelector(`defs`);a||(a=v.createElementNS(L,`defs`),e.node.appendChild(a)),a.appendChild(this.node)}url(){return`url(#`+this._id+`)`}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},Ve=class e extends q{line(e,t,n,r){let i=this._make(`line`);return e!==void 0&&i.attr({x1:e,y1:t,x2:n,y2:r}),i}rect(e,t){let n=this._make(`rect`);return e!==void 0&&n.attr({width:e,height:t}),n}circle(e){let t=this._make(`circle`);return e!==void 0&&t.attr({r:e/2,cx:e/2,cy:e/2}),t}path(e){let t=this._make(`path`);return e&&t.attr(`d`,e),t}polygon(e){let t=this._make(`polygon`);return e&&t.attr(`points`,e),t}group(){return this._makeContainer(`g`)}defs(){return this._makeContainer(`defs`)}plain(e){let t=v.createElementNS(L,`text`);t.textContent=e;let n=new q(t);return this.node.appendChild(t),n}text(e){let t=v.createElementNS(L,`text`),n=new q(t);return this.node.appendChild(t),typeof e==`function`&&e(new He(t)),n}image(e,t){let n=v.createElementNS(L,`image`);n.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e);let r=new q(n);if(this.node.appendChild(n),typeof t==`function`){let n=new Image;n.onload=function(){r.size(n.width,n.height),t.call(r,{width:n.width,height:n.height})},n.src=e}return r}gradient(e,t){return new Le(this,e,t)}pattern(e,t,n){return new Be(this,e,t,n)}_make(e){let t=v.createElementNS(L,e);return this.node.appendChild(t),new q(t)}_makeContainer(t){let n=v.createElementNS(L,t);return this.node.appendChild(n),new e(n)}},He=class{constructor(e){this.textNode=e}tspan(e){let t=v.createElementNS(L,`tspan`);return t.textContent=e,this.textNode.appendChild(t),new Ue(t,this.textNode)}},Ue=class{constructor(e,t){this.node=e,this.textNode=t}newLine(){return this.node.setAttribute(`dy`,`1.1em`),this.node.dataset.newline=`1`,this}},We=0,Ge=class extends q{constructor(){let e=v.createElementNS(L,`filter`);super(e),this._id=`SvgjsFilter`+ ++We,this.attr(`id`,this._id)}size(e,t,n,r){return this.attr({width:e,height:t,x:n,y:r})}},Ke=class{constructor(e){this.filter=e}colorMatrix(e){return this._primitive(`feColorMatrix`,e)}offset(e){return this._primitive(`feOffset`,e)}gaussianBlur(e){return this._primitive(`feGaussianBlur`,e)}flood(e){return this._primitive(`feFlood`,e)}composite(e){return this._primitive(`feComposite`,e)}merge(e){let t=v.createElementNS(L,`feMerge`);return e.forEach(e=>{let n=v.createElementNS(L,`feMergeNode`);n.setAttribute(`in`,e),t.appendChild(n)}),this.filter.node.appendChild(t),new q(t)}_primitive(e,t){let n=v.createElementNS(L,e);for(let e in t)n.setAttribute(e,t[e]);return this.filter.node.appendChild(n),new q(n)}};function qe(e){e.prototype.filterWith=function(e){let t=new Ge;this._filter=t;let n=this.node;for(;n&&n.nodeName!==`svg`;)n=n.parentNode;if(n){let e=n.querySelector(`defs`);e||(e=v.createElementNS(L,`defs`),n.insertBefore(e,n.firstChild)),e.appendChild(t.node)}return e(new Ke(t)),this.attr(`filter`,`url(#`+t._id+`)`),this},e.prototype.unfilter=function(e){return this._filter&&=(this.node.removeAttribute(`filter`),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),null),this},e.prototype.filterer=function(){return this._filter}}function Je(e){if(!e||typeof e!=`string`)return[[`M`,0,0]];let t=[],n=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,r=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],o=[];for(;(i=n.exec(e))!==null;)a.push(i[1]),o.push(i.index);for(let n=0;n<a.length;n++){let i=o[n]+a[n].length,s=n+1<o.length?o[n+1]:e.length,c=e.substring(i,s),l=[],u;for(r.lastIndex=0;(u=r.exec(c))!==null;)l.push(parseFloat(u[0]));let d=a[n].toUpperCase();if(d===`Z`)t.push([`Z`]);else if(d===`M`||d===`L`||d===`T`)for(let e=0;e<l.length;e+=2)t.push([d,l[e],l[e+1]]);else if(d===`H`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`V`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`C`)for(let e=0;e<l.length;e+=6)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5]]);else if(d===`S`||d===`Q`)for(let e=0;e<l.length;e+=4)t.push([d,l[e],l[e+1],l[e+2],l[e+3]]);else if(d===`A`)for(let e=0;e<l.length;e+=7)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5],l[e+6]])}return t.length===0&&t.push([`M`,0,0]),t}function Ye(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;return e.forEach(e=>{for(let a=1;a<e.length;a+=2)if(a+1<=e.length){let o=e[a],s=e[a+1];typeof o==`number`&&typeof s==`number`&&(o<t&&(t=o),o>r&&(r=o),s<n&&(n=s),s>i&&(i=s))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:n,width:r-t,height:i-n}}function Xe(e){return e.map(e=>e.join(` `)).join(` `)}function Ze(e){switch(e[0]){case`z`:case`Z`:e[0]=`L`,e[1]=this.start[0],e[2]=this.start[1];break;case`H`:e[0]=`L`,e[2]=this.pos[1];break;case`V`:e[0]=`L`,e[2]=e[1],e[1]=this.pos[0];break;case`T`:e[0]=`Q`,e[3]=e[1],e[4]=e[2],e[1]=this.reflection[1],e[2]=this.reflection[0];break;case`S`:e[0]=`C`,e[6]=e[4],e[5]=e[3],e[4]=e[2],e[3]=e[1],e[2]=this.reflection[1],e[1]=this.reflection[0];break}return e}function Qe(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],`SCQT`.indexOf(e[0])!=-1&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function $e(e){var t=[e];switch(e[0]){case`M`:return this.pos=this.start=[e[1],e[2]],t;case`L`:e[5]=e[3]=e[1],e[6]=e[4]=e[2],e[1]=this.pos[0],e[2]=this.pos[1];break;case`Q`:e[6]=e[4],e[5]=e[3],e[4]=e[4]*1/3+e[2]*2/3,e[3]=e[3]*1/3+e[1]*2/3,e[2]=this.pos[1]*1/3+e[2]*2/3,e[1]=this.pos[0]*1/3+e[1]*2/3;break;case`A`:t=tt(this.pos,e),e=t[0];break}return e[0]=`C`,this.pos=[e[5],e[6]],this.reflection=[2*e[5]-e[3],2*e[6]-e[4]],t}function et(e,t){if(t===!1)return!1;for(var n=t,r=e.length;n<r;++n)if(e[n][0]==`M`)return n;return!1}function tt(e,t){var n=Math.abs(t[1]),r=Math.abs(t[2]),i=t[3]%360,a=t[4],o=t[5],s=t[6],c=t[7],l=new R(e[0],e[1]),u=new R(s,c),d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N=[],P,F,I,L;if(n===0||r===0||l.x===u.x&&l.y===u.y)return[[`C`,l.x,l.y,u.x,u.y,u.x,u.y]];for(d=new R((l.x-u.x)/2,(l.y-u.y)/2).transform(new ee().rotate(i)),f=d.x*d.x/(n*n)+d.y*d.y/(r*r),f>1&&(f=Math.sqrt(f),n=f*n,r=f*r),p=new ee().rotate(i).scale(1/n,1/r).rotate(-i),l=l.transform(p),u=u.transform(p),m=[u.x-l.x,u.y-l.y],g=m[0]*m[0]+m[1]*m[1],h=Math.sqrt(g),m[0]/=h,m[1]/=h,_=g<4?Math.sqrt(1-g/4):0,a===o&&(_*=-1),v=new R((u.x+l.x)/2+_*-m[1],(u.y+l.y)/2+_*m[0]),y=new R(l.x-v.x,l.y-v.y),b=new R(u.x-v.x,u.y-v.y),x=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(x*=-1),S=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(S*=-1),o&&x>S&&(S+=2*Math.PI),!o&&x<S&&(S-=2*Math.PI),w=Math.ceil(Math.abs(x-S)*2/Math.PI),E=[],D=x,C=(S-x)/w,T=4*Math.tan(C/4)/3,j=0;j<=w;j++)k=Math.cos(D),O=Math.sin(D),A=new R(v.x+k,v.y+O),E[j]=[new R(A.x+T*O,A.y-T*k),A,new R(A.x-T*O,A.y+T*k)],D+=C;for(E[0][0]=E[0][1].clone(),E[E.length-1][2]=E[E.length-1][1].clone(),p=new ee().rotate(i).scale(n,r).rotate(-i),j=0,M=E.length;j<M;j++)E[j][0]=E[j][0].transform(p),E[j][1]=E[j][1].transform(p),E[j][2]=E[j][2].transform(p);for(j=1,M=E.length;j<M;j++)A=E[j-1][2],P=A.x,F=A.y,A=E[j][0],I=A.x,L=A.y,A=E[j][1],s=A.x,c=A.y,N.push([`C`,P,F,I,L,s,c]);return N}function nt(e,t,n,r,i,a){for(var o=e.slice(t,n||void 0),s=r.slice(i,a||void 0),c=0,l={pos:[0,0],start:[0,0]},u={pos:[0,0],start:[0,0]};o[c]=Ze.call(l,o[c]),s[c]=Ze.call(u,s[c]),o[c][0]!=s[c][0]||o[c][0]==`M`||o[c][0]==`A`&&(o[c][4]!=s[c][4]||o[c][5]!=s[c][5])?(Array.prototype.splice.apply(o,[c,1].concat($e.call(l,o[c]))),Array.prototype.splice.apply(s,[c,1].concat($e.call(u,s[c])))):(o[c]=Qe.call(l,o[c]),s[c]=Qe.call(u,s[c])),!(++c==o.length&&c==s.length);)c==o.length&&o.push([`C`,l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),c==s.length&&s.push([`C`,u.pos[0],u.pos[1],u.pos[0],u.pos[1],u.pos[0],u.pos[1]]);return{start:o,dest:s}}function rt(e,t){for(var n=Je(e),r=Je(t),i=0,a=0,o=!1,s=!1,c;!(i===!1&&a===!1);){if(o=et(n,i===!1?!1:i+1),s=et(r,a===!1?!1:a+1),i===!1){let e=Ye(c.start);i=e.height==0||e.width==0?n.push(n[0])-1:n.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}if(a===!1){let e=Ye(c.dest);a=e.height==0||e.width==0?r.push(r[0])-1:r.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}c=nt(n,i,o,r,a,s),n=n.slice(0,i).concat(c.start,o===!1?[]:n.slice(o)),r=r.slice(0,a).concat(c.dest,s===!1?[]:r.slice(s)),i=o===!1?!1:i+c.start.length,a=s===!1?!1:a+c.dest.length}return{start:n,dest:r}}function it(e,t){var n=rt(e,t),r=n.start,i=n.dest;return function(e){return Xe(r.map(function(t,n){return i[n].map(function(r,a){return a===0?r:t[a]+(i[n][a]-t[a])*e})}))}}function at(e){return-Math.cos(e*Math.PI)/2+.5}function ot(e){if(!e||typeof e!=`string`)return null;if(e[0]===`#`){let t=e.slice(1);t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255,1]}let t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]===void 0?1:+t[4]]:null}function st(e,t,n){return`rgba(${Math.round(e[0]+(t[0]-e[0])*n)},${Math.round(e[1]+(t[1]-e[1])*n)},${Math.round(e[2]+(t[2]-e[2])*n)},${e[3]+(t[3]-e[3])*n})`}var ct=class e{constructor(e,t,n){this.el=e,this.duration=t??300,this.delay=n||0,this._attrTarget=null,this._plotTarget=null,this._afterCb=null,this._duringCb=null,this._next=null,this._root=null,this._scheduled=!1}attr(e){return this._attrTarget=e,this._schedule(),this}plot(e){return this._plotTarget=e,this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(t,n){let r=new e(this.el,t,n);return this._next=r,r._root=this._root||this,r}_schedule(){let e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){let e=[],t=this;for(;t;)e.push(t),t=t._next;let n=0;e.forEach(e=>{n+=e.delay,e._execute(n),n+=e.duration})}_execute(e){let t=this.el,n=this.duration;if(n<=1){let n=()=>{this._attrTarget&&t.attr(this._attrTarget),this._plotTarget&&t.plot(this._plotTarget),this._afterCb&&this._afterCb.call(t)};e>0?setTimeout(n,e):n();return}let r=()=>{let e={},r={},i={};if(this._attrTarget)for(let n of Object.keys(this._attrTarget)){let a=t.attr(n);e[n]=a;let o=ot(a),s=ot(String(this._attrTarget[n]));o&&s&&(r[n]=o,i[n]=s)}let a=null;if(this._plotTarget){let e=t.attr(`d`)||``;try{a=it(e,this._plotTarget)}catch{a=null}}let o=performance.now(),s=c=>{let l=c-o,u=Math.min(l/n,1),d=at(u);if(this._attrTarget)if(u>=1)t.attr(this._attrTarget);else{let n={};for(let t of Object.keys(this._attrTarget))if(r[t]&&i[t])n[t]=st(r[t],i[t],d);else{let r=parseFloat(e[t]),i=parseFloat(this._attrTarget[t]);!isNaN(r)&&!isNaN(i)&&(n[t]=r+(i-r)*d)}t.attr(n)}a&&u<1&&t.attr(`d`,a(d)),this._duringCb&&this._duringCb(d),u<1?v.requestAnimationFrame(s):(this._plotTarget&&t.attr(`d`,this._plotTarget),this._afterCb&&this._afterCb.call(t))};v.requestAnimationFrame(s)};e>0?setTimeout(r,e):r()}};function lt(e){e.prototype.animate=function(e,t){return new ct(this,e,t)}}function ut(e){e.prototype.draggable=function(e){if(e===!1)return this._dragCleanup&&=(this._dragCleanup(),null),this;let t=this,n=e||{},r=e=>{if(e.button&&e.button!==0)return;e.stopPropagation();let r=e.type===`touchstart`?e.touches[0]:e,i=t.node,a=parseFloat(i.getAttribute(`x`))||0,o=parseFloat(i.getAttribute(`y`))||0,s=r.clientX,c=r.clientY,l=i.ownerSVGElement,u=null;l&&(u=l.getScreenCTM());let f=e=>{let t=e.type===`touchmove`?e.touches[0]:e,r=t.clientX-s,l=t.clientY-c;u&&(r/=u.a,l/=u.d);let d=a+r,f=o+l,p=parseFloat(i.getAttribute(`width`))||0,m=parseFloat(i.getAttribute(`height`))||0;n.minX!==void 0&&d<n.minX&&(d=n.minX),n.minY!==void 0&&f<n.minY&&(f=n.minY),n.maxX!==void 0&&d+p>n.maxX&&(d=n.maxX-p),n.maxY!==void 0&&f+m>n.maxY&&(f=n.maxY-m);let h={x:d,y:f,w:p,h:m,x2:d+p,y2:f+m},g=new CustomEvent(`dragmove`,{detail:{handler:{move:function(e,t){i.setAttribute(`x`,e),i.setAttribute(`y`,t)}},box:h}});i.dispatchEvent(g)},p=()=>{d.isBrowser()&&(document.removeEventListener(`mousemove`,f),document.removeEventListener(`touchmove`,f),document.removeEventListener(`mouseup`,p),document.removeEventListener(`touchend`,p))};d.isBrowser()&&(document.addEventListener(`mousemove`,f),document.addEventListener(`touchmove`,f),document.addEventListener(`mouseup`,p),document.addEventListener(`touchend`,p))};return t.node.addEventListener(`mousedown`,r),t.node.addEventListener(`touchstart`,r),t._dragCleanup=()=>{t.node.removeEventListener(`mousedown`,r),t.node.removeEventListener(`touchstart`,r)},t}}function dt(e){e.prototype.select=function(e){if(e===!1)return this._selectCleanup&&=(this._selectCleanup(),null),this;let t=this,{createHandle:n,updateHandle:r}=e,i=document.createElementNS(L,`g`);i.setAttribute(`class`,`svg_select_points`);let a=t.node.parentNode;a&&a.appendChild(i);let o={},s=[`t`,`b`,`l`,`r`,`lt`,`rt`,`lb`,`rb`];s.forEach((e,t)=>{let r=new Ve(document.createElementNS(L,`g`));i.appendChild(r.node),o[e]={group:r,handle:n(r,[0,0],t,[],e)}});let c=()=>{let e=parseFloat(t.attr(`x`))||0,n=parseFloat(t.attr(`y`))||0,a=parseFloat(t.attr(`width`))||0,c=parseFloat(t.attr(`height`))||0,l=t.node.getAttribute(`transform`);l?i.setAttribute(`transform`,l):i.removeAttribute(`transform`);let u={t:[e+a/2,n],b:[e+a/2,n+c],l:[e,n+c/2],r:[e+a,n+c/2],lt:[e,n],rt:[e+a,n],lb:[e,n+c],rb:[e+a,n+c]};s.forEach(e=>{o[e]&&u[e]&&r(o[e].group,u[e])})};return c(),t._selectHandles=i,t._selectHandlesMap=o,t._updateSelectPositions=c,t._selectCleanup=()=>{i.parentNode&&i.parentNode.removeChild(i),t._selectHandles=null,t._selectHandlesMap=null,t._updateSelectPositions=null},t},e.prototype.resize=function(e){if(e===!1)return this._resizeCleanup&&=(this._resizeCleanup(),null),this;let t=this,n=t._selectHandlesMap;if(!n)return t;let r=[],i=e=>{let i=n[e];if(!i||!i.group||!i.group.node)return;let a=i.group.node,o=n=>{if(n.button&&n.button!==0)return;n.stopPropagation();let r=(n.type===`touchstart`?n.touches[0]:n).clientX,i=t.node.ownerSVGElement,a=null;i&&(a=i.getScreenCTM());let o=parseFloat(t.attr(`x`))||0,s=parseFloat(t.attr(`width`))||0,c=n=>{let i=(n.type===`touchmove`?n.touches[0]:n).clientX-r;a&&(i/=a.a);let c=o,l=s;e===`l`?(c=o+i,l=s-i):e===`r`&&(l=s+i),l<0&&(l=0),t.attr({x:c,width:l}),t._updateSelectPositions&&t._updateSelectPositions();let u=new CustomEvent(`resize`,{detail:{el:t}});t.node.dispatchEvent(u)},l=()=>{d.isBrowser()&&(document.removeEventListener(`mousemove`,c),document.removeEventListener(`touchmove`,c),document.removeEventListener(`mouseup`,l),document.removeEventListener(`touchend`,l));let e=new CustomEvent(`resize`,{detail:{el:t}});t.node.dispatchEvent(e)};d.isBrowser()&&(document.addEventListener(`mousemove`,c),document.addEventListener(`touchmove`,c),document.addEventListener(`mouseup`,l),document.addEventListener(`touchend`,l))};a.addEventListener(`mousedown`,o),a.addEventListener(`touchstart`,o),r.push(()=>{a.removeEventListener(`mousedown`,o),a.removeEventListener(`touchstart`,o)})};return i(`l`),i(`r`),t._resizeCleanup=()=>{r.forEach(e=>e())},t}}qe(q),lt(q),ut(q),dt(q);function J(){let e=new Ve(v.createElementNS(L,`svg`));return e.attr({xmlns:L}),e}J.xlink=`http://www.w3.org/1999/xlink`,d.isBrowser()&&typeof window.SVG>`u`&&(window.SVG=J),d.isBrowser()?(typeof window.SVG>`u`&&(window.SVG=J),typeof window.Apex>`u`&&(window.Apex={})):typeof global<`u`&&(typeof global.Apex>`u`&&(global.Apex={}),typeof global.SVG>`u`&&(global.SVG=J));var ft=class e{static registerFeatures(t){for(let[n,r]of Object.entries(t))e._featureRegistry.set(n,r)}constructor(e){this.ctx=e,this.w=e.w}initModules(){this.ctx.publicMethods=[`updateOptions`,`updateSeries`,`appendData`,`appendSeries`,`isSeriesHidden`,`highlightSeries`,`toggleSeries`,`showSeries`,`hideSeries`,`setLocale`,`resetSeries`,`zoomX`,`toggleDataPointSelection`,`dataURI`,`exportToCSV`,`addXaxisAnnotation`,`addYaxisAnnotation`,`addPointAnnotation`,`clearAnnotations`,`removeAnnotation`,`paper`,`destroy`],this.ctx.eventList=[`click`,`mousedown`,`mousemove`,`mouseleave`,`touchstart`,`touchmove`,`touchleave`,`mouseup`,`touchend`,`keydown`,`keyup`],this.ctx.animations=new P(this.w,this.ctx),this.ctx.axes=new ue(this.w,this.ctx),this.ctx.core=new Te(this.ctx.el,this.w,this.ctx),this.ctx.config=new D({}),this.ctx.data=new Ee(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new re(this.w,this.ctx),this.ctx.graphics=new I(this.w,this.ctx),this.ctx.coreUtils=new N(this.w),this.ctx.crosshairs=new de(this.w),this.ctx.events=new ce(this.w,this.ctx),this.ctx.fill=new z(this.w),this.ctx.localization=new le(this.w),this.ctx.options=new E,this.ctx.responsive=new fe(this.w),this.ctx.series=new W(this.w,{toggleDataSeries:(...e)=>this.ctx.legend?.legendHelpers.toggleDataSeries(...e),revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new pe(this.w),this.ctx.formatters=new x(this.w),this.ctx.titleSubtitle=new me(this.w),this.ctx.dimensions=new G(this.w,this.ctx),this.ctx.updateHelpers=new Oe(this.w,this.ctx);let e=new Fe(this.w,this.ctx);this.w.globals.tooltip=e,Object.defineProperty(this.ctx,`tooltip`,{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){let t=e._featureRegistry,n=this.w,r=this.ctx,i=t.get(`exports`);r.exports=i?new i(n,r):null;let a=t.get(`legend`);r.legend=a?new a(n,r):null;let o=t.get(`toolbar`);Object.defineProperty(r,`toolbar`,{get(){return!this._toolbar&&o&&(this._toolbar=new o(n,this)),this._toolbar??null},configurable:!0});let s=t.get(`zoomPanSelection`);Object.defineProperty(r,`zoomPanSelection`,{get(){return!this._zoomPanSelection&&s&&(this._zoomPanSelection=new s(n,this)),this._zoomPanSelection??null},configurable:!0});let c=t.get(`keyboardNavigation`);Object.defineProperty(r,`keyboardNavigation`,{get(){return!this._keyboardNavigation&&c&&(this._keyboardNavigation=new c(n,this)),this._keyboardNavigation??null},configurable:!0})}};l(ft,`_featureRegistry`,new Map);var Y=ft,pt=class{constructor(e){this.ctx=e,this.w=e.w}clear({isUpdating:e}){this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect==`function`&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),De.invalidateAll(this.w),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:e})}killSVG(e){e.each(function(){this.removeClass(`*`),this.off()},!0),e.clear()}clearDomElements({isUpdating:e}){let t=this.w.dom;if(d.isBrowser()){let n=t.Paper.node;n.parentNode&&n.parentNode.parentNode&&!e&&(n.parentNode.parentNode.style.minHeight=`unset`);let r=t.baseEl;if(r&&this.ctx.eventList.forEach(e=>{r.removeEventListener(e,this.ctx.events.documentEvent)}),this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(t.Paper),t.Paper.remove()}t.elWrap=null,t.elGraphical=null,t.elLegendWrap=null,t.elLegendForeign=null,t.baseEl=null,t.elGridRect=null,t.elGridRectMask=null,t.elGridRectBarMask=null,t.elGridRectMarkerMask=null,t.elForecastMask=null,t.elNonForecastMask=null,t.elDefs=null}},mt=new WeakMap;function ht(e,t){if(d.isSSR())return;let n=!1;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){let t=e.getBoundingClientRect();(e.style.display===`none`||t.width===0)&&(n=!0)}let r=new ResizeObserver(r=>{n&&t.call(e,r),n=!0});e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(e.children).forEach(e=>r.observe(e)):r.observe(e),mt.set(t,r)}function gt(e,t){if(d.isSSR())return;let n=mt.get(t);n&&(n.disconnect(),mt.delete(t))}var _t=`@keyframes opaque {
32
+ 0% {
33
+ opacity: 0
34
+ }
35
+
36
+ to {
37
+ opacity: 1
38
+ }
39
+ }
40
+
41
+ @keyframes resizeanim {
42
+
43
+ 0%,
44
+ to {
45
+ opacity: 0
46
+ }
47
+ }
48
+
49
+ .apexcharts-canvas {
50
+ position: relative;
51
+ direction: ltr !important;
52
+ user-select: none
53
+ }
54
+
55
+ .apexcharts-canvas ::-webkit-scrollbar {
56
+ -webkit-appearance: none;
57
+ width: 6px
58
+ }
59
+
60
+ .apexcharts-canvas ::-webkit-scrollbar-thumb {
61
+ border-radius: 4px;
62
+ background-color: rgba(0, 0, 0, .5);
63
+ box-shadow: 0 0 1px rgba(255, 255, 255, .5);
64
+ -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
65
+ }
66
+
67
+ .apexcharts-inner {
68
+ position: relative
69
+ }
70
+
71
+ .apexcharts-text tspan {
72
+ font-family: inherit
73
+ }
74
+
75
+ rect.legend-mouseover-inactive,
76
+ .legend-mouseover-inactive rect,
77
+ .legend-mouseover-inactive path,
78
+ .legend-mouseover-inactive circle,
79
+ .legend-mouseover-inactive line,
80
+ .legend-mouseover-inactive text.apexcharts-yaxis-title-text,
81
+ .legend-mouseover-inactive text.apexcharts-yaxis-label {
82
+ transition: .15s ease all;
83
+ opacity: .2
84
+ }
85
+
86
+ .apexcharts-legend-text {
87
+ padding-left: 15px;
88
+ margin-left: -15px;
89
+ }
90
+
91
+ .apexcharts-legend-series[role="button"]:focus {
92
+ outline: 2px solid #008FFB;
93
+ outline-offset: 2px;
94
+ }
95
+
96
+ .apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {
97
+ outline: none;
98
+ }
99
+
100
+ .apexcharts-legend-series[role="button"]:focus-visible {
101
+ outline: 2px solid #008FFB;
102
+ outline-offset: 2px;
103
+ }
104
+
105
+ .apexcharts-series-collapsed {
106
+ opacity: 0
107
+ }
108
+
109
+ /* Keyboard navigation focus indicator on SVG data elements.
110
+ SVG elements don't support CSS outline, so we use stroke. */
111
+ .apexcharts-bar-area.apexcharts-keyboard-focused,
112
+ .apexcharts-candlestick-area.apexcharts-keyboard-focused,
113
+ .apexcharts-boxPlot-area.apexcharts-keyboard-focused,
114
+ .apexcharts-rangebar-area.apexcharts-keyboard-focused,
115
+ .apexcharts-pie-area.apexcharts-keyboard-focused,
116
+ .apexcharts-heatmap-rect.apexcharts-keyboard-focused,
117
+ .apexcharts-treemap-rect.apexcharts-keyboard-focused {
118
+ stroke: #008FFB;
119
+ stroke-width: 2;
120
+ stroke-opacity: 1;
121
+ }
122
+
123
+ .apexcharts-tooltip {
124
+ border-radius: 5px;
125
+ box-shadow: 2px 2px 6px -4px #999;
126
+ cursor: default;
127
+ font-size: 14px;
128
+ left: 62px;
129
+ opacity: 0;
130
+ pointer-events: none;
131
+ position: absolute;
132
+ top: 20px;
133
+ display: flex;
134
+ flex-direction: column;
135
+ overflow: hidden;
136
+ white-space: nowrap;
137
+ z-index: 12;
138
+ transition: .15s ease all
139
+ }
140
+
141
+ .apexcharts-tooltip.apexcharts-active {
142
+ opacity: 1;
143
+ transition: .15s ease all
144
+ }
145
+
146
+ .apexcharts-tooltip.apexcharts-theme-light {
147
+ border: 1px solid #e3e3e3;
148
+ background: rgba(255, 255, 255, .96)
149
+ }
150
+
151
+ .apexcharts-tooltip.apexcharts-theme-dark {
152
+ color: #fff;
153
+ background: rgba(30, 30, 30, .8)
154
+ }
155
+
156
+ .apexcharts-tooltip * {
157
+ font-family: inherit
158
+ }
159
+
160
+ .apexcharts-tooltip-title {
161
+ padding: 6px;
162
+ font-size: 15px;
163
+ margin-bottom: 4px
164
+ }
165
+
166
+ .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
167
+ background: #eceff1;
168
+ border-bottom: 1px solid #ddd
169
+ }
170
+
171
+ .apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
172
+ background: rgba(0, 0, 0, .7);
173
+ border-bottom: 1px solid #333
174
+ }
175
+
176
+ .apexcharts-tooltip-text-goals-value,
177
+ .apexcharts-tooltip-text-y-value,
178
+ .apexcharts-tooltip-text-z-value {
179
+ display: inline-block;
180
+ margin-left: 5px;
181
+ font-weight: 600
182
+ }
183
+
184
+ .apexcharts-tooltip-text-goals-label:empty,
185
+ .apexcharts-tooltip-text-goals-value:empty,
186
+ .apexcharts-tooltip-text-y-label:empty,
187
+ .apexcharts-tooltip-text-y-value:empty,
188
+ .apexcharts-tooltip-text-z-value:empty,
189
+ .apexcharts-tooltip-title:empty {
190
+ display: none
191
+ }
192
+
193
+ .apexcharts-tooltip-text-goals-label,
194
+ .apexcharts-tooltip-text-goals-value {
195
+ padding: 6px 0 5px
196
+ }
197
+
198
+ .apexcharts-tooltip-goals-group,
199
+ .apexcharts-tooltip-text-goals-label,
200
+ .apexcharts-tooltip-text-goals-value {
201
+ display: flex
202
+ }
203
+
204
+ .apexcharts-tooltip-text-goals-label:not(:empty),
205
+ .apexcharts-tooltip-text-goals-value:not(:empty) {
206
+ margin-top: -6px
207
+ }
208
+
209
+ .apexcharts-tooltip-marker {
210
+ display: inline-block;
211
+ position: relative;
212
+ width: 16px;
213
+ height: 16px;
214
+ font-size: 16px;
215
+ line-height: 16px;
216
+ margin-right: 4px;
217
+ text-align: center;
218
+ vertical-align: middle;
219
+ color: inherit;
220
+ }
221
+
222
+ .apexcharts-tooltip-marker::before {
223
+ content: "";
224
+ display: inline-block;
225
+ width: 100%;
226
+ text-align: center;
227
+ color: currentcolor;
228
+ text-rendering: optimizeLegibility;
229
+ -webkit-font-smoothing: antialiased;
230
+ font-size: 26px;
231
+ font-family: Arial, Helvetica, sans-serif;
232
+ line-height: 14px;
233
+ font-weight: 900;
234
+ }
235
+
236
+ .apexcharts-tooltip-marker[shape="circle"]::before {
237
+ content: "\\25CF";
238
+ }
239
+
240
+ .apexcharts-tooltip-marker[shape="square"]::before,
241
+ .apexcharts-tooltip-marker[shape="rect"]::before {
242
+ content: "\\25A0";
243
+ transform: translate(-1px, -2px);
244
+ }
245
+
246
+ .apexcharts-tooltip-marker[shape="line"]::before {
247
+ content: "\\2500";
248
+ }
249
+
250
+ .apexcharts-tooltip-marker[shape="diamond"]::before {
251
+ content: "\\25C6";
252
+ font-size: 28px;
253
+ }
254
+
255
+ .apexcharts-tooltip-marker[shape="triangle"]::before {
256
+ content: "\\25B2";
257
+ font-size: 22px;
258
+ }
259
+
260
+ .apexcharts-tooltip-marker[shape="cross"]::before {
261
+ content: "\\2715";
262
+ font-size: 18px;
263
+ }
264
+
265
+ .apexcharts-tooltip-marker[shape="plus"]::before {
266
+ content: "\\2715";
267
+ transform: rotate(45deg) translate(-1px, -1px);
268
+ font-size: 18px;
269
+ }
270
+
271
+ .apexcharts-tooltip-marker[shape="star"]::before {
272
+ content: "\\2605";
273
+ font-size: 18px;
274
+ }
275
+
276
+ .apexcharts-tooltip-marker[shape="sparkle"]::before {
277
+ content: "\\2726";
278
+ font-size: 20px;
279
+ }
280
+
281
+ .apexcharts-tooltip-series-group {
282
+ padding: 0 10px;
283
+ display: none;
284
+ text-align: left;
285
+ justify-content: left;
286
+ align-items: center
287
+ }
288
+
289
+ .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
290
+ opacity: 1
291
+ }
292
+
293
+ .apexcharts-tooltip-series-group.apexcharts-active,
294
+ .apexcharts-tooltip-series-group:last-child {
295
+ padding-bottom: 4px
296
+ }
297
+
298
+ .apexcharts-tooltip-y-group {
299
+ padding: 6px 0 5px
300
+ }
301
+
302
+ .apexcharts-custom-tooltip,
303
+ .apexcharts-tooltip-box {
304
+ padding: 4px 8px
305
+ }
306
+
307
+ .apexcharts-tooltip-boxPlot {
308
+ display: flex;
309
+ flex-direction: column-reverse
310
+ }
311
+
312
+ .apexcharts-tooltip-box>div {
313
+ margin: 4px 0
314
+ }
315
+
316
+ .apexcharts-tooltip-box span.value {
317
+ font-weight: 700
318
+ }
319
+
320
+ .apexcharts-tooltip-rangebar {
321
+ padding: 5px 8px
322
+ }
323
+
324
+ .apexcharts-tooltip-rangebar .category {
325
+ font-weight: 600;
326
+ color: #777
327
+ }
328
+
329
+ .apexcharts-tooltip-rangebar .series-name {
330
+ font-weight: 700;
331
+ display: block;
332
+ margin-bottom: 5px
333
+ }
334
+
335
+ .apexcharts-xaxistooltip,
336
+ .apexcharts-yaxistooltip {
337
+ opacity: 0;
338
+ pointer-events: none;
339
+ color: #373d3f;
340
+ font-size: 13px;
341
+ text-align: center;
342
+ border-radius: 2px;
343
+ position: absolute;
344
+ z-index: 10;
345
+ background: #eceff1;
346
+ border: 1px solid #90a4ae
347
+ }
348
+
349
+ .apexcharts-xaxistooltip {
350
+ padding: 9px 10px;
351
+ transition: .15s ease all
352
+ }
353
+
354
+ .apexcharts-xaxistooltip.apexcharts-theme-dark {
355
+ background: rgba(0, 0, 0, .7);
356
+ border: 1px solid rgba(0, 0, 0, .5);
357
+ color: #fff
358
+ }
359
+
360
+ .apexcharts-xaxistooltip:after,
361
+ .apexcharts-xaxistooltip:before {
362
+ left: 50%;
363
+ border: solid transparent;
364
+ content: " ";
365
+ height: 0;
366
+ width: 0;
367
+ position: absolute;
368
+ pointer-events: none
369
+ }
370
+
371
+ .apexcharts-xaxistooltip:after {
372
+ border-color: transparent;
373
+ border-width: 6px;
374
+ margin-left: -6px
375
+ }
376
+
377
+ .apexcharts-xaxistooltip:before {
378
+ border-color: transparent;
379
+ border-width: 7px;
380
+ margin-left: -7px
381
+ }
382
+
383
+ .apexcharts-xaxistooltip-bottom:after,
384
+ .apexcharts-xaxistooltip-bottom:before {
385
+ bottom: 100%
386
+ }
387
+
388
+ .apexcharts-xaxistooltip-top:after,
389
+ .apexcharts-xaxistooltip-top:before {
390
+ top: 100%
391
+ }
392
+
393
+ .apexcharts-xaxistooltip-bottom:after {
394
+ border-bottom-color: #eceff1
395
+ }
396
+
397
+ .apexcharts-xaxistooltip-bottom:before {
398
+ border-bottom-color: #90a4ae
399
+ }
400
+
401
+ .apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
402
+ .apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
403
+ border-bottom-color: rgba(0, 0, 0, .5)
404
+ }
405
+
406
+ .apexcharts-xaxistooltip-top:after {
407
+ border-top-color: #eceff1
408
+ }
409
+
410
+ .apexcharts-xaxistooltip-top:before {
411
+ border-top-color: #90a4ae
412
+ }
413
+
414
+ .apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
415
+ .apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
416
+ border-top-color: rgba(0, 0, 0, .5)
417
+ }
418
+
419
+ .apexcharts-xaxistooltip.apexcharts-active {
420
+ opacity: 1;
421
+ transition: .15s ease all
422
+ }
423
+
424
+ .apexcharts-yaxistooltip {
425
+ padding: 4px 10px
426
+ }
427
+
428
+ .apexcharts-yaxistooltip.apexcharts-theme-dark {
429
+ background: rgba(0, 0, 0, .7);
430
+ border: 1px solid rgba(0, 0, 0, .5);
431
+ color: #fff
432
+ }
433
+
434
+ .apexcharts-yaxistooltip:after,
435
+ .apexcharts-yaxistooltip:before {
436
+ top: 50%;
437
+ border: solid transparent;
438
+ content: " ";
439
+ height: 0;
440
+ width: 0;
441
+ position: absolute;
442
+ pointer-events: none
443
+ }
444
+
445
+ .apexcharts-yaxistooltip:after {
446
+ border-color: transparent;
447
+ border-width: 6px;
448
+ margin-top: -6px
449
+ }
450
+
451
+ .apexcharts-yaxistooltip:before {
452
+ border-color: transparent;
453
+ border-width: 7px;
454
+ margin-top: -7px
455
+ }
456
+
457
+ .apexcharts-yaxistooltip-left:after,
458
+ .apexcharts-yaxistooltip-left:before {
459
+ left: 100%
460
+ }
461
+
462
+ .apexcharts-yaxistooltip-right:after,
463
+ .apexcharts-yaxistooltip-right:before {
464
+ right: 100%
465
+ }
466
+
467
+ .apexcharts-yaxistooltip-left:after {
468
+ border-left-color: #eceff1
469
+ }
470
+
471
+ .apexcharts-yaxistooltip-left:before {
472
+ border-left-color: #90a4ae
473
+ }
474
+
475
+ .apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
476
+ .apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
477
+ border-left-color: rgba(0, 0, 0, .5)
478
+ }
479
+
480
+ .apexcharts-yaxistooltip-right:after {
481
+ border-right-color: #eceff1
482
+ }
483
+
484
+ .apexcharts-yaxistooltip-right:before {
485
+ border-right-color: #90a4ae
486
+ }
487
+
488
+ .apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
489
+ .apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
490
+ border-right-color: rgba(0, 0, 0, .5)
491
+ }
492
+
493
+ .apexcharts-yaxistooltip.apexcharts-active {
494
+ opacity: 1
495
+ }
496
+
497
+ .apexcharts-yaxistooltip-hidden {
498
+ display: none
499
+ }
500
+
501
+ .apexcharts-xcrosshairs,
502
+ .apexcharts-ycrosshairs {
503
+ pointer-events: none;
504
+ opacity: 0;
505
+ transition: .15s ease all
506
+ }
507
+
508
+ .apexcharts-xcrosshairs.apexcharts-active,
509
+ .apexcharts-ycrosshairs.apexcharts-active {
510
+ opacity: 1;
511
+ transition: .15s ease all
512
+ }
513
+
514
+ .apexcharts-ycrosshairs-hidden {
515
+ opacity: 0
516
+ }
517
+
518
+ .apexcharts-selection-rect {
519
+ cursor: move
520
+ }
521
+
522
+ .svg_select_shape {
523
+ stroke-width: 1;
524
+ stroke-dasharray: 10 10;
525
+ stroke: black;
526
+ stroke-opacity: 0.1;
527
+ pointer-events: none;
528
+ fill: none;
529
+ }
530
+
531
+ .svg_select_handle {
532
+ stroke-width: 3;
533
+ stroke: black;
534
+ fill: none;
535
+ }
536
+
537
+ .svg_select_handle_r {
538
+ cursor: e-resize;
539
+ }
540
+
541
+ .svg_select_handle_l {
542
+ cursor: w-resize;
543
+ }
544
+
545
+ .apexcharts-svg.apexcharts-zoomable.hovering-zoom {
546
+ cursor: crosshair
547
+ }
548
+
549
+ .apexcharts-svg.apexcharts-zoomable.hovering-pan {
550
+ cursor: move
551
+ }
552
+
553
+ .apexcharts-menu-icon,
554
+ .apexcharts-pan-icon,
555
+ .apexcharts-reset-icon,
556
+ .apexcharts-selection-icon,
557
+ .apexcharts-toolbar-custom-icon,
558
+ .apexcharts-zoom-icon,
559
+ .apexcharts-zoomin-icon,
560
+ .apexcharts-zoomout-icon {
561
+ cursor: pointer;
562
+ width: 20px;
563
+ height: 20px;
564
+ line-height: 24px;
565
+ color: #6e8192;
566
+ text-align: center
567
+ }
568
+
569
+ .apexcharts-menu-icon svg,
570
+ .apexcharts-reset-icon svg,
571
+ .apexcharts-zoom-icon svg,
572
+ .apexcharts-zoomin-icon svg,
573
+ .apexcharts-zoomout-icon svg {
574
+ fill: #6e8192
575
+ }
576
+
577
+ .apexcharts-selection-icon svg {
578
+ fill: #444;
579
+ transform: scale(.76)
580
+ }
581
+
582
+ .apexcharts-theme-dark .apexcharts-menu-icon svg,
583
+ .apexcharts-theme-dark .apexcharts-pan-icon svg,
584
+ .apexcharts-theme-dark .apexcharts-reset-icon svg,
585
+ .apexcharts-theme-dark .apexcharts-selection-icon svg,
586
+ .apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
587
+ .apexcharts-theme-dark .apexcharts-zoom-icon svg,
588
+ .apexcharts-theme-dark .apexcharts-zoomin-icon svg,
589
+ .apexcharts-theme-dark .apexcharts-zoomout-icon svg {
590
+ fill: #f3f4f5
591
+ }
592
+
593
+ .apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
594
+ .apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
595
+ .apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
596
+ fill: #008ffb
597
+ }
598
+
599
+ .apexcharts-theme-light .apexcharts-menu-icon:hover svg,
600
+ .apexcharts-theme-light .apexcharts-reset-icon:hover svg,
601
+ .apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
602
+ .apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
603
+ .apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
604
+ .apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
605
+ fill: #333
606
+ }
607
+
608
+ .apexcharts-menu-icon,
609
+ .apexcharts-selection-icon {
610
+ position: relative
611
+ }
612
+
613
+ .apexcharts-reset-icon {
614
+ margin-left: 5px
615
+ }
616
+
617
+ .apexcharts-menu-icon,
618
+ .apexcharts-reset-icon,
619
+ .apexcharts-zoom-icon {
620
+ transform: scale(.85)
621
+ }
622
+
623
+ .apexcharts-zoomin-icon,
624
+ .apexcharts-zoomout-icon {
625
+ transform: scale(.7)
626
+ }
627
+
628
+ .apexcharts-zoomout-icon {
629
+ margin-right: 3px
630
+ }
631
+
632
+ .apexcharts-pan-icon {
633
+ transform: scale(.62);
634
+ position: relative;
635
+ left: 1px;
636
+ top: 0
637
+ }
638
+
639
+ .apexcharts-pan-icon svg {
640
+ fill: #fff;
641
+ stroke: #6e8192;
642
+ stroke-width: 2
643
+ }
644
+
645
+ .apexcharts-pan-icon.apexcharts-selected svg {
646
+ stroke: #008ffb
647
+ }
648
+
649
+ .apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
650
+ stroke: #333
651
+ }
652
+
653
+ .apexcharts-toolbar {
654
+ position: absolute;
655
+ z-index: 11;
656
+ max-width: 176px;
657
+ text-align: right;
658
+ border-radius: 3px;
659
+ padding: 0 6px 2px;
660
+ display: flex;
661
+ justify-content: space-between;
662
+ align-items: center
663
+ }
664
+
665
+ .apexcharts-menu {
666
+ background: #fff;
667
+ position: absolute;
668
+ top: 100%;
669
+ border: 1px solid #ddd;
670
+ border-radius: 3px;
671
+ padding: 3px;
672
+ right: 10px;
673
+ opacity: 0;
674
+ min-width: 110px;
675
+ transition: .15s ease all;
676
+ pointer-events: none
677
+ }
678
+
679
+ .apexcharts-menu.apexcharts-menu-open {
680
+ opacity: 1;
681
+ pointer-events: all;
682
+ transition: .15s ease all
683
+ }
684
+
685
+ .apexcharts-menu-item {
686
+ padding: 6px 7px;
687
+ font-size: 12px;
688
+ cursor: pointer
689
+ }
690
+
691
+ .apexcharts-theme-light .apexcharts-menu-item:hover {
692
+ background: #eee
693
+ }
694
+
695
+ .apexcharts-theme-dark .apexcharts-menu {
696
+ background: rgba(0, 0, 0, .7);
697
+ color: #fff
698
+ }
699
+
700
+ @media screen and (min-width:768px) {
701
+ .apexcharts-canvas:hover .apexcharts-toolbar {
702
+ opacity: 1
703
+ }
704
+ }
705
+
706
+ /* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */
707
+ .apexcharts-toolbar:focus-within {
708
+ opacity: 1
709
+ }
710
+
711
+ /* Focus indicator for toolbar icon buttons */
712
+ .apexcharts-menu-icon:focus-visible,
713
+ .apexcharts-pan-icon:focus-visible,
714
+ .apexcharts-reset-icon:focus-visible,
715
+ .apexcharts-selection-icon:focus-visible,
716
+ .apexcharts-toolbar-custom-icon:focus-visible,
717
+ .apexcharts-zoom-icon:focus-visible,
718
+ .apexcharts-zoomin-icon:focus-visible,
719
+ .apexcharts-zoomout-icon:focus-visible {
720
+ outline: 2px solid #008FFB;
721
+ outline-offset: 2px;
722
+ border-radius: 2px
723
+ }
724
+
725
+ /* Focus indicator for hamburger menu items */
726
+ .apexcharts-menu-item:focus-visible {
727
+ outline: 2px solid #008FFB;
728
+ outline-offset: -2px;
729
+ background: #eee
730
+ }
731
+
732
+ .apexcharts-canvas .apexcharts-element-hidden,
733
+ .apexcharts-datalabel.apexcharts-element-hidden,
734
+ .apexcharts-hide .apexcharts-series-points {
735
+ opacity: 0;
736
+ }
737
+
738
+ .apexcharts-hidden-element-shown {
739
+ opacity: 1;
740
+ transition: 0.25s ease all;
741
+ }
742
+
743
+ .apexcharts-datalabel,
744
+ .apexcharts-datalabel-label,
745
+ .apexcharts-datalabel-value,
746
+ .apexcharts-datalabels,
747
+ .apexcharts-pie-label {
748
+ cursor: default;
749
+ pointer-events: none
750
+ }
751
+
752
+ .apexcharts-pie-label-delay {
753
+ opacity: 0;
754
+ animation-name: opaque;
755
+ animation-duration: .3s;
756
+ animation-fill-mode: forwards;
757
+ animation-timing-function: ease
758
+ }
759
+
760
+ .apexcharts-radialbar-label {
761
+ cursor: pointer;
762
+ }
763
+
764
+ .apexcharts-annotation-rect,
765
+ .apexcharts-area-series .apexcharts-area,
766
+ .apexcharts-gridline,
767
+ .apexcharts-line,
768
+ .apexcharts-point-annotation-label,
769
+ .apexcharts-radar-series path:not(.apexcharts-marker),
770
+ .apexcharts-radar-series polygon,
771
+ .apexcharts-toolbar svg,
772
+ .apexcharts-tooltip .apexcharts-marker,
773
+ .apexcharts-xaxis-annotation-label,
774
+ .apexcharts-yaxis-annotation-label,
775
+ .apexcharts-zoom-rect,
776
+ .no-pointer-events {
777
+ pointer-events: none
778
+ }
779
+
780
+ .apexcharts-tooltip-active .apexcharts-marker {
781
+ transition: .15s ease all
782
+ }
783
+
784
+ .apexcharts-radar-series .apexcharts-yaxis {
785
+ pointer-events: none;
786
+ }
787
+
788
+ .resize-triggers {
789
+ animation: 1ms resizeanim;
790
+ visibility: hidden;
791
+ opacity: 0;
792
+ height: 100%;
793
+ width: 100%;
794
+ overflow: hidden
795
+ }
796
+
797
+ .contract-trigger:before,
798
+ .resize-triggers,
799
+ .resize-triggers>div {
800
+ content: " ";
801
+ display: block;
802
+ position: absolute;
803
+ top: 0;
804
+ left: 0
805
+ }
806
+
807
+ .resize-triggers>div {
808
+ height: 100%;
809
+ width: 100%;
810
+ background: #eee;
811
+ overflow: auto
812
+ }
813
+
814
+ .contract-trigger:before {
815
+ overflow: hidden;
816
+ width: 200%;
817
+ height: 200%
818
+ }
819
+
820
+ .apexcharts-bar-goals-markers {
821
+ pointer-events: none
822
+ }
823
+
824
+ .apexcharts-bar-shadows {
825
+ pointer-events: none
826
+ }
827
+
828
+ .apexcharts-rangebar-goals-markers {
829
+ pointer-events: none
830
+ }
831
+
832
+ .apexcharts-disable-transitions * {
833
+ transition: none !important;
834
+ }`,X=class e{constructor(e,t){this.opts=t,this.ctx=this,this.w=new M(t).init(),this.el=e,this.w.globals.cuid=y.randomId(),this.w.globals.chartID=this.w.config.chart.id?y.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Y(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),d.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){return new Promise((e,t)=>{if(y.elementExists(this.el)){typeof Apex._chartInstances>`u`&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);let n=this.w.config.chart.events.beforeMount;if(typeof n==`function`&&n(this,this.w),this.events.fireEvent(`beforeMount`,[this,this.w]),d.isBrowser()){window.addEventListener(`resize`,this.windowResizeHandler),ht(this.el.parentNode,this.parentResizeHandler);let e=this.el.getRootNode&&this.el.getRootNode(),t=y.is(`ShadowRoot`,e),n=this.el.ownerDocument,r=t?e.getElementById(`apexcharts-css`):n.getElementById(`apexcharts-css`);if(!r){r=v.createElementNS(`http://www.w3.org/1999/xhtml`,`style`),r.id=`apexcharts-css`,r.textContent=_t;let i=this.opts.chart?.nonce||this.w.config.chart.nonce;i&&r.setAttribute(`nonce`,i),t?e.prepend(r):this.w.config.chart.injectStyleSheet!==!1&&n.head.appendChild(r)}}let r=this.create(this.w.config.series,{});if(!r)return e(this);this.mount(r).then(()=>{typeof this.w.config.chart.events.mounted==`function`&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent(`mounted`,[this,this.w]),e(r)}).catch(e=>{t(e)})}else t(Error(`Element not found`))})}create(e,t){var n;let r=this.w;new Y(this).initModules();let i=this.w.globals;if(i.noData=!1,i.animationEnded=!1,!y.elementExists(this.el)||(this.responsive.checkResponsiveConfig(t),r.config.xaxis.convertedCatToNumeric&&new w(r.config).convertCatToNumericXaxis(r.config,this.ctx),this.core.setupElements(),r.config.chart.type===`treemap`&&(r.config.grid.show=!1,r.config.yaxis[0].show=!1),i.svgWidth===0))return i.animationEnded=!0,null;let a=e;e.forEach((e,t)=>{e.hidden&&(a=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:t}))});let o=N.checkComboSeries(a,r.config.chart.type);i.comboCharts=o.comboCharts,i.comboBarCount=o.comboBarCount;let s=a.every(e=>e.data&&e.data.length===0);(a.length===0||s&&i.collapsedSeries.length<1)&&this.series.handleNoData(),d.isBrowser()&&this.events.setupEventHandlers();let c=this.data.parseData(a);this._writeParsedSeriesData(c.seriesData),this._writeParsedRangeData(c.rangeData),this._writeParsedCandleData(c.candleData),this._writeParsedLabelData(c.labelData),this._writeParsedAxisFlags(c.axisFlags),this.theme.init(),new B(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!i.noData||i.collapsedSeries.length===r.seriesData.series.length||r.config.legend.showForSingleSeries)&&((n=this.legend)==null||n.init()),this.series.hasAllSeriesEqualX(),i.axisCharts&&(this.core.coreCalculations(),r.config.xaxis.type!==`category`&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=r.globals.minX,this.ctx.toolbar.maxX=r.globals.maxX)),this.formatters.heatmapLabelFormatters(),new N(this.w).getLargestMarkerSize();let l=this.dimensions.plotCoords();this._writeLayoutCoords(l.layout);let u=this.core.xySettings();this.grid.createGridMask();let f=this.core.plotChartType(a,u),p=new V(this.w,this);return p.bringForward(),r.config.dataLabels.background.enabled&&p.dataLabelsBackground(),this.core.shiftGraphPosition(),r.globals.dataPoints>50&&r.dom.elWrap.classList.add(`apexcharts-disable-transitions`),{elGraph:f,xyRatios:u,dimensions:{plot:{left:r.layout.translateX,top:r.layout.translateY,width:r.layout.gridWidth,height:r.layout.gridHeight}}}}mount(e=null){let t=this,n=t.w;return new Promise((r,i)=>{var a,o,s,c,l,u,f,p;if(t.el===null)return i(Error(`Not enough data to display or target element not found`));(e===null||n.globals.allSeriesCollapsed)&&t.series.handleNoData(),t.grid=new re(t.w,t);let m=t.grid.drawGrid(),h=Y._featureRegistry.get(`annotations`);if(t.annotations=h?new h(t.w,{theme:t.theme,timeScale:t.timeScale}):null,(a=t.annotations)==null||a.drawImageAnnos(),(o=t.annotations)==null||o.drawTextAnnos(),n.config.grid.position===`back`&&(m&&n.dom.elGraphical.add(m.el),(s=m?.elGridBorders)!=null&&s.node&&n.dom.elGraphical.add(m.elGridBorders)),Array.isArray(e.elGraph))for(let t=0;t<e.elGraph.length;t++)n.dom.elGraphical.add(e.elGraph[t]);else n.dom.elGraphical.add(e.elGraph);n.config.grid.position===`front`&&(m&&n.dom.elGraphical.add(m.el),(c=m?.elGridBorders)!=null&&c.node&&n.dom.elGraphical.add(m.elGridBorders)),n.config.xaxis.crosshairs.position===`front`&&t.crosshairs.drawXCrosshairs(),n.config.yaxis[0].crosshairs.position===`front`&&t.crosshairs.drawYCrosshairs(),n.config.chart.type!==`treemap`&&t.axes.drawAxis(n.config.chart.type,m);let g=new U(this.w,this.ctx,m),_=new se(this.w,{theme:this.theme,timeScale:this.timeScale},m);if(m!==null&&(g.xAxisLabelCorrections(m.xAxisTickWidth),_.setYAxisTextAlignments(),n.config.yaxis.map((e,t)=>{n.globals.ignoreYAxisIndexes.indexOf(t)===-1&&_.yAxisTitleRotate(t,e.opposite)})),(l=t.annotations)==null||l.drawAxesAnnotations(),!n.globals.noData){if(d.isBrowser()&&n.config.tooltip.enabled&&!n.globals.noData&&t.w.globals.tooltip.drawTooltip(e.xyRatios),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.keyboard.enabled&&n.config.chart.accessibility.keyboard.navigation.enabled&&((u=t.keyboardNavigation)==null||u.init()),d.isBrowser()&&n.globals.axisCharts&&(n.axisFlags.isXNumeric||n.config.xaxis.convertedCatToNumeric||n.axisFlags.isRangeBar))(n.config.chart.zoom.enabled||n.config.chart.selection&&n.config.chart.selection.enabled||n.config.chart.pan&&n.config.chart.pan.enabled)&&((f=t.zoomPanSelection)==null||f.init({xyRatios:e.xyRatios}));else{let e=n.config.chart.toolbar.tools;[`zoom`,`zoomin`,`zoomout`,`selection`,`pan`,`reset`].forEach(t=>{e[t]=!1})}n.config.chart.toolbar.show&&!n.globals.allSeriesCollapsed&&((p=t.toolbar)==null||p.createToolbar())}n.globals.memory.methodsToExec.length>0&&n.globals.memory.methodsToExec.forEach(e=>{e.method(e.params,!1,e.context)}),!n.globals.axisCharts&&!n.globals.noData&&t.core.resizeNonAxisCharts(),r(t)})}destroy(){d.isBrowser()&&(window.removeEventListener(`resize`,this.windowResizeHandler),gt(this.el.parentNode,this.parentResizeHandler));let e=this.w.config.chart.id;e&&Apex._chartInstances.forEach((t,n)=>{t.id===y.escapeString(e)&&Apex._chartInstances.splice(n,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new pt(this.ctx).clear({isUpdating:!1})}updateOptions(e,t=!1,n=!0,r=!0,i=!0){let a=this.w;if(a.interact.selection=void 0,this.lastUpdateOptions){if(y.shallowEqual(this.lastUpdateOptions,e))return this;if(e.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(e.series)){let t=s({},e),n=s({},this.lastUpdateOptions);if(delete t.series,delete n.series,y.shallowEqual(t,n))return this}}return e.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((e,t)=>this.updateHelpers._extendSeries(e,t))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,t,n,r,i)}updateSeries(e=[],t=!0,n=!0){return this.data.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,n)}appendSeries(e,t=!0,n=!0){this.data.resetParsingFlags();let r=this.w.config.series.slice();return r.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,t,n)}appendData(e,t=!0){let n=this;n.data.resetParsingFlags(),n.w.globals.dataChanged=!0,n.series.getPreviousPaths();let r=n.w.config.series.slice();for(let t=0;t<r.length;t++)if(e[t]!==null&&typeof e[t]<`u`)for(let n=0;n<e[t].data.length;n++)r[t].data.push(e[t].data[n]);return n.w.config.series=r,t&&(n.w.globals.initialSeries=y.clone(n.w.config.series)),this.update()}update(e){return new Promise((t,n)=>{if(this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(e))return t(this);this.lastUpdateOptions=y.clone(e),new pt(this.ctx).clear({isUpdating:!0});let r=this.create(this.w.config.series,e);if(!r)return t(this);this.mount(r).then(()=>{typeof this.w.config.chart.events.updated==`function`&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent(`updated`,[this,this.w]),this.w.globals.isDirty=!0,t(this)}).catch(e=>{n(e)})})}getSyncedCharts(){let e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach(e=>{t.push(e)})),t}getGroupedCharts(){return Apex._chartInstances.filter(e=>{if(e.group)return!0}).map(e=>this.w.config.chart.group===e.group?e.chart:this)}static getChartByID(e){let t=y.escapeString(e);if(!Apex._chartInstances)return;let n=Apex._chartInstances.filter(e=>e.id===t)[0];return n&&n.chart}static initOnLoad(){let t=document.querySelectorAll(`[data-apexcharts]`);for(let n=0;n<t.length;n++){let r=t[n];new e(r,JSON.parse(t[n].getAttribute(`data-options`))).render()}}static exec(e,t,...n){let r=this.getChartByID(e);if(!r)return;r.w.globals.isExecCalled=!0;let i=null;return r.publicMethods.indexOf(t)!==-1&&(i=r[t](...n)),i}static merge(e,t){return y.extend(e,t)}static getThemePalettes(){return oe()}static use(e){we(e)}static registerFeatures(e){Y.registerFeatures(e)}toggleSeries(e){return this.series.toggleSeries(e)}highlightSeriesOnLegendHover(e,t){return this.series.toggleSeriesOnHover(e,t)}showSeries(e){this.series.showSeries(e)}hideSeries(e){this.series.hideSeries(e)}highlightSeries(e){this.series.highlightSeries(e)}isSeriesHidden(e){this.series.isSeriesHidden(e)}resetSeries(e=!0,t=!0){this.series.resetSeries(e,t)}addEventListener(e,t){this.events.addEventListener(e,t)}removeEventListener(e,t){this.events.removeEventListener(e,t)}addXaxisAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addXaxisAnnotationExternal(e,t,i)}addYaxisAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addYaxisAnnotationExternal(e,t,i)}addPointAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addPointAnnotationExternal(e,t,i)}clearAnnotations(e=void 0){var t;let n=this;e&&(n=e),(t=n.annotations)==null||t.clearAnnotations(n)}removeAnnotation(e,t=void 0){var n;let r=this;t&&(r=t),(n=r.annotations)==null||n.removeAnnotation(r,e)}getChartArea(){return this.w.dom.baseEl.querySelector(`.apexcharts-inner`)}getSeriesTotalXRange(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}getHighestValueInSeries(e=0){return new ae(this.w).getMinYMaxY(e).highestY}getLowestValueInSeries(e=0){return new ae(this.w).getMinYMaxY(e).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){let e=this.w,t=e.globals;return{series:e.seriesData.series,seriesNames:e.seriesData.seriesNames,colors:t.colors,labels:e.labelData.labels,seriesTotals:t.seriesTotals,seriesPercent:t.seriesPercent,seriesXvalues:t.seriesXvalues,seriesYvalues:t.seriesYvalues,minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,minXDiff:t.minXDiff,dataPoints:t.dataPoints,xAxisScale:t.xAxisScale,yAxisScale:t.yAxisScale,xTickAmount:t.xTickAmount,isXNumeric:e.axisFlags.isXNumeric,seriesYAxisMap:t.seriesYAxisMap,seriesYAxisReverseMap:t.seriesYAxisReverseMap,svgWidth:t.svgWidth,svgHeight:t.svgHeight,gridWidth:e.layout.gridWidth,gridHeight:e.layout.gridHeight,selectedDataPoints:e.interact.selectedDataPoints,collapsedSeriesIndices:t.collapsedSeriesIndices,zoomed:e.interact.zoomed,seriesX:e.seriesData.seriesX,seriesZ:e.seriesData.seriesZ,seriesCandleO:e.candleData.seriesCandleO,seriesCandleH:e.candleData.seriesCandleH,seriesCandleM:e.candleData.seriesCandleM,seriesCandleL:e.candleData.seriesCandleL,seriesCandleC:e.candleData.seriesCandleC,seriesRangeStart:e.rangeData.seriesRangeStart,seriesRangeEnd:e.rangeData.seriesRangeEnd,seriesGoals:e.seriesData.seriesGoals}}toggleDataPointSelection(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}zoomX(e,t){var n;(n=this.ctx.toolbar)==null||n.zoomUpdateOptions(e,t)}setLocale(e){this.localization.setCurrentLocaleValues(e)}dataURI(e){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.ctx.exports.dataURI(e)}getSvgString(e){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.ctx.exports.getSvgString(e)}exportToCSV(e={}){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.ctx.exports.exportToCSV(e)}paper(){return this.w.dom.Paper}_writeParsedSeriesData(e){Object.assign(this.w.seriesData,e)}_writeParsedRangeData(e){Object.assign(this.w.rangeData,e)}_writeParsedCandleData(e){Object.assign(this.w.candleData,e)}_writeParsedLabelData(e){Object.assign(this.w.labelData,e)}_writeParsedAxisFlags(e){Object.assign(this.w.axisFlags,e)}_writeLayoutCoords(e){Object.assign(this.w.layout,e)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){let{redrawOnWindowResize:e}=this.w.config.chart;typeof e==`function`&&(e=e()),e&&this._windowResize()}},vt=`.apexcharts-flip-y {
835
+ transform: scaleY(-1) translateY(-100%);
836
+ transform-origin: top;
837
+ transform-box: fill-box;
838
+ }
839
+ .apexcharts-flip-x {
840
+ transform: scaleX(-1);
841
+ transform-origin: center;
842
+ transform-box: fill-box;
843
+ }
844
+ .apexcharts-legend {
845
+ display: flex;
846
+ overflow: auto;
847
+ padding: 0 10px;
848
+ }
849
+ .apexcharts-legend.apexcharts-legend-group-horizontal {
850
+ flex-direction: column;
851
+ }
852
+ .apexcharts-legend-group {
853
+ display: flex;
854
+ }
855
+ .apexcharts-legend-group-vertical {
856
+ flex-direction: column-reverse;
857
+ }
858
+ .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
859
+ flex-wrap: wrap
860
+ }
861
+ .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
862
+ flex-direction: column;
863
+ bottom: 0;
864
+ }
865
+ .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
866
+ justify-content: flex-start;
867
+ align-items: flex-start;
868
+ }
869
+ .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
870
+ justify-content: center;
871
+ align-items: center;
872
+ }
873
+ .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
874
+ justify-content: flex-end;
875
+ align-items: flex-end;
876
+ }
877
+ .apexcharts-legend-series {
878
+ cursor: pointer;
879
+ line-height: normal;
880
+ display: flex;
881
+ align-items: center;
882
+ }
883
+ .apexcharts-legend-text {
884
+ position: relative;
885
+ font-size: 14px;
886
+ }
887
+ .apexcharts-legend-text *, .apexcharts-legend-marker * {
888
+ pointer-events: none;
889
+ }
890
+ .apexcharts-legend-marker {
891
+ position: relative;
892
+ display: flex;
893
+ align-items: center;
894
+ justify-content: center;
895
+ cursor: pointer;
896
+ margin-right: 1px;
897
+ }
898
+
899
+ .apexcharts-legend-series.apexcharts-no-click {
900
+ cursor: auto;
901
+ }
902
+ .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
903
+ display: none !important;
904
+ }
905
+ .apexcharts-inactive-legend {
906
+ opacity: 0.45;
907
+ } `,yt=class{constructor(e,t){this.w=e,this.ctx=t}svgStringToNode(e){return new DOMParser().parseFromString(e,`image/svg+xml`).documentElement}scaleSvgNode(e,t){let n=parseFloat(e.getAttributeNS(null,`width`)),r=parseFloat(e.getAttributeNS(null,`height`));e.setAttributeNS(null,`width`,n*t),e.setAttributeNS(null,`height`,r*t),e.setAttributeNS(null,`viewBox`,`0 0 `+n+` `+r)}getSvgString(e){return new Promise(t=>{let n=this.w,r=e||n.config.chart.toolbar.export.scale||n.config.chart.toolbar.export.width/n.globals.svgWidth;r||=1;let i=n.globals.svgWidth*r,a=n.globals.svgHeight*r,o=n.dom.elWrap.cloneNode(!0);o.style.width=i+`px`,o.style.height=a+`px`;let s=new XMLSerializer().serializeToString(o),c=n.config.legend.show&&n.dom.elLegendWrap&&n.dom.elLegendWrap.children.length>0,l=`
908
+ .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {
909
+ display: none;
910
+ }
911
+ `;c&&(l+=vt);let u=`
912
+ <svg xmlns="http://www.w3.org/2000/svg"
913
+ version="1.1"
914
+ xmlns:xlink="http://www.w3.org/1999/xlink"
915
+ class="apexcharts-svg"
916
+ xmlns:data="ApexChartsNS"
917
+ transform="translate(0, 0)"
918
+ width="${n.globals.svgWidth}px" height="${n.globals.svgHeight}px">
919
+ <foreignObject width="100%" height="100%">
920
+ <div xmlns="http://www.w3.org/1999/xhtml" style="width:${i}px; height:${a}px;">
921
+ <style type="text/css">
922
+ ${l}
923
+ </style>
924
+ ${s}
925
+ </div>
926
+ </foreignObject>
927
+ </svg>
928
+ `,d=this.svgStringToNode(u);r!==1&&this.scaleSvgNode(d,r),this.convertImagesToBase64(d).then(()=>{u=new XMLSerializer().serializeToString(d),t(u.replace(/&nbsp;/g,`&#160;`))})})}convertImagesToBase64(e){let t=e.getElementsByTagName(`image`),n=Array.from(t).map(e=>{let t=e.getAttributeNS(`http://www.w3.org/1999/xlink`,`href`);return t&&!t.startsWith(`data:`)?this.getBase64FromUrl(t).then(t=>{e.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,t)}).catch(e=>{console.error(`Error converting image to base64:`,e)}):Promise.resolve()});return Promise.all(n)}getBase64FromUrl(e){return d.isSSR()?Promise.resolve(e):new Promise((t,n)=>{let r=new Image;r.crossOrigin=`Anonymous`,r.onload=()=>{let e=document.createElement(`canvas`);e.width=r.width,e.height=r.height,e.getContext(`2d`).drawImage(r,0,0),t(e.toDataURL())},r.onerror=n,r.src=e})}svgUrl(){return new Promise(e=>{this.getSvgString().then(t=>{let n=new Blob([t],{type:`image/svg+xml;charset=utf-8`});e(URL.createObjectURL(n))})})}dataURI(e){return d.isSSR()?Promise.resolve({imgURI:``}):new Promise(t=>{let n=this.w,r=e?e.scale||e.width/n.globals.svgWidth:1,i=document.createElement(`canvas`);i.width=n.globals.svgWidth*r,i.height=parseInt(n.dom.elWrap.style.height,10)*r;let a=n.config.chart.background===`transparent`||!n.config.chart.background?`#fff`:n.config.chart.background,o=i.getContext(`2d`);o.fillStyle=a,o.fillRect(0,0,i.width*r,i.height*r),this.getSvgString(r).then(e=>{let n=`data:image/svg+xml,`+encodeURIComponent(e),r=new Image;r.crossOrigin=`anonymous`,r.onload=()=>{o.drawImage(r,0,0),i.msToBlob?t({blob:i.msToBlob()}):t({imgURI:i.toDataURL(`image/png`)})},r.src=n})})}exportToSVG(){this.svgUrl().then(e=>{this.triggerDownload(e,this.w.config.chart.toolbar.export.svg.filename,`.svg`)})}exportToPng(){let e=this.w.config.chart.toolbar.export.scale,t=this.w.config.chart.toolbar.export.width,n=e?{scale:e}:t?{width:t}:void 0;this.dataURI(n).then(({imgURI:e,blob:t})=>{t?navigator.msSaveOrOpenBlob(t,this.w.globals.chartID+`.png`):this.triggerDownload(e,this.w.config.chart.toolbar.export.png.filename,`.png`)})}exportToCSV({series:e,fileName:t,columnDelimiter:n=`,`,lineDelimiter:r=`
929
+ `}){let i=this.w;e||=i.config.series;let a=[],o=[],s=``,c=i.seriesData.series.map((e,t)=>i.globals.collapsedSeriesIndices.indexOf(t)===-1?e:[]),l=e=>typeof i.config.chart.toolbar.export.csv.categoryFormatter==`function`?i.config.chart.toolbar.export.csv.categoryFormatter(e):i.config.xaxis.type===`datetime`&&String(e).length>=10?new Date(e).toDateString():y.isNumber(e)?e:e.split(n).join(``),u=e=>typeof i.config.chart.toolbar.export.csv.valueFormatter==`function`?i.config.chart.toolbar.export.csv.valueFormatter(e):e,d=Math.max(...e.map(e=>e.data?e.data.length:0)),f=new Ee(this.w),p=new H(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),m=e=>{let t=``;if(!i.globals.axisCharts)t=i.config.labels[e];else{if(i.config.xaxis.type===`category`||i.config.xaxis.convertedCatToNumeric)if(i.globals.isBarHorizontal){let n=i.formatters.yLabelFormatters[0],r=new W(this.ctx.w).getActiveConfigSeriesIndex();t=n(i.labelData.labels[e],{seriesIndex:r,dataPointIndex:e,w:i})}else t=p.getLabel(i.labelData.labels,i.labelData.timescaleLabels,0,e).text;i.config.xaxis.type===`datetime`&&(i.config.xaxis.categories.length?t=i.config.xaxis.categories[e]:i.config.labels.length&&(t=i.config.labels[e]))}return t===null?`nullvalue`:(Array.isArray(t)&&(t=t.join(` `)),y.isNumber(t)?t:t.split(n).join(``))},h=()=>[...Array(d)].map(()=>``),g=(t,r)=>{if(a.length&&r===0&&o.push(a.join(n)),t.data){t.data=t.data.length&&t.data||h();for(let s=0;s<t.data.length;s++){a=[];let d=m(s);if(d!==`nullvalue`){if(d||(f.isFormatXY()?d=e[r].data[s].x:f.isFormat2DArray()&&(d=e[r].data[s]?e[r].data[s][0]:``)),r===0){a.push(l(d));for(let t=0;t<i.seriesData.series.length;t++){let n=f.isFormatXY()?e[t].data[s]?.y:c[t][s];a.push(u(n))}}(i.config.chart.type===`candlestick`||t.type&&t.type===`candlestick`)&&(a.pop(),a.push(i.candleData.seriesCandleO[r][s]),a.push(i.candleData.seriesCandleH[r][s]),a.push(i.candleData.seriesCandleL[r][s]),a.push(i.candleData.seriesCandleC[r][s])),(i.config.chart.type===`boxPlot`||t.type&&t.type===`boxPlot`)&&(a.pop(),a.push(i.candleData.seriesCandleO[r][s]),a.push(i.candleData.seriesCandleH[r][s]),a.push(i.candleData.seriesCandleM[r][s]),a.push(i.candleData.seriesCandleL[r][s]),a.push(i.candleData.seriesCandleC[r][s])),i.config.chart.type===`rangeBar`&&(a.pop(),a.push(i.rangeData.seriesRangeStart[r][s]),a.push(i.rangeData.seriesRangeEnd[r][s])),a.length&&o.push(a.join(n))}}}};a.push(i.config.chart.toolbar.export.csv.headerCategory),i.config.chart.type===`boxPlot`?(a.push(`minimum`),a.push(`q1`),a.push(`median`),a.push(`q3`),a.push(`maximum`)):i.config.chart.type===`candlestick`?(a.push(`open`),a.push(`high`),a.push(`low`),a.push(`close`)):i.config.chart.type===`rangeBar`?(a.push(`minimum`),a.push(`maximum`)):e.map((e,t)=>{let r=(e.name?e.name:`series-${t}`)+``;i.globals.axisCharts&&a.push(r.split(n).join(``)?r.split(n).join(``):`series-${t}`)}),i.globals.axisCharts||(a.push(i.config.chart.toolbar.export.csv.headerValue),o.push(a.join(n))),!i.globals.allSeriesHasEqualX&&i.globals.axisCharts&&!i.config.xaxis.categories.length&&!i.config.labels.length?(()=>{let t=new Set,r={};e.forEach((n,i)=>{n?.data.forEach(n=>{let a,o;if(f.isFormatXY())a=n.x,o=n.y;else if(f.isFormat2DArray())a=n[0],o=n[1];else return;r[a]||(r[a]=Array(e.length).fill(``)),r[a][i]=u(o),t.add(a)})}),a.length&&o.push(a.join(n)),Array.from(t).sort().forEach(e=>{o.push([l(e),r[e].join(n)])})})():e.map((e,t)=>{i.globals.axisCharts?g(e,t):(a=[],a.push(l(i.labelData.labels[t])),a.push(u(c[t])),o.push(a.join(n)))}),s+=o.join(r),this.triggerDownload(`data:text/csv; charset=utf-8,`+encodeURIComponent(``+s),t||i.config.chart.toolbar.export.csv.filename,`.csv`)}triggerDownload(e,t,n){if(d.isSSR())return;let r=document.createElement(`a`);r.href=e,r.download=(t||this.w.globals.chartID)+n,document.body.appendChild(r),r.click(),document.body.removeChild(r)}};X.registerFeatures({exports:yt});var bt=class{constructor(e){this.w=e.w,this.lgCtx=e}getLegendStyles(){if(d.isSSR())return null;let e=document.createElement(`style`);e.setAttribute(`type`,`text/css`);let t=this.w.config.chart.nonce;t&&e.setAttribute(`nonce`,t);let n=document.createTextNode(vt);return e.appendChild(n),e}getLegendDimensions(){let e=this.w.dom.baseEl.querySelector(`.apexcharts-legend`);if(!e)return{clwh:0,clww:0};let{width:t,height:n}=e.getBoundingClientRect();return{clwh:n,clww:t}}appendToForeignObject(){let e=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&e&&this.w.dom.elLegendForeign.appendChild(e)}toggleDataSeries(e,t){let n=this.w;if(n.globals.axisCharts||n.config.chart.type===`radialBar`){n.globals.resized=!0;let r=null,i=null;if(n.globals.risingSeries=[],n.globals.axisCharts){if(r=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`),!r)return;i=parseInt(r.getAttribute(`data:realIndex`),10)}else{if(r=n.dom.baseEl.querySelector(`.apexcharts-series[rel='${e+1}']`),!r)return;i=parseInt(r.getAttribute(`rel`),10)-1}if(t?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach(e=>{this.riseCollapsedSeries(e.cs,e.csi,i)}):this.hideSeries({seriesEl:r,realIndex:i}),n.config.chart.accessibility.enabled){let t=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${e+1}"]`);if(t){let r=n.globals.collapsedSeriesIndices.includes(i)||n.globals.ancillaryCollapsedSeriesIndices.includes(i);t.setAttribute(`aria-pressed`,r?`true`:`false`);let a=t.querySelector(`.apexcharts-legend-text`),o=a?a.textContent:n.seriesData.seriesNames[e],s=r?`hidden`:`visible`;t.setAttribute(`aria-label`,`${o}, ${s}. Press Enter or Space to toggle.`)}}}else{let t=n.dom.Paper.findOne(` .apexcharts-series[rel='${e+1}'] path`),r=n.config.chart.type;if(r===`pie`||r===`polarArea`||r===`donut`){let e=n.config.plotOptions.pie.donut.labels;new I(this.w).pathMouseDown(t,null),this.lgCtx.printDataLabelsInner(t.node,e)}if(n.config.chart.accessibility.enabled){let t=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${e+1}"]`);if(t){let r=n.globals.collapsedSeriesIndices.includes(e);t.setAttribute(`aria-pressed`,r?`true`:`false`);let i=t.querySelector(`.apexcharts-legend-text`),a=i?i.textContent:n.seriesData.seriesNames[e],o=r?`hidden`:`visible`;t.setAttribute(`aria-label`,`${a}, ${o}. Press Enter or Space to toggle.`)}}}}getSeriesAfterCollapsing({realIndex:e}){let t=this.w,n=t.globals,r=y.clone(t.config.series);if(n.axisCharts){let i=t.config.yaxis[n.seriesYAxisReverseMap[e]],a={index:e,data:r[e].data.slice(),type:r[e].type||t.config.chart.type};if(i&&i.show&&i.showAlways)n.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(n.ancillaryCollapsedSeries.push(a),n.ancillaryCollapsedSeriesIndices.push(e));else if(n.collapsedSeriesIndices.indexOf(e)<0){n.collapsedSeries.push(a),n.collapsedSeriesIndices.push(e);let t=n.risingSeries.indexOf(e);n.risingSeries.splice(t,1)}}else n.collapsedSeries.push({index:e,data:r[e]}),n.collapsedSeriesIndices.push(e);return n.allSeriesCollapsed=n.collapsedSeries.length+n.ancillaryCollapsedSeries.length===t.config.series.length,this._getSeriesBasedOnCollapsedState(r)}hideSeries({seriesEl:e,realIndex:t}){let n=this.w,r=this.getSeriesAfterCollapsing({realIndex:t}),i=e.childNodes;for(let e=0;e<i.length;e++)i[e].classList.contains(`apexcharts-series-markers-wrap`)&&(i[e].classList.contains(`apexcharts-hide`)?i[e].classList.remove(`apexcharts-hide`):i[e].classList.add(`apexcharts-hide`));this.lgCtx.updateSeries(r,n.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(e,t,n){let r=this.w,i=y.clone(r.config.series);if(e.length>0){for(let a=0;a<e.length;a++)e[a].index===n&&(r.globals.axisCharts?i[n].data=e[a].data.slice():i[n]=e[a].data,typeof i[n]!=`number`&&(i[n].hidden=!1),e.splice(a,1),t.splice(a,1),r.globals.risingSeries.push(n),a--);i=this._getSeriesBasedOnCollapsedState(i),this.lgCtx.updateSeries(i,r.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(e){let t=this.w,n=0;return t.globals.axisCharts?e.forEach((r,i)=>{t.globals.collapsedSeriesIndices.indexOf(i)<0&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0||(e[i].data=[],n++)}):e.forEach((r,i)=>{t.globals.collapsedSeriesIndices.indexOf(i)<0||(e[i]=0,n++)}),t.globals.allSeriesCollapsed=n===e.length,e}},xt=class{constructor(e,t){this.w=e,this.ctx=t,this.printDataLabelsInner=(...e)=>t.pie?.printDataLabelsInner(...e),this.updateSeries=(...e)=>t.updateHelpers._updateSeries(...e),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type===`bar`&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new bt(this)}init(){let e=this.w,t=e.globals,n=e.config,r=n.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(r||!t.axisCharts)&&n.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),n.legend.position===`bottom`||n.legend.position===`top`?this.legendAlignHorizontal():(n.legend.position===`right`||n.legend.position===`left`)&&this.legendAlignVertical()}}createLegendMarker({i:e,fillcolor:t}){let n=this.w,r=v.createElement(`span`);r.classList.add(`apexcharts-legend-marker`);let i=n.config.legend.markers.shape||n.config.markers.shape,a=i;Array.isArray(i)&&(a=i[e]);let o=Array.isArray(n.config.legend.markers.size)?parseFloat(n.config.legend.markers.size[e]):parseFloat(n.config.legend.markers.size),l=Array.isArray(n.config.legend.markers.offsetX)?parseFloat(n.config.legend.markers.offsetX[e]):parseFloat(n.config.legend.markers.offsetX),u=Array.isArray(n.config.legend.markers.offsetY)?parseFloat(n.config.legend.markers.offsetY[e]):parseFloat(n.config.legend.markers.offsetY),f=Array.isArray(n.config.legend.markers.strokeWidth)?parseFloat(n.config.legend.markers.strokeWidth[e]):parseFloat(n.config.legend.markers.strokeWidth),p=r.style;if(p.height=(o+f)*2+`px`,p.width=(o+f)*2+`px`,p.left=l+`px`,p.top=u+`px`,n.config.legend.markers.customHTML)p.background=`transparent`,p.color=t[e],Array.isArray(n.config.legend.markers.customHTML)?n.config.legend.markers.customHTML[e]&&(r.innerHTML=n.config.legend.markers.customHTML[e]()):r.innerHTML=n.config.legend.markers.customHTML();else{let i=new B(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${a}`,seriesIndex:e,strokeWidth:f,size:o}),l=(d.isBrowser()?window.SVG:global.SVG)().addTo(r).size(`100%`,`100%`),u=new I(this.w).drawMarker(0,0,c(s({},i),{pointFillColor:Array.isArray(t)?t[e]:i.pointFillColor,shape:a}));n.dom.Paper.find(`.apexcharts-legend-marker.apexcharts-marker`).forEach(e=>{e.node.classList.contains(`apexcharts-marker-triangle`)?e.node.style.transform=`translate(50%, 45%)`:e.node.style.transform=`translate(50%, 50%)`}),l.add(u)}return r}drawLegends(){let e=this,t=this.w,n=t.config.legend.fontFamily,r=t.seriesData.seriesNames,i=t.config.legend.markers.fillColors?t.config.legend.markers.fillColors.slice():t.globals.colors.slice();if(t.config.chart.type===`heatmap`){let e=t.config.plotOptions.heatmap.colorScale.ranges;r=e.map(e=>e.name?e.name:e.from+` - `+e.to),i=e.map(e=>e.color)}else this.isBarsDistributed&&(r=t.labelData.labels.slice());t.config.legend.customLegendItems.length&&(r=t.config.legend.customLegendItems);let a=t.formatters.legendFormatter,o=t.config.legend.inverseOrder,s=[];t.labelData.seriesGroups.length>1&&t.config.legend.clusterGroupedSeries&&t.labelData.seriesGroups.forEach((e,n)=>{s[n]=v.createElement(`div`),s[n].classList.add(`apexcharts-legend-group`,`apexcharts-legend-group-${n}`),t.config.legend.clusterGroupedSeriesOrientation===`horizontal`?t.dom.elLegendWrap.classList.add(`apexcharts-legend-group-horizontal`):s[n].classList.add(`apexcharts-legend-group-vertical`)});for(let e=o?r.length-1:0;o?e>=0:e<=r.length-1;o?e--:e++){let o=a(r[e],{seriesIndex:e,w:t}),c=!1,l=!1;if(t.globals.collapsedSeries.length>0)for(let n=0;n<t.globals.collapsedSeries.length;n++)t.globals.collapsedSeries[n].index===e&&(c=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(let n=0;n<t.globals.ancillaryCollapsedSeriesIndices.length;n++)t.globals.ancillaryCollapsedSeriesIndices[n]===e&&(l=!0);let u=this.createLegendMarker({i:e,fillcolor:i});I.setAttrs(u,{rel:e+1,"data:collapsed":c||l}),(c||l)&&u.classList.add(`apexcharts-inactive-legend`);let d=v.createElement(`div`);if(t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled){d.setAttribute(`role`,`button`),d.setAttribute(`tabindex`,`0`);let e=Array.isArray(o)?o.join(` `):o,t=c||l,n=t?`hidden`:`visible`;d.setAttribute(`aria-label`,`${e}, ${n}. Press Enter or Space to toggle.`),d.setAttribute(`aria-pressed`,t?`true`:`false`)}let f=v.createElement(`span`);f.classList.add(`apexcharts-legend-text`),f.innerHTML=Array.isArray(o)?o.join(` `):o;let p=t.config.legend.labels.useSeriesColors?t.globals.colors[e]:Array.isArray(t.config.legend.labels.colors)?t.config.legend.labels.colors?.[e]:t.config.legend.labels.colors;p||=t.config.chart.foreColor,f.style.color=p,f.style.fontSize=t.config.legend.fontSize,f.style.fontWeight=t.config.legend.fontWeight,f.style.fontFamily=n||t.config.chart.fontFamily,I.setAttrs(f,{rel:e+1,i:e,"data:default-text":encodeURIComponent(o),"data:collapsed":c||l}),d.appendChild(u),d.appendChild(f);let m=new N(this.w);t.config.legend.showForZeroSeries||m.getSeriesTotalByIndex(e)===0&&m.seriesHaveSameValues(e)&&!m.isSeriesNull(e)&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1&&d.classList.add(`apexcharts-hidden-zero-series`),t.config.legend.showForNullSeries||m.isSeriesNull(e)&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1&&d.classList.add(`apexcharts-hidden-null-series`),s.length?t.labelData.seriesGroups.forEach((n,r)=>{n.includes(t.config.series[e]?.name)&&(t.dom.elLegendWrap.appendChild(s[r]),s[r].appendChild(d))}):t.dom.elLegendWrap.appendChild(d),t.dom.elLegendWrap.classList.add(`apexcharts-align-${t.config.legend.horizontalAlign}`),t.dom.elLegendWrap.classList.add(`apx-legend-position-`+t.config.legend.position),d.classList.add(`apexcharts-legend-series`),d.style.margin=`${t.config.legend.itemMargin.vertical}px ${t.config.legend.itemMargin.horizontal}px`,t.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+`px`:``,t.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+`px`:``,I.setAttrs(d,{rel:e+1,seriesName:y.escapeString(r[e]),"data:collapsed":c||l}),(c||l)&&d.classList.add(`apexcharts-inactive-legend`),t.config.legend.onItemClick.toggleDataSeries||d.classList.add(`apexcharts-no-click`)}t.dom.elWrap.addEventListener(`click`,e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&t.config.legend.customLegendItems.length===0&&(t.dom.elWrap.addEventListener(`mousemove`,e.onLegendHovered,!0),t.dom.elWrap.addEventListener(`mouseout`,e.onLegendHovered,!0)),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&t.dom.elWrap.addEventListener(`keydown`,e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(e,t){let n=this.w,r=n.dom.elLegendWrap,i=r.clientHeight,a=0,o=0;if(n.config.legend.position===`bottom`)o=n.globals.svgHeight-Math.min(i,n.globals.svgHeight/2)-5;else if(n.config.legend.position===`top`){let e=new G(this.w,this.ctx),t=e.dimHelpers.getTitleSubtitleCoords(`title`).height,n=e.dimHelpers.getTitleSubtitleCoords(`subtitle`).height;o=(t>0?t-10:0)+(n>0?n-10:0)}r.style.position=`absolute`,a=a+e+n.config.legend.offsetX,o=o+t+n.config.legend.offsetY,r.style.left=a+`px`,r.style.top=o+`px`,n.config.legend.position===`right`&&(r.style.left=`auto`,r.style.right=25+n.config.legend.offsetX+`px`),[`width`,`height`].forEach(e=>{r.style[e]&&(r.style[e]=parseInt(n.config.legend[e],10)+`px`)})}legendAlignHorizontal(){let e=this.w,t=e.dom.elLegendWrap;t.style.right=0;let n=new G(this.w,this.ctx),r=n.dimHelpers.getTitleSubtitleCoords(`title`),i=n.dimHelpers.getTitleSubtitleCoords(`subtitle`),a=0;e.config.legend.position===`top`&&(a=r.height+i.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,a)}legendAlignVertical(){let e=this.w,t=this.legendHelpers.getLegendDimensions(),n=0;e.config.legend.position===`left`&&(n=20),e.config.legend.position===`right`&&(n=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(n,20)}onLegendHovered(e){let t=this.w,n=e.target.classList.contains(`apexcharts-legend-series`)||e.target.classList.contains(`apexcharts-legend-text`)||e.target.classList.contains(`apexcharts-legend-marker`);if(t.config.chart.type!==`heatmap`&&!this.isBarsDistributed)!e.target.classList.contains(`apexcharts-inactive-legend`)&&n&&new W(this.ctx.w).toggleSeriesOnHover(e,e.target);else if(n){let t=parseInt(e.target.getAttribute(`rel`),10)-1;this.ctx.events.fireEvent(`legendHover`,[this.ctx,t,this.w]),new W(this.ctx.w).highlightRangeInSeries(e,e.target)}}onLegendKeyDown(e){let t=this,n=this.w;if((e.target.classList.contains(`apexcharts-legend-series`)||e.target.classList.contains(`apexcharts-legend-text`)||e.target.classList.contains(`apexcharts-legend-marker`))&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let r=e.target.getAttribute(`rel`);t.onLegendClick(e),r!==null&&n.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{let e=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${r}"]`);e&&e.focus()})}}onLegendClick(e){let t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains(`apexcharts-legend-series`)||e.target.classList.contains(`apexcharts-legend-text`)||e.target.classList.contains(`apexcharts-legend-marker`))){let n=parseInt(e.target.getAttribute(`rel`),10)-1,r=e.target.getAttribute(`data:collapsed`)===`true`,i=this.w.config.chart.events.legendClick;typeof i==`function`&&i(this.ctx,n,this.w),this.ctx.events.fireEvent(`legendClick`,[this.ctx,n,this.w]);let a=this.w.config.legend.markers.onClick;typeof a==`function`&&e.target.classList.contains(`apexcharts-legend-marker`)&&(a(this.ctx,n,this.w),this.ctx.events.fireEvent(`legendMarkerClick`,[this.ctx,n,this.w])),t.config.chart.type!==`treemap`&&t.config.chart.type!==`heatmap`&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(n,r)}}};X.registerFeatures({legend:xt});var St=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
930
+ <defs>
931
+ <path d="M0 0h24v24H0z" id="a"/>
932
+ </defs>
933
+ <clipPath id="b">
934
+ <use overflow="visible" xlink:href="#a"/>
935
+ </clipPath>
936
+ <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
937
+ </svg>`,Ct=`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
938
+ <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
939
+ <path d="M0 0h24v24H0V0z" fill="none"/>
940
+ <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
941
+ </svg>`,wt=`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
942
+ <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
943
+ <path d="M0 0h24v24H0z" fill="none"/>
944
+ </svg>`,Tt=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
945
+ <path d="M0 0h24v24H0z" fill="none"/>
946
+ <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
947
+ </svg>
948
+ `,Et=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
949
+ <path d="M0 0h24v24H0z" fill="none"/>
950
+ <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
951
+ </svg>
952
+ `,Dt=`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
953
+ <path d="M0 0h24v24H0z" fill="none"/>
954
+ <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
955
+ </svg>`,Ot=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>`,kt=class{constructor(e,t){this.w=e,this.ctx=t,this.ev=this.w.config.chart.events,this.selectedClass=`apexcharts-selected`,this.localeValues=this.w.globals.locale.toolbar,this.minX=e.globals.minX,this.maxX=e.globals.maxX}createToolbar(){let e=this.w,t=()=>v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),n=t();if(n.setAttribute(`class`,`apexcharts-toolbar`),n.style.top=e.config.chart.toolbar.offsetY+`px`,n.style.right=-e.config.chart.toolbar.offsetX+3+`px`,e.dom.elWrap.appendChild(n),this.elZoom=t(),this.elZoomIn=t(),this.elZoomOut=t(),this.elPan=t(),this.elSelection=t(),this.elZoomReset=t(),this.elMenuIcon=t(),this.elMenu=t(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons.push(t());let r=[],i=(t,n,i)=>{let a=t.toLowerCase();this.t[a]&&e.config.chart.zoom.enabled&&r.push({el:n,icon:typeof this.t[a]==`string`?this.t[a]:i,title:this.localeValues[t],class:`apexcharts-${a}-icon`})};i(`zoomIn`,this.elZoomIn,Tt),i(`zoomOut`,this.elZoomOut,Et);let a=t=>{this.t[t]&&e.config.chart[t].enabled&&r.push({el:t===`zoom`?this.elZoom:this.elSelection,icon:typeof this.t[t]==`string`?this.t[t]:t===`zoom`?Ct:Dt,title:this.localeValues[t===`zoom`?`selectionZoom`:`selection`],class:`apexcharts-${t}-icon`})};a(`zoom`),a(`selection`),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan==`string`?this.t.pan:St,title:this.localeValues.pan,class:`apexcharts-pan-icon`}),i(`reset`,this.elZoomReset,wt),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download==`string`?this.t.download:Ot,title:this.localeValues.menu,class:`apexcharts-menu-icon`});for(let e=0;e<this.elCustomIcons.length;e++)r.push({el:this.elCustomIcons[e],icon:this.t.customIcons[e].icon,title:this.t.customIcons[e].title,index:this.t.customIcons[e].index,class:`apexcharts-toolbar-custom-icon `+this.t.customIcons[e].class});r.forEach((e,t)=>{e.index&&y.moveIndexInArray(r,t,e.index)});for(let e=0;e<r.length;e++)I.setAttrs(r[e].el,{class:r[e].class,title:r[e].title,tabindex:`0`,role:`button`,"aria-label":r[e].title}),r[e].el.innerHTML=r[e].icon,n.appendChild(r[e].el);this.elZoom.parentNode&&this.elZoom.setAttribute(`aria-pressed`,String(!!e.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute(`aria-pressed`,String(!!e.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute(`aria-pressed`,String(!!e.interact.panEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute(`aria-haspopup`,`true`),this.elMenuIcon.setAttribute(`aria-expanded`,`false`)),this._createHamburgerMenu(n),e.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.interact.panEnabled?this.elPan.classList.add(this.selectedClass):e.interact.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}_createHamburgerMenu(e){this.elMenuItems=[],e.appendChild(this.elMenu),I.setAttrs(this.elMenu,{class:`apexcharts-menu`,role:`menu`});let t=[{name:`exportSVG`,title:this.localeValues.exportToSVG},{name:`exportPNG`,title:this.localeValues.exportToPNG},{name:`exportCSV`,title:this.localeValues.exportToCSV}];for(let e=0;e<t.length;e++)this.elMenuItems.push(v.createElementNS(`http://www.w3.org/1999/xhtml`,`div`)),this.elMenuItems[e].innerHTML=t[e].title,I.setAttrs(this.elMenuItems[e],{class:`apexcharts-menu-item ${t[e].name}`,title:t[e].title,role:`menuitem`,tabindex:`-1`}),this.elMenu.appendChild(this.elMenuItems[e])}addToolbarEventListeners(){this.elZoomReset.addEventListener(`click`,this.handleZoomReset.bind(this)),this.elSelection.addEventListener(`click`,this.toggleZoomSelection.bind(this,`selection`)),this.elZoom.addEventListener(`click`,this.toggleZoomSelection.bind(this,`zoom`)),this.elZoomIn.addEventListener(`click`,this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener(`click`,this.handleZoomOut.bind(this)),this.elPan.addEventListener(`click`,this.togglePanning.bind(this)),this.elMenuIcon.addEventListener(`click`,this.toggleMenu.bind(this)),this.elMenuItems.forEach(e=>{e.classList.contains(`exportSVG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`svg`)):e.classList.contains(`exportPNG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`png`)):e.classList.contains(`exportCSV`)&&e.addEventListener(`click`,this.handleDownload.bind(this,`csv`))});for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener(`click`,this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMenuIcon,...this.elCustomIcons].forEach(e=>{e.addEventListener(`keydown`,t=>{if(t.key===`Enter`||t.key===` `){t.preventDefault();let n=e.className;e.click(),requestAnimationFrame(()=>{let e=this.w.dom.baseEl;if(!e)return;let t=n.split(` `).find(e=>e.startsWith(`apexcharts-`));if(!t)return;let r=e.querySelector(`.${t}`);r&&r.focus()})}})}),this.elMenuIcon.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this.elMenu.classList.contains(`apexcharts-menu-open`)||this.toggleMenu(),window.setTimeout(()=>{let t=e.key===`ArrowDown`?0:this.elMenuItems.length-1;this.elMenuItems[t]&&this.elMenuItems[t].focus()},20))}),this.elMenuItems.forEach((e,t)=>{e.addEventListener(`keydown`,n=>{n.key===`ArrowDown`?(n.preventDefault(),(this.elMenuItems[t+1]||this.elMenuItems[0]).focus()):n.key===`ArrowUp`?(n.preventDefault(),(this.elMenuItems[t-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):n.key===`Escape`||n.key===`Tab`?(this._closeMenu(),this.elMenuIcon.focus(),n.key===`Tab`||n.preventDefault()):(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e.click())})})}toggleZoomSelection(e){this.ctx.getSyncedCharts().forEach(t=>{t.ctx.toolbar.toggleOtherControls();let n=e===`selection`?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,r=e===`selection`?`selectionEnabled`:`zoomEnabled`;t.w.globals[r]=!t.w.globals[r],n.classList.contains(t.ctx.toolbar.selectedClass)?n.classList.remove(t.ctx.toolbar.selectedClass):n.classList.add(t.ctx.toolbar.selectedClass),n.setAttribute(`aria-pressed`,String(t.w.globals[r]))})}getToolbarIconsReference(){let e=this.w;this.elZoom||=e.dom.baseEl.querySelector(`.apexcharts-zoom-icon`),this.elPan||=e.dom.baseEl.querySelector(`.apexcharts-pan-icon`),this.elSelection||=e.dom.baseEl.querySelector(`.apexcharts-selection-icon`)}enableZoomPanFromToolbar(e){this.toggleOtherControls(),e===`pan`?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;let t=e===`pan`?this.elPan:this.elZoom,n=e===`pan`?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),n&&n.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{e.ctx.toolbar.toggleOtherControls(),e.w.interact.panEnabled=!e.w.interact.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass),e.ctx.toolbar.elPan.setAttribute(`aria-pressed`,String(e.w.interact.panEnabled))})}toggleOtherControls(){let e=this.w;e.interact.panEnabled=!1,e.interact.zoomEnabled=!1,e.interact.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(e=>{e&&e.classList.remove(this.selectedClass)})}handleZoomIn(){let e=this.w;e.axisFlags.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);let t=(this.minX+this.maxX)/2,n=(this.minX+t)/2,r=(this.maxX+t)/2,i=this._getNewMinXMaxX(n,r);e.interact.disableZoomIn||this.zoomUpdateOptions(i.minX,i.maxX)}handleZoomOut(){let e=this.w;if(e.axisFlags.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),e.config.xaxis.type===`datetime`&&new Date(this.minX).getUTCFullYear()<1e3)return;let t=(this.minX+this.maxX)/2,n=this.minX-(t-this.minX),r=this.maxX-(t-this.maxX),i=this._getNewMinXMaxX(n,r);e.interact.disableZoomOut||this.zoomUpdateOptions(i.minX,i.maxX)}_getNewMinXMaxX(e,t){let n=this.w.config.xaxis.convertedCatToNumeric;return{minX:n?Math.floor(e):e,maxX:n?Math.floor(t):t}}zoomUpdateOptions(e,t){let n=this.w;if(e===void 0&&t===void 0){this.handleZoomReset();return}if(n.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=n.globals.dataPoints),t-e<2))return;let r={min:e,max:t},i=this.getBeforeZoomRange(r);i&&(r=i.xaxis);let a={xaxis:r},o=y.clone(n.globals.initialConfig.yaxis);n.config.chart.group||(a.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,o)}zoomCallback(e,t){typeof this.ev.zoomed==`function`&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t}),this.ctx.events.fireEvent(`zoomed`,{xaxis:e,yaxis:t}))}getBeforeZoomRange(e,t){let n=null;return typeof this.ev.beforeZoom==`function`&&(n=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),n}toggleMenu(){window.setTimeout(()=>{this.elMenu.classList.contains(`apexcharts-menu-open`)?this._closeMenu():(this.elMenu.classList.add(`apexcharts-menu-open`),this.elMenuIcon.setAttribute(`aria-expanded`,`true`))},0)}_closeMenu(){this.elMenu.classList.remove(`apexcharts-menu-open`),this.elMenuIcon.setAttribute(`aria-expanded`,`false`)}handleDownload(e){let t=this.w,n=new yt(this.w,this.ctx);switch(e){case`svg`:n.exportToSVG(this.ctx);break;case`png`:n.exportToPng(this.ctx);break;case`csv`:n.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter});break}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.w;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom==`function`){let n=t.config.chart.events.beforeResetZoom(e,t);n&&e.updateHelpers.revertDefaultAxisMinMax(n)}typeof t.config.chart.events.zoomed==`function`&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max}),t.interact.zoomed=!1;let n=e.ctx.series.emptyCollapsedSeries(y.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(n,t.config.chart.animations.dynamicAnimation.enabled)})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}},At=class extends kt{constructor(e,t){super(e,t),this.w=e,this.ctx=t,this.dragged=!1,this.graphics=new I(this.w),this.eventList=[`mousedown`,`mouseleave`,`mousemove`,`touchstart`,`touchmove`,`mouseup`,`touchend`,`wheel`],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection=`none`,this.debounceTimer=null,this.debounceDelay=100,this.wheelDelay=400}init({xyRatios:e}){let t=this.w,n=this;this.xyRatios=e,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=t.dom.baseEl.querySelector(`.apexcharts-grid`),this.constraints=new te(0,0,t.layout.gridWidth,t.layout.gridHeight),this.zoomRect.node.classList.add(`apexcharts-zoom-rect`),this.selectionRect.node.classList.add(`apexcharts-selection-rect`),t.dom.Paper.add(this.zoomRect),t.dom.Paper.add(this.selectionRect),t.config.chart.selection.type===`x`?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:t.layout.gridWidth,maxY:t.layout.gridHeight}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):t.config.chart.selection.type===`y`?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:t.layout.gridWidth}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):this.slDraggableRect=this.selectionRect.draggable().on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)),this.preselectedSelection(),this.hoverArea=t.dom.baseEl.querySelector(`${t.globals.chartClass} .apexcharts-svg`),this.hoverArea.classList.add(`apexcharts-zoomable`),this.eventList.forEach(t=>{this.hoverArea.addEventListener(t,n.svgMouseEvents.bind(n,e),{capture:!1,passive:!0})}),t.config.chart.zoom.enabled&&t.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener(`wheel`,n.mouseWheelEvent.bind(n),{capture:!1,passive:!1})}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}svgMouseEvents(e,t){let n=this.w,r=this.ctx.toolbar,i=n.interact.zoomEnabled?n.config.chart.zoom.type:n.config.chart.selection.type,a=n.config.chart.toolbar.autoSelected;if(t.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar(a===`pan`?`zoom`:`pan`)):this.shiftWasPressed&&=(r.enableZoomPanFromToolbar(a),!1),!t.target)return;let o=t.target.classList,s;if(t.target.parentNode&&t.target.parentNode!==null&&(s=t.target.parentNode.classList),!(o.contains(`apexcharts-legend-marker`)||o.contains(`apexcharts-legend-text`)||s&&s.contains(`apexcharts-toolbar`))){if(this.clientX=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientX:t.type===`touchend`?t.changedTouches[0].clientX:t.clientX,this.clientY=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientY:t.type===`touchend`?t.changedTouches[0].clientY:t.clientY,t.type===`mousedown`&&t.which===1||t.type===`touchstart`){let e=this.gridRect.getBoundingClientRect();this.startX=this.clientX-e.left-n.globals.barPadForNumericAxis,this.startY=this.clientY-e.top,this.dragged=!1,this.w.interact.mousedown=!0}(t.type===`mousemove`&&t.which===1||t.type===`touchmove`)&&(this.dragged=!0,n.interact.panEnabled?(n.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:i,xyRatios:e})):(this.w.interact.mousedown&&n.interact.zoomEnabled||this.w.interact.mousedown&&n.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:i}))),(t.type===`mouseup`||t.type===`touchend`||t.type===`mouseleave`)&&this.handleMouseUp({zoomtype:i}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:e,isResized:t}){let n=this.w,r=this.gridRect?.getBoundingClientRect();r&&(this.w.interact.mousedown||t)&&(this.endX=this.clientX-r.left-n.globals.barPadForNumericAxis,this.endY=this.clientY-r.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(n.interact.zoomEnabled||n.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:e})),n.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}mouseWheelEvent(e){let t=this.w;e.preventDefault();let n=Date.now();n-t.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(e),t.interact.lastWheelExecution=n),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{n-t.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(e),t.interact.lastWheelExecution=n)},this.debounceDelay)}executeMouseWheelZoom(e){let t=this.w;this.minX=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,this.maxX=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;let n=this.gridRect?.getBoundingClientRect();if(!n)return;let r=(e.clientX-n.left)/n.width,i=this.minX,a=this.maxX,o=a-i,s,c,l;if(e.deltaY<0){s=.5*o;let e=i+r*o;c=e-s/2,l=e+s/2}else s=1.5*o,c=i-s/2,l=a+s/2;if(!t.axisFlags.isRangeBar){c=Math.max(c,t.globals.initialMinX),l=Math.min(l,t.globals.initialMaxX);let e=(t.globals.initialMaxX-t.globals.initialMinX)*.01;if(l-c<e){let t=(c+l)/2;c=t-e/2,l=t+e/2}}let u=this._getNewMinXMaxX(c,l);!isNaN(u.minX)&&!isNaN(u.maxX)&&this.zoomUpdateOptions(u.minX,u.maxX)}makeSelectionRectDraggable(){let e=this.w;if(!this.selectionRect)return;let t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(e,t,n,r,i)=>i===`l`||i===`r`?e.circle(8).css({"stroke-width":1,stroke:`#333`,fill:`#fff`}):e.circle(0),updateHandle:(e,t)=>e.center(t[0],t[1])}).resize().on(`resize`,()=>{let t=e.interact.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;this.handleMouseUp({zoomtype:t,isResized:!0})}))}preselectedSelection(){let e=this.w,t=this.xyRatios;if(!e.interact.zoomEnabled){if(typeof e.interact.selection<`u`&&e.interact.selection!==null)this.drawSelectionRect(c(s({},e.interact.selection),{translateX:e.layout.translateX,translateY:e.layout.translateY}));else if(e.config.chart.selection.xaxis.min!==void 0&&e.config.chart.selection.xaxis.max!==void 0){let n=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,r=e.layout.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-n;e.axisFlags.isRangeBar&&(n=(e.config.chart.selection.xaxis.min-e.globals.yAxisScale[0].niceMin)/t.invertedYRatio,r=(e.config.chart.selection.xaxis.max-e.config.chart.selection.xaxis.min)/t.invertedYRatio);let i={x:n,y:0,width:r,height:e.layout.gridHeight,translateX:e.layout.translateX,translateY:e.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),typeof e.config.chart.events.selection==`function`&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:e,y:t,width:n,height:r,translateX:i=0,translateY:a=0}){let o=this.w,s=this.zoomRect,c=this.selectionRect;if(this.dragged||o.interact.selection!==null){let l={transform:`translate(`+i+`, `+a+`)`};o.interact.zoomEnabled&&this.dragged&&(n<0&&(n=1),s.attr({x:e,y:t,width:n,height:r,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),I.setAttrs(s.node,l)),o.interact.selectionEnabled&&(c.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),I.setAttrs(c.node,l))}}hideSelectionRect(e){e&&e.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:e,zoomtype:t}){let n=this.w,r=e,i=this.gridRect.getBoundingClientRect(),a=r.startX-1,o=r.startY,l=!1,u=!1,d=r.clientX-i.left-n.globals.barPadForNumericAxis,f=r.clientY-i.top,p=d-a,m=f-o,h={translateX:n.layout.translateX,translateY:n.layout.translateY};return Math.abs(p+a)>n.layout.gridWidth?p=n.layout.gridWidth-a:d<0&&(p=a),a>d&&(l=!0,p=Math.abs(p)),o>f&&(u=!0,m=Math.abs(m)),h=t===`x`?{x:l?a-p:a,y:0,width:p,height:n.layout.gridHeight}:t===`y`?{x:0,y:u?o-m:o,width:n.layout.gridWidth,height:m}:{x:l?a-p:a,y:u?o-m:o,width:p,height:m},h=c(s({},h),{translateX:n.layout.translateX,translateY:n.layout.translateY}),r.drawSelectionRect(h),r.selectionDragging(`resizing`),h}selectionDragging(e,t){let n=this.w;if(!t)return;t.preventDefault();let{handler:r,box:i}=t.detail,{x:a,y:o}=i;a<this.constraints.x&&(a=this.constraints.x),o<this.constraints.y&&(o=this.constraints.y),i.x2>this.constraints.x2&&(a=this.constraints.x2-i.w),i.y2>this.constraints.y2&&(o=this.constraints.y2-i.h),r.move(a,o);let s=this.xyRatios,c=this.selectionRect,l=0;e===`resizing`&&(l=30);let u=e=>parseFloat(c.node.getAttribute(e)),d={x:u(`x`),y:u(`y`),width:u(`width`),height:u(`height`)};n.interact.selection=d,typeof n.config.chart.events.selection==`function`&&n.interact.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{let e=this.gridRect.getBoundingClientRect(),t=c.node.getBoundingClientRect(),r,i,a,o;n.axisFlags.isRangeBar?(r=n.globals.yAxisScale[0].niceMin+(t.left-e.left)*s.invertedYRatio,i=n.globals.yAxisScale[0].niceMin+(t.right-e.left)*s.invertedYRatio,a=0,o=1):(r=n.globals.xAxisScale.niceMin+(t.left-e.left)*s.xRatio,i=n.globals.xAxisScale.niceMin+(t.right-e.left)*s.xRatio,a=n.globals.yAxisScale[0].niceMin+(e.bottom-t.bottom)*s.yRatio[0],o=n.globals.yAxisScale[0].niceMax-(t.top-e.top)*s.yRatio[0]);let l={xaxis:{min:r,max:i},yaxis:{min:a,max:o}};n.config.chart.events.selection(this.ctx,l),n.config.chart.brush.enabled&&n.config.chart.events.brushScrolled!==void 0&&n.config.chart.events.brushScrolled(this.ctx,l)},l))}selectionDrawn({context:e,zoomtype:t}){let n=this.w,r=e,i=this.xyRatios,a=this.ctx.toolbar,o=n.interact.zoomEnabled?r.zoomRect.node.getBoundingClientRect():r.selectionRect.node.getBoundingClientRect(),s=r.gridRect.getBoundingClientRect(),c=o.left-s.left-n.globals.barPadForNumericAxis,l=o.right-s.left-n.globals.barPadForNumericAxis,u=o.top-s.top,d=o.bottom-s.top,f,p;n.axisFlags.isRangeBar?(f=n.globals.yAxisScale[0].niceMin+c*i.invertedYRatio,p=n.globals.yAxisScale[0].niceMin+l*i.invertedYRatio):(f=n.globals.xAxisScale.niceMin+c*i.xRatio,p=n.globals.xAxisScale.niceMin+l*i.xRatio);let m=[],h=[];if(n.config.yaxis.forEach((e,t)=>{let r=n.globals.seriesYAxisMap[t][0],a=n.globals.yAxisScale[t].niceMax-i.yRatio[r]*u,o=n.globals.yAxisScale[t].niceMax-i.yRatio[r]*d;m.push(a),h.push(o)}),r.dragged&&(r.dragX>10||r.dragY>10)&&f!==p){if(n.interact.zoomEnabled){let e=y.clone(n.globals.initialConfig.yaxis),i=y.clone(n.globals.initialConfig.xaxis);if(n.interact.zoomed=!0,n.config.xaxis.convertedCatToNumeric&&(f=Math.floor(f),p=Math.floor(p),f<1&&(f=1,p=n.globals.dataPoints),p-f<2&&(p=f+1)),(t===`xy`||t===`x`)&&(i={min:f,max:p}),(t===`xy`||t===`y`)&&e.forEach((t,n)=>{e[n].min=h[n],e[n].max=m[n]}),a){let t=a.getBeforeZoomRange(i,e);t&&(i=t.xaxis?t.xaxis:i,e=t.yaxis?t.yaxis:e)}let o={xaxis:i};n.config.chart.group||(o.yaxis=e),r.ctx.updateHelpers._updateOptions(o,!1,r.w.config.chart.animations.dynamicAnimation.enabled),typeof n.config.chart.events.zoomed==`function`&&a.zoomCallback(i,e)}else if(n.interact.selectionEnabled){let e=null,i=null;i={min:f,max:p},(t===`xy`||t===`y`)&&(e=y.clone(n.config.yaxis),e.forEach((t,n)=>{e[n].min=h[n],e[n].max=m[n]})),n.interact.selection=r.selection,typeof n.config.chart.events.selection==`function`&&n.config.chart.events.selection(r.ctx,{xaxis:i,yaxis:e})}}}panDragging({context:e}){let t=this.w,n=e;if(typeof t.interact.lastClientPosition.x<`u`){let e=t.interact.lastClientPosition.x-n.clientX,r=t.interact.lastClientPosition.y-n.clientY;Math.abs(e)>Math.abs(r)&&e>0?this.moveDirection=`left`:Math.abs(e)>Math.abs(r)&&e<0?this.moveDirection=`right`:Math.abs(r)>Math.abs(e)&&r>0?this.moveDirection=`up`:Math.abs(r)>Math.abs(e)&&r<0&&(this.moveDirection=`down`)}t.interact.lastClientPosition={x:n.clientX,y:n.clientY};let r=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,i=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;n.panScrolled(r,i)}panScrolled(e,t){let n=this.w,r=this.xyRatios,i=y.clone(n.globals.initialConfig.yaxis),a=r.xRatio,o=n.globals.minX,s=n.globals.maxX;n.axisFlags.isRangeBar&&(a=r.invertedYRatio,o=n.globals.minY,s=n.globals.maxY),this.moveDirection===`left`?(e=o+n.layout.gridWidth/15*a,t=s+n.layout.gridWidth/15*a):this.moveDirection===`right`&&(e=o-n.layout.gridWidth/15*a,t=s-n.layout.gridWidth/15*a),n.axisFlags.isRangeBar||(e<n.globals.initialMinX||t>n.globals.initialMaxX)&&(e=o,t=s);let c={xaxis:{min:e,max:t}};n.config.chart.group||(c.yaxis=i),this.updateScrolledChart(c,e,t)}updateScrolledChart(e,t,n){let r=this.w;if(this.ctx.updateHelpers._updateOptions(e,!1,!1),typeof r.config.chart.events.scrolled==`function`){let e={xaxis:{min:t,max:n}};r.config.chart.events.scrolled(this.ctx,e),this.ctx.events.fireEvent(`scrolled`,e)}}};X.registerFeatures({toolbar:kt,zoomPanSelection:At});var jt=class{constructor(e){this.w=e.w,this.annoCtx=e}setOrientations(e,t=null){let n=this.w;if(e.label.orientation===`vertical`){let r=t===null?0:t,i=n.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${r}']`);if(i!==null){let t=i.getBBox();i.setAttribute(`x`,parseFloat(i.getAttribute(`x`))-t.height+4);let n=e.label.position===`top`?t.width:-t.width;i.setAttribute(`y`,parseFloat(i.getAttribute(`y`))+n);let{x:r,y:a}=this.annoCtx.graphics.rotateAroundCenter(i);i.setAttribute(`transform`,`rotate(-90 ${r} ${a})`)}}}addBackgroundToAnno(e,t){let n=this.w;if(!e||!t.label.text||!String(t.label.text).trim())return null;let r=n.dom.baseEl.querySelector(`.apexcharts-grid`),i=r.getBoundingClientRect(),a=r.getBBox(),o=i.width/a.width||1,s=e.getBoundingClientRect(),{left:c,right:l,top:u,bottom:d}=t.label.style.padding;t.label.orientation===`vertical`&&([u,d,c,l]=[c,l,u,d]);let f=(s.left-i.left)/o-c,p=(s.top-i.top)/o-u,m=this.annoCtx.graphics.drawRect(f-n.globals.barPadForNumericAxis,p,s.width/o+c+l,s.height/o+u+d,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&m.node.classList.add(t.id),m}annotationsBackground(){let e=this.w,t=(t,n,r)=>{let i=e.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${n}']`);if(i){let e=i.parentNode,n=this.addBackgroundToAnno(i,t);n&&(e.insertBefore(n.node,i),t.label.mouseEnter&&n.node.addEventListener(`mouseenter`,t.label.mouseEnter.bind(this,t)),t.label.mouseLeave&&n.node.addEventListener(`mouseleave`,t.label.mouseLeave.bind(this,t)),t.label.click&&n.node.addEventListener(`click`,t.label.click.bind(this,t)))}};e.config.annotations.xaxis.forEach((e,n)=>t(e,n,`xaxis`)),e.config.annotations.yaxis.forEach((e,n)=>t(e,n,`yaxis`)),e.config.annotations.points.forEach((e,n)=>t(e,n,`point`))}getY1Y2(e,t){var n;let r=this.w,i=e===`y1`?t.y:t.y2,a,o=!1;if(this.annoCtx.invertAxis){let e=r.config.xaxis.convertedCatToNumeric?r.labelData.categoryLabels:r.labelData.labels,n=e.indexOf(i),o=r.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${n+1})`);a=o?parseFloat(o.getAttribute(`y`)):(r.layout.gridHeight/e.length-1)*(n+1)-r.globals.barHeight,t.seriesIndex!==void 0&&r.globals.barHeight&&(a-=r.globals.barHeight/2*(r.seriesData.series.length-1)-r.globals.barHeight*t.seriesIndex)}else{let e=r.globals.seriesYAxisMap[t.yAxisIndex][0],s=r.config.yaxis[t.yAxisIndex].logarithmic?new N(this.w).getLogVal(r.config.yaxis[t.yAxisIndex].logBase,i,e)/r.globals.yLogRatio[e]:(i-r.globals.minYArr[e])/(r.globals.yRange[e]/r.layout.gridHeight);a=r.layout.gridHeight-Math.min(Math.max(s,0),r.layout.gridHeight),o=s>r.layout.gridHeight||s<0,t.marker&&(t.y===void 0||t.y===null)&&(a=0),(n=r.config.yaxis[t.yAxisIndex])!=null&&n.reversed&&(a=s)}return typeof i==`string`&&i.includes(`px`)&&(a=parseFloat(i)),{yP:a,clipped:o}}getX1X2(e,t){let n=this.w,r=e===`x1`?t.x:t.x2,i=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,a=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,o=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,s=!1,c=this.annoCtx.inversedReversedAxis?(a-r)/(o/n.layout.gridWidth):(r-i)/(o/n.layout.gridWidth);return(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!n.axisFlags.dataFormatXNumeric&&(n.config.chart.sparkline.enabled||(c=this.getStringX(r))),typeof r==`string`&&r.includes(`px`)&&(c=parseFloat(r)),r==null&&t.marker&&(c=n.layout.gridWidth),t.seriesIndex!==void 0&&n.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=n.globals.barWidth/2*(n.seriesData.series.length-1)-n.globals.barWidth*t.seriesIndex),typeof c!=`number`&&(c=0,s=!0),parseFloat(c.toFixed(10))>parseFloat(n.layout.gridWidth.toFixed(10))?(c=n.layout.gridWidth,s=!0):c<0&&(c=0,s=!0),{x:c,clipped:s}}getStringX(e){let t=this.w,n=e;t.config.xaxis.convertedCatToNumeric&&t.labelData.categoryLabels.length&&(e=t.labelData.categoryLabels.indexOf(e)+1);let r=t.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(e),i=t.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${r+1})`);return i&&(n=parseFloat(i.getAttribute(`x`))),n}},Mt=class{constructor(e){this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new jt(this.annoCtx)}addXaxisAnnotation(e,t,n){let r=this.w,i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=!0,c,l=e.label.text,u=e.strokeDashArray;if(y.isNumber(a)){if(e.x2===null||typeof e.x2>`u`){if(!o){let n=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,r.layout.gridHeight+e.offsetY,e.borderColor,u,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}else{let n=this.helpers.getX1X2(`x2`,e);if(c=n.x,s=n.clipped,c<a){let e=a;a=c,c=e}let i=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,c-a,r.layout.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,u);i.node.classList.add(`apexcharts-annotation-rect`),i.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(i.node),e.id&&i.node.classList.add(e.id)}if(!(o&&s)){let i=this.annoCtx.graphics.getTextRects(l,parseFloat(e.label.style.fontSize)),o=e.label.position===`top`?4:e.label.position===`center`?r.layout.gridHeight/2+(e.label.orientation===`vertical`?i.width/2:0):r.layout.gridHeight,s=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:o+e.label.offsetY-(e.label.orientation===`vertical`?e.label.position===`top`?i.width/2-12:-i.width/2:0),text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});s.attr({rel:n}),t.appendChild(s.node),this.annoCtx.helpers.setOrientations(e,n)}}}drawXAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-xaxis-annotations`});return e.config.annotations.xaxis.map((e,n)=>{this.addXaxisAnnotation(e,t.node,n)}),t}},Nt=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new jt(this.annoCtx),this.axesUtils=new H(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(e,t,n){let r=this.w,i=e.strokeDashArray,a=this.helpers.getY1Y2(`y1`,e),o=a.yP,s=a.clipped,c,l=!0,u=!1,d=e.label.text;if(e.y2===null||typeof e.y2>`u`){if(!s){u=!0;let n=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,i,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}else{if(a=this.helpers.getY1Y2(`y2`,e),c=a.yP,l=a.clipped,c>o){let e=o;o=c,c=e}if(!(s&&l)){u=!0;let n=this.annoCtx.graphics.drawRect(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),o-c,0,e.fillColor,e.opacity,1,e.borderColor,i);n.node.classList.add(`apexcharts-annotation-rect`),n.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}if(u){let i=e.label.position===`right`?r.layout.gridWidth:e.label.position===`center`?r.layout.gridWidth/2:0,a=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:(c??o)+e.label.offsetY-3,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});a.attr({rel:n}),t.appendChild(a.node)}}_getYAxisAnnotationWidth(e){let t=this.w,n=t.layout.gridWidth;return n=e.width.indexOf(`%`)>-1?t.layout.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10),n+e.offsetX}drawYAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-yaxis-annotations`});return e.config.annotations.yaxis.forEach((e,n)=>{e.yAxisIndex=this.axesUtils.translateYAxisIndex(e.yAxisIndex),this.axesUtils.isYAxisHidden(e.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||this.addYaxisAnnotation(e,t.node,n)}),t}},Pt=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new jt(this.annoCtx)}addPointAnnotation(e,t,n){if(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)return;let r=this.helpers.getX1X2(`x1`,e),i=r.x,a=r.clipped;r=this.helpers.getY1Y2(`y1`,e);let o=r.yP,s=r.clipped;if(y.isNumber(i)&&!(s||a)){let r={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:`apexcharts-point-annotation-marker ${e.marker.cssClass} ${e.id?e.id:``}`},a=this.annoCtx.graphics.drawMarker(i+e.marker.offsetX,o+e.marker.offsetY,r);t.appendChild(a.node);let s=e.label.text?e.label.text:``,c=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:o+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:s,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-point-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});if(c.attr({rel:n}),t.appendChild(c.node),e.customSVG.SVG){let n=this.annoCtx.graphics.group({class:`apexcharts-point-annotations-custom-svg `+e.customSVG.cssClass});n.attr({transform:`translate(${i+e.customSVG.offsetX}, ${o+e.customSVG.offsetY})`}),n.node.innerHTML=e.customSVG.SVG,t.appendChild(n.node)}if(e.image.path){let t=e.image.width?e.image.width:20,n=e.image.height?e.image.height:20;a=this.annoCtx.addImage({x:i+e.image.offsetX-t/2,y:o+e.image.offsetY-n/2,width:t,height:n,path:e.image.path,appendTo:`.apexcharts-point-annotations`})}e.mouseEnter&&a.node.addEventListener(`mouseenter`,e.mouseEnter.bind(this,e)),e.mouseLeave&&a.node.addEventListener(`mouseleave`,e.mouseLeave.bind(this,e)),e.click&&a.node.addEventListener(`click`,e.click.bind(this,e))}}drawPointAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-point-annotations`});return e.config.annotations.points.map((e,n)=>{this.addPointAnnotation(e,t.node,n)}),t}},Ft=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n,this.graphics=new I(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new jt(this),this.xAxisAnnotations=new Mt(this),this.yAxisAnnotations=new Nt(this),this.pointsAnnotations=new Pt(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){let e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){let t=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),i=e.config.chart.animations.enabled,a=[t,n,r],o=[n.node,t.node,r.node];for(let t=0;t<3;t++)e.dom.elGraphical.add(a[t]),i&&!e.globals.resized&&!e.globals.dataChanged&&e.config.chart.type!==`scatter`&&e.config.chart.type!==`bubble`&&e.globals.dataPoints>1&&o[t].classList.add(`apexcharts-element-hidden`),e.globals.delayedElements.push({el:o[t],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map((e,t)=>{this.addImage(e,t)})}drawTextAnnos(){this.w.config.annotations.texts.map((e,t)=>{this.addText(e,t)})}addXaxisAnnotation(e,t,n){this.xAxisAnnotations.addXaxisAnnotation(e,t,n)}addYaxisAnnotation(e,t,n){this.yAxisAnnotations.addYaxisAnnotation(e,t,n)}addPointAnnotation(e,t,n){this.pointsAnnotations.addPointAnnotation(e,t,n)}addText(e){let{x:t,y:n,text:r,textAnchor:i,foreColor:a,fontSize:o,fontFamily:s,fontWeight:c,cssClass:l,backgroundColor:u,borderWidth:d,strokeDashArray:f,borderRadius:p,borderColor:m,appendTo:h=`.apexcharts-svg`,paddingLeft:g=4,paddingRight:_=4,paddingBottom:v=2,paddingTop:y=2}=e,b=this.w,x=this.graphics.drawText({x:t,y:n,text:r,textAnchor:i||`start`,fontSize:o||`12px`,fontWeight:c||`regular`,fontFamily:s||b.config.chart.fontFamily,foreColor:a||b.config.chart.foreColor,cssClass:`apexcharts-text `+l?l:``}),S=b.dom.baseEl.querySelector(h);S&&S.appendChild(x.node);let C=x.bbox();if(r){let e=this.graphics.drawRect(C.x-g,C.y-y,C.width+g+_,C.height+v+y,p,u||`transparent`,1,d,m,f);S.insertBefore(e.node,x.node)}}addImage(e){let t=this.w,{path:n,x:r=0,y:i=0,width:a=20,height:o=20,appendTo:s=`.apexcharts-svg`}=e,c=t.dom.Paper.image(n);c.size(a,o).move(r,i);let l=t.dom.baseEl.querySelector(s);return l&&l.appendChild(c.node),c}addXaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`xaxis`,contextMethod:n.addXaxisAnnotation}),n}addYaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`yaxis`,contextMethod:n.addYaxisAnnotation}),n}addPointAnnotationExternal(e,t,n){return typeof this.invertAxis>`u`&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`point`,contextMethod:n.addPointAnnotation}),n}addAnnotationExternal({params:e,pushToMemory:t,context:n,type:r,contextMethod:i}){let a=n,o=a.w,s=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations`),c=s.childNodes.length+1,l=new E,u=Object.assign({},r===`xaxis`?l.xAxisAnnotation:r===`yaxis`?l.yAxisAnnotation:l.pointAnnotation),d=y.extend(u,e);switch(r){case`xaxis`:this.addXaxisAnnotation(d,s,c);break;case`yaxis`:this.addYaxisAnnotation(d,s,c);break;case`point`:this.addPointAnnotation(d,s,c);break}let f=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${c}']`),p=this.helpers.addBackgroundToAnno(f,d);return p&&s.insertBefore(p.node,f),t&&o.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:y.randomId(),method:i,label:`addAnnotation`,params:e}),n}clearAnnotations(e){let t=e.w,n=t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations`);for(let e=t.globals.memory.methodsToExec.length-1;e>=0;e--)(t.globals.memory.methodsToExec[e].label===`addText`||t.globals.memory.methodsToExec[e].label===`addAnnotation`)&&t.globals.memory.methodsToExec.splice(e,1);n=Array.from(n),Array.prototype.forEach.call(n,e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})}removeAnnotation(e,t){let n=e.w,r=n.dom.baseEl.querySelectorAll(`.${t}`);r&&(n.globals.memory.methodsToExec.map((e,r)=>{e.id===t&&n.globals.memory.methodsToExec.splice(r,1)}),Object.keys(n.config.annotations).forEach(e=>{let r=n.config.annotations[e];Array.isArray(r)&&(n.config.annotations[e]=r.filter(e=>e.id!==t))}),Array.prototype.forEach.call(r,e=>{e.parentElement.removeChild(e)}))}};X.registerFeatures({annotations:Ft});var It=class{constructor(e,t){this.w=e,this.ctx=t,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this)}init(){let e=this.w.dom.Paper.node;e&&(e.setAttribute(`tabindex`,`0`),e.addEventListener(`focus`,this._onFocus),e.addEventListener(`blur`,this._onBlur),e.addEventListener(`keydown`,this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener(`legendClick`,this._onLegendClick))}destroy(){let e=this.w,t=e.dom.Paper&&e.dom.Paper.node;t&&(t.removeEventListener(`focus`,this._onFocus),t.removeEventListener(`blur`,this._onBlur),t.removeEventListener(`keydown`,this._onKeyDown),this.ctx.events.removeEventListener(`legendClick`,this._onLegendClick))}handleKey(e){}_onFocus(){this._isNavEnabled()&&(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint())}_onBlur(){this.active=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(e){if(!(!this._isNavEnabled()||!this.active))switch(e.key){case`ArrowRight`:e.preventDefault(),this._move(0,1);break;case`ArrowLeft`:e.preventDefault(),this._move(0,-1);break;case`ArrowUp`:e.preventDefault(),this._move(-1,0);break;case`ArrowDown`:e.preventDefault(),this._move(1,0);break;case`Home`:e.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case`End`:e.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case`Enter`:case` `:e.preventDefault(),this._fireClick();break;case`Escape`:e.preventDefault(),this.active=!1,this._hideFocus();break}}_move(e,t){let n=this.w,r=n.config.chart.accessibility.keyboard.navigation.wrapAround;if(e!==0){let t=this.w.globals.tooltip;if(t&&t.tConfig&&t.tConfig.shared){let e=this.dataPointIndex;if(t.tooltipUtil&&t.tooltipUtil.isXoverlap(e)&&t.tooltipUtil.isInitialSeriesSameLen())return}let i=this._getSeriesCount(),a=this.seriesIndex+e,o=0;for(;o<i&&(a<0&&(a=r?i-1:0),a>=i&&(a=r?0:i-1),n.globals.collapsedSeriesIndices.includes(a));)a+=e,o++;this.seriesIndex=a;let s=this._getDataPointCount(a);this.dataPointIndex>=s&&(this.dataPointIndex=s-1)}if(t!==0){let e=this._getDataPointCount(this.seriesIndex),n=this.dataPointIndex+t;n<0&&(n=r?e-1:0),n>=e&&(n=r?0:e-1),this.dataPointIndex=n,t>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(t)}this._showCurrentPoint()}_skipNullForward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r+1)%n,i++;this.dataPointIndex=r}}_skipNullBackward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r-1+n)%n,i++;this.dataPointIndex=r}}_showCurrentPoint(){let{seriesIndex:e,dataPointIndex:t}=this,n=this.w,r=n.globals.tooltip;!r||!r.ttItems||(n.interact.capturedSeriesIndex=e,n.interact.capturedDataPointIndex=t,this._applyFocusClass(e,t),this._showTooltip(e,t,r))}_hideFocus(){let e=this.w,t=e.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!t)return;t.marker&&t.marker.resetPointsSize(),this._enlargedScatterMarker=null;let n=t.getElTooltip();n&&(n.classList.remove(`apexcharts-active`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&n.setAttribute(`aria-hidden`,`true`)),e.dom.baseEl.classList.remove(`apexcharts-tooltip-active`);let r=t.getElXCrosshairs();r&&r.classList.remove(`apexcharts-active`)}_showTooltip(e,t,n){let r=this.w,i=r.config.chart.type,a=n.getElTooltip();if(!a)return;let o=n.getCachedDimensions();n.tooltipRect={x:0,y:0,ttWidth:o.ttWidth||0,ttHeight:o.ttHeight||0},this._setSyntheticEvent(e,t,n),r.dom.baseEl.classList.add(`apexcharts-tooltip-active`),a.classList.add(`apexcharts-active`),r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&a.removeAttribute(`aria-hidden`),i===`pie`||i===`donut`||i===`polarArea`?this._showTooltipNonAxis(e,t,n,a):i===`radialBar`?this._showTooltipRadialBar(e,t,n,a):i===`heatmap`||i===`treemap`?this._showTooltipHeatTree(e,t,n,a,i):i===`bar`||i===`candlestick`||i===`boxPlot`||i===`rangeBar`?this._showTooltipBar(e,t,n):this._showTooltipAxisLine(e,t,n)}_setSyntheticEvent(e,t,n){let r=this.w,i=r.config.chart.type,a=0,o=0,s=this._getFocusableElement(e,t);if(s){let e=s.getBoundingClientRect();a=e.left+e.width/2,o=e.top+e.height/2}else if(r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}else{let e=r.dom.Paper&&r.dom.Paper.node;if(e){let t=e.getBoundingClientRect();a=t.left+t.width/2,o=t.top+t.height/2}}if((i===`line`||i===`area`||i===`rangeArea`||i===`scatter`||i===`bubble`||i===`radar`)&&r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}n.e={type:`mousemove`,clientX:a,clientY:o}}_showTooltipBar(e,t,n){let r=this.w,i=n.tConfig.shared&&(n.tooltipUtil.isXoverlap(t)||r.globals.isBarHorizontal)&&n.tooltipUtil.isInitialSeriesSameLen(),a=r.rangeData.seriesRange?.[e]?.[t]?.y?.[0];n.tooltipLabels.drawSeriesTexts(c(s(s({ttItems:n.ttItems,i:e,j:t},a?.y1!==void 0&&{y1:a.y1}),a?.y2!==void 0&&{y2:a.y2}),{shared:i}));let o=`.apexcharts-series[data\\:realIndex='${e}']`,l=r.dom.Paper.findOne(`${o} path[j='${t}'], ${o} circle[j='${t}'], ${o} rect[j='${t}']`);if(l&&(this._leaveHoveredBar(),new I(this.w,this.ctx).pathMouseEnter(l,null),this._hoveredBarEl=l),r.globals.isBarHorizontal){let e=l&&l.node;if(e){let t=r.dom.elWrap.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.left-t.left,o=i.top-t.top,s=i.height,c=i.width,l=n.tooltipRect.ttWidth||0,u=n.tooltipRect.ttHeight||0,d=o+s/2-u/2,f=a+c;a<(n.xyRatios&&n.xyRatios.baseLineInvertedY!=null?n.xyRatios.baseLineInvertedY:t.width/2)&&(f=a-l);let p=n.getElTooltip();p&&(p.style.left=f+`px`,p.style.top=d+`px`)}}else n.tooltipPosition.moveStickyTooltipOverBars(t,e)}_showTooltipAxisLine(e,t,n){let r=this.w,i=r.config.chart.type,a=n.tConfig.shared&&n.tooltipUtil.isXoverlap(t)&&n.tooltipUtil.isInitialSeriesSameLen();n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:a});let o=i===`scatter`||i===`bubble`,s=r.globals.markers.largestSize>0;o?this._showScatterBubblePoint(e,t,n):s?a?n.marker.enlargePoints(t):n.tooltipPosition.moveDynamicPointOnHover(t,e):a?n.tooltipPosition.moveDynamicPointsOnHover(t):n.tooltipPosition.moveDynamicPointOnHover(t,e)}_showScatterBubblePoint(e,t,n){let r=this.w.dom.baseEl;this._enlargedScatterMarker&&=(n.marker.oldPointSize(this._enlargedScatterMarker),null);let i=r.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`);if(!i)return;let a=i.querySelector(`.apexcharts-marker[rel='${t}']`);a&&(n.marker.enlargeCurrentPoint(t,a),this._enlargedScatterMarker=a)}_showTooltipNonAxis(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:t,shared:!1});let a=r.getBoundingClientRect(),o=a.width||n.tooltipRect.ttWidth||0,s=a.height||n.tooltipRect.ttHeight||0,c=i.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${t}']`);if(c){let e=parseFloat(c.getAttribute(`data:cx`)),t=parseFloat(c.getAttribute(`data:cy`));if(!isNaN(e)&&!isNaN(t)){let n=i.dom.Paper.node.getBoundingClientRect(),a=i.dom.elWrap.getBoundingClientRect(),c=n.left-a.left,l=n.top-a.top;r.style.left=c+e-o/2+`px`,r.style.top=l+t-s-10+`px`}}}_showTooltipRadialBar(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,shared:!1});let{ttWidth:a=0,ttHeight:o=0}=n.getCachedDimensions(),s=i.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`);if(s){let t=parseFloat(s.getAttribute(`data:angle`))||0,n=(i.config.plotOptions.radialBar.startAngle||0)+t/2,c=i.layout.gridWidth/2,l=i.layout.gridHeight/2,u=i.globals.radialSize||Math.min(i.layout.gridWidth,i.layout.gridHeight)/2,d=i.seriesData.series.length,f=u/Math.max(d,1),p=u-e*f,m=(p+(p-f))/2,h=y.polarToCartesian(c,l,m,n),g=h.x+(i.layout.translateX||0),_=h.y+(i.layout.translateY||0);r.style.left=g-a/2+`px`,r.style.top=_-o-10+`px`}}_showTooltipHeatTree(e,t,n,r,i){let a=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:!1});let o=r.getBoundingClientRect(),s=o.width||n.tooltipRect.ttWidth||0,c=o.height||n.tooltipRect.ttHeight||0,l=i===`heatmap`?`apexcharts-heatmap-rect`:`apexcharts-treemap-rect`,u=a.dom.baseEl.querySelector(`.${l}[i='${e}'][j='${t}']`);if(u){let e=a.dom.elWrap.getBoundingClientRect(),t=u.getBoundingClientRect(),i=t.left-e.left,o=t.top-e.top,l=t.width,d=t.height,f=parseFloat(u.getAttribute(`cx`)),p=parseFloat(u.getAttribute(`width`));n.tooltipPosition.moveXCrosshairs(f+p/2);let m=i+l+s/2,h=o+d/2-c/2;i+l>a.layout.gridWidth/2&&(m=i-s/2),r.style.left=m+`px`,r.style.top=h+`px`}}_applyFocusClass(e,t){this._removeFocusClass();let n=this._getFocusableElement(e,t);n&&(n.classList.add(`apexcharts-keyboard-focused`),this._focusedEl=n)}_removeFocusClass(){this._focusedEl&&=(this._focusedEl.classList.remove(`apexcharts-keyboard-focused`),null)}_leaveHoveredBar(){this._hoveredBarEl&&=(new I(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),null)}_getFocusableElement(e,t){let n=this.w,r=n.config.chart.type,i=n.dom.baseEl;return r===`pie`||r===`donut`||r===`polarArea`?i.querySelector(`.apexcharts-pie-area[j='${t}']`):r===`heatmap`?i.querySelector(`.apexcharts-heatmap-rect[i='${e}'][j='${t}']`):r===`treemap`?i.querySelector(`.apexcharts-treemap-rect[i='${e}'][j='${t}']`):r===`radialBar`?i.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`):r===`bar`||r===`candlestick`||r===`boxPlot`||r===`rangeBar`?i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`):i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker[rel='${t}']`)||null}_fireClick(){let e=this.w.globals.tooltip;e&&e.markerClick({type:`mouseup`,clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){let e=this.w.config.chart.accessibility;return e.enabled&&e.keyboard.enabled&&e.keyboard.navigation.enabled}_getSeriesCount(){let e=this.w,t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`?1:e.seriesData.series.length}_getDataPointCount(e){let t=this.w,n=t.config.chart.type;if(n===`pie`||n===`donut`||n===`polarArea`)return t.seriesData.series.length;let r=t.seriesData.series;return r[e]&&Array.isArray(r[e])?r[e].length:0}_clampCursor(){let e=this._getSeriesCount();this.seriesIndex>=e&&(this.seriesIndex=e-1),this.seriesIndex<0&&(this.seriesIndex=0);let t=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=t&&(this.dataPointIndex=t-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){let e=this.w,t=e.globals,n=this.seriesIndex;if(!e.interact.zoomed)return;let r=e.seriesData.seriesX&&e.seriesData.seriesX[n];if(!r||!r.length)return;let i=t.minX,a=t.maxX;if(i===void 0||a===void 0)return;let o=r[this.dataPointIndex];if(o>=i&&o<=a)return;let s=r.length;for(let e=0;e<s;e++)if(r[e]>=i&&r[e]<=a){this.dataPointIndex=e;return}}_snapToVisibleRangeInDirection(e){let t=this.w,n=t.globals,r=this.seriesIndex,i=t.seriesData.seriesX&&t.seriesData.seriesX[r];if(!i||!i.length)return;let a=n.minX,o=n.maxX;if(a===void 0||o===void 0)return;let s=i.length;if(e>=0){for(let e=0;e<s;e++)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}else for(let e=s-1;e>=0;e--)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}_isDataPointVisible(e,t){let n=this.w,r=n.globals;if(!n.interact.zoomed)return!0;let i=n.seriesData.seriesX&&n.seriesData.seriesX[e];if(!i)return!0;let a=i[t];return a===void 0?!0:a>=r.minX&&a<=r.maxX}};X.registerFeatures({keyboardNavigation:It});var Lt=class{constructor(e){this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||=this.w.config.dataLabels.formatter}handleBarDataLabels(e){let{x:t,y:n,y1:r,y2:i,i:a,j:o,realIndex:l,columnGroupIndex:u,series:d,barHeight:f,barWidth:p,barXPosition:m,barYPosition:h,visibleSeries:g}=e,_=this.w,v=new I(this.barCtx.w),y=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[l]:this.barCtx.strokeWidth,b,x;_.axisFlags.isXNumeric&&!_.globals.isBarHorizontal?(b=t+parseFloat(p*(g+1)),x=n+parseFloat(f*(g+1))-y):(b=t+parseFloat(p*g),x=n+parseFloat(f*g));let S=null,C=null,w=t,T=n,E={},D=_.config.dataLabels,O=this.barCtx.barOptions.dataLabels,k=this.barCtx.barOptions.dataLabels.total;typeof h<`u`&&this.barCtx.isRangeBar&&(x=h,T=h),typeof m<`u`&&this.barCtx.isVerticalGroupedRangeBar&&(b=m,w=m);let A=D.offsetX,j=D.offsetY,M={width:0,height:0};if(_.config.dataLabels.enabled){let e=_.seriesData.series[a][o];M=v.getTextRects(_.config.dataLabels.formatter?_.config.dataLabels.formatter(e,c(s({},_),{seriesIndex:a,dataPointIndex:o,w:_})):_.formatters.yLabelFormatters[0](e),parseFloat(D.style.fontSize))}let N={x:t,y:n,i:a,j:o,realIndex:l,columnGroupIndex:u,bcx:b,bcy:x,barHeight:f,barWidth:p,textRects:M,strokeWidth:y,dataLabelsX:w,dataLabelsY:T,dataLabelsConfig:D,barDataLabelsConfig:O,barTotalDataLabelsConfig:k,offX:A,offY:j};return E=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(N):this.calculateColumnsDataLabelsPosition(N),S=this.drawCalculatedDataLabels({x:E.dataLabelsX,y:E.dataLabelsY,val:this.barCtx.isRangeBar?[r,i]:_.config.chart.stackType===`100%`?d[l][o]:_.seriesData.series[l][o],i:l,j:o,barWidth:p,barHeight:f,textRects:M,dataLabelsConfig:D}),_.config.chart.stacked&&k.enabled&&(C=this.drawTotalDataLabels({x:E.totalDataLabelsX,y:E.totalDataLabelsY,barWidth:p,barHeight:f,realIndex:l,textAnchor:E.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:l,j:o}),dataLabelsConfig:D,barTotalDataLabelsConfig:k})),{dataLabelsPos:E,dataLabels:S,totalDataLabels:C}}getStackedTotalDataLabel({realIndex:e,j:t}){let n=this.w,r=this.barCtx.stackedSeriesTotals[t];return this.totalFormatter&&(r=this.totalFormatter(r,c(s({},n),{seriesIndex:e,dataPointIndex:t,w:n}))),r}calculateColumnsDataLabelsPosition(e){let t=this.w,{i:n,j:r,realIndex:i,y:a,bcx:o,barWidth:s,barHeight:c,textRects:l,dataLabelsX:u,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,strokeWidth:h,offX:g,offY:_}=e,v,y,b=o;c=Math.abs(c);let x=t.config.plotOptions.bar.dataLabels.orientation===`vertical`,{zeroEncounters:S}=this.barCtx.barHelpers.getZeroValueEncounters({i:n,j:r});o-=h/2;let C=t.layout.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?u+=s/2:(u=t.axisFlags.isXNumeric?o-s/2+g:o-C+s/2+g,!t.config.chart.stacked&&S>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=s*S)),x&&(u=u+l.height/2-h/2-2);let w=t.seriesData.series[n][r]<0,T=a;switch(this.barCtx.isReversed&&(T=a+(w?c:-c)),p.position){case`center`:d=x?w?T-c/2+_:T+c/2-_:w?T-c/2+l.height/2+_:T+c/2+l.height/2-_;break;case`bottom`:d=x?w?T-c+_:T+c-_:w?T-c+l.height+h+_:T+c-l.height/2+h-_;break;case`top`:d=x?w?T+_:T-_:w?T-l.height/2-_:T+l.height+_;break}let E=T;if(t.labelData.seriesGroups.forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevY.forEach(e=>{E=w?Math.max(e[r],E):Math.min(e[r],E)})}),this.barCtx.lastActiveBarSerieIndex===i&&m.enabled){let e=new I(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:i,j:r}),f.fontSize);v=w?E-e.height/2-_-m.offsetY+18:E+e.height+_+m.offsetY-18;let n=C;y=b+(t.axisFlags.isXNumeric?-s*t.globals.barGroups.length/2:t.globals.barGroups.length*s/2-(t.globals.barGroups.length-1)*s-n)+m.offsetX}return t.config.chart.stacked||(d<0?d=0+h:d+l.height/3>t.layout.gridHeight&&(d=t.layout.gridHeight-h)),{bcx:o,bcy:a,dataLabelsX:u,dataLabelsY:d,totalDataLabelsX:y,totalDataLabelsY:v,totalDataLabelsAnchor:`middle`}}calculateBarsDataLabelsPosition(e){let t=this.w,{x:n,i:r,j:i,realIndex:a,bcy:o,barHeight:s,barWidth:c,textRects:l,dataLabelsX:u,strokeWidth:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,offX:h,offY:g}=e,_=t.layout.gridHeight/t.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});c=Math.abs(c);let y=o-(this.barCtx.isRangeBar?0:_)+s/2+l.height/2+g-3;!t.config.chart.stacked&&v>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=s*v);let b,x,S=`start`,C=t.seriesData.series[r][i]<0,w=n;switch(this.barCtx.isReversed&&(w=n+(C?-c:c),S=C?`start`:`end`),p.position){case`center`:u=C?w+c/2-h:Math.max(l.width/2,w-c/2)+h;break;case`bottom`:u=C?w+c-d-h:w-c+d+h;break;case`top`:u=C?w-d-h:w-d+h;break}let T=w;if(t.labelData.seriesGroups.forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevX.forEach(e=>{T=C?Math.min(e[i],T):Math.max(e[i],T)})}),this.barCtx.lastActiveBarSerieIndex===a&&m.enabled){let e=new I(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);C?(b=T-d-h-m.offsetX,S=`end`):b=T+h+m.offsetX+(this.barCtx.isReversed?-(c+d):d),x=y-l.height/2+e.height/2+m.offsetY+d,t.globals.barGroups.length>1&&(x-=t.globals.barGroups.length/2*(s/2))}return t.config.chart.stacked||(f.textAnchor===`start`?u-l.width<0?u=C?l.width+d:d:u+l.width>t.layout.gridWidth&&(u=C?t.layout.gridWidth-d:t.layout.gridWidth-l.width-d):f.textAnchor===`middle`?u-l.width/2<0?u=l.width/2+d:u+l.width/2>t.layout.gridWidth&&(u=t.layout.gridWidth-l.width/2-d):f.textAnchor===`end`&&(u<1?u=l.width+d:u+1>t.layout.gridWidth&&(u=t.layout.gridWidth-l.width-d))),{bcx:n,bcy:o,dataLabelsX:u,dataLabelsY:y,totalDataLabelsX:b,totalDataLabelsY:x,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:e,y:t,val:n,i:r,j:i,textRects:a,barHeight:o,barWidth:l,dataLabelsConfig:u}){let d=this.w,f=`rotate(0)`;d.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(f=`rotate(-90, ${e}, ${t})`);let p=new V(this.barCtx.w,this.barCtx.ctx),m=new I(this.barCtx.w),h=u.formatter,g=null,_=d.globals.collapsedSeriesIndices.indexOf(r)>-1;if(u.enabled&&!_){g=m.group({class:`apexcharts-data-labels`,transform:f});let _=``;typeof n<`u`&&(_=h(n,c(s({},d),{seriesIndex:r,dataPointIndex:i,w:d}))),!n&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(_=``);let v=d.seriesData.series[r][i]<0,y=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(y===`top`&&(v?u.textAnchor=`end`:u.textAnchor=`start`),y===`center`&&(u.textAnchor=`middle`),y===`bottom`&&(v?u.textAnchor=`end`:u.textAnchor=`start`)),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&l<m.getTextRects(_,parseFloat(u.style.fontSize)).width&&(_=``),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(l)&&(_=``):a.height/1.6>Math.abs(o)&&(_=``));let b=s({},u);this.barCtx.isHorizontal&&n<0&&(u.textAnchor===`start`?b.textAnchor=`end`:u.textAnchor===`end`&&(b.textAnchor=`start`)),p.plotDataLabelsText({x:e,y:t,text:_,i:r,j:i,parent:g,dataLabelsConfig:b,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}drawTotalDataLabels({x:e,y:t,val:n,realIndex:r,textAnchor:i,barTotalDataLabelsConfig:a}){let o=new I(this.barCtx.w),s;return a.enabled&&typeof e<`u`&&typeof t<`u`&&this.barCtx.lastActiveBarSerieIndex===r&&(s=o.drawText({x:e,y:t,foreColor:a.style.color,text:n,textAnchor:i,fontFamily:a.style.fontFamily,fontSize:a.style.fontSize,fontWeight:a.style.fontWeight})),s}},Rt=class{constructor(e){this.w=e.w,this.barCtx=e}initVariables(e){let t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let n=0;n<e.length;n++)if(e[n].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),t.axisFlags.isXNumeric)for(let r=0;r<e[n].length;r++)t.seriesData.seriesX[n][r]>t.globals.minX&&t.seriesData.seriesX[n][r]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(t.seriesData.series),y.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(e=>e.map(e=>`none`))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],t.globals.comboCharts||this.checkZeroSeries({series:e})}initialPositions(e){let t=this.w,n,r,i,a,o,s,c,l,u=t.globals.dataPoints;this.barCtx.isRangeBar&&(u=t.labelData.labels.length);let d=this.barCtx.seriesLen;if(t.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)i=t.layout.gridHeight/u,o=i/d,t.axisFlags.isXNumeric&&(i=t.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf(`%`)===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+t.globals.padHorizontal+(this.barCtx.isReversed?t.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(l=t.layout.gridWidth/2),r=(i-o*this.barCtx.seriesLen)/2;else{if(a=t.layout.gridWidth/this.barCtx.visibleItems,t.config.xaxis.convertedCatToNumeric&&(a=t.layout.gridWidth/t.globals.dataPoints),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,t.axisFlags.isXNumeric){let e=this.barCtx.xRatio;t.globals.minXDiff&&t.globals.minXDiff!==.5&&t.globals.minXDiff/e>0&&(a=t.globals.minXDiff/e),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,s<1&&(s=1)}String(this.barCtx.barOptions.columnWidth).indexOf(`%`)===-1&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),c=t.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?t.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),n=t.axisFlags.isXNumeric?this.barCtx.getBarXForNumericXAxis({x:n,j:0,realIndex:e,barWidth:s}).x:t.globals.padHorizontal+y.noExponents(a-s*this.barCtx.seriesLen)/2}return t.globals.barHeight=o,t.globals.barWidth=s,{x:n,y:r,yDivision:i,xDivision:a,barHeight:o,barWidth:s,zeroH:c,zeroW:l}}initializeStackedPrevVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}initializeStackedXYVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}getPathFillColor(e,t,n,r){var i;let a=this.w,o=new z(this.barCtx.w),s=null,c=this.barCtx.barOptions.distributed?n:t,l=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(r=>{e[t][n]>=r.from&&e[t][n]<=r.to&&(s=r.color,l=!0)}),{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?c:r,dataPointIndex:n,color:s,value:e[t][n],fillConfig:a.config.series[t].data[n]?.fill,fillType:(i=a.config.series[t].data[n]?.fill)!=null&&i.type?a.config.series[t].data[n]?.fill.type:Array.isArray(a.config.fill.type)?a.config.fill.type[r]:a.config.fill.type}),useRangeColor:l}}getStrokeWidth(e,t,n){let r=0,i=this.w;return typeof this.barCtx.series[e][t]>`u`||this.barCtx.series[e][t]===null||i.config.chart.type===`bar`&&!this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),r}createBorderRadiusArr(e){let t=this.w,n=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,r=e.length,i=e[0]?.length|0,a=Array.from({length:r},()=>Array(i).fill(n?`top`:`none`));if(n)return a;let o=this.w.config.chart.type;for(let t=0;t<i;t++){let n=[],s=[],c=0;for(let i=0;i<r;i++){let r=e[i][t];r>0?(n.push(i),c++):r<0&&(s.push(i),c++)}if(n.length>0&&s.length===0)if(n.length===1)a[n[0]][t]=o===`bar`&&i===1?`top`:`both`;else{let e=n[0],r=n[n.length-1];for(let s of n)s===e?a[s][t]=o===`bar`&&i===1?`top`:`bottom`:s===r?a[s][t]=`top`:a[s][t]=`none`}else if(s.length>0&&n.length===0)if(s.length===1)a[s[0]][t]=`both`;else{let e=Math.max(...s),n=Math.min(...s);for(let r of s)r===e?a[r][t]=`bottom`:r===n?a[r][t]=`top`:a[r][t]=`none`}else if(n.length>0&&s.length>0){let e=n[n.length-1];for(let r of n)r===e?a[r][t]=`top`:a[r][t]=`none`;let r=Math.max(...s);for(let e of s)e===r?a[e][t]=`bottom`:a[e][t]=`none`}else if(c===1){let e=n[0]||s[0];a[e][t]=`both`}}return a}barBackground({j:e,i:t,x1:n,x2:r,y1:i,y2:a,elSeries:o}){let s=this.w,c=new I(this.barCtx.w),l=new W(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&l===t){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);let t=this.barCtx.barOptions.colors.backgroundBarColors[e],l=c.drawRect(typeof n<`u`?n:0,typeof i<`u`?i:0,typeof r<`u`?r:s.layout.gridWidth,typeof a<`u`?a:s.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,t,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(l),l.node.classList.add(`apexcharts-backgroundBar`)}}getColumnPaths({barWidth:e,barXPosition:t,y1:n,y2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){var f;let p=new I(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let m=e,h=t;(f=d.config.series[c].data[u])!=null&&f.columnWidthOffset&&(h=t-d.config.series[c].data[u].columnWidthOffset/2,m=e+d.config.series[c].data[u].columnWidthOffset);let g=i/2,_=h+g,v=h+m-g,y=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001-g*y,r+=.001+g*y;let b=p.move(_,n),x=p.move(_,n),S=p.line(v,n);if(d.globals.previousPaths.length>0&&(x=this.barCtx.getPreviousPath(c,u,!1)),b=b+p.line(_,r)+p.line(v,r)+S+(d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`),x=x+p.line(_,n)+S+S+S+S+S+p.line(_,n)+(d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`),this.arrBorderRadius[c][u]!==`none`&&(b=p.roundPathCorners(b,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.yArrj.push(r-g*y),e.yArrjF.push(Math.abs(n-r+i*y)),e.yArrjVal.push(this.barCtx.series[l][u])}return{pathTo:b,pathFrom:x}}getBarpaths({barYPosition:e,barHeight:t,x1:n,x2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){var f;let p=new I(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let m=e,h=t;(f=d.config.series[c].data[u])!=null&&f.barHeightOffset&&(m=e-d.config.series[c].data[u].barHeightOffset/2,h=t+d.config.series[c].data[u].barHeightOffset);let g=i/2,_=m+g,v=m+h-g,y=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001+g*y,r+=.001-g*y;let b=p.move(n,_),x=p.move(n,_);d.globals.previousPaths.length>0&&(x=this.barCtx.getPreviousPath(c,u,!1));let S=p.line(n,v);if(b=b+p.line(r,_)+p.line(r,v)+S+(d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`),x=x+p.line(n,_)+S+S+S+S+S+p.line(n,_)+(d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`),this.arrBorderRadius[c][u]!==`none`&&(b=p.roundPathCorners(b,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.xArrj.push(r+g*y),e.xArrjF.push(Math.abs(n-r-i*y)),e.xArrjVal.push(this.barCtx.series[l][u])}return{pathTo:b,pathFrom:x}}checkZeroSeries({series:e}){let t=this.w;for(let n=0;n<e.length;n++){let r=0;for(let i=0;i<e[t.globals.maxValsInArrayIndex].length;i++)r+=e[n][i];r===0&&this.barCtx.zeroSerieses.push(n)}}getXForValue(e,t,n=!0){let r=n?t:null;return typeof e<`u`&&e!==null&&(r=t+e/this.barCtx.invertedYRatio-(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)*2),r}getYForValue(e,t,n,r=!0){let i=r?t:null;return typeof e<`u`&&e!==null&&(i=t-e/this.barCtx.yRatio[n]+(this.barCtx.isReversed?e/this.barCtx.yRatio[n]:0)*2),i}getGoalValues(e,t,n,r,i,a){let o=this.w,l=[],u=(r,i)=>{l.push({[e]:e===`x`?this.getXForValue(r,t,!1):this.getYForValue(r,n,a,!1),attrs:i})};if(o.seriesData.seriesGoals[r]&&o.seriesData.seriesGoals[r][i]&&Array.isArray(o.seriesData.seriesGoals[r][i])&&o.seriesData.seriesGoals[r][i].forEach(e=>{u(e.value,e)}),this.barCtx.barOptions.isDumbbell&&o.rangeData.seriesRange.length){let t=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,n={strokeHeight:e===`x`?0:o.globals.markers.size[r],strokeWidth:e===`x`?o.globals.markers.size[r]:0,strokeDashArray:0,strokeLineCap:`round`,strokeColor:Array.isArray(t[r])?t[r][0]:t[r]};u(o.rangeData.seriesRangeStart[r][i],n),u(o.rangeData.seriesRangeEnd[r][i],c(s({},n),{strokeColor:Array.isArray(t[r])?t[r][1]:t[r]}))}return l}drawGoalLine({barXPosition:e,barYPosition:t,goalX:n,goalY:r,barWidth:i,barHeight:a}){let o=new I(this.barCtx.w),s=o.group({className:`apexcharts-bar-goals-groups`});s.node.classList.add(`apexcharts-element-hidden`),this.barCtx.w.globals.delayedElements.push({el:s.node}),s.attr(`clip-path`,`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach(e=>{if(e.x>=-1&&e.x<=o.w.layout.gridWidth+1){let n=typeof e.attrs.strokeHeight<`u`?e.attrs.strokeHeight:a/2,r=t+n+a/2;c=o.drawLine(e.x,r-n*2,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),s.add(c)}}):Array.isArray(r)&&r.forEach(t=>{if(t.y>=-1&&t.y<=o.w.layout.gridHeight+1){let n=typeof t.attrs.strokeWidth<`u`?t.attrs.strokeWidth:i/2,r=e+n+i/2;c=o.drawLine(r-n*2,t.y,r,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),s.add(c)}}),s}drawBarShadow({prevPaths:e,currPaths:t,color:n,realIndex:r,j:i}){let a=this.w,{x:o,x1:s,barYPosition:c}=e,{x:l,x1:u,barYPosition:d}=t,f=c+t.barHeight,p=new I(this.barCtx.w),m=new y,h=p.move(s,f)+p.line(o,f)+p.line(l,d)+p.line(u,d)+p.line(s,f)+(a.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[r][i]===`both`?` Z`:` z`);return p.drawPath({d:h,fill:m.shadeColor(.5,y.rgb2hex(n)),stroke:`none`,strokeWidth:0,fillOpacity:1,classes:`apexcharts-bar-shadow apexcharts-decoration-element`})}getZeroValueEncounters({i:e,j:t}){let n=this.w,r=0,i=0;return(n.config.plotOptions.bar.horizontal?n.seriesData.series.map((e,t)=>t):n.globals.columnSeries?.i.map(e=>e)||[]).forEach(a=>{let o=n.globals.seriesPercent[a][t];o&&r++,a<e&&o===0&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getGroupIndex(e){let t=this.w,n=t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1),r=this.barCtx.columnGroupIndices,i=r.indexOf(n);return i<0&&(r.push(n),i=r.length-1),{groupIndex:n,columnGroupIndex:i}}},Z=class{constructor(e,t,n){this.ctx=t,this.w=e,this.barOptions=e.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=e.config.stroke.width,this.isNullValue=!1,this.isRangeBar=e.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.rangeData.seriesRange.length&&e.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=n,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];let r=new W(this.w);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex(`desc`,[`bar`,`column`]),this.columnGroupIndices=[];let i=r.getBarSeriesIndices(),a=new N(this.w);this.stackedSeriesTotals=a.getStackedSeriesTotals(this.w.config.series.map((e,t)=>i.indexOf(t)===-1?t:-1).filter(e=>e!==-1)),this.barHelpers=new Rt(this)}draw(e,t){let n=this.w,r=new I(this.w),i=new N(this.w);e=i.getLogSeries(e),this.series=e,this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let a=r.group({class:`apexcharts-bar-series apexcharts-plot-series`});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn(`WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts`);for(let i=0,o=0;i<e.length;i++,o++){let l,u,d=[],f=[],p=n.globals.comboCharts?t[i]:i,{columnGroupIndex:m}=this.barHelpers.getGroupIndex(p),h=r.group({class:`apexcharts-series`,rel:i+1,seriesName:y.escapeString(n.seriesData.seriesNames[p]),"data:realIndex":p});W.addCollapsedClassToSeries(this.w,h,p),e[i].length>0&&(this.visibleI+=1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[p],this.translationsIndex=p);let g=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;let _=this.barHelpers.initialPositions(p),{y:v,yDivision:b,zeroW:x,x:S,xDivision:C,zeroH:w}=_,T=_.barHeight,E=_.barWidth;u=v,l=S,this.isHorizontal||f.push(l+E/2);let D=r.group({class:`apexcharts-datalabels`,"data:realIndex":p});n.globals.delayedElements.push({el:D.node}),D.node.classList.add(`apexcharts-element-hidden`);let O=r.group({class:`apexcharts-bar-goals-markers`}),k=r.group({class:`apexcharts-bar-shadows`});n.globals.delayedElements.push({el:k.node}),k.node.classList.add(`apexcharts-element-hidden`);for(let t=0;t<e[i].length;t++){let r=this.barHelpers.getStrokeWidth(i,t,p),a=null,_={indexes:{i,j:t,realIndex:p,translationsIndex:g,bc:o},x:l,y:u,strokeWidth:r,elSeries:h};this.isHorizontal?(a=this.drawBarPaths(c(s({},_),{barHeight:T,zeroW:x,yDivision:b})),E=this.series[i][t]/this.invertedYRatio):(a=this.drawColumnPaths(c(s({},_),{xDivision:C,barWidth:E,zeroH:w})),T=this.series[i][t]/this.yRatio[g]);let v=this.barHelpers.getPathFillColor(e,i,t,p);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&t>0){let e=this.barHelpers.drawBarShadow({color:typeof v.color==`string`&&v.color?.indexOf(`url`)===-1?v.color:y.hexToRgba(n.globals.colors[i]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:a,realIndex:p,j:t});k.add(e),n.config.chart.dropShadow.enabled&&new F(this.w).dropShadow(e,n.config.chart.dropShadow,p)}this.pathArr.push(a);let S=this.barHelpers.drawGoalLine({barXPosition:a.barXPosition,barYPosition:a.barYPosition,goalX:a.goalX,goalY:a.goalY,barHeight:T,barWidth:E});S&&O.add(S),u=a.y,l=a.x,t>0&&f.push(l+E/2),d.push(u),this.renderSeries(c(s({realIndex:p,pathFill:v.color},v.useRangeColor?{lineFill:v.color}:{}),{j:t,i,columnGroupIndex:m,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:r,elSeries:h,x:l,y:u,series:e,barHeight:Math.abs(a.barHeight?a.barHeight:T),barWidth:Math.abs(a.barWidth?a.barWidth:E),elDataLabelsWrap:D,elGoalsMarkers:O,elBarShadows:k,visibleSeries:this.visibleI,type:`bar`}))}n.globals.seriesXvalues[p]=f,n.globals.seriesYvalues[p]=d,a.add(h)}return a}renderSeries({realIndex:e,pathFill:t,lineFill:n,j:r,i,columnGroupIndex:a,pathFrom:o,pathTo:s,strokeWidth:c,elSeries:l,x:u,y:d,y1:f,y2:p,series:m,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,elDataLabelsWrap:y,elGoalsMarkers:b,elBarShadows:x,visibleSeries:S,type:C,classes:w}){let T=this.w,E=new I(this.w,this.ctx),D=!1;if(l._bindingsDelegated||(l._bindingsDelegated=!0,E.setupEventDelegation(l,`.apexcharts-${C}-area`)),!n){let t=typeof T.globals.stroke.colors[e]==`function`?function(e){let t=T.config.stroke.colors,n;return Array.isArray(t)&&t.length>0&&(n=t[e],n||=``,typeof n==`function`)?n({value:T.seriesData.series[e][r],dataPointIndex:r,w:T}):n}(e):T.globals.stroke.colors[e];n=this.barOptions.distributed?T.globals.stroke.colors[r]:t}let O=new Lt(this).handleBarDataLabels({x:u,y:d,y1:f,y2:p,i,j:r,series:m,realIndex:e,columnGroupIndex:a,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,visibleSeries:S});T.globals.isBarHorizontal||(O.dataLabelsPos.dataLabelsX+Math.max(g,T.globals.barPadForNumericAxis)<0||O.dataLabelsPos.dataLabelsX-Math.max(g,T.globals.barPadForNumericAxis)>T.layout.gridWidth)&&(D=!0),T.config.series[i].data[r]&&T.config.series[i].data[r].strokeColor&&(n=T.config.series[i].data[r].strokeColor),this.isNullValue&&(t=`none`);let k=r/T.config.chart.animations.animateGradually.delay*(T.config.chart.animations.speed/T.globals.dataPoints)/2.4;if(!D){let a=E.renderPaths({i,j:r,realIndex:e,pathFrom:o,pathTo:s,stroke:n,strokeWidth:c,strokeLineCap:T.config.stroke.lineCap,fill:t,animationDelay:k,initialSpeed:T.config.chart.animations.speed,dataChangeSpeed:T.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${C}-area ${w}`,chartType:C,bindEventsOnPaths:!1});a.attr(`clip-path`,`url(#gridRectBarMask${T.globals.cuid})`);let u=T.config.forecastDataPoints;u.count>0&&r>=T.globals.dataPoints-u.count&&(a.node.setAttribute(`stroke-dasharray`,u.dashArray),a.node.setAttribute(`stroke-width`,u.strokeWidth),a.node.setAttribute(`fill-opacity`,u.fillOpacity)),typeof f<`u`&&typeof p<`u`&&(a.attr(`data-range-y1`,f),a.attr(`data-range-y2`,p)),new F(this.w).setSelectionFilter(a,e,r),l.add(a),a.attr({cy:O.dataLabelsPos.bcy,cx:O.dataLabelsPos.bcx,j:r,val:T.seriesData.series[i][r],barHeight:h,barWidth:g}),O.dataLabels!==null&&y.add(O.dataLabels),O.totalDataLabels&&y.add(O.totalDataLabels),l.add(y),b&&l.add(b),x&&l.add(x)}return l}drawBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,yDivision:o,elSeries:s}){let c=this.w,l=e.i,u=e.j,d;if(c.axisFlags.isXNumeric)a=(c.seriesData.seriesX[l][u]-c.globals.minX)/this.invertedXRatio-t,d=a+t*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:l,j:u});e>0&&(t=this.seriesLen*t/e),d=a+t*this.visibleI,d-=t*n}else d=a+t*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[l][u],r)-r)/2),i=this.barHelpers.getXForValue(this.series[l][u],r);let f=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:r,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,i:l,j:u,w:c});return c.axisFlags.isXNumeric||(a+=o),this.barHelpers.barBackground({j:u,i:l,y1:d-t*this.visibleI,y2:t*this.seriesLen,elSeries:s}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:i,y:a,goalX:this.barHelpers.getGoalValues(`x`,r,null,l,u),barYPosition:d,barHeight:t}}drawColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,strokeWidth:o,elSeries:s}){let c=this.w,l=e.realIndex,u=e.translationsIndex,d=e.i,f=e.j,p=e.bc,m;if(c.axisFlags.isXNumeric){let e=this.getBarXForNumericXAxis({x:t,j:f,realIndex:l,barWidth:i});t=e.x,m=e.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:d,j:f});e>0&&(i=this.seriesLen*i/e),m=t+i*this.visibleI,m-=i*n}else m=t+i*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][f],a,u);let h=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:i,y1:a,y2:n,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:l,i:d,j:f,w:c});return c.axisFlags.isXNumeric||(t+=r),this.barHelpers.barBackground({bc:p,j:f,i:d,x1:m-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x:t,y:n,goalY:this.barHelpers.getGoalValues(`y`,null,a,d,f,u),barXPosition:m,barWidth:i}}getBarXForNumericXAxis({x:e,barWidth:t,realIndex:n,j:r}){let i=this.w,a=n;return i.seriesData.seriesX[n].length||(a=i.globals.maxValsInArrayIndex),y.isNumber(i.seriesData.seriesX[a][r])&&(e=(i.seriesData.seriesX[a][r]-i.globals.minX)/this.xRatio-t*this.seriesLen/2),{barXPosition:e+t*this.visibleI,x:e}}getPreviousPath(e,t){let n=this.w,r=`M 0 0`;for(let i=0;i<n.globals.previousPaths.length;i++){let a=n.globals.previousPaths[i];a.paths&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(e,10)&&typeof n.globals.previousPaths[i].paths[t]<`u`&&(r=n.globals.previousPaths[i].paths[t].d)}return r}},zt=class extends Z{draw(e,t){let n=this.w;this.graphics=new I(this.w),this.bar=new Z(this.w,this.ctx,this.xyRatios);let r=new N(this.w);e=r.getLogSeries(e),this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),n.config.chart.stackType===`100%`&&(e=n.globals.comboCharts?t.map(e=>n.globals.seriesPercent[e]):n.globals.seriesPercent.slice()),this.series=e,this.barHelpers.initializeStackedPrevVars(this);let i=this.graphics.group({class:`apexcharts-bar-series apexcharts-plot-series`}),a=0,o=0;for(let r=0,l=0;r<e.length;r++,l++){let u=n.globals.comboCharts?t[r]:r,{groupIndex:d,columnGroupIndex:f}=this.barHelpers.getGroupIndex(u);this.groupCtx=this[n.labelData.seriesGroups[d]];let p=[],m=[],h=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[u][0],h=u),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;let g=this.graphics.group({class:`apexcharts-series`,seriesName:y.escapeString(n.seriesData.seriesNames[u]),rel:r+1,"data:realIndex":u});W.addCollapsedClassToSeries(this.w,g,u);let _=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":u}),v=this.graphics.group({class:`apexcharts-bar-goals-markers`}),b=this.initialPositions(a,o,void 0,void 0,void 0,void 0,h),{xDivision:x,yDivision:S,zeroH:C,zeroW:w}=b,T=b.barHeight,E=b.barWidth;o=b.y,a=b.x,n.globals.barHeight=T,n.globals.barWidth=E,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(e=>isNaN(e))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>C),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let t=0;t<n.globals.dataPoints;t++){let i=this.barHelpers.getStrokeWidth(r,t,u),y={indexes:{i:r,j:t,realIndex:u,translationsIndex:h,bc:l},strokeWidth:i,x:a,y:o,elSeries:g,columnGroupIndex:f,seriesGroup:n.labelData.seriesGroups[d]},b=null;this.isHorizontal?(b=this.drawStackedBarPaths(c(s({},y),{zeroW:w,barHeight:T,yDivision:S})),E=this.series[r][t]/this.invertedYRatio):(b=this.drawStackedColumnPaths(c(s({},y),{xDivision:x,barWidth:E,zeroH:C})),T=this.series[r][t]/this.yRatio[h]);let D=this.barHelpers.drawGoalLine({barXPosition:b.barXPosition,barYPosition:b.barYPosition,goalX:b.goalX,goalY:b.goalY,barHeight:T,barWidth:E});D&&v.add(D),o=b.y,a=b.x,p.push(a),m.push(o);let O=this.barHelpers.getPathFillColor(e,r,t,u),k=``,A=n.globals.isBarHorizontal?`apexcharts-flip-x`:`apexcharts-flip-y`;(this.barHelpers.arrBorderRadius[u][t]===`bottom`&&n.seriesData.series[u][t]>0||this.barHelpers.arrBorderRadius[u][t]===`top`&&n.seriesData.series[u][t]<0)&&(k=A),g=this.renderSeries(c(s({realIndex:u,pathFill:O.color},O.useRangeColor?{lineFill:O.color}:{}),{j:t,i:r,columnGroupIndex:f,pathFrom:b.pathFrom,pathTo:b.pathTo,strokeWidth:i,elSeries:g,x:a,y:o,series:e,barHeight:T,barWidth:E,elDataLabelsWrap:_,elGoalsMarkers:v,type:`bar`,visibleSeries:f,classes:k}))}n.globals.seriesXvalues[u]=p,n.globals.seriesYvalues[u]=m,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(g)}return i}initialPositions(e,t,n,r,i,a,o){let s=this.w,c,l;if(this.isHorizontal){r=s.layout.gridHeight/s.globals.dataPoints;let e=s.config.plotOptions.bar.barHeight;c=String(e).indexOf(`%`)===-1?parseInt(e,10):r*parseInt(e,10)/100,a=s.globals.padHorizontal+(this.isReversed?s.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),t=(r-c)/2}else{n=s.layout.gridWidth/s.globals.dataPoints,l=n;let t=s.config.plotOptions.bar.columnWidth;s.axisFlags.isXNumeric&&s.globals.dataPoints>1?(n=s.globals.minXDiff/this.xRatio,l=n*parseInt(this.barOptions.columnWidth,10)/100):String(t).indexOf(`%`)===-1?l=parseInt(t,10):l*=parseInt(t,10)/100,i=this.isReversed?this.baseLineY[o]:s.layout.gridHeight-this.baseLineY[o],e=s.globals.padHorizontal+(n-l)/2}let u=s.globals.barGroups.length||1;return{x:e,y:t,yDivision:r,xDivision:n,barHeight:c/u,barWidth:l/u,zeroH:i,zeroW:a}}drawStackedBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,columnGroupIndex:o,seriesGroup:s,yDivision:c,elSeries:l}){let u=this.w,d=a+o*t,f,p=e.i,m=e.j,h=e.realIndex,g=e.translationsIndex,_=0;for(let e=0;e<this.groupCtx.prevXF.length;e++)_+=this.groupCtx.prevXF[e][m];let v=p;if(u.config.series[h].name&&(v=s.indexOf(u.config.series[h].name)),v>0){let e=r;this.groupCtx.prevXVal[v-1][m]<0?e=this.series[p][m]>=0?this.groupCtx.prevX[v-1][m]+_-(this.isReversed?_:0)*2:this.groupCtx.prevX[v-1][m]:this.groupCtx.prevXVal[v-1][m]>=0&&(e=this.series[p][m]>=0?this.groupCtx.prevX[v-1][m]:this.groupCtx.prevX[v-1][m]-_+(this.isReversed?_:0)*2),f=e}else f=r;i=this.series[p][m]===null?f:f+this.series[p][m]/this.invertedYRatio-(this.isReversed?this.series[p][m]/this.invertedYRatio:0)*2;let y=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:f,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,seriesGroup:s,i:p,j:m,w:u});return this.barHelpers.barBackground({j:m,i:p,y1:d,y2:t,elSeries:l}),a+=c,{pathTo:y.pathTo,pathFrom:y.pathFrom,goalX:this.barHelpers.getGoalValues(`x`,r,null,p,m,g),barXPosition:f,barYPosition:d,x:i,y:a}}drawStackedColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,columnGroupIndex:o,seriesGroup:s,elSeries:c}){var l;let u=this.w,d=e.i,f=e.j,p=e.bc,m=e.realIndex,h=e.translationsIndex;if(u.axisFlags.isXNumeric){let e=u.seriesData.seriesX[m][f];e||=0,t=(e-u.globals.minX)/this.xRatio-i/2*u.globals.barGroups.length}let g=t+o*i,_,v=0;for(let e=0;e<this.groupCtx.prevYF.length;e++)v+=isNaN(this.groupCtx.prevYF[e][f])?0:this.groupCtx.prevYF[e][f];let y=d;if(s&&(y=s.indexOf(u.seriesData.seriesNames[m])),y>0&&!u.axisFlags.isXNumeric||y>0&&u.axisFlags.isXNumeric&&u.seriesData.seriesX[m-1][f]===u.seriesData.seriesX[m][f]){let e,t,n=Math.min(this.yRatio.length+1,m+1);if(this.groupCtx.prevY[y-1]!==void 0&&this.groupCtx.prevY[y-1].length){for(let e=1;e<n;e++)if(!isNaN(this.groupCtx.prevY[y-e]?.[f])){t=this.groupCtx.prevY[y-e][f];break}}for(let r=1;r<n;r++)if(this.groupCtx.prevYVal[y-r]?.[f]<0){e=this.series[d][f]>=0?t-v+(this.isReversed?v:0)*2:t;break}else if(this.groupCtx.prevYVal[y-r]?.[f]>=0){e=this.series[d][f]>=0?t:t+v-(this.isReversed?v:0)*2;break}typeof e>`u`&&(e=u.layout.gridHeight),_=(l=this.groupCtx.prevYF[0])!=null&&l.every(e=>e===0)&&this.groupCtx.prevYF.slice(1,y).every(e=>e.every(e=>isNaN(e)))?a:e}else _=a;n=this.series[d][f]?_-this.series[d][f]/this.yRatio[h]+(this.isReversed?this.series[d][f]/this.yRatio[h]:0)*2:_;let b=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:_,y2:n,yRatio:this.yRatio[h],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:s,realIndex:e.realIndex,i:d,j:f,w:u});return this.barHelpers.barBackground({bc:p,j:f,i:d,x1:g,x2:i,elSeries:c}),{pathTo:b.pathTo,pathFrom:b.pathFrom,goalY:this.barHelpers.getGoalValues(`y`,null,a,d,f),barXPosition:g,x:u.axisFlags.isXNumeric?t:t+r,y:n}}},Bt=class extends Z{draw(e,t,n){let r=this.w,i=new I(this.w),a=r.globals.comboCharts?t:r.config.chart.type,o=new z(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type===`ohlc`,this.coreUtils=new N(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let l=i.group({class:`apexcharts-${a}-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){this.isBoxPlot=r.config.chart.type===`boxPlot`||r.config.series[t].type===`boxPlot`;let a,u,d=[],f=[],p=r.globals.comboCharts?n[t]:t,{columnGroupIndex:m}=this.barHelpers.getGroupIndex(p),h=i.group({class:`apexcharts-series`,seriesName:y.escapeString(r.seriesData.seriesNames[p]),rel:t+1,"data:realIndex":p});W.addCollapsedClassToSeries(this.w,h,p),e[t].length>0&&(this.visibleI+=1);let g=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[p][0],g=p);let{y:_,barHeight:v,yDivision:b,zeroW:x,x:S,barWidth:C,xDivision:w,zeroH:T}=this.barHelpers.initialPositions(p);u=_,a=S,f.push(a+C/2);let E=i.group({class:`apexcharts-datalabels`,"data:realIndex":p}),D=i.group({class:`apexcharts-bar-goals-markers`});for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,p),l=null,_={indexes:{i:t,j:n,realIndex:p,translationsIndex:g},x:a,y:u,strokeWidth:i,elSeries:h};l=this.isHorizontal?this.drawHorizontalBoxPaths(c(s({},_),{yDivision:b,barHeight:v,zeroW:x})):this.drawVerticalBoxPaths(c(s({},_),{xDivision:w,barWidth:C,zeroH:T})),u=l.y,a=l.x;let y=this.barHelpers.drawGoalLine({barXPosition:l.barXPosition,barYPosition:l.barYPosition,goalX:l.goalX,goalY:l.goalY,barHeight:v,barWidth:C});y&&D.add(y),n>0&&f.push(a+C/2),d.push(u),l.pathTo.forEach((s,c)=>{let d=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?l.color[c]:r.globals.stroke.colors[t],f=o.fillPath({seriesNumber:p,dataPointIndex:n,color:l.color[c],value:e[t][n]});this.renderSeries({realIndex:p,pathFill:f,lineFill:d,j:n,i:t,pathFrom:l.pathFrom,pathTo:s,strokeWidth:i,elSeries:h,x:a,y:u,series:e,columnGroupIndex:m,barHeight:v,barWidth:C,elDataLabelsWrap:E,elGoalsMarkers:D,visibleSeries:this.visibleI,type:r.config.chart.type})})}r.globals.seriesXvalues[p]=f,r.globals.seriesYvalues[p]=d,l.add(h)}return l}drawVerticalBoxPaths({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i,strokeWidth:a}){let o=this.w,s=new I(this.w),c=e.i,l=e.j,{colors:u}=o.config.plotOptions.candlestick,{colors:d}=this.boxOptions,f=e.realIndex,p=e=>Array.isArray(e)?e[f]:e,m=p(u.upward),h=p(u.downward),g=this.yRatio[e.translationsIndex],_=this.getOHLCValue(f,l),v=i,y=i,b=_.o<_.c?[m]:[h];this.isBoxPlot&&(b=[p(d.lower),p(d.upper)]);let x=Math.min(_.o,_.c),S=Math.max(_.o,_.c),C=_.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[f][l]-o.globals.minX)/this.xRatio-r/2);let w=t+r*this.visibleI;typeof this.series[c][l]>`u`||this.series[c][l]===null?(x=i,S=i):(x=i-x/g,S=i-S/g,v=i-_.h/g,y=i-_.l/g,C=i-_.m/g);let T,E=s.move(w+r/2,x);if(o.globals.previousPaths.length>0&&(E=this.getPreviousPath(f,l,!0)),this.isOHLC){let e=w+r/2,t=i-_.o/g,n=i-_.c/g;T=[s.move(e,v)+s.line(e,y)+s.move(e,t)+s.line(w,t)+s.move(e,n)+s.line(w+r,n)]}else T=this.isBoxPlot?[s.move(w,x)+s.line(w+r/2,x)+s.line(w+r/2,v)+s.line(w+r/4,v)+s.line(w+r-r/4,v)+s.line(w+r/2,v)+s.line(w+r/2,x)+s.line(w+r,x)+s.line(w+r,C)+s.line(w,C)+s.line(w,x+a/2),s.move(w,C)+s.line(w+r,C)+s.line(w+r,S)+s.line(w+r/2,S)+s.line(w+r/2,y)+s.line(w+r-r/4,y)+s.line(w+r/4,y)+s.line(w+r/2,y)+s.line(w+r/2,S)+s.line(w,S)+s.line(w,C)+`z`]:[s.move(w,S)+s.line(w+r/2,S)+s.line(w+r/2,v)+s.line(w+r/2,S)+s.line(w+r,S)+s.line(w+r,x)+s.line(w+r/2,x)+s.line(w+r/2,y)+s.line(w+r/2,x)+s.line(w,x)+s.line(w,S-a/2)];return E+=s.move(w,x),o.axisFlags.isXNumeric||(t+=n),{pathTo:T,pathFrom:E,x:t,y:S,goalY:this.barHelpers.getGoalValues(`y`,null,i,c,l,e.translationsIndex),barXPosition:w,color:b}}drawHorizontalBoxPaths({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i,strokeWidth:a}){let o=this.w,s=new I(this.w),c=e.i,l=e.j,u=e.realIndex,{colors:d}=o.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e=>Array.isArray(e)?e[u]:e,m=this.invertedYRatio,h=this.getOHLCValue(u,l),g=h.o<h.c?[p(d.upward)]:[p(d.downward)];this.isBoxPlot&&(g=[p(f.lower),p(f.upper)]);let _=i,v=i,y=Math.min(h.o,h.c),b=Math.max(h.o,h.c),x=h.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[u][l]-o.globals.minX)/this.invertedXRatio-r/2);let S=t+r*this.visibleI;typeof this.series[c][l]>`u`||this.series[c][l]===null?(y=i,b=i):(y=i+y/m,b=i+b/m,_=i+h.h/m,v=i+h.l/m,x=i+h.m/m);let C=s.move(y,S+r/2);o.globals.previousPaths.length>0&&(C=this.getPreviousPath(u,l,!0));let w=[s.move(y,S)+s.line(y,S+r/2)+s.line(_,S+r/2)+s.line(_,S+r/2-r/4)+s.line(_,S+r/2+r/4)+s.line(_,S+r/2)+s.line(y,S+r/2)+s.line(y,S+r)+s.line(x,S+r)+s.line(x,S)+s.line(y+a/2,S),s.move(x,S)+s.line(x,S+r)+s.line(b,S+r)+s.line(b,S+r/2)+s.line(v,S+r/2)+s.line(v,S+r-r/4)+s.line(v,S+r/4)+s.line(v,S+r/2)+s.line(b,S+r/2)+s.line(b,S)+s.line(x,S)+`z`];return C+=s.move(y,S),o.axisFlags.isXNumeric||(t+=n),{pathTo:w,pathFrom:C,x:b,y:t,goalX:this.barHelpers.getGoalValues(`x`,i,null,c,l),barYPosition:S,color:g}}getOHLCValue(e,t){let n=this.w,r=this.coreUtils,i=n=>n[e]&&n[e][t]!=null?r.getLogValAtSeriesIndex(n[e][t],e):0,a=i(n.candleData.seriesCandleH),o=i(n.candleData.seriesCandleO),s=i(n.candleData.seriesCandleM),c=i(n.candleData.seriesCandleC),l=i(n.candleData.seriesCandleL);return{o:this.isBoxPlot?a:o,h:this.isBoxPlot?o:a,m:s,l:this.isBoxPlot?c:l,c:this.isBoxPlot?l:c}}},Vt=class{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){let e=this.w,t=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,n,r){let i=this.w,a=1,o=i.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,n);i.globals.hasNegs||r?a=i.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(o*1.25):(1-s.percent/100)*(o*1.25):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(a=1-s.percent/100,e===`treemap`&&(a=(1-s.percent/100)*(o*1.25)));let c=s.color,l=new y;if(i.config.plotOptions[e].enableShades)if(this.w.config.theme.mode===`dark`){let e=l.shadeColor(a*-1,s.color);c=y.hexToRgba(y.isColorHex(e)?e:y.rgb2hex(e),i.config.fill.opacity)}else{let e=l.shadeColor(a,s.color);c=y.hexToRgba(y.isColorHex(e)?e:y.rgb2hex(e),i.config.fill.opacity)}return{color:c,colorProps:s}}determineColor(e,t,n){let r=this.w,i=r.seriesData.series[t][n],a=r.config.plotOptions[e],o=a.colorScale.inverse?n:t;a.distributed&&r.config.chart.type===`treemap`&&(o=n);let s=r.globals.colors[o],c=null,l=Math.min(...r.seriesData.series[t]),u=Math.max(...r.seriesData.series[t]);!a.distributed&&e===`heatmap`&&(l=r.globals.minY,u=r.globals.maxY),typeof a.colorScale.min<`u`&&(l=a.colorScale.min<r.globals.minY?a.colorScale.min:r.globals.minY,u=a.colorScale.max>r.globals.maxY?a.colorScale.max:r.globals.maxY);let d=Math.abs(u)+Math.abs(l),f=100*i/(d===0?d-1e-6:d);return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(e=>{if(i>=e.from&&i<=e.to){s=e.color,c=e.foreColor?e.foreColor:null,l=e.from,u=e.to;let t=Math.abs(u)+Math.abs(l);f=100*i/(t===0?t-1e-6:t)}}),{color:s,foreColor:c,percent:f}}calculateDataLabels({text:e,x:t,y:n,i:r,j:i,colorProps:a,fontSize:o}){let s=this.w.config.dataLabels,c=new I(this.w),l=new V(this.w,this.ctx),u=null;if(s.enabled){u=c.group({class:`apexcharts-data-labels`});let d=s.offsetX,f=s.offsetY,p=t+d,m=n+parseFloat(s.style.fontSize)/3+f;l.plotDataLabelsText({x:p,y:m,text:e,i:r,j:i,color:a.foreColor,parent:u,fontSize:o,dataLabelsConfig:s})}return u}},Ht=class{constructor(e,t,n){this.ctx=t,this.w=e,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Vt(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){let t=this.w,n=new I(this.w,this.ctx),r=n.group({class:`apexcharts-heatmap`});r.attr(`clip-path`,`url(#gridRectMask${t.globals.cuid})`);let i=t.layout.gridWidth/t.globals.dataPoints,a=t.layout.gridHeight/t.seriesData.series.length,o=0,s=!1;this.negRange=this.helpers.checkColorRange();let c=e.slice();t.config.yaxis[0].reversed&&(s=!0,c.reverse());for(let l=s?0:c.length-1;s?l<c.length:l>=0;s?l++:l--){let s=n.group({class:`apexcharts-series apexcharts-heatmap-series`,seriesName:y.escapeString(t.seriesData.seriesNames[l]),rel:l+1,"data:realIndex":l});if(W.addCollapsedClassToSeries(this.w,s,l),n.setupEventDelegation(s,`.apexcharts-heatmap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new F(this.w).dropShadow(s,e,l)}let u=0,d=t.config.plotOptions.heatmap.shadeIntensity,f=0;for(let r=0;r<t.globals.dataPoints;r++){if(t.seriesData.seriesX.length&&!t.globals.allSeriesHasEqualX&&t.globals.minX+t.globals.minXDiff*r<t.seriesData.seriesX[l][f]){u+=i;continue}if(f>=c[l].length)break;let p=this.helpers.getShadeColor(t.config.chart.type,l,f,this.negRange),m=p.color,h=p.colorProps;t.config.fill.type===`image`&&(m=new z(this.w).fillPath({seriesNumber:l,dataPointIndex:f,opacity:t.globals.hasNegs?h.percent<0?1-(1+h.percent/100):d+h.percent/100:h.percent/100,patternID:y.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:i,height:t.config.fill.image.height?t.config.fill.image.height:a}));let g=this.rectRadius,_=n.drawRect(u,o,i,a,g);if(_.attr({cx:u,cy:o}),_.node.classList.add(`apexcharts-heatmap-rect`),s.add(_),_.attr({fill:m,i:l,index:l,j:f,val:e[l][f],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?m:t.globals.stroke.colors[0],color:m}),t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateHeatMap(_,u,o,i,a,e)}if(t.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){e=this.dynamicAnim.speed;let n=t.globals.previousPaths[l]&&t.globals.previousPaths[l][f]&&t.globals.previousPaths[l][f].color;n||=`rgba(255, 255, 255, 0)`,this.animateHeatColor(_,y.isColorHex(n)?n:y.rgb2hex(n),y.isColorHex(m)?m:y.rgb2hex(m),e)}}let v=t.config.dataLabels.formatter,b=v(t.seriesData.series[l][f],{value:t.seriesData.series[l][f],seriesIndex:l,dataPointIndex:f,w:t}),x=this.helpers.calculateDataLabels({text:b,x:u+i/2,y:o+a/2,i:l,j:f,colorProps:h,series:c});x!==null&&s.add(x),u+=i,f++}o+=a,r.add(s)}let l=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?l.unshift(``):l.push(``),t.globals.yAxisScale[0].result=l,r}animateHeatMap(e,t,n,r,i,a){let o=new P(this.w);o.animateRect(e,{x:t+r/2,y:n+i/2,width:0,height:0},{x:t,y:n,width:r,height:i},a,()=>{o.animationCompleted(e)})}animateHeatColor(e,t,n,r){e.attr({fill:t}).animate(r).attr({fill:n})}},Ut=class{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){let n=this.w;if((n.config.fill.type===`gradient`||n.config.fill.type[e]===`gradient`)&&new N(this.lineCtx.w).seriesHaveSameValues(e)){let n=t[e].slice();n[n.length-1]=n[n.length-1]+1e-6,t[e]=n}return t}calculatePoints({series:e,realIndex:t,x:n,y:r,i,j:a,prevY:o}){let s=this.w,c=[],l=[],u=this.lineCtx.categoryAxisCorrection+s.config.markers.offsetX;return s.axisFlags.isXNumeric&&(u=(s.seriesData.seriesX[t][0]-s.globals.minX)/this.lineCtx.xRatio+s.config.markers.offsetX),a===0&&(c.push(u),l.push(y.isNumber(e[i][0])?o+s.config.markers.offsetY:null)),c.push(n+s.config.markers.offsetX),l.push(y.isNumber(e[i][a+1])?r+s.config.markers.offsetY:null),{x:c,y:l}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:n}){let r=this.w;for(let i=0;i<r.globals.previousPaths.length;i++){let a=r.globals.previousPaths[i];(a.type===`line`||a.type===`area`)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(n,10)&&(a.type===`line`?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[i].paths[0].d):a.type===`area`&&(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[i].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[i].paths[1]&&(e=r.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:n,prevY:r,lineYPosition:i,translationsIndex:a}){let o=this.w,s=o.config.chart.stacked&&!o.globals.comboCharts||o.config.chart.stacked&&o.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[t]?.type===`bar`||this.w.config.series[t]?.type===`column`);if(typeof n[e]?.[0]<`u`)i=s&&e>0?this.lineCtx.prevSeriesY[e-1][0]:this.lineCtx.zeroY,r=i-n[e][0]/this.lineCtx.yRatio[a]+(this.lineCtx.isReversed?n[e][0]/this.lineCtx.yRatio[a]:0)*2;else if(s&&e>0&&typeof n[e][0]>`u`){for(let t=e-1;t>=0;t--)if(n[t][0]!==null&&typeof n[t][0]<`u`){i=this.lineCtx.prevSeriesY[t][0],r=i;break}}return{prevY:r,lineYPosition:i}}},Wt=e=>{let t=Jt(e),n=e.length-1,r=[],i,a,o,s;for(let r=0;r<n;r++)o=qt(e[r],e[r+1]),Math.abs(o)<1e-6?t[r]=t[r+1]=0:(i=t[r]/o,a=t[r+1]/o,s=i*i+a*a,s>9&&(s=o*3/Math.sqrt(s),t[r]=s*i,t[r+1]=s*a));for(let i=0;i<=n;i++)s=(e[Math.min(n,i+1)][0]-e[Math.max(0,i-1)][0])/(6*(1+t[i]*t[i])),r.push([s||0,t[i]*s||0]);return r},Gt=e=>{let t=``;for(let n=0;n<e.length;n++){let r=e[n],i=r.length;i>4?(t+=`C${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`,t+=`, ${r[4]}, ${r[5]}`):i>2&&(t+=`S${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`)}return t},Kt={points(e){let t=Wt(e),n=e[1],r=e[0],i=[],a=t[1],o=t[0];i.push(r,[r[0]+o[0],r[1]+o[1],n[0]-a[0],n[1]-a[1],n[0],n[1]]);for(let n=2,r=t.length;n<r;n++){let r=e[n],a=t[n];i.push([r[0]-a[0],r[1]-a[1],r[0],r[1]])}return i},slice(e,t,n){let r=e.slice(t,n);if(t){if(n-t>1&&r[1].length<6){let e=r[0].length;r[1]=[r[0][e-2]*2-r[0][e-4],r[0][e-1]*2-r[0][e-3]].concat(r[1])}r[0]=r[0].slice(-2)}return r}};function qt(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Jt(e){let t=[],n=e[0],r=e[1],i=t[0]=qt(n,r),a=1;for(let o=e.length-1;a<o;a++)n=r,r=e[a+1],t[a]=(i+(i=qt(n,r)))*.5;return t[a]=i,t}var Q=class{constructor(e,t,n,r){this.ctx=t,this.w=e,this.xyRatios=n,this.pointsChart=!(this.w.config.chart.type!==`bubble`&&this.w.config.chart.type!==`scatter`)||r,this.scatter=new ne(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Ut(this),this.markers=new B(this.w,this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}draw(e,t,n,r){let i=this.w,a=new I(this.w),o=i.globals.comboCharts?t:i.config.chart.type,l=a.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),u=new N(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=u.getLogSeries(e),this.yRatio=u.getLogYRatios(this.yRatio),this.prevSeriesY=[];let d=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);let a=i.globals.comboCharts?n[t]:t,l=this.yRatio.length>1?a:0;this._initSerieVariables(e,t,a);let u=[],f=[],p=[],m=i.globals.padHorizontal+this.categoryAxisCorrection,h=[],g=[];W.addCollapsedClassToSeries(this.w,this.elSeries,a),i.axisFlags.isXNumeric&&i.seriesData.seriesX.length>0&&(m=(i.seriesData.seriesX[a][0]-i.globals.minX)/this.xRatio),p.push(m);let _=m,v,y=_,b=this.zeroY,x=this.zeroY;b=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:e,prevY:b,lineYPosition:0,translationsIndex:l}).prevY,i.config.stroke.curve===`monotoneCubic`&&e[t][0]===null?u.push(null):u.push(b);let S=b,C;o===`rangeArea`&&(C=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:r,prevY:x,lineYPosition:0,translationsIndex:l}),x=C.prevY,v=x,f.push(u[0]===null?null:x));let w=this._calculatePathsFrom({type:o,series:e,i:t,realIndex:a,translationsIndex:l,prevX:y,prevY:b,prevY2:x}),T=[u[0]],E=[f[0]],D={type:o,series:e,realIndex:a,translationsIndex:l,i:t,x:m,y:1,pX:_,pY:S,pathsFrom:w,linePaths:h,areaPaths:g,seriesIndex:n,lineYPosition:0,xArrj:p,yArrj:u,y2Arrj:f,seriesRangeEnd:r},O=this._iterateOverDataPoints(c(s({},D),{iterations:o===`rangeArea`?e[t].length-1:void 0,isRangeStart:!0}));if(o===`rangeArea`){let e=this._calculatePathsFrom({series:r,i:t,realIndex:a,prevX:y,prevY:x}),n=this._iterateOverDataPoints(c(s({},D),{series:r,xArrj:[m],yArrj:T,y2Arrj:E,pY:v,areaPaths:O.areaPaths,pathsFrom:e,iterations:r[t].length-1,isRangeStart:!1})),i=O.linePaths.length/2;for(let e=0;e<i;e++)O.linePaths[e]=n.linePaths[e+i]+O.linePaths[e];O.linePaths.splice(i),O.pathFromLine=n.pathFromLine+O.pathFromLine}else O.pathFromArea+=`z`;this._handlePaths({type:o,realIndex:a,i:t,paths:O}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),d.push(this.elSeries)}if(typeof i.config.series[0]?.zIndex<`u`&&d.sort((e,t)=>Number(e.node.getAttribute(`zIndex`))-Number(t.node.getAttribute(`zIndex`))),i.config.chart.stacked)for(let e=d.length-1;e>=0;e--)l.add(d[e]);else for(let e=0;e<d.length;e++)l.add(d[e]);return l}_initSerieVariables(e,t,n){let r=this.w,i=new I(this.w);this.xDivision=r.layout.gridWidth/(r.globals.dataPoints-+(r.config.xaxis.tickPlacement===`on`)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width;let a=0;if(this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[n],a=n),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.layout.gridHeight-this.baseLineY[a]-(this.isReversed?r.layout.gridHeight:0)+(this.isReversed?this.baseLineY[a]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>r.layout.gridHeight||r.config.plotOptions.area.fillTo===`end`)&&(this.areaBottomY=r.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=i.group({class:`apexcharts-series`,zIndex:typeof r.config.series[n].zIndex<`u`?r.config.series[n].zIndex:n,seriesName:y.escapeString(r.seriesData.seriesNames[n])}),this.elPointsMain=i.group({class:`apexcharts-series-markers-wrap`,"data:realIndex":n}),r.globals.hasNullValues){let e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[r.layout.gridHeight+r.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});e!==null&&this.elPointsMain.add(e)}this.elDataLabelsWrap=i.group({class:`apexcharts-datalabels`,"data:realIndex":n});let o=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":o,rel:t+1,"data:realIndex":n}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:n,realIndex:r,translationsIndex:i,prevX:a,prevY:o,prevY2:s}){let c=this.w,l=new I(this.w),u,d,f,p;if(t[n][0]===null){for(let e=0;e<t[n].length;e++)if(t[n][e]!==null){a=this.xDivision*e,o=this.zeroY-t[n][e]/this.yRatio[i],u=l.move(a,o),d=l.move(a,this.areaBottomY);break}}else u=l.move(a,o),e===`rangeArea`&&(u=l.move(a,s)+l.line(a,o)),d=l.move(a,this.areaBottomY)+l.line(a,o);if(f=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),p=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),c.globals.previousPaths.length>0){let e=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:r});f=e.pathFromLine,p=e.pathFromArea}return{prevX:a,prevY:o,linePath:u,areaPath:d,pathFromLine:f,pathFromArea:p}}_handlePaths({type:e,realIndex:t,i:n,paths:r}){let i=this.w,a=new I(this.w),o=new z(this.w);this.prevSeriesY.push(r.yArrj),i.globals.seriesXvalues[t]=r.xArrj,i.globals.seriesYvalues[t]=r.yArrj;let l=i.config.forecastDataPoints;if(l.count>0&&e!==`rangeArea`){let e=i.globals.seriesXvalues[t][i.globals.seriesXvalues[t].length-l.count-1],n=a.drawRect(e,0,i.layout.gridWidth,i.layout.gridHeight,0);i.dom.elForecastMask.appendChild(n.node);let r=a.drawRect(0,0,e,i.layout.gridHeight,0);i.dom.elNonForecastMask.appendChild(r.node)}this.pointsChart||i.globals.delayedElements.push({el:this.elPointsMain.node,index:t});let u={i:n,realIndex:t,animationDelay:n,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`};if(e===`area`){let e=o.fillPath({seriesNumber:t});for(let t=0;t<r.areaPaths.length;t++){let n=a.renderPaths(c(s({},u),{pathFrom:r.pathFromArea,pathTo:r.areaPaths[t],stroke:`none`,strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(n)}}if(i.config.stroke.show&&!this.pointsChart){let d=null;if(e===`line`)d=o.fillPath({seriesNumber:t,i:n});else if(i.config.stroke.fill.type===`solid`)d=i.globals.stroke.colors[t];else{let e=i.config.fill;i.config.fill=i.config.stroke.fill,d=o.fillPath({seriesNumber:t,i:n}),i.config.fill=e}for(let n=0;n<r.linePaths.length;n++){let f=d;e===`rangeArea`&&(f=o.fillPath({seriesNumber:t}));let p=c(s({},u),{pathFrom:r.pathFromLine,pathTo:r.linePaths[n],stroke:d,strokeWidth:this.strokeWidth,strokeLineCap:i.config.stroke.lineCap,fill:e===`rangeArea`?f:`none`}),m=a.renderPaths(p);if(this.elSeries.add(m),m.attr(`fill-rule`,`evenodd`),l.count>0&&e!==`rangeArea`){let e=a.renderPaths(p);e.node.setAttribute(`stroke-dasharray`,l.dashArray),l.strokeWidth&&e.node.setAttribute(`stroke-width`,l.strokeWidth),this.elSeries.add(e),e.attr(`clip-path`,`url(#forecastMask${i.globals.cuid})`),m.attr(`clip-path`,`url(#nonForecastMask${i.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:n,realIndex:r,translationsIndex:i,i:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,seriesIndex:p,lineYPosition:m,xArrj:h,yArrj:g,y2Arrj:_,isRangeStart:v,seriesRangeEnd:b}){let x=this.w,S=new I(this.w),C=this.yRatio,{prevY:w,linePath:T,areaPath:E,pathFromLine:D,pathFromArea:O}=u,k=y.isNumber(x.globals.minYArr[r])?x.globals.minYArr[r]:x.globals.minY;n||=x.globals.dataPoints>1?x.globals.dataPoints-1:x.globals.dataPoints;let A=(e,t)=>t-e/C[i]+(this.isReversed?e/C[i]:0)*2,j=s,M=x.config.chart.stacked&&!x.globals.comboCharts||x.config.chart.stacked&&x.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[r]?.type===`bar`||this.w.config.series[r]?.type===`column`),N=x.config.stroke.curve;Array.isArray(N)&&(N=Array.isArray(p)?N[p[a]]:N[a]);let P=0,F;for(let i=0;i<n&&t[a].length!==0;i++){let u=typeof t[a][i+1]>`u`||t[a][i+1]===null;if(x.axisFlags.isXNumeric){let e=x.seriesData.seriesX[r][i+1];typeof x.seriesData.seriesX[r][i+1]>`u`&&(e=x.seriesData.seriesX[r][n-1]),o=(e-x.globals.minX)/this.xRatio}else o+=this.xDivision;m=M&&a>0&&x.globals.collapsedSeries.length<x.config.series.length-1?this.prevSeriesY[(e=>{for(let t=e;t>0;t--)if(x.globals.collapsedSeriesIndices.indexOf(p?.[t]||t)>-1)t--;else return t;return 0})(a-1)][i+1]:this.zeroY,u?s=A(k,m):(s=A(t[a][i+1],m),e===`rangeArea`&&(j=A(b[a][i+1],m))),h.push(t[a][i+1]===null?null:o),u&&(x.config.stroke.curve===`smooth`||x.config.stroke.curve===`monotoneCubic`)?(g.push(null),_.push(null)):(g.push(s),_.push(j));let y=this.lineHelpers.calculatePoints({series:t,x:o,y:s,realIndex:r,i:a,j:i,prevY:w}),C=this._createPaths({type:e,series:t,i:a,j:i,x:o,y:s,y2:j,xArrj:h,yArrj:g,y2Arrj:_,pX:c,pY:l,pathState:P,segmentStartX:F,linePath:T,areaPath:E,linePaths:d,areaPaths:f,curve:N,isRangeStart:v});f=C.areaPaths,d=C.linePaths,c=C.pX,l=C.pY,P=C.pathState,F=C.segmentStartX,E=C.areaPath,T=C.linePath,this.appendPathFrom&&!x.globals.hasNullValues&&!(N===`monotoneCubic`&&e===`rangeArea`)&&(D+=S.line(o,this.areaBottomY),O+=S.line(o,this.areaBottomY)),this.handleNullDataPoints(t,y,a,i,r),this._handleMarkersAndLabels({type:e,pointsPos:y,i:a,j:i,realIndex:r,isRangeStart:v})}return{yArrj:g,xArrj:h,pathFromArea:O,areaPaths:f,pathFromLine:D,linePaths:d,linePath:T,areaPath:E}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:n,i:r,j:i,realIndex:a}){let o=this.w,s=new V(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:a,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.seriesData.series[r].length>1&&this.elPointsMain.node.classList.add(`apexcharts-element-hidden`);let e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:a,j:i+1});e!==null&&this.elPointsMain.add(e)}let c=s.drawDataLabel({type:e,isRangeStart:n,pos:t,i:a,j:i+1});c!==null&&this.elDataLabelsWrap.add(c)}_createPaths({type:e,series:t,i:n,j:r,x:i,y:a,xArrj:o,yArrj:s,y2:c,y2Arrj:l,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h,linePaths:g,areaPaths:_,curve:v,isRangeStart:y}){let b=new I(this.w),x=this.areaBottomY,S=e===`rangeArea`,C=e===`rangeArea`&&y;switch(v){case`monotoneCubic`:{let e=y?s:l,i=(e,t)=>e.map((e,n)=>[e,t[n]]).filter(e=>e[1]!==null),a=e=>{let t=[],n=0;return e.forEach(e=>{e===null?n>0&&(t.push(n),n=0):n++}),n>0&&t.push(n),t},c=(e,t)=>{let n=a(e),r=[];for(let e=0,i=0;e<n.length;i+=n[e++])r[e]=Kt.slice(t,i,i+n[e]);return r};switch(f){case 0:if(e[r+1]===null)break;f=1;case 1:if(!(S?o.length===t[n].length:r===t[n].length-2))break;case 2:{let t=y?o:o.slice().reverse(),n=y?e:e.slice().reverse(),r=i(t,n),a=r.length>1?Kt.points(r):r,s=[];S&&(C?_=r:s=_.reverse());let l=0,u=0;if(c(n,a).forEach(e=>{l++;let t=Gt(e),n=u;u+=e.length;let i=u-1;C?m=b.move(r[n][0],r[n][1])+t:S?m=b.move(s[n][0],s[n][1])+b.line(r[n][0],r[n][1])+t+b.line(s[i][0],s[i][1]):(m=b.move(r[n][0],r[n][1])+t,h=m+b.line(r[i][0],x)+b.line(r[n][0],x)+`z`,_.push(h)),g.push(m)}),S&&l>1&&!C){let e=g.slice(l).reverse();g.splice(l),e.forEach(e=>g.push(e))}f=0;break}}break}case`smooth`:{let e=(i-u)*.35;if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||typeof t[n][r+1]>`u`){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=b.curve(u+e,d,i-e,a,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)C?m+=b.line(u,c):m+=b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=b.curve(u+e,d,i-e,a,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.curve(i,a,i,a,i,c)+b.move(i,c)),h+=b.curve(i,a,i,a,i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}break}u=i,d=a;break}default:{let e=(e,t,n)=>{let r=[];switch(e){case`stepline`:r=b.line(t,null,`H`)+b.line(null,n,`V`);break;case`linestep`:r=b.line(null,n,`V`)+b.line(t,null,`H`);break;case`straight`:r=b.line(t,n);break}return r};if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||typeof t[n][r+1]>`u`){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=e(v,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)C?m+=b.line(u,c):m+=b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=e(v,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.line(i,c)),h+=b.line(i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}break}u=i,d=a;break}}return{linePaths:g,areaPaths:_,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h}}handleNullDataPoints(e,t,n,r,i){let a=this.w;if(e[n][r]===null&&a.config.markers.showNullDataPoints||e[n].length===1){let e=this.strokeWidth-a.config.markers.strokeWidth/2;e>0||(e=0);let n=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:i,j:r+1,pSize:e,alwaysDrawMarker:!0});n!==null&&this.elPointsMain.add(n)}}},Yt=class{constructor(e){this.w=e}drawYAxisTexts(e,t,n,r){let i=this.w,a=i.config.yaxis[0],o=i.formatters.yLabelFormatters[0];return new I(this.w).drawText({x:e+a.labels.offsetX,y:t+a.labels.offsetY,text:o(r,n),textAnchor:`middle`,fontSize:a.labels.style.fontSize,fontFamily:a.labels.style.fontFamily,foreColor:Array.isArray(a.labels.style.colors)?a.labels.style.colors[n]:a.labels.style.colors})}},Xt=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=e.layout.gridWidth/2,e.config.chart.type===`radialBar`?this.fullAngle=360:this.fullAngle=Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;let n=e.config.plotOptions.pie.customScale,r=e.layout.gridWidth/2,i=e.layout.gridHeight/2;this.translateX=r-r*n,this.translateY=i-i*n,this.dataLabelsGroup=new I(this.w).group({class:`apexcharts-datalabels-group`,transform:`translate(${this.translateX}, ${this.translateY}) scale(${n})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}draw(e){let t=this,n=this.w,r=new I(this.w),i=r.group({class:`apexcharts-pie`});if(n.globals.noData)return i;let a=0;for(let t=0;t<e.length;t++)a+=y.negToZero(e[t]);let o=[],s=r.group();a===0&&(a=1e-5),e.forEach(e=>{this.maxY=Math.max(this.maxY,e)}),n.config.yaxis[0].max&&(this.maxY=n.config.yaxis[0].max),n.config.grid.position===`back`&&this.chartType===`polarArea`&&this.drawPolarElements(i);for(let t=0;t<e.length;t++){let r=this.fullAngle*y.negToZero(e[t])/a;o.push(r),this.chartType===`polarArea`?(o[t]=this.fullAngle/e.length,this.sliceSizes.push(n.globals.radialSize*e[t]/this.maxY)):this.sliceSizes.push(n.globals.radialSize)}if(n.globals.dataChanged){let e=0;for(let t=0;t<n.globals.previousPaths.length;t++)e+=y.negToZero(n.globals.previousPaths[t]);let t;for(let r=0;r<n.globals.previousPaths.length;r++)t=this.fullAngle*y.negToZero(n.globals.previousPaths[r])/e,this.prevSectorAngleArr.push(t)}if(this.donutSize<0&&(this.donutSize=0),this.chartType===`donut`){let e=r.drawCircle(this.donutSize);e.attr({cx:this.centerX,cy:this.centerY,fill:n.config.plotOptions.pie.donut.background?n.config.plotOptions.pie.donut.background:`transparent`}),s.add(e)}let c=t.drawArcs(o,e);if(this.sliceLabels.forEach(e=>{c.add(e)}),s.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${n.config.plotOptions.pie.customScale})`}),s.add(c),i.add(s),this.donutDataLabels.show){let e=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});i.add(e)}return n.config.grid.position===`front`&&this.chartType===`polarArea`&&this.drawPolarElements(i),i}drawArcs(e,t){let n=this.w,r=new F(this.w),i=new I(this.w),a=new z(this.w),o=i.group({class:`apexcharts-slices`}),s=this.initialAngle,c=this.initialAngle,l=this.initialAngle,u=this.initialAngle;this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0;for(let d=0;d<e.length;d++){let f=i.group({class:`apexcharts-series apexcharts-pie-series`,seriesName:y.escapeString(n.seriesData.seriesNames[d]),rel:d+1,"data:realIndex":d});o.add(f),s=l,c=u,l=s+e[d],u=c+this.prevSectorAngleArr[d];let p=l<s?this.fullAngle+l-s:l-s,m=a.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:t[d]}),h=this.getChangedPath(c,u),g=i.drawPath({d:h,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:m,fillOpacity:n.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${d}`});if(g.attr({index:0,j:d}),r.setSelectionFilter(g,0,d),n.config.chart.dropShadow.enabled){let e=n.config.chart.dropShadow;r.dropShadow(g,e,d)}this.addListeners(g,this.donutDataLabels);let _={x:0,y:0},v=(s+p/2)%this.fullAngle,b={x:this.centerX,y:this.centerY};this.chartType===`pie`||this.chartType===`polarArea`?(_=y.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize/1.25+n.config.plotOptions.pie.dataLabels.offset,v),b=y.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize/2,v)):this.chartType===`donut`&&(_=y.polarToCartesian(this.centerX,this.centerY,(n.globals.radialSize+this.donutSize)/2+n.config.plotOptions.pie.dataLabels.offset,v),b=y.polarToCartesian(this.centerX,this.centerY,(n.globals.radialSize+this.donutSize)/2,v)),I.setAttrs(g.node,{"data:angle":p,"data:startAngle":s,"data:strokeWidth":this.strokeWidth,"data:value":t[d],"data:cx":b.x,"data:cy":b.y}),f.add(g);let x=0;if(this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged?(x=p/this.fullAngle*n.config.chart.animations.speed,x===0&&(x=1),this.animDur=x+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),this.dynamicAnim&&n.globals.dataChanged?this.animatePaths(g,{size:this.sliceSizes[d],endAngle:l,startAngle:s,prevStartAngle:c,prevEndAngle:u,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:n.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(g,{size:this.sliceSizes[d],endAngle:l,startAngle:s,i:d,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:x}),n.config.plotOptions.pie.expandOnClick&&this.chartType!==`polarArea`&&g.node.addEventListener(`mouseup`,this.pieClicked.bind(this,d)),typeof n.interact.selectedDataPoints[0]<`u`&&n.interact.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),n.config.dataLabels.enabled){let t=_.x,a=_.y,o=100*p/this.fullAngle+`%`;if(p!==0&&n.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[d]){let e=n.config.dataLabels.formatter;e!==void 0&&(o=e(n.globals.seriesPercent[d][0],{seriesIndex:d,w:n}));let s=n.globals.dataLabels.style.colors[d],c=i.group({class:`apexcharts-datalabels`}),l=i.drawText({x:t,y:a,text:o,textAnchor:`middle`,fontSize:n.config.dataLabels.style.fontSize,fontFamily:n.config.dataLabels.style.fontFamily,fontWeight:n.config.dataLabels.style.fontWeight,foreColor:s});if(c.add(l),n.config.dataLabels.dropShadow.enabled){let e=n.config.dataLabels.dropShadow;r.dropShadow(l,e)}l.node.classList.add(`apexcharts-pie-label`),n.config.chart.animations.animate&&n.globals.resized===!1&&(l.node.classList.add(`apexcharts-pie-label-delay`),l.node.style.animationDelay=n.config.chart.animations.speed/940+`s`),this.sliceLabels.push(c)}}}return o}addListeners(e,t){let n=new I(this.w);e.node.addEventListener(`mouseenter`,n.pathMouseEnter.bind(this,e)),e.node.addEventListener(`mouseleave`,n.pathMouseLeave.bind(this,e)),e.node.addEventListener(`mouseleave`,this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener(`mousedown`,n.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener(`mouseenter`,this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener(`mousedown`,this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){let n=this.w,r=this,i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,a=i,o=t.startAngle,s=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(o=t.prevEndAngle,a=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===n.config.series.length-1&&(i+s>this.fullAngle?t.endAngle-=i+s:i+s<this.fullAngle&&(t.endAngle+=this.fullAngle-(i+s))),i===this.fullAngle&&(i=this.fullAngle-.01),r.animateArc(e,o,s,i,a,t)}animateArc(e,t,n,r,i,a){let o=this,s=this.w,c=new P(this.w),l=a.size,u;(isNaN(t)||isNaN(i))&&(t=n,i=r,a.dur=0);let d=r,f=n,p=t<n?this.fullAngle+t-n:t-n;s.globals.dataChanged&&a.shouldSetPrevPaths&&a.prevEndAngle&&(u=o.getPiePath({me:o,startAngle:a.prevStartAngle,angle:a.prevEndAngle<a.prevStartAngle?this.fullAngle+a.prevEndAngle-a.prevStartAngle:a.prevEndAngle-a.prevStartAngle,size:l}),e.attr({d:u})),a.dur===0?(u=o.getPiePath({me:o,startAngle:f,angle:r,size:l}),a.isTrack||(s.globals.animationEnded=!0),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u,"stroke-width":o.strokeWidth})):e.animate(a.dur,a.animBeginArr[a.i]).after(function(){(o.chartType===`pie`||o.chartType===`donut`||o.chartType===`polarArea`)&&this.animate(s.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),a.i===s.config.series.length-1&&c.animationCompleted(e)}).during(s=>{d=p+(r-p)*s,a.animateStartingPos&&(d=i+(r-i)*s,f=t-i+(n-(t-i))*s),u=o.getPiePath({me:o,startAngle:f,angle:d,size:l}),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u})})}pieClicked(e){let t=this.w,n=this,r=n.sliceSizes[e]+(t.config.plotOptions.pie.expandOnClick?4:0),i=t.dom.Paper.findOne(`.apexcharts-${n.chartType.toLowerCase()}-slice-${e}`);if(i.attr(`data:pieClicked`)===`true`){i.attr({"data:pieClicked":`false`}),this.revertDataLabelsInner(i.node,this.donutDataLabels);let e=i.attr(`data:pathOrig`);i.attr({d:e});return}else{let n=t.dom.baseEl.getElementsByClassName(`apexcharts-pie-area`);Array.prototype.forEach.call(n,e=>{e.setAttribute(`data:pieClicked`,`false`);let t=e.getAttribute(`data:pathOrig`);t&&e.setAttribute(`d`,t)}),t.interact.capturedDataPointIndex=e,i.attr(`data:pieClicked`,`true`)}let a=parseInt(i.attr(`data:startAngle`),10),o=parseInt(i.attr(`data:angle`),10),s=n.getPiePath({me:n,startAngle:a,angle:o,size:r});o!==360&&i.plot(s)}getChangedPath(e,t){let n=``;return this.dynamicAnim&&this.w.globals.dataChanged&&(n=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),n}getPiePath({me:e,startAngle:t,angle:n,size:r}){let i,a=new I(this.w),o=t,s=Math.PI*(o-90)/180,c=n+t;Math.ceil(c)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);let l=Math.PI*(c-90)/180,u=e.centerX+r*Math.cos(s),d=e.centerY+r*Math.sin(s),f=e.centerX+r*Math.cos(l),p=e.centerY+r*Math.sin(l),m=y.polarToCartesian(e.centerX,e.centerY,e.donutSize,c),h=y.polarToCartesian(e.centerX,e.centerY,e.donutSize,o),g=+(n>180),_=[`M`,u,d,`A`,r,r,0,g,1,f,p];return i=e.chartType===`donut`?[..._,`L`,m.x,m.y,`A`,e.donutSize,e.donutSize,0,g,0,h.x,h.y,`L`,u,d,`z`].join(` `):e.chartType===`pie`||e.chartType===`polarArea`?[..._,`L`,e.centerX,e.centerY,`L`,u,d].join(` `):[..._].join(` `),a.roundPathCorners(i,this.strokeWidth*2)}drawPolarElements(e){let t=this.w,n=new ie(this.w),r=new I(this.w),i=new Yt(this.w),a=r.group(),o=r.group(),s=n.niceScale(0,Math.ceil(this.maxY),0),c=s.result.reverse(),l=s.result.length;this.maxY=s.niceMax;let u=t.globals.radialSize,d=u/(l-1);for(let e=0;e<l-1;e++){let n=r.drawCircle(u);if(n.attr({cx:this.centerX,cy:this.centerY,fill:`none`,"stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){let n=i.drawYAxisTexts(this.centerX,this.centerY-u+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,e,c[e]);o.add(n)}a.add(n),u-=d}this.drawSpokes(e),e.add(a),e.add(o)}renderInnerDataLabels(e,t,n){let r=this.w,i=new I(this.w),a=t.total.show;e.node.innerHTML=``,e.node.style.opacity=n.opacity;let o=n.centerX,s=this.donutDataLabels.total.label?n.centerY:n.centerY-n.centerY/6,c,l;c=t.name.color===void 0?r.globals.colors[0]:t.name.color;let u=t.name.fontSize,d=t.name.fontFamily,f=t.name.fontWeight;l=t.value.color===void 0?r.config.chart.foreColor:t.value.color;let p=t.value.formatter,m=``,h=``;if(a?(c=t.total.color,u=t.total.fontSize,d=t.total.fontFamily,f=t.total.fontWeight,h=this.donutDataLabels.total.label?t.total.label:``,m=t.total.formatter(r)):r.seriesData.series.length===1&&(m=p(r.seriesData.series[0],r),h=r.seriesData.seriesNames[0]),h&&=t.name.formatter(h,t.total.show,r),t.name.show){let n=i.drawText({x:o,y:s+parseFloat(t.name.offsetY),text:h,textAnchor:`middle`,foreColor:c,fontSize:u,fontWeight:f,fontFamily:d});n.node.classList.add(`apexcharts-datalabel-label`),e.add(n)}if(t.value.show){let n=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,r=i.drawText({x:o,y:s+n,text:m,textAnchor:`middle`,foreColor:l,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});r.node.classList.add(`apexcharts-datalabel-value`),e.add(r)}return e}printInnerLabels(e,t,n,r){let i=this.w,a;r?a=e.name.color===void 0?i.globals.colors[parseInt(r.parentNode.getAttribute(`rel`),10)-1]:e.name.color:i.seriesData.series.length>1&&e.total.show&&(a=e.total.color);let o=i.dom.baseEl.querySelector(`.apexcharts-datalabel-label`),s=i.dom.baseEl.querySelector(`.apexcharts-datalabel-value`),c=e.value.formatter;n=c(n,i),!r&&typeof e.total.formatter==`function`&&(n=e.total.formatter(i));let l=t===e.total.label;t=this.donutDataLabels.total.label?e.name.formatter(t,l,i):``,o!==null&&(o.textContent=t),s!==null&&(s.textContent=n),o!==null&&(o.style.fill=a)}printDataLabelsInner(e,t){let n=this.w,r=e.getAttribute(`data:value`),i=n.seriesData.seriesNames[parseInt(e.parentNode.getAttribute(`rel`),10)-1];n.seriesData.series.length>1&&this.printInnerLabels(t,i,r,e);let a=n.dom.baseEl.querySelector(`.apexcharts-datalabels-group`);a!==null&&(a.style.opacity=1)}drawSpokes(e){let t=this.w,n=new I(this.w),r=t.config.plotOptions.polarArea.spokes;if(r.strokeWidth===0)return;let i=[],a=360/t.seriesData.series.length;for(let e=0;e<t.seriesData.series.length;e++)i.push(y.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+a*e));i.forEach((t,i)=>{let a=n.drawLine(t.x,t.y,this.centerX,this.centerY,Array.isArray(r.connectorColors)?r.connectorColors[i]:r.connectorColors);e.add(a)})}revertDataLabelsInner(){let e=this.w;if(this.donutDataLabels.show){let t=e.dom.Paper.findOne(`.apexcharts-datalabels-group`),n=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(`.apexcharts-radialbar, .apexcharts-pie`).add(n)}}},Zt=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new I(this.w),this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=e.globals.svgHeight<e.globals.svgWidth?e.layout.gridHeight:e.layout.gridWidth,this.isLog=e.config.yaxis[0].logarithmic,this.logBase=e.config.yaxis[0].logBase,this.coreUtils=new N(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,e.globals.maxY,0):e.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):e.globals.minY,this.polygons=e.config.plotOptions.radar.polygons,this.strokeWidth=e.config.stroke.show?e.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-e.config.chart.dropShadow.blur,e.config.xaxis.labels.show&&(this.size-=e.layout.xAxisLabelsWidth/1.75),e.config.plotOptions.radar.size!==void 0&&(this.size=e.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}draw(e){let t=this.w,n=new z(this.w),r=[],i=new V(this.w,this.ctx);e.length&&(this.dataPointsLen=e[t.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;let a=t.layout.gridWidth/2,o=t.layout.gridHeight/2,l=a+t.config.plotOptions.radar.offsetX,u=o+t.config.plotOptions.radar.offsetY,d=this.graphics.group({class:`apexcharts-radar-series apexcharts-plot-series`,transform:`translate(${l||0}, ${u||0})`}),f=[],p=null,m=null;if(this.yaxisLabels=this.graphics.group({class:`apexcharts-yaxis`}),e.forEach((e,a)=>{let o=e.length===t.globals.dataPoints,l=this.graphics.group().attr({class:`apexcharts-series`,"data:longestSeries":o,seriesName:y.escapeString(t.seriesData.seriesNames[a]),rel:a+1,"data:realIndex":a});this.dataRadiusOfPercent[a]=[],this.dataRadius[a]=[],this.angleArr[a]=[],e.forEach((e,t)=>{let n=Math.abs(this.maxValue-this.minValue);e-=this.minValue,this.isLog&&(e=this.coreUtils.getLogVal(this.logBase,e,0)),this.dataRadiusOfPercent[a][t]=e/n,this.dataRadius[a][t]=this.dataRadiusOfPercent[a][t]*this.size,this.angleArr[a][t]=t*this.disAngle}),f=this.getDataPointsPos(this.dataRadius[a],this.angleArr[a]);let u=this.createPaths(f,{x:0,y:0});p=this.graphics.group({class:`apexcharts-series-markers-wrap apexcharts-element-hidden`}),m=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":a}),t.globals.delayedElements.push({el:p.node,index:a});let d={i:a,realIndex:a,animationDelay:a,initialSpeed:t.config.chart.animations.speed,dataChangeSpeed:t.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-radar`,shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:t.globals.stroke.colors[a],strokeLineCap:t.config.stroke.lineCap},h=null;t.globals.previousPaths.length>0&&(h=this.getPreviousPath(a));for(let e=0;e<u.linePathsTo.length;e++){let r=this.graphics.renderPaths(c(s({},d),{pathFrom:h===null?u.linePathsFrom[e]:h,pathTo:u.linePathsTo[e],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[a]:this.strokeWidth,fill:`none`,drawShadow:!1}));l.add(r);let i=n.fillPath({seriesNumber:a}),o=this.graphics.renderPaths(c(s({},d),{pathFrom:h===null?u.areaPathsFrom[e]:h,pathTo:u.areaPathsTo[e],strokeWidth:0,fill:i,drawShadow:!1}));if(t.config.chart.dropShadow.enabled){let e=new F(this.w),n=t.config.chart.dropShadow;e.dropShadow(o,Object.assign({},n,{noUserSpaceOnUse:!0}),a)}l.add(o)}e.forEach((e,n)=>{let r=new B(this.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:a,dataPointIndex:n}),o=this.graphics.drawMarker(f[n].x,f[n].y,r);o.attr(`rel`,n),o.attr(`j`,n),o.attr(`index`,a),o.node.setAttribute(`default-marker-size`,r.pSize);let c=this.graphics.group({class:`apexcharts-series-markers`});c&&c.add(o),p.add(c),l.add(p);let u=t.config.dataLabels;if(u.enabled){let e=u.formatter(t.seriesData.series[a][n],{seriesIndex:a,dataPointIndex:n,w:t});i.plotDataLabelsText({x:f[n].x,y:f[n].y,text:e,textAnchor:`middle`,i:a,j:a,parent:m,offsetCorrection:!1,dataLabelsConfig:s({},u)})}l.add(m)}),r.push(l)}),this.drawPolygons({parent:d}),t.config.xaxis.labels.show){let e=this.drawXAxisTexts();d.add(e)}return r.forEach(e=>{d.add(e)}),d.add(this.yaxisLabels),d}drawPolygons(e){let t=this.w,{parent:n}=e,r=new Yt(this.w),i=t.globals.yAxisScale[0].result.reverse(),a=i.length,o=[],s=this.size/(a-1);for(let e=0;e<a;e++)o[e]=s*e;o.reverse();let c=[],l=[];o.forEach((e,t)=>{let n=y.getPolygonPos(e,this.dataPointsLen),r=``;n.forEach((e,n)=>{if(t===0){let t=this.graphics.drawLine(e.x,e.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[n]:this.polygons.connectorColors);l.push(t)}n===0&&this.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),r+=e.x+`,`+e.y+` `}),c.push(r)}),c.forEach((e,r)=>{let i=this.polygons.strokeColors,a=this.polygons.strokeWidth,o=this.graphics.drawPolygon(e,Array.isArray(i)?i[r]:i,Array.isArray(a)?a[r]:a,t.globals.radarPolygons.fill.colors[r]);n.add(o)}),l.forEach(e=>{n.add(e)}),t.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((e,t)=>{let n=r.drawYAxisTexts(e.x,e.y,t,i[t]);this.yaxisLabels.add(n)})}drawXAxisTexts(){let e=this.w,t=e.config.xaxis.labels,n=this.graphics.group({class:`apexcharts-xaxis`}),r=y.getPolygonPos(this.size,this.dataPointsLen);return e.labelData.labels.forEach((i,a)=>{let o=e.config.xaxis.labels.formatter,c=new V(this.w,this.ctx);if(r[a]){let l=this.getTextPos(r[a],this.size),u=o(i,{seriesIndex:-1,dataPointIndex:a,w:e});c.plotDataLabelsText({x:l.newX,y:l.newY,text:u,textAnchor:l.textAnchor,i:a,j:a,parent:n,className:`apexcharts-xaxis-label`,color:Array.isArray(t.style.colors)&&t.style.colors[a]?t.style.colors[a]:`#a8a8a8`,dataLabelsConfig:s({textAnchor:l.textAnchor,dropShadow:{enabled:!1}},t),offsetCorrection:!1}).on(`click`,t=>{if(typeof e.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},e,{labelIndex:a});e.config.chart.events.xAxisLabelClick(t,this.ctx,n)}})}}),n}createPaths(e,t){let n=[],r=[],i=[],a=[];if(e.length){r=[this.graphics.move(t.x,t.y)],a=[this.graphics.move(t.x,t.y)];let o=this.graphics.move(e[0].x,e[0].y),s=this.graphics.move(e[0].x,e[0].y);e.forEach((t,n)=>{o+=this.graphics.line(t.x,t.y),s+=this.graphics.line(t.x,t.y),n===e.length-1&&(o+=`Z`,s+=`Z`)}),n.push(o),i.push(s)}return{linePathsFrom:r,linePathsTo:n,areaPathsFrom:a,areaPathsTo:i}}getTextPos(e,t){let n=`middle`,r=e.x,i=e.y;return Math.abs(e.x)>=10?e.x>0?(n=`start`,r+=10):e.x<0&&(n=`end`,r-=10):n=`middle`,Math.abs(e.y)>=t-10&&(e.y<0?i-=10:e.y>0&&(i+=10)),{textAnchor:n,newX:r,newY:i}}getPreviousPath(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(e,10)&&typeof t.globals.previousPaths[r].paths[0]<`u`&&(n=t.globals.previousPaths[r].paths[0].d)}return n}getDataPointsPos(e,t,n=this.dataPointsLen){e||=[],t||=[];let r=[];for(let i=0;i<n;i++){let n={};n.x=e[i]*Math.sin(t[i]),n.y=-e[i]*Math.cos(t[i]),r.push(n)}return r}},Qt=class extends Xt{constructor(e,t){super(e,t),this.ctx=t,this.w=e,this.animBeginArr=[0],this.animDur=0,this.startAngle=e.config.plotOptions.radialBar.startAngle,this.endAngle=e.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle),this.trackStartAngle=e.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=e.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||=this.startAngle,this.trackEndAngle||=this.endAngle,this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(e.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(e){let t=this.w,n=new I(this.w),r=n.group({class:`apexcharts-radialbar`});if(t.globals.noData)return r;let i=n.group(),a=this.defaultSize/2,o=t.layout.gridWidth/2,s=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(s=s-t.config.stroke.width-t.config.chart.dropShadow.blur);let c=t.globals.fill.colors;if(t.config.plotOptions.radialBar.track.show){let t=this.drawTracks({size:s,centerX:o,centerY:a,colorArr:c,series:e});i.add(t)}let l=this.drawArcs({size:s,centerX:o,centerY:a,colorArr:c,series:e}),u=360;t.config.plotOptions.radialBar.startAngle<0&&(u=this.totalAngle);let d=(360-u)/360;if(t.globals.radialSize=s-s*d,this.radialDataLabels.value.show){let e=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=e*d}return i.add(l.g),t.config.plotOptions.radialBar.hollow.position===`front`&&(l.g.add(l.elHollow),l.dataLabels&&l.g.add(l.dataLabels)),r.add(i),r}drawTracks(e){let t=this.w,n=new I(this.w),r=n.group({class:`apexcharts-tracks`}),i=new F(this.w),a=new z(this.w),o=this.getStrokeWidth(e);e.size-=o/2;for(let s=0;s<e.series.length;s++){let c=n.group({class:`apexcharts-radialbar-track apexcharts-track`});r.add(c),c.attr({rel:s+1}),e.size=e.size-o-this.margin;let l=t.config.plotOptions.radialBar.track,u=a.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(l.background)?l.background[s]:l.background,solid:!0}),d=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);let p=n.drawPath({d:``,stroke:u,strokeWidth:o*parseInt(l.strokeWidth,10)/100,fill:`none`,strokeOpacity:l.opacity,classes:`apexcharts-radialbar-area`});if(l.dropShadow.enabled){let e=l.dropShadow;i.dropShadow(p,e)}c.add(p),p.attr(`id`,`apexcharts-radialbarTrack-`+s),this.animatePaths(p,{centerX:e.centerX,centerY:e.centerY,endAngle:f,startAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}drawArcs(e){let t=this.w,n=new I(this.w),r=new z(this.w),i=new F(this.w),a=n.group(),o=this.getStrokeWidth(e);e.size-=o/2;let s=t.config.plotOptions.radialBar.hollow.background,c=e.size-o*e.series.length-this.margin*e.series.length-o*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,l=c-t.config.plotOptions.radialBar.hollow.margin;t.config.plotOptions.radialBar.hollow.image!==void 0&&(s=this.drawHollowImage(e,a,c,s));let u=this.drawHollow({size:l,centerX:e.centerX,centerY:e.centerY,fill:s||`transparent`});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){let e=t.config.plotOptions.radialBar.hollow.dropShadow;i.dropShadow(u,e)}let d=1;!this.radialDataLabels.total.show&&t.seriesData.series.length>1&&(d=0);let f=null;if(this.radialDataLabels.show){let n=t.dom.Paper.findOne(`.apexcharts-datalabels-group`);f=this.renderInnerDataLabels(n,this.radialDataLabels,{hollowSize:c,centerX:e.centerX,centerY:e.centerY,opacity:d})}t.config.plotOptions.radialBar.hollow.position===`back`&&(a.add(u),f&&a.add(f));let p=!1;t.config.plotOptions.radialBar.inverseOrder&&(p=!0);for(let s=p?e.series.length-1:0;p?s>=0:s<e.series.length;p?s--:s++){let c=n.group({class:`apexcharts-series apexcharts-radial-series`,seriesName:y.escapeString(t.seriesData.seriesNames[s])});a.add(c),c.attr({rel:s+1,"data:realIndex":s}),W.addCollapsedClassToSeries(this.w,c,s),e.size=e.size-o-this.margin;let l=r.fillPath({seriesNumber:s,size:e.size,value:e.series[s]}),u=this.startAngle,d,f=y.negToZero(e.series[s]>100?100:e.series[s])/100,p=Math.round(this.totalAngle*f)+this.startAngle,m;t.globals.dataChanged&&(d=this.startAngle,m=Math.round(this.totalAngle*y.negToZero(t.globals.previousPaths[s])/100)+d),Math.abs(p)+Math.abs(u)>360&&(p-=.01),Math.abs(m)+Math.abs(d)>360&&(m-=.01);let h=p-u,g=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[s]:t.config.stroke.dashArray,_=n.drawPath({d:``,stroke:l,strokeWidth:o,fill:`none`,fillOpacity:t.config.fill.opacity,classes:`apexcharts-radialbar-area apexcharts-radialbar-slice-`+s,strokeDashArray:g}),v=u+h/2,b=y.polarToCartesian(e.centerX,e.centerY,e.size,v);if(I.setAttrs(_.node,{"data:angle":h,"data:value":e.series[s],"data:cx":b.x,"data:cy":b.y}),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;i.dropShadow(_,e,s)}if(i.setSelectionFilter(_,0,s),this.addListeners(_,this.radialDataLabels),c.add(_),_.attr({index:0,j:s}),this.barLabels.enabled){let r=y.polarToCartesian(e.centerX,e.centerY,e.size,u),i=this.barLabels.formatter(t.seriesData.seriesNames[s],{seriesIndex:s,w:t}),a=[`apexcharts-radialbar-label`];this.barLabels.onClick||a.push(`apexcharts-no-click`);let o=this.barLabels.useSeriesColors?t.globals.colors[s]:t.config.chart.foreColor;o||=t.config.chart.foreColor;let l=r.x+this.barLabels.offsetX,d=r.y+this.barLabels.offsetY,f=n.drawText({x:l,y:d,text:i,textAnchor:`end`,dominantBaseline:`middle`,fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:o,cssClass:a.join(` `)});f.on(`click`,this.onBarLabelClick),f.attr({rel:s+1}),u!==0&&f.attr({"transform-origin":`${l} ${d}`,transform:`rotate(${u} 0 0)`}),c.add(f)}let x=0;this.initialAnim&&!t.globals.resized&&!t.globals.dataChanged&&(x=t.config.chart.animations.speed),t.globals.dataChanged&&(x=t.config.chart.animations.dynamicAnimation.speed),this.animDur=x/(e.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(_,{centerX:e.centerX,centerY:e.centerY,endAngle:p,startAngle:u,prevEndAngle:m,prevStartAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:this.animBeginArr,dur:x,shouldSetPrevPaths:!0})}return{g:a,elHollow:u,dataLabels:f}}drawHollow(e){let t=new I(this.w).drawCircle(e.size*2);return t.attr({class:`apexcharts-radialbar-hollow`,cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill}),t}drawHollowImage(e,t,n,r){let i=this.w,a=new z(this.w),o=y.randomId(),s=i.config.plotOptions.radialBar.hollow.image;if(i.config.plotOptions.radialBar.hollow.imageClipped)a.clippedImgArea({width:n,height:n,image:s,patternID:`pattern${i.globals.cuid}${o}`}),r=`url(#pattern${i.globals.cuid}${o})`;else{let n=i.config.plotOptions.radialBar.hollow.imageWidth,r=i.config.plotOptions.radialBar.hollow.imageHeight;if(n===void 0&&r===void 0){let n=i.dom.Paper.image(s,function(t){this.move(e.centerX-t.width/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+i.config.plotOptions.radialBar.hollow.imageOffsetY)});t.add(n)}else{let a=i.dom.Paper.image(s,function(){this.move(e.centerX-n/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-r/2+i.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(n,r)});t.add(a)}}return r}getStrokeWidth(e){let t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}onBarLabelClick(e){let t=parseInt(e.target.getAttribute(`rel`),10)-1,n=this.barLabels.onClick,r=this.w;n&&n(r.seriesData.seriesNames[t],{w:r,seriesIndex:t})}},$t=class extends Z{draw(e,t){let n=this.w,r=new I(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=n.rangeData.seriesRangeStart,this.seriesRangeEnd=n.rangeData.seriesRangeEnd,this.barHelpers.initVariables(e);let i=r.group({class:`apexcharts-rangebar-series apexcharts-plot-series`});for(let a=0;a<e.length;a++){let o,c,l=n.globals.comboCharts?t[a]:a,{columnGroupIndex:u}=this.barHelpers.getGroupIndex(l),d=r.group({class:`apexcharts-series`,seriesName:y.escapeString(n.seriesData.seriesNames[l]),rel:a+1,"data:realIndex":l});W.addCollapsedClassToSeries(this.w,d,l),e[a].length>0&&(this.visibleI+=1);let f=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[l][0],f=l);let p=this.barHelpers.initialPositions(l),{y:m,zeroW:h,x:g,xDivision:_,yDivision:v,zeroH:b}=p,x=p.barWidth,S=p.barHeight;c=m,o=g;let C=r.group({class:`apexcharts-datalabels`,"data:realIndex":l}),w=r.group({class:`apexcharts-rangebar-goals-markers`});for(let t=0;t<n.globals.dataPoints;t++){let r=this.barHelpers.getStrokeWidth(a,t,l),i=this.seriesRangeStart[a][t],m=this.seriesRangeEnd[a][t],g=null,y=null,T=null,E={x:o,y:c,strokeWidth:r,elSeries:d},D=this.seriesLen;if(n.config.plotOptions.bar.rangeBarGroupRows&&(D=1),typeof n.config.series[a].data[t]>`u`)break;if(this.isHorizontal){T=c+S*this.visibleI;let e=(v-S*D)/2;if(n.config.series[a].data[t].x){let n=this.detectOverlappingBars({i:a,j:t,barYPosition:T,srty:e,barHeight:S,yDivision:v,initPositions:p});S=n.barHeight,T=n.barYPosition}g=this.drawRangeBarPaths(s({indexes:{i:a,j:t,realIndex:l},barHeight:S,barYPosition:T,zeroW:h,yDivision:v,y1:i,y2:m},E)),x=g.barWidth}else{n.axisFlags.isXNumeric&&(o=(n.seriesData.seriesX[a][t]-n.globals.minX)/this.xRatio-x/2),y=o+x*this.visibleI;let e=(_-x*D)/2;if(n.config.series[a].data[t].x){let n=this.detectOverlappingBars({i:a,j:t,barXPosition:y,srtx:e,barWidth:x,xDivision:_,initPositions:p});x=n.barWidth,y=n.barXPosition}g=this.drawRangeColumnPaths(s({indexes:{i:a,j:t,realIndex:l,translationsIndex:f},barWidth:x,barXPosition:y,zeroH:b,xDivision:_},E)),S=g.barHeight}let O=this.barHelpers.drawGoalLine({barXPosition:g.barXPosition,barYPosition:T,goalX:g.goalX,goalY:g.goalY,barHeight:S,barWidth:x});O&&w.add(O),c=g.y,o=g.x;let k=this.barHelpers.getPathFillColor(e,a,t,l);this.renderSeries({realIndex:l,pathFill:k.color,lineFill:k.useRangeColor?k.color:n.globals.stroke.colors[l],j:t,i:a,x:o,y:c,y1:i,y2:m,pathFrom:g.pathFrom,pathTo:g.pathTo,strokeWidth:r,elSeries:d,series:e,barHeight:S,barWidth:x,barXPosition:y,barYPosition:T,columnGroupIndex:u,elDataLabelsWrap:C,elGoalsMarkers:w,visibleSeries:this.visibleI,type:`rangebar`})}i.add(d)}return i}detectOverlappingBars({i:e,j:t,barYPosition:n,barXPosition:r,srty:i,srtx:a,barHeight:o,barWidth:s,yDivision:c,xDivision:l,initPositions:u}){let d=this.w,f=[],p=d.config.series[e].data[t].rangeName,m=d.config.series[e].data[t].x,h=Array.isArray(m)?m.join(` `):m,g=d.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(h),_=d.rangeData.seriesRange[e].findIndex(e=>e.x===h&&e.overlaps.length>0);return this.isHorizontal?(n=d.config.plotOptions.bar.rangeBarGroupRows?i+c*g:i+o*this.visibleI+c*g,_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=d.rangeData.seriesRange[e][_].overlaps,f.indexOf(p)>-1&&(o=u.barHeight/f.length,n=o*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+f.indexOf(p))+c*g))):(g>-1&&!d.labelData.timescaleLabels.length&&(r=d.config.plotOptions.bar.rangeBarGroupRows?a+l*g:a+s*this.visibleI+l*g),_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=d.rangeData.seriesRange[e][_].overlaps,f.indexOf(p)>-1&&(s=u.barWidth/f.length,r=s*this.visibleI+l*(100-parseInt(this.barOptions.barWidth,10))/100/2+s*(this.visibleI+f.indexOf(p))+l*g))),{barYPosition:n,barXPosition:r,barHeight:o,barWidth:s}}drawRangeColumnPaths({indexes:e,x:t,xDivision:n,barWidth:r,barXPosition:i,zeroH:a}){let o=this.w,{i:s,j:c,realIndex:l,translationsIndex:u}=e,d=this.yRatio[u],f=this.getRangeValue(l,c),p=Math.min(f.start,f.end),m=Math.max(f.start,f.end);typeof this.series[s][c]>`u`||this.series[s][c]===null?p=a:(p=a-p/d,m=a-m/d);let h=Math.abs(m-p),g=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:r,y1:p,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l,i:l,j:c,w:o});if(!o.axisFlags.isXNumeric)t+=n;else{let e=this.getBarXForNumericXAxis({x:t,j:c,realIndex:l,barWidth:r});t=e.x,i=e.barXPosition}return{pathTo:g.pathTo,pathFrom:g.pathFrom,barHeight:h,x:t,y:f.start<0&&f.end<0?p:m,goalY:this.barHelpers.getGoalValues(`y`,null,a,s,c,u),barXPosition:i}}preventBarOverflow(e){let t=this.w;return e<0&&(e=0),e>t.layout.gridWidth&&(e=t.layout.gridWidth),e}drawRangeBarPaths({indexes:e,y:t,y1:n,y2:r,yDivision:i,barHeight:a,barYPosition:o,zeroW:s}){let c=this.w,{realIndex:l,j:u}=e,d=this.preventBarOverflow(s+n/this.invertedYRatio),f=this.preventBarOverflow(s+r/this.invertedYRatio),p=this.getRangeValue(l,u),m=Math.abs(f-d),h=this.barHelpers.getBarpaths({barYPosition:o,barHeight:a,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l,realIndex:l,j:u,w:c});return c.axisFlags.isXNumeric||(t+=i),{pathTo:h.pathTo,pathFrom:h.pathFrom,barWidth:m,x:p.start<0&&p.end<0?d:f,goalX:this.barHelpers.getGoalValues(`x`,s,null,l,u),y:t}}getRangeValue(e,t){let n=this.w;return{start:n.rangeData.seriesRangeStart[e][t],end:n.rangeData.seriesRangeEnd[e][t]}}};function en(e,t){let n=0;for(let t=0;t<e.length;t++)n+=e[t];let r=t/n,i=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]*r;return i}function tn(e,t,n,r){let i=r*r,a=n*n;return Math.max(i*t/a,a/(i*e))}function nn(e,t,n,r,i,a){return e===0?!0:tn(t,n,r,a)>=tn(Math.min(t,i),Math.max(n,i),r+i,a)}function rn(e,t,n,r,i,a,o,s){if(o>=s){let o=r/s,c=a;for(let r=0;r<n;r++){let n=t[r]/o;e.push([i,c,i+o,c+n]),c+=n}}else{let s=r/o,c=i;for(let r=0;r<n;r++){let n=t[r]/s;e.push([c,a,c+n,a+s]),c+=n}}}function an(e,t,n,r,i){let a=[],o=e.length;if(o===0)return a;let s=Array(o),c=0,l=0,u=1/0,d=-1/0,f=0;for(;f<o;){let o=Math.min(r,i),p=e[f];if(nn(c,u,d,l,p,o))s[c]=p,c++,l+=p,p<u&&(u=p),p>d&&(d=p),f++;else{if(rn(a,s,c,l,t,n,r,i),r>=i){let e=l/i;t+=e,r-=e}else{let e=l/r;n+=e,i-=e}c=0,l=0,u=1/0,d=-1/0}}return c>0&&rn(a,s,c,l,t,n,r,i),a}function on(e,t,n){let r=e.length,i=Array(r);for(let t=0;t<r;t++){let n=0,r=e[t];for(let e=0;e<r.length;e++)n+=r[e];i[t]=n}let a=an(en(i,t*n),0,0,t,n),o=Array(r);for(let t=0;t<r;t++){let n=a[t],r=n[0],i=n[1],s=n[2]-r,c=n[3]-i;o[t]=an(en(e[t],s*c),r,i,s,c)}return o}var sn={generate:on},cn=class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Vt(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(e){let t=this.w,n=new I(this.w,this.ctx),r=new z(this.w),i=n.group({class:`apexcharts-treemap`});if(t.globals.noData)return i;let a=[];return e.forEach(e=>{let t=e.map(e=>Math.abs(e));a.push(t)}),this.negRange=this.helpers.checkColorRange(),t.config.series.forEach((e,t)=>{e.data.forEach(e=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),this.labels[t].push(e.x)})}),sn.generate(a,t.layout.gridWidth,t.layout.gridHeight).forEach((a,o)=>{let s=n.group({class:`apexcharts-series apexcharts-treemap-series`,seriesName:y.escapeString(t.seriesData.seriesNames[o]),rel:o+1,"data:realIndex":o});if(n.setupEventDelegation(s,`.apexcharts-treemap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new F(this.w).dropShadow(i,e,o)}let c=n.group({class:`apexcharts-data-labels`}),l={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};a.forEach((i,a)=>{let c=i[0],u=i[1],d=i[2],f=i[3];l.xMin=Math.min(l.xMin,c),l.yMin=Math.min(l.yMin,u),l.xMax=Math.max(l.xMax,d),l.yMax=Math.max(l.yMax,f);let p=this.helpers.getShadeColor(t.config.chart.type,o,a,this.negRange),m=p.color,h=r.fillPath({color:m,seriesNumber:o,dataPointIndex:a}),g=n.drawRect(c,u,d-c,f-u,t.config.plotOptions.treemap.borderRadius,`#fff`,1,this.strokeWidth,t.config.plotOptions.treemap.useFillColorAsStroke?m:t.globals.stroke.colors[o]);g.attr({cx:c,cy:u,index:o,i:o,j:a,width:d-c,height:f-u,fill:h}),g.node.classList.add(`apexcharts-treemap-rect`);let _={x:c+(d-c)/2,y:u+(f-u)/2,width:0,height:0},v={x:c,y:u,width:d-c,height:f-u};if(t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateTreemap(g,_,v,e)}if(t.globals.dataChanged){let e=1;this.dynamicAnim.enabled&&t.globals.shouldAnimate&&(e=this.dynamicAnim.speed,t.globals.previousPaths[o]&&t.globals.previousPaths[o][a]&&t.globals.previousPaths[o][a].rect&&(_=t.globals.previousPaths[o][a].rect),this.animateTreemap(g,_,v,e))}let y=this.getFontSize(i),b=t.config.dataLabels.formatter(this.labels[o][a],{value:t.seriesData.series[o][a],seriesIndex:o,dataPointIndex:a,w:t});t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(y=parseInt(t.config.dataLabels.style.fontSize,10),b=this.truncateLabels(b,y,c,u,d,f));let x=null;t.seriesData.series[o][a]&&(x=this.helpers.calculateDataLabels({text:b,x:(c+d)/2,y:(u+f)/2+this.strokeWidth/2+y/3,i:o,j:a,colorProps:p,fontSize:y,series:e})),t.config.dataLabels.enabled&&x&&this.rotateToFitLabel(x,y,b,c,u,d,f),s.add(g),x!==null&&s.add(x)});let u=t.config.plotOptions.treemap.seriesTitle;if(t.config.series.length>1&&u&&u.show){let e=t.config.series[o].name||``;if(e&&l.xMin<1/0&&l.yMin<1/0){let{offsetX:r,offsetY:i,borderColor:a,borderWidth:o,borderRadius:c,style:d}=u,f=d.color||t.config.chart.foreColor,p={left:d.padding.left,right:d.padding.right,top:d.padding.top,bottom:d.padding.bottom},m=n.getTextRects(e,d.fontSize,d.fontFamily),h=m.width+p.left+p.right,g=m.height+p.top+p.bottom,_=l.xMin+(r||0),v=l.yMin+(i||0),y=n.drawRect(_,v,h,g,c,d.background,1,o,a),b=n.drawText({x:_+p.left,y:v+p.top+m.height*.75,text:e,fontSize:d.fontSize,fontFamily:d.fontFamily,fontWeight:d.fontWeight,foreColor:f,cssClass:d.cssClass||``});s.add(y),s.add(b)}}s.add(c),i.add(s)}),i}getFontSize(e){let t=this.w;function n(e){let t,r=0;if(Array.isArray(e[0]))for(t=0;t<e.length;t++)r+=n(e[t]);else for(t=0;t<e.length;t++)r+=e[t].length;return r}function r(e){let t,n=0;if(Array.isArray(e[0]))for(t=0;t<e.length;t++)n+=r(e[t]);else for(t=0;t<e.length;t++)n+=1;return n}let i=n(this.labels)/r(this.labels);function a(e,n){let r=e*n;return Math.min(r**.5/i,parseInt(t.config.dataLabels.style.fontSize,10))}return a(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,n,r,i,a,o){let s=new I(this.w),c=s.getTextRects(n,t);if(c.width+this.w.config.stroke.width+5>a-r&&c.width<=o-i){let t=s.rotateAroundCenter(e.node);e.node.setAttribute(`transform`,`rotate(-90 ${t.x} ${t.y}) translate(${c.height/3})`)}}truncateLabels(e,t,n,r,i,a){let o=new I(this.w),s=o.getTextRects(e,t).width+this.w.config.stroke.width+5>i-n&&a-r>i-n?a-r:i-n,c=o.getTextBasedOnMaxWidth({text:e,maxWidth:s,fontSize:t});return e.length!==c.length&&s/t<5?``:c}animateTreemap(e,t,n,r){let i=new P(this.w);i.animateRect(e,t,n,r,()=>{i.animationCompleted(e)})}};X.use({line:Q,area:Q,scatter:Q,bubble:Q,rangeArea:Q,bar:Z,column:Z,barStacked:zt,rangeBar:$t,candlestick:Bt,boxPlot:Bt,pie:Xt,donut:Xt,polarArea:Xt,radialBar:Qt,radar:Zt,heatmap:Ht,treemap:cn});var ln=class{static renderToString(e){return u(this,arguments,function*(e,t={}){d.isSSR()&&v.init();let{width:n=400,height:r=300,scale:i=1}=t,a=new X(this._createVirtualElement(n,r),c(s({},e),{chart:c(s({},e.chart),{width:n,height:r,toolbar:{show:!1},animations:{enabled:!1}})}));try{yield a.render();let e=this._extractSVGString(a,i);return a.destroy(),e}catch(e){throw a.destroy(),Error(`SSR rendering failed: ${e.message}`)}})}static renderToHTML(e){return u(this,arguments,function*(e,t={}){let{className:n=``}=t,r=yield this.renderToString(e,t),i=this._encodeConfig(e);return`<div class="${`apexcharts-ssr-wrapper${n?` `+n:``}`}" data-apexcharts-hydrate data-apexcharts-config="${i}">
956
+ ${r}
957
+ </div>`})}static _createVirtualElement(e,t){if(d.isBrowser()){let n=document.createElement(`div`);return n.style.width=`${e}px`,n.style.height=`${t}px`,n}return{_ssrWidth:e,_ssrHeight:t,_ssrMode:!0,nodeType:1,nodeName:`DIV`,children:[],style:{},classList:{add:()=>{},remove:()=>{},contains:()=>!1},appendChild(e){this.children.push(e)},removeChild(e){let t=this.children.indexOf(e);t>-1&&this.children.splice(t,1)},querySelector(){return null},querySelectorAll(){return[]},getElementsByClassName(){return[]},getAttribute(){return null},setAttribute(){},removeAttribute(){},hasAttribute(){return!1},getBoundingClientRect(){return{width:this._ssrWidth,height:this._ssrHeight,top:0,left:0,right:this._ssrWidth,bottom:this._ssrHeight,x:0,y:0}},get parentNode(){return null},get isConnected(){return!0},getRootNode(){return this}}}static _extractSVGString(e,t=1){let n=e.w;if(!n||!n.dom||!n.dom.Paper)throw Error(`Chart not properly initialized`);let r=n.dom.Paper.node;if(d.isBrowser()&&r instanceof SVGElement){let e=new XMLSerializer().serializeToString(r);return t!==1&&(e=this._applyScale(e,t)),e}if(r&&typeof r.toString==`function`){let e=r.toString();return t!==1&&(e=this._applyScale(e,t)),e}throw Error(`Unable to extract SVG string from chart`)}static _applyScale(e,t){let n=e.match(/width="([^"]+)"/),r=e.match(/height="([^"]+)"/);if(n&&r){let i=parseFloat(n[1]),a=parseFloat(r[1]),o=i*t,s=a*t;e=e.replace(/width="[^"]+"/,`width="${o}"`).replace(/height="[^"]+"/,`height="${s}"`)}return e}static _encodeConfig(e){try{let t=JSON.stringify(e);return typeof Buffer<`u`?Buffer.from(t).toString(`base64`):typeof btoa<`u`?btoa(t):encodeURIComponent(t)}catch(e){throw Error(`Failed to encode config: ${e.message}`)}}static _decodeConfig(e){try{let t;return t=typeof Buffer<`u`?Buffer.from(e,`base64`).toString(`utf-8`):typeof atob<`u`?atob(e):decodeURIComponent(e),JSON.parse(t)}catch(e){throw Error(`Failed to decode config: ${e.message}`)}}},$=class{static hydrate(e,t={}){if(!d.isBrowser())throw Error(`Hydration can only be performed in browser environment`);if(!e)throw Error(`Element is required for hydration`);if(!e.hasAttribute(`data-apexcharts-hydrate`))throw Error(`Element does not have data-apexcharts-hydrate attribute`);let n=e.getAttribute(`data-apexcharts-config`);if(!n)throw Error(`Element is missing data-apexcharts-config attribute`);let r=this._decodeConfig(n),i=this._mergeConfigs(r,t),a=e.innerHTML,o=new X(e,i),s=e.getBoundingClientRect();return e.style.width=`${s.width}px`,e.style.height=`${s.height}px`,e.innerHTML=``,e.removeAttribute(`data-apexcharts-hydrate`),e.removeAttribute(`data-apexcharts-config`),o.render().then(()=>{e.setAttribute(`data-apexcharts-hydrated`,`true`),e.style.width=``,e.style.height=``;let t=new CustomEvent(`apexcharts:hydrated`,{detail:{chart:o,ssrContent:a}});e.dispatchEvent(t)}).catch(t=>{throw console.error(`ApexCharts hydration failed:`,t),e.innerHTML=a,e.setAttribute(`data-apexcharts-hydrate`,``),e.setAttribute(`data-apexcharts-config`,n),t}),o}static hydrateAll(e=`[data-apexcharts-hydrate]`,t={}){if(!d.isBrowser())throw Error(`Hydration can only be performed in browser environment`);let n=document.querySelectorAll(e);if(n.length===0)return console.warn(`No elements found matching selector: ${e}`),[];let r=[];return n.forEach(e=>{try{let n=this.hydrate(e,t);r.push(n)}catch(t){console.error(`Failed to hydrate element:`,e,t)}}),r}static isHydrated(e){return e?e.hasAttribute(`data-apexcharts-hydrated`):!1}static _decodeConfig(e){try{let t;return t=typeof atob<`u`?atob(e):typeof Buffer<`u`?Buffer.from(e,`base64`).toString(`utf-8`):decodeURIComponent(e),JSON.parse(t)}catch(e){throw Error(`Failed to decode chart config: ${e.message}`)}}static _mergeConfigs(e,t){let n=s(s({},e),t);return(e.chart||t.chart)&&(n.chart=s(s({},e.chart),t.chart),(n.chart.animations===void 0||n.chart.animations.enabled===!1)&&(n.chart.animations=c(s({},n.chart.animations||{}),{enabled:!0})),t.chart?.toolbar===void 0&&e.chart?.toolbar?.show===!1&&(n.chart.toolbar=c(s({},n.chart.toolbar||{}),{show:!0}))),n}};X.renderToString=ln.renderToString.bind(ln),X.renderToHTML=ln.renderToHTML.bind(ln),X.hydrate=$.hydrate.bind($),X.hydrateAll=$.hydrateAll.bind($),X.isHydrated=$.isHydrated.bind($);export{X as default};