@arcgis/map-components 5.0.0-next.92 → 5.0.0-next.94

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 (484) hide show
  1. package/dist/cdn/{HZDBJ2JH.js → 23NMM4CA.js} +2 -2
  2. package/dist/cdn/{NVFGMSZH.js → 25NOV3OI.js} +2 -2
  3. package/dist/cdn/{WU6RMTYJ.js → 2LNH4V6G.js} +1 -1
  4. package/dist/cdn/{S4YCMSWT.js → 2SOGUYHI.js} +2 -2
  5. package/dist/cdn/{XYH6VOK7.js → 2VSC537B.js} +2 -2
  6. package/dist/cdn/{MXH7C6IM.js → 2YZ5BZKX.js} +1 -1
  7. package/dist/cdn/{2DK7SRP6.js → 36HJJDU6.js} +2 -2
  8. package/dist/cdn/{5GVY3VJX.js → 3BD5ZO4C.js} +2 -2
  9. package/dist/cdn/{WZ6NKZZA.js → 3NATULT6.js} +2 -2
  10. package/dist/cdn/{CNKQ7MZX.js → 3OW4JSCM.js} +2 -2
  11. package/dist/cdn/{LBUL7H3K.js → 3UFQDU43.js} +2 -2
  12. package/dist/cdn/{JJ2BMPCB.js → 47Y26B7K.js} +2 -2
  13. package/dist/cdn/{SVEHL3HT.js → 4AOMFVDD.js} +2 -2
  14. package/dist/cdn/{P7LX2OK4.js → 4EFEUNIH.js} +2 -2
  15. package/dist/cdn/{DYQ5UU4K.js → 4EUOCTT6.js} +2 -2
  16. package/dist/cdn/{JE33CPCE.js → 4PJIG5VN.js} +2 -2
  17. package/dist/cdn/{AUNPO5WZ.js → 4Q7KG7AQ.js} +2 -2
  18. package/dist/cdn/{UJZNVEY4.js → 4QVC4F7V.js} +2 -2
  19. package/dist/cdn/{EBNKZMCI.js → 4WNQWXU5.js} +2 -2
  20. package/dist/cdn/{IZ6QELCQ.js → 4ZSPPVG3.js} +2 -2
  21. package/dist/cdn/{FEFDKT3G.js → 53BFFISV.js} +2 -2
  22. package/dist/cdn/{74QPIFS2.js → 53RZHNGK.js} +2 -2
  23. package/dist/cdn/{BH6X2ZRD.js → 5BILNS66.js} +2 -2
  24. package/dist/cdn/{IBN52EOC.js → 5CBISFZS.js} +2 -2
  25. package/dist/cdn/{5RRFOQBO.js → 5GZ7FAGP.js} +2 -2
  26. package/dist/cdn/{RPJ7PYJI.js → 5HJEWW54.js} +2 -2
  27. package/dist/cdn/{RBE574GA.js → 5KUX7YIX.js} +2 -2
  28. package/dist/cdn/{OY2FNXHE.js → 5MW5YOG7.js} +2 -2
  29. package/dist/cdn/{HIDXWWXK.js → 5NJV64BC.js} +2 -2
  30. package/dist/cdn/{UFIIJ5R3.js → 5UZ6XOCR.js} +2 -2
  31. package/dist/cdn/{XSBBQ2WV.js → 5WGYMHY4.js} +2 -2
  32. package/dist/cdn/{HNS4AQVJ.js → 5WSICMXU.js} +2 -2
  33. package/dist/cdn/{D4FAYT3J.js → 62VIAKWR.js} +2 -2
  34. package/dist/cdn/{FYIUMYGR.js → 64RBWLR2.js} +2 -2
  35. package/dist/cdn/{X6JS6JOQ.js → 6BSHVKSS.js} +2 -2
  36. package/dist/cdn/{7A3IV2NK.js → 6C664DPC.js} +2 -2
  37. package/dist/cdn/{CFAZ3H3S.js → 6CW4ANQH.js} +2 -2
  38. package/dist/cdn/{YFXERNVQ.js → 6IFE5PSL.js} +2 -2
  39. package/dist/cdn/{V7TUE55H.js → 6MKZF4K5.js} +2 -2
  40. package/dist/cdn/{L57LMROR.js → 6QSGLNBO.js} +2 -2
  41. package/dist/cdn/{SZLHYT5W.js → 6Z2WNVRK.js} +1 -1
  42. package/dist/cdn/{4Y57U7FU.js → 6ZWSGWRS.js} +2 -2
  43. package/dist/cdn/{ZE6PIKEL.js → 72JZYWQO.js} +2 -2
  44. package/dist/cdn/{WXJJ47QG.js → 75LS3PEC.js} +2 -2
  45. package/dist/cdn/{LIL24PIN.js → 7A43NBWP.js} +2 -2
  46. package/dist/cdn/{UAWLGRML.js → 7BWYR56J.js} +2 -2
  47. package/dist/cdn/{6PESQ2ZC.js → 7KP3AOP6.js} +2 -2
  48. package/dist/cdn/{GPQMTS6R.js → 7NXL4M7N.js} +2 -2
  49. package/dist/cdn/{MLS3ZO7M.js → 7UWE5XRI.js} +2 -2
  50. package/dist/cdn/{2E7TZRRV.js → A63SE5AG.js} +2 -2
  51. package/dist/cdn/{25IZDWSN.js → A7QJIV4D.js} +2 -2
  52. package/dist/cdn/{VV3CTLMJ.js → ACKCRSRW.js} +2 -2
  53. package/dist/cdn/{ZILPZPIM.js → ALBKKGJY.js} +2 -2
  54. package/dist/cdn/{VKH5H6RP.js → AQ2MADPU.js} +2 -2
  55. package/dist/cdn/{YNYENOUR.js → ASXD2JRK.js} +2 -2
  56. package/dist/cdn/{VZNLSB2B.js → AU4UXBIC.js} +2 -2
  57. package/dist/cdn/{QTJDDX33.js → AXZXO66J.js} +2 -2
  58. package/dist/cdn/{4K3ZXFR5.js → BCETZXMN.js} +2 -2
  59. package/dist/cdn/{24FZLFOK.js → BD7WG7LB.js} +2 -2
  60. package/dist/cdn/{JISIG2WA.js → BEMW5DQF.js} +2 -2
  61. package/dist/cdn/{VDCQFU5K.js → BIBGBLFX.js} +2 -2
  62. package/dist/cdn/{D7OM7PCI.js → BQ5ZNW33.js} +1 -1
  63. package/dist/cdn/{YVVQHIGY.js → BVQELKGS.js} +2 -2
  64. package/dist/cdn/{UTHU6WCL.js → BWIXWB3U.js} +2 -2
  65. package/dist/cdn/{GNVA4UPJ.js → BZ2WEN2R.js} +2 -2
  66. package/dist/cdn/{CITIZAZI.js → C7NOBB2N.js} +2 -2
  67. package/dist/cdn/{JHMIXJME.js → CEEJWBRI.js} +2 -2
  68. package/dist/cdn/CIBMEYJP.js +4 -0
  69. package/dist/cdn/{UBB55AI4.js → CNRDCIIJ.js} +2 -2
  70. package/dist/cdn/{TN4GQ5QN.js → COKWGGLK.js} +2 -2
  71. package/dist/cdn/CQTC7GCN.js +4 -0
  72. package/dist/cdn/{NNQHEALB.js → CS3LMJ2N.js} +2 -2
  73. package/dist/cdn/{MLWJILN6.js → CS4WL2BS.js} +2 -2
  74. package/dist/cdn/{2LRNI36V.js → CUBEFQB5.js} +2 -2
  75. package/dist/cdn/{MEJIVYKM.js → DDDP47NH.js} +2 -2
  76. package/dist/cdn/{G46MJ3MY.js → DGECEXLC.js} +2 -2
  77. package/dist/cdn/{7S7OOY2G.js → DJUZNSNM.js} +2 -2
  78. package/dist/cdn/{MMOSYXXD.js → DKIZDFM7.js} +2 -2
  79. package/dist/cdn/{DYUQ33TG.js → DLF645LP.js} +2 -2
  80. package/dist/cdn/{NQC5GIKN.js → DOUXYQIK.js} +2 -2
  81. package/dist/cdn/{MCLOWNAU.js → DUSGLVOY.js} +2 -2
  82. package/dist/cdn/{MXYKKHXU.js → DUZ7BHIU.js} +2 -2
  83. package/dist/cdn/E2TW7OIL.js +4 -0
  84. package/dist/cdn/{6POLNT3T.js → E2WDMMT7.js} +2 -2
  85. package/dist/cdn/{EXT3ZY7P.js → E5SRUHPA.js} +2 -2
  86. package/dist/cdn/{2WTZVJD5.js → ED25SVE2.js} +2 -2
  87. package/dist/cdn/{TQMZD3E7.js → EHNAGQEU.js} +2 -2
  88. package/dist/cdn/{QINV6BM4.js → EK2GACH3.js} +2 -2
  89. package/dist/cdn/{K2KINYI4.js → EPVIMN4Q.js} +2 -2
  90. package/dist/cdn/{BPYMQST7.js → EPZRYRI6.js} +2 -2
  91. package/dist/cdn/{DEBK2ZK4.js → ER7QSV4R.js} +1 -1
  92. package/dist/cdn/{KP4CU4J3.js → ERJV67EC.js} +2 -2
  93. package/dist/cdn/{QFO2IRTT.js → ES7DDOR3.js} +2 -2
  94. package/dist/cdn/{CFQNKQLP.js → EXAYRFE5.js} +2 -2
  95. package/dist/cdn/{A7QBL3A2.js → EZFPTCOA.js} +2 -2
  96. package/dist/cdn/{LWTHPR7G.js → F523PBRN.js} +2 -2
  97. package/dist/cdn/{COF2YZPH.js → F757OBPV.js} +2 -2
  98. package/dist/cdn/{HRISCZE4.js → FAP5X6JS.js} +2 -2
  99. package/dist/cdn/{Z6KIH56L.js → FKZ73ZOT.js} +2 -2
  100. package/dist/cdn/FN754WK6.js +4 -0
  101. package/dist/cdn/{CVOYRKZS.js → FQ5O4A2P.js} +2 -2
  102. package/dist/cdn/{665BJZWA.js → FQAVNSJZ.js} +2 -2
  103. package/dist/cdn/{RDHXYAFQ.js → FW3EZWIH.js} +2 -2
  104. package/dist/cdn/{KSTTZXSV.js → FXKTSJR2.js} +2 -2
  105. package/dist/cdn/{YBNROUXG.js → FYI6CGKM.js} +2 -2
  106. package/dist/cdn/{5XDWNZXA.js → G57HWBN7.js} +1 -1
  107. package/dist/cdn/{YOG4QHWC.js → GGUA34Z7.js} +2 -2
  108. package/dist/cdn/{LWJVEFQ5.js → GLJXWBZU.js} +2 -2
  109. package/dist/cdn/{ZFVQNIV3.js → GLKWKK5J.js} +2 -2
  110. package/dist/cdn/{5PWGWHIR.js → GNJUE3VY.js} +2 -2
  111. package/dist/cdn/{WHIO3FQO.js → H6FE3AIL.js} +2 -2
  112. package/dist/cdn/{H4UC7K4E.js → HABQTB2X.js} +2 -2
  113. package/dist/cdn/{QAHMU6RC.js → HDBIEWBY.js} +2 -2
  114. package/dist/cdn/{TRA7X542.js → HGRHVWKR.js} +2 -2
  115. package/dist/cdn/{EFHSMHAF.js → I33F74T5.js} +2 -2
  116. package/dist/cdn/{E5ADEGIT.js → I4RU7Y4O.js} +2 -2
  117. package/dist/cdn/{55HXIMBO.js → IBEOBGLS.js} +2 -2
  118. package/dist/cdn/{H7ZXWNKO.js → IJ26UFW4.js} +2 -2
  119. package/dist/cdn/{LKFOF3K7.js → IXXCUQ2G.js} +2 -2
  120. package/dist/cdn/{G2PXX25P.js → J6SEJBBZ.js} +2 -2
  121. package/dist/cdn/JCVT5SXG.js +4 -0
  122. package/dist/cdn/{PGDEEEHH.js → JE7EIX64.js} +2 -2
  123. package/dist/cdn/{SLVVWDPK.js → JF4YMOL5.js} +2 -2
  124. package/dist/cdn/{UYZCSS2V.js → JJGBQZLG.js} +2 -2
  125. package/dist/cdn/{XNEAKPXB.js → JJZ44QN4.js} +2 -2
  126. package/dist/cdn/{IIIFNQ7F.js → JMMXJVE2.js} +2 -2
  127. package/dist/cdn/{ZAQAZNCT.js → JSMIHU7D.js} +2 -2
  128. package/dist/cdn/{VF254QF2.js → JTGYMPU6.js} +2 -2
  129. package/dist/cdn/{WV6NMA4J.js → JWKD6UAM.js} +2 -2
  130. package/dist/cdn/{EDYL7HPP.js → K5FGQMY6.js} +2 -2
  131. package/dist/cdn/{UWGBB7SJ.js → K7WUPWNZ.js} +2 -2
  132. package/dist/cdn/KELESZSH.js +4 -0
  133. package/dist/cdn/{WLFBLXH4.js → KFBF3OI3.js} +2 -2
  134. package/dist/cdn/{RV362NX4.js → KPKKDVC7.js} +2 -2
  135. package/dist/cdn/{IYJ77TML.js → L2CJI2M6.js} +2 -2
  136. package/dist/cdn/{JLVTHJBF.js → LA66FGXH.js} +2 -2
  137. package/dist/cdn/{T7FM4JD6.js → LEFTNMTC.js} +2 -2
  138. package/dist/cdn/{VR45PC42.js → LNA3WTDM.js} +2 -2
  139. package/dist/cdn/{EG242PP3.js → M4EF4E42.js} +2 -2
  140. package/dist/cdn/{LQQR3AQF.js → M6XDEVOX.js} +2 -2
  141. package/dist/cdn/{GLSWPO6R.js → MBE6EPJI.js} +2 -2
  142. package/dist/cdn/{GEPPAFBR.js → MG4LBVDW.js} +2 -2
  143. package/dist/cdn/{ZXK25NUP.js → MKRXBMC2.js} +1 -1
  144. package/dist/cdn/MTDLHNDV.js +4 -0
  145. package/dist/cdn/{6RPQCOWI.js → MURIRK5N.js} +1 -1
  146. package/dist/cdn/{KSTBGZPT.js → MVRZIRFW.js} +2 -2
  147. package/dist/cdn/{LCA2TYEZ.js → MXEZNCSB.js} +2 -2
  148. package/dist/cdn/{JJMEELHM.js → MYVQDGPB.js} +2 -2
  149. package/dist/cdn/{QQ6B7FB4.js → N6C2ICTA.js} +2 -2
  150. package/dist/cdn/NPQ643GA.js +4 -0
  151. package/dist/cdn/{JE2SAKAD.js → O2E2USLJ.js} +2 -2
  152. package/dist/cdn/OJFCIVFJ.js +4 -0
  153. package/dist/cdn/{EEG3ZTH7.js → OOCGIQOS.js} +2 -2
  154. package/dist/cdn/{67LSQGRU.js → OTTAYPX4.js} +2 -2
  155. package/dist/cdn/OTVIIR6Q.js +4 -0
  156. package/dist/cdn/{SVNYTZ2E.js → OXF47BYY.js} +2 -2
  157. package/dist/cdn/{XEWOPYKZ.js → P3I4AP63.js} +2 -2
  158. package/dist/cdn/{PZIMMOZN.js → P47T7MAD.js} +2 -2
  159. package/dist/cdn/{BQNWJURN.js → PEB3H656.js} +2 -2
  160. package/dist/cdn/{ZMACPZ6D.js → PGN435LO.js} +3 -3
  161. package/dist/cdn/PIZM4KAX.js +4 -0
  162. package/dist/cdn/{BGPK3K43.js → PN27OQUQ.js} +2 -2
  163. package/dist/cdn/{5ZNR3CE3.js → PND5INUS.js} +2 -2
  164. package/dist/cdn/{3V72WFKG.js → PSESYJHZ.js} +2 -2
  165. package/dist/cdn/{EUZIMXC5.js → Q4AL2FI2.js} +2 -2
  166. package/dist/cdn/{UCEHEYP3.js → Q4CRFODS.js} +2 -2
  167. package/dist/cdn/{YSDARCXG.js → Q55NDGAE.js} +2 -2
  168. package/dist/cdn/Q676ANOA.js +4 -0
  169. package/dist/cdn/{NJTACGZS.js → Q7TTJI6O.js} +2 -2
  170. package/dist/cdn/{P3SINDT4.js → QJ63YL2A.js} +2 -2
  171. package/dist/cdn/{GKAZ2TIK.js → QLJK3Z6A.js} +2 -2
  172. package/dist/cdn/{H4W6QKJU.js → QSBP5YUL.js} +2 -2
  173. package/dist/cdn/{IDO6JK4M.js → R56MS6AG.js} +2 -2
  174. package/dist/cdn/{NEZIL7TY.js → RBO4RPSO.js} +2 -2
  175. package/dist/cdn/{A33MSS2I.js → RDMJSMOC.js} +2 -2
  176. package/dist/cdn/{TLIFTU62.js → RER3L5Z2.js} +2 -2
  177. package/dist/cdn/{SEPEVNES.js → RUCXEN4B.js} +1 -1
  178. package/dist/cdn/RYLLRGI7.js +4 -0
  179. package/dist/cdn/{CMXMA5IM.js → RZMEYZJJ.js} +2 -2
  180. package/dist/cdn/{HZOCJITH.js → SCM6BSJK.js} +1 -1
  181. package/dist/cdn/{2OV6QYUX.js → SEPYIIBU.js} +2 -2
  182. package/dist/cdn/{XSHH2JZG.js → SGTNDSIQ.js} +1 -1
  183. package/dist/cdn/{XLAY7IRE.js → STD2NQXG.js} +1 -1
  184. package/dist/cdn/{QDBGBNCJ.js → SU7YTPLN.js} +2 -2
  185. package/dist/cdn/{5NVMXBFF.js → SXGMFAHA.js} +2 -2
  186. package/dist/cdn/{DT2WRSQY.js → TCE53CWF.js} +2 -2
  187. package/dist/cdn/{KR6GQLOX.js → TITQYVSI.js} +2 -2
  188. package/dist/cdn/{4FUAC2GT.js → TOKRRFMO.js} +2 -2
  189. package/dist/cdn/{7FCONDWZ.js → TS3EACOZ.js} +2 -2
  190. package/dist/cdn/{S4SXK5KM.js → TTMFJRTP.js} +2 -2
  191. package/dist/cdn/{HMQOM3V5.js → TVK3UYO2.js} +2 -2
  192. package/dist/cdn/{COVHNV3T.js → U4LLLLSN.js} +2 -2
  193. package/dist/cdn/{EMP5JE4T.js → U6WDL7V7.js} +2 -2
  194. package/dist/cdn/{TFXSKBAP.js → UDONZUBH.js} +2 -2
  195. package/dist/cdn/{MJSLXMLN.js → UE5RO6JI.js} +2 -2
  196. package/dist/cdn/{724N2M2P.js → UUCAXGS2.js} +2 -2
  197. package/dist/cdn/{OJEB6IPM.js → UUMBGMLY.js} +1 -1
  198. package/dist/cdn/{25X64BXA.js → UUXRKZDN.js} +2 -2
  199. package/dist/cdn/{DDVIT3TT.js → UVMJBT2F.js} +2 -2
  200. package/dist/cdn/UX7UGOOT.js +4 -0
  201. package/dist/cdn/{K5XSAE2D.js → UZAPVU5F.js} +2 -2
  202. package/dist/cdn/{V2WAZBCQ.js → VKMBX7SY.js} +2 -2
  203. package/dist/cdn/{2RPF4M2F.js → WAJYLI6N.js} +2 -2
  204. package/dist/cdn/{ECBC3KB6.js → WDLBQPY3.js} +2 -2
  205. package/dist/cdn/{ZZVTOYMZ.js → WE5Q5Z4H.js} +2 -2
  206. package/dist/cdn/{T46NOCI4.js → WFCM3N3G.js} +2 -2
  207. package/dist/cdn/{7TABBIEO.js → WJSO2DPZ.js} +2 -2
  208. package/dist/cdn/{CFIV5F2K.js → WLFQV6QS.js} +1 -1
  209. package/dist/cdn/{XYVICLHW.js → X44GSFEC.js} +2 -2
  210. package/dist/cdn/{HJAHZKHB.js → X462Z4QP.js} +2 -2
  211. package/dist/cdn/{SRETHNAO.js → X56K44C6.js} +2 -2
  212. package/dist/cdn/{UWJVNIFI.js → X5ZFUO2M.js} +2 -2
  213. package/dist/cdn/{QYQFATN7.js → XCQXSXVV.js} +2 -2
  214. package/dist/cdn/{CTSLSL6J.js → XPHAPDNZ.js} +2 -2
  215. package/dist/cdn/{SY62LJ5M.js → XR7N5545.js} +2 -2
  216. package/dist/cdn/XXUIQGOI.js +4 -0
  217. package/dist/cdn/{FHR2AZGF.js → XXUJWP5E.js} +2 -2
  218. package/dist/cdn/{FQONR5NB.js → Y2AXKVUX.js} +2 -2
  219. package/dist/cdn/{QHBT62WW.js → Y4RASGHA.js} +1 -1
  220. package/dist/cdn/Y7TXM77C.js +4 -0
  221. package/dist/cdn/{HLEWL2DQ.js → YF67CHXX.js} +2 -2
  222. package/dist/cdn/{QE2FS5E5.js → YGMFTUQQ.js} +1 -1
  223. package/dist/cdn/{SCLAXZDQ.js → YHM2XB34.js} +2 -2
  224. package/dist/cdn/{ZQUJJC5R.js → YRTC3JMZ.js} +2 -2
  225. package/dist/cdn/{AOG3QITX.js → YTS2RB6N.js} +2 -2
  226. package/dist/cdn/{5XGLIHAN.js → YTW6FQW5.js} +2 -2
  227. package/dist/cdn/YWRNAZTE.js +4 -0
  228. package/dist/cdn/YZKQ3KIY.js +4 -0
  229. package/dist/cdn/{47KFNKS5.js → Z46NUVZQ.js} +2 -2
  230. package/dist/cdn/{ZQLFN5FG.js → ZAFHE7FT.js} +2 -2
  231. package/dist/cdn/{DJMJ44ZT.js → ZCQ5T2UP.js} +1 -1
  232. package/dist/cdn/{J37NXPTB.js → ZFQJFQUG.js} +2 -2
  233. package/dist/cdn/{RWF3FG7R.js → ZS4T7WL2.js} +2 -2
  234. package/dist/cdn/index.js +2 -2
  235. package/dist/chunks/AnalysisViewModel.js +148 -137
  236. package/dist/chunks/action-utils.js +1 -1
  237. package/dist/chunks/async-utils.js +1 -1
  238. package/dist/chunks/basemap-gallery-resources.js +1 -1
  239. package/dist/chunks/chart-utils.js +1 -1
  240. package/dist/chunks/chartCommon.js +1 -1
  241. package/dist/chunks/component-utils.js +1 -1
  242. package/dist/chunks/constants.js +1 -1
  243. package/dist/chunks/createCloseEvent.js +1 -1
  244. package/dist/chunks/esri-main.js +1 -1
  245. package/dist/chunks/feature-utils.js +1 -1
  246. package/dist/chunks/globalCss.js +1 -1
  247. package/dist/chunks/handle.js +1 -1
  248. package/dist/chunks/heading.js +1 -1
  249. package/dist/chunks/layer-list.js +1 -1
  250. package/dist/chunks/legacyIcon.js +1 -1
  251. package/dist/chunks/maybe.js +1 -1
  252. package/dist/chunks/measurementUtils.js +1 -1
  253. package/dist/chunks/runtime.js +1 -1
  254. package/dist/chunks/screenLocation.js +1 -1
  255. package/dist/chunks/slots.js +1 -1
  256. package/dist/chunks/svgUtils.js +1 -1
  257. package/dist/chunks/time-utils.js +1 -1
  258. package/dist/chunks/univariateUtils.js +1 -1
  259. package/dist/chunks/useArcgisViewReadyError.js +1 -1
  260. package/dist/chunks/useHandles.js +1 -1
  261. package/dist/chunks/useT9n.js +1 -1
  262. package/dist/chunks/useView.js +1 -1
  263. package/dist/chunks/useViewModel.js +1 -1
  264. package/dist/chunks/useWidget.js +1 -1
  265. package/dist/chunks/utils.js +1 -1
  266. package/dist/chunks/utils2.js +1 -1
  267. package/dist/chunks/visible-element.js +1 -1
  268. package/dist/components/arcgis-area-measurement-2d/customElement.d.ts +6 -0
  269. package/dist/components/arcgis-area-measurement-2d/customElement.js +41 -41
  270. package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +6 -0
  271. package/dist/components/arcgis-area-measurement-3d/customElement.js +15 -15
  272. package/dist/components/arcgis-attachments/customElement.d.ts +1 -1
  273. package/dist/components/arcgis-attachments/customElement.js +1 -1
  274. package/dist/components/arcgis-basemap-gallery/customElement.js +1 -1
  275. package/dist/components/arcgis-basemap-gallery-item/customElement.js +1 -1
  276. package/dist/components/arcgis-basemap-layer-list/customElement.d.ts +2 -2
  277. package/dist/components/arcgis-basemap-layer-list/customElement.js +1 -1
  278. package/dist/components/arcgis-basemap-toggle/customElement.js +1 -1
  279. package/dist/components/arcgis-bookmarks/customElement.js +2 -2
  280. package/dist/components/arcgis-building-explorer/customElement.d.ts +1 -1
  281. package/dist/components/arcgis-building-explorer/customElement.js +1 -1
  282. package/dist/components/arcgis-catalog-layer-list/customElement.d.ts +2 -2
  283. package/dist/components/arcgis-catalog-layer-list/customElement.js +1 -1
  284. package/dist/components/arcgis-color-select/customElement.js +1 -1
  285. package/dist/components/arcgis-compass/customElement.d.ts +2 -0
  286. package/dist/components/arcgis-compass/customElement.js +21 -21
  287. package/dist/components/arcgis-coordinate-conversion/customElement.js +1 -1
  288. package/dist/components/arcgis-daylight/customElement.js +1 -1
  289. package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +6 -0
  290. package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +15 -15
  291. package/dist/components/arcgis-directional-pad/customElement.js +1 -1
  292. package/dist/components/arcgis-directions/customElement.d.ts +1 -1
  293. package/dist/components/arcgis-directions/customElement.js +1 -1
  294. package/dist/components/arcgis-distance-measurement-2d/customElement.d.ts +6 -0
  295. package/dist/components/arcgis-distance-measurement-2d/customElement.js +17 -17
  296. package/dist/components/arcgis-editor/customElement.d.ts +1 -1
  297. package/dist/components/arcgis-editor/customElement.js +1 -1
  298. package/dist/components/arcgis-elevation-profile/customElement.d.ts +7 -1
  299. package/dist/components/arcgis-elevation-profile/customElement.js +14 -12
  300. package/dist/components/arcgis-elevation-profile-legend/customElement.js +1 -1
  301. package/dist/components/arcgis-elevation-profile-legend-item/customElement.js +1 -1
  302. package/dist/components/arcgis-elevation-profile-settings/customElement.js +1 -1
  303. package/dist/components/arcgis-elevation-profile-statistics/customElement.js +1 -1
  304. package/dist/components/arcgis-expand/customElement.d.ts +2 -8
  305. package/dist/components/arcgis-expand/customElement.js +34 -33
  306. package/dist/components/arcgis-expand/index.d.ts +0 -1
  307. package/dist/components/arcgis-expand/index.js +0 -1
  308. package/dist/components/arcgis-feature/customElement.js +1 -1
  309. package/dist/components/arcgis-feature-attachments/customElement.js +1 -1
  310. package/dist/components/arcgis-feature-content/customElement.js +1 -1
  311. package/dist/components/arcgis-feature-element-info/customElement.js +1 -1
  312. package/dist/components/arcgis-feature-expression/customElement.js +1 -1
  313. package/dist/components/arcgis-feature-fields/customElement.js +1 -1
  314. package/dist/components/arcgis-feature-form/customElement.d.ts +2 -2
  315. package/dist/components/arcgis-feature-form/customElement.js +1 -1
  316. package/dist/components/arcgis-feature-media/customElement.js +1 -1
  317. package/dist/components/arcgis-feature-relationship/customElement.js +1 -1
  318. package/dist/components/arcgis-feature-table/customElement.d.ts +2 -2
  319. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  320. package/dist/components/arcgis-feature-templates/customElement.d.ts +2 -2
  321. package/dist/components/arcgis-feature-templates/customElement.js +1 -1
  322. package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +1 -1
  323. package/dist/components/arcgis-feature-utility-network-associations/customElement.js +1 -1
  324. package/dist/components/arcgis-features/customElement.d.ts +1 -1
  325. package/dist/components/arcgis-features/customElement.js +1 -1
  326. package/dist/components/arcgis-floor-filter/customElement.d.ts +1 -1
  327. package/dist/components/arcgis-floor-filter/customElement.js +1 -1
  328. package/dist/components/arcgis-fullscreen/customElement.d.ts +2 -0
  329. package/dist/components/arcgis-fullscreen/customElement.js +19 -19
  330. package/dist/components/arcgis-grid-controls/customElement.js +1 -1
  331. package/dist/components/arcgis-histogram-range-slider/customElement.d.ts +1 -1
  332. package/dist/components/arcgis-histogram-range-slider/customElement.js +1 -1
  333. package/dist/components/arcgis-home/customElement.d.ts +2 -0
  334. package/dist/components/arcgis-home/customElement.js +17 -17
  335. package/dist/components/arcgis-home/index.d.ts +0 -1
  336. package/dist/components/arcgis-home/index.js +0 -1
  337. package/dist/components/arcgis-labeled-switch/customElement.js +1 -1
  338. package/dist/components/arcgis-layer-list/customElement.d.ts +2 -2
  339. package/dist/components/arcgis-layer-list/customElement.js +1 -1
  340. package/dist/components/arcgis-layer-list-item/customElement.js +1 -1
  341. package/dist/components/arcgis-legend/customElement.js +1 -1
  342. package/dist/components/arcgis-legend-card-color-ramp/customElement.js +1 -1
  343. package/dist/components/arcgis-legend-card-element/customElement.js +1 -1
  344. package/dist/components/arcgis-legend-card-size-ramp/customElement.js +1 -1
  345. package/dist/components/arcgis-legend-card-univariate-above-and-below-ramp/customElement.js +1 -1
  346. package/dist/components/arcgis-legend-card-univariate-color-size-ramp/customElement.js +1 -1
  347. package/dist/components/arcgis-legend-card-view/customElement.js +1 -1
  348. package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +1 -1
  349. package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
  350. package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +1 -1
  351. package/dist/components/arcgis-legend-classic-univariate-above-and-below-ramp/customElement.js +1 -1
  352. package/dist/components/arcgis-legend-classic-univariate-color-size-ramp/customElement.js +1 -1
  353. package/dist/components/arcgis-legend-classic-view/customElement.js +1 -1
  354. package/dist/components/arcgis-legend-relationship-ramp/customElement.js +1 -1
  355. package/dist/components/arcgis-legend-spike-ramp/customElement.js +1 -1
  356. package/dist/components/arcgis-line-of-sight/customElement.d.ts +6 -0
  357. package/dist/components/arcgis-line-of-sight/customElement.js +11 -11
  358. package/dist/components/arcgis-link-chart/customElement.d.ts +11 -3
  359. package/dist/components/arcgis-link-chart/customElement.js +96 -94
  360. package/dist/components/arcgis-link-chart-layout-switcher/customElement.js +1 -1
  361. package/dist/components/arcgis-locate/customElement.d.ts +2 -0
  362. package/dist/components/arcgis-locate/customElement.js +30 -30
  363. package/dist/components/arcgis-map/customElement.d.ts +20 -2
  364. package/dist/components/arcgis-map/customElement.js +1 -1
  365. package/dist/components/arcgis-measurement/customElement.js +1 -1
  366. package/dist/components/arcgis-measurement-content/customElement.js +1 -1
  367. package/dist/components/arcgis-navigation-toggle/customElement.d.ts +2 -0
  368. package/dist/components/arcgis-navigation-toggle/customElement.js +14 -14
  369. package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +1 -1
  370. package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -1
  371. package/dist/components/arcgis-placement/customElement.js +1 -1
  372. package/dist/components/arcgis-popup/customElement.d.ts +1 -1
  373. package/dist/components/arcgis-popup/customElement.js +1 -1
  374. package/dist/components/arcgis-presentation/customElement.js +1 -1
  375. package/dist/components/arcgis-print/customElement.js +1 -1
  376. package/dist/components/arcgis-print/utils.d.ts +1 -1
  377. package/dist/components/arcgis-print-custom-text-elements/customElement.js +1 -1
  378. package/dist/components/arcgis-print-dpi-input/customElement.js +1 -1
  379. package/dist/components/arcgis-print-export-button/customElement.js +1 -1
  380. package/dist/components/arcgis-print-exports-panel/customElement.js +1 -1
  381. package/dist/components/arcgis-print-format-select/customElement.js +1 -1
  382. package/dist/components/arcgis-print-layout-advanced-options/customElement.js +1 -1
  383. package/dist/components/arcgis-print-layout-panel/customElement.js +1 -1
  384. package/dist/components/arcgis-print-main-panel/customElement.js +1 -1
  385. package/dist/components/arcgis-print-map-only-advanced-options/customElement.js +1 -1
  386. package/dist/components/arcgis-print-map-only-panel/customElement.js +1 -1
  387. package/dist/components/arcgis-print-out-spatial-reference-input/customElement.js +1 -1
  388. package/dist/components/arcgis-print-preview-input/customElement.js +1 -1
  389. package/dist/components/arcgis-print-scale-section/customElement.js +1 -1
  390. package/dist/components/arcgis-print-template-select/customElement.js +1 -1
  391. package/dist/components/arcgis-print-template-selector/customElement.js +1 -1
  392. package/dist/components/arcgis-scale-bar/customElement.js +1 -1
  393. package/dist/components/arcgis-scale-range-slider/customElement.d.ts +1 -1
  394. package/dist/components/arcgis-scale-range-slider/customElement.js +1 -1
  395. package/dist/components/arcgis-scene/customElement.d.ts +4 -4
  396. package/dist/components/arcgis-scene/customElement.js +1 -1
  397. package/dist/components/arcgis-search/customElement.js +1 -1
  398. package/dist/components/arcgis-search-result-renderer/customElement.js +1 -1
  399. package/dist/components/arcgis-shadow-cast/ShadowCastViewModel.d.ts +0 -2
  400. package/dist/components/arcgis-shadow-cast/customElement.d.ts +1 -1
  401. package/dist/components/arcgis-shadow-cast/customElement.js +5 -14
  402. package/dist/components/arcgis-shadow-cast-discrete-config/customElement.js +1 -1
  403. package/dist/components/arcgis-shadow-cast-min-duration-config/customElement.js +1 -1
  404. package/dist/components/arcgis-shadow-cast-total-duration-config/customElement.js +1 -1
  405. package/dist/components/arcgis-sketch/customElement.d.ts +1 -1
  406. package/dist/components/arcgis-sketch/customElement.js +1 -1
  407. package/dist/components/arcgis-slice/customElement.d.ts +6 -0
  408. package/dist/components/arcgis-slice/customElement.js +15 -15
  409. package/dist/components/arcgis-spinner/customElement.js +1 -1
  410. package/dist/components/arcgis-swipe/customElement.js +1 -1
  411. package/dist/components/arcgis-table-list/customElement.d.ts +2 -2
  412. package/dist/components/arcgis-table-list/customElement.js +1 -1
  413. package/dist/components/arcgis-time-slider/customElement.d.ts +1 -1
  414. package/dist/components/arcgis-time-slider/customElement.js +1 -1
  415. package/dist/components/arcgis-time-zone-label/customElement.js +12 -12
  416. package/dist/components/arcgis-track/customElement.d.ts +2 -0
  417. package/dist/components/arcgis-track/customElement.js +13 -13
  418. package/dist/components/arcgis-unit-select/customElement.js +1 -1
  419. package/dist/components/arcgis-utility-network-association-list/customElement.js +1 -1
  420. package/dist/components/arcgis-utility-network-associations/customElement.d.ts +1 -1
  421. package/dist/components/arcgis-utility-network-associations/customElement.js +1 -1
  422. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.js +1 -1
  423. package/dist/components/arcgis-utility-network-trace/customElement.js +1 -1
  424. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
  425. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +21 -18
  426. package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +18 -4
  427. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +50 -50
  428. package/dist/components/arcgis-utility-network-trace-location/customElement.d.ts +21 -1
  429. package/dist/components/arcgis-utility-network-trace-location/customElement.js +71 -65
  430. package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +1 -1
  431. package/dist/components/arcgis-utility-network-trace-results/customElement.js +1 -1
  432. package/dist/components/arcgis-utility-network-validate-topology/customElement.js +1 -1
  433. package/dist/components/arcgis-value-picker/customElement.d.ts +1 -1
  434. package/dist/components/arcgis-value-picker/customElement.js +1 -1
  435. package/dist/components/arcgis-version-management/customElement.js +1 -1
  436. package/dist/components/arcgis-version-management-service-item/customElement.js +1 -1
  437. package/dist/components/arcgis-version-management-version-list/customElement.js +1 -1
  438. package/dist/components/arcgis-version-management-version-properties/customElement.js +1 -1
  439. package/dist/components/arcgis-video/customElement.d.ts +1 -1
  440. package/dist/components/arcgis-video/customElement.js +1 -1
  441. package/dist/components/arcgis-video-player/customElement.js +1 -1
  442. package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
  443. package/dist/components/arcgis-video-player-actions-group/customElement.js +1 -1
  444. package/dist/components/arcgis-video-player-controls-group/customElement.js +1 -1
  445. package/dist/components/arcgis-video-player-metadata/customElement.js +1 -1
  446. package/dist/components/arcgis-video-player-settings/customElement.js +1 -1
  447. package/dist/components/arcgis-video-player-slider/customElement.js +1 -1
  448. package/dist/components/arcgis-volume-measurement/customElement.d.ts +11 -4
  449. package/dist/components/arcgis-volume-measurement/customElement.js +17 -17
  450. package/dist/components/arcgis-weather/customElement.js +1 -1
  451. package/dist/components/arcgis-zoom/customElement.d.ts +2 -0
  452. package/dist/components/arcgis-zoom/customElement.js +8 -8
  453. package/dist/docs/api.json +1028 -318
  454. package/dist/docs/docs.json +652 -89
  455. package/dist/docs/vscode.html-custom-data.json +156 -9
  456. package/dist/docs/web-types.json +294 -44
  457. package/dist/index.d.ts +2 -0
  458. package/dist/index.js +1 -1
  459. package/dist/loader.js +20 -20
  460. package/dist/support/AnalysisViewModel.d.ts +101 -35
  461. package/dist/types/lumina.d.ts +21 -19
  462. package/dist/types/preact.d.ts +21 -19
  463. package/dist/types/preact10.d.ts +21 -19
  464. package/dist/types/react.d.ts +21 -19
  465. package/dist/types/stencil.d.ts +21 -19
  466. package/package.json +3 -3
  467. package/dist/cdn/2XZDHGFY.js +0 -4
  468. package/dist/cdn/3RKITOWL.js +0 -4
  469. package/dist/cdn/4WWVGZYW.js +0 -4
  470. package/dist/cdn/6XSSLDAH.js +0 -4
  471. package/dist/cdn/A447YPEL.js +0 -4
  472. package/dist/cdn/ARVZDHWN.js +0 -4
  473. package/dist/cdn/B5Y47WQN.js +0 -4
  474. package/dist/cdn/BQFCW32I.js +0 -4
  475. package/dist/cdn/F6EPH7E3.js +0 -4
  476. package/dist/cdn/GXO3FWW2.js +0 -4
  477. package/dist/cdn/HIQFUQOV.js +0 -4
  478. package/dist/cdn/IR2CG6SQ.js +0 -4
  479. package/dist/cdn/JTSZIJR7.js +0 -4
  480. package/dist/cdn/KKQAM63L.js +0 -4
  481. package/dist/cdn/Q5RZYGL5.js +0 -4
  482. package/dist/cdn/UZLP7W75.js +0 -4
  483. package/dist/cdn/WJLTANIS.js +0 -4
  484. package/dist/cdn/Y2IAH2XC.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.92 */
4
- import{a as Re,b as qt,c as wt,d as Tt}from"./HJAHZKHB.js";import{$ as Jt,B as _t,C as V,D as pe,J as Ht,K as G,M as vt,N as B,R as K,S as yt,T as Ve,U as ee,V as Z,W as ct,X as Ge,Y,Z as Kt,_ as Xe,a as ut,b as bt,ba as Pt,c as H,ea as Dt,f as R,g as Bt,ga as Qt,h as re,ha as ei,ia as At,ja as ti,la as Mt,ma as kt,na as It,p as Wt,w as xt}from"./GPQMTS6R.js";import{M as pt,N as F,O as ht,Q as Ut,R as zt,a as Me,d as jt,f as ft,k as Rt,o as Vt,q as Gt,u as Fe,v as Et}from"./RV362NX4.js";import{a as ke,b as Se,d as O,e as rt}from"./WU6RMTYJ.js";import{A as me,B as Lt,E as je,G as Ie,H as xe,N as Nt,R as fe,T as ot,U as z,V as Zt,a as ae,g as v,o as D,r as Le,s as gt,t as Ne,v as mt,w as Yt}from"./CFQNKQLP.js";import"./XSHH2JZG.js";var nt=class extends Zt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:It.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:zt.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:It.new(this._root,{saturation:0})});{let o=i("Graphics",["scrollbar","overlay"]);o.setAll({fillOpacity:.5}),B(o,"fill",e,"background")}i("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}),i("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4}),i("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,cornerRadiusTR:0,cornerRadiusBR:0}),i("RoundedRectangle",["xy","scrollbar","chart","background","resize","button"]).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),i("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0}),i("AxisRendererY",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5}),i("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:O,minPosition:.01,maxPosition:.99,fontSize:"0.8em"}),i("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0}),i("AxisLabel",["x"]).setAll({centerY:0}),i("AxisLabel",["x","inside"]).setAll({centerY:O}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:O}),i("AxisLabel",["y"]).setAll({centerX:O}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:O}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{let o=i("Grid",["cursor","x"]);o.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:t.translate("Use left and right arrows to move selection")}),B(o,"stroke",e,"alternativeBackground")}{let o=i("Grid",["cursor","y"]);o.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:t.translate("Use up and down arrows to move selection")}),B(o,"stroke",e,"alternativeBackground")}{let o=i("Graphics",["cursor","selection"]);o.setAll({fillOpacity:.15}),B(o,"fill",e,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:rt,centerY:rt,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{let o=i("AxisRenderer");o.setAll({crisp:!0,strokeOpacity:0}),B(o,"stroke",e,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:O}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:O});{let o=i("Rectangle",["axis","thumb","zoomgrip"]);o.setAll({fillOpacity:0}),B(o,"fill",e,"alternativeBackground"),o.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{let o=i("Grid");o.setAll({location:0,strokeOpacity:.15,crisp:!0}),B(o,"stroke",e,"grid")}{let o=i("Grid",["minor"]);o.setAll({location:0,strokeOpacity:.07,crisp:!0}),B(o,"stroke",e,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{let o=i("Graphics",["axis","fill"]);o.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),B(o,"fill",e,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{let o=i("AxisTick");o.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),B(o,"stroke",e,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(o,l)=>{let h=o.get("axisFill");h&&(!v(l)||l%2==0?h.setPrivate("visible",!0):h.setPrivate("visible",!1))}});let s=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],a={millisecond:t.translate("_date_millisecond"),second:t.translate("_date_second"),minute:t.translate("_date_minute"),hour:t.translate("_date_hour"),day:t.translate("_date_day"),week:t.translate("_date_day"),month:t.translate("_date_month"),year:t.translate("_date_year")},r={millisecond:t.translate("_date_millisecond"),second:t.translate("_date_second"),minute:t.translate("_date_minute"),hour:t.translate("_date_day"),day:t.translate("_date_day"),week:t.translate("_date_day"),month:t.translate("_date_month")+" "+t.translate("_date_year"),year:t.translate("_date_year")},n={millisecond:t.translate("_date_millisecond_full"),second:t.translate("_date_second_full"),minute:t.translate("_date_minute_full"),hour:t.translate("_date_hour_full"),day:t.translate("_date_day_full"),week:t.translate("_date_week_full"),month:t.translate("_date_month_full"),year:t.translate("_date_year")};i("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:mt(s),dateFormats:Ie(a),periodChangeDateFormats:Ie(r)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:mt(s),dateFormats:Ie(a),periodChangeDateFormats:Ie(r),tooltipDateFormats:n,groupIntervals:[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],fillRule:o=>{let l=o.get("axisFill");if(l){let h=o.component,u=o.get("value"),c=o.get("endValue"),d=h.intervalDuration(),p=h.getPrivate("baseInterval"),f=h.getPrivate("gridInterval",p),g=h.getPrivate("min",0);if(g=Kt(new Date(g),f.timeUnit,f.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),u!=null&&c!=null){let m=Math.round(Math.round((u-g)/d))/2;m==Math.round(m)?l.setPrivate("visible",!0):l.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:o=>{let l=o.get("axisFill");if(l){let h=o.get("index"),u=!1;(!v(h)||h%2==0)&&(u=!0),l.setPrivate("visible",u)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:o=>{let l=o.get("axisFill");if(l){let h=o.component,u=o.get("value"),c=h.getPrivate("step");v(u)&&v(c)&&(R(u/c/2,5)==Math.round(u/c/2)?l.setPrivate("visible",!1):l.setPrivate("visible",!0))}}}),i("DurationAxis").setAll({baseUnit:"second"}),i("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}),i("BaseColumnSeries").setAll({adjustBulletPosition:!0}),i("ColumnSeries").setAll({clustered:!0}),i("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:Se(70),height:Se(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1}),i("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1,isMeasured:!1}),i("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1}),i("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(o,l)=>{let h=l.parent;if(h){let u=h.height(),c=h.width();o.moveTo(0,u/2),o.lineTo(c,u/2)}}});{let o=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});B(o,"stroke",e,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(o,l)=>{let h=l.parent;if(h){let u=h.height(),c=h.width();o.moveTo(0,0),o.lineTo(c,0),o.lineTo(c,u),o.lineTo(0,u),o.lineTo(0,0)}}});{let o=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});B(o,"stroke",e,"disabled")}i("SmoothedXYLineSeries").setAll({tension:.5}),i("SmoothedXLineSeries").setAll({tension:.5}),i("SmoothedYLineSeries").setAll({tension:.5}),i("Candlestick").setAll({position:"absolute",isMeasured:!1,width:Se(50),height:Se(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:Se(80),height:Se(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{let o=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});B(o,"fill",e,"positive"),B(o,"stroke",e,"positive")}{let o=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});B(o,"fill",e,"negative"),B(o,"stroke",e,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{let o=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});B(o,"fill",e,"positive"),B(o,"stroke",e,"positive")}{let o=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});B(o,"fill",e,"negative"),B(o,"stroke",e,"negative")}i("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});{let o=i("Graphics",["rangegrip","button","icon"]);o.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:l=>{l.moveTo(0,.5),l.lineTo(0,12.5),l.moveTo(2,.5),l.lineTo(2,12.5),l.moveTo(4,.5),l.lineTo(4,12.5)}}),B(o,"stroke",e,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:rt}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:rt}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:O}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:O})}};var Ce=class extends Mt{constructor(){super(...arguments),Object.defineProperty(this,"xAxes",{enumerable:!0,configurable:!0,writable:!0,value:new bt}),Object.defineProperty(this,"yAxes",{enumerable:!0,configurable:!0,writable:!0,value:new bt}),Object.defineProperty(this,"topAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(G.new(this._root,{width:O,layout:this._root.verticalLayout}))}),Object.defineProperty(this,"yAxesAndPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(G.new(this._root,{width:O,height:O,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"bottomAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(G.new(this._root,{width:O,layout:this._root.verticalLayout}))}),Object.defineProperty(this,"leftAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(G.new(this._root,{height:O,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"plotsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(G.new(this._root,{width:O,height:O,maskContent:!1}))}),Object.defineProperty(this,"plotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(G.new(this._root,{width:O,height:O}))}),Object.defineProperty(this,"topPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(G.new(this._root,{width:O,height:O}))}),Object.defineProperty(this,"gridContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(G.new(this._root,{width:O,height:O,isMeasured:!1}))}),Object.defineProperty(this,"topGridContainer",{enumerable:!0,configurable:!0,writable:!0,value:G.new(this._root,{width:O,height:O,isMeasured:!1})}),Object.defineProperty(this,"rightAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(G.new(this._root,{height:O,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"axisHeadersContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(G.new(this._root,{}))}),Object.defineProperty(this,"zoomOutButton",{enumerable:!0,configurable:!0,writable:!0,value:this.topPlotContainer.children.push(qt.new(this._root,{themeTags:["zoom"],icon:V.new(this._root,{themeTags:["button","icon"]})}))}),Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_wheelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_otherCharts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_movePoints",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_downStartX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEndX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downStartY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEndY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._defaultThemes.push(nt.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);let e=this._root,t=this._root.verticalLayout,i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default").set("opacity",1),this.chartContainer.set("layout",t);let s=this.plotContainer;s.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),s.children.push(this.topGridContainer),s.children.push(this.bulletsContainer),s.set("interactive",!0),s.set("interactiveChildren",!1),s.set("background",pe.new(e,{themeTags:["plotbackground","xy","background"]})),this._disposers.push(s.events.on("pointerdown",a=>{this._handlePlotDown(a)})),this._disposers.push(s.events.on("globalpointerup",a=>{this._handlePlotUp(a)})),this._disposers.push(s.events.on("globalpointermove",a=>{this._handlePlotMove(a)})),this._maskGrid(),this._setUpTouch()}_beforeChanged(){super._beforeChanged(),(this.isDirty("pinchZoomX")||this.isDirty("pinchZoomY")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_setUpTouch(){this.plotContainer._display.cancelTouch||(this.plotContainer._display.cancelTouch=!!(this.get("pinchZoomX")||this.get("pinchZoomY")||this.get("panX")||this.get("panY")))}_maskGrid(){this.gridContainer.set("maskContent",!0),this.topGridContainer.set("maskContent",!0)}_removeSeries(e){e._unstack(),e._posXDp&&e._posXDp.dispose(),e._posYDp&&e._posYDp.dispose(),e.set("baseAxis",void 0);let t=e.get("xAxis");t&&(Le(t.series,e),t.markDirtyExtremes());let i=e.get("yAxis");i&&(Le(i.series,e),i.markDirtyExtremes());let s=this.get("cursor");if(s){let a=s.get("snapToSeries");a&&Le(a,e)}super._removeSeries(e)}handleWheel(e){let t=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,a=e.originalEvent,r=!1;if(Vt(a,this))r=!0;else return;let n=s.toLocal(e.point),o=this.get("wheelStep",.2),l=a.deltaY/100,h=a.deltaX/100,u=this.get("wheelZoomPositionX"),c=this.get("wheelZoomPositionY");(t==="zoomX"||t==="zoomXY")&&h!=0&&this.xAxes.each(d=>{if(d.get("zoomX")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.x/s.width());u!=null&&(g=u);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*h*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*h*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(i==="zoomX"||i==="zoomXY")&&l!=0&&this.xAxes.each(d=>{if(d.get("zoomX")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.x/s.width());u!=null&&(g=u);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*l*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*l*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(t==="zoomY"||t==="zoomXY")&&h!=0&&this.yAxes.each(d=>{if(d.get("zoomY")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.y/s.height());c!=null&&(g=c);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*h*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*h*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(i==="zoomY"||i==="zoomXY")&&l!=0&&this.yAxes.each(d=>{if(d.get("zoomY")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.y/s.height());c!=null&&(g=c);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*l*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*l*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(t==="panX"||t==="panXY")&&h!=0&&this.xAxes.each(d=>{if(d.get("panX")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*h,m=p+g,b=f+g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),(i==="panX"||i==="panXY")&&l!=0&&this.xAxes.each(d=>{if(d.get("panX")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*l,m=p+g,b=f+g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),(t==="panY"||t==="panXY")&&h!=0&&this.yAxes.each(d=>{if(d.get("panY")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*h,m=p+g,b=f+g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),(i==="panY"||i==="panXY")&&l!=0&&this.yAxes.each(d=>{if(d.get("panY")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*l,m=p-g,b=f-g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),r&&a.preventDefault()}_handleSetWheel(){let e=this.get("wheelX"),t=this.get("wheelY"),i=this.plotContainer;e!=="none"||t!=="none"?(this._wheelDp=i.events.on("wheel",s=>{let a=s.originalEvent;(e!=="none"&&Math.abs(a.deltaX)!=0||t!=="none"&&Math.abs(a.deltaY)!=0)&&this.handleWheel(s)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(e){let t=1;return e.get("renderer").get("inversed")&&(t=-1),t}_fixWheel(e,t){let i=t-e;return e<0&&(e=0,t=e+i),t>1&&(t=1,e=t-i),[e,t]}_handlePlotDown(e){let t=e.originalEvent;if(t.button==2)return;let i=this.plotContainer,s=i.toLocal(e.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&t.pointerId&&je(i._downPoints).length>0){let r=this.xAxes.getIndex(0),n=this.yAxes.getIndex(0);r&&(this._downStartX=r.get("start",0),this._downEndX=r.get("end",1)),n&&(this._downStartY=n.get("start",0),this._downEndY=n.get("end",1))}if((this.get("panX")||this.get("panY"))&&s.x>=0&&s.y>=0&&s.x<=i.width()&&s.y<=this.height()){this._downPoint={x:t.clientX,y:t.clientY};let a=this.get("panX"),r=this.get("panY");a&&this.xAxes.each(o=>{o._panStart=o.get("start"),o._panEnd=o.get("end")}),r&&this.yAxes.each(o=>{o._panStart=o.get("start"),o._panEnd=o.get("end")});let n="panstarted";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:e.originalEvent})}}_handleWheelAnimation(e){e?e.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){let e="wheelended";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}_handlePlotUp(e){let t=this._downPoint;if(t&&(this.get("panX")||this.get("panY"))){if(e.originalEvent.clientX==t.x&&e.originalEvent.clientY==t.y){let s="pancancelled";this.events.isEnabled(s)&&this.events.dispatch(s,{type:s,target:this,originalEvent:e.originalEvent})}let i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:e.originalEvent})}this._downPoint=void 0,this.xAxes.each(i=>{i._isPanning=!1}),this.yAxes.each(i=>{i._isPanning=!1})}_handlePlotMove(e){let t=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){let a=e.originalEvent.pointerId;if(a&&(this._movePoints[a]=e.point,je(t._downPoints).length>1)){this._handlePinch();return}}let i=this._downPoint;if(i){i=t.toLocal(this._root.documentPointToRoot(i));let s=t.toLocal(e.point),a=this.get("panX"),r=this.get("panY");if(a){let n=this.get("scrollbarX");n&&n.events.disableType("rangechanged"),this.xAxes.each(o=>{if(o.get("panX")){o._isPanning=!0;let l=o._panStart,h=o._panEnd,c=(h-l)*(i.x-s.x)/t.width();o.get("renderer").get("inversed")&&(c*=-1);let d=l+c,p=h+c;p-d<1+o.get("maxDeviation",1)*2&&(o.set("start",d),o.set("end",p))}}),n&&n.events.enableType("rangechanged")}if(r){let n=this.get("scrollbarY");n&&n.events.disableType("rangechanged"),this.yAxes.each(o=>{if(o.get("panY")){o._isPanning=!0;let l=o._panStart,h=o._panEnd,c=(h-l)*(i.y-s.y)/t.height();o.get("renderer").get("inversed")&&(c*=-1);let d=l-c,p=h-c;p-d<1+o.get("maxDeviation",1)*2&&(o.set("start",d),o.set("end",p))}}),n&&n.events.enableType("rangechanged")}}}_handlePinch(){let e=this.plotContainer,t=0,i=[],s=[];if(xe(e._downPoints,(a,r)=>{i[t]=r;let n=this._movePoints[a];n&&(s[t]=n),t++}),i.length>1&&s.length>1){let a=e.width(),r=e.height(),n=i[0],o=i[1],l=s[0],h=s[1];if(n&&o&&l&&h){if(l=e.toLocal(l),h=e.toLocal(h),n=e.toLocal(n),o=e.toLocal(o),this.get("pinchZoomX")){let u=this._downStartX,c=this._downEndX;if(u!=null&&c!=null){n.x>o.x&&([n,o]=[o,n],[l,h]=[h,l]);let d=u+n.x/a*(c-u),p=u+o.x/a*(c-u),f=u+l.x/a*(c-u),g=u+h.x/a*(c-u),m=Math.max(.001,p-d),b=Math.max(.001,g-f),x=m/b,_=u*x+d-f*x,A=c*x+p-g*x;this.xAxes.each(y=>{let M=y.fixPosition(_),w=y.fixPosition(A);y.zoom(M,w,0)})}}if(this.get("pinchZoomY")){let u=this._downStartY,c=this._downEndY;if(u!=null&&c!=null){n.y<o.y&&([n,o]=[o,n],[l,h]=[h,l]);let d=u+(1-n.y/r)*(c-u),p=u+(1-o.y/r)*(c-u),f=u+(1-l.y/r)*(c-u),g=u+(1-h.y/r)*(c-u),m=Math.max(.001,p-d),b=Math.max(.001,g-f),x=m/b,_=u*x+d-f*x,A=c*x+p-g*x;this.yAxes.each(y=>{let M=y.fixPosition(_),w=y.fixPosition(A);y.zoom(M,w,0)})}}}}}_handleCursorPosition(){let e=this.get("cursor");if(e){let t=e.getPrivate("point"),i=e.get("snapToSeries");if(e._downPoint&&(i=void 0),i&&t){let s=e.get("snapToSeriesBy"),a=[];D(i,o=>{if(!o.isHidden()&&!o.isHiding())if(s!="x!"&&s!="y!"){let l=o.startIndex(),h=o.endIndex();for(let u=l;u<h;u++){let c=o.dataItems[u];c&&!c.isHidden()&&a.push(c)}}else{let l=o.get("tooltipDataItem");l&&a.push(l)}});let r=1/0,n;if(D(a,o=>{let l=o.get("point");if(l){let h=0;s=="x"||s=="x!"?h=Math.abs(t.x-l.x):s=="y"||s=="y!"?h=Math.abs(t.y-l.y):h=Math.hypot(t.x-l.x,t.y-l.y),h<r&&(r=h,n=o)}}),D(i,o=>{let l=o.get("tooltip");l&&l._setDataItem(void 0)}),n){let o=n.component;o.showDataItemTooltip(n),o.setRaw("tooltipDataItem",n);let l=n.get("point");l&&e.handleMove(o.toGlobal({x:l.x-o.x(),y:l.y-o.y()}),!0)}}}}_updateCursor(){let e=this.get("cursor");e&&e.updateCursor()}_addCursor(e){this.plotContainer.children.push(e)}_prepareChildren(){if(super._prepareChildren(),this.series.each(e=>{this._colorize(e)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){let e=this._prevSettings.cursor,t=this.get("cursor");t!==e&&(this._disposeProperty("cursor"),e&&e.dispose(),t&&(t._setChart(this),this._addCursor(t),this._pushPropertyDisposer("cursor",t.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=t)}if(this.isDirty("scrollbarX")){let e=this._prevSettings.scrollbarX,t=this.get("scrollbarX");t!==e&&(this._disposeProperty("scrollbarX"),e&&e.dispose(),t&&(t.parent||this.topAxesContainer.children.push(t),this._pushPropertyDisposer("scrollbarX",t.events.on("rangechanged",i=>{this._handleScrollbar(this.xAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarX",t.events.on("released",()=>{this.xAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),t.setPrivate("positionTextFunction",i=>{let s=this.xAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarX=t)}if(this.isDirty("scrollbarY")){let e=this._prevSettings.scrollbarY,t=this.get("scrollbarY");t!==e&&(this._disposeProperty("scrollbarY"),e&&e.dispose(),t&&(t.parent||this.rightAxesContainer.children.push(t),this._pushPropertyDisposer("scrollbarY",t.events.on("rangechanged",i=>{this._handleScrollbar(this.yAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarY",t.events.on("released",()=>{this.yAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),t.setPrivate("positionTextFunction",i=>{let s=this.yAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarY=t)}this._handleZoomOut()}_processSeries(e){super._processSeries(e);let t=e.get("xAxis"),i=e.get("yAxis");Ne(t.series,e),Ne(i.series,e),e._posXDp=e.addDisposer(t.events.on("positionchanged",()=>{e._fixPosition()})),e._posXDp=e.addDisposer(i.events.on("positionchanged",()=>{e._fixPosition()})),e.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?e.set("baseAxis",i):e.set("baseAxis",t)),e.get("stacked")&&(e._markDirtyKey("stacked"),D(e.dataItems,s=>{s.set("stackToItemY",void 0),s.set("stackToItemX",void 0)})),e._markDirtyAxes(),i.markDirtyExtremes(),t.markDirtyExtremes(),t._seriesAdded=!0,i._seriesAdded=!0,this._colorize(e)}_colorize(e){let t=this.get("colors");if(t&&e.get("fill")==null){let s=t.next();e._setSoft("stroke",s),e._setSoft("fill",s)}let i=this.get("patterns");if(i&&e.get("fillPattern")==null){let s=i.next();e._setSoft("fillPattern",s)}}_handleCursorSelectEnd(){let e=this.get("cursor"),t=e.get("behavior"),i=e.getPrivate("downPositionX",0),s=e.getPrivate("downPositionY",0),a=Math.min(1,Math.max(0,e.getPrivate("positionX",.5))),r=Math.min(1,Math.max(0,e.getPrivate("positionY",.5)));this.xAxes.each(n=>{if(t==="zoomX"||t==="zoomXY"){let o=n.toAxisPosition(i),l=n.toAxisPosition(a);n.zoom(o,l)}n.setPrivate("updateScrollbar",!0)}),this.yAxes.each(n=>{if(t==="zoomY"||t==="zoomXY"){let o=n.toAxisPosition(s),l=n.toAxisPosition(r);n.zoom(o,l)}n.setPrivate("updateScrollbar",!0)})}_handleScrollbar(e,t,i,s){e.each(a=>{let r=a.fixPosition(t),n=a.fixPosition(i),o=a.zoom(r,n,void 0,s),l="updateScrollbar";a.setPrivateRaw(l,!1),o?o.events.on("stopped",()=>{a.setPrivateRaw(l,!0)}):a.setPrivateRaw(l,!0)})}_processAxis(e,t){return e.events.onAll(i=>{if(i.type==="clear")D(i.oldValues,s=>{this._removeAxis(s)});else if(i.type==="push")t.children.push(i.newValue),i.newValue.processChart(this);else if(i.type==="setIndex")t.children.setIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="insertIndex")t.children.insertIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="removeIndex")this._removeAxis(i.oldValue);else if(i.type==="moveIndex")t.children.moveValue(i.value,i.newIndex),i.value.processChart(this);else throw new Error("Unknown IListEvent type")})}_removeAxis(e){if(!e.isDisposed()){let t=e.parent;t&&t.children.removeValue(e);let i=e.gridContainer,s=i.parent;s&&s.children.removeValue(i);let a=e.topGridContainer,r=a.parent;r&&r.children.removeValue(a)}}_updateChartLayout(){let e=this.leftAxesContainer.width(),t=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",e),i.set("paddingRight",t);let s=this.topAxesContainer;s.set("paddingLeft",e),s.set("paddingRight",t)}processAxis(e){var t=this.get("cursor");t&&(this.addDisposer(e.on("start",()=>{this._updateCursor()})),this.addDisposer(e.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(e,t){let i=e.fixPosition(e.get("start",0)),s=e.fixPosition(e.get("end",1));if(i>s&&([i,s]=[s,i]),this.xAxes.indexOf(e)!=-1){if(t||e.getPrivate("updateScrollbar")){let a=this.get("scrollbarX");a&&(!a.getPrivate("isBusy")||t)&&(a.setRaw("start",i),a.setRaw("end",s),a.updateGrips())}}else if(this.yAxes.indexOf(e)!=-1&&(t||e.getPrivate("updateScrollbar"))){let a=this.get("scrollbarY");a&&(!a.getPrivate("isBusy")||t)&&(a.setRaw("start",i),a.setRaw("end",s),a.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let e=this.zoomOutButton;if(e&&e.parent){let t=!1;this.xAxes.each(i=>{i.get("zoomOut",!0)&&(R(i.get("start",0),5)!=0||R(i.get("end",1),5)!=1)&&(t=!0)}),this.yAxes.each(i=>{i.get("zoomOut",!0)&&(R(i.get("start",0),5)!=0||R(i.get("end",1),5)!=1)&&(t=!0)}),t?e.isHidden()&&e.show():e.hide()}}inPlot(e){let t=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),s=t.toGlobal(e);if(e.x>=-.5&&e.y>=-.5&&e.x<=t.width()+.5&&e.y<=t.height()+.5)return!0;if(i)for(let a=i.length-1;a>=0;a--){let r=i[a];if(r!=this){let n=r.plotContainer,o=this._root.rootPointToDocument(s),l=r._root.documentPointToRoot(o),h=n.toLocal(l);if(h.x>=-.1&&h.y>=-.1&&h.x<=n.width()+.1&&h.y<=n.height()+.1)return!0}}return!1}arrangeTooltips(){let e=this.plotContainer,t=e.width(),i=e.height(),s=this.height(),a=this._root.tooltipContainer.get("layerMargin");a&&a.bottom>s&&(s=a.bottom);let r=e._display.toGlobal({x:0,y:0}),n=e._display.toGlobal({x:t,y:i}),o=[],l=0,h=1/0,u=this._movePoint,c=this.get("maxTooltipDistance"),d=this.get("maxTooltipDistanceBy","xy"),p,f;v(c)&&this.series.each(m=>{if(!m.isHidden()){let b=m.get("tooltip");if(b){let x=b.get("pointTo");if(x){let _=Math.hypot(u.x-x.x,u.y-x.y);d=="x"?_=Math.abs(u.x-x.x):d=="y"&&(_=Math.abs(u.y-x.y)),_<h&&(h=_,p=m,f=x)}}}});let g=[];if(this.series.each(m=>{let b=m.get("tooltip");if(b&&!b.get("forceHidden")){let x=!1,_=b.get("pointTo");if(_){if(c>=0){let A=b.get("pointTo");if(A&&f&&m!=p){let y=Math.hypot(f.x-A.x,f.y-A.y);d=="x"?y=Math.abs(f.x-A.x):d=="y"&&(y=Math.abs(f.y-A.y)),y>c&&(x=!0)}}else c==-1&&m!=p&&(x=!0);!this.inPlot(this._tooltipToLocal(_))||!b.dataItem?x=!0:x||(l+=_.y),x||m.isHidden()||m.isHiding()?b.hide(0):(b.show(),o.push(b),g.push(m))}}}),this.setPrivate("tooltipSeries",g),this.get("arrangeTooltips")){let m=0,b=0,x=this._root.tooltipContainer,_=o.length;if(l/_>i/2+r.y){o.sort((M,w)=>ot(w.get("pointTo").y,M.get("pointTo").y));let y=n.y;if(D(o,M=>{let w=M.height();b++,m+=w;let P=M.get("centerY");P instanceof ke&&(w*=P.value),w+=M.get("marginBottom",0),M.set("bounds",{left:r.x,top:r.y,right:n.x,bottom:y}),M.setPrivate("customData",{left:r.x,top:r.y,right:n.x,bottom:y}),y=Math.min(y-w,M._fy-w),M.parent==x&&x.children.moveValue(M,0)}),y<0){o.reverse();let M=y;D(o,w=>{b++;let P=w.get("bounds");if(P){let k=P.top-y,I=P.bottom-y;k<M&&(k=M,I=k+w.height()),w.set("bounds",{left:P.left,top:k,right:P.right,bottom:I}),M=P.bottom-y+w.get("marginBottom",0)}})}}else{o.reverse(),o.sort((M,w)=>ot(M.get("pointTo").y,w.get("pointTo").y));let y=0;if(D(o,M=>{b++;let w=M.height();m+=w;let P=M.get("centerY");P instanceof ke&&(w*=P.value),w+=M.get("marginBottom",0),M.set("bounds",{left:r.x,top:y,right:n.x,bottom:Math.max(r.y+s,y+w)}),M.parent==x&&x.children.moveValue(M,0),y=Math.max(y+w,M._fy+w)}),y>s){o.reverse();let M=s;D(o,w=>{b++;let P=w.get("bounds");if(P){let k=P.top-(s-y),I=P.bottom-(s-y);I>M&&(I=M,k=I-w.height()),w.set("bounds",{left:P.left,top:k,right:P.right,bottom:I}),M=I-w.height()-w.get("marginBottom",0)}})}}m==0&&b>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(e){return this.plotContainer.toLocal(e)}zoomOut(){this.xAxes.each(e=>{e.get("zoomOut",!0)&&(e.setPrivate("updateScrollbar",!0),e.zoom(0,1))}),this.yAxes.each(e=>{e.get("zoomOut",!0)&&(e.setPrivate("updateScrollbar",!0),e.zoom(0,1))})}_dispose(){super._dispose();let e=this.get("cursor");e&&e.dispose()}};Object.defineProperty(Ce,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYChart"});Object.defineProperty(Ce,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Mt.classNames.concat([Ce.className])});var Ee=class extends Tt{constructor(){super(...arguments),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(Ce.new(this._root,{themeTags:["chart"],interactive:!1,interactiveChildren:!1,panX:!1,panY:!1,wheelX:"none",wheelY:"none"}))}),Object.defineProperty(this,"overlay",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(V.new(this._root,{themeTags:["overlay"],interactive:!1}))})}_afterNew(){this._addOrientationClass(),this._settings.themeTags=F(this._settings.themeTags,["scrollbar","xy","chart",this._settings.orientation]);let e=this.children;e.moveValue(this.thumb),e.moveValue(this.startGrip),e.moveValue(this.endGrip),this.thumb.set("opacity",0),this.thumb.states.create("hover",{opacity:.2});let t=this.chart.plotContainer;t.set("interactive",!1),t.remove("background"),t.children.removeValue(this.chart.zoomOutButton),super._afterNew()}_updateThumb(){super._updateThumb(),this.overlay.set("draw",e=>{let t=this.startGrip,i=this.endGrip,s=t.x(),a=t.y(),r=i.x(),n=i.y(),o=this.height(),l=this.width();s>r&&([s,r]=[r,s]),a>n&&([a,n]=[n,a]),this.get("orientation")==="horizontal"?(e.moveTo(0,0),e.lineTo(s,0),e.lineTo(s,o),e.lineTo(0,o),e.lineTo(0,0),e.moveTo(r,0),e.lineTo(l,0),e.lineTo(l,o),e.lineTo(r,o),e.lineTo(r,0)):(e.moveTo(0,0),e.lineTo(0,a),e.lineTo(l,a),e.lineTo(l,0),e.lineTo(0,0),e.moveTo(0,n),e.lineTo(0,o),e.lineTo(l,o),e.lineTo(l,n),e.lineTo(0,n))})}};Object.defineProperty(Ee,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYChartScrollbar"});Object.defineProperty(Ee,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Tt.classNames.concat([Ee.className])});var de=class extends V{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}};Object.defineProperty(de,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Grid"});Object.defineProperty(de,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([de.className])});var Ue=class extends G{constructor(){super(...arguments),Object.defineProperty(this,"_alwaysShow",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"lineX",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(de.new(this._root,{themeTags:["x"]}))}),Object.defineProperty(this,"lineY",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(de.new(this._root,{themeTags:["y"]}))}),Object.defineProperty(this,"selection",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(V.new(this._root,{themeTags:["selection","cursor"],layer:30}))}),Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_lastPoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_lastPoint2",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_tooltipX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_tooltipY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_toX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_toY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this.setAll({width:O,height:O,isMeasured:!0,position:"absolute"}),this.states.create("hidden",{visible:!0,opacity:0}),this._drawLines(),this.setPrivateRaw("visible",!1),this._disposers.push(this.setTimeout(()=>{this.setPrivate("visible",!0)},500)),this._disposers.push(this.lineX.events.on("positionchanged",()=>{this._handleXLine()})),this._disposers.push(this.lineY.events.on("positionchanged",()=>{this._handleYLine()})),this._disposers.push(this.lineX.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),ft("keyboardevents")&&this._disposers.push(jt(document,"keydown",e=>{this._handleLineMove(Gt(e),e.ctrlKey)}))}_setUpTouch(){let e=this.chart;e&&(e.plotContainer._display.cancelTouch=this.get("behavior")!="none")}_handleXLine(){let e=this.lineX.x(),t=!0;(e<0||e>this.width())&&(t=!1),this.lineX.setPrivate("visible",t)}_handleYLine(){let e=this.lineY.y(),t=!0;(e<0||e>this.height())&&(t=!1),this.lineY.setPrivate("visible",t)}_handleLineMove(e,t){let i="",s=this.chart,a;if(s&&s.xAxes.length){this._root.focused(this.lineX)?(i="positionX",a=s.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(a=s.yAxes.getIndex(0),i="positionY");let r=1;if(t&&(r=5),a){let n=a.get("renderer").get("inversed",!1),o;e=="ArrowRight"||e=="ArrowDown"?o=1:e=="ArrowLeft"||e=="ArrowUp"?o=-1:e=="Tab"&&(o=0),o!=null&&(n&&(o*=-1),this.set(i,a.nextPosition(o*r)))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;let e=this.get("xAxis");if(e){let t=e.get("tooltip");t&&(this._tooltipX=!0,this._disposers.push(t.on("pointTo",()=>{this._updateXLine(t)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;let e=this.get("yAxis");if(e){let t=e.get("tooltip");t&&(this._tooltipY=!0,this._disposers.push(t.on("pointTo",()=>{this._updateYLine(t)})))}}}_handleSyncWith(){let e=this.chart;if(e){let t=this.get("syncWith"),i=[];t&&D(t,s=>{let a=s.chart;a&&i.push(a)}),e._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){let e=this.get("positionX"),t=this.get("positionY");e==null&&t==null?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(e){let t=R(this._display.toLocal(e.get("pointTo",{x:0,y:0})).x,3);this._toX!=t&&(this.lineX.animate({key:"x",to:t,duration:e.get("animationDuration",0),easing:e.get("animationEasing")}),this._toX=t)}_updateYLine(e){let t=R(this._display.toLocal(e.get("pointTo",{x:0,y:0})).y,3);this._toY!=t&&(this.lineY.animate({key:"y",to:t,duration:e.get("animationDuration",0),easing:e.get("animationEasing")}),this._toY=t)}_drawLines(){this.lineX.set("draw",e=>{e.moveTo(0,0),e.lineTo(0,this.height())}),this.lineY.set("draw",e=>{e.moveTo(0,0),e.lineTo(this.width(),0)})}updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(e){this.chart=e,this._handleSyncWith();let t=e.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))}),ft("touchevents")&&(this._disposers.push(t.events.on("click",s=>{Rt(s.originalEvent)&&this._handleMove(s)})),this._setUpTouch()),this._disposers.push(t.events.on("pointerdown",s=>{this._handleCursorDown(s)})),this._disposers.push(t.events.on("globalpointerup",s=>{this._handleCursorUp(s),!s.native&&!this.isHidden()&&this._handleMove(s)})),this._disposers.push(t.events.on("globalpointermove",s=>{!this.get("syncWith")&&je(t._downPoints).length==0&&!s.native&&this.isHidden()||(this._handleMove(s),Math.hypot(this._lastPoint2.x-s.point.x,this._lastPoint2.y-s.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=s.point))}));let i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(e){let t=this.chart;return t?t.inPlot(e):!1}_handleCursorDown(e){if(e.originalEvent.button==2)return;let t=e.point,i=this._display.toLocal(t),s=this.chart;if(this.selection.set("draw",()=>{}),s&&this._inPlot(i)){if(this._downPoint=i,this.get("behavior")!="none"){this.selection.show();let n="selectstarted";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:e.originalEvent})}let a=this._getPosition(i).x,r=this._getPosition(i).y;this.setPrivate("downPositionX",a),this.setPrivate("downPositionY",r)}}_handleCursorUp(e){if(this._downPoint){let t=this.get("behavior","none");if(t!="none"){t.charAt(0)==="z"&&this.selection.hide();let i=e.point,s=this._display.toLocal(i),a=this._downPoint,r=this.get("moveThreshold",1);if(s&&a){let n=!1;if((t==="zoomX"||t==="zoomXY"||t==="selectX"||t==="selectXY")&&Math.abs(s.x-a.x)>r&&(n=!0),(t==="zoomY"||t==="zoomXY"||t==="selectY"||t==="selectXY")&&Math.abs(s.y-a.y)>r&&(n=!0),n){let o="selectended";this.events.isEnabled(o)&&this.events.dispatch(o,{type:o,target:this,originalEvent:e.originalEvent})}else{let o="selectcancelled";this.events.isEnabled(o)&&this.events.dispatch(o,{type:o,target:this,originalEvent:e.originalEvent})}}}}this._downPoint=void 0}_handleMove(e){if(this.getPrivate("visible")){let t=this.chart;if(t&&je(t.plotContainer._downPoints).length>1){this.set("forceHidden",!0);return}else this.set("forceHidden",!1);let i=e.point,s=this._lastPoint;if(Math.round(s.x)===Math.round(i.x)&&Math.round(s.y)===Math.round(i.y))return;this._lastPoint=i,this.setPrivate("lastPoint",i),this.handleMove({x:i.x,y:i.y},!1,e.originalEvent)}}_getPosition(e){return{x:e.x/this.width(),y:e.y/this.height()}}handleMove(e,t,i){e||(e=this._movePoint);let s=this.get("alwaysShow");if(!e){this.hide(0);return}this._movePoint=e;let a=this._display.toLocal(e),r=this.chart;if(r&&(this._inPlot(a)||this._downPoint)){r._movePoint=e,this.isHidden()&&(this.show(),this.get("behavior","").charAt(0)=="z"&&this.selection.set("draw",()=>{}));let n=a.x,o=a.y,l=this._getPosition(a);this.setPrivate("point",a);let h=this.get("snapToSeries");this._downPoint&&(h=void 0);let u=this.get("positionX"),c=l.x;v(u)&&(c=u);let d=this.get("positionY"),p=l.y;v(d)&&(p=d),this.setPrivate("positionX",c),this.setPrivate("positionY",p);let f=this._getPoint(c,p);if(n=f.x,o=f.y,r.xAxes.each(g=>{g._handleCursorPosition(c,h),s&&g.handleCursorShow()}),r.yAxes.each(g=>{g._handleCursorPosition(p,h),s&&g.handleCursorShow()}),!t){r._handleCursorPosition();let g="cursormoved";this.events.isEnabled(g)&&this.events.dispatch(g,{type:g,target:this,point:e,originalEvent:i})}this._updateLines(n,o),r.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);let n="cursorhidden";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this})}this._downPoint&&this.get("behavior")!="none"&&this._updateSelection(a)}_getPoint(e,t){return{x:this.width()*e,y:this.height()*t}}_updateLines(e,t){this._tooltipX||this.lineX.set("x",e),this._tooltipY||this.lineY.set("y",t),this._drawLines()}_updateSelection(e){let t=this.selection,i=this.get("behavior"),s=this.width(),a=this.height();e.x<0&&(e.x=0),e.x>s&&(e.x=s),e.y<0&&(e.y=0),e.y>a&&(e.y=a),t.set("draw",r=>{let n=this._downPoint;n&&(i==="zoomXY"||i==="selectXY"?(r.moveTo(n.x,n.y),r.lineTo(n.x,e.y),r.lineTo(e.x,e.y),r.lineTo(e.x,n.y),r.lineTo(n.x,n.y)):i==="zoomX"||i==="selectX"?(r.moveTo(n.x,0),r.lineTo(n.x,a),r.lineTo(e.x,a),r.lineTo(e.x,0),r.lineTo(n.x,0)):(i==="zoomY"||i==="selectY")&&(r.moveTo(0,n.y),r.lineTo(s,n.y),r.lineTo(s,e.y),r.lineTo(0,e.y),r.lineTo(0,n.y)))})}_onHide(){if(this.isHidden()){let e=this.chart;e&&(e.xAxes.each(t=>{t.handleCursorHide()}),e.yAxes.each(t=>{t.handleCursorHide()}),e.series.each(t=>{t.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let e=this.chart;e&&(e.xAxes.each(t=>{t.handleCursorShow()}),e.yAxes.each(t=>{t.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}};Object.defineProperty(Ue,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYCursor"});Object.defineProperty(Ue,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:G.classNames.concat([Ue.className])});function ui(T,e){return T==null?e:e==null?T:e<T?e:T}function ci(T,e){return T==null?e:e==null||T>e?T:e}var le=class extends Pt{constructor(){super(...arguments),Object.defineProperty(this,"_xField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_axesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_stackDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataSets",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_mainContainerMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_bullets",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"mainContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{}))}),Object.defineProperty(this,"axisRanges",{enumerable:!0,configurable:!0,writable:!0,value:new ut}),Object.defineProperty(this,"_skipped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_couldStackTo",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_reallyStackedTo",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_stackedSeries",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_aLocationX0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_aLocationX1",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_aLocationY0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_aLocationY1",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_showBullets",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueX","openValueX","lowValueX","highValueX"]}),Object.defineProperty(this,"valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueY","openValueY","lowValueY","highValueY"]}),Object.defineProperty(this,"_valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_emptyDataItem",{enumerable:!0,configurable:!0,writable:!0,value:new K(this,void 0,{})}),Object.defineProperty(this,"_dataSetId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipFieldX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipFieldY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_posXDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_posYDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high"),super._afterNew(),this.set("maskContent",!0),this._disposers.push(this.axisRanges.events.onAll(e=>{if(e.type==="clear")D(e.oldValues,t=>{this._removeAxisRange(t)});else if(e.type==="push")this._processAxisRange(e.newValue);else if(e.type==="setIndex")this._processAxisRange(e.newValue);else if(e.type==="insertIndex")this._processAxisRange(e.newValue);else if(e.type==="removeIndex")this._removeAxisRange(e.oldValue);else if(e.type==="moveIndex")this._processAxisRange(e.value);else throw new Error("Unknown IStreamEvent type")})),this.states.create("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames()}_processAxisRange(e){let t=G.new(this._root,{});e.container=t,this.children.push(t),e.series=this;let i=e.axisDataItem;i.setRaw("isRange",!0);let s=i.component;if(s){s._processAxisRange(i,["range","series"]);let a=i.get("bullet");if(a){let n=a.get("sprite");n&&n.setPrivate("visible",!1)}let r=i.get("axisFill");r&&t.set("mask",r),s._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),xe(this._dataSets,(e,t)=>{D(t,i=>{i.dispose()}),t.length=0})}_removeAxisRange(e){let t=e.axisDataItem,i=t.component;t.dispose(),Le(i._seriesAxisRanges,t);let s=e.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&D(this.valueXFields,e=>{if(this.get(e+"Field")){this._valueXFields.push(e);let i=this.get(e+"Show");this.__valueXShowFields.push(i),i.indexOf("Working")!=-1?this._valueXShowFields.push(i.split("Working")[0]):this._valueXShowFields.push(i)}}),this.valueYFields&&D(this.valueYFields,e=>{if(this.get(e+"Field")){this._valueYFields.push(e);let i=this.get(e+"Show");this.__valueYShowFields.push(i),i.indexOf("Working")!=-1?this._valueYShowFields.push(i.split("Working")[0]):this._valueYShowFields.push(i)}})}_dispose(){super._dispose(),this._bullets={};let e=this.chart;e&&e.series.removeValue(this),gt(this.get("xAxis").series,this),gt(this.get("yAxis").series,this)}_min(e,t){let i=ui(this.getPrivate(e),t);this.setPrivate(e,i)}_max(e,t){let i=ci(this.getPrivate(e),t);this.setPrivate(e,i)}_shouldMakeBullet(e){let t=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!t.inited||!i.inited)return!1;let a=this.get("minBulletDistance",0);if(a>0){let r=this.startIndex(),o=this.endIndex()-r;if(t==s){if(t.get("renderer").axisLength()/o<a/5)return!1}else if(i==s&&i.get("renderer").axisLength()/o<a/5)return!1}return e.get(this._xField)!=null&&e.get(this._yField)!=null}_makeFieldNames(){let e=this.get("xAxis"),t=this.get("yAxis"),i=e.getPrivate("name"),s=pt(i),a=t.getPrivate("name"),r=pt(a),n=e.get("renderer").getPrivate("letter"),o=t.get("renderer").getPrivate("letter"),l="open",h="low",u="high",c="Show";e.className==="ValueAxis"?(this._xField=this.get(i+n+c),this._xOpenField=this.get(l+s+n+c),this._xLowField=this.get(h+s+n+c),this._xHighField=this.get(u+s+n+c)):(this._xField=i+n,this._xOpenField=l+s+n,this._xLowField=h+s+n,this._xHighField=u+s+n),t.className==="ValueAxis"?(this._yField=this.get(a+o+c),this._yOpenField=this.get(l+r+o+c),this._yLowField=this.get(h+r+o+c),this._yHighField=this.get(u+r+o+c)):(this._yField=a+o,this._yOpenField=l+r+o,this._yLowField=h+r+o,this._yHighField=u+r+o)}_fixVC(){let e=this.get("xAxis"),t=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),a=this.get("sequencedInterpolation");if(s){let r=0;a&&(r=.999999999999),e===i?s.set("vcy",r):(t===i||s.set("vcy",r),s.set("vcx",r))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){let e=this.get("xAxis"),t=this.get("yAxis");this.set("x",e.x()-Fe(e.get("centerX",0),e.width())-e.parent.get("paddingLeft",0)),this.set("y",t.y()-Fe(t.get("centerY",0),t.height())-t.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_prepareChildren(){super._prepareChildren(),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirty=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),this.set("width",this.get("xAxis").width()),this.set("height",this.get("yAxis").height()),this._handleMaskBullets();let e=this.get("xAxis"),t=this.get("yAxis"),i=this.get("baseAxis"),s=this.get("tooltipPositionX"),a;switch(s){case"open":a=this._xOpenField;break;case"low":a=this._xLowField;break;case"high":a=this._xHighField;break;default:a=this._xField}this._tooltipFieldX=a;let r=this.get("tooltipPositionY"),n;switch(r){case"open":n=this._yOpenField;break;case"low":n=this._yLowField;break;case"high":n=this._yHighField;break;default:n=this._yField}this._tooltipFieldY=n,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();let o=this.get("stacked");if(this.isDirty("stacked")&&(o?this._valuesDirty&&!this._dataProcessed||this._stack():this._unstack()),this._valuesDirty&&!this._dataProcessed&&(this._dataProcessed=!0,o&&this._stack(),D(this.dataItems,l=>{D(this._valueXShowFields,h=>{let u=l.get(h);u!=null&&(o&&(u+=this.getStackedXValue(l,h)),this._min("minX",u),this._max("maxX",u))}),D(this._valueYShowFields,h=>{let u=l.get(h);u!=null&&(o&&(u+=this.getStackedYValue(l,h)),this._min("minY",u),this._max("maxY",u))}),e.processSeriesDataItem(l,this._valueXFields),t.processSeriesDataItem(l,this._valueYFields)}),e._seriesValuesDirty=!0,t._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&e.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&t.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)),(this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(e._groupSeriesData(this),t._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty){let l=this.startIndex(),h=this.endIndex(),u=this.get("minBulletDistance",0);if(u>0&&i&&(i.get("renderer").axisLength()/(h-l)>u?this._showBullets=!0:this._showBullets=!1),(this._psi!=l||this._pei!=h||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;let c=this.get("vcx",1),d=this.get("vcy",1),p=this.get("stacked",!1),f=this.getPrivate("outOfSelection");if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),f)t.markDirtySelectionExtremes();else for(let g=l;g<h;g++)this.processYSelectionDataItem(this.dataItems[g],d,p);if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),f)t.markDirtySelectionExtremes();else for(let g=l;g<h;g++)this.processXSelectionDataItem(this.dataItems[g],c,p);if((i===e||!i)&&(this.get("valueYShow")!=="valueYWorking"||this.get("useSelectionExtremes"))){let g=this.getPrivate("selectionMinY");g!=null&&(this.setPrivateRaw("minY",g),t.markDirtyExtremes());let m=this.getPrivate("selectionMaxY");m!=null&&(this.setPrivateRaw("maxY",m),t.markDirtyExtremes())}if((i===t||!i)&&(this.get("valueXShow")!=="valueXWorking"||this.get("useSelectionExtremes"))){let g=this.getPrivate("selectionMinX");g!=null&&(this.setPrivateRaw("minX",g),t.markDirtyExtremes());let m=this.getPrivate("selectionMaxX");m!=null&&(this.setPrivateRaw("maxX",m),e.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&e.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&t.markDirtySelectionExtremes()}}}_makeRangeMask(){if(this.axisRanges.length>0){let e=this._mainContainerMask;e==null&&(e=this.children.push(V.new(this._root,{})),this._mainContainerMask=e,e.set("draw",(t,i)=>{let s=this.parent;if(s){let a=this._root.container.width(),r=this._root.container.height();t.moveTo(-a,-r),t.lineTo(-a,r*2),t.lineTo(a*2,r*2),t.lineTo(a*2,-r),t.lineTo(-a,-r),this.axisRanges.each(n=>{let o=n.axisDataItem.get("axisFill");if(s&&o){let l=o.get("draw");l&&l(t,i)}})}this.mainContainer._display.mask=e._display})),e.markDirty(),e._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren(),this._x=this.x(),this._y=this.y(),this._makeRangeMask()}_stack(){let e=this.chart;if(e){let t=e.series.indexOf(this);if(this._couldStackTo=[],t>0){let i;for(let s=t-1;s>=0&&(i=e.series.getIndex(s),!(i.get("xAxis")===this.get("xAxis")&&i.get("yAxis")===this.get("yAxis")&&i.className===this.className&&(this._couldStackTo.push(i),!i.get("stacked"))));s--);}this._stackDataItems()}}_unstack(){xe(this._reallyStackedTo,(e,t)=>{delete t._stackedSeries[this.uid]}),this._reallyStackedTo={},D(this.dataItems,e=>{e.setRaw("stackToItemY",void 0),e.setRaw("stackToItemX",void 0)})}_handleRemoved(){let e=this.get("xAxis");e&&e._handleSeriesRemoved();let t=this.get("yAxis");t&&t._handleSeriesRemoved()}_stackDataItems(){let e=this.get("baseAxis"),t=this.get("xAxis"),i=this.get("yAxis"),s,a;e===t?(s="valueY",a="stackToItemY"):e===i&&(s="valueX",a="stackToItemX");let r=this._couldStackTo.length,n=0,o=this.get("stackToNegative");this._reallyStackedTo={},D(this.dataItems,l=>{for(let h=0;h<r;h++){let u=this._couldStackTo[h],c=u.dataItems[n],d=l.get(s);if(c){let p=c.get(s);if(o)if(v(d)){if(v(p)){if(h==r-1&&l.setRaw(a,void 0),d>=0&&p>=0){l.setRaw(a,c),this._reallyStackedTo[u.uid]=u,u._stackedSeries[this.uid]=this;break}if(d<0&&p<0){l.setRaw(a,c),this._reallyStackedTo[u.uid]=u,u._stackedSeries[this.uid]=this;break}}}else break;else if(v(d)&&v(p)){l.setRaw(a,c),this._reallyStackedTo[u.uid]=u,u._stackedSeries[this.uid]=this;break}}}n++})}processXSelectionDataItem(e,t,i){D(this.__valueXShowFields,s=>{let a=e.get(s);a!=null&&(i&&(a+=this.getStackedXValueWorking(e,s)),this._min("selectionMinX",a),this._max("selectionMaxX",a*t))})}processYSelectionDataItem(e,t,i){D(this.__valueYShowFields,s=>{let a=e.get(s);a!=null&&(i&&(a+=this.getStackedYValueWorking(e,s)),this._min("selectionMinY",a),this._max("selectionMaxY",a*t))})}getStackedYValueWorking(e,t){let i=e.get("stackToItemY");if(i){let s=i.component;return i.get(t,0)*s.get("vcy",1)+this.getStackedYValueWorking(i,t)}return 0}getStackedXValueWorking(e,t){let i=e.get("stackToItemX");if(i){let s=i.component;return i.get(t,0)*s.get("vcx",1)+this.getStackedXValueWorking(i,t)}return 0}getStackedYValue(e,t){let i=e.get("stackToItemY");return i?i.get(t,0)+this.getStackedYValue(i,t):0}getStackedXValue(e,t){let i=e.get("stackToItemX");return i?i.get(t,0)+this.getStackedXValue(i,t):0}createLegendMarker(e){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem,s=e.get("locationX",i.get("locationX",.5)),a=e.get("locationY",i.get("locationY",.5)),r=this.get("xAxis"),n=this.get("yAxis"),o=this.get("exactLocationX",!1),l=this.get("exactLocationY",!1),h=r.getDataItemPositionX(i,this._xField,s,this.get("vcx",1),o),u=n.getDataItemPositionY(i,this._yField,a,this.get("vcy",1),l),c=this.getPoint(h,u),d=i.get("left",c.x),p=i.get("right",c.x),f=i.get("top",c.y),g=i.get("bottom",c.y),m=0,b=0,x=p-d,_=g-f;if(this._shouldShowBullet(h,u)){t.setPrivate("visible",!e.getPrivate("hidden"));let A=e.get("field"),y=this.get("baseAxis"),M=this.get("xAxis"),w=this.get("yAxis");if(A!=null){let k;y==M?(A=="value"?k=this._yField:A=="open"?k=this._yOpenField:A=="high"?k=this._yHighField:A=="low"&&(k=this._yLowField),k&&(u=w.getDataItemPositionY(i,k,0,this.get("vcy",1),l),c=w.get("renderer").positionToPoint(u),b=c.y,m=d+x*s)):(A=="value"?k=this._xField:A=="open"?k=this._xOpenField:A=="high"?k=this._xHighField:A=="low"&&(k=this._xLowField),k&&(h=M.getDataItemPositionX(i,k,0,this.get("vcx",1),o),c=M.get("renderer").positionToPoint(h),m=c.x,b=g-_*a))}else m=d+x*s,b=g-_*a;let P=e.get("stacked");if(P){let k=this.chart;if(y==M){let I=this._bullets[h+"_"+u];if(I){let S=I.bounds(),C=t.localBounds(),L=b;b=S.top,P=="down"?b=S.bottom-C.top:P=="auto"?k&&(L<k.plotContainer.height()/2?b=S.bottom-C.top:b+=C.bottom):b+=C.bottom}this._bullets[h+"_"+u]=t}else{let I=this._bullets[h+"_"+u];if(I){let S=I.bounds(),C=t.localBounds(),L=m;m=S.right,P=="down"?m=S.left-C.right:P=="auto"?k&&(L<k.plotContainer.width()/2?m=S.left-C.right:m-=C.left):m-=C.left}this._bullets[h+"_"+u]=t}}t.isType("Label")&&(t.setPrivate("maxWidth",Math.abs(x)),t.setPrivate("maxHeight",Math.abs(_))),t.setAll({x:m,y:b})}else t.setPrivate("visible",!1)}}_shouldShowBullet(e,t){return this._showBullets}setDataSet(e){if(this._dataSets[e]){this._handleDataSetChange(),this._dataItems=this._dataSets[e],this._markDataSetDirty(),this._dataSetId=e;let t="datasetchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,id:e})}}resetGrouping(){xe(this._dataSets,(e,t)=>{t!=this._mainDataItems&&D(t,i=>{i.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){D(this._dataItems,e=>{let t=e.bullets;t&&D(t,i=>{if(i){let s=i.get("sprite");s&&s.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return Me(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(t.show.call(this,e).then(()=>{this._isShowing=!1;let s=this.get("xAxis"),a=this.get("yAxis"),r=this.get("baseAxis");a!==r&&a.markDirtySelectionExtremes(),s!==r&&s.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(e)),i.push(this._sequencedShowHide(!0,e)),yield Promise.all(i)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return Me(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(t.hide.call(this,e).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(e)),i.push(this._sequencedShowHide(!1,e)),yield Promise.all(i)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,e,t)];v(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing");D(this._valueFields,r=>{s.push(e.animate({key:r+"Working",to:e.get(r),duration:t,easing:a}).waitForStop())}),yield Promise.all(s)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,e,t)],a=this.states.lookup("hidden");a||(a=this.states.create("hidden",{})),v(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let r=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),n=this.get("xAxis"),o=this.get("yAxis"),l=this.get("baseAxis"),h=this.get("stacked");if((l===n||!l)&&D(this._valueYFields,u=>{let c=o.getPrivate("min"),d=o.baseValue();v(c)&&c>d&&(d=c),h&&(d=0),e.get(u)!=null&&s.push(e.animate({key:u+"Working",to:d,duration:t,easing:r}).waitForStop())}),l===o||!l){let u=n.getPrivate("min"),c=n.baseValue();v(u)&&u>c&&(c=u),h&&(c=0),D(this._valueXFields,d=>{e.get(d)!=null&&s.push(e.animate({key:d+"Working",to:c,duration:t,easing:r}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){let e=this._stackedSeries;e&&xe(e,(t,i)=>{i._stackDirty||i._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(e){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(e),this.updateLegendValue(e));let t=this.get("tooltip"),i=this.get("exactLocationX",!1),s=this.get("exactLocationY",!1);if(t)if(!this.isHidden()&&this.get("visible")){if(t._setDataItem(e),e){let a=this.get("locationX",0),r=this.get("locationY",1),n=e.get("locationX",a),o=e.get("locationY",r),l=this.get("xAxis"),h=this.get("yAxis"),u=this.get("vcx",1),c=this.get("vcy",1),d=l.getDataItemPositionX(e,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*n,u,i),p=h.getDataItemPositionY(e,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*o,c,s),f=this.getPoint(d,p),g=!0;if(D(this._valueFields,m=>{e.get(m)==null&&(g=!1)}),g){let m=this.chart;m&&m.inPlot(f)?(t.label.text.markDirtyText(),t.set("tooltipTarget",this._getTooltipTarget(e)),t.set("pointTo",this._display.toGlobal({x:f.x,y:f.y}))):t._setDataItem(void 0)}else t._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){let e=this.get("tooltip");return e&&e.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(e){if(this.get("seriesTooltipTarget")=="bullet"){let t=e.bullets;if(t&&t.length>0){let s=t[0].get("sprite");if(s)return s}}return this}updateLegendValue(e){let t=this.get("legendDataItem");if(t){let i=t.get("label");if(i){let a="";e?(i._setDataItem(e),a=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),a=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",a)}let s=t.get("valueLabel");if(s){let a="";e?(s._setDataItem(e),a=this.get("legendValueText",s.get("text",""))):(s._setDataItem(this._emptyDataItem),a=this.get("legendRangeValueText",s.get("text",""))),s.set("text",a)}}}_getItemReaderLabel(){let e="X: {"+this._xField;return this.get("xAxis").isType("DateAxis")&&(e+=".formatDate()"),e+="}; Y: {"+this._yField,this.get("yAxis").isType("DateAxis")&&(e+=".formatDate()"),e+="}",e}getPoint(e,t){let i=this.get("xAxis").get("renderer").positionToCoordinate(e),s=this.get("yAxis").get("renderer").positionToCoordinate(t),a=999999999;return s<-a&&(s=-a),s>a&&(s=a),i<-a&&(i=-a),i>a&&(i=a),{x:i,y:s}}_shouldInclude(e){return!0}handleCursorHide(){this.hideTooltip(),this.updateLegendValue(void 0),this.updateLegendMarker(void 0)}_afterDataChange(){super._afterDataChange(),this.get("xAxis")._markDirtyKey("start"),this.get("yAxis")._markDirtyKey("start"),this.resetExtremes()}resetExtremes(){this.setPrivate("selectionMinX",void 0),this.setPrivate("selectionMaxX",void 0),this.setPrivate("selectionMinY",void 0),this.setPrivate("selectionMaxY",void 0),this.setPrivate("minX",void 0),this.setPrivate("minY",void 0),this.setPrivate("maxX",void 0),this.setPrivate("maxY",void 0)}createAxisRange(e){return this.axisRanges.push({axisDataItem:e})}get mainDataItems(){return this._mainDataItems}_adjustStartIndex(e){let t=this.get("xAxis");if(this.get("baseAxis")==t&&t.isType("DateAxis")){let s=t.baseDuration(),a=t.getPrivate("selectionMin",t.getPrivate("min",0)),r=s*this.get("locationX",.5),n=-1/0;for(;n<a;){let o=this.dataItems[e];if(o){let l=o.open;if(l?n=l.valueX:n=o.get("valueX",0),n+=r,n<a)e++;else break}else break}}return e}};Object.defineProperty(le,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYSeries"});Object.defineProperty(le,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Pt.classNames.concat([le.className])});var _e=class T extends le{constructor(){super(...arguments),Object.defineProperty(this,"_ph",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_pw",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_columnsUpdated",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_makeGraphics(e,t){return this.makeColumn(t,e)}_makeFieldNames(){super._makeFieldNames();let e=this.get("xAxis"),t=this.get("yAxis"),i="CategoryAxis",s="ValueAxis";e.isType(i)&&(this.get("openCategoryXField")||(this._xOpenField=this._xField)),e.isType(s)&&(this.get("openValueXField")||(this._xOpenField=this._xField)),t.isType(i)&&(this.get("openCategoryYField")||(this._yOpenField=this._yField)),t.isType(s)&&(this.get("openValueYField")||(this._yOpenField=this._yField))}_prepareChildren(){super._prepareChildren();let e=this.get("xAxis"),t=this.get("yAxis"),i=this.dataItems.length,s=Math.max(0,this.startIndex()-2),a=Math.min(this.endIndex()+2,i-1);if(e.inited&&t.inited)for(let r=s;r<=a;r++){let n=this.dataItems[r];this._createGraphics(n)}}_updateChildren(){let e=this.chart;e&&(this._ph=e.plotContainer.height(),this._pw=e.plotContainer.width());let t=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis"),a=this.columns.template;this.isDirty("fill")&&a.get("fill")==null&&a.set("fill",this.get("fill")),this.isDirty("fillPattern")&&a.get("fillPattern")==null&&a.set("fillPattern",this.get("fillPattern")),this.isDirty("stroke")&&a.get("stroke")==null&&a.set("stroke",this.get("stroke"));let r=0,n=0,o=0;D(s.series,m=>{if(m instanceof T){let b=m.get("stacked");b&&o==0&&n++,!b&&m.get("clustered")&&n++}m===this&&(r=n-1),o++}),this.get("clustered")||(r=0,n=1),n===0&&(n=1,r=0);let l=t.get("renderer"),h=i.get("renderer"),u="cellStartLocation",c="cellEndLocation",d=l.get(u,0),p=l.get(c,1),f=h.get(u,0),g=h.get(c,1);if(this._aLocationX0=d+r/n*(p-d),this._aLocationX1=d+(r+1)/n*(p-d),this._aLocationY0=f+r/n*(g-f),this._aLocationY1=f+(r+1)/n*(g-f),t.inited&&i.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty){let m=this.dataItems.length,b=Math.max(0,this.startIndex()-2),x=Math.min(this.endIndex()+2,m-1);for(let y=0;y<b;y++)this._toggleColumn(this.dataItems[y],!1);let _=this.dataItems[b];for(let y=b;y<=x;y++){let M=this.dataItems[y];if(M.get("valueX")!=null&&M.get("valueY")!=null){if(_=M,y>0&&b>0)for(let w=y-1;w>=0;w--){let P=this.dataItems[w];if(P.get("valueX")!=null&&P.get("valueY")!=null){_=P;break}}break}else this._toggleColumn(M,!1)}this._beforeColumnsDraw();let A=0;i.isType("CategoryAxis")&&t.isType("CategoryAxis")?A=2:t===s?A=0:i===s&&(A=1);for(let y=b;y<=x;y++){let M=this.dataItems[y];this._updateGraphics(M,_,A),M.get("valueX")!=null&&M.get("valueY")!=null&&(_=M)}this._afterColumnsDraw();for(let y=x+1;y<m;y++)this._toggleColumn(this.dataItems[y],!1);this._columnsUpdated=!0}}else this._skipped=!0;this.getPrivate("doNotUpdateLegend")||this.updateLegendMarker(this.get("tooltipDataItem")),super._updateChildren()}_afterChanged(){super._afterChanged(),this._columnsUpdated=!1}_beforeColumnsDraw(){}_afterColumnsDraw(){}_createGraphics(e){let t=e.get("graphics");if(!t){t=this._makeGraphics(this.columns,e),e.set("graphics",t),t._setDataItem(e);let i=e.get("legendDataItem");if(i){let a=i.get("markerRectangle");if(a){let r=a.states.lookup("default");D(_t,n=>{let o=t.get(n,this.get(n));a.set(n,o),r.set(n,o)})}}let s=e.get("rangeGraphics");s&&D(s,a=>{a.dispose()}),s=[],e.setRaw("rangeGraphics",s),this.axisRanges.each(a=>{let r=a.container,n=this._makeGraphics(a.columns,e);s&&s.push(n),n.setPrivate("list",a.columns),r.children.push(n)})}}createAxisRange(e){return D(this.dataItems,t=>{let i=t.get("graphics");i&&(i.dispose(),t.set("graphics",void 0))}),super.createAxisRange(e)}_updateGraphics(e,t,i){let s=e.get("graphics"),a=this._xField,r=this._yField,n=e.get(a),o=e.get(r),l=this.get("exactLocationX",!1);if(n!=null&&o!=null){let h=this._xOpenField,u=this._yOpenField,c=this.get("locationX",e.get("locationX",.5)),d=this.get("locationY",e.get("locationY",.5)),p=this.get("openLocationX",e.get("openLocationX",c)),f=this.get("openLocationY",e.get("openLocationY",d)),g=s.get("width"),m=s.get("height"),b=this.get("stacked"),x=this.get("xAxis"),_=this.get("yAxis"),A=x.get("start"),y=x.get("end"),M=_.get("start"),w=_.get("end"),P,k,I,S,C=this.get("vcy",1),L=this.get("vcx",1),E=!1,U=!1;if(i==0){let X=this._aLocationX0+p-.5,$=this._aLocationX1+c-.5;if(g instanceof ke){let j=($-X)*(1-g.value)/2;X+=j,$-=j}if(P=x.getDataItemPositionX(e,h,X,L,l),k=x.getDataItemPositionX(e,a,$,L,l),I=_.getDataItemPositionY(e,r,d,C),this._yOpenField!==this._yField)S=_.getDataItemPositionY(e,u,f,C);else if(b){let j=e.get("stackToItemY");j?S=_.getDataItemPositionY(j,r,f,j.component.get("vcy")):S=_.basePosition()}else S=_.basePosition();e.setRaw("point",{x:P+(k-P)/2,y:I}),U=!0}else if(i==1){let X=this._aLocationY0+f-.5,$=this._aLocationY1+d-.5;if(m instanceof ke){let j=($-X)*(1-m.value)/2;X+=j,$-=j}if(I=_.getDataItemPositionY(e,u,X,C),S=_.getDataItemPositionY(e,r,$,C),k=x.getDataItemPositionX(e,a,c,L,l),this._xOpenField!==this._xField)P=x.getDataItemPositionX(e,h,p,L,l);else if(b){let j=e.get("stackToItemX");j?P=x.getDataItemPositionX(j,a,p,j.component.get("vcx"),l):P=x.basePosition()}else P=x.basePosition();E=!0,e.setRaw("point",{x:k,y:I+(S-I)/2})}else if(i==2){let X=this._aLocationX0+p-.5,$=this._aLocationX1+c-.5;if(g instanceof ke){let j=($-X)*(1-g.value)/2;X+=j,$-=j}if(P=x.getDataItemPositionX(e,h,X,L),k=x.getDataItemPositionX(e,a,$,L),X=this._aLocationY0+f-.5,$=this._aLocationY1+d-.5,m instanceof ke){let j=($-X)*(1-m.value)/2;X+=j,$-=j}I=_.getDataItemPositionY(e,u,X,C),S=_.getDataItemPositionY(e,r,$,C),e.setRaw("point",{x:P+(k-P)/2,y:I+(S-I)/2})}this._applyGraphicsStates(e,t),this._updateSeriesGraphics(e,s,P,k,I,S,E,U),P<A&&k<A||P>y&&k>y||I<M&&S<=M||I>=w&&S>w||ae(P)||ae(I)?this._toggleColumn(e,!1):this._toggleColumn(e,!0);let te=e.get("rangeGraphics");te&&D(te,X=>{this._updateSeriesGraphics(e,X,P,k,I,S,E,U)})}else this._toggleColumn(e,!1)}_updateSeriesGraphics(e,t,i,s,a,r,n,o){let l=t.get("width"),h=t.get("height"),u=t.get("maxWidth"),c=t.get("maxHeight"),d=this.getPoint(i,a),p=this.getPoint(s,r),f=e.get("point");if(f){let g=this.getPoint(f.x,f.y);f.x=g.x+this._x,f.y=g.y+this._y}if(i=d.x,s=p.x,a=d.y,r=p.y,v(l)){let g=(s-i-l)/2;i+=g,s-=g}if(v(u)&&u<Math.abs(s-i)){let g=(s-i-u)/2;i+=g,s-=g}if(v(h)){let g=(r-a-h)/2;a+=g,r-=g}if(v(c)&&c<Math.abs(r-a)){let g=(r-a-c)/2;a+=g,r-=g}this.get("adjustBulletPosition")&&(n&&(s=Math.min(Math.max(0,s),this._pw),i=Math.min(Math.max(0,i),this._pw)),o&&(a=Math.min(Math.max(0,a),this._ph),r=Math.min(Math.max(0,r),this._ph))),e.setRaw("left",i),e.setRaw("right",s),e.setRaw("top",a),e.setRaw("bottom",r),t.setPrivate("width",s-i),t.setPrivate("height",r-a),t.set("x",i),t.set("y",r-(r-a))}_handleDataSetChange(){super._handleDataSetChange(),D(this._dataItems,e=>{this._toggleColumn(e,!1)})}_applyGraphicsStates(e,t){let i=e.get("graphics"),s=i.states.lookup("dropFromOpen"),a=i.states.lookup("riseFromOpen"),r=i.states.lookup("dropFromPrevious"),n=i.states.lookup("riseFromPrevious");if(s||r||a||n){let o=this.get("xAxis"),l=this.get("yAxis"),h=this.get("baseAxis"),u,c,d;h===o&&l.isType("ValueAxis")?(u=e.get(this._yOpenField),c=e.get(this._yField),d=t.get(this._yField)):h===l&&o.isType("ValueAxis")&&(u=e.get(this._xOpenField),c=e.get(this._xField),d=t.get(this._xField)),v(u)&&v(c)&&(c<u?s&&s.apply():a&&a.apply(),v(d)&&(c<d?r&&r.apply():n&&n.apply()))}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("graphics");t&&(this.columns.removeValue(t),t.dispose());let i=e.get("rangeGraphics");i&&D(i,s=>{let a=s.getPrivate("list");a&&a.removeValue(s),s.dispose()})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,e,t)],a=e.get("graphics");a&&s.push(a.hide(t));let r=e.get("rangeGraphics");r&&D(r,n=>{s.push(n.hide(t))}),yield Promise.all(s)})}_toggleColumn(e,t){let i=e.get("graphics");i&&i.setPrivate("visible",t);let s=e.get("rangeGraphics");s&&D(s,r=>{r.setPrivate("visible",t)});let a=e.bullets;a&&D(a,r=>{r.setPrivate("hidden",!t)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,e,t)],a=e.get("graphics");a&&s.push(a.show(t));let r=e.get("rangeGraphics");r&&D(r,n=>{s.push(n.show(t))}),yield Promise.all(s)})}updateLegendMarker(e){let t=this.get("legendDataItem");if(this.get("useLastColorForLegendMarker")&&!e){let i=this.dataItems[this.endIndex()-1];i&&(e=i)}if(t){let i=this.columns.template;if(e){let a=e.get("graphics");a&&(i=a)}let s=t.get("markerRectangle");if(s&&!t.get("itemContainer").get("disabled")){let a=s.states.lookup("default");D(_t,r=>{let n=i.get(r,this.get(r));s.set(r,n),a.set(r,n)})}}}_getTooltipTarget(e){if(this.get("seriesTooltipTarget")=="bullet")return super._getTooltipTarget(e);let t=e.get("graphics");return t||this}};Object.defineProperty(_e,"className",{enumerable:!0,configurable:!0,writable:!0,value:"BaseColumnSeries"});Object.defineProperty(_e,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:le.classNames.concat([_e.className])});var he=class extends yt{constructor(){super(...arguments),Object.defineProperty(this,"_series",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_isPanning",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"minorDataItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"labelsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{}))}),Object.defineProperty(this,"gridContainer",{enumerable:!0,configurable:!0,writable:!0,value:G.new(this._root,{width:O,height:O})}),Object.defineProperty(this,"topGridContainer",{enumerable:!0,configurable:!0,writable:!0,value:G.new(this._root,{width:O,height:O})}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{isMeasured:!1,width:O,height:O,position:"absolute"}))}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rangesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_panStart",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_panEnd",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_sAnimation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_eAnimation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_skipSync",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"axisRanges",{enumerable:!0,configurable:!0,writable:!0,value:new ut}),Object.defineProperty(this,"_seriesAxisRanges",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"ghostLabel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cursorPosition",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"_snapToSeries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_seriesValuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_seriesAdded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"axisHeader",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{themeTags:["axis","header"],position:"absolute",background:pe.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})}))}),Object.defineProperty(this,"_bullets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_dispose(){this.gridContainer.dispose(),this.topGridContainer.dispose(),this.bulletsContainer.dispose(),this.labelsContainer.dispose(),this.axisHeader.dispose(),super._dispose()}_afterNew(){super._afterNew(),this.setPrivate("updateScrollbar",!0),this._disposers.push(this.axisRanges.events.onAll(t=>{if(t.type==="clear")D(t.oldValues,i=>{i.dispose()});else if(t.type==="push")this._processAxisRange(t.newValue,["range"]);else if(t.type==="setIndex")this._processAxisRange(t.newValue,["range"]);else if(t.type==="insertIndex")this._processAxisRange(t.newValue,["range"]);else if(t.type==="removeIndex")this.disposeDataItem(t.oldValue);else if(t.type==="moveIndex")this._processAxisRange(t.value,["range"]);else throw new Error("Unknown IStreamEvent type")}));let e=this.get("renderer");e&&(e.axis=this,e.processAxis()),this.children.push(e),this._createGhostLabel()}_createGhostLabel(){let t=this.get("renderer").makeLabel(new K(this,void 0,{}),[]);t.adapters.disable("text"),t.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),t.events.disable(),this.ghostLabel=t}_updateFinals(e,t){}zoom(e,t,i,s){if(this.get("zoomable",!0))if(this._updateFinals(e,t),this.get("start")!==e||this.get("end")!=t){let a=this._sAnimation,r=this._eAnimation;e>t&&([e,t]=[t,e]);let n=this.get("maxDeviation",.5)*Math.min(1,t-e);e<-n&&(e=-n),t>1+n&&(t=1+n);let o=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),l=o;v(i)||(i=this.get("interpolationDuration",0)),s||(s="end"),t===1&&e!==0&&(e<this.get("start",0)?s="start":s="end"),e===0&&t!==1&&(t>this.get("end",1)?s="end":s="start");let h=this.get("minZoomCount",0),u=this.dataItems;u&&u.length<h&&(h=u.length);let c=this.get("maxZoomCount",1/0);v(h)&&(o=l/h);let d=1;if(v(c)&&(d=l/c),e>t&&([e,t]=[t,e]),s==="start"?(c>0&&1/(t-e)<d&&(t=e+1/d),1/(t-e)>o&&(t=e+1/o),t>1&&t-e<1/o&&(e=t-1/o)):(c>0&&1/(t-e)<d&&(e=t-1/d),1/(t-e)>o&&(e=t-1/o),e<0&&t-e<1/o&&(t=e+1/o)),1/(t-e)>o&&(t=e+1/o),1/(t-e)>o&&(e=t-1/o),c!=null&&h!=null&&e==this.get("start")&&t==this.get("end")){let p=this.chart;p&&p._handleAxisSelection(this,!0)}if((a&&a.playing&&a.to==e||this.get("start")==e)&&(r&&r.playing&&r.to==t||this.get("end")==t))return;if(i>0){let p=this.get("interpolationEasing"),f,g;if(this.get("start")!=e&&(f=this.animate({key:"start",to:e,duration:i,easing:p})),this.get("end")!=t&&(g=this.animate({key:"end",to:t,duration:i,easing:p})),this._sAnimation=f,this._eAnimation=g,f)return f;if(g)return g}else this.set("start",e),this.set("end",t),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}get series(){return this._series}_processAxisRange(e,t){e.setRaw("isRange",!0),this._createAssets(e,t),this._rangesDirty=!0,this._prepareDataItem(e);let i=e.get("above"),s=this.topGridContainer,a=e.get("grid");i&&a&&s.children.moveValue(a);let r=e.get("axisFill");i&&r&&s.children.moveValue(r)}_prepareDataItem(e,t){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(e=>{this._prepareDataItem(e)}),D(this._seriesAxisRanges,e=>{this._prepareDataItem(e)})}_prepareChildren(){super._prepareChildren();let e=this.ghostLabel;if(e&&(this.get("fixAxisSize")?e.set("visible",!0):e.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){let i=this.chart;i&&i._updateCursor();let s=this.get("start",0),a=this.get("end",1),r=this.get("maxDeviation",.5)*Math.min(1,a-s);if(s<-r){let n=s+r;s=-r,this.setRaw("start",s),this.isDirty("end")&&this.setRaw("end",a-n)}if(a>1+r){let n=a-1-r;a=1+r,this.setRaw("end",a),this.isDirty("start")&&this.setRaw("start",s-n)}}let t=this.get("renderer");if(t._start=this.get("start"),t._end=this.get("end"),t._inversed=t.get("inversed",!1),t._axisLength=t.axisLength()/(t._end-t._start),t._updateLC(),this.isDirty("tooltip")){let i=this.get("tooltip");if(i){let s=t.get("themeTags");i.addTag("axis"),i.addTag(this.className.toLowerCase()),i._applyThemes(),s&&(i.set("themeTags",F(i.get("themeTags"),s)),i.label._applyThemes())}}}_updateTooltipBounds(){let e=this.get("tooltip");e&&this.get("renderer").updateTooltipBounds(e)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(e){this.chart=e;let t=this.get("renderer");t.chart=e,e.gridContainer.children.push(this.gridContainer),e.topGridContainer.children.push(this.topGridContainer),e.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{e._handleAxisSelection(this)}),this.on("end",()=>{e._handleAxisSelection(this)}),e.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),e.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),e.processAxis(this)}hideDataItem(e){return this._toggleFHDataItem(e,!0),super.hideDataItem(e)}showDataItem(e){return this._toggleFHDataItem(e,!1),super.showDataItem(e)}_toggleFHDataItem(e,t){let i="forceHidden",s=e.get("label");s&&s.set(i,t);let a=e.get("grid");a&&a.set(i,t);let r=e.get("tick");r&&r.set(i,t);let n=e.get("axisFill");n&&n.set(i,t);let o=e.get("bullet");if(o){let l=o.get("sprite");l&&l.set(i,t)}}_toggleDataItem(e,t){let i=e.get("label"),s="visible";i&&i.setPrivate(s,t);let a=e.get("grid");a&&a.setPrivate(s,t);let r=e.get("tick");r&&r.setPrivate(s,t);let n=e.get("axisFill");n&&n.setPrivate(s,t);let o=e.get("bullet");if(o){let l=o.get("sprite");l&&l.setPrivate(s,t)}}_createAssets(e,t,i){var s,a,r;let n=this.get("renderer"),o="minor",l=e.get("label");if(!l)n.makeLabel(e,t);else{let c=l.get("themeTags"),d=!1;i?c?.indexOf(o)==-1&&(d=!0):c?.indexOf(o)!=-1&&(d=!0),d&&((s=l.parent)===null||s===void 0||s.children.removeValue(l),n.makeLabel(e,t),l.dispose(),n.labels.removeValue(l))}let h=e.get("grid");if(!h)n.makeGrid(e,t);else{let c=h.get("themeTags"),d=!1;i?c?.indexOf(o)==-1&&(d=!0):c?.indexOf(o)!=-1&&(d=!0),d&&((a=h.parent)===null||a===void 0||a.children.removeValue(h),n.makeGrid(e,t),h.dispose(),n.grid.removeValue(h))}let u=e.get("tick");if(!u)n.makeTick(e,t);else{let c=!1,d=u.get("themeTags");i?d?.indexOf(o)==-1&&(c=!0):d?.indexOf(o)!=-1&&(c=!0),c&&((r=u.parent)===null||r===void 0||r.children.removeValue(u),n.makeTick(e,t),u.dispose(),n.ticks.removeValue(u))}(!i&&!e.get("axisFill")||i&&!e.get("axisFill")&&this.get("minorAxisFillsEnabled"))&&n.makeAxisFill(e,t),this._processBullet(e)}_processBullet(e){let t=e.get("bullet"),i=this.get("bullet");if(!t&&i&&!e.get("isRange")&&(t=i(this._root,this,e)),t){t.axis=this;let s=t.get("sprite");s&&(s._setDataItem(e),e.setRaw("bullet",t),s.parent||this.bulletsContainer.children.push(s))}}_afterChanged(){super._afterChanged();let e=this.chart;e&&(e._updateChartLayout(),e.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(e){super.disposeDataItem(e);let t=this.get("renderer"),i=e.get("label");i&&(t.labels.removeValue(i),i.dispose());let s=e.get("tick");s&&(t.ticks.removeValue(s),s.dispose());let a=e.get("grid");a&&(t.grid.removeValue(a),a.dispose());let r=e.get("axisFill");r&&(t.axisFills.removeValue(r),r.dispose());let n=e.get("bullet");n&&n.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());let e=this.ghostLabel;if(e){if(!e.isHidden()){let s=e.localBounds(),a=Math.ceil(s.right-s.left),r=e.get("text");D(this.dataItems,n=>{let o=n.get("label");if(o&&!o.isHidden()){let l=o.localBounds();Math.ceil(l.right-l.left)>a&&(r=o.text._getText())}}),e.set("text",r)}let t=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(e,t+(i-t)*.5)}}_handleCursorPosition(e,t){e=this.get("renderer").toAxisPosition(e),this._cursorPosition=e,this._snapToSeries=t,this.updateTooltip()}updateTooltip(){let e=this._snapToSeries,t=this._cursorPosition,i=this.get("tooltip"),s=this.get("renderer");v(t)&&(D(this.series,a=>{if(a.get("baseAxis")===this){let r=this.getSeriesItem(a,t,this.get("tooltipLocation"));e&&e.indexOf(a)!=-1?(a.updateLegendMarker(r),a.updateLegendValue(r),a._settings.tooltipDataItem=r):(a.showDataItemTooltip(r),a.setRaw("tooltipDataItem",r))}}),this.get("snapTooltip")&&(t=this.roundAxisPosition(t,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",t),i&&(s.updateTooltipBounds(i),ae(t)?i.hide(0):(this._updateTooltipText(i,t),s.positionTooltip(i,t),t<this.get("start",0)||t>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(e,t){e.label.set("text",this.getTooltipText(t))}roundAxisPosition(e,t){return e}_handleSeriesRemoved(){}handleCursorShow(){let e=this.get("tooltip");e&&e.show()}handleCursorHide(){let e=this.get("tooltip");e&&e.hide()}processSeriesDataItem(e,t){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(e){let t=this.get("renderer");return t.toAxisPosition(e/t.axisLength())}toAxisPosition(e){return this.get("renderer").toAxisPosition(e)}toGlobalPosition(e){return this.get("renderer").toGlobalPosition(e)}fixPosition(e){return this.get("renderer").fixPosition(e)}shouldGap(e,t,i,s){return!1}createAxisRange(e){return this.axisRanges.push(e)}_groupSeriesData(e){}getCellWidthPosition(){return .05}};Object.defineProperty(he,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Axis"});Object.defineProperty(he,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:yt.classNames.concat([he.className])});var se=class extends he{constructor(){super(...arguments),Object.defineProperty(this,"_dirtyExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dirtySelectionExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dseHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_deltaMinMax",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_minReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_maxReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_minRealLog",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_baseValue",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_syncDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_minLogAdjusted",{enumerable:!0,configurable:!0,writable:!0,value:1})}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var e;if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let s=this.get("syncWithAxis");s&&(this._syncDp=new Nt([s.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),s.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}let t=!1;if((this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(t=!0,(e=this.ghostLabel)===null||e===void 0||e.set("text","")),(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||t||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){let i=this.chart,s=!1;if(i){let a=this.get("renderer").getPrivate("letter");a=="Y"?i.xAxes.each(r=>{r.className!="ValueAxis"&&(s=!0)}):a=="X"&&i.yAxes.each(r=>{r.className!="ValueAxis"&&(s=!0)})}s&&this._getSelectionMinMax(),this._dirtySelectionExtremes=!1}this._groupData(),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("min")||this.isPrivateDirty("selectionMax")||this.isPrivateDirty("selectionMin")||this.isPrivateDirty("max")||this.isPrivateDirty("step")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("logarithmic"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,(this.getPrivate("selectionMinFinal")!=this.getPrivate("selectionMin")||this.getPrivate("selectionMaxFinal")!=this.getPrivate("selectionMax"))&&(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_formatText(e){let t=this.get("numberFormat"),i=this.getNumberFormatter(),s="";return t?s=i.format(e,t):s=i.format(e,void 0,this.getPrivate("stepDecimalPlaces")),s}_prepareAxisItems(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(v(e)&&v(t)){let i=this.get("logarithmic"),s=this.getPrivate("step"),a=this.getPrivate("selectionMin"),r=this.getPrivate("selectionMax")+s,n=a-s,o=1,l=e;if(i){if(n=this._minLogAdjusted,n<a)for(;n<a;)n+=s;if(l=n,l<=0){let _=this._minRealLog;v(_)||(_=1),l=Math.pow(10,Math.log(_)*Math.LOG10E),s<1&&(v(this._minRealLog)?l=this._minRealLog:l=Math.pow(10,-50))}o=Math.log(r-s)*Math.LOG10E-Math.log(l)*Math.LOG10E,o>2&&(n=Math.pow(10,Math.log(l)*Math.LOG10E-50))}let h=this.get("renderer"),u=h.get("minorLabelsEnabled"),c=h.get("minorGridEnabled",u),d=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E)),p=Math.round(s/d),f=2;R(p/5,10)%1==0&&(f=5),R(p/10,10)%1==0&&(f=10);let g=s/f,m=0,b=0,x=-1/0;for(;n<r;){let _;this.dataItems.length<m+1?(_=new K(this,void 0,{}),this._dataItems.push(_),this.processDataItem(_)):_=this.dataItems[m],this._createAssets(_,[]),this._toggleDataItem(_,!0),_.setRaw("value",n);let A=_.get("label");A&&A.set("text",this._formatText(n)),this._prepareDataItem(_);let y=n;if(i&&o>2?y=Math.pow(10,Math.log(l)*Math.LOG10E+m-50):y+=s,c){let w=n+g;for(i&&(o>2&&(g=this._adjustMinMax(n,y,10).step),w=n+g);w<y-s*1e-11;){let P;this.minorDataItems.length<b+1?(P=new K(this,void 0,{}),this.minorDataItems.push(P),this.processDataItem(P)):P=this.minorDataItems[b],this._createAssets(P,["minor"],!0),this._toggleDataItem(P,!0),P.setRaw("value",w);let k=P.get("label");k&&(u?k.set("text",this._formatText(w)):k.setPrivate("visible",!1)),this._prepareDataItem(P),w+=g,b++}}if(n=y,x==n)break;let M=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E));if(M<1&&!i){let w=Math.round(Math.abs(Math.log(Math.abs(M))*Math.LOG10E))+2;n=R(n,w)}m++,i&&o<=2&&n-s<s&&(n=s),x=n}for(let _=m;_<this.dataItems.length;_++)this._toggleDataItem(this.dataItems[_],!1);for(let _=b;_<this.minorDataItems.length;_++)this._toggleDataItem(this.minorDataItems[_],!1);D(this.series,_=>{_.inited&&_._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(e,t){let i=this.get("renderer"),s=e.get("value"),a=e.get("endValue"),r=this.valueToPosition(s),n=r,o=this.valueToPosition(s+this.getPrivate("step"));v(a)&&(n=this.valueToPosition(a),o=n),e.get("isRange")&&a==null&&(o=r);let l=n,h=e.get("labelEndValue");h!=null&&(l=this.valueToPosition(h)),i.updateLabel(e.get("label"),r,l,t);let u=e.get("grid");if(i.updateGrid(u,r,n),u&&(s==this.get("baseValue",0)?(u.addTag("base"),u._applyThemes()):u.hasTag("base")&&(u.removeTag("base"),u._applyThemes())),i.updateTick(e.get("tick"),r,l,t),i.updateFill(e.get("axisFill"),r,o),this._processBullet(e),i.updateBullet(e.get("bullet"),r,n),!e.get("isRange")){let c=this.get("fillRule");c&&c(e)}}_handleRangeChange(){let e=this.positionToValue(this.get("start",0)),t=this.positionToValue(this.get("end",1)),i=this.get("renderer").gridCount(),s=this._adjustMinMax(e,t,i,!0),a=Et(s.step);this.setPrivateRaw("stepDecimalPlaces",a),e=R(e,a),t=R(t,a),s=this._adjustMinMax(e,t,i,!0);let r=s.step;e=s.min,t=s.max,(this.getPrivate("selectionMin")!==e||this.getPrivate("selectionMax")!==t||this.getPrivate("step")!==r)&&(this.setPrivateRaw("selectionMin",e),this.setPrivateRaw("selectionMax",t),this.setPrivateRaw("step",r))}positionToValue(e){let t=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(e*(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)+Math.log(t)*Math.LOG10E)/Math.LOG10E):e*(i-t)+t}valueToPosition(e){let t=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(e<=0){let s=this.get("treatZeroAs");v(s)&&(e=s)}return(Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)}else return(e-t)/(i-t)}valueToFinalPosition(e){let t=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(e<=0){let s=this.get("treatZeroAs");v(s)&&(e=s)}return(Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)}else return(e-t)/(i-t)}getX(e,t,i){e=i+(e-i)*t;let s=this.valueToPosition(e);return this._settings.renderer.positionToCoordinate(s)}getY(e,t,i){e=i+(e-i)*t;let s=this.valueToPosition(e);return this._settings.renderer.positionToCoordinate(s)}getDataItemCoordinateX(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,s))}getDataItemPositionX(e,t,i,s){let a=e.get(t);if(e.get("stackToItemX")){let n=e.component;a=a*s+n.getStackedXValueWorking(e,t)}else a=this._baseValue+(a-this._baseValue)*s;return this.valueToPosition(a)}getDataItemCoordinateY(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,s))}getDataItemPositionY(e,t,i,s){let a=e.get(t);if(e.get("stackToItemY")){let n=e.component;a=a*s+n.getStackedYValueWorking(e,t)}else a=this._baseValue+(a-this._baseValue)*s;return this.valueToPosition(a)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){let e=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),t=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0)),i=this.get("baseValue",0);return i<e&&(i=e),i>t&&(i=t),i}cellEndValue(e){return e}fixSmallStep(e){return 1+e===1?(e*=2,this.fixSmallStep(e)):e}_fixMin(e){return e}_fixMax(e){return e}_calculateTotals(){if(this.get("calculateTotals")){let e=this.series[0];if(e){let t=e.startIndex();if(e.dataItems.length>0){t>0&&t--;let i=e.endIndex();i<e.dataItems.length&&i++;let s,a;e.get("yAxis")==this?(s="valueY",a="vcy"):e.get("xAxis")==this&&(s="valueX",a="vcx");let r=s+"Working";if(s)for(let n=t;n<i;n++){let o=0,l=0;D(this.series,h=>{if(!h.get("excludeFromTotal")){let u=h.dataItems[n];if(u){let c=u.get(r)*h.get(a);ae(c)||(o+=c,l+=Math.abs(c))}}}),D(this.series,h=>{if(!h.get("excludeFromTotal")){let u=h.dataItems[n];if(u){let c=u.get(r)*h.get(a);if(!ae(c)){u.set(s+"Total",l),u.set(s+"Sum",o);let d=c/l*100;l==0&&(d=0),u.set(s+"TotalPercent",d)}}}})}}}}}_getSelectionMinMax(){let e=this.getPrivate("minFinal"),t=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max"),a=this.get("extraMin",0),r=this.get("extraMax",0);this.get("logarithmic")&&(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(r=.2));let n=this.get("renderer").gridCount(),o=this.get("strictMinMaxSelection"),l=this.get("strictMinMax");if(v(e)&&v(t)){let h=t,u=e;if(D(this.series,_=>{if(!_.get("ignoreMinMax")){let A,y,M=_.getPrivate("outOfSelection");if(_.get("xAxis")===this){if(!M){let w=_.getPrivate("minX"),P=_.getPrivate("maxX");(_.startIndex()!=0||_.endIndex()!=_.dataItems.length)&&(w=void 0,P=void 0),A=_.getPrivate("selectionMinX",w),y=_.getPrivate("selectionMaxX",P)}}else if(_.get("yAxis")===this&&!M){let w=_.getPrivate("minY"),P=_.getPrivate("maxY");(_.startIndex()!=0||_.endIndex()!=_.dataItems.length)&&(w=void 0,P=void 0),A=_.getPrivate("selectionMinY",w),y=_.getPrivate("selectionMaxY",P)}!_.isHidden()&&!_.isShowing()&&(v(A)&&(h=Math.min(h,A)),v(y)&&(u=Math.max(u,y)))}}),this.axisRanges.each(_=>{if(_.get("affectsMinMax")){let A=_.get("value");A!=null&&(h=Math.min(h,A),u=Math.max(u,A)),A=_.get("endValue"),A!=null&&(h=Math.min(h,A),u=Math.max(u,A))}}),h>u&&([h,u]=[u,h]),v(i)?l?h=i:h=e:l&&v(this._minReal)&&(h=this._minReal),v(s)?l?u=s:u=t:l&&v(this._maxReal)&&(u=this._maxReal),h===u){let _=h;if(h-=this._deltaMinMax,u+=this._deltaMinMax,h<e){let y=_-e;y==0&&(y=this._deltaMinMax),h=_-y,u=_+y,l=!0}let A=this._adjustMinMax(h,u,n,l);h=A.min,u=A.max}let c=h,d=u,p=u-h;h-=p*a,u+=p*r;let f=this._adjustMinMax(h,u,n);h=f.min,u=f.max,h=re(h,e,t),u=re(u,e,t),f=this._adjustMinMax(h,u,n,!0),l||(h=f.min,u=f.max);let g=this.get("syncWithAxis");if(g&&(f=this._syncAxes(h,u,f.step,g.getPrivate("selectionMinFinal",g.getPrivate("minFinal",0)),g.getPrivate("selectionMaxFinal",g.getPrivate("maxFinal",1)),g.getPrivate("selectionStepFinal",g.getPrivate("step",1))),f.min<e&&(f.min=e),f.max>t&&(f.max=t),h=f.min,u=f.max),l&&(v(i)&&(h=Math.max(h,i)),v(s)&&(u=Math.min(u,s))),o&&(h=c-(d-c)*a,u=d+(d-c)*r),l){v(i)?h=i:h=c,v(s)?u=s:u=d,u-h<=1e-8&&(h-=this._deltaMinMax,u+=this._deltaMinMax);let _=u-h;h-=_*a,u+=_*r}this.get("logarithmic")&&(h<=0&&(h=c*(1-Math.min(a,.99))),h<e&&(h=e),u>t&&(u=t));let m=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),b=R(this.valueToFinalPosition(h),m),x=R(this.valueToFinalPosition(u),m);this.setPrivateRaw("selectionMinFinal",h),this.setPrivateRaw("selectionMaxFinal",u),this.setPrivateRaw("selectionStepFinal",f.step),this.zoom(b,x)}}_getMinMax(){let e=this.get("min"),t=this.get("max"),i=1/0,s=-1/0,a=this.get("extraMin",0),r=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(r=.2)));let n=1/0;if(D(this.series,x=>{if(!x.get("ignoreMinMax")){let _,A;if(x.get("xAxis")===this?(_=x.getPrivate("minX"),A=x.getPrivate("maxX")):x.get("yAxis")===this&&(_=x.getPrivate("minY"),A=x.getPrivate("maxY")),v(_)&&v(A)){i=Math.min(i,_),s=Math.max(s,A);let y=A-_;y<=0&&(y=Math.abs(A/100)),y<n&&(n=y)}}}),this.axisRanges.each(x=>{if(x.get("affectsMinMax")){let _=x.get("value");_!=null&&(i=Math.min(i,_),s=Math.max(s,_)),_=x.get("endValue"),_!=null&&(i=Math.min(i,_),s=Math.max(s,_))}}),this.get("logarithmic")){let x=this.get("treatZeroAs");v(x)&&i<=0&&(i=x),i<=0&&new Error("Logarithmic value axis can not have values <= 0.")}if(i===0&&s===0&&(s=.9,i=-.9),v(e)&&(i=e),v(t)&&(s=t),i===1/0||s===-1/0){this.setPrivate("minFinal",void 0),this.setPrivate("maxFinal",void 0);return}i>s&&([i,s]=[s,i]);let o=i,l=s,h=this.adapters.fold("min",i),u=this.adapters.fold("max",s);this._minRealLog=i,v(h)&&(i=h),v(u)&&(s=u),i=this._fixMin(i),s=this._fixMax(s),s-i<=1/Math.pow(10,15)&&(s-i!==0?this._deltaMinMax=(s-i)/2:this._getDelta(s),i-=this._deltaMinMax,s+=this._deltaMinMax),i-=(s-i)*a,s+=(s-i)*r,this.get("logarithmic")&&(i<0&&o>=0&&(i=0),s>0&&l<=0&&(s=0)),this._minReal=i,this._maxReal=s;let c=this.get("strictMinMax"),d=this.get("strictMinMaxSelection",!1);d&&(c=d);let p=c;v(t)&&(p=!0);let f=this.get("renderer").gridCount(),g=this._adjustMinMax(i,s,f,p);if(i=g.min,s=g.max,g=this._adjustMinMax(i,s,f,!0),i=g.min,s=g.max,c){v(e)?i=e:i=this._minReal,v(t)?s=t:s=this._maxReal,s-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax);let x=s-i;i-=x*a,s+=x*r}h=this.adapters.fold("min",i),u=this.adapters.fold("max",s),v(h)&&(i=h),v(u)&&(s=u),n==1/0&&(n=s-i);let m=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=R(i,m),s=R(s,m);let b=this.get("syncWithAxis");if(b&&(g=this._syncAxes(i,s,g.step,b.getPrivate("minFinal",b.getPrivate("min",0)),b.getPrivate("maxFinal",b.getPrivate("max",1)),b.getPrivate("step",1)),i=g.min,s=g.max),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((s-i)/n*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,s=this._maxReal,i<=0&&(i=o*(1-Math.min(a,.99)))),v(i)&&v(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);let x=this.get("interpolationDuration",0),_=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:x,easing:_}),this.animatePrivate({key:"max",to:s,duration:x,easing:_})}}_fixZoomFactor(){}_getDelta(e){let t=Math.log(Math.abs(e))*Math.LOG10E,i=Math.pow(10,Math.floor(t));i=i/10,this._deltaMinMax=i}_saveMinMax(e,t){}_adjustMinMax(e,t,i,s){i<=1&&(i=1),i=Math.round(i);let a=e,r=t,n=t-e;n===0&&(n=Math.abs(t));let o=Math.log(Math.abs(n))*Math.LOG10E,l=Math.pow(10,Math.floor(o));l=l/10;let h=l;s&&(h=0),s?(e=Math.floor(e/l)*l,t=Math.ceil(t/l)*l):(e=Math.ceil(e/l)*l-h,t=Math.floor(t/l)*l+h),e<0&&a>=0&&(e=0),t>0&&r<=0&&(t=0),o=Math.log(Math.abs(n))*Math.LOG10E,l=Math.pow(10,Math.floor(o)),l=l/100;let u=Math.ceil(n/i/l)*l,c=Math.pow(10,Math.floor(Math.log(Math.abs(u))*Math.LOG10E)),d=Math.ceil(u/c);d>5?d=10:d<=5&&d>2&&(d=5),u=Math.ceil(u/(c*d))*c*d;let p=this.get("maxPrecision");if(v(p)){let b=Bt(u,p);p<Number.MAX_VALUE&&u!==b&&(u=b,u==0&&(u=1))}let f=0;c<1&&(f=Math.round(Math.abs(Math.log(Math.abs(c))*Math.LOG10E))+1,u=R(u,f));let g=Math.floor(e/u);e=R(u*g,f);let m;return s?m=Math.floor(t/u):m=Math.ceil(t/u),m===g&&m++,t=R(u*m,f),t<r&&(t=t+u),e>a&&(e=e-u),u=this.fixSmallStep(u),{min:e,max:t,step:u}}getTooltipText(e,t){let i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),a=this.get("extraTooltipPrecision",0),r=this.getPrivate("stepDecimalPlaces",0)+a,n=R(this.positionToValue(e),r);return i?s.format(n,i):s.format(n,void 0,r)}getSeriesItem(e,t){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.positionToValue(t),a,r;if(D(e.dataItems,(n,o)=>{let l=Math.abs(n.get(i)-s);(a===void 0||l<r)&&(a=o,r=l)}),a!=null)return e.dataItems[a]}zoomToValues(e,t,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",1));this.getPrivate("min")!=null&&this.getPrivate("max")!=null&&this.zoom((e-s)/(a-s),(t-s)/(a-s),i)}_syncAxes(e,t,i,s,a,r){if(this.get("syncWithAxis")){let o=Math.round(a-s)/r,l=Math.round((t-e)/i),h=this.get("renderer").gridCount();if(v(o)&&v(l)){let u=!1,c=0,d=(t-e)*.01,p=e,f=t,g=i;for(;u!=!0;)if(u=this._checkSync(p,f,g,o),c++,c>500&&(u=!0),u)e=p,t=f,i=g;else{c/3==Math.round(c/3)?(p=e-d*c,e>=0&&p<0&&(p=0)):(f=t+d*c,f<=0&&f>0&&(f=0));let m=this._adjustMinMax(p,f,h,!0);p=m.min,f=m.max,g=m.step}}}return{min:e,max:t,step:i}}_checkSync(e,t,i,s){let a=(t-e)/i;for(let r=1;r<s;r++)if(R(a/r,1)==s||a*r==s)return!0;return!1}getCellWidthPosition(){let e=this.getPrivate("selectionMax",this.getPrivate("max")),t=this.getPrivate("selectionMin",this.getPrivate("min"));return v(e)&&v(t)?this.getPrivate("step",1)/(e-t):.05}nextPosition(e){e==null&&(e=1),this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let t=this.positionToValue(this.getPrivate("tooltipPosition",0));return t+=this.getPrivate("step",1)*e,t=re(t,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(t))}};Object.defineProperty(se,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ValueAxis"});Object.defineProperty(se,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:he.classNames.concat([se.className])});var ve=class T extends he{constructor(){super(...arguments),Object.defineProperty(this,"_frequency",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_itemMap",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),this.fields.push("category","id","cellSize"),this.setPrivateRaw("name","category"),this.addTag("category"),super._afterNew()}_afterDataChange(){super._afterDataChange();let e=this.dataItems.length;e>0&&this.setPrivateRaw("maxZoomFactor",e),this.setPrivateRaw("startIndex",Math.min(this.getPrivate("startIndex",0),e)),this.setPrivateRaw("endIndex",Math.min(this.getPrivate("endIndex",e),1))}_prepareChildren(){super._prepareChildren();let e=this.dataItems.length,t=0;this._valuesDirty&&(this._itemMap={},D(this.dataItems,r=>{r.setRaw("index",t),this._itemMap[r.get("category")]=r,t++}),this.setPrivateRaw("maxZoomFactor",e));let i=this.get("start",0),s=this.get("end",1),a=this._getIndices(i,s);this.setPrivateRaw("startIndex",a.startIndex),this.setPrivateRaw("endIndex",a.endIndex),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("endIndex")||this.isPrivateDirty("startIndex")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&this.dataItems.length>0&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges())}adjustZoom(){let e=this.dataItems.length;if(e>1){let t=this.get("maxZoomCount",this.dataItems.length),i=this.get("minZoomCount",1),s=0,a=this.getPrivate("startIndex",0),r=this.getPrivate("endIndex",0),n=this._sAnimation,o=this._eAnimation,l=this.get("start",0),h=!1;n&&!n.stopped&&(l=Number(n.to),h=!0);let u=this.get("end",1);if(o&&!o.stopped&&(u=Number(o.to),h=!0),h){let c=this._getIndices(l,u);a=c.startIndex,r=c.endIndex}for(let c=a;c<r;c++){let d=this.dataItems[c];s+=d.get("finalCellSize",1)}if(s<=i){let c=0;for(let d=a;d<e;d++){let p=this.dataItems[d];if(c+=p.get("finalCellSize",1),r=d+1,c>=i)break}if(c<i)for(let d=a-1;d>=0;d--){let p=this.dataItems[d];if(c+=p.get("finalCellSize",1),a=d,c>=i)break}this.zoomToIndexes(a,r)}else if(s>=t){let c=s;for(let d=r-1;d>=a;d--){let p=this.dataItems[d];if(c-=p.get("finalCellSize",1),c<=t){r=d+1;break}}this.zoomToIndexes(a,r)}}}_handleRangeChange(){D(this.series,e=>{let t=this.dataItems[this.startIndex()].get("category"),i=this.dataItems[this.endIndex()-1].get("category"),s=e.get("baseAxis"),a=e.get("xAxis"),r=e.get("yAxis");if(a instanceof T&&r instanceof T)e._markDirtyAxes();else if(s===this){let n,o,l=r;if(a===s?(e.get("categoryXField")&&(n="categoryX"),e.get("openCategoryXField")&&(o="openCategoryX")):r===s&&(e.get("categoryYField")&&(n="categoryY"),e.get("openCategoryYField")&&(o="openCategoryY"),l=a),l instanceof se&&(n||o)){let c=function(g,m,b,x,_,A){let y,M=m.categoryToIndex(_);for(;!y&&M>=0&&M<m.dataItems.length;){let w=m.dataItems[M].get("category");if(A=="previous")for(let P=g.dataItems.length-1;P>=0;P--){let k=g.dataItems[P];if(b&&k.get(b)===w){y=k;break}if(x&&k.get(x)===w){y=k;break}}else for(let P=0,k=g.dataItems.length;P<k;P++){let I=g.dataItems[P];if(b&&I.get(b)===w){y=I;break}if(x&&I.get(x)===w){y=I;break}}y||(M+=A==="previous"?-1:1)}return y},h,u;h=c(e,this,n,o,t,"next"),u=c(e,this,n,o,i,"previous");let d=0,p=e.dataItems.length;h&&(d=e.dataItems.indexOf(h)),u&&(p=e.dataItems.indexOf(u)+1),e.setPrivate("startIndex",d),e.setPrivate("endIndex",p);let f=!1;for(let g=d;g<p;g++){let m=e.dataItems[g];if(D(e.__valueXShowFields,b=>{m.get(b)!=null&&(f=!0)}),D(e.__valueYShowFields,b=>{m.get(b)!=null&&(f=!0)}),f)break}e.setPrivate("outOfSelection",!f)}e._markDirtyAxes()}})}_prepareAxisItems(){var e;let t=this.get("renderer"),i=this.dataItems.length,s=this.startIndex();s>0&&s--;let a=this.endIndex();a<i&&a++;let r=t.get("minorLabelsEnabled"),n=t.get("minorGridEnabled",r),o=t.axisLength()/Math.max(t.get("minGridDistance"),1),l=Math.max(1,Math.min(i,Math.ceil((a-s)/o)));s=Math.floor(s/l)*l,this._frequency=l;for(let u=0;u<i;u++)this._toggleDataItem(this.dataItems[u],!1);let h=this.dataItems[s].get("index",0);for(let u=s;u<a;u=u+l){let c=this.dataItems[u];this._createAssets(c,[]),this._toggleDataItem(c,!0);let d=l;n&&(d=1),this._prepareDataItem(c,h,d),h++}if(t.get("minorGridEnabled"))for(let u=s;u<a;u++){let c=this.dataItems[u];u%l!=0&&(this._createAssets(c,["minor"],!0),this._toggleDataItem(c,!0),this._prepareDataItem(c,0,1),r||(e=c.get("label"))===null||e===void 0||e.setPrivate("visible",!1))}this._updateGhost()}_prepareDataItem(e,t,i){let s=this.get("renderer"),a=e.get("categoryLocation",0),r=e.get("endCategoryLocation",1),n=e.get("index");v(n)||(n=this.categoryToIndex(e.get("category")));let o=this.indexToPosition(n,a),l=e.get("endCategory"),h;l?(h=this.categoryToIndex(l),v(h)||(h=n)):h=n;let u=this.indexToPosition(h,r),c,d;if(e.get("isRange")){if(c=h,!v(n)){this._toggleDataItem(e,!1);return}}else c=n+this._frequency-1;d=this.indexToPosition(c,r),s.updateLabel(e.get("label"),o,u,i),s.updateGrid(e.get("grid"),o,u),s.updateTick(e.get("tick"),o,u,i),s.updateFill(e.get("axisFill"),o,d),this._processBullet(e),s.updateBullet(e.get("bullet"),o,u);let p=this.get("fillRule");p&&p(e,t)}startIndex(){let e=this.dataItems.length;return Math.min(Math.max(this.getPrivate("startIndex",0),0),e-1)}endIndex(){let e=this.dataItems.length;return Math.max(1,Math.min(this.getPrivate("endIndex",e),e))}baseValue(){}basePosition(){return 0}getX(e){let t=this._itemMap[e];return t?this._settings.renderer.positionToCoordinate(this.indexToPosition(t.get("index",0))):NaN}getY(e){let t=this._itemMap[e];return t?this._settings.renderer.positionToCoordinate(this.indexToPosition(t.get("index",0))):NaN}getDataItemPositionX(e,t,i,s){let a=e.get(t),r=this._itemMap[a];return r?this.indexToPosition(r.get("index",0),i):NaN}getDataItemCoordinateX(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,s))}getDataItemPositionY(e,t,i,s){let a=e.get(t),r=this._itemMap[a];return r?this.indexToPosition(r.get("index",0),i):NaN}getDataItemCoordinateY(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,s))}indexToPosition(e,t,i){let s=this.dataItems.length,a=0;if(s==0||(e>=s&&(e=s-1,t=1),v(t)||(t=.5),!v(e)))return 0;let r=this.get("startLocation",0),n=this.get("endLocation",1);if(!this.get("cellSizeField"))s-=r,s-=1-n,a=(e+t-r)/s;else{let o=i?"finalCellSize":"cellSize",l=this.dataItems,h=0;D(this.dataItems,d=>{h+=d.get(o,1)}),h-=r*l[0].get(o,1),h-=(1-n)*l[l.length-1].get(o,1);let u=0;for(let d=0;d<e;d++)u+=l[d].get(o,1);let c=l[e].get(o,1);a=(u+t*c-r*l[0].get(o,1))/h}if(!i){let o=this.dataItems[e];o&&(a+=o.get("deltaPosition",0))}return a}categoryToPosition(e){let t=this._itemMap[e];return t?this.indexToPosition(t.get("index")):NaN}categoryToIndex(e){let t=this._itemMap[e];return t?t.get("index"):NaN}dataItemToPosition(e){return this.indexToPosition(e.get("index"))}roundAxisPosition(e,t){return e+=(.5-t)/this.dataItems.length,this.indexToPosition(this.axisPositionToIndex(e),t)}axisPositionToIndex(e){let t=this.dataItems.length;if(t===0)return 0;if(this.get("cellSizeField")){let i=0,s=[];D(this.dataItems,l=>{let h=l.get("cellSize",1);s.push(h),i+=h});let a=this.get("startLocation",0),r=this.get("endLocation",1);i-=a,i-=1-r;let n=e*i+a,o=0;for(let l=0;l<t;l++){let h=s[l];if(n<o+h)return l;o+=h}return t-1}else return re(Math.floor(e*t),0,t-1)}getTooltipText(e,t){let i=this.dataItems[this.axisPositionToIndex(e)];if(i){let s=i.get("label");if(s)return Ht(s,this.get("tooltipText",""))}}_updateTooltipText(e,t){e._setDataItem(this.dataItems[this.axisPositionToIndex(t)]),e.label.text.markDirtyText()}getSeriesItem(e,t){if(this.dataItems.length>0){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.axisPositionToIndex(t),a=e.dataItems[s],r=this.dataItems[s],n=r.get("category");if(a&&r&&a.get(i)===n)return a;for(let o=0,l=e.dataItems.length;o<l;o++){let h=e.dataItems[o];if(h.get(i)===n)return h}}}_getIndices(e,t){let i=this.dataItems.length,s=0,a=i,r="cellSize";if(this.get("cellSizeField")){let n=0,o=this.dataItems;if(o.length==0)return{startIndex:0,endIndex:0};D(o,h=>{n+=h.get(r,1)}),n-=this.get("startLocation",0)*o[0].get(r,1),n-=(1-this.get("endLocation",1))*o[o.length-1].get(r,1);let l=0;for(let h=0;h<i;h++)if(l+=this.dataItems[h].get(r,1),Math.round(l)>Math.round(e*n)){s=h;break}for(let h=s+1;h<i;h++)if(l+=this.dataItems[h].get(r,1),Math.round(l)>=Math.round(t*n)){a=h+1;break}s=Math.max(s,0),a=Math.min(a,i)}else s=Math.max(Math.round(this.get("start",0)*i),0),a=Math.min(Math.round(this.get("end",1)*i),i);return{startIndex:s,endIndex:a}}zoomToIndexes(e,t,i){let s=this.dataItems.length;this.get("cellSizeField")?(e=Math.min(Math.max(e,0),s),t=Math.max(Math.min(t,s),1),this.setPrivateRaw("startIndex",e),this.setPrivateRaw("endIndex",t),this.zoom(this.indexToPosition(e,0,!0),this.indexToPosition(t,0,!0),i)):this.zoom(e/s,t/s,i)}zoomToCategories(e,t,i){this.zoomToIndexes(this.categoryToIndex(e),this.categoryToIndex(t)+1,i)}getCellWidthPosition(){return this._frequency/this.dataItems.length/(this.get("end",1)-this.get("start",0))}nextPosition(e){e==null&&(e=1),this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let t=this.getPrivate("tooltipPosition",0),i=re(this.axisPositionToIndex(t)+e,0,this.dataItems.length-1);return this.toGlobalPosition(this.indexToPosition(i))}};Object.defineProperty(ve,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CategoryAxis"});Object.defineProperty(ve,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:he.classNames.concat([ve.className])});var ze=class extends ve{constructor(){super(...arguments),Object.defineProperty(this,"_frequency",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_itemMap",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),this.fields.push("category"),super._afterNew()}_prepareAxisItems(){this.setPrivateRaw("baseInterval",this.get("baseInterval"));let e=this.get("renderer"),t=this.dataItems.length,i=this.startIndex();i>0&&i--;let s=this.endIndex();s<t&&s++;let a=e.axisLength()/Math.max(e.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),r=Math.min(t,Math.ceil((s-i)/a));i=Math.floor(i/r)*r,this._frequency=r;for(let _=0;_<t;_++)this._toggleDataItem(this.dataItems[_],!1);let n=Number(this.dataItems[i].get("category")),o=Number(this.dataItems[s-1].get("category")),l=o-n;s-i<a&&(l=o-n-((o-n)/this.baseDuration()-(s-i))*this.baseDuration());let h=Xe(0,l,a,this.get("gridIntervals")),u=Ve(h.timeUnit),c=this.getPrivate("baseInterval");Z(h)<this.baseDuration()&&(h=Object.assign({},c));let d=this.get("dateFormats"),p=-1/0,f=-1/0,g=-1/0,m,b=[],x=!1;for(let _=i;_<s;_++){let A=this.dataItems[_],y=A.get("index"),M=!1,w=Number(A.get("category")),P=new Date(w),k=Jt(P,h.timeUnit);m=d[h.timeUnit];let I=!1;h.timeUnit!="year"&&h.timeUnit!="week"&&u&&this.get("markUnitChange")&&v(p)&&Ge(w,p,u,this._root.utc)&&(m=this.get("periodChangeDateFormats")[h.timeUnit],y-r*.5<f&&b.pop(),b.push({format:m,dataItem:A}),x=!0,I=!0,f=y,g=k);let S=!1;h.timeUnit==="day"||h.timeUnit==="week"?y-f>=r&&(S=!0):k%h.count===0&&k!=g&&(S=!0),!I&&S&&(y-r*.7<f&&x&&(M=!0),M||(b.push({format:m,dataItem:A}),f=y,g=k),x=!1),p=w}if(b.length>0){let _=b[0].dataItem.get("index",0);D(b,A=>{let y=A.dataItem,M=A.format;this._createAssets(y,[]),this._toggleDataItem(y,!0);let w=Number(y.get("category")),P=new Date(w),k=y.get("label");k&&k.set("text",this._root.dateFormatter.format(P,M)),_++,this._prepareDataItem(y,_,r)})}}baseDuration(){return Z(this.getPrivate("baseInterval"))}getTooltipText(e,t){let i=this.dataItems[this.axisPositionToIndex(e)];if(i){let s=this.get("dateFormats")[this.getPrivate("baseInterval").timeUnit];return this._root.dateFormatter.format(new Date(i.get("category",0)),this.get("tooltipDateFormat",s))}}_updateTooltipText(e,t){e.label.set("text",this.getTooltipText(t))}};Object.defineProperty(ze,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CategoryDateAxis"});Object.defineProperty(ze,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ve.classNames.concat([ze.className])});var ye=class extends se{constructor(){super(...arguments),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_seriesDataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_groupingCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_intervalDuration",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_baseDuration",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_intervalMax",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_intervalMin",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(e){this.setPrivateRaw("baseInterval",e),this._baseDuration=Z(e)}_fixZoomFactor(){let e=this.get("maxZoomFactor");e!=null&&e!=1/0?this.setPrivateRaw("maxZoomFactor",e):this.setPrivateRaw("maxZoomFactor",Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))/this.baseMainDuration()))}_groupData(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(v(e)&&v(t)){this._fixZoomFactor();let i=this.getPrivate("groupInterval");if(i?this._setBaseInterval(i):this._setBaseInterval(this.get("baseInterval")),this.isDirty("groupInterval")){let s=this.get("groupInterval");s&&(this.setRaw("groupIntervals",[s]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))D(this.series,s=>{this._groupSeriesData(s)}),this._handleRangeChange();else{let s=this.get("baseInterval"),a=s.timeUnit+s.count;D(this.series,r=>{r.setDataSet(a),r.resetGrouping()}),this._setBaseInterval(s),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(e){if(this.get("groupData")&&!e.get("groupDataDisabled")){this._dataGrouped=!0,this._seriesDataGrouped=!0;let t=[],i=this.baseMainDuration(),s=this.get("groupIntervals");D(s,d=>{Z(d)>i&&t.push(d)}),e._dataSets={};let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r,n=e.get("baseAxis");e.get("xAxis")===n?r=e._valueYFields:e.get("yAxis")===n&&(r=e._valueXFields);let o=e._mainDataItems,l=this.get("baseInterval"),h=l.timeUnit+l.count;e._dataSets[h]=o;let u=e.get("groupDataCallback"),c=e.get("groupDataWithOriginals",!1);u&&(c=!0),D(t,d=>{let p=-1/0,f=d.timeUnit+d.count;e._dataSets[f]=[];let g,m={},b={},x={},_={};D(r,P=>{m[P]=0,b[P]=0,x[P]=e.get(P+"Grouped"),_[P]=P+"Working"});let A=ee(d.timeUnit),y=o[0],M;y&&(M=o[0].get(a));let w;D(o,P=>{let k=P.get(a),I=Y(k,d.timeUnit,d.count,this._root,M),S;p<I-A/24?(S=Ie(P.dataContext),g=new K(e,S,e._makeDataItem(S)),g.setRaw(a,I),e._dataSets[f].push(g),D(r,C=>{let L=P.get(C);v(L)?(g.setRaw(C,L),g.setRaw(_[C],L),b[C]=1,m[C]=L):(m[C]=0,b[C]=0)}),c&&g.set("originals",[P]),u&&w&&u(w,d),w=g):(D(r,C=>{let L=x[C],E=P.get(C);if(E!=null){let U=g.get(C);switch(L){case"close":g.setRaw(C,E);break;case"sum":g.setRaw(C,U+E);break;case"open":break;case"low":E<U&&g.setRaw(C,E);break;case"high":E>U&&g.setRaw(C,E);break;case"average":b[C]++,m[C]+=E;let X=m[C]/b[C];g.setRaw(C,X);break;case"extreme":Math.abs(E)>Math.abs(U)&&g.setRaw(C,E);break}g.setRaw(_[C],g.get(C));let te=Ie(P.dataContext);te[a]=I,g.dataContext=te}}),c&&g.get("originals").push(P)),p=I}),u&&w&&u(w,d)}),e._dataSetId&&e.setDataSet(e._dataSetId),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(e){let t=this.get("baseInterval"),i=Xe(0,e,this.get("groupCount",1/0),this.get("groupIntervals"));return Z(i)<Z(t)&&(i=Object.assign({},t)),i}getIntervalMax(e){return this._intervalMax[e.timeUnit+e.count]}getIntervalMin(e){return this._intervalMin[e.timeUnit+e.count]}_handleRangeChange(){super._handleRangeChange();let e=Math.round(this.getPrivate("selectionMin")),t=Math.round(this.getPrivate("selectionMax"));if(v(e)&&v(t)){if(this.get("endLocation")==0&&(t+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),s=this.getPrivate("groupInterval"),a=t-e+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this.baseDuration());if(s){let r=Z(s);a=Math.ceil(a/r)*r}if(i||(i=this.getGroupInterval(a)),i&&(!s||s.timeUnit!==i.timeUnit||s.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let r=i.timeUnit+i.count;D(this.series,n=>{n.get("baseAxis")===this&&n.setDataSet(r)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{let n="groupintervalchanged";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this})})})}}D(this.series,i=>{if(i.get("baseAxis")===this){let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r=Lt(i.dataItems,g=>fe(g.get(s),e)).index;r>0&&(r-=1),t+=this.baseDuration()*(1-this.get("endLocation",1));let o=me(i.dataItems,g=>fe(g.get(s),t)).index,l=o;l>1&&l--;let h=i.dataItems[r],u=i.dataItems[l],c,d;h&&(d=h.get(s)),u&&(c=u.get(s));let p=!1;c!=null&&d!=null&&(c<e||d>t)&&(p=!0),i.setPrivate("outOfSelection",p),i.setPrivate("startIndex",r);let f=i._adjustStartIndex(r);i.getPrivate("adjustedStartIndex")!==f&&(i.setPrivate("adjustedStartIndex",f),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",o)}})}}_adjustMinMax(e,t,i,s){return{min:e,max:t,step:(t-e)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(e,t){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let s=i.timeUnit+i.count;this._intervalMin[s]=e,this._intervalMax[s]=t}_getM(e){return e=="day"||e=="month"||e=="year"?1.05:1.01}_getMinorInterval(e){var t;let i,s=e.count,a=e.timeUnit;return s>1&&(s==10||s==15?s=5:s==12?s=2:s==6?s=1:s==30?s=10:s<10&&(s=1),i={timeUnit:a,count:s}),a=="week"&&(((t=this.getPrivate("baseInterval"))===null||t===void 0?void 0:t.timeUnit)!="week"?i={timeUnit:"day",count:1}:i={timeUnit:"week",count:1}),a=="year"&&s==1&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<4*366*24*60*60*1e3&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(v(e)&&v(t)){let i=this._root,s=Math.round(this.getPrivate("selectionMin")),a=Math.round(this.getPrivate("selectionMax")),r=this.get("renderer"),n=this.getPrivate("baseInterval"),o=s,l=0,h=this.get("gridIntervals"),u=Xe(0,a-s,r.gridCount(),h);Z(u)<this.baseDuration()&&(u=Object.assign({},n));let c=Z(u);this._intervalDuration=c;let d=Ve(u.timeUnit),p=i.utc,f=i.timezone;o=Y(s-c,u.timeUnit,u.count,i,e);let g=o-c,m,b=this.get("dateFormats");this.setPrivateRaw("gridInterval",u);let x=r.get("minorLabelsEnabled"),_=r.get("minorGridEnabled",x),A,y=0;_&&(A=this._getMinorInterval(u),y=Z(A));let M=0;for(;o<a+c;){let w;this.dataItems.length<l+1?(w=new K(this,void 0,{}),this._dataItems.push(w),this.processDataItem(w)):w=this.dataItems[l],this._createAssets(w,[]),this._toggleDataItem(w,!0),w.setRaw("value",o),w.setRaw("labelEndValue",void 0);let P=o+ee(u.timeUnit,u.count*this._getM(u.timeUnit));P=Y(P,u.timeUnit,1,i),w.setRaw("endValue",P);let k=new Date(o);m=b[u.timeUnit],d&&this.get("markUnitChange")&&v(g)&&u.timeUnit!="year"&&Ge(o,g,d,p,f)&&(m=this.get("periodChangeDateFormats")[u.timeUnit]);let I=w.get("label");I&&I.set("text",i.dateFormatter.format(k,m));let S=u.count;if(u.timeUnit=="week"?I?.set("location",this.get("weekLabelLocation",0)):I?.set("location",r.labels.template.get("location")),_){S=1;let C=u.timeUnit;C=="week"&&this.get("skipFirstMinor")&&(C="day");let L=o+ee(C,this._getM(C));L=Y(L,C,1,i),w.setRaw("labelEndValue",L)}if(this._prepareDataItem(w,S),g=o,o=P,A){let C=A.timeUnit,L=A.count,E=this._getM(C);this.get("skipFirstMinor")||(g-=y*E);let U=Y(g+y*E,C,L,i,g),te,X=this.get("minorDateFormats",this.get("dateFormats"));for(;U<o-.01*y;){let $;this.minorDataItems.length<M+1?($=new K(this,void 0,{}),this.minorDataItems.push($),this.processDataItem($)):$=this.minorDataItems[M],this._createAssets($,["minor"],!0),this._toggleDataItem($,!0),$.setRaw("value",U);let j=U+ee(C,L*E);j=Y(j,C,1,i),$.setRaw("endValue",j);let be=new Date(U);m=X[C];let ge=$.get("label");if(ge&&(x?ge.set("text",i.dateFormatter.format(be,m)):ge.setPrivate("visible",!1)),this._prepareDataItem($,1),U==te)break;if(!$.get("isRange")){let ie=this.get("fillRule");ie&&ie($)}te=U,U=j,M++}}if(o==g)break;l++}for(let w=l;w<this.dataItems.length;w++)this._toggleDataItem(this.dataItems[w],!1);for(let w=M;w<this.minorDataItems.length;w++)this._toggleDataItem(this.minorDataItems[w],!1);D(this.series,w=>{w.inited&&w._markDirtyAxes()})}this._updateGhost()}_updateFinals(e,t){this.setPrivateRaw("selectionMinFinal",this.positionToValue(e)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(t))}_getDelta(){this._deltaMinMax=this.baseDuration()/2}_fixMin(e){let t=this.getPrivate("baseInterval"),i=t.timeUnit,s=Y(e,i,t.count,this._root),a=s+ee(i,t.count*this._getM(i));return a=Y(a,i,1,this._root),s+(a-s)*this.get("startLocation",0)}_fixMax(e){let t=this.getPrivate("baseInterval"),i=t.timeUnit,s=Y(e,i,t.count,this._root),a=s+ee(i,t.count*this._getM(i));return a=Y(a,i,1,this._root),s+(a-s)*this.get("endLocation",1)}_updateDates(e,t){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return Z(this.get("baseInterval"))}processSeriesDataItem(e,t){let i=this.getPrivate("baseInterval");e.open||(e.open={}),e.close||(e.close={}),D(t,s=>{let a=e.get(s);if(v(a)){let r=e.open[s],n=e.close[s];if(!(a>=r&&a<=n)){let o=i.timeUnit,l=i.count;r=Y(a,o,l,this._root),n=r+ee(o,l*this._getM(o)),n=Y(n,o,1,this._root),e.open[s]=r,e.close[s]=n}this._updateDates(r,e.component)}})}_handleSizeDirty(){}getDataItemPositionX(e,t,i,s,a){let r,n,o;return a?o=e.get(t):(e.open&&e.close?(r=e.open[t],n=e.close[t]):(r=e.get(t),n=r),o=r+(n-r)*i,o=this._baseValue+(o-this._baseValue)*s),this.valueToPosition(o)}getDataItemCoordinateX(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,s))}getDataItemPositionY(e,t,i,s,a){let r,n,o;return a?o=e.get(t):(e.open&&e.close?(r=e.open[t],n=e.close[t]):(r=e.get(t),n=r),o=r+(n-r)*i,o=this._baseValue+(o-this._baseValue)*s),this.valueToPosition(o)}getDataItemCoordinateY(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,s))}roundAxisPosition(e,t){let i=this.positionToValue(e);i=i-(t-.5)*this.baseDuration();let s=this.getPrivate("baseInterval");if(!ae(i)){let a=this._root.locale.firstDayOfWeek,r=s.timeUnit,n=this._root.utc,o=this._root.timezone,l=s.count;i=Y(i,r,l,this._root,this.getPrivate("min",0));let h=ct(s,new Date(i),a,n,o);return o&&(i=Y(i+this.baseDuration()*.05,r,l,this._root,this.getPrivate("min",0)),h=ct(s,new Date(i+h*t),a,n,o)),this.valueToPosition(i+h*t)}return NaN}getTooltipText(e,t){if(this.getPrivate("min")!=null){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],s=this.positionToValue(e);if(v(s)){let a=new Date(s),r=this.getPrivate("baseInterval"),n=ct(r,a,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return t!==!1&&(a=new Date(s+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*n)),this._root.dateFormatter.format(a,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(e,t,i,s){let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r=this.positionToValue(t);i==null&&(i=.5),r=r-(i-.5)*this.baseDuration();let n=me(e.dataItems,o=>{let l=0;return o.open&&(l=o.open[a]),fe(l,r)});if(s||e.get("snapTooltip")){let o=e.dataItems[n.index-1],l=e.dataItems[n.index];if(o&&l&&o.open&&l.close){let h=o.open[a],u=l.close[a];if(Math.abs(r-h)>Math.abs(r-u))return l}if(o)return o;if(l)return l}else{let o=e.dataItems[n.index-1];if(o&&o.open&&o.close){let l=o.open[a],h=o.close[a];if(r>=l&&r<=h)return o}}}shouldGap(e,t,i,s){let a=e.get(s);return t.get(s)-a>this.baseDuration()*i}zoomToDates(e,t,i){this.zoomToValues(e.getTime(),t.getTime(),i)}zoomToValues(e,t,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",0));if(this.getPrivate("min")!=null&&this.getPrivate("max")!=null)if(this.get("groupData")){let r=this.getGroupInterval(t-e),n=this.get("baseInterval"),o=this.getIntervalMin(n),l=this.getIntervalMax(n)-1;l=Y(l,r.timeUnit,r.count,this.root),l+=this._getM(r.timeUnit)*Z(r),l=Y(l,r.timeUnit,r.count,this.root);let h=Y(o,r.timeUnit,r.count,this.root),u=Y(l,r.timeUnit,r.count,this.root),c=(e-h)/(u-h),d=(t-h)/(u-h);this.zoom(c,d,i)}else this.zoom((e-s)/(a-s),(t-s)/(a-s),i)}positionToDate(e){return new Date(this.positionToValue(e))}dateToPosition(e){return this.valueToPosition(e.getTime())}getCellWidthPosition(){let e=this.getPrivate("selectionMax",this.getPrivate("max")),t=this.getPrivate("selectionMin",this.getPrivate("min"));return v(e)&&v(t)?this._intervalDuration/(e-t):.05}nextPosition(e){e==null&&(e=1);let t=this.get("tooltipLocation",.5)*this.baseDuration();this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0)),s=this.getPrivate("baseInterval"),a=this._nextTime(i,e,s),r=this.getPrivate("selectionMin",0),n=this.getPrivate("selectionMax",0),o=Y(r,s.timeUnit,s.count,this._root),l=Y(n,s.timeUnit,s.count,this._root);return a+=t,a=re(a,o+t,l-t),this.toGlobalPosition(this.valueToPosition(a))}_nextTime(e,t,i){return Y(e+t*this.baseDuration(),i.timeUnit,i.count,this._root)}};Object.defineProperty(ye,"className",{enumerable:!0,configurable:!0,writable:!0,value:"DateAxis"});Object.defineProperty(ye,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:se.classNames.concat([ye.className])});var Be=class extends ye{constructor(){super(...arguments),Object.defineProperty(this,"_frequency",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_m",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_dates",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_customDates",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this.valueFields.push("date"),this.addTag("gapless"),super._afterNew()}_getDates(){return this._customDates?this._customDates:this._dates}_updateDates(e,t){if(!t.get("ignoreMinMax")){let i=this._getDates(),s=me(i,a=>fe(a,e));s.found||Yt(i,s.index,e)}}_updateAllDates(){if(!this._customDates){let e=this._dates;e.length=0,D(this.series,o=>{let l="valueX";o.get("yAxis")==this&&(l="valueY"),D(o.dataItems,h=>{let u=h.get(l);v(u)&&h.open&&this._updateDates(h.open[l],o)})});let t=this.get("extraMax",0),i=this.get("extraMin",0),s=e.length,a=this.getPrivate("baseInterval"),r=a.count,n=a.timeUnit;if(t>0){let o=s*t,l=e[s-1];if(v(l))for(let h=s-1;h<s+o;h++)l+=ee(n,r*this._getM(n)),l=Y(l,n,r,this._root),e.push(l)}if(i>0){let o=s*i,l=e[0];if(v(l))for(let h=0;h<o;h++)l-=ee(n,r),l=Y(l,n,r,this._root),e.unshift(l)}}}valueToPosition(e){let t=this._getDates(),i=this.get("startLocation",0),s=this.get("endLocation",1),a=t.length-i-(1-s),r=me(t,o=>fe(o,e)),n=r.index;if(r.found)return(n-i)/a;{n>0&&(n-=1);let o=t[n],l=t[n+1];if(l){let u=l;Math.abs(u-e)<Math.abs(o-e)&&(o=u,n++)}let h=e-o;return(n-i)/a+h/this.baseDuration()/a}}valueToIndex(e){let t=this._getDates(),i=me(t,a=>fe(a,e)),s=i.index;return i.found||s>0&&(s-=1),s}positionToValue(e){let t=this.get("startLocation",0),i=this.get("endLocation",1),s=this._getDates(),a=Math.round(s.length-t-(1-i)),r=e*a,n=Math.floor(r);return n<0&&(n=0),n>a-1&&(n=a-1),s[n]+(r-n+t)*this.baseDuration()}_fixZoomFactor(){this.setPrivateRaw("maxZoomFactor",this._getDates().length-this.get("startLocation",0)-(1-this.get("endLocation",1)))}zoomToDates(e,t,i){let s=this._getDates(),a=s.length,r=me(s,l=>fe(l,e.getTime())),n=s[Math.min(r.index,a-1)];r=me(s,l=>fe(l,t.getTime()));let o=s[r.index];r.index>=a&&(o=s[a-1]+this.baseDuration()),this.zoomToValues(n,o,i)}zoomToValues(e,t,i){let s=this.getPrivate("min",0),a=this.getPrivate("max",0);e=re(e,s,a),t=re(t,s,a),this.zoom(this.valueToPosition(e),this.valueToPosition(t),i)}_prepareAxisItems(){let e=this.getPrivate("selectionMin",0),t=this.getPrivate("selectionMax",0);if(v(e)&&v(t)){this._seriesValuesDirty&&(this._seriesValuesDirty=!1,this._updateAllDates());let i=this._root,s=i.utc,a=i.timezone,r=this._getDates(),n=this.get("renderer"),o=r.length,l=this.baseDuration(),h=this.valueToIndex(e);h>0&&h--;let u=this.valueToIndex(t);u<o-1&&u++;let c=n.axisLength()/Math.max(n.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),d=Math.min(o,Math.ceil((u-h)/c));d=Math.max(1,d),h=Math.floor(h/d)*d,this._frequency=d,D(this.dataItems,S=>{this._toggleDataItem(S,!1)}),D(this.minorDataItems,S=>{this._toggleDataItem(S,!1)});let p=t-e-((t-e)/l-(u-h))*l,f=Xe(0,p,c,this.get("gridIntervals")),g=this.getPrivate("baseInterval"),m=Z(f);m<l&&(f=Object.assign({},g),m=Z(f)),this._intervalDuration=m;let b=f.timeUnit,x=this.get("dateFormats"),_=Date.now();r[0]&&(_=r[0]);let A=Y(this.getPrivate("selectionMin",0),b,f.count,i,_),y=n.get("minorLabelsEnabled"),M=n.get("minorGridEnabled",y),w,P=0,k;M&&(w=this._getMinorInterval(f),P=Z(w));let I=this._getIndexes(A,this.getPrivate("selectionMax",A)+m,f,this.getPrivate("min",A));if(I.length>0){let S=0;this._m=0;let C=A-m*10,L=Ve(b);if(w){let U=r[I[0]];this._addMinorGrid(U-m,U,P,w)}let E=n.axisLength()/n.gridCount()*.5;D(I,U=>{var te;let X;this.dataItems.length<S+1?(X=new K(this,void 0,{}),this._dataItems.push(X),this.processDataItem(X)):X=this.dataItems[S];let $=r[U],j=new Date($),be=$;S<I.length-1?be=r[I[S+1]]:be+=m,X.setRaw("value",$),X.setRaw("endValue",be),X.setRaw("index",S),X.setRaw("labelEndValue",void 0);let ge=x[b];L&&this.get("markUnitChange")&&v(C)&&b!="year"&&Ge($,C,L,s,a)&&(ge=this.get("periodChangeDateFormats")[b]),this._createAssets(X,[]);let ie=X.get("label");ie&&ie.set("text",i.dateFormatter.format(j,ge)),this._toggleDataItem(X,!0);let Te=f.count;if(b=="week"&&X.setRaw("labelEndValue",$),M){let W=f.timeUnit;if(W=="week"&&(W="day"),Te>1||f.timeUnit=="week"){let Q=Y($,W,1,i)+ee(W,this._getM(W)),Ae=this.valueToIndex(Q);if(Q=r[Ae],Q==$){let N=r[Ae+1];N?Q=N:Q+=P}X.setRaw("labelEndValue",Q)}Te=1}if(this._prepareDataItem(X,Te),ie&&k&&n.getPrivate("letter")=="X"){let W=k.get("label");if(W){let Q=ie.x(),Ae=W.x();if(Q-Ae<E){let N=this._pickWorse(k,X,f);N&&((te=N.get("label"))===null||te===void 0||te.setPrivate("visible",!1))}}}w&&this._addMinorGrid($,be,P,w),S++,ie&&ie.getPrivate("visible")&&(k=X),C=$})}D(this.series,S=>{S.inited&&S._markDirtyAxes()})}this._updateGhost()}_pickWorse(e,t,i){let s=i.timeUnit,a=e.get("value",0),r=t.get("value",0);return s=="hour"&&new Date(a).getDate()!=new Date(r).getDate()?e:t}_addMinorGrid(e,t,i,s){let a=this.get("minorDateFormats",this.get("dateFormats")),r=s.timeUnit,n=e+ee(r,this._getM(r));n=Y(n,r,1,this._root);let o=t-i*.5,l=this._getIndexes(n,o,s,n),h=this._getDates();D(l,u=>{let c;this.minorDataItems.length<this._m+1?(c=new K(this,void 0,{}),this.minorDataItems.push(c),this.processDataItem(c)):c=this.minorDataItems[this._m],n=h[u],c.setRaw("value",n),c.setRaw("endValue",n+i),c.setRaw("index",u),this._createAssets(c,["minor"],!0);let d=c.get("label");if(d)if(this.get("renderer").get("minorLabelsEnabled")){let p=new Date(n),f=a[r];d.set("text",this._root.dateFormatter.format(p,f))}else d.setPrivate("visible",!1);this._toggleDataItem(c,!0),this._prepareDataItem(c,1),this._m++})}_getIndexes(e,t,i,s){let a=[],r=i.timeUnit,n=i.count,o=this._getM(r),l=this.getPrivate("baseInterval"),h=this._root,u=this._getDates(),c=n-1,d=-1/0,p=ee(r,o),f=ee(r,n*o),g=e;for(r=="day"&&(e=s);e<=t;){e=Y(e,r,n,h);let m=this.valueToIndex(e),b=u[m];if(r=="day"&&l.timeUnit=="day")this._hasDate(e)&&c++,c==n&&(e>=g-f*2&&Ne(a,m),c=0),e+=p,e=Y(e,r,1,h);else{if(b<e){for(let x=m,_=u.length;x<_;x++)if(b=u[x],b>=e){m=x;break}}Ne(a,m),e+=f,e=Y(e,r,n,h)}if(e==d&&(e+=f+p,e=Y(e,r,n,h)),e==d)break;d=e}return a}_hasDate(e){return me(this._getDates(),i=>ot(i,e)).found}_nextTime(e,t,i){let s=re(this.valueToIndex(e)+t,0,this._dates.length-1);return this._dates[s]}};Object.defineProperty(Be,"className",{enumerable:!0,configurable:!0,writable:!0,value:"GaplessDateAxis"});Object.defineProperty(Be,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ye.classNames.concat([Be.className])});var We=class extends se{constructor(){super(...arguments),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_groupingCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_intervalDuration",{enumerable:!0,configurable:!0,writable:!0,value:1})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),super._afterNew()}_adjustMinMax(e,t,i,s){let a,r=this.getDurationFormatter(),n=this.get("baseUnit");if(this.setRaw("maxPrecision",0),n=="millisecond"||n=="second"||n=="minute"||n=="hour"){i<=1&&(i=1),i=Math.round(i);let o=t-e;o===0&&(o=Math.abs(t));let l=o/i,h=[60,30,20,15,10,2,1],u=1;n=="hour"&&(h=[24,12,6,4,2,1]);for(let m of h)if(o/m>i){u=m;break}let c=Math.ceil((t-e)/u/i),d=Math.log(Math.abs(c))*Math.LOG10E,p=Math.pow(10,Math.floor(d))/10,f=c/p;c=Wt(h,f)*p,l=u*c,e=Math.floor(e/l)*l,t=Math.ceil(t/l)*l,a={min:e,max:t,step:l}}else a=super._adjustMinMax(e,t,i,s);return this.setPrivateRaw("durationFormat",r.getFormat(a.step,a.max,n)),a}_formatText(e){return this.getDurationFormatter().format(e,this.getPrivate("durationFormat"),this.get("baseUnit"))}getTooltipText(e,t){let i=this.getDurationFormatter(),s=this.get("extraTooltipPrecision",0),a=this.getPrivate("stepDecimalPlaces",0)+s,r=R(this.positionToValue(e),a);return i.format(r,this.getPrivate("durationFormat"),this.get("baseUnit"))}};Object.defineProperty(We,"className",{enumerable:!0,configurable:!0,writable:!0,value:"DurationAxis"});Object.defineProperty(We,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:se.classNames.concat([We.className])});var He=class extends xt{constructor(){super(...arguments),Object.defineProperty(this,"axis",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_beforeChanged(){super._beforeChanged();let e=this.get("sprite");if(this.isDirty("sprite")&&e&&(e.setAll({position:"absolute",role:"figure"}),this._disposers.push(e)),this.isDirty("location")){let t=e.dataItem;this.axis&&e&&t&&this.axis._prepareDataItem(t)}}_dispose(){let e=this.axis;e&&xe(e._bullets,(t,i)=>{i.uid==this.uid&&delete e._bullets[t]}),super._dispose()}};Object.defineProperty(He,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisBullet"});Object.defineProperty(He,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:xt.classNames.concat([He.className])});var $e=class extends vt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty($e,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisLabel"});Object.defineProperty($e,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:vt.classNames.concat([$e.className])});var Ze=class extends Dt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty(Ze,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisLabelRadial"});Object.defineProperty(Ze,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Dt.classNames.concat([Ze.className])});var Oe=class extends kt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty(Oe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisTick"});Object.defineProperty(Oe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:kt.classNames.concat([Oe.className])});var qe=class extends wt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty(qe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"EditableAxisLabel"});Object.defineProperty(qe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:wt.classNames.concat([qe.className])});var ue=class extends V{constructor(){super(...arguments),Object.defineProperty(this,"_axisLength",{enumerable:!0,configurable:!0,writable:!0,value:100}),Object.defineProperty(this,"_start",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_end",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_inversed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_minSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_lc",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_ls",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_thumbDownPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downStart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEnd",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ticks",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>Oe._new(this._root,{themeTags:F(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template])))}),Object.defineProperty(this,"grid",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>de._new(this._root,{themeTags:F(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template])))}),Object.defineProperty(this,"axisFills",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>V._new(this._root,{themeTags:F(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template])))}),Object.defineProperty(this,"labels",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>$e._new(this._root,{themeTags:F(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}),Object.defineProperty(this,"axis",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}makeTick(e,t){let i=this.ticks.make();return i._setDataItem(e),e.setRaw("tick",i),i.set("themeTags",F(i.get("themeTags"),t)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(e,t){let i=this.grid.make();return i._setDataItem(e),e.setRaw("grid",i),i.set("themeTags",F(i.get("themeTags"),t)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(e,t){let i=this.axisFills.make();return i._setDataItem(e),i.set("themeTags",F(i.get("themeTags"),t)),this.axis.gridContainer.children.push(i),e.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(e,t){let i=this.labels.make();return i.set("themeTags",F(i.get("themeTags"),t)),this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(e),e.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this.set("isMeasured",!1);let e=this.thumb;e&&(this._disposers.push(e.events.on("pointerdown",t=>{this._handleThumbDown(t)})),this._disposers.push(e.events.on("globalpointerup",t=>{this._handleThumbUp(t)})),this._disposers.push(e.events.on("globalpointermove",t=>{this._handleThumbMove(t)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){let e=this.thumb;if(e){let t=this.axis.labelsContainer,i=this.get("pan");i=="zoom"?t.children.push(e):i=="none"&&t.children.removeValue(e)}}}_handleThumbDown(e){this._thumbDownPoint=this.toLocal(e.point);let t=this.axis;this._downStart=t.get("start"),this._downEnd=t.get("end")}_handleThumbUp(e){this._thumbDownPoint=void 0}_handleThumbMove(e){let t=this._thumbDownPoint;if(t){let i=this.toLocal(e.point),s=this._downStart,a=this._downEnd,r=this._getPan(i,t)*Math.min(1,a-s)/2*this.get("panSensitivity",1);this.axis.zoom(s-r,a+r,0)}}_getPan(e,t){return 0}positionToCoordinate(e){return this._inversed?(this._end-e)*this._axisLength:(e-this._start)*this._axisLength}updateTooltipBounds(e){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e=e*(i-t),this.get("inversed")?e=i-e:e=t+e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=i-e:e=e-t,e=e/(i-t),e}fixPosition(e){return this.get("inversed")?1-e:e}_updateLC(){}toggleVisibility(e,t,i,s){let a=this.axis,r=a.get("start",0),n=a.get("end",1),o=r+(n-r)*(i-1e-4),l=r+(n-r)*(s+1e-4);t<o||t>l?e.setPrivate("visible",!1):e.setPrivate("visible",!0)}_positionTooltip(e,t){let i=this.chart;i&&(e.set("pointTo",this._display.toGlobal(t)),i.inPlot(t)||e.hide())}processAxis(){}};Object.defineProperty(ue,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRenderer"});Object.defineProperty(ue,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([ue.className])});var Ke=class extends ue{constructor(){super(...arguments),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:pe.new(this._root,{width:O,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");let e=this.grid.template;e.set("height",O),e.set("width",0),e.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(0,i.height())}),this.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(i.width(),0)})}_changed(){var e;super._changed();let t=this.axis,i=t.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("x",-1e3));let s="opposite",a="inside";if(this.isDirty(s)||this.isDirty(a)){let r=this.chart,n=t.children;if(this.get(a)?t.addTag(a):t.removeTag(a),r){if(this.get(s)){let o=r.topAxesContainer.children;o.indexOf(t)==-1&&o.insertIndex(0,t),t.addTag(s),n.moveValue(this)}else{let o=r.bottomAxesContainer.children;o.indexOf(t)==-1&&o.moveValue(t),t.removeTag(s),n.moveValue(this,0)}(e=t.ghostLabel)===null||e===void 0||e._applyThemes(),this.labels.each(o=>{o._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}this.thumb.setPrivate("height",t.labelsContainer.height())}_getPan(e,t){return(t.x-e.x)/this.width()}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e-=this._ls,e=e*(i-t)/this._lc,this.get("inversed")?e=i-e:e=t+e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=i-e:e=e-t,e=e/(i-t)*this._lc,e+=this._ls,e}_updateLC(){let e=this.axis,t=e.parent;if(t){let i=t.innerWidth();this._lc=this.axisLength()/i,this._ls=(e.x()-t.get("paddingLeft",0))/i}}_updatePositions(){let e=this.axis,t=e.x()-Fe(e.get("centerX",0),e.width())-e.parent.get("paddingLeft",0);e.gridContainer.set("x",t),e.topGridContainer.set("x",t),e.bulletsContainer.set("y",this.y());let i=e.chart;if(i){let s=i.plotContainer,a=e.axisHeader,r=e.get("marginLeft",0),n=e.x()-r,o=e.parent;o&&(n-=o.get("paddingLeft",0)),a.children.length>0?(r=e.axisHeader.width(),e.set("marginLeft",r+1)):a.set("width",r),a.setAll({x:n,y:-1,height:s.height()+2})}}processAxis(){super.processAxis();let e=this.axis;e.get("width")==null&&e.set("width",O);let t=this._root.verticalLayout;e.set("layout",t),e.labelsContainer.set("width",O),e.axisHeader.setAll({layout:t})}axisLength(){return this.axis.width()}positionToPoint(e){return{x:this.positionToCoordinate(e),y:0}}updateTick(e,t,i,s){if(e){v(t)||(t=0);let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("x",this.positionToCoordinate(t));let r=e.get("length",0),n=e.get("inside",this.get("inside",!1));this.get("opposite")?(e.set("y",O),n||(r*=-1)):(e.set("y",0),n&&(r*=-1)),e.set("draw",o=>{o.moveTo(0,0),o.lineTo(0,r)}),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateLabel(e,t,i,s){if(e){let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a),v(t)||(t=0);let r=e.get("inside",this.get("inside",!1));this.get("opposite")?r?(e.set("position","absolute"),e.set("y",0)):(e.set("position","relative"),e.set("y",O)):r?(e.set("y",0),e.set("position","absolute")):(e.set("y",void 0),e.set("position","relative")),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("x",this.positionToCoordinate(t)),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateGrid(e,t,i){if(e){v(t)||(t=0);let s=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*s),e.set("x",this.positionToCoordinate(t)),this.toggleVisibility(e,t,0,1)}}updateBullet(e,t,i){if(e){let s=e.get("sprite");if(s){v(t)||(t=0);let a=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*a);let r=this.axis.roundAxisPosition(t,a),n=this.axis._bullets[r],o=-1;if(this.get("opposite")&&(o=1),e.get("stacked"))if(n){let l=n.get("sprite");l&&s.set("y",l.y()+l.height()*o)}else s.set("y",0);this.axis._bullets[r]=e,s.set("x",this.positionToCoordinate(t)),this.toggleVisibility(s,t,0,1)}}}updateFill(e,t,i){if(e){v(t)||(t=0),v(i)||(i=1);let s=this.positionToCoordinate(t),a=this.positionToCoordinate(i);this.fillDrawMethod(e,s,a)}}fillDrawMethod(e,t,i){e.set("draw",s=>{let a=this.axis.gridContainer.height(),r=this.width();i<t&&([i,t]=[t,i]),!(t>r||i<0)&&(s.moveTo(t,0),s.lineTo(i,0),s.lineTo(i,a),s.lineTo(t,a),s.lineTo(t,0))})}positionTooltip(e,t){this._positionTooltip(e,{x:this.positionToCoordinate(t),y:0})}updateTooltipBounds(e){let t=this.get("inside"),i=1e5,s=this._display.toGlobal({x:0,y:0}),a=s.x,r=0,n=this.axisLength(),o=i,l="up";this.get("opposite")?t?(l="up",r=s.y,o=i):(l="down",r=s.y-i,o=i):t?(l="down",r=s.y-i,o=i):(l="up",r=s.y,o=i);let h={left:a,right:a+n,top:r,bottom:r+o},u=e.get("bounds");ht(h,u)||(e.set("bounds",h),e.set("pointerOrientation",l))}};Object.defineProperty(Ke,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererX"});Object.defineProperty(Ke,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ue.classNames.concat([Ke.className])});var Je=class extends ue{constructor(){super(...arguments),Object.defineProperty(this,"_downY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:pe.new(this._root,{height:O,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");let e=this.grid.template;e.set("width",O),e.set("height",0),e.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(i.width(),0)}),this.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(0,i.height())})}_getPan(e,t){return(e.y-t.y)/this.height()}_changed(){var e;super._changed();let t=this.axis,i=t.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("y",-1e3));let s=this.thumb,a="opposite",r="inside",n=this.chart;if(this.isDirty(a)||this.isDirty(r)){let l=t.children;if(this.get(r)?t.addTag(r):t.removeTag(r),n){if(this.get(a)){let h=n.rightAxesContainer.children;h.indexOf(t)==-1&&h.moveValue(t,0),t.addTag(a),l.moveValue(this,0)}else{let h=n.leftAxesContainer.children;h.indexOf(t)==-1&&h.moveValue(t),t.removeTag(a),l.moveValue(this)}(e=t.ghostLabel)===null||e===void 0||e._applyThemes(),this.labels.each(h=>{h._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}let o=t.labelsContainer.width();n&&(this.get(a)?s.set("centerX",0):s.set("centerX",o)),s.setPrivate("width",o)}processAxis(){super.processAxis();let e=this.axis;e.get("height")==null&&e.set("height",O);let t=this._root.horizontalLayout;e.set("layout",t),e.labelsContainer.set("height",O),e.axisHeader.set("layout",t)}_updatePositions(){let e=this.axis,t=e.y()-Fe(e.get("centerY",0),e.height());e.gridContainer.set("y",t),e.topGridContainer.set("y",t),e.bulletsContainer.set("x",this.x());let i=e.chart;if(i){let s=i.plotContainer,a=e.axisHeader,r=e.get("marginTop",0);a.children.length>0?(r=e.axisHeader.height(),e.set("marginTop",r+1)):a.set("height",r),a.setAll({y:e.y()-r,x:-1,width:s.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(e){return{x:0,y:this.positionToCoordinate(e)}}updateLabel(e,t,i,s){if(e){v(t)||(t=0);let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a);let r=this.get("opposite"),n=e.get("inside",this.get("inside",!1));r?(e.set("x",0),n?e.set("position","absolute"):e.set("position","relative")):n?(e.set("x",0),e.set("position","absolute")):(e.set("x",void 0),e.set("position","relative")),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("y",this.positionToCoordinate(t)),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateGrid(e,t,i){if(e){v(t)||(t=0);let s=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*s),e.set("y",this.positionToCoordinate(t)),this.toggleVisibility(e,t,0,1)}}updateTick(e,t,i,s){if(e){v(t)||(t=0);let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("y",this.positionToCoordinate(t));let r=e.get("length",0),n=e.get("inside",this.get("inside",!1));this.get("opposite")?(e.set("x",0),n&&(r*=-1)):n||(r*=-1),e.set("draw",o=>{o.moveTo(0,0),o.lineTo(r,0)}),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateBullet(e,t,i){if(e){let s=e.get("sprite");if(s){v(t)||(t=0);let a=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*a);let r=this.axis.roundAxisPosition(t,a),n=this.axis._bullets[r],o=1;if(this.get("opposite")&&(o=-1),e.get("stacked"))if(n){let l=n.get("sprite");l&&s.set("x",l.x()+l.width()*o)}else s.set("x",0);this.axis._bullets[r]=e,s.set("y",this.positionToCoordinate(t)),this.toggleVisibility(s,t,0,1)}}}updateFill(e,t,i){if(e){v(t)||(t=0),v(i)||(i=1);let s=this.positionToCoordinate(t),a=this.positionToCoordinate(i);this.fillDrawMethod(e,s,a)}}fillDrawMethod(e,t,i){e.set("draw",s=>{let a=this.axis.gridContainer.width(),r=this.height();i<t&&([i,t]=[t,i]),!(t>r||i<0)&&(s.moveTo(0,t),s.lineTo(a,t),s.lineTo(a,i),s.lineTo(0,i),s.lineTo(0,t))})}positionToCoordinate(e){return this._inversed?(e-this._start)*this._axisLength:(this._end-e)*this._axisLength}positionTooltip(e,t){this._positionTooltip(e,{x:0,y:this.positionToCoordinate(t)})}updateTooltipBounds(e){let t=this.get("inside"),i=1e5,s=this._display.toGlobal({x:0,y:0}),a=s.y,r=0,n=this.axisLength(),o=i,l="right";this.get("opposite")?t?(l="right",r=s.x-i,o=i):(l="left",r=s.x,o=i):t?(l="left",r=s.x,o=i):(l="right",r=s.x-i,o=i);let h={left:r,right:r+o,top:a,bottom:a+n},u=e.get("bounds");ht(h,u)||(e.set("bounds",h),e.set("pointerOrientation",l))}_updateLC(){let e=this.axis,t=e.parent;if(t){let i=t.innerHeight();this._lc=this.axisLength()/i,this._ls=e.y()/i}}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e-=this._ls,e=e*(i-t)/this._lc,this.get("inversed")?e=t+e:e=i-e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=e-t:e=i-e,e=e/(i-t)*this._lc,e+=this._ls,e}fixPosition(e){return this.get("inversed")?e:1-e}};Object.defineProperty(Je,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererY"});Object.defineProperty(Je,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ue.classNames.concat([Je.className])});var ce=class extends Re{_beforeChanged(){super._beforeChanged(),(this.isDirty("lowX0")||this.isDirty("lowY0")||this.isDirty("lowX1")||this.isDirty("lowY1")||this.isDirty("highX0")||this.isDirty("highX1")||this.isDirty("highY0")||this.isDirty("highY1"))&&(this._clear=!0)}_draw(){super._draw();let e=this._display;e.moveTo(this.get("lowX0",0),this.get("lowY0",0)),e.lineTo(this.get("lowX1",0),this.get("lowY1",0)),e.moveTo(this.get("highX0",0),this.get("highY0",0)),e.lineTo(this.get("highX1",0),this.get("highY1",0))}};Object.defineProperty(ce,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Candlestick"});Object.defineProperty(ce,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Re.classNames.concat([ce.className])});var we=class extends _e{constructor(){super(...arguments),Object.defineProperty(this,"allColumns",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(V.new(this._root,{}))}),Object.defineProperty(this,"allColumnsData",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>Re._new(this._root,{position:"absolute",themeTags:F(this.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template])))})}makeColumn(e,t){let i=t.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(e),t.push(i),i}_processAxisRange(e){super._processAxisRange(e),e.columns=new H(z.new({}),()=>Re._new(this._root,{position:"absolute",themeTags:F(e.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template,e.columns.template]))}_beforeColumnsDraw(){this.allColumnsData=[]}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",e=>{e.clear(),D(this.allColumnsData,t=>{let i=t.width,s=t.height,a=t.x,r=t.y,n=t.stroke,o=t.fill,l=t.strokeWidth,h=t.strokeOpacity,u=t.fillOpacity;e.beginFill(o,u),e.beginPath(),e.lineStyle(l,n,h),e.drawRect(a,r,i,s),e.endStroke(),e.endFill()})})}_updateSeriesGraphics(e,t,i,s,a,r,n,o){if(this.get("turboMode")){let l=t.get("stroke"),h=t.get("fillOpacity",1),u=t.get("strokeOpacity",1),c=t.get("strokeWidth",1),d=t.get("fill"),p=this.getPoint(i,a),f=this.getPoint(s,r),g=e.get("point");if(g){let m=this.getPoint(g.x,g.y);g.x=m.x+this._x,g.y=m.y+this._y}i=p.x,s=f.x,a=p.y,r=f.y,e.setRaw("left",i),e.setRaw("right",s),e.setRaw("top",a),e.setRaw("bottom",r),this.allColumnsData.push({width:s-i,height:r-a,x:i,y:a,stroke:l,fill:d,strokeWidth:c,strokeOpacity:u,fillOpacity:h})}else super._updateSeriesGraphics(e,t,i,s,a,r,n,o)}};Object.defineProperty(we,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ColumnSeries"});Object.defineProperty(we,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:_e.classNames.concat([we.className])});var Pe=class extends we{constructor(){super(...arguments),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({themeTags:["autocolor"]}),()=>ce._new(this._root,{themeTags:F(this.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template])))})}makeColumn(e,t){let i=t.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(e),t.push(i),i}_updateGraphics(e,t,i){super._updateGraphics(e,t,i);let s=this.getRaw("xAxis"),a=this.getRaw("yAxis"),r=this.get("vcy",1),n=this.get("vcx",1),o,l,h,u,c,d,p,f,g=this.get("locationX",e.get("locationX",.5)),m=this.get("locationY",e.get("locationY",.5)),b=this.get("openLocationX",e.get("openLocationX",g)),x=this.get("openLocationY",e.get("openLocationY",m)),_;if(i==0){let A=a.getDataItemPositionY(e,this._yOpenField,1,r),y=a.getDataItemPositionY(e,this._yField,1,r);u=a.getDataItemPositionY(e,this._yLowField,1,r),f=a.getDataItemPositionY(e,this._yHighField,1,r),p=Math.max(A,y),h=Math.min(A,y);let M=this._aLocationX0+b-.5,w=this._aLocationX1+g-.5;o=s.getDataItemPositionX(e,this._xField,M+(w-M)/2,n),l=o,c=o,d=o,_="vertical"}else{let A=s.getDataItemPositionX(e,this._xOpenField,1,n),y=s.getDataItemPositionX(e,this._xField,1,n);l=s.getDataItemPositionX(e,this._xLowField,1,n),d=s.getDataItemPositionX(e,this._xHighField,1,n),c=Math.max(A,y),o=Math.min(A,y);let M=this._aLocationY0+x-.5,w=this._aLocationY1+m-.5;h=a.getDataItemPositionY(e,this._yField,M+(w-M)/2,r),u=h,p=h,f=h,_="horizontal"}this._updateCandleGraphics(e,o,l,h,u,c,d,p,f,_)}_updateCandleGraphics(e,t,i,s,a,r,n,o,l,h){let u=e.get("graphics");if(u){let c=this.getPoint(t,s),d=this.getPoint(i,a),p=this.getPoint(r,o),f=this.getPoint(n,l);if(this.get("turboMode")){let g=this.allColumnsData[this.allColumnsData.length-1];g.lowX0=c.x,g.lowY0=c.y,g.lowX1=d.x,g.lowY1=d.y,g.highX0=p.x,g.highY0=p.y,g.highX1=f.x,g.highY1=f.y}else{let g=u.x(),m=u.y();u.set("lowX0",c.x-g),u.set("lowY0",c.y-m),u.set("lowX1",d.x-g),u.set("lowY1",d.y-m),u.set("highX0",p.x-g),u.set("highY0",p.y-m),u.set("highX1",f.x-g),u.set("highY1",f.y-m),u.set("orientation",h);let b=e.get("rangeGraphics");b&&D(b,x=>{x.set("lowX0",c.x-g),x.set("lowY0",c.y-m),x.set("lowX1",d.x-g),x.set("lowY1",d.y-m),x.set("highX0",p.x-g),x.set("highY0",p.y-m),x.set("highX1",f.x-g),x.set("highY1",f.y-m),x.set("orientation",h)})}}}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",e=>{e.clear(),D(this.allColumnsData,t=>{e.beginPath();let i=t.width,s=t.height,a=t.x,r=t.y,n=t.stroke,o=t.fill,l=t.strokeWidth,h=t.strokeOpacity,u=t.fillOpacity,c=t.lowX0,d=t.lowY0,p=t.lowX1,f=t.lowY1,g=t.highX0,m=t.highY0,b=t.highX1,x=t.highY1;e.beginFill(o,u),e.beginPath(),e.lineStyle(l,n,h),e.drawRect(a,r,i,s),e.moveTo(c,d),e.lineTo(p,f),e.moveTo(g,m),e.lineTo(b,x),e.endStroke(),e.endFill()})})}_processAxisRange(e){super._processAxisRange(e),e.columns=new H(z.new({}),()=>ce._new(this._root,{themeTags:F(e.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template,e.columns.template]))}};Object.defineProperty(Pe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CandlestickSeries"});Object.defineProperty(Pe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:we.classNames.concat([Pe.className])});var De=class extends ce{_draw(){let e=this._display;e.moveTo(this.get("lowX1",0),this.get("lowY1",0)),e.lineTo(this.get("highX1",0),this.get("highY1",0));let t=this.width(),i=this.height();if(this.get("orientation")=="vertical"){let s=i,a=0;e.moveTo(0,s),e.lineTo(t/2,s),e.moveTo(t/2,a),e.lineTo(t,a)}else{let s=0,a=t;e.moveTo(s,0),e.lineTo(s,i/2),e.moveTo(a,i/2),e.lineTo(a,i)}}};Object.defineProperty(De,"className",{enumerable:!0,configurable:!0,writable:!0,value:"OHLC"});Object.defineProperty(De,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ce.classNames.concat([De.className])});var Qe=class extends Pe{constructor(){super(...arguments),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({themeTags:["autocolor"]}),()=>De._new(this._root,{themeTags:F(this.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template])))})}makeColumn(e,t){let i=this.mainContainer.children.push(t.make());return i._setDataItem(e),t.push(i),i}_processAxisRange(e){super._processAxisRange(e),e.columns=new H(z.new({}),()=>De._new(this._root,{themeTags:F(e.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template,e.columns.template]))}};Object.defineProperty(Qe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"OHLCSeries"});Object.defineProperty(Qe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Pe.classNames.concat([Qe.className])});var q=class extends le{constructor(){super(...arguments),Object.defineProperty(this,"_endIndex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeGenerator",{enumerable:!0,configurable:!0,writable:!0,value:Qt()}),Object.defineProperty(this,"_fillGenerator",{enumerable:!0,configurable:!0,writable:!0,value:ei()}),Object.defineProperty(this,"_legendStroke",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_legendFill",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"strokes",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>V._new(this._root,{themeTags:F(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template])))}),Object.defineProperty(this,"fills",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>V._new(this._root,{themeTags:F(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template])))}),Object.defineProperty(this,"_fillTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_previousPoint",{enumerable:!0,configurable:!0,writable:!0,value:[0,0,0,0]}),Object.defineProperty(this,"_dindex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_sindex",{enumerable:!0,configurable:!0,writable:!0,value:0})}_afterNew(){this._fillGenerator.y0(function(e){return e[3]}),this._fillGenerator.x0(function(e){return e[2]}),this._fillGenerator.y1(function(e){return e[1]}),this._fillGenerator.x1(function(e){return e[0]}),super._afterNew()}makeStroke(e){let t=this.mainContainer.children.push(e.make());return e.push(t),t}makeFill(e){let t=this.mainContainer.children.push(e.make());return e.push(t),t}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let e=this.get("xAxis"),t=this.get("yAxis");if(this.isDirty("stroke")){let i=this.get("stroke");this.strokes.template.set("stroke",i);let s=this._legendStroke;s&&s.states.lookup("default").set("stroke",i)}if(this.isDirty("fill")){let i=this.get("fill");this.fills.template.set("fill",i);let s=this._legendFill;s&&s.states.lookup("default").set("fill",i)}if(this.isDirty("fillPattern")){let i=this.get("fillPattern");this.fills.template.set("fillPattern",i);let s=this._legendFill;s&&s.states.lookup("default").set("fillPattern",i)}if(this.isDirty("curveFactory")){let i=this.get("curveFactory");i&&(this._strokeGenerator.curve(i),this._fillGenerator.curve(i))}if(e.inited&&t.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){this.fills.each(h=>{h.setPrivate("visible",!1)}),this.strokes.each(h=>{h.setPrivate("visible",!1)}),this.axisRanges.each(h=>{let u=h.fills;u&&u.each(d=>{d.setPrivate("visible",!1)});let c=h.strokes;c&&c.each(d=>{d.setPrivate("visible",!1)})});let i=this.startIndex(),s=this.strokes.template.get("templateField"),a=this.fills.template.get("templateField"),r=!0,n=!0;s&&(r=!1),a&&(n=!1);for(let h=i-1;h>=0;h--){let u=this.dataItems[h],c=!0,d=u.dataContext;if(s&&d[s]&&(r=!0),a&&d[a]&&(n=!0),D(this._valueFields,p=>{v(u.get(p))||(c=!1)}),c&&r&&n){i=h;break}}let o=this.dataItems.length,l=this.endIndex();if(l<o){l++;for(let h=l;h<o;h++){let u=this.dataItems[h],c=!0;if(D(this._valueFields,d=>{v(u.get(d))||(c=!1)}),c){l=h+1;break}}}if(i>0&&i--,this._endIndex=l,this._clearGraphics(),this._sindex=0,this._dindex=i,this.dataItems.length==1)this._startSegment(0);else for(;this._dindex<l-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(e=>{e.fills.clear(),e.strokes.clear()})}_startSegment(e){let t=this._endIndex,i=t,s=this.get("autoGapCount"),a=this.get("connect"),r=this.makeFill(this.fills),n=this._fillTemplate,o=this.fills.template;n&&n!=o&&(r.template=n),r.setPrivate("visible",!0);let l=this.makeStroke(this.strokes),h=this._strokeTemplate;h&&h!=this.strokes.template&&(l.template=h),l.setPrivate("visible",!0);let u=this.get("xAxis"),c=this.get("yAxis"),d=this.get("baseAxis"),p=this.get("vcx",1),f=this.get("vcy",1),g=this._xField,m=this._yField,b=this._xOpenField,x=this._yOpenField,_=this.get("openValueXField"),A=this.get("openValueYField");_||(b=this._xField),A||(x=this._yField);let y=this.get("stacked"),M=u.basePosition(),w=c.basePosition(),P;d===c?P=this._yField:P=this._xField;let k=[],I=[];k.push(I);let S=this.strokes.template.get("templateField"),C=this.fills.template.get("templateField"),L=this.get("locationX",.5),E=this.get("locationY",.5),U=this.get("openLocationX",L),te=this.get("openLocationY",E),X=this.get("minDistance",0),$,j=this.fills.template.get("visible");this.axisRanges.length>0&&(j=!0);let be=!1;(y||_||A)&&(be=!0);let ge={points:I,segments:k,stacked:y,getOpen:be,basePosX:M,basePosY:w,fillVisible:j,xField:g,yField:m,xOpenField:b,yOpenField:x,vcx:p,vcy:f,baseAxis:d,xAxis:u,yAxis:c,locationX:L,locationY:E,openLocationX:U,openLocationY:te,minDistance:X},ie=this._strokeTemplate,Te=this._fillTemplate;for($=e;$<i;$++){this._dindex=$;let W=this._dataItems[$],Q=W.get(g),Ae=W.get(m);if(Q==null||Ae==null?a||(I=[],k.push(I),ge.points=I):this._getPoints(W,ge),S){let N=W.dataContext[S];if(N)if(N instanceof z||(N=z.new(N)),this._strokeTemplate=N,$>e){i=$;break}else ie=N,l.template=N}if(C){let N=W.dataContext[C];if(N)if(N instanceof z||(N=z.new(N)),this._fillTemplate=N,$>e){i=$;break}else Te=N,r.template=N}if(!a){let N=this.dataItems[$+1];N&&d.shouldGap(W,N,s,P)&&(I=[],k.push(I),ge.points=I)}}r.setRaw("userData",[e,$]),l.setRaw("userData",[e,$]),$===t&&this._endLine(I,k[0][0]),l&&this._drawStroke(l,k),r&&this._drawFill(r,k),this.axisRanges.each(W=>{let Q=W.container,Ae=W.fills,N=this.makeFill(Ae);Q&&Q.children.push(N),N.setPrivate("visible",!0),this._drawFill(N,k);let hi=W.strokes,at=this.makeStroke(hi);Q&&Q.children.push(at),ie&&ie!=this.strokes.template&&(at.template=ie),Te&&Te!=this.fills.template&&(N.template=Te),at.setPrivate("visible",!0),this._drawStroke(at,k),N.setRaw("userData",[e,$]),at.setRaw("userData",[e,$])})}_getPoints(e,t){let i=t.points,s=e.get("locationX",t.locationX),a=e.get("locationY",t.locationY),r=this.get("exactLocationX",!1),n=this.get("exactLocationY",!1),o=t.xAxis.getDataItemPositionX(e,t.xField,s,t.vcx,r),l=t.yAxis.getDataItemPositionY(e,t.yField,a,t.vcy,n);if(this._shouldInclude(o)){let h=this.getPoint(o,l),u=[h.x,h.y];if(h.x+=this._x,h.y+=this._y,e.set("point",h),t.fillVisible){let c=o,d=l;if(t.baseAxis===t.xAxis?d=t.basePosY:t.baseAxis===t.yAxis&&(c=t.basePosX),t.getOpen){let f=e.get(t.xOpenField),g=e.get(t.yOpenField);if(f!=null&&g!=null){let m=e.get("openLocationX",t.openLocationX),b=e.get("openLocationY",t.openLocationY);if(t.stacked){let x=e.get("stackToItemX"),_=e.get("stackToItemY");x?(c=t.xAxis.getDataItemPositionX(x,t.xField,m,x.component.get("vcx"),r),ae(c)&&(c=t.basePosX)):t.yAxis===t.baseAxis?c=t.basePosX:c=t.xAxis.getDataItemPositionX(e,t.xOpenField,m,t.vcx,r),_?(d=t.yAxis.getDataItemPositionY(_,t.yField,b,_.component.get("vcy"),n),ae(d)&&(d=t.basePosY)):t.xAxis===t.baseAxis?d=t.basePosY:d=t.yAxis.getDataItemPositionY(e,t.yOpenField,b,t.vcy,n)}else c=t.xAxis.getDataItemPositionX(e,t.xOpenField,m,t.vcx,r),d=t.yAxis.getDataItemPositionY(e,t.yOpenField,b,t.vcy,n)}}let p=this.getPoint(c,d);u[2]=p.x,u[3]=p.y}if(t.minDistance>0){let c=u[0],d=u[1],p=u[2],f=u[3],g=this._previousPoint,m=g[0],b=g[1],x=g[2],_=g[3];(Math.hypot(c-m,d-b)>t.minDistance||p&&f&&Math.hypot(p-x,f-_)>t.minDistance)&&(i.push(u),this._previousPoint=u)}else i.push(u)}}_endLine(e,t){}_drawStroke(e,t){e.get("visible")&&!e.get("forceHidden")&&e.set("draw",i=>{D(t,s=>{this._strokeGenerator.context(i),this._strokeGenerator(s)})})}_drawFill(e,t){e.get("visible")&&!e.get("forceHidden")&&e.set("draw",i=>{D(t,s=>{this._fillGenerator.context(i),this._fillGenerator(s)})})}_processAxisRange(e){super._processAxisRange(e),e.fills=new H(z.new({}),()=>V._new(this._root,{themeTags:F(e.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,e.fills.template])),e.strokes=new H(z.new({}),()=>V._new(this._root,{themeTags:F(e.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,e.strokes.template]))}createLegendMarker(e){let t=this.get("legendDataItem");if(t){let i=t.get("marker"),s=t.get("markerRectangle");s&&s.setPrivate("visible",!1),i.set("background",pe.new(i._root,{fillOpacity:0,fill:Ut(0)}));let a=i.children.push(V._new(i._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=a;let r=i.children.push(V._new(i._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=r;let n=this._root.interfaceColors.get("disabled");if(a.states.create("disabled",{fill:n,stroke:n}),r.states.create("disabled",{fill:n,stroke:n}),this.bullets.length>0){let o=this.bullets.getIndex(0);if(o){let l=o(i._root,this,new K(this,{legend:!0},{}));if(l){let h=l.get("sprite");h instanceof V&&h.states.create("disabled",{fill:n,stroke:n}),h&&(h.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),i.children.push(h),h.setAll({x:i.width()/2,y:i.height()/2}),i.events.on("boundschanged",()=>{h.setAll({x:i.width()/2,y:i.height()/2})}))}}}}}};Object.defineProperty(q,"className",{enumerable:!0,configurable:!0,writable:!0,value:"LineSeries"});Object.defineProperty(q,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:le.classNames.concat([q.className])});var Ot=class{constructor(e,t){Object.defineProperty(this,"_line",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_point",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_x0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_x1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_t0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_tension",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._context=e,this._tension=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:$t(this,this._t0,ri(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){[e,t]=[t,e];let i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,$t(this,ri(this,i=ai(this,e,t)),i);break;default:$t(this,this._t0,i=ai(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function dt(T){function e(t){return new Ot(t,T)}return e.tension=function(t){return dt(+t)},e}function si(T){return T<0?-1:1}function ai(T,e,t){let i=T._x1-T._x0,s=e-T._x1,a=(T._y1-T._y0)/(i||s<0&&-0),r=(t-T._y1)/(s||i<0&&-0),n=(a*s+r*i)/(i+s);return(si(a)+si(r))*Math.min(Math.abs(a),Math.abs(r),.5*Math.abs(n))||0}function ri(T,e){let t=T._x1-T._x0;return t?(3*(T._y1-T._y0)/t-e)/2:e}function $t(T,e,t){let i=T._x0,s=T._y0,a=T._x1,r=T._y1,n=(a-i)/1.5*(1-T._tension);T._context.bezierCurveTo(s+n*e,i+n,r-n*t,a-n,r,a)}var et=class extends q{_afterNew(){this._setDefault("curveFactory",dt(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",dt(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};Object.defineProperty(et,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SmoothedYLineSeries"});Object.defineProperty(et,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([et.className])});var Ft=class{constructor(e,t){Object.defineProperty(this,"_line",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_point",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_x0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_x1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_t0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_tension",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._context=e,this._tension=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:St(this,this._t0,li(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){let i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,St(this,li(this,i=ni(this,e,t)),i);break;default:St(this,this._t0,i=ni(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function Xt(T){function e(t){return new Ft(t,T)}return e}function oi(T){return T<0?-1:1}function ni(T,e,t){let i=T._x1-T._x0,s=e-T._x1,a=(T._y1-T._y0)/(i||s<0&&-0),r=(t-T._y1)/(s||i<0&&-0),n=(a*s+r*i)/(i+s);return(oi(a)+oi(r))*Math.min(Math.abs(a),Math.abs(r),.5*Math.abs(n))||0}function li(T,e){let t=T._x1-T._x0;return t?(3*(T._y1-T._y0)/t-e)/2:e}function St(T,e,t){let i=T._x0,s=T._y0,a=T._x1,r=T._y1,n=(a-i)/1.5*(1-T._tension);T._context.bezierCurveTo(i+n,s+n*e,a-n,r-n*t,a,r)}var tt=class extends q{_afterNew(){this._setDefault("curveFactory",Xt(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",Xt(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};Object.defineProperty(tt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SmoothedXLineSeries"});Object.defineProperty(tt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([tt.className])});var it=class extends q{_afterNew(){this._setDefault("curveFactory",At.tension(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",At.tension(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};Object.defineProperty(it,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SmoothedXYLineSeries"});Object.defineProperty(it,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([it.className])});var st=class extends q{_afterNew(){this._setDefault("curveFactory",ti),super._afterNew()}_getPoints(e,t){let i=t.points,s=this.get("stepWidth",O).value/2,a=e.get("locationX",t.locationX),r=e.get("locationY",t.locationY),n=a,o=r;t.baseAxis===t.xAxis?(a-=s,n+=s):t.baseAxis===t.yAxis&&(r-=s,o+=s);let l=t.xAxis.getDataItemPositionX(e,t.xField,a,t.vcx),h=t.yAxis.getDataItemPositionY(e,t.yField,r,t.vcy),u=t.xAxis.getDataItemPositionX(e,t.xField,n,t.vcx),c=t.yAxis.getDataItemPositionY(e,t.yField,o,t.vcy);if(this._shouldInclude(l)){let d=this.getPoint(l,h),p=[d.x,d.y],f=this.getPoint(u,c),g=[f.x,f.y];if(t.fillVisible){let m=l,b=h,x=u,_=c;if(t.baseAxis===t.xAxis?(b=t.basePosY,_=t.basePosY):t.baseAxis===t.yAxis&&(m=t.basePosX,x=t.basePosX),t.getOpen){let M=e.get(t.xOpenField),w=e.get(t.yOpenField);if(M!=null&&w!=null)if(a=e.get("openLocationX",t.openLocationX),r=e.get("openLocationY",t.openLocationY),n=a,o=r,t.baseAxis===t.xAxis?(a-=s,n+=s):t.baseAxis===t.yAxis&&(r-=s,o+=s),t.stacked){let P=e.get("stackToItemX"),k=e.get("stackToItemY");P?(m=t.xAxis.getDataItemPositionX(P,t.xField,a,P.component.get("vcx")),x=t.xAxis.getDataItemPositionX(P,t.xField,n,P.component.get("vcx"))):t.yAxis===t.baseAxis?(m=t.basePosX,x=t.basePosX):t.baseAxis===t.yAxis&&(m=t.xAxis.getDataItemPositionX(e,t.xOpenField,a,t.vcx),x=t.xAxis.getDataItemPositionX(e,t.xOpenField,n,t.vcx)),k?(b=t.yAxis.getDataItemPositionY(k,t.yField,r,k.component.get("vcy")),_=t.yAxis.getDataItemPositionY(k,t.yField,o,k.component.get("vcy"))):t.xAxis===t.baseAxis?(b=t.basePosY,_=t.basePosY):t.baseAxis===t.yAxis&&(b=t.yAxis.getDataItemPositionY(e,t.yOpenField,r,t.vcy),_=t.yAxis.getDataItemPositionY(e,t.yOpenField,o,t.vcy))}else m=t.xAxis.getDataItemPositionX(e,t.xOpenField,a,t.vcx),b=t.yAxis.getDataItemPositionY(e,t.yOpenField,r,t.vcy),x=t.xAxis.getDataItemPositionX(e,t.xOpenField,n,t.vcx),_=t.yAxis.getDataItemPositionY(e,t.yOpenField,o,t.vcy)}let A=this.getPoint(m,b),y=this.getPoint(x,_);p[2]=A.x,p[3]=A.y,g[2]=y.x,g[3]=y.y}i.push(p),i.push(g),e.set("point",{x:p[0]+(g[0]-p[0])/2,y:p[1]+(g[1]-p[1])/2})}this.get("noRisers")&&(t.points=[],t.segments.push(i))}};Object.defineProperty(st,"className",{enumerable:!0,configurable:!0,writable:!0,value:"StepLineSeries"});Object.defineProperty(st,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([st.className])});export{he as Axis,He as AxisBullet,$e as AxisLabel,Ze as AxisLabelRadial,ue as AxisRenderer,Ke as AxisRendererX,Je as AxisRendererY,Oe as AxisTick,_e as BaseColumnSeries,ce as Candlestick,Pe as CandlestickSeries,ve as CategoryAxis,ze as CategoryDateAxis,we as ColumnSeries,ye as DateAxis,nt as DefaultTheme,We as DurationAxis,qe as EditableAxisLabel,Be as GaplessDateAxis,de as Grid,q as LineSeries,De as OHLC,Qe as OHLCSeries,tt as SmoothedXLineSeries,it as SmoothedXYLineSeries,et as SmoothedYLineSeries,st as StepLineSeries,se as ValueAxis,Ce as XYChart,Ee as XYChartScrollbar,Ue as XYCursor,le as XYSeries};
3
+ v5.0.0-next.94 */
4
+ import{a as Re,b as qt,c as wt,d as Tt}from"./X462Z4QP.js";import{$ as Jt,B as _t,C as V,D as pe,J as Ht,K as G,M as vt,N as B,R as K,S as yt,T as Ve,U as ee,V as Z,W as ct,X as Ge,Y,Z as Kt,_ as Xe,a as ut,b as bt,ba as Pt,c as H,ea as Dt,f as R,g as Bt,ga as Qt,h as re,ha as ei,ia as At,ja as ti,la as Mt,ma as kt,na as It,p as Wt,w as xt}from"./7NXL4M7N.js";import{M as pt,N as F,O as ht,Q as Ut,R as zt,a as Me,d as jt,f as ft,k as Rt,o as Vt,q as Gt,u as Fe,v as Et}from"./KPKKDVC7.js";import{a as ke,b as Se,d as O,e as rt}from"./2LNH4V6G.js";import{A as me,B as Lt,E as je,G as Ie,H as xe,N as Nt,R as fe,T as ot,U as z,V as Zt,a as ae,g as v,o as D,r as Le,s as gt,t as Ne,v as mt,w as Yt}from"./EXAYRFE5.js";import"./SGTNDSIQ.js";var nt=class extends Zt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:It.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:zt.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:It.new(this._root,{saturation:0})});{let o=i("Graphics",["scrollbar","overlay"]);o.setAll({fillOpacity:.5}),B(o,"fill",e,"background")}i("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}),i("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4}),i("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,cornerRadiusTR:0,cornerRadiusBR:0}),i("RoundedRectangle",["xy","scrollbar","chart","background","resize","button"]).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),i("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0}),i("AxisRendererY",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5}),i("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:O,minPosition:.01,maxPosition:.99,fontSize:"0.8em"}),i("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0}),i("AxisLabel",["x"]).setAll({centerY:0}),i("AxisLabel",["x","inside"]).setAll({centerY:O}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:O}),i("AxisLabel",["y"]).setAll({centerX:O}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:O}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{let o=i("Grid",["cursor","x"]);o.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:t.translate("Use left and right arrows to move selection")}),B(o,"stroke",e,"alternativeBackground")}{let o=i("Grid",["cursor","y"]);o.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:t.translate("Use up and down arrows to move selection")}),B(o,"stroke",e,"alternativeBackground")}{let o=i("Graphics",["cursor","selection"]);o.setAll({fillOpacity:.15}),B(o,"fill",e,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:rt,centerY:rt,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{let o=i("AxisRenderer");o.setAll({crisp:!0,strokeOpacity:0}),B(o,"stroke",e,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:O}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:O});{let o=i("Rectangle",["axis","thumb","zoomgrip"]);o.setAll({fillOpacity:0}),B(o,"fill",e,"alternativeBackground"),o.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{let o=i("Grid");o.setAll({location:0,strokeOpacity:.15,crisp:!0}),B(o,"stroke",e,"grid")}{let o=i("Grid",["minor"]);o.setAll({location:0,strokeOpacity:.07,crisp:!0}),B(o,"stroke",e,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{let o=i("Graphics",["axis","fill"]);o.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),B(o,"fill",e,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{let o=i("AxisTick");o.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),B(o,"stroke",e,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(o,l)=>{let h=o.get("axisFill");h&&(!v(l)||l%2==0?h.setPrivate("visible",!0):h.setPrivate("visible",!1))}});let s=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],a={millisecond:t.translate("_date_millisecond"),second:t.translate("_date_second"),minute:t.translate("_date_minute"),hour:t.translate("_date_hour"),day:t.translate("_date_day"),week:t.translate("_date_day"),month:t.translate("_date_month"),year:t.translate("_date_year")},r={millisecond:t.translate("_date_millisecond"),second:t.translate("_date_second"),minute:t.translate("_date_minute"),hour:t.translate("_date_day"),day:t.translate("_date_day"),week:t.translate("_date_day"),month:t.translate("_date_month")+" "+t.translate("_date_year"),year:t.translate("_date_year")},n={millisecond:t.translate("_date_millisecond_full"),second:t.translate("_date_second_full"),minute:t.translate("_date_minute_full"),hour:t.translate("_date_hour_full"),day:t.translate("_date_day_full"),week:t.translate("_date_week_full"),month:t.translate("_date_month_full"),year:t.translate("_date_year")};i("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:mt(s),dateFormats:Ie(a),periodChangeDateFormats:Ie(r)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:mt(s),dateFormats:Ie(a),periodChangeDateFormats:Ie(r),tooltipDateFormats:n,groupIntervals:[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],fillRule:o=>{let l=o.get("axisFill");if(l){let h=o.component,u=o.get("value"),c=o.get("endValue"),d=h.intervalDuration(),p=h.getPrivate("baseInterval"),f=h.getPrivate("gridInterval",p),g=h.getPrivate("min",0);if(g=Kt(new Date(g),f.timeUnit,f.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),u!=null&&c!=null){let m=Math.round(Math.round((u-g)/d))/2;m==Math.round(m)?l.setPrivate("visible",!0):l.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:o=>{let l=o.get("axisFill");if(l){let h=o.get("index"),u=!1;(!v(h)||h%2==0)&&(u=!0),l.setPrivate("visible",u)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:o=>{let l=o.get("axisFill");if(l){let h=o.component,u=o.get("value"),c=h.getPrivate("step");v(u)&&v(c)&&(R(u/c/2,5)==Math.round(u/c/2)?l.setPrivate("visible",!1):l.setPrivate("visible",!0))}}}),i("DurationAxis").setAll({baseUnit:"second"}),i("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}),i("BaseColumnSeries").setAll({adjustBulletPosition:!0}),i("ColumnSeries").setAll({clustered:!0}),i("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:Se(70),height:Se(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1}),i("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1,isMeasured:!1}),i("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1}),i("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(o,l)=>{let h=l.parent;if(h){let u=h.height(),c=h.width();o.moveTo(0,u/2),o.lineTo(c,u/2)}}});{let o=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});B(o,"stroke",e,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(o,l)=>{let h=l.parent;if(h){let u=h.height(),c=h.width();o.moveTo(0,0),o.lineTo(c,0),o.lineTo(c,u),o.lineTo(0,u),o.lineTo(0,0)}}});{let o=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});B(o,"stroke",e,"disabled")}i("SmoothedXYLineSeries").setAll({tension:.5}),i("SmoothedXLineSeries").setAll({tension:.5}),i("SmoothedYLineSeries").setAll({tension:.5}),i("Candlestick").setAll({position:"absolute",isMeasured:!1,width:Se(50),height:Se(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:Se(80),height:Se(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{let o=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});B(o,"fill",e,"positive"),B(o,"stroke",e,"positive")}{let o=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});B(o,"fill",e,"negative"),B(o,"stroke",e,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{let o=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});B(o,"fill",e,"positive"),B(o,"stroke",e,"positive")}{let o=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});B(o,"fill",e,"negative"),B(o,"stroke",e,"negative")}i("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});{let o=i("Graphics",["rangegrip","button","icon"]);o.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:l=>{l.moveTo(0,.5),l.lineTo(0,12.5),l.moveTo(2,.5),l.lineTo(2,12.5),l.moveTo(4,.5),l.lineTo(4,12.5)}}),B(o,"stroke",e,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:rt}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:rt}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:O}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:O})}};var Ce=class extends Mt{constructor(){super(...arguments),Object.defineProperty(this,"xAxes",{enumerable:!0,configurable:!0,writable:!0,value:new bt}),Object.defineProperty(this,"yAxes",{enumerable:!0,configurable:!0,writable:!0,value:new bt}),Object.defineProperty(this,"topAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(G.new(this._root,{width:O,layout:this._root.verticalLayout}))}),Object.defineProperty(this,"yAxesAndPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(G.new(this._root,{width:O,height:O,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"bottomAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(G.new(this._root,{width:O,layout:this._root.verticalLayout}))}),Object.defineProperty(this,"leftAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(G.new(this._root,{height:O,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"plotsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(G.new(this._root,{width:O,height:O,maskContent:!1}))}),Object.defineProperty(this,"plotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(G.new(this._root,{width:O,height:O}))}),Object.defineProperty(this,"topPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(G.new(this._root,{width:O,height:O}))}),Object.defineProperty(this,"gridContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(G.new(this._root,{width:O,height:O,isMeasured:!1}))}),Object.defineProperty(this,"topGridContainer",{enumerable:!0,configurable:!0,writable:!0,value:G.new(this._root,{width:O,height:O,isMeasured:!1})}),Object.defineProperty(this,"rightAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(G.new(this._root,{height:O,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"axisHeadersContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(G.new(this._root,{}))}),Object.defineProperty(this,"zoomOutButton",{enumerable:!0,configurable:!0,writable:!0,value:this.topPlotContainer.children.push(qt.new(this._root,{themeTags:["zoom"],icon:V.new(this._root,{themeTags:["button","icon"]})}))}),Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_wheelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_otherCharts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_movePoints",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_downStartX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEndX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downStartY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEndY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._defaultThemes.push(nt.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);let e=this._root,t=this._root.verticalLayout,i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default").set("opacity",1),this.chartContainer.set("layout",t);let s=this.plotContainer;s.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),s.children.push(this.topGridContainer),s.children.push(this.bulletsContainer),s.set("interactive",!0),s.set("interactiveChildren",!1),s.set("background",pe.new(e,{themeTags:["plotbackground","xy","background"]})),this._disposers.push(s.events.on("pointerdown",a=>{this._handlePlotDown(a)})),this._disposers.push(s.events.on("globalpointerup",a=>{this._handlePlotUp(a)})),this._disposers.push(s.events.on("globalpointermove",a=>{this._handlePlotMove(a)})),this._maskGrid(),this._setUpTouch()}_beforeChanged(){super._beforeChanged(),(this.isDirty("pinchZoomX")||this.isDirty("pinchZoomY")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_setUpTouch(){this.plotContainer._display.cancelTouch||(this.plotContainer._display.cancelTouch=!!(this.get("pinchZoomX")||this.get("pinchZoomY")||this.get("panX")||this.get("panY")))}_maskGrid(){this.gridContainer.set("maskContent",!0),this.topGridContainer.set("maskContent",!0)}_removeSeries(e){e._unstack(),e._posXDp&&e._posXDp.dispose(),e._posYDp&&e._posYDp.dispose(),e.set("baseAxis",void 0);let t=e.get("xAxis");t&&(Le(t.series,e),t.markDirtyExtremes());let i=e.get("yAxis");i&&(Le(i.series,e),i.markDirtyExtremes());let s=this.get("cursor");if(s){let a=s.get("snapToSeries");a&&Le(a,e)}super._removeSeries(e)}handleWheel(e){let t=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,a=e.originalEvent,r=!1;if(Vt(a,this))r=!0;else return;let n=s.toLocal(e.point),o=this.get("wheelStep",.2),l=a.deltaY/100,h=a.deltaX/100,u=this.get("wheelZoomPositionX"),c=this.get("wheelZoomPositionY");(t==="zoomX"||t==="zoomXY")&&h!=0&&this.xAxes.each(d=>{if(d.get("zoomX")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.x/s.width());u!=null&&(g=u);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*h*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*h*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(i==="zoomX"||i==="zoomXY")&&l!=0&&this.xAxes.each(d=>{if(d.get("zoomX")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.x/s.width());u!=null&&(g=u);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*l*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*l*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(t==="zoomY"||t==="zoomXY")&&h!=0&&this.yAxes.each(d=>{if(d.get("zoomY")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.y/s.height());c!=null&&(g=c);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*h*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*h*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(i==="zoomY"||i==="zoomXY")&&l!=0&&this.yAxes.each(d=>{if(d.get("zoomY")){let p=d.get("start"),f=d.get("end"),g=d.fixPosition(n.y/s.height());c!=null&&(g=c);let m=d.get("maxDeviation",0),b=Math.min(1+m,Math.max(-m,p-o*(f-p)*l*g)),x=Math.max(-m,Math.min(1+m,f+o*(f-p)*l*(1-g)));b==p&&x==f&&(r=!1),1/(x-b)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(b,x)):r=!1}}),(t==="panX"||t==="panXY")&&h!=0&&this.xAxes.each(d=>{if(d.get("panX")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*h,m=p+g,b=f+g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),(i==="panX"||i==="panXY")&&l!=0&&this.xAxes.each(d=>{if(d.get("panX")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*l,m=p+g,b=f+g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),(t==="panY"||t==="panXY")&&h!=0&&this.yAxes.each(d=>{if(d.get("panY")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*h,m=p+g,b=f+g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),(i==="panY"||i==="panXY")&&l!=0&&this.yAxes.each(d=>{if(d.get("panY")){let p=d.get("start"),f=d.get("end"),g=this._getWheelSign(d)*o*(f-p)*l,m=p-g,b=f-g,x=this._fixWheel(m,b);m=x[0],b=x[1],m==p&&b==f&&(r=!1),this._handleWheelAnimation(d.zoom(m,b))}}),r&&a.preventDefault()}_handleSetWheel(){let e=this.get("wheelX"),t=this.get("wheelY"),i=this.plotContainer;e!=="none"||t!=="none"?(this._wheelDp=i.events.on("wheel",s=>{let a=s.originalEvent;(e!=="none"&&Math.abs(a.deltaX)!=0||t!=="none"&&Math.abs(a.deltaY)!=0)&&this.handleWheel(s)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(e){let t=1;return e.get("renderer").get("inversed")&&(t=-1),t}_fixWheel(e,t){let i=t-e;return e<0&&(e=0,t=e+i),t>1&&(t=1,e=t-i),[e,t]}_handlePlotDown(e){let t=e.originalEvent;if(t.button==2)return;let i=this.plotContainer,s=i.toLocal(e.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&t.pointerId&&je(i._downPoints).length>0){let r=this.xAxes.getIndex(0),n=this.yAxes.getIndex(0);r&&(this._downStartX=r.get("start",0),this._downEndX=r.get("end",1)),n&&(this._downStartY=n.get("start",0),this._downEndY=n.get("end",1))}if((this.get("panX")||this.get("panY"))&&s.x>=0&&s.y>=0&&s.x<=i.width()&&s.y<=this.height()){this._downPoint={x:t.clientX,y:t.clientY};let a=this.get("panX"),r=this.get("panY");a&&this.xAxes.each(o=>{o._panStart=o.get("start"),o._panEnd=o.get("end")}),r&&this.yAxes.each(o=>{o._panStart=o.get("start"),o._panEnd=o.get("end")});let n="panstarted";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:e.originalEvent})}}_handleWheelAnimation(e){e?e.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){let e="wheelended";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}_handlePlotUp(e){let t=this._downPoint;if(t&&(this.get("panX")||this.get("panY"))){if(e.originalEvent.clientX==t.x&&e.originalEvent.clientY==t.y){let s="pancancelled";this.events.isEnabled(s)&&this.events.dispatch(s,{type:s,target:this,originalEvent:e.originalEvent})}let i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:e.originalEvent})}this._downPoint=void 0,this.xAxes.each(i=>{i._isPanning=!1}),this.yAxes.each(i=>{i._isPanning=!1})}_handlePlotMove(e){let t=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){let a=e.originalEvent.pointerId;if(a&&(this._movePoints[a]=e.point,je(t._downPoints).length>1)){this._handlePinch();return}}let i=this._downPoint;if(i){i=t.toLocal(this._root.documentPointToRoot(i));let s=t.toLocal(e.point),a=this.get("panX"),r=this.get("panY");if(a){let n=this.get("scrollbarX");n&&n.events.disableType("rangechanged"),this.xAxes.each(o=>{if(o.get("panX")){o._isPanning=!0;let l=o._panStart,h=o._panEnd,c=(h-l)*(i.x-s.x)/t.width();o.get("renderer").get("inversed")&&(c*=-1);let d=l+c,p=h+c;p-d<1+o.get("maxDeviation",1)*2&&(o.set("start",d),o.set("end",p))}}),n&&n.events.enableType("rangechanged")}if(r){let n=this.get("scrollbarY");n&&n.events.disableType("rangechanged"),this.yAxes.each(o=>{if(o.get("panY")){o._isPanning=!0;let l=o._panStart,h=o._panEnd,c=(h-l)*(i.y-s.y)/t.height();o.get("renderer").get("inversed")&&(c*=-1);let d=l-c,p=h-c;p-d<1+o.get("maxDeviation",1)*2&&(o.set("start",d),o.set("end",p))}}),n&&n.events.enableType("rangechanged")}}}_handlePinch(){let e=this.plotContainer,t=0,i=[],s=[];if(xe(e._downPoints,(a,r)=>{i[t]=r;let n=this._movePoints[a];n&&(s[t]=n),t++}),i.length>1&&s.length>1){let a=e.width(),r=e.height(),n=i[0],o=i[1],l=s[0],h=s[1];if(n&&o&&l&&h){if(l=e.toLocal(l),h=e.toLocal(h),n=e.toLocal(n),o=e.toLocal(o),this.get("pinchZoomX")){let u=this._downStartX,c=this._downEndX;if(u!=null&&c!=null){n.x>o.x&&([n,o]=[o,n],[l,h]=[h,l]);let d=u+n.x/a*(c-u),p=u+o.x/a*(c-u),f=u+l.x/a*(c-u),g=u+h.x/a*(c-u),m=Math.max(.001,p-d),b=Math.max(.001,g-f),x=m/b,_=u*x+d-f*x,A=c*x+p-g*x;this.xAxes.each(y=>{let M=y.fixPosition(_),w=y.fixPosition(A);y.zoom(M,w,0)})}}if(this.get("pinchZoomY")){let u=this._downStartY,c=this._downEndY;if(u!=null&&c!=null){n.y<o.y&&([n,o]=[o,n],[l,h]=[h,l]);let d=u+(1-n.y/r)*(c-u),p=u+(1-o.y/r)*(c-u),f=u+(1-l.y/r)*(c-u),g=u+(1-h.y/r)*(c-u),m=Math.max(.001,p-d),b=Math.max(.001,g-f),x=m/b,_=u*x+d-f*x,A=c*x+p-g*x;this.yAxes.each(y=>{let M=y.fixPosition(_),w=y.fixPosition(A);y.zoom(M,w,0)})}}}}}_handleCursorPosition(){let e=this.get("cursor");if(e){let t=e.getPrivate("point"),i=e.get("snapToSeries");if(e._downPoint&&(i=void 0),i&&t){let s=e.get("snapToSeriesBy"),a=[];D(i,o=>{if(!o.isHidden()&&!o.isHiding())if(s!="x!"&&s!="y!"){let l=o.startIndex(),h=o.endIndex();for(let u=l;u<h;u++){let c=o.dataItems[u];c&&!c.isHidden()&&a.push(c)}}else{let l=o.get("tooltipDataItem");l&&a.push(l)}});let r=1/0,n;if(D(a,o=>{let l=o.get("point");if(l){let h=0;s=="x"||s=="x!"?h=Math.abs(t.x-l.x):s=="y"||s=="y!"?h=Math.abs(t.y-l.y):h=Math.hypot(t.x-l.x,t.y-l.y),h<r&&(r=h,n=o)}}),D(i,o=>{let l=o.get("tooltip");l&&l._setDataItem(void 0)}),n){let o=n.component;o.showDataItemTooltip(n),o.setRaw("tooltipDataItem",n);let l=n.get("point");l&&e.handleMove(o.toGlobal({x:l.x-o.x(),y:l.y-o.y()}),!0)}}}}_updateCursor(){let e=this.get("cursor");e&&e.updateCursor()}_addCursor(e){this.plotContainer.children.push(e)}_prepareChildren(){if(super._prepareChildren(),this.series.each(e=>{this._colorize(e)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){let e=this._prevSettings.cursor,t=this.get("cursor");t!==e&&(this._disposeProperty("cursor"),e&&e.dispose(),t&&(t._setChart(this),this._addCursor(t),this._pushPropertyDisposer("cursor",t.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=t)}if(this.isDirty("scrollbarX")){let e=this._prevSettings.scrollbarX,t=this.get("scrollbarX");t!==e&&(this._disposeProperty("scrollbarX"),e&&e.dispose(),t&&(t.parent||this.topAxesContainer.children.push(t),this._pushPropertyDisposer("scrollbarX",t.events.on("rangechanged",i=>{this._handleScrollbar(this.xAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarX",t.events.on("released",()=>{this.xAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),t.setPrivate("positionTextFunction",i=>{let s=this.xAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarX=t)}if(this.isDirty("scrollbarY")){let e=this._prevSettings.scrollbarY,t=this.get("scrollbarY");t!==e&&(this._disposeProperty("scrollbarY"),e&&e.dispose(),t&&(t.parent||this.rightAxesContainer.children.push(t),this._pushPropertyDisposer("scrollbarY",t.events.on("rangechanged",i=>{this._handleScrollbar(this.yAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarY",t.events.on("released",()=>{this.yAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),t.setPrivate("positionTextFunction",i=>{let s=this.yAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarY=t)}this._handleZoomOut()}_processSeries(e){super._processSeries(e);let t=e.get("xAxis"),i=e.get("yAxis");Ne(t.series,e),Ne(i.series,e),e._posXDp=e.addDisposer(t.events.on("positionchanged",()=>{e._fixPosition()})),e._posXDp=e.addDisposer(i.events.on("positionchanged",()=>{e._fixPosition()})),e.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?e.set("baseAxis",i):e.set("baseAxis",t)),e.get("stacked")&&(e._markDirtyKey("stacked"),D(e.dataItems,s=>{s.set("stackToItemY",void 0),s.set("stackToItemX",void 0)})),e._markDirtyAxes(),i.markDirtyExtremes(),t.markDirtyExtremes(),t._seriesAdded=!0,i._seriesAdded=!0,this._colorize(e)}_colorize(e){let t=this.get("colors");if(t&&e.get("fill")==null){let s=t.next();e._setSoft("stroke",s),e._setSoft("fill",s)}let i=this.get("patterns");if(i&&e.get("fillPattern")==null){let s=i.next();e._setSoft("fillPattern",s)}}_handleCursorSelectEnd(){let e=this.get("cursor"),t=e.get("behavior"),i=e.getPrivate("downPositionX",0),s=e.getPrivate("downPositionY",0),a=Math.min(1,Math.max(0,e.getPrivate("positionX",.5))),r=Math.min(1,Math.max(0,e.getPrivate("positionY",.5)));this.xAxes.each(n=>{if(t==="zoomX"||t==="zoomXY"){let o=n.toAxisPosition(i),l=n.toAxisPosition(a);n.zoom(o,l)}n.setPrivate("updateScrollbar",!0)}),this.yAxes.each(n=>{if(t==="zoomY"||t==="zoomXY"){let o=n.toAxisPosition(s),l=n.toAxisPosition(r);n.zoom(o,l)}n.setPrivate("updateScrollbar",!0)})}_handleScrollbar(e,t,i,s){e.each(a=>{let r=a.fixPosition(t),n=a.fixPosition(i),o=a.zoom(r,n,void 0,s),l="updateScrollbar";a.setPrivateRaw(l,!1),o?o.events.on("stopped",()=>{a.setPrivateRaw(l,!0)}):a.setPrivateRaw(l,!0)})}_processAxis(e,t){return e.events.onAll(i=>{if(i.type==="clear")D(i.oldValues,s=>{this._removeAxis(s)});else if(i.type==="push")t.children.push(i.newValue),i.newValue.processChart(this);else if(i.type==="setIndex")t.children.setIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="insertIndex")t.children.insertIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="removeIndex")this._removeAxis(i.oldValue);else if(i.type==="moveIndex")t.children.moveValue(i.value,i.newIndex),i.value.processChart(this);else throw new Error("Unknown IListEvent type")})}_removeAxis(e){if(!e.isDisposed()){let t=e.parent;t&&t.children.removeValue(e);let i=e.gridContainer,s=i.parent;s&&s.children.removeValue(i);let a=e.topGridContainer,r=a.parent;r&&r.children.removeValue(a)}}_updateChartLayout(){let e=this.leftAxesContainer.width(),t=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",e),i.set("paddingRight",t);let s=this.topAxesContainer;s.set("paddingLeft",e),s.set("paddingRight",t)}processAxis(e){var t=this.get("cursor");t&&(this.addDisposer(e.on("start",()=>{this._updateCursor()})),this.addDisposer(e.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(e,t){let i=e.fixPosition(e.get("start",0)),s=e.fixPosition(e.get("end",1));if(i>s&&([i,s]=[s,i]),this.xAxes.indexOf(e)!=-1){if(t||e.getPrivate("updateScrollbar")){let a=this.get("scrollbarX");a&&(!a.getPrivate("isBusy")||t)&&(a.setRaw("start",i),a.setRaw("end",s),a.updateGrips())}}else if(this.yAxes.indexOf(e)!=-1&&(t||e.getPrivate("updateScrollbar"))){let a=this.get("scrollbarY");a&&(!a.getPrivate("isBusy")||t)&&(a.setRaw("start",i),a.setRaw("end",s),a.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let e=this.zoomOutButton;if(e&&e.parent){let t=!1;this.xAxes.each(i=>{i.get("zoomOut",!0)&&(R(i.get("start",0),5)!=0||R(i.get("end",1),5)!=1)&&(t=!0)}),this.yAxes.each(i=>{i.get("zoomOut",!0)&&(R(i.get("start",0),5)!=0||R(i.get("end",1),5)!=1)&&(t=!0)}),t?e.isHidden()&&e.show():e.hide()}}inPlot(e){let t=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),s=t.toGlobal(e);if(e.x>=-.5&&e.y>=-.5&&e.x<=t.width()+.5&&e.y<=t.height()+.5)return!0;if(i)for(let a=i.length-1;a>=0;a--){let r=i[a];if(r!=this){let n=r.plotContainer,o=this._root.rootPointToDocument(s),l=r._root.documentPointToRoot(o),h=n.toLocal(l);if(h.x>=-.1&&h.y>=-.1&&h.x<=n.width()+.1&&h.y<=n.height()+.1)return!0}}return!1}arrangeTooltips(){let e=this.plotContainer,t=e.width(),i=e.height(),s=this.height(),a=this._root.tooltipContainer.get("layerMargin");a&&a.bottom>s&&(s=a.bottom);let r=e._display.toGlobal({x:0,y:0}),n=e._display.toGlobal({x:t,y:i}),o=[],l=0,h=1/0,u=this._movePoint,c=this.get("maxTooltipDistance"),d=this.get("maxTooltipDistanceBy","xy"),p,f;v(c)&&this.series.each(m=>{if(!m.isHidden()){let b=m.get("tooltip");if(b){let x=b.get("pointTo");if(x){let _=Math.hypot(u.x-x.x,u.y-x.y);d=="x"?_=Math.abs(u.x-x.x):d=="y"&&(_=Math.abs(u.y-x.y)),_<h&&(h=_,p=m,f=x)}}}});let g=[];if(this.series.each(m=>{let b=m.get("tooltip");if(b&&!b.get("forceHidden")){let x=!1,_=b.get("pointTo");if(_){if(c>=0){let A=b.get("pointTo");if(A&&f&&m!=p){let y=Math.hypot(f.x-A.x,f.y-A.y);d=="x"?y=Math.abs(f.x-A.x):d=="y"&&(y=Math.abs(f.y-A.y)),y>c&&(x=!0)}}else c==-1&&m!=p&&(x=!0);!this.inPlot(this._tooltipToLocal(_))||!b.dataItem?x=!0:x||(l+=_.y),x||m.isHidden()||m.isHiding()?b.hide(0):(b.show(),o.push(b),g.push(m))}}}),this.setPrivate("tooltipSeries",g),this.get("arrangeTooltips")){let m=0,b=0,x=this._root.tooltipContainer,_=o.length;if(l/_>i/2+r.y){o.sort((M,w)=>ot(w.get("pointTo").y,M.get("pointTo").y));let y=n.y;if(D(o,M=>{let w=M.height();b++,m+=w;let P=M.get("centerY");P instanceof ke&&(w*=P.value),w+=M.get("marginBottom",0),M.set("bounds",{left:r.x,top:r.y,right:n.x,bottom:y}),M.setPrivate("customData",{left:r.x,top:r.y,right:n.x,bottom:y}),y=Math.min(y-w,M._fy-w),M.parent==x&&x.children.moveValue(M,0)}),y<0){o.reverse();let M=y;D(o,w=>{b++;let P=w.get("bounds");if(P){let k=P.top-y,I=P.bottom-y;k<M&&(k=M,I=k+w.height()),w.set("bounds",{left:P.left,top:k,right:P.right,bottom:I}),M=P.bottom-y+w.get("marginBottom",0)}})}}else{o.reverse(),o.sort((M,w)=>ot(M.get("pointTo").y,w.get("pointTo").y));let y=0;if(D(o,M=>{b++;let w=M.height();m+=w;let P=M.get("centerY");P instanceof ke&&(w*=P.value),w+=M.get("marginBottom",0),M.set("bounds",{left:r.x,top:y,right:n.x,bottom:Math.max(r.y+s,y+w)}),M.parent==x&&x.children.moveValue(M,0),y=Math.max(y+w,M._fy+w)}),y>s){o.reverse();let M=s;D(o,w=>{b++;let P=w.get("bounds");if(P){let k=P.top-(s-y),I=P.bottom-(s-y);I>M&&(I=M,k=I-w.height()),w.set("bounds",{left:P.left,top:k,right:P.right,bottom:I}),M=I-w.height()-w.get("marginBottom",0)}})}}m==0&&b>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(e){return this.plotContainer.toLocal(e)}zoomOut(){this.xAxes.each(e=>{e.get("zoomOut",!0)&&(e.setPrivate("updateScrollbar",!0),e.zoom(0,1))}),this.yAxes.each(e=>{e.get("zoomOut",!0)&&(e.setPrivate("updateScrollbar",!0),e.zoom(0,1))})}_dispose(){super._dispose();let e=this.get("cursor");e&&e.dispose()}};Object.defineProperty(Ce,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYChart"});Object.defineProperty(Ce,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Mt.classNames.concat([Ce.className])});var Ee=class extends Tt{constructor(){super(...arguments),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(Ce.new(this._root,{themeTags:["chart"],interactive:!1,interactiveChildren:!1,panX:!1,panY:!1,wheelX:"none",wheelY:"none"}))}),Object.defineProperty(this,"overlay",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(V.new(this._root,{themeTags:["overlay"],interactive:!1}))})}_afterNew(){this._addOrientationClass(),this._settings.themeTags=F(this._settings.themeTags,["scrollbar","xy","chart",this._settings.orientation]);let e=this.children;e.moveValue(this.thumb),e.moveValue(this.startGrip),e.moveValue(this.endGrip),this.thumb.set("opacity",0),this.thumb.states.create("hover",{opacity:.2});let t=this.chart.plotContainer;t.set("interactive",!1),t.remove("background"),t.children.removeValue(this.chart.zoomOutButton),super._afterNew()}_updateThumb(){super._updateThumb(),this.overlay.set("draw",e=>{let t=this.startGrip,i=this.endGrip,s=t.x(),a=t.y(),r=i.x(),n=i.y(),o=this.height(),l=this.width();s>r&&([s,r]=[r,s]),a>n&&([a,n]=[n,a]),this.get("orientation")==="horizontal"?(e.moveTo(0,0),e.lineTo(s,0),e.lineTo(s,o),e.lineTo(0,o),e.lineTo(0,0),e.moveTo(r,0),e.lineTo(l,0),e.lineTo(l,o),e.lineTo(r,o),e.lineTo(r,0)):(e.moveTo(0,0),e.lineTo(0,a),e.lineTo(l,a),e.lineTo(l,0),e.lineTo(0,0),e.moveTo(0,n),e.lineTo(0,o),e.lineTo(l,o),e.lineTo(l,n),e.lineTo(0,n))})}};Object.defineProperty(Ee,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYChartScrollbar"});Object.defineProperty(Ee,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Tt.classNames.concat([Ee.className])});var de=class extends V{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}};Object.defineProperty(de,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Grid"});Object.defineProperty(de,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([de.className])});var Ue=class extends G{constructor(){super(...arguments),Object.defineProperty(this,"_alwaysShow",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"lineX",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(de.new(this._root,{themeTags:["x"]}))}),Object.defineProperty(this,"lineY",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(de.new(this._root,{themeTags:["y"]}))}),Object.defineProperty(this,"selection",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(V.new(this._root,{themeTags:["selection","cursor"],layer:30}))}),Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_lastPoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_lastPoint2",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_tooltipX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_tooltipY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_toX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_toY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this.setAll({width:O,height:O,isMeasured:!0,position:"absolute"}),this.states.create("hidden",{visible:!0,opacity:0}),this._drawLines(),this.setPrivateRaw("visible",!1),this._disposers.push(this.setTimeout(()=>{this.setPrivate("visible",!0)},500)),this._disposers.push(this.lineX.events.on("positionchanged",()=>{this._handleXLine()})),this._disposers.push(this.lineY.events.on("positionchanged",()=>{this._handleYLine()})),this._disposers.push(this.lineX.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),ft("keyboardevents")&&this._disposers.push(jt(document,"keydown",e=>{this._handleLineMove(Gt(e),e.ctrlKey)}))}_setUpTouch(){let e=this.chart;e&&(e.plotContainer._display.cancelTouch=this.get("behavior")!="none")}_handleXLine(){let e=this.lineX.x(),t=!0;(e<0||e>this.width())&&(t=!1),this.lineX.setPrivate("visible",t)}_handleYLine(){let e=this.lineY.y(),t=!0;(e<0||e>this.height())&&(t=!1),this.lineY.setPrivate("visible",t)}_handleLineMove(e,t){let i="",s=this.chart,a;if(s&&s.xAxes.length){this._root.focused(this.lineX)?(i="positionX",a=s.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(a=s.yAxes.getIndex(0),i="positionY");let r=1;if(t&&(r=5),a){let n=a.get("renderer").get("inversed",!1),o;e=="ArrowRight"||e=="ArrowDown"?o=1:e=="ArrowLeft"||e=="ArrowUp"?o=-1:e=="Tab"&&(o=0),o!=null&&(n&&(o*=-1),this.set(i,a.nextPosition(o*r)))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;let e=this.get("xAxis");if(e){let t=e.get("tooltip");t&&(this._tooltipX=!0,this._disposers.push(t.on("pointTo",()=>{this._updateXLine(t)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;let e=this.get("yAxis");if(e){let t=e.get("tooltip");t&&(this._tooltipY=!0,this._disposers.push(t.on("pointTo",()=>{this._updateYLine(t)})))}}}_handleSyncWith(){let e=this.chart;if(e){let t=this.get("syncWith"),i=[];t&&D(t,s=>{let a=s.chart;a&&i.push(a)}),e._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){let e=this.get("positionX"),t=this.get("positionY");e==null&&t==null?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(e){let t=R(this._display.toLocal(e.get("pointTo",{x:0,y:0})).x,3);this._toX!=t&&(this.lineX.animate({key:"x",to:t,duration:e.get("animationDuration",0),easing:e.get("animationEasing")}),this._toX=t)}_updateYLine(e){let t=R(this._display.toLocal(e.get("pointTo",{x:0,y:0})).y,3);this._toY!=t&&(this.lineY.animate({key:"y",to:t,duration:e.get("animationDuration",0),easing:e.get("animationEasing")}),this._toY=t)}_drawLines(){this.lineX.set("draw",e=>{e.moveTo(0,0),e.lineTo(0,this.height())}),this.lineY.set("draw",e=>{e.moveTo(0,0),e.lineTo(this.width(),0)})}updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(e){this.chart=e,this._handleSyncWith();let t=e.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))}),ft("touchevents")&&(this._disposers.push(t.events.on("click",s=>{Rt(s.originalEvent)&&this._handleMove(s)})),this._setUpTouch()),this._disposers.push(t.events.on("pointerdown",s=>{this._handleCursorDown(s)})),this._disposers.push(t.events.on("globalpointerup",s=>{this._handleCursorUp(s),!s.native&&!this.isHidden()&&this._handleMove(s)})),this._disposers.push(t.events.on("globalpointermove",s=>{!this.get("syncWith")&&je(t._downPoints).length==0&&!s.native&&this.isHidden()||(this._handleMove(s),Math.hypot(this._lastPoint2.x-s.point.x,this._lastPoint2.y-s.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=s.point))}));let i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(e){let t=this.chart;return t?t.inPlot(e):!1}_handleCursorDown(e){if(e.originalEvent.button==2)return;let t=e.point,i=this._display.toLocal(t),s=this.chart;if(this.selection.set("draw",()=>{}),s&&this._inPlot(i)){if(this._downPoint=i,this.get("behavior")!="none"){this.selection.show();let n="selectstarted";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:e.originalEvent})}let a=this._getPosition(i).x,r=this._getPosition(i).y;this.setPrivate("downPositionX",a),this.setPrivate("downPositionY",r)}}_handleCursorUp(e){if(this._downPoint){let t=this.get("behavior","none");if(t!="none"){t.charAt(0)==="z"&&this.selection.hide();let i=e.point,s=this._display.toLocal(i),a=this._downPoint,r=this.get("moveThreshold",1);if(s&&a){let n=!1;if((t==="zoomX"||t==="zoomXY"||t==="selectX"||t==="selectXY")&&Math.abs(s.x-a.x)>r&&(n=!0),(t==="zoomY"||t==="zoomXY"||t==="selectY"||t==="selectXY")&&Math.abs(s.y-a.y)>r&&(n=!0),n){let o="selectended";this.events.isEnabled(o)&&this.events.dispatch(o,{type:o,target:this,originalEvent:e.originalEvent})}else{let o="selectcancelled";this.events.isEnabled(o)&&this.events.dispatch(o,{type:o,target:this,originalEvent:e.originalEvent})}}}}this._downPoint=void 0}_handleMove(e){if(this.getPrivate("visible")){let t=this.chart;if(t&&je(t.plotContainer._downPoints).length>1){this.set("forceHidden",!0);return}else this.set("forceHidden",!1);let i=e.point,s=this._lastPoint;if(Math.round(s.x)===Math.round(i.x)&&Math.round(s.y)===Math.round(i.y))return;this._lastPoint=i,this.setPrivate("lastPoint",i),this.handleMove({x:i.x,y:i.y},!1,e.originalEvent)}}_getPosition(e){return{x:e.x/this.width(),y:e.y/this.height()}}handleMove(e,t,i){e||(e=this._movePoint);let s=this.get("alwaysShow");if(!e){this.hide(0);return}this._movePoint=e;let a=this._display.toLocal(e),r=this.chart;if(r&&(this._inPlot(a)||this._downPoint)){r._movePoint=e,this.isHidden()&&(this.show(),this.get("behavior","").charAt(0)=="z"&&this.selection.set("draw",()=>{}));let n=a.x,o=a.y,l=this._getPosition(a);this.setPrivate("point",a);let h=this.get("snapToSeries");this._downPoint&&(h=void 0);let u=this.get("positionX"),c=l.x;v(u)&&(c=u);let d=this.get("positionY"),p=l.y;v(d)&&(p=d),this.setPrivate("positionX",c),this.setPrivate("positionY",p);let f=this._getPoint(c,p);if(n=f.x,o=f.y,r.xAxes.each(g=>{g._handleCursorPosition(c,h),s&&g.handleCursorShow()}),r.yAxes.each(g=>{g._handleCursorPosition(p,h),s&&g.handleCursorShow()}),!t){r._handleCursorPosition();let g="cursormoved";this.events.isEnabled(g)&&this.events.dispatch(g,{type:g,target:this,point:e,originalEvent:i})}this._updateLines(n,o),r.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);let n="cursorhidden";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this})}this._downPoint&&this.get("behavior")!="none"&&this._updateSelection(a)}_getPoint(e,t){return{x:this.width()*e,y:this.height()*t}}_updateLines(e,t){this._tooltipX||this.lineX.set("x",e),this._tooltipY||this.lineY.set("y",t),this._drawLines()}_updateSelection(e){let t=this.selection,i=this.get("behavior"),s=this.width(),a=this.height();e.x<0&&(e.x=0),e.x>s&&(e.x=s),e.y<0&&(e.y=0),e.y>a&&(e.y=a),t.set("draw",r=>{let n=this._downPoint;n&&(i==="zoomXY"||i==="selectXY"?(r.moveTo(n.x,n.y),r.lineTo(n.x,e.y),r.lineTo(e.x,e.y),r.lineTo(e.x,n.y),r.lineTo(n.x,n.y)):i==="zoomX"||i==="selectX"?(r.moveTo(n.x,0),r.lineTo(n.x,a),r.lineTo(e.x,a),r.lineTo(e.x,0),r.lineTo(n.x,0)):(i==="zoomY"||i==="selectY")&&(r.moveTo(0,n.y),r.lineTo(s,n.y),r.lineTo(s,e.y),r.lineTo(0,e.y),r.lineTo(0,n.y)))})}_onHide(){if(this.isHidden()){let e=this.chart;e&&(e.xAxes.each(t=>{t.handleCursorHide()}),e.yAxes.each(t=>{t.handleCursorHide()}),e.series.each(t=>{t.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let e=this.chart;e&&(e.xAxes.each(t=>{t.handleCursorShow()}),e.yAxes.each(t=>{t.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}};Object.defineProperty(Ue,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYCursor"});Object.defineProperty(Ue,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:G.classNames.concat([Ue.className])});function ui(T,e){return T==null?e:e==null?T:e<T?e:T}function ci(T,e){return T==null?e:e==null||T>e?T:e}var le=class extends Pt{constructor(){super(...arguments),Object.defineProperty(this,"_xField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_axesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_stackDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataSets",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_mainContainerMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_bullets",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"mainContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{}))}),Object.defineProperty(this,"axisRanges",{enumerable:!0,configurable:!0,writable:!0,value:new ut}),Object.defineProperty(this,"_skipped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_couldStackTo",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_reallyStackedTo",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_stackedSeries",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_aLocationX0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_aLocationX1",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_aLocationY0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_aLocationY1",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_showBullets",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueX","openValueX","lowValueX","highValueX"]}),Object.defineProperty(this,"valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueY","openValueY","lowValueY","highValueY"]}),Object.defineProperty(this,"_valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_emptyDataItem",{enumerable:!0,configurable:!0,writable:!0,value:new K(this,void 0,{})}),Object.defineProperty(this,"_dataSetId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipFieldX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipFieldY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_posXDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_posYDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high"),super._afterNew(),this.set("maskContent",!0),this._disposers.push(this.axisRanges.events.onAll(e=>{if(e.type==="clear")D(e.oldValues,t=>{this._removeAxisRange(t)});else if(e.type==="push")this._processAxisRange(e.newValue);else if(e.type==="setIndex")this._processAxisRange(e.newValue);else if(e.type==="insertIndex")this._processAxisRange(e.newValue);else if(e.type==="removeIndex")this._removeAxisRange(e.oldValue);else if(e.type==="moveIndex")this._processAxisRange(e.value);else throw new Error("Unknown IStreamEvent type")})),this.states.create("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames()}_processAxisRange(e){let t=G.new(this._root,{});e.container=t,this.children.push(t),e.series=this;let i=e.axisDataItem;i.setRaw("isRange",!0);let s=i.component;if(s){s._processAxisRange(i,["range","series"]);let a=i.get("bullet");if(a){let n=a.get("sprite");n&&n.setPrivate("visible",!1)}let r=i.get("axisFill");r&&t.set("mask",r),s._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),xe(this._dataSets,(e,t)=>{D(t,i=>{i.dispose()}),t.length=0})}_removeAxisRange(e){let t=e.axisDataItem,i=t.component;t.dispose(),Le(i._seriesAxisRanges,t);let s=e.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&D(this.valueXFields,e=>{if(this.get(e+"Field")){this._valueXFields.push(e);let i=this.get(e+"Show");this.__valueXShowFields.push(i),i.indexOf("Working")!=-1?this._valueXShowFields.push(i.split("Working")[0]):this._valueXShowFields.push(i)}}),this.valueYFields&&D(this.valueYFields,e=>{if(this.get(e+"Field")){this._valueYFields.push(e);let i=this.get(e+"Show");this.__valueYShowFields.push(i),i.indexOf("Working")!=-1?this._valueYShowFields.push(i.split("Working")[0]):this._valueYShowFields.push(i)}})}_dispose(){super._dispose(),this._bullets={};let e=this.chart;e&&e.series.removeValue(this),gt(this.get("xAxis").series,this),gt(this.get("yAxis").series,this)}_min(e,t){let i=ui(this.getPrivate(e),t);this.setPrivate(e,i)}_max(e,t){let i=ci(this.getPrivate(e),t);this.setPrivate(e,i)}_shouldMakeBullet(e){let t=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!t.inited||!i.inited)return!1;let a=this.get("minBulletDistance",0);if(a>0){let r=this.startIndex(),o=this.endIndex()-r;if(t==s){if(t.get("renderer").axisLength()/o<a/5)return!1}else if(i==s&&i.get("renderer").axisLength()/o<a/5)return!1}return e.get(this._xField)!=null&&e.get(this._yField)!=null}_makeFieldNames(){let e=this.get("xAxis"),t=this.get("yAxis"),i=e.getPrivate("name"),s=pt(i),a=t.getPrivate("name"),r=pt(a),n=e.get("renderer").getPrivate("letter"),o=t.get("renderer").getPrivate("letter"),l="open",h="low",u="high",c="Show";e.className==="ValueAxis"?(this._xField=this.get(i+n+c),this._xOpenField=this.get(l+s+n+c),this._xLowField=this.get(h+s+n+c),this._xHighField=this.get(u+s+n+c)):(this._xField=i+n,this._xOpenField=l+s+n,this._xLowField=h+s+n,this._xHighField=u+s+n),t.className==="ValueAxis"?(this._yField=this.get(a+o+c),this._yOpenField=this.get(l+r+o+c),this._yLowField=this.get(h+r+o+c),this._yHighField=this.get(u+r+o+c)):(this._yField=a+o,this._yOpenField=l+r+o,this._yLowField=h+r+o,this._yHighField=u+r+o)}_fixVC(){let e=this.get("xAxis"),t=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),a=this.get("sequencedInterpolation");if(s){let r=0;a&&(r=.999999999999),e===i?s.set("vcy",r):(t===i||s.set("vcy",r),s.set("vcx",r))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){let e=this.get("xAxis"),t=this.get("yAxis");this.set("x",e.x()-Fe(e.get("centerX",0),e.width())-e.parent.get("paddingLeft",0)),this.set("y",t.y()-Fe(t.get("centerY",0),t.height())-t.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_prepareChildren(){super._prepareChildren(),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirty=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),this.set("width",this.get("xAxis").width()),this.set("height",this.get("yAxis").height()),this._handleMaskBullets();let e=this.get("xAxis"),t=this.get("yAxis"),i=this.get("baseAxis"),s=this.get("tooltipPositionX"),a;switch(s){case"open":a=this._xOpenField;break;case"low":a=this._xLowField;break;case"high":a=this._xHighField;break;default:a=this._xField}this._tooltipFieldX=a;let r=this.get("tooltipPositionY"),n;switch(r){case"open":n=this._yOpenField;break;case"low":n=this._yLowField;break;case"high":n=this._yHighField;break;default:n=this._yField}this._tooltipFieldY=n,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();let o=this.get("stacked");if(this.isDirty("stacked")&&(o?this._valuesDirty&&!this._dataProcessed||this._stack():this._unstack()),this._valuesDirty&&!this._dataProcessed&&(this._dataProcessed=!0,o&&this._stack(),D(this.dataItems,l=>{D(this._valueXShowFields,h=>{let u=l.get(h);u!=null&&(o&&(u+=this.getStackedXValue(l,h)),this._min("minX",u),this._max("maxX",u))}),D(this._valueYShowFields,h=>{let u=l.get(h);u!=null&&(o&&(u+=this.getStackedYValue(l,h)),this._min("minY",u),this._max("maxY",u))}),e.processSeriesDataItem(l,this._valueXFields),t.processSeriesDataItem(l,this._valueYFields)}),e._seriesValuesDirty=!0,t._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&e.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&t.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)),(this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(e._groupSeriesData(this),t._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty){let l=this.startIndex(),h=this.endIndex(),u=this.get("minBulletDistance",0);if(u>0&&i&&(i.get("renderer").axisLength()/(h-l)>u?this._showBullets=!0:this._showBullets=!1),(this._psi!=l||this._pei!=h||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;let c=this.get("vcx",1),d=this.get("vcy",1),p=this.get("stacked",!1),f=this.getPrivate("outOfSelection");if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),f)t.markDirtySelectionExtremes();else for(let g=l;g<h;g++)this.processYSelectionDataItem(this.dataItems[g],d,p);if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),f)t.markDirtySelectionExtremes();else for(let g=l;g<h;g++)this.processXSelectionDataItem(this.dataItems[g],c,p);if((i===e||!i)&&(this.get("valueYShow")!=="valueYWorking"||this.get("useSelectionExtremes"))){let g=this.getPrivate("selectionMinY");g!=null&&(this.setPrivateRaw("minY",g),t.markDirtyExtremes());let m=this.getPrivate("selectionMaxY");m!=null&&(this.setPrivateRaw("maxY",m),t.markDirtyExtremes())}if((i===t||!i)&&(this.get("valueXShow")!=="valueXWorking"||this.get("useSelectionExtremes"))){let g=this.getPrivate("selectionMinX");g!=null&&(this.setPrivateRaw("minX",g),t.markDirtyExtremes());let m=this.getPrivate("selectionMaxX");m!=null&&(this.setPrivateRaw("maxX",m),e.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&e.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&t.markDirtySelectionExtremes()}}}_makeRangeMask(){if(this.axisRanges.length>0){let e=this._mainContainerMask;e==null&&(e=this.children.push(V.new(this._root,{})),this._mainContainerMask=e,e.set("draw",(t,i)=>{let s=this.parent;if(s){let a=this._root.container.width(),r=this._root.container.height();t.moveTo(-a,-r),t.lineTo(-a,r*2),t.lineTo(a*2,r*2),t.lineTo(a*2,-r),t.lineTo(-a,-r),this.axisRanges.each(n=>{let o=n.axisDataItem.get("axisFill");if(s&&o){let l=o.get("draw");l&&l(t,i)}})}this.mainContainer._display.mask=e._display})),e.markDirty(),e._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren(),this._x=this.x(),this._y=this.y(),this._makeRangeMask()}_stack(){let e=this.chart;if(e){let t=e.series.indexOf(this);if(this._couldStackTo=[],t>0){let i;for(let s=t-1;s>=0&&(i=e.series.getIndex(s),!(i.get("xAxis")===this.get("xAxis")&&i.get("yAxis")===this.get("yAxis")&&i.className===this.className&&(this._couldStackTo.push(i),!i.get("stacked"))));s--);}this._stackDataItems()}}_unstack(){xe(this._reallyStackedTo,(e,t)=>{delete t._stackedSeries[this.uid]}),this._reallyStackedTo={},D(this.dataItems,e=>{e.setRaw("stackToItemY",void 0),e.setRaw("stackToItemX",void 0)})}_handleRemoved(){let e=this.get("xAxis");e&&e._handleSeriesRemoved();let t=this.get("yAxis");t&&t._handleSeriesRemoved()}_stackDataItems(){let e=this.get("baseAxis"),t=this.get("xAxis"),i=this.get("yAxis"),s,a;e===t?(s="valueY",a="stackToItemY"):e===i&&(s="valueX",a="stackToItemX");let r=this._couldStackTo.length,n=0,o=this.get("stackToNegative");this._reallyStackedTo={},D(this.dataItems,l=>{for(let h=0;h<r;h++){let u=this._couldStackTo[h],c=u.dataItems[n],d=l.get(s);if(c){let p=c.get(s);if(o)if(v(d)){if(v(p)){if(h==r-1&&l.setRaw(a,void 0),d>=0&&p>=0){l.setRaw(a,c),this._reallyStackedTo[u.uid]=u,u._stackedSeries[this.uid]=this;break}if(d<0&&p<0){l.setRaw(a,c),this._reallyStackedTo[u.uid]=u,u._stackedSeries[this.uid]=this;break}}}else break;else if(v(d)&&v(p)){l.setRaw(a,c),this._reallyStackedTo[u.uid]=u,u._stackedSeries[this.uid]=this;break}}}n++})}processXSelectionDataItem(e,t,i){D(this.__valueXShowFields,s=>{let a=e.get(s);a!=null&&(i&&(a+=this.getStackedXValueWorking(e,s)),this._min("selectionMinX",a),this._max("selectionMaxX",a*t))})}processYSelectionDataItem(e,t,i){D(this.__valueYShowFields,s=>{let a=e.get(s);a!=null&&(i&&(a+=this.getStackedYValueWorking(e,s)),this._min("selectionMinY",a),this._max("selectionMaxY",a*t))})}getStackedYValueWorking(e,t){let i=e.get("stackToItemY");if(i){let s=i.component;return i.get(t,0)*s.get("vcy",1)+this.getStackedYValueWorking(i,t)}return 0}getStackedXValueWorking(e,t){let i=e.get("stackToItemX");if(i){let s=i.component;return i.get(t,0)*s.get("vcx",1)+this.getStackedXValueWorking(i,t)}return 0}getStackedYValue(e,t){let i=e.get("stackToItemY");return i?i.get(t,0)+this.getStackedYValue(i,t):0}getStackedXValue(e,t){let i=e.get("stackToItemX");return i?i.get(t,0)+this.getStackedXValue(i,t):0}createLegendMarker(e){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem,s=e.get("locationX",i.get("locationX",.5)),a=e.get("locationY",i.get("locationY",.5)),r=this.get("xAxis"),n=this.get("yAxis"),o=this.get("exactLocationX",!1),l=this.get("exactLocationY",!1),h=r.getDataItemPositionX(i,this._xField,s,this.get("vcx",1),o),u=n.getDataItemPositionY(i,this._yField,a,this.get("vcy",1),l),c=this.getPoint(h,u),d=i.get("left",c.x),p=i.get("right",c.x),f=i.get("top",c.y),g=i.get("bottom",c.y),m=0,b=0,x=p-d,_=g-f;if(this._shouldShowBullet(h,u)){t.setPrivate("visible",!e.getPrivate("hidden"));let A=e.get("field"),y=this.get("baseAxis"),M=this.get("xAxis"),w=this.get("yAxis");if(A!=null){let k;y==M?(A=="value"?k=this._yField:A=="open"?k=this._yOpenField:A=="high"?k=this._yHighField:A=="low"&&(k=this._yLowField),k&&(u=w.getDataItemPositionY(i,k,0,this.get("vcy",1),l),c=w.get("renderer").positionToPoint(u),b=c.y,m=d+x*s)):(A=="value"?k=this._xField:A=="open"?k=this._xOpenField:A=="high"?k=this._xHighField:A=="low"&&(k=this._xLowField),k&&(h=M.getDataItemPositionX(i,k,0,this.get("vcx",1),o),c=M.get("renderer").positionToPoint(h),m=c.x,b=g-_*a))}else m=d+x*s,b=g-_*a;let P=e.get("stacked");if(P){let k=this.chart;if(y==M){let I=this._bullets[h+"_"+u];if(I){let S=I.bounds(),C=t.localBounds(),L=b;b=S.top,P=="down"?b=S.bottom-C.top:P=="auto"?k&&(L<k.plotContainer.height()/2?b=S.bottom-C.top:b+=C.bottom):b+=C.bottom}this._bullets[h+"_"+u]=t}else{let I=this._bullets[h+"_"+u];if(I){let S=I.bounds(),C=t.localBounds(),L=m;m=S.right,P=="down"?m=S.left-C.right:P=="auto"?k&&(L<k.plotContainer.width()/2?m=S.left-C.right:m-=C.left):m-=C.left}this._bullets[h+"_"+u]=t}}t.isType("Label")&&(t.setPrivate("maxWidth",Math.abs(x)),t.setPrivate("maxHeight",Math.abs(_))),t.setAll({x:m,y:b})}else t.setPrivate("visible",!1)}}_shouldShowBullet(e,t){return this._showBullets}setDataSet(e){if(this._dataSets[e]){this._handleDataSetChange(),this._dataItems=this._dataSets[e],this._markDataSetDirty(),this._dataSetId=e;let t="datasetchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,id:e})}}resetGrouping(){xe(this._dataSets,(e,t)=>{t!=this._mainDataItems&&D(t,i=>{i.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){D(this._dataItems,e=>{let t=e.bullets;t&&D(t,i=>{if(i){let s=i.get("sprite");s&&s.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return Me(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(t.show.call(this,e).then(()=>{this._isShowing=!1;let s=this.get("xAxis"),a=this.get("yAxis"),r=this.get("baseAxis");a!==r&&a.markDirtySelectionExtremes(),s!==r&&s.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(e)),i.push(this._sequencedShowHide(!0,e)),yield Promise.all(i)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return Me(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(t.hide.call(this,e).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(e)),i.push(this._sequencedShowHide(!1,e)),yield Promise.all(i)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,e,t)];v(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing");D(this._valueFields,r=>{s.push(e.animate({key:r+"Working",to:e.get(r),duration:t,easing:a}).waitForStop())}),yield Promise.all(s)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,e,t)],a=this.states.lookup("hidden");a||(a=this.states.create("hidden",{})),v(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let r=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),n=this.get("xAxis"),o=this.get("yAxis"),l=this.get("baseAxis"),h=this.get("stacked");if((l===n||!l)&&D(this._valueYFields,u=>{let c=o.getPrivate("min"),d=o.baseValue();v(c)&&c>d&&(d=c),h&&(d=0),e.get(u)!=null&&s.push(e.animate({key:u+"Working",to:d,duration:t,easing:r}).waitForStop())}),l===o||!l){let u=n.getPrivate("min"),c=n.baseValue();v(u)&&u>c&&(c=u),h&&(c=0),D(this._valueXFields,d=>{e.get(d)!=null&&s.push(e.animate({key:d+"Working",to:c,duration:t,easing:r}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){let e=this._stackedSeries;e&&xe(e,(t,i)=>{i._stackDirty||i._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(e){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(e),this.updateLegendValue(e));let t=this.get("tooltip"),i=this.get("exactLocationX",!1),s=this.get("exactLocationY",!1);if(t)if(!this.isHidden()&&this.get("visible")){if(t._setDataItem(e),e){let a=this.get("locationX",0),r=this.get("locationY",1),n=e.get("locationX",a),o=e.get("locationY",r),l=this.get("xAxis"),h=this.get("yAxis"),u=this.get("vcx",1),c=this.get("vcy",1),d=l.getDataItemPositionX(e,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*n,u,i),p=h.getDataItemPositionY(e,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*o,c,s),f=this.getPoint(d,p),g=!0;if(D(this._valueFields,m=>{e.get(m)==null&&(g=!1)}),g){let m=this.chart;m&&m.inPlot(f)?(t.label.text.markDirtyText(),t.set("tooltipTarget",this._getTooltipTarget(e)),t.set("pointTo",this._display.toGlobal({x:f.x,y:f.y}))):t._setDataItem(void 0)}else t._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){let e=this.get("tooltip");return e&&e.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(e){if(this.get("seriesTooltipTarget")=="bullet"){let t=e.bullets;if(t&&t.length>0){let s=t[0].get("sprite");if(s)return s}}return this}updateLegendValue(e){let t=this.get("legendDataItem");if(t){let i=t.get("label");if(i){let a="";e?(i._setDataItem(e),a=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),a=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",a)}let s=t.get("valueLabel");if(s){let a="";e?(s._setDataItem(e),a=this.get("legendValueText",s.get("text",""))):(s._setDataItem(this._emptyDataItem),a=this.get("legendRangeValueText",s.get("text",""))),s.set("text",a)}}}_getItemReaderLabel(){let e="X: {"+this._xField;return this.get("xAxis").isType("DateAxis")&&(e+=".formatDate()"),e+="}; Y: {"+this._yField,this.get("yAxis").isType("DateAxis")&&(e+=".formatDate()"),e+="}",e}getPoint(e,t){let i=this.get("xAxis").get("renderer").positionToCoordinate(e),s=this.get("yAxis").get("renderer").positionToCoordinate(t),a=999999999;return s<-a&&(s=-a),s>a&&(s=a),i<-a&&(i=-a),i>a&&(i=a),{x:i,y:s}}_shouldInclude(e){return!0}handleCursorHide(){this.hideTooltip(),this.updateLegendValue(void 0),this.updateLegendMarker(void 0)}_afterDataChange(){super._afterDataChange(),this.get("xAxis")._markDirtyKey("start"),this.get("yAxis")._markDirtyKey("start"),this.resetExtremes()}resetExtremes(){this.setPrivate("selectionMinX",void 0),this.setPrivate("selectionMaxX",void 0),this.setPrivate("selectionMinY",void 0),this.setPrivate("selectionMaxY",void 0),this.setPrivate("minX",void 0),this.setPrivate("minY",void 0),this.setPrivate("maxX",void 0),this.setPrivate("maxY",void 0)}createAxisRange(e){return this.axisRanges.push({axisDataItem:e})}get mainDataItems(){return this._mainDataItems}_adjustStartIndex(e){let t=this.get("xAxis");if(this.get("baseAxis")==t&&t.isType("DateAxis")){let s=t.baseDuration(),a=t.getPrivate("selectionMin",t.getPrivate("min",0)),r=s*this.get("locationX",.5),n=-1/0;for(;n<a;){let o=this.dataItems[e];if(o){let l=o.open;if(l?n=l.valueX:n=o.get("valueX",0),n+=r,n<a)e++;else break}else break}}return e}};Object.defineProperty(le,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYSeries"});Object.defineProperty(le,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Pt.classNames.concat([le.className])});var _e=class T extends le{constructor(){super(...arguments),Object.defineProperty(this,"_ph",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_pw",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_columnsUpdated",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_makeGraphics(e,t){return this.makeColumn(t,e)}_makeFieldNames(){super._makeFieldNames();let e=this.get("xAxis"),t=this.get("yAxis"),i="CategoryAxis",s="ValueAxis";e.isType(i)&&(this.get("openCategoryXField")||(this._xOpenField=this._xField)),e.isType(s)&&(this.get("openValueXField")||(this._xOpenField=this._xField)),t.isType(i)&&(this.get("openCategoryYField")||(this._yOpenField=this._yField)),t.isType(s)&&(this.get("openValueYField")||(this._yOpenField=this._yField))}_prepareChildren(){super._prepareChildren();let e=this.get("xAxis"),t=this.get("yAxis"),i=this.dataItems.length,s=Math.max(0,this.startIndex()-2),a=Math.min(this.endIndex()+2,i-1);if(e.inited&&t.inited)for(let r=s;r<=a;r++){let n=this.dataItems[r];this._createGraphics(n)}}_updateChildren(){let e=this.chart;e&&(this._ph=e.plotContainer.height(),this._pw=e.plotContainer.width());let t=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis"),a=this.columns.template;this.isDirty("fill")&&a.get("fill")==null&&a.set("fill",this.get("fill")),this.isDirty("fillPattern")&&a.get("fillPattern")==null&&a.set("fillPattern",this.get("fillPattern")),this.isDirty("stroke")&&a.get("stroke")==null&&a.set("stroke",this.get("stroke"));let r=0,n=0,o=0;D(s.series,m=>{if(m instanceof T){let b=m.get("stacked");b&&o==0&&n++,!b&&m.get("clustered")&&n++}m===this&&(r=n-1),o++}),this.get("clustered")||(r=0,n=1),n===0&&(n=1,r=0);let l=t.get("renderer"),h=i.get("renderer"),u="cellStartLocation",c="cellEndLocation",d=l.get(u,0),p=l.get(c,1),f=h.get(u,0),g=h.get(c,1);if(this._aLocationX0=d+r/n*(p-d),this._aLocationX1=d+(r+1)/n*(p-d),this._aLocationY0=f+r/n*(g-f),this._aLocationY1=f+(r+1)/n*(g-f),t.inited&&i.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty){let m=this.dataItems.length,b=Math.max(0,this.startIndex()-2),x=Math.min(this.endIndex()+2,m-1);for(let y=0;y<b;y++)this._toggleColumn(this.dataItems[y],!1);let _=this.dataItems[b];for(let y=b;y<=x;y++){let M=this.dataItems[y];if(M.get("valueX")!=null&&M.get("valueY")!=null){if(_=M,y>0&&b>0)for(let w=y-1;w>=0;w--){let P=this.dataItems[w];if(P.get("valueX")!=null&&P.get("valueY")!=null){_=P;break}}break}else this._toggleColumn(M,!1)}this._beforeColumnsDraw();let A=0;i.isType("CategoryAxis")&&t.isType("CategoryAxis")?A=2:t===s?A=0:i===s&&(A=1);for(let y=b;y<=x;y++){let M=this.dataItems[y];this._updateGraphics(M,_,A),M.get("valueX")!=null&&M.get("valueY")!=null&&(_=M)}this._afterColumnsDraw();for(let y=x+1;y<m;y++)this._toggleColumn(this.dataItems[y],!1);this._columnsUpdated=!0}}else this._skipped=!0;this.getPrivate("doNotUpdateLegend")||this.updateLegendMarker(this.get("tooltipDataItem")),super._updateChildren()}_afterChanged(){super._afterChanged(),this._columnsUpdated=!1}_beforeColumnsDraw(){}_afterColumnsDraw(){}_createGraphics(e){let t=e.get("graphics");if(!t){t=this._makeGraphics(this.columns,e),e.set("graphics",t),t._setDataItem(e);let i=e.get("legendDataItem");if(i){let a=i.get("markerRectangle");if(a){let r=a.states.lookup("default");D(_t,n=>{let o=t.get(n,this.get(n));a.set(n,o),r.set(n,o)})}}let s=e.get("rangeGraphics");s&&D(s,a=>{a.dispose()}),s=[],e.setRaw("rangeGraphics",s),this.axisRanges.each(a=>{let r=a.container,n=this._makeGraphics(a.columns,e);s&&s.push(n),n.setPrivate("list",a.columns),r.children.push(n)})}}createAxisRange(e){return D(this.dataItems,t=>{let i=t.get("graphics");i&&(i.dispose(),t.set("graphics",void 0))}),super.createAxisRange(e)}_updateGraphics(e,t,i){let s=e.get("graphics"),a=this._xField,r=this._yField,n=e.get(a),o=e.get(r),l=this.get("exactLocationX",!1);if(n!=null&&o!=null){let h=this._xOpenField,u=this._yOpenField,c=this.get("locationX",e.get("locationX",.5)),d=this.get("locationY",e.get("locationY",.5)),p=this.get("openLocationX",e.get("openLocationX",c)),f=this.get("openLocationY",e.get("openLocationY",d)),g=s.get("width"),m=s.get("height"),b=this.get("stacked"),x=this.get("xAxis"),_=this.get("yAxis"),A=x.get("start"),y=x.get("end"),M=_.get("start"),w=_.get("end"),P,k,I,S,C=this.get("vcy",1),L=this.get("vcx",1),E=!1,U=!1;if(i==0){let X=this._aLocationX0+p-.5,$=this._aLocationX1+c-.5;if(g instanceof ke){let j=($-X)*(1-g.value)/2;X+=j,$-=j}if(P=x.getDataItemPositionX(e,h,X,L,l),k=x.getDataItemPositionX(e,a,$,L,l),I=_.getDataItemPositionY(e,r,d,C),this._yOpenField!==this._yField)S=_.getDataItemPositionY(e,u,f,C);else if(b){let j=e.get("stackToItemY");j?S=_.getDataItemPositionY(j,r,f,j.component.get("vcy")):S=_.basePosition()}else S=_.basePosition();e.setRaw("point",{x:P+(k-P)/2,y:I}),U=!0}else if(i==1){let X=this._aLocationY0+f-.5,$=this._aLocationY1+d-.5;if(m instanceof ke){let j=($-X)*(1-m.value)/2;X+=j,$-=j}if(I=_.getDataItemPositionY(e,u,X,C),S=_.getDataItemPositionY(e,r,$,C),k=x.getDataItemPositionX(e,a,c,L,l),this._xOpenField!==this._xField)P=x.getDataItemPositionX(e,h,p,L,l);else if(b){let j=e.get("stackToItemX");j?P=x.getDataItemPositionX(j,a,p,j.component.get("vcx"),l):P=x.basePosition()}else P=x.basePosition();E=!0,e.setRaw("point",{x:k,y:I+(S-I)/2})}else if(i==2){let X=this._aLocationX0+p-.5,$=this._aLocationX1+c-.5;if(g instanceof ke){let j=($-X)*(1-g.value)/2;X+=j,$-=j}if(P=x.getDataItemPositionX(e,h,X,L),k=x.getDataItemPositionX(e,a,$,L),X=this._aLocationY0+f-.5,$=this._aLocationY1+d-.5,m instanceof ke){let j=($-X)*(1-m.value)/2;X+=j,$-=j}I=_.getDataItemPositionY(e,u,X,C),S=_.getDataItemPositionY(e,r,$,C),e.setRaw("point",{x:P+(k-P)/2,y:I+(S-I)/2})}this._applyGraphicsStates(e,t),this._updateSeriesGraphics(e,s,P,k,I,S,E,U),P<A&&k<A||P>y&&k>y||I<M&&S<=M||I>=w&&S>w||ae(P)||ae(I)?this._toggleColumn(e,!1):this._toggleColumn(e,!0);let te=e.get("rangeGraphics");te&&D(te,X=>{this._updateSeriesGraphics(e,X,P,k,I,S,E,U)})}else this._toggleColumn(e,!1)}_updateSeriesGraphics(e,t,i,s,a,r,n,o){let l=t.get("width"),h=t.get("height"),u=t.get("maxWidth"),c=t.get("maxHeight"),d=this.getPoint(i,a),p=this.getPoint(s,r),f=e.get("point");if(f){let g=this.getPoint(f.x,f.y);f.x=g.x+this._x,f.y=g.y+this._y}if(i=d.x,s=p.x,a=d.y,r=p.y,v(l)){let g=(s-i-l)/2;i+=g,s-=g}if(v(u)&&u<Math.abs(s-i)){let g=(s-i-u)/2;i+=g,s-=g}if(v(h)){let g=(r-a-h)/2;a+=g,r-=g}if(v(c)&&c<Math.abs(r-a)){let g=(r-a-c)/2;a+=g,r-=g}this.get("adjustBulletPosition")&&(n&&(s=Math.min(Math.max(0,s),this._pw),i=Math.min(Math.max(0,i),this._pw)),o&&(a=Math.min(Math.max(0,a),this._ph),r=Math.min(Math.max(0,r),this._ph))),e.setRaw("left",i),e.setRaw("right",s),e.setRaw("top",a),e.setRaw("bottom",r),t.setPrivate("width",s-i),t.setPrivate("height",r-a),t.set("x",i),t.set("y",r-(r-a))}_handleDataSetChange(){super._handleDataSetChange(),D(this._dataItems,e=>{this._toggleColumn(e,!1)})}_applyGraphicsStates(e,t){let i=e.get("graphics"),s=i.states.lookup("dropFromOpen"),a=i.states.lookup("riseFromOpen"),r=i.states.lookup("dropFromPrevious"),n=i.states.lookup("riseFromPrevious");if(s||r||a||n){let o=this.get("xAxis"),l=this.get("yAxis"),h=this.get("baseAxis"),u,c,d;h===o&&l.isType("ValueAxis")?(u=e.get(this._yOpenField),c=e.get(this._yField),d=t.get(this._yField)):h===l&&o.isType("ValueAxis")&&(u=e.get(this._xOpenField),c=e.get(this._xField),d=t.get(this._xField)),v(u)&&v(c)&&(c<u?s&&s.apply():a&&a.apply(),v(d)&&(c<d?r&&r.apply():n&&n.apply()))}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("graphics");t&&(this.columns.removeValue(t),t.dispose());let i=e.get("rangeGraphics");i&&D(i,s=>{let a=s.getPrivate("list");a&&a.removeValue(s),s.dispose()})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,e,t)],a=e.get("graphics");a&&s.push(a.hide(t));let r=e.get("rangeGraphics");r&&D(r,n=>{s.push(n.hide(t))}),yield Promise.all(s)})}_toggleColumn(e,t){let i=e.get("graphics");i&&i.setPrivate("visible",t);let s=e.get("rangeGraphics");s&&D(s,r=>{r.setPrivate("visible",t)});let a=e.bullets;a&&D(a,r=>{r.setPrivate("hidden",!t)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return Me(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,e,t)],a=e.get("graphics");a&&s.push(a.show(t));let r=e.get("rangeGraphics");r&&D(r,n=>{s.push(n.show(t))}),yield Promise.all(s)})}updateLegendMarker(e){let t=this.get("legendDataItem");if(this.get("useLastColorForLegendMarker")&&!e){let i=this.dataItems[this.endIndex()-1];i&&(e=i)}if(t){let i=this.columns.template;if(e){let a=e.get("graphics");a&&(i=a)}let s=t.get("markerRectangle");if(s&&!t.get("itemContainer").get("disabled")){let a=s.states.lookup("default");D(_t,r=>{let n=i.get(r,this.get(r));s.set(r,n),a.set(r,n)})}}}_getTooltipTarget(e){if(this.get("seriesTooltipTarget")=="bullet")return super._getTooltipTarget(e);let t=e.get("graphics");return t||this}};Object.defineProperty(_e,"className",{enumerable:!0,configurable:!0,writable:!0,value:"BaseColumnSeries"});Object.defineProperty(_e,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:le.classNames.concat([_e.className])});var he=class extends yt{constructor(){super(...arguments),Object.defineProperty(this,"_series",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_isPanning",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"minorDataItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"labelsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{}))}),Object.defineProperty(this,"gridContainer",{enumerable:!0,configurable:!0,writable:!0,value:G.new(this._root,{width:O,height:O})}),Object.defineProperty(this,"topGridContainer",{enumerable:!0,configurable:!0,writable:!0,value:G.new(this._root,{width:O,height:O})}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{isMeasured:!1,width:O,height:O,position:"absolute"}))}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rangesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_panStart",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_panEnd",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_sAnimation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_eAnimation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_skipSync",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"axisRanges",{enumerable:!0,configurable:!0,writable:!0,value:new ut}),Object.defineProperty(this,"_seriesAxisRanges",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"ghostLabel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cursorPosition",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"_snapToSeries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_seriesValuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_seriesAdded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"axisHeader",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(G.new(this._root,{themeTags:["axis","header"],position:"absolute",background:pe.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})}))}),Object.defineProperty(this,"_bullets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_dispose(){this.gridContainer.dispose(),this.topGridContainer.dispose(),this.bulletsContainer.dispose(),this.labelsContainer.dispose(),this.axisHeader.dispose(),super._dispose()}_afterNew(){super._afterNew(),this.setPrivate("updateScrollbar",!0),this._disposers.push(this.axisRanges.events.onAll(t=>{if(t.type==="clear")D(t.oldValues,i=>{i.dispose()});else if(t.type==="push")this._processAxisRange(t.newValue,["range"]);else if(t.type==="setIndex")this._processAxisRange(t.newValue,["range"]);else if(t.type==="insertIndex")this._processAxisRange(t.newValue,["range"]);else if(t.type==="removeIndex")this.disposeDataItem(t.oldValue);else if(t.type==="moveIndex")this._processAxisRange(t.value,["range"]);else throw new Error("Unknown IStreamEvent type")}));let e=this.get("renderer");e&&(e.axis=this,e.processAxis()),this.children.push(e),this._createGhostLabel()}_createGhostLabel(){let t=this.get("renderer").makeLabel(new K(this,void 0,{}),[]);t.adapters.disable("text"),t.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),t.events.disable(),this.ghostLabel=t}_updateFinals(e,t){}zoom(e,t,i,s){if(this.get("zoomable",!0))if(this._updateFinals(e,t),this.get("start")!==e||this.get("end")!=t){let a=this._sAnimation,r=this._eAnimation;e>t&&([e,t]=[t,e]);let n=this.get("maxDeviation",.5)*Math.min(1,t-e);e<-n&&(e=-n),t>1+n&&(t=1+n);let o=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),l=o;v(i)||(i=this.get("interpolationDuration",0)),s||(s="end"),t===1&&e!==0&&(e<this.get("start",0)?s="start":s="end"),e===0&&t!==1&&(t>this.get("end",1)?s="end":s="start");let h=this.get("minZoomCount",0),u=this.dataItems;u&&u.length<h&&(h=u.length);let c=this.get("maxZoomCount",1/0);v(h)&&(o=l/h);let d=1;if(v(c)&&(d=l/c),e>t&&([e,t]=[t,e]),s==="start"?(c>0&&1/(t-e)<d&&(t=e+1/d),1/(t-e)>o&&(t=e+1/o),t>1&&t-e<1/o&&(e=t-1/o)):(c>0&&1/(t-e)<d&&(e=t-1/d),1/(t-e)>o&&(e=t-1/o),e<0&&t-e<1/o&&(t=e+1/o)),1/(t-e)>o&&(t=e+1/o),1/(t-e)>o&&(e=t-1/o),c!=null&&h!=null&&e==this.get("start")&&t==this.get("end")){let p=this.chart;p&&p._handleAxisSelection(this,!0)}if((a&&a.playing&&a.to==e||this.get("start")==e)&&(r&&r.playing&&r.to==t||this.get("end")==t))return;if(i>0){let p=this.get("interpolationEasing"),f,g;if(this.get("start")!=e&&(f=this.animate({key:"start",to:e,duration:i,easing:p})),this.get("end")!=t&&(g=this.animate({key:"end",to:t,duration:i,easing:p})),this._sAnimation=f,this._eAnimation=g,f)return f;if(g)return g}else this.set("start",e),this.set("end",t),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}get series(){return this._series}_processAxisRange(e,t){e.setRaw("isRange",!0),this._createAssets(e,t),this._rangesDirty=!0,this._prepareDataItem(e);let i=e.get("above"),s=this.topGridContainer,a=e.get("grid");i&&a&&s.children.moveValue(a);let r=e.get("axisFill");i&&r&&s.children.moveValue(r)}_prepareDataItem(e,t){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(e=>{this._prepareDataItem(e)}),D(this._seriesAxisRanges,e=>{this._prepareDataItem(e)})}_prepareChildren(){super._prepareChildren();let e=this.ghostLabel;if(e&&(this.get("fixAxisSize")?e.set("visible",!0):e.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){let i=this.chart;i&&i._updateCursor();let s=this.get("start",0),a=this.get("end",1),r=this.get("maxDeviation",.5)*Math.min(1,a-s);if(s<-r){let n=s+r;s=-r,this.setRaw("start",s),this.isDirty("end")&&this.setRaw("end",a-n)}if(a>1+r){let n=a-1-r;a=1+r,this.setRaw("end",a),this.isDirty("start")&&this.setRaw("start",s-n)}}let t=this.get("renderer");if(t._start=this.get("start"),t._end=this.get("end"),t._inversed=t.get("inversed",!1),t._axisLength=t.axisLength()/(t._end-t._start),t._updateLC(),this.isDirty("tooltip")){let i=this.get("tooltip");if(i){let s=t.get("themeTags");i.addTag("axis"),i.addTag(this.className.toLowerCase()),i._applyThemes(),s&&(i.set("themeTags",F(i.get("themeTags"),s)),i.label._applyThemes())}}}_updateTooltipBounds(){let e=this.get("tooltip");e&&this.get("renderer").updateTooltipBounds(e)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(e){this.chart=e;let t=this.get("renderer");t.chart=e,e.gridContainer.children.push(this.gridContainer),e.topGridContainer.children.push(this.topGridContainer),e.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{e._handleAxisSelection(this)}),this.on("end",()=>{e._handleAxisSelection(this)}),e.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),e.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),e.processAxis(this)}hideDataItem(e){return this._toggleFHDataItem(e,!0),super.hideDataItem(e)}showDataItem(e){return this._toggleFHDataItem(e,!1),super.showDataItem(e)}_toggleFHDataItem(e,t){let i="forceHidden",s=e.get("label");s&&s.set(i,t);let a=e.get("grid");a&&a.set(i,t);let r=e.get("tick");r&&r.set(i,t);let n=e.get("axisFill");n&&n.set(i,t);let o=e.get("bullet");if(o){let l=o.get("sprite");l&&l.set(i,t)}}_toggleDataItem(e,t){let i=e.get("label"),s="visible";i&&i.setPrivate(s,t);let a=e.get("grid");a&&a.setPrivate(s,t);let r=e.get("tick");r&&r.setPrivate(s,t);let n=e.get("axisFill");n&&n.setPrivate(s,t);let o=e.get("bullet");if(o){let l=o.get("sprite");l&&l.setPrivate(s,t)}}_createAssets(e,t,i){var s,a,r;let n=this.get("renderer"),o="minor",l=e.get("label");if(!l)n.makeLabel(e,t);else{let c=l.get("themeTags"),d=!1;i?c?.indexOf(o)==-1&&(d=!0):c?.indexOf(o)!=-1&&(d=!0),d&&((s=l.parent)===null||s===void 0||s.children.removeValue(l),n.makeLabel(e,t),l.dispose(),n.labels.removeValue(l))}let h=e.get("grid");if(!h)n.makeGrid(e,t);else{let c=h.get("themeTags"),d=!1;i?c?.indexOf(o)==-1&&(d=!0):c?.indexOf(o)!=-1&&(d=!0),d&&((a=h.parent)===null||a===void 0||a.children.removeValue(h),n.makeGrid(e,t),h.dispose(),n.grid.removeValue(h))}let u=e.get("tick");if(!u)n.makeTick(e,t);else{let c=!1,d=u.get("themeTags");i?d?.indexOf(o)==-1&&(c=!0):d?.indexOf(o)!=-1&&(c=!0),c&&((r=u.parent)===null||r===void 0||r.children.removeValue(u),n.makeTick(e,t),u.dispose(),n.ticks.removeValue(u))}(!i&&!e.get("axisFill")||i&&!e.get("axisFill")&&this.get("minorAxisFillsEnabled"))&&n.makeAxisFill(e,t),this._processBullet(e)}_processBullet(e){let t=e.get("bullet"),i=this.get("bullet");if(!t&&i&&!e.get("isRange")&&(t=i(this._root,this,e)),t){t.axis=this;let s=t.get("sprite");s&&(s._setDataItem(e),e.setRaw("bullet",t),s.parent||this.bulletsContainer.children.push(s))}}_afterChanged(){super._afterChanged();let e=this.chart;e&&(e._updateChartLayout(),e.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(e){super.disposeDataItem(e);let t=this.get("renderer"),i=e.get("label");i&&(t.labels.removeValue(i),i.dispose());let s=e.get("tick");s&&(t.ticks.removeValue(s),s.dispose());let a=e.get("grid");a&&(t.grid.removeValue(a),a.dispose());let r=e.get("axisFill");r&&(t.axisFills.removeValue(r),r.dispose());let n=e.get("bullet");n&&n.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());let e=this.ghostLabel;if(e){if(!e.isHidden()){let s=e.localBounds(),a=Math.ceil(s.right-s.left),r=e.get("text");D(this.dataItems,n=>{let o=n.get("label");if(o&&!o.isHidden()){let l=o.localBounds();Math.ceil(l.right-l.left)>a&&(r=o.text._getText())}}),e.set("text",r)}let t=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(e,t+(i-t)*.5)}}_handleCursorPosition(e,t){e=this.get("renderer").toAxisPosition(e),this._cursorPosition=e,this._snapToSeries=t,this.updateTooltip()}updateTooltip(){let e=this._snapToSeries,t=this._cursorPosition,i=this.get("tooltip"),s=this.get("renderer");v(t)&&(D(this.series,a=>{if(a.get("baseAxis")===this){let r=this.getSeriesItem(a,t,this.get("tooltipLocation"));e&&e.indexOf(a)!=-1?(a.updateLegendMarker(r),a.updateLegendValue(r),a._settings.tooltipDataItem=r):(a.showDataItemTooltip(r),a.setRaw("tooltipDataItem",r))}}),this.get("snapTooltip")&&(t=this.roundAxisPosition(t,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",t),i&&(s.updateTooltipBounds(i),ae(t)?i.hide(0):(this._updateTooltipText(i,t),s.positionTooltip(i,t),t<this.get("start",0)||t>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(e,t){e.label.set("text",this.getTooltipText(t))}roundAxisPosition(e,t){return e}_handleSeriesRemoved(){}handleCursorShow(){let e=this.get("tooltip");e&&e.show()}handleCursorHide(){let e=this.get("tooltip");e&&e.hide()}processSeriesDataItem(e,t){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(e){let t=this.get("renderer");return t.toAxisPosition(e/t.axisLength())}toAxisPosition(e){return this.get("renderer").toAxisPosition(e)}toGlobalPosition(e){return this.get("renderer").toGlobalPosition(e)}fixPosition(e){return this.get("renderer").fixPosition(e)}shouldGap(e,t,i,s){return!1}createAxisRange(e){return this.axisRanges.push(e)}_groupSeriesData(e){}getCellWidthPosition(){return .05}};Object.defineProperty(he,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Axis"});Object.defineProperty(he,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:yt.classNames.concat([he.className])});var se=class extends he{constructor(){super(...arguments),Object.defineProperty(this,"_dirtyExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dirtySelectionExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dseHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_deltaMinMax",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_minReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_maxReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_minRealLog",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_baseValue",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_syncDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_minLogAdjusted",{enumerable:!0,configurable:!0,writable:!0,value:1})}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var e;if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let s=this.get("syncWithAxis");s&&(this._syncDp=new Nt([s.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),s.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}let t=!1;if((this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(t=!0,(e=this.ghostLabel)===null||e===void 0||e.set("text","")),(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||t||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){let i=this.chart,s=!1;if(i){let a=this.get("renderer").getPrivate("letter");a=="Y"?i.xAxes.each(r=>{r.className!="ValueAxis"&&(s=!0)}):a=="X"&&i.yAxes.each(r=>{r.className!="ValueAxis"&&(s=!0)})}s&&this._getSelectionMinMax(),this._dirtySelectionExtremes=!1}this._groupData(),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("min")||this.isPrivateDirty("selectionMax")||this.isPrivateDirty("selectionMin")||this.isPrivateDirty("max")||this.isPrivateDirty("step")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("logarithmic"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,(this.getPrivate("selectionMinFinal")!=this.getPrivate("selectionMin")||this.getPrivate("selectionMaxFinal")!=this.getPrivate("selectionMax"))&&(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_formatText(e){let t=this.get("numberFormat"),i=this.getNumberFormatter(),s="";return t?s=i.format(e,t):s=i.format(e,void 0,this.getPrivate("stepDecimalPlaces")),s}_prepareAxisItems(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(v(e)&&v(t)){let i=this.get("logarithmic"),s=this.getPrivate("step"),a=this.getPrivate("selectionMin"),r=this.getPrivate("selectionMax")+s,n=a-s,o=1,l=e;if(i){if(n=this._minLogAdjusted,n<a)for(;n<a;)n+=s;if(l=n,l<=0){let _=this._minRealLog;v(_)||(_=1),l=Math.pow(10,Math.log(_)*Math.LOG10E),s<1&&(v(this._minRealLog)?l=this._minRealLog:l=Math.pow(10,-50))}o=Math.log(r-s)*Math.LOG10E-Math.log(l)*Math.LOG10E,o>2&&(n=Math.pow(10,Math.log(l)*Math.LOG10E-50))}let h=this.get("renderer"),u=h.get("minorLabelsEnabled"),c=h.get("minorGridEnabled",u),d=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E)),p=Math.round(s/d),f=2;R(p/5,10)%1==0&&(f=5),R(p/10,10)%1==0&&(f=10);let g=s/f,m=0,b=0,x=-1/0;for(;n<r;){let _;this.dataItems.length<m+1?(_=new K(this,void 0,{}),this._dataItems.push(_),this.processDataItem(_)):_=this.dataItems[m],this._createAssets(_,[]),this._toggleDataItem(_,!0),_.setRaw("value",n);let A=_.get("label");A&&A.set("text",this._formatText(n)),this._prepareDataItem(_);let y=n;if(i&&o>2?y=Math.pow(10,Math.log(l)*Math.LOG10E+m-50):y+=s,c){let w=n+g;for(i&&(o>2&&(g=this._adjustMinMax(n,y,10).step),w=n+g);w<y-s*1e-11;){let P;this.minorDataItems.length<b+1?(P=new K(this,void 0,{}),this.minorDataItems.push(P),this.processDataItem(P)):P=this.minorDataItems[b],this._createAssets(P,["minor"],!0),this._toggleDataItem(P,!0),P.setRaw("value",w);let k=P.get("label");k&&(u?k.set("text",this._formatText(w)):k.setPrivate("visible",!1)),this._prepareDataItem(P),w+=g,b++}}if(n=y,x==n)break;let M=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E));if(M<1&&!i){let w=Math.round(Math.abs(Math.log(Math.abs(M))*Math.LOG10E))+2;n=R(n,w)}m++,i&&o<=2&&n-s<s&&(n=s),x=n}for(let _=m;_<this.dataItems.length;_++)this._toggleDataItem(this.dataItems[_],!1);for(let _=b;_<this.minorDataItems.length;_++)this._toggleDataItem(this.minorDataItems[_],!1);D(this.series,_=>{_.inited&&_._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(e,t){let i=this.get("renderer"),s=e.get("value"),a=e.get("endValue"),r=this.valueToPosition(s),n=r,o=this.valueToPosition(s+this.getPrivate("step"));v(a)&&(n=this.valueToPosition(a),o=n),e.get("isRange")&&a==null&&(o=r);let l=n,h=e.get("labelEndValue");h!=null&&(l=this.valueToPosition(h)),i.updateLabel(e.get("label"),r,l,t);let u=e.get("grid");if(i.updateGrid(u,r,n),u&&(s==this.get("baseValue",0)?(u.addTag("base"),u._applyThemes()):u.hasTag("base")&&(u.removeTag("base"),u._applyThemes())),i.updateTick(e.get("tick"),r,l,t),i.updateFill(e.get("axisFill"),r,o),this._processBullet(e),i.updateBullet(e.get("bullet"),r,n),!e.get("isRange")){let c=this.get("fillRule");c&&c(e)}}_handleRangeChange(){let e=this.positionToValue(this.get("start",0)),t=this.positionToValue(this.get("end",1)),i=this.get("renderer").gridCount(),s=this._adjustMinMax(e,t,i,!0),a=Et(s.step);this.setPrivateRaw("stepDecimalPlaces",a),e=R(e,a),t=R(t,a),s=this._adjustMinMax(e,t,i,!0);let r=s.step;e=s.min,t=s.max,(this.getPrivate("selectionMin")!==e||this.getPrivate("selectionMax")!==t||this.getPrivate("step")!==r)&&(this.setPrivateRaw("selectionMin",e),this.setPrivateRaw("selectionMax",t),this.setPrivateRaw("step",r))}positionToValue(e){let t=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(e*(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)+Math.log(t)*Math.LOG10E)/Math.LOG10E):e*(i-t)+t}valueToPosition(e){let t=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(e<=0){let s=this.get("treatZeroAs");v(s)&&(e=s)}return(Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)}else return(e-t)/(i-t)}valueToFinalPosition(e){let t=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(e<=0){let s=this.get("treatZeroAs");v(s)&&(e=s)}return(Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)}else return(e-t)/(i-t)}getX(e,t,i){e=i+(e-i)*t;let s=this.valueToPosition(e);return this._settings.renderer.positionToCoordinate(s)}getY(e,t,i){e=i+(e-i)*t;let s=this.valueToPosition(e);return this._settings.renderer.positionToCoordinate(s)}getDataItemCoordinateX(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,s))}getDataItemPositionX(e,t,i,s){let a=e.get(t);if(e.get("stackToItemX")){let n=e.component;a=a*s+n.getStackedXValueWorking(e,t)}else a=this._baseValue+(a-this._baseValue)*s;return this.valueToPosition(a)}getDataItemCoordinateY(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,s))}getDataItemPositionY(e,t,i,s){let a=e.get(t);if(e.get("stackToItemY")){let n=e.component;a=a*s+n.getStackedYValueWorking(e,t)}else a=this._baseValue+(a-this._baseValue)*s;return this.valueToPosition(a)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){let e=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),t=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0)),i=this.get("baseValue",0);return i<e&&(i=e),i>t&&(i=t),i}cellEndValue(e){return e}fixSmallStep(e){return 1+e===1?(e*=2,this.fixSmallStep(e)):e}_fixMin(e){return e}_fixMax(e){return e}_calculateTotals(){if(this.get("calculateTotals")){let e=this.series[0];if(e){let t=e.startIndex();if(e.dataItems.length>0){t>0&&t--;let i=e.endIndex();i<e.dataItems.length&&i++;let s,a;e.get("yAxis")==this?(s="valueY",a="vcy"):e.get("xAxis")==this&&(s="valueX",a="vcx");let r=s+"Working";if(s)for(let n=t;n<i;n++){let o=0,l=0;D(this.series,h=>{if(!h.get("excludeFromTotal")){let u=h.dataItems[n];if(u){let c=u.get(r)*h.get(a);ae(c)||(o+=c,l+=Math.abs(c))}}}),D(this.series,h=>{if(!h.get("excludeFromTotal")){let u=h.dataItems[n];if(u){let c=u.get(r)*h.get(a);if(!ae(c)){u.set(s+"Total",l),u.set(s+"Sum",o);let d=c/l*100;l==0&&(d=0),u.set(s+"TotalPercent",d)}}}})}}}}}_getSelectionMinMax(){let e=this.getPrivate("minFinal"),t=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max"),a=this.get("extraMin",0),r=this.get("extraMax",0);this.get("logarithmic")&&(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(r=.2));let n=this.get("renderer").gridCount(),o=this.get("strictMinMaxSelection"),l=this.get("strictMinMax");if(v(e)&&v(t)){let h=t,u=e;if(D(this.series,_=>{if(!_.get("ignoreMinMax")){let A,y,M=_.getPrivate("outOfSelection");if(_.get("xAxis")===this){if(!M){let w=_.getPrivate("minX"),P=_.getPrivate("maxX");(_.startIndex()!=0||_.endIndex()!=_.dataItems.length)&&(w=void 0,P=void 0),A=_.getPrivate("selectionMinX",w),y=_.getPrivate("selectionMaxX",P)}}else if(_.get("yAxis")===this&&!M){let w=_.getPrivate("minY"),P=_.getPrivate("maxY");(_.startIndex()!=0||_.endIndex()!=_.dataItems.length)&&(w=void 0,P=void 0),A=_.getPrivate("selectionMinY",w),y=_.getPrivate("selectionMaxY",P)}!_.isHidden()&&!_.isShowing()&&(v(A)&&(h=Math.min(h,A)),v(y)&&(u=Math.max(u,y)))}}),this.axisRanges.each(_=>{if(_.get("affectsMinMax")){let A=_.get("value");A!=null&&(h=Math.min(h,A),u=Math.max(u,A)),A=_.get("endValue"),A!=null&&(h=Math.min(h,A),u=Math.max(u,A))}}),h>u&&([h,u]=[u,h]),v(i)?l?h=i:h=e:l&&v(this._minReal)&&(h=this._minReal),v(s)?l?u=s:u=t:l&&v(this._maxReal)&&(u=this._maxReal),h===u){let _=h;if(h-=this._deltaMinMax,u+=this._deltaMinMax,h<e){let y=_-e;y==0&&(y=this._deltaMinMax),h=_-y,u=_+y,l=!0}let A=this._adjustMinMax(h,u,n,l);h=A.min,u=A.max}let c=h,d=u,p=u-h;h-=p*a,u+=p*r;let f=this._adjustMinMax(h,u,n);h=f.min,u=f.max,h=re(h,e,t),u=re(u,e,t),f=this._adjustMinMax(h,u,n,!0),l||(h=f.min,u=f.max);let g=this.get("syncWithAxis");if(g&&(f=this._syncAxes(h,u,f.step,g.getPrivate("selectionMinFinal",g.getPrivate("minFinal",0)),g.getPrivate("selectionMaxFinal",g.getPrivate("maxFinal",1)),g.getPrivate("selectionStepFinal",g.getPrivate("step",1))),f.min<e&&(f.min=e),f.max>t&&(f.max=t),h=f.min,u=f.max),l&&(v(i)&&(h=Math.max(h,i)),v(s)&&(u=Math.min(u,s))),o&&(h=c-(d-c)*a,u=d+(d-c)*r),l){v(i)?h=i:h=c,v(s)?u=s:u=d,u-h<=1e-8&&(h-=this._deltaMinMax,u+=this._deltaMinMax);let _=u-h;h-=_*a,u+=_*r}this.get("logarithmic")&&(h<=0&&(h=c*(1-Math.min(a,.99))),h<e&&(h=e),u>t&&(u=t));let m=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),b=R(this.valueToFinalPosition(h),m),x=R(this.valueToFinalPosition(u),m);this.setPrivateRaw("selectionMinFinal",h),this.setPrivateRaw("selectionMaxFinal",u),this.setPrivateRaw("selectionStepFinal",f.step),this.zoom(b,x)}}_getMinMax(){let e=this.get("min"),t=this.get("max"),i=1/0,s=-1/0,a=this.get("extraMin",0),r=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(r=.2)));let n=1/0;if(D(this.series,x=>{if(!x.get("ignoreMinMax")){let _,A;if(x.get("xAxis")===this?(_=x.getPrivate("minX"),A=x.getPrivate("maxX")):x.get("yAxis")===this&&(_=x.getPrivate("minY"),A=x.getPrivate("maxY")),v(_)&&v(A)){i=Math.min(i,_),s=Math.max(s,A);let y=A-_;y<=0&&(y=Math.abs(A/100)),y<n&&(n=y)}}}),this.axisRanges.each(x=>{if(x.get("affectsMinMax")){let _=x.get("value");_!=null&&(i=Math.min(i,_),s=Math.max(s,_)),_=x.get("endValue"),_!=null&&(i=Math.min(i,_),s=Math.max(s,_))}}),this.get("logarithmic")){let x=this.get("treatZeroAs");v(x)&&i<=0&&(i=x),i<=0&&new Error("Logarithmic value axis can not have values <= 0.")}if(i===0&&s===0&&(s=.9,i=-.9),v(e)&&(i=e),v(t)&&(s=t),i===1/0||s===-1/0){this.setPrivate("minFinal",void 0),this.setPrivate("maxFinal",void 0);return}i>s&&([i,s]=[s,i]);let o=i,l=s,h=this.adapters.fold("min",i),u=this.adapters.fold("max",s);this._minRealLog=i,v(h)&&(i=h),v(u)&&(s=u),i=this._fixMin(i),s=this._fixMax(s),s-i<=1/Math.pow(10,15)&&(s-i!==0?this._deltaMinMax=(s-i)/2:this._getDelta(s),i-=this._deltaMinMax,s+=this._deltaMinMax),i-=(s-i)*a,s+=(s-i)*r,this.get("logarithmic")&&(i<0&&o>=0&&(i=0),s>0&&l<=0&&(s=0)),this._minReal=i,this._maxReal=s;let c=this.get("strictMinMax"),d=this.get("strictMinMaxSelection",!1);d&&(c=d);let p=c;v(t)&&(p=!0);let f=this.get("renderer").gridCount(),g=this._adjustMinMax(i,s,f,p);if(i=g.min,s=g.max,g=this._adjustMinMax(i,s,f,!0),i=g.min,s=g.max,c){v(e)?i=e:i=this._minReal,v(t)?s=t:s=this._maxReal,s-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax);let x=s-i;i-=x*a,s+=x*r}h=this.adapters.fold("min",i),u=this.adapters.fold("max",s),v(h)&&(i=h),v(u)&&(s=u),n==1/0&&(n=s-i);let m=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=R(i,m),s=R(s,m);let b=this.get("syncWithAxis");if(b&&(g=this._syncAxes(i,s,g.step,b.getPrivate("minFinal",b.getPrivate("min",0)),b.getPrivate("maxFinal",b.getPrivate("max",1)),b.getPrivate("step",1)),i=g.min,s=g.max),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((s-i)/n*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,s=this._maxReal,i<=0&&(i=o*(1-Math.min(a,.99)))),v(i)&&v(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);let x=this.get("interpolationDuration",0),_=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:x,easing:_}),this.animatePrivate({key:"max",to:s,duration:x,easing:_})}}_fixZoomFactor(){}_getDelta(e){let t=Math.log(Math.abs(e))*Math.LOG10E,i=Math.pow(10,Math.floor(t));i=i/10,this._deltaMinMax=i}_saveMinMax(e,t){}_adjustMinMax(e,t,i,s){i<=1&&(i=1),i=Math.round(i);let a=e,r=t,n=t-e;n===0&&(n=Math.abs(t));let o=Math.log(Math.abs(n))*Math.LOG10E,l=Math.pow(10,Math.floor(o));l=l/10;let h=l;s&&(h=0),s?(e=Math.floor(e/l)*l,t=Math.ceil(t/l)*l):(e=Math.ceil(e/l)*l-h,t=Math.floor(t/l)*l+h),e<0&&a>=0&&(e=0),t>0&&r<=0&&(t=0),o=Math.log(Math.abs(n))*Math.LOG10E,l=Math.pow(10,Math.floor(o)),l=l/100;let u=Math.ceil(n/i/l)*l,c=Math.pow(10,Math.floor(Math.log(Math.abs(u))*Math.LOG10E)),d=Math.ceil(u/c);d>5?d=10:d<=5&&d>2&&(d=5),u=Math.ceil(u/(c*d))*c*d;let p=this.get("maxPrecision");if(v(p)){let b=Bt(u,p);p<Number.MAX_VALUE&&u!==b&&(u=b,u==0&&(u=1))}let f=0;c<1&&(f=Math.round(Math.abs(Math.log(Math.abs(c))*Math.LOG10E))+1,u=R(u,f));let g=Math.floor(e/u);e=R(u*g,f);let m;return s?m=Math.floor(t/u):m=Math.ceil(t/u),m===g&&m++,t=R(u*m,f),t<r&&(t=t+u),e>a&&(e=e-u),u=this.fixSmallStep(u),{min:e,max:t,step:u}}getTooltipText(e,t){let i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),a=this.get("extraTooltipPrecision",0),r=this.getPrivate("stepDecimalPlaces",0)+a,n=R(this.positionToValue(e),r);return i?s.format(n,i):s.format(n,void 0,r)}getSeriesItem(e,t){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.positionToValue(t),a,r;if(D(e.dataItems,(n,o)=>{let l=Math.abs(n.get(i)-s);(a===void 0||l<r)&&(a=o,r=l)}),a!=null)return e.dataItems[a]}zoomToValues(e,t,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",1));this.getPrivate("min")!=null&&this.getPrivate("max")!=null&&this.zoom((e-s)/(a-s),(t-s)/(a-s),i)}_syncAxes(e,t,i,s,a,r){if(this.get("syncWithAxis")){let o=Math.round(a-s)/r,l=Math.round((t-e)/i),h=this.get("renderer").gridCount();if(v(o)&&v(l)){let u=!1,c=0,d=(t-e)*.01,p=e,f=t,g=i;for(;u!=!0;)if(u=this._checkSync(p,f,g,o),c++,c>500&&(u=!0),u)e=p,t=f,i=g;else{c/3==Math.round(c/3)?(p=e-d*c,e>=0&&p<0&&(p=0)):(f=t+d*c,f<=0&&f>0&&(f=0));let m=this._adjustMinMax(p,f,h,!0);p=m.min,f=m.max,g=m.step}}}return{min:e,max:t,step:i}}_checkSync(e,t,i,s){let a=(t-e)/i;for(let r=1;r<s;r++)if(R(a/r,1)==s||a*r==s)return!0;return!1}getCellWidthPosition(){let e=this.getPrivate("selectionMax",this.getPrivate("max")),t=this.getPrivate("selectionMin",this.getPrivate("min"));return v(e)&&v(t)?this.getPrivate("step",1)/(e-t):.05}nextPosition(e){e==null&&(e=1),this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let t=this.positionToValue(this.getPrivate("tooltipPosition",0));return t+=this.getPrivate("step",1)*e,t=re(t,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(t))}};Object.defineProperty(se,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ValueAxis"});Object.defineProperty(se,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:he.classNames.concat([se.className])});var ve=class T extends he{constructor(){super(...arguments),Object.defineProperty(this,"_frequency",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_itemMap",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),this.fields.push("category","id","cellSize"),this.setPrivateRaw("name","category"),this.addTag("category"),super._afterNew()}_afterDataChange(){super._afterDataChange();let e=this.dataItems.length;e>0&&this.setPrivateRaw("maxZoomFactor",e),this.setPrivateRaw("startIndex",Math.min(this.getPrivate("startIndex",0),e)),this.setPrivateRaw("endIndex",Math.min(this.getPrivate("endIndex",e),1))}_prepareChildren(){super._prepareChildren();let e=this.dataItems.length,t=0;this._valuesDirty&&(this._itemMap={},D(this.dataItems,r=>{r.setRaw("index",t),this._itemMap[r.get("category")]=r,t++}),this.setPrivateRaw("maxZoomFactor",e));let i=this.get("start",0),s=this.get("end",1),a=this._getIndices(i,s);this.setPrivateRaw("startIndex",a.startIndex),this.setPrivateRaw("endIndex",a.endIndex),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("endIndex")||this.isPrivateDirty("startIndex")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&this.dataItems.length>0&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges())}adjustZoom(){let e=this.dataItems.length;if(e>1){let t=this.get("maxZoomCount",this.dataItems.length),i=this.get("minZoomCount",1),s=0,a=this.getPrivate("startIndex",0),r=this.getPrivate("endIndex",0),n=this._sAnimation,o=this._eAnimation,l=this.get("start",0),h=!1;n&&!n.stopped&&(l=Number(n.to),h=!0);let u=this.get("end",1);if(o&&!o.stopped&&(u=Number(o.to),h=!0),h){let c=this._getIndices(l,u);a=c.startIndex,r=c.endIndex}for(let c=a;c<r;c++){let d=this.dataItems[c];s+=d.get("finalCellSize",1)}if(s<=i){let c=0;for(let d=a;d<e;d++){let p=this.dataItems[d];if(c+=p.get("finalCellSize",1),r=d+1,c>=i)break}if(c<i)for(let d=a-1;d>=0;d--){let p=this.dataItems[d];if(c+=p.get("finalCellSize",1),a=d,c>=i)break}this.zoomToIndexes(a,r)}else if(s>=t){let c=s;for(let d=r-1;d>=a;d--){let p=this.dataItems[d];if(c-=p.get("finalCellSize",1),c<=t){r=d+1;break}}this.zoomToIndexes(a,r)}}}_handleRangeChange(){D(this.series,e=>{let t=this.dataItems[this.startIndex()].get("category"),i=this.dataItems[this.endIndex()-1].get("category"),s=e.get("baseAxis"),a=e.get("xAxis"),r=e.get("yAxis");if(a instanceof T&&r instanceof T)e._markDirtyAxes();else if(s===this){let n,o,l=r;if(a===s?(e.get("categoryXField")&&(n="categoryX"),e.get("openCategoryXField")&&(o="openCategoryX")):r===s&&(e.get("categoryYField")&&(n="categoryY"),e.get("openCategoryYField")&&(o="openCategoryY"),l=a),l instanceof se&&(n||o)){let c=function(g,m,b,x,_,A){let y,M=m.categoryToIndex(_);for(;!y&&M>=0&&M<m.dataItems.length;){let w=m.dataItems[M].get("category");if(A=="previous")for(let P=g.dataItems.length-1;P>=0;P--){let k=g.dataItems[P];if(b&&k.get(b)===w){y=k;break}if(x&&k.get(x)===w){y=k;break}}else for(let P=0,k=g.dataItems.length;P<k;P++){let I=g.dataItems[P];if(b&&I.get(b)===w){y=I;break}if(x&&I.get(x)===w){y=I;break}}y||(M+=A==="previous"?-1:1)}return y},h,u;h=c(e,this,n,o,t,"next"),u=c(e,this,n,o,i,"previous");let d=0,p=e.dataItems.length;h&&(d=e.dataItems.indexOf(h)),u&&(p=e.dataItems.indexOf(u)+1),e.setPrivate("startIndex",d),e.setPrivate("endIndex",p);let f=!1;for(let g=d;g<p;g++){let m=e.dataItems[g];if(D(e.__valueXShowFields,b=>{m.get(b)!=null&&(f=!0)}),D(e.__valueYShowFields,b=>{m.get(b)!=null&&(f=!0)}),f)break}e.setPrivate("outOfSelection",!f)}e._markDirtyAxes()}})}_prepareAxisItems(){var e;let t=this.get("renderer"),i=this.dataItems.length,s=this.startIndex();s>0&&s--;let a=this.endIndex();a<i&&a++;let r=t.get("minorLabelsEnabled"),n=t.get("minorGridEnabled",r),o=t.axisLength()/Math.max(t.get("minGridDistance"),1),l=Math.max(1,Math.min(i,Math.ceil((a-s)/o)));s=Math.floor(s/l)*l,this._frequency=l;for(let u=0;u<i;u++)this._toggleDataItem(this.dataItems[u],!1);let h=this.dataItems[s].get("index",0);for(let u=s;u<a;u=u+l){let c=this.dataItems[u];this._createAssets(c,[]),this._toggleDataItem(c,!0);let d=l;n&&(d=1),this._prepareDataItem(c,h,d),h++}if(t.get("minorGridEnabled"))for(let u=s;u<a;u++){let c=this.dataItems[u];u%l!=0&&(this._createAssets(c,["minor"],!0),this._toggleDataItem(c,!0),this._prepareDataItem(c,0,1),r||(e=c.get("label"))===null||e===void 0||e.setPrivate("visible",!1))}this._updateGhost()}_prepareDataItem(e,t,i){let s=this.get("renderer"),a=e.get("categoryLocation",0),r=e.get("endCategoryLocation",1),n=e.get("index");v(n)||(n=this.categoryToIndex(e.get("category")));let o=this.indexToPosition(n,a),l=e.get("endCategory"),h;l?(h=this.categoryToIndex(l),v(h)||(h=n)):h=n;let u=this.indexToPosition(h,r),c,d;if(e.get("isRange")){if(c=h,!v(n)){this._toggleDataItem(e,!1);return}}else c=n+this._frequency-1;d=this.indexToPosition(c,r),s.updateLabel(e.get("label"),o,u,i),s.updateGrid(e.get("grid"),o,u),s.updateTick(e.get("tick"),o,u,i),s.updateFill(e.get("axisFill"),o,d),this._processBullet(e),s.updateBullet(e.get("bullet"),o,u);let p=this.get("fillRule");p&&p(e,t)}startIndex(){let e=this.dataItems.length;return Math.min(Math.max(this.getPrivate("startIndex",0),0),e-1)}endIndex(){let e=this.dataItems.length;return Math.max(1,Math.min(this.getPrivate("endIndex",e),e))}baseValue(){}basePosition(){return 0}getX(e){let t=this._itemMap[e];return t?this._settings.renderer.positionToCoordinate(this.indexToPosition(t.get("index",0))):NaN}getY(e){let t=this._itemMap[e];return t?this._settings.renderer.positionToCoordinate(this.indexToPosition(t.get("index",0))):NaN}getDataItemPositionX(e,t,i,s){let a=e.get(t),r=this._itemMap[a];return r?this.indexToPosition(r.get("index",0),i):NaN}getDataItemCoordinateX(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,s))}getDataItemPositionY(e,t,i,s){let a=e.get(t),r=this._itemMap[a];return r?this.indexToPosition(r.get("index",0),i):NaN}getDataItemCoordinateY(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,s))}indexToPosition(e,t,i){let s=this.dataItems.length,a=0;if(s==0||(e>=s&&(e=s-1,t=1),v(t)||(t=.5),!v(e)))return 0;let r=this.get("startLocation",0),n=this.get("endLocation",1);if(!this.get("cellSizeField"))s-=r,s-=1-n,a=(e+t-r)/s;else{let o=i?"finalCellSize":"cellSize",l=this.dataItems,h=0;D(this.dataItems,d=>{h+=d.get(o,1)}),h-=r*l[0].get(o,1),h-=(1-n)*l[l.length-1].get(o,1);let u=0;for(let d=0;d<e;d++)u+=l[d].get(o,1);let c=l[e].get(o,1);a=(u+t*c-r*l[0].get(o,1))/h}if(!i){let o=this.dataItems[e];o&&(a+=o.get("deltaPosition",0))}return a}categoryToPosition(e){let t=this._itemMap[e];return t?this.indexToPosition(t.get("index")):NaN}categoryToIndex(e){let t=this._itemMap[e];return t?t.get("index"):NaN}dataItemToPosition(e){return this.indexToPosition(e.get("index"))}roundAxisPosition(e,t){return e+=(.5-t)/this.dataItems.length,this.indexToPosition(this.axisPositionToIndex(e),t)}axisPositionToIndex(e){let t=this.dataItems.length;if(t===0)return 0;if(this.get("cellSizeField")){let i=0,s=[];D(this.dataItems,l=>{let h=l.get("cellSize",1);s.push(h),i+=h});let a=this.get("startLocation",0),r=this.get("endLocation",1);i-=a,i-=1-r;let n=e*i+a,o=0;for(let l=0;l<t;l++){let h=s[l];if(n<o+h)return l;o+=h}return t-1}else return re(Math.floor(e*t),0,t-1)}getTooltipText(e,t){let i=this.dataItems[this.axisPositionToIndex(e)];if(i){let s=i.get("label");if(s)return Ht(s,this.get("tooltipText",""))}}_updateTooltipText(e,t){e._setDataItem(this.dataItems[this.axisPositionToIndex(t)]),e.label.text.markDirtyText()}getSeriesItem(e,t){if(this.dataItems.length>0){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.axisPositionToIndex(t),a=e.dataItems[s],r=this.dataItems[s],n=r.get("category");if(a&&r&&a.get(i)===n)return a;for(let o=0,l=e.dataItems.length;o<l;o++){let h=e.dataItems[o];if(h.get(i)===n)return h}}}_getIndices(e,t){let i=this.dataItems.length,s=0,a=i,r="cellSize";if(this.get("cellSizeField")){let n=0,o=this.dataItems;if(o.length==0)return{startIndex:0,endIndex:0};D(o,h=>{n+=h.get(r,1)}),n-=this.get("startLocation",0)*o[0].get(r,1),n-=(1-this.get("endLocation",1))*o[o.length-1].get(r,1);let l=0;for(let h=0;h<i;h++)if(l+=this.dataItems[h].get(r,1),Math.round(l)>Math.round(e*n)){s=h;break}for(let h=s+1;h<i;h++)if(l+=this.dataItems[h].get(r,1),Math.round(l)>=Math.round(t*n)){a=h+1;break}s=Math.max(s,0),a=Math.min(a,i)}else s=Math.max(Math.round(this.get("start",0)*i),0),a=Math.min(Math.round(this.get("end",1)*i),i);return{startIndex:s,endIndex:a}}zoomToIndexes(e,t,i){let s=this.dataItems.length;this.get("cellSizeField")?(e=Math.min(Math.max(e,0),s),t=Math.max(Math.min(t,s),1),this.setPrivateRaw("startIndex",e),this.setPrivateRaw("endIndex",t),this.zoom(this.indexToPosition(e,0,!0),this.indexToPosition(t,0,!0),i)):this.zoom(e/s,t/s,i)}zoomToCategories(e,t,i){this.zoomToIndexes(this.categoryToIndex(e),this.categoryToIndex(t)+1,i)}getCellWidthPosition(){return this._frequency/this.dataItems.length/(this.get("end",1)-this.get("start",0))}nextPosition(e){e==null&&(e=1),this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let t=this.getPrivate("tooltipPosition",0),i=re(this.axisPositionToIndex(t)+e,0,this.dataItems.length-1);return this.toGlobalPosition(this.indexToPosition(i))}};Object.defineProperty(ve,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CategoryAxis"});Object.defineProperty(ve,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:he.classNames.concat([ve.className])});var ze=class extends ve{constructor(){super(...arguments),Object.defineProperty(this,"_frequency",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_itemMap",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),this.fields.push("category"),super._afterNew()}_prepareAxisItems(){this.setPrivateRaw("baseInterval",this.get("baseInterval"));let e=this.get("renderer"),t=this.dataItems.length,i=this.startIndex();i>0&&i--;let s=this.endIndex();s<t&&s++;let a=e.axisLength()/Math.max(e.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),r=Math.min(t,Math.ceil((s-i)/a));i=Math.floor(i/r)*r,this._frequency=r;for(let _=0;_<t;_++)this._toggleDataItem(this.dataItems[_],!1);let n=Number(this.dataItems[i].get("category")),o=Number(this.dataItems[s-1].get("category")),l=o-n;s-i<a&&(l=o-n-((o-n)/this.baseDuration()-(s-i))*this.baseDuration());let h=Xe(0,l,a,this.get("gridIntervals")),u=Ve(h.timeUnit),c=this.getPrivate("baseInterval");Z(h)<this.baseDuration()&&(h=Object.assign({},c));let d=this.get("dateFormats"),p=-1/0,f=-1/0,g=-1/0,m,b=[],x=!1;for(let _=i;_<s;_++){let A=this.dataItems[_],y=A.get("index"),M=!1,w=Number(A.get("category")),P=new Date(w),k=Jt(P,h.timeUnit);m=d[h.timeUnit];let I=!1;h.timeUnit!="year"&&h.timeUnit!="week"&&u&&this.get("markUnitChange")&&v(p)&&Ge(w,p,u,this._root.utc)&&(m=this.get("periodChangeDateFormats")[h.timeUnit],y-r*.5<f&&b.pop(),b.push({format:m,dataItem:A}),x=!0,I=!0,f=y,g=k);let S=!1;h.timeUnit==="day"||h.timeUnit==="week"?y-f>=r&&(S=!0):k%h.count===0&&k!=g&&(S=!0),!I&&S&&(y-r*.7<f&&x&&(M=!0),M||(b.push({format:m,dataItem:A}),f=y,g=k),x=!1),p=w}if(b.length>0){let _=b[0].dataItem.get("index",0);D(b,A=>{let y=A.dataItem,M=A.format;this._createAssets(y,[]),this._toggleDataItem(y,!0);let w=Number(y.get("category")),P=new Date(w),k=y.get("label");k&&k.set("text",this._root.dateFormatter.format(P,M)),_++,this._prepareDataItem(y,_,r)})}}baseDuration(){return Z(this.getPrivate("baseInterval"))}getTooltipText(e,t){let i=this.dataItems[this.axisPositionToIndex(e)];if(i){let s=this.get("dateFormats")[this.getPrivate("baseInterval").timeUnit];return this._root.dateFormatter.format(new Date(i.get("category",0)),this.get("tooltipDateFormat",s))}}_updateTooltipText(e,t){e.label.set("text",this.getTooltipText(t))}};Object.defineProperty(ze,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CategoryDateAxis"});Object.defineProperty(ze,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ve.classNames.concat([ze.className])});var ye=class extends se{constructor(){super(...arguments),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_seriesDataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_groupingCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_intervalDuration",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_baseDuration",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_intervalMax",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_intervalMin",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(e){this.setPrivateRaw("baseInterval",e),this._baseDuration=Z(e)}_fixZoomFactor(){let e=this.get("maxZoomFactor");e!=null&&e!=1/0?this.setPrivateRaw("maxZoomFactor",e):this.setPrivateRaw("maxZoomFactor",Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))/this.baseMainDuration()))}_groupData(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(v(e)&&v(t)){this._fixZoomFactor();let i=this.getPrivate("groupInterval");if(i?this._setBaseInterval(i):this._setBaseInterval(this.get("baseInterval")),this.isDirty("groupInterval")){let s=this.get("groupInterval");s&&(this.setRaw("groupIntervals",[s]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))D(this.series,s=>{this._groupSeriesData(s)}),this._handleRangeChange();else{let s=this.get("baseInterval"),a=s.timeUnit+s.count;D(this.series,r=>{r.setDataSet(a),r.resetGrouping()}),this._setBaseInterval(s),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(e){if(this.get("groupData")&&!e.get("groupDataDisabled")){this._dataGrouped=!0,this._seriesDataGrouped=!0;let t=[],i=this.baseMainDuration(),s=this.get("groupIntervals");D(s,d=>{Z(d)>i&&t.push(d)}),e._dataSets={};let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r,n=e.get("baseAxis");e.get("xAxis")===n?r=e._valueYFields:e.get("yAxis")===n&&(r=e._valueXFields);let o=e._mainDataItems,l=this.get("baseInterval"),h=l.timeUnit+l.count;e._dataSets[h]=o;let u=e.get("groupDataCallback"),c=e.get("groupDataWithOriginals",!1);u&&(c=!0),D(t,d=>{let p=-1/0,f=d.timeUnit+d.count;e._dataSets[f]=[];let g,m={},b={},x={},_={};D(r,P=>{m[P]=0,b[P]=0,x[P]=e.get(P+"Grouped"),_[P]=P+"Working"});let A=ee(d.timeUnit),y=o[0],M;y&&(M=o[0].get(a));let w;D(o,P=>{let k=P.get(a),I=Y(k,d.timeUnit,d.count,this._root,M),S;p<I-A/24?(S=Ie(P.dataContext),g=new K(e,S,e._makeDataItem(S)),g.setRaw(a,I),e._dataSets[f].push(g),D(r,C=>{let L=P.get(C);v(L)?(g.setRaw(C,L),g.setRaw(_[C],L),b[C]=1,m[C]=L):(m[C]=0,b[C]=0)}),c&&g.set("originals",[P]),u&&w&&u(w,d),w=g):(D(r,C=>{let L=x[C],E=P.get(C);if(E!=null){let U=g.get(C);switch(L){case"close":g.setRaw(C,E);break;case"sum":g.setRaw(C,U+E);break;case"open":break;case"low":E<U&&g.setRaw(C,E);break;case"high":E>U&&g.setRaw(C,E);break;case"average":b[C]++,m[C]+=E;let X=m[C]/b[C];g.setRaw(C,X);break;case"extreme":Math.abs(E)>Math.abs(U)&&g.setRaw(C,E);break}g.setRaw(_[C],g.get(C));let te=Ie(P.dataContext);te[a]=I,g.dataContext=te}}),c&&g.get("originals").push(P)),p=I}),u&&w&&u(w,d)}),e._dataSetId&&e.setDataSet(e._dataSetId),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(e){let t=this.get("baseInterval"),i=Xe(0,e,this.get("groupCount",1/0),this.get("groupIntervals"));return Z(i)<Z(t)&&(i=Object.assign({},t)),i}getIntervalMax(e){return this._intervalMax[e.timeUnit+e.count]}getIntervalMin(e){return this._intervalMin[e.timeUnit+e.count]}_handleRangeChange(){super._handleRangeChange();let e=Math.round(this.getPrivate("selectionMin")),t=Math.round(this.getPrivate("selectionMax"));if(v(e)&&v(t)){if(this.get("endLocation")==0&&(t+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),s=this.getPrivate("groupInterval"),a=t-e+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this.baseDuration());if(s){let r=Z(s);a=Math.ceil(a/r)*r}if(i||(i=this.getGroupInterval(a)),i&&(!s||s.timeUnit!==i.timeUnit||s.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let r=i.timeUnit+i.count;D(this.series,n=>{n.get("baseAxis")===this&&n.setDataSet(r)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{let n="groupintervalchanged";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this})})})}}D(this.series,i=>{if(i.get("baseAxis")===this){let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r=Lt(i.dataItems,g=>fe(g.get(s),e)).index;r>0&&(r-=1),t+=this.baseDuration()*(1-this.get("endLocation",1));let o=me(i.dataItems,g=>fe(g.get(s),t)).index,l=o;l>1&&l--;let h=i.dataItems[r],u=i.dataItems[l],c,d;h&&(d=h.get(s)),u&&(c=u.get(s));let p=!1;c!=null&&d!=null&&(c<e||d>t)&&(p=!0),i.setPrivate("outOfSelection",p),i.setPrivate("startIndex",r);let f=i._adjustStartIndex(r);i.getPrivate("adjustedStartIndex")!==f&&(i.setPrivate("adjustedStartIndex",f),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",o)}})}}_adjustMinMax(e,t,i,s){return{min:e,max:t,step:(t-e)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(e,t){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let s=i.timeUnit+i.count;this._intervalMin[s]=e,this._intervalMax[s]=t}_getM(e){return e=="day"||e=="month"||e=="year"?1.05:1.01}_getMinorInterval(e){var t;let i,s=e.count,a=e.timeUnit;return s>1&&(s==10||s==15?s=5:s==12?s=2:s==6?s=1:s==30?s=10:s<10&&(s=1),i={timeUnit:a,count:s}),a=="week"&&(((t=this.getPrivate("baseInterval"))===null||t===void 0?void 0:t.timeUnit)!="week"?i={timeUnit:"day",count:1}:i={timeUnit:"week",count:1}),a=="year"&&s==1&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<4*366*24*60*60*1e3&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(v(e)&&v(t)){let i=this._root,s=Math.round(this.getPrivate("selectionMin")),a=Math.round(this.getPrivate("selectionMax")),r=this.get("renderer"),n=this.getPrivate("baseInterval"),o=s,l=0,h=this.get("gridIntervals"),u=Xe(0,a-s,r.gridCount(),h);Z(u)<this.baseDuration()&&(u=Object.assign({},n));let c=Z(u);this._intervalDuration=c;let d=Ve(u.timeUnit),p=i.utc,f=i.timezone;o=Y(s-c,u.timeUnit,u.count,i,e);let g=o-c,m,b=this.get("dateFormats");this.setPrivateRaw("gridInterval",u);let x=r.get("minorLabelsEnabled"),_=r.get("minorGridEnabled",x),A,y=0;_&&(A=this._getMinorInterval(u),y=Z(A));let M=0;for(;o<a+c;){let w;this.dataItems.length<l+1?(w=new K(this,void 0,{}),this._dataItems.push(w),this.processDataItem(w)):w=this.dataItems[l],this._createAssets(w,[]),this._toggleDataItem(w,!0),w.setRaw("value",o),w.setRaw("labelEndValue",void 0);let P=o+ee(u.timeUnit,u.count*this._getM(u.timeUnit));P=Y(P,u.timeUnit,1,i),w.setRaw("endValue",P);let k=new Date(o);m=b[u.timeUnit],d&&this.get("markUnitChange")&&v(g)&&u.timeUnit!="year"&&Ge(o,g,d,p,f)&&(m=this.get("periodChangeDateFormats")[u.timeUnit]);let I=w.get("label");I&&I.set("text",i.dateFormatter.format(k,m));let S=u.count;if(u.timeUnit=="week"?I?.set("location",this.get("weekLabelLocation",0)):I?.set("location",r.labels.template.get("location")),_){S=1;let C=u.timeUnit;C=="week"&&this.get("skipFirstMinor")&&(C="day");let L=o+ee(C,this._getM(C));L=Y(L,C,1,i),w.setRaw("labelEndValue",L)}if(this._prepareDataItem(w,S),g=o,o=P,A){let C=A.timeUnit,L=A.count,E=this._getM(C);this.get("skipFirstMinor")||(g-=y*E);let U=Y(g+y*E,C,L,i,g),te,X=this.get("minorDateFormats",this.get("dateFormats"));for(;U<o-.01*y;){let $;this.minorDataItems.length<M+1?($=new K(this,void 0,{}),this.minorDataItems.push($),this.processDataItem($)):$=this.minorDataItems[M],this._createAssets($,["minor"],!0),this._toggleDataItem($,!0),$.setRaw("value",U);let j=U+ee(C,L*E);j=Y(j,C,1,i),$.setRaw("endValue",j);let be=new Date(U);m=X[C];let ge=$.get("label");if(ge&&(x?ge.set("text",i.dateFormatter.format(be,m)):ge.setPrivate("visible",!1)),this._prepareDataItem($,1),U==te)break;if(!$.get("isRange")){let ie=this.get("fillRule");ie&&ie($)}te=U,U=j,M++}}if(o==g)break;l++}for(let w=l;w<this.dataItems.length;w++)this._toggleDataItem(this.dataItems[w],!1);for(let w=M;w<this.minorDataItems.length;w++)this._toggleDataItem(this.minorDataItems[w],!1);D(this.series,w=>{w.inited&&w._markDirtyAxes()})}this._updateGhost()}_updateFinals(e,t){this.setPrivateRaw("selectionMinFinal",this.positionToValue(e)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(t))}_getDelta(){this._deltaMinMax=this.baseDuration()/2}_fixMin(e){let t=this.getPrivate("baseInterval"),i=t.timeUnit,s=Y(e,i,t.count,this._root),a=s+ee(i,t.count*this._getM(i));return a=Y(a,i,1,this._root),s+(a-s)*this.get("startLocation",0)}_fixMax(e){let t=this.getPrivate("baseInterval"),i=t.timeUnit,s=Y(e,i,t.count,this._root),a=s+ee(i,t.count*this._getM(i));return a=Y(a,i,1,this._root),s+(a-s)*this.get("endLocation",1)}_updateDates(e,t){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return Z(this.get("baseInterval"))}processSeriesDataItem(e,t){let i=this.getPrivate("baseInterval");e.open||(e.open={}),e.close||(e.close={}),D(t,s=>{let a=e.get(s);if(v(a)){let r=e.open[s],n=e.close[s];if(!(a>=r&&a<=n)){let o=i.timeUnit,l=i.count;r=Y(a,o,l,this._root),n=r+ee(o,l*this._getM(o)),n=Y(n,o,1,this._root),e.open[s]=r,e.close[s]=n}this._updateDates(r,e.component)}})}_handleSizeDirty(){}getDataItemPositionX(e,t,i,s,a){let r,n,o;return a?o=e.get(t):(e.open&&e.close?(r=e.open[t],n=e.close[t]):(r=e.get(t),n=r),o=r+(n-r)*i,o=this._baseValue+(o-this._baseValue)*s),this.valueToPosition(o)}getDataItemCoordinateX(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,s))}getDataItemPositionY(e,t,i,s,a){let r,n,o;return a?o=e.get(t):(e.open&&e.close?(r=e.open[t],n=e.close[t]):(r=e.get(t),n=r),o=r+(n-r)*i,o=this._baseValue+(o-this._baseValue)*s),this.valueToPosition(o)}getDataItemCoordinateY(e,t,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,s))}roundAxisPosition(e,t){let i=this.positionToValue(e);i=i-(t-.5)*this.baseDuration();let s=this.getPrivate("baseInterval");if(!ae(i)){let a=this._root.locale.firstDayOfWeek,r=s.timeUnit,n=this._root.utc,o=this._root.timezone,l=s.count;i=Y(i,r,l,this._root,this.getPrivate("min",0));let h=ct(s,new Date(i),a,n,o);return o&&(i=Y(i+this.baseDuration()*.05,r,l,this._root,this.getPrivate("min",0)),h=ct(s,new Date(i+h*t),a,n,o)),this.valueToPosition(i+h*t)}return NaN}getTooltipText(e,t){if(this.getPrivate("min")!=null){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],s=this.positionToValue(e);if(v(s)){let a=new Date(s),r=this.getPrivate("baseInterval"),n=ct(r,a,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return t!==!1&&(a=new Date(s+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*n)),this._root.dateFormatter.format(a,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(e,t,i,s){let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r=this.positionToValue(t);i==null&&(i=.5),r=r-(i-.5)*this.baseDuration();let n=me(e.dataItems,o=>{let l=0;return o.open&&(l=o.open[a]),fe(l,r)});if(s||e.get("snapTooltip")){let o=e.dataItems[n.index-1],l=e.dataItems[n.index];if(o&&l&&o.open&&l.close){let h=o.open[a],u=l.close[a];if(Math.abs(r-h)>Math.abs(r-u))return l}if(o)return o;if(l)return l}else{let o=e.dataItems[n.index-1];if(o&&o.open&&o.close){let l=o.open[a],h=o.close[a];if(r>=l&&r<=h)return o}}}shouldGap(e,t,i,s){let a=e.get(s);return t.get(s)-a>this.baseDuration()*i}zoomToDates(e,t,i){this.zoomToValues(e.getTime(),t.getTime(),i)}zoomToValues(e,t,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",0));if(this.getPrivate("min")!=null&&this.getPrivate("max")!=null)if(this.get("groupData")){let r=this.getGroupInterval(t-e),n=this.get("baseInterval"),o=this.getIntervalMin(n),l=this.getIntervalMax(n)-1;l=Y(l,r.timeUnit,r.count,this.root),l+=this._getM(r.timeUnit)*Z(r),l=Y(l,r.timeUnit,r.count,this.root);let h=Y(o,r.timeUnit,r.count,this.root),u=Y(l,r.timeUnit,r.count,this.root),c=(e-h)/(u-h),d=(t-h)/(u-h);this.zoom(c,d,i)}else this.zoom((e-s)/(a-s),(t-s)/(a-s),i)}positionToDate(e){return new Date(this.positionToValue(e))}dateToPosition(e){return this.valueToPosition(e.getTime())}getCellWidthPosition(){let e=this.getPrivate("selectionMax",this.getPrivate("max")),t=this.getPrivate("selectionMin",this.getPrivate("min"));return v(e)&&v(t)?this._intervalDuration/(e-t):.05}nextPosition(e){e==null&&(e=1);let t=this.get("tooltipLocation",.5)*this.baseDuration();this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0)),s=this.getPrivate("baseInterval"),a=this._nextTime(i,e,s),r=this.getPrivate("selectionMin",0),n=this.getPrivate("selectionMax",0),o=Y(r,s.timeUnit,s.count,this._root),l=Y(n,s.timeUnit,s.count,this._root);return a+=t,a=re(a,o+t,l-t),this.toGlobalPosition(this.valueToPosition(a))}_nextTime(e,t,i){return Y(e+t*this.baseDuration(),i.timeUnit,i.count,this._root)}};Object.defineProperty(ye,"className",{enumerable:!0,configurable:!0,writable:!0,value:"DateAxis"});Object.defineProperty(ye,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:se.classNames.concat([ye.className])});var Be=class extends ye{constructor(){super(...arguments),Object.defineProperty(this,"_frequency",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_m",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_dates",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_customDates",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this.valueFields.push("date"),this.addTag("gapless"),super._afterNew()}_getDates(){return this._customDates?this._customDates:this._dates}_updateDates(e,t){if(!t.get("ignoreMinMax")){let i=this._getDates(),s=me(i,a=>fe(a,e));s.found||Yt(i,s.index,e)}}_updateAllDates(){if(!this._customDates){let e=this._dates;e.length=0,D(this.series,o=>{let l="valueX";o.get("yAxis")==this&&(l="valueY"),D(o.dataItems,h=>{let u=h.get(l);v(u)&&h.open&&this._updateDates(h.open[l],o)})});let t=this.get("extraMax",0),i=this.get("extraMin",0),s=e.length,a=this.getPrivate("baseInterval"),r=a.count,n=a.timeUnit;if(t>0){let o=s*t,l=e[s-1];if(v(l))for(let h=s-1;h<s+o;h++)l+=ee(n,r*this._getM(n)),l=Y(l,n,r,this._root),e.push(l)}if(i>0){let o=s*i,l=e[0];if(v(l))for(let h=0;h<o;h++)l-=ee(n,r),l=Y(l,n,r,this._root),e.unshift(l)}}}valueToPosition(e){let t=this._getDates(),i=this.get("startLocation",0),s=this.get("endLocation",1),a=t.length-i-(1-s),r=me(t,o=>fe(o,e)),n=r.index;if(r.found)return(n-i)/a;{n>0&&(n-=1);let o=t[n],l=t[n+1];if(l){let u=l;Math.abs(u-e)<Math.abs(o-e)&&(o=u,n++)}let h=e-o;return(n-i)/a+h/this.baseDuration()/a}}valueToIndex(e){let t=this._getDates(),i=me(t,a=>fe(a,e)),s=i.index;return i.found||s>0&&(s-=1),s}positionToValue(e){let t=this.get("startLocation",0),i=this.get("endLocation",1),s=this._getDates(),a=Math.round(s.length-t-(1-i)),r=e*a,n=Math.floor(r);return n<0&&(n=0),n>a-1&&(n=a-1),s[n]+(r-n+t)*this.baseDuration()}_fixZoomFactor(){this.setPrivateRaw("maxZoomFactor",this._getDates().length-this.get("startLocation",0)-(1-this.get("endLocation",1)))}zoomToDates(e,t,i){let s=this._getDates(),a=s.length,r=me(s,l=>fe(l,e.getTime())),n=s[Math.min(r.index,a-1)];r=me(s,l=>fe(l,t.getTime()));let o=s[r.index];r.index>=a&&(o=s[a-1]+this.baseDuration()),this.zoomToValues(n,o,i)}zoomToValues(e,t,i){let s=this.getPrivate("min",0),a=this.getPrivate("max",0);e=re(e,s,a),t=re(t,s,a),this.zoom(this.valueToPosition(e),this.valueToPosition(t),i)}_prepareAxisItems(){let e=this.getPrivate("selectionMin",0),t=this.getPrivate("selectionMax",0);if(v(e)&&v(t)){this._seriesValuesDirty&&(this._seriesValuesDirty=!1,this._updateAllDates());let i=this._root,s=i.utc,a=i.timezone,r=this._getDates(),n=this.get("renderer"),o=r.length,l=this.baseDuration(),h=this.valueToIndex(e);h>0&&h--;let u=this.valueToIndex(t);u<o-1&&u++;let c=n.axisLength()/Math.max(n.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),d=Math.min(o,Math.ceil((u-h)/c));d=Math.max(1,d),h=Math.floor(h/d)*d,this._frequency=d,D(this.dataItems,S=>{this._toggleDataItem(S,!1)}),D(this.minorDataItems,S=>{this._toggleDataItem(S,!1)});let p=t-e-((t-e)/l-(u-h))*l,f=Xe(0,p,c,this.get("gridIntervals")),g=this.getPrivate("baseInterval"),m=Z(f);m<l&&(f=Object.assign({},g),m=Z(f)),this._intervalDuration=m;let b=f.timeUnit,x=this.get("dateFormats"),_=Date.now();r[0]&&(_=r[0]);let A=Y(this.getPrivate("selectionMin",0),b,f.count,i,_),y=n.get("minorLabelsEnabled"),M=n.get("minorGridEnabled",y),w,P=0,k;M&&(w=this._getMinorInterval(f),P=Z(w));let I=this._getIndexes(A,this.getPrivate("selectionMax",A)+m,f,this.getPrivate("min",A));if(I.length>0){let S=0;this._m=0;let C=A-m*10,L=Ve(b);if(w){let U=r[I[0]];this._addMinorGrid(U-m,U,P,w)}let E=n.axisLength()/n.gridCount()*.5;D(I,U=>{var te;let X;this.dataItems.length<S+1?(X=new K(this,void 0,{}),this._dataItems.push(X),this.processDataItem(X)):X=this.dataItems[S];let $=r[U],j=new Date($),be=$;S<I.length-1?be=r[I[S+1]]:be+=m,X.setRaw("value",$),X.setRaw("endValue",be),X.setRaw("index",S),X.setRaw("labelEndValue",void 0);let ge=x[b];L&&this.get("markUnitChange")&&v(C)&&b!="year"&&Ge($,C,L,s,a)&&(ge=this.get("periodChangeDateFormats")[b]),this._createAssets(X,[]);let ie=X.get("label");ie&&ie.set("text",i.dateFormatter.format(j,ge)),this._toggleDataItem(X,!0);let Te=f.count;if(b=="week"&&X.setRaw("labelEndValue",$),M){let W=f.timeUnit;if(W=="week"&&(W="day"),Te>1||f.timeUnit=="week"){let Q=Y($,W,1,i)+ee(W,this._getM(W)),Ae=this.valueToIndex(Q);if(Q=r[Ae],Q==$){let N=r[Ae+1];N?Q=N:Q+=P}X.setRaw("labelEndValue",Q)}Te=1}if(this._prepareDataItem(X,Te),ie&&k&&n.getPrivate("letter")=="X"){let W=k.get("label");if(W){let Q=ie.x(),Ae=W.x();if(Q-Ae<E){let N=this._pickWorse(k,X,f);N&&((te=N.get("label"))===null||te===void 0||te.setPrivate("visible",!1))}}}w&&this._addMinorGrid($,be,P,w),S++,ie&&ie.getPrivate("visible")&&(k=X),C=$})}D(this.series,S=>{S.inited&&S._markDirtyAxes()})}this._updateGhost()}_pickWorse(e,t,i){let s=i.timeUnit,a=e.get("value",0),r=t.get("value",0);return s=="hour"&&new Date(a).getDate()!=new Date(r).getDate()?e:t}_addMinorGrid(e,t,i,s){let a=this.get("minorDateFormats",this.get("dateFormats")),r=s.timeUnit,n=e+ee(r,this._getM(r));n=Y(n,r,1,this._root);let o=t-i*.5,l=this._getIndexes(n,o,s,n),h=this._getDates();D(l,u=>{let c;this.minorDataItems.length<this._m+1?(c=new K(this,void 0,{}),this.minorDataItems.push(c),this.processDataItem(c)):c=this.minorDataItems[this._m],n=h[u],c.setRaw("value",n),c.setRaw("endValue",n+i),c.setRaw("index",u),this._createAssets(c,["minor"],!0);let d=c.get("label");if(d)if(this.get("renderer").get("minorLabelsEnabled")){let p=new Date(n),f=a[r];d.set("text",this._root.dateFormatter.format(p,f))}else d.setPrivate("visible",!1);this._toggleDataItem(c,!0),this._prepareDataItem(c,1),this._m++})}_getIndexes(e,t,i,s){let a=[],r=i.timeUnit,n=i.count,o=this._getM(r),l=this.getPrivate("baseInterval"),h=this._root,u=this._getDates(),c=n-1,d=-1/0,p=ee(r,o),f=ee(r,n*o),g=e;for(r=="day"&&(e=s);e<=t;){e=Y(e,r,n,h);let m=this.valueToIndex(e),b=u[m];if(r=="day"&&l.timeUnit=="day")this._hasDate(e)&&c++,c==n&&(e>=g-f*2&&Ne(a,m),c=0),e+=p,e=Y(e,r,1,h);else{if(b<e){for(let x=m,_=u.length;x<_;x++)if(b=u[x],b>=e){m=x;break}}Ne(a,m),e+=f,e=Y(e,r,n,h)}if(e==d&&(e+=f+p,e=Y(e,r,n,h)),e==d)break;d=e}return a}_hasDate(e){return me(this._getDates(),i=>ot(i,e)).found}_nextTime(e,t,i){let s=re(this.valueToIndex(e)+t,0,this._dates.length-1);return this._dates[s]}};Object.defineProperty(Be,"className",{enumerable:!0,configurable:!0,writable:!0,value:"GaplessDateAxis"});Object.defineProperty(Be,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ye.classNames.concat([Be.className])});var We=class extends se{constructor(){super(...arguments),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_groupingCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_intervalDuration",{enumerable:!0,configurable:!0,writable:!0,value:1})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["axis"]),super._afterNew()}_adjustMinMax(e,t,i,s){let a,r=this.getDurationFormatter(),n=this.get("baseUnit");if(this.setRaw("maxPrecision",0),n=="millisecond"||n=="second"||n=="minute"||n=="hour"){i<=1&&(i=1),i=Math.round(i);let o=t-e;o===0&&(o=Math.abs(t));let l=o/i,h=[60,30,20,15,10,2,1],u=1;n=="hour"&&(h=[24,12,6,4,2,1]);for(let m of h)if(o/m>i){u=m;break}let c=Math.ceil((t-e)/u/i),d=Math.log(Math.abs(c))*Math.LOG10E,p=Math.pow(10,Math.floor(d))/10,f=c/p;c=Wt(h,f)*p,l=u*c,e=Math.floor(e/l)*l,t=Math.ceil(t/l)*l,a={min:e,max:t,step:l}}else a=super._adjustMinMax(e,t,i,s);return this.setPrivateRaw("durationFormat",r.getFormat(a.step,a.max,n)),a}_formatText(e){return this.getDurationFormatter().format(e,this.getPrivate("durationFormat"),this.get("baseUnit"))}getTooltipText(e,t){let i=this.getDurationFormatter(),s=this.get("extraTooltipPrecision",0),a=this.getPrivate("stepDecimalPlaces",0)+s,r=R(this.positionToValue(e),a);return i.format(r,this.getPrivate("durationFormat"),this.get("baseUnit"))}};Object.defineProperty(We,"className",{enumerable:!0,configurable:!0,writable:!0,value:"DurationAxis"});Object.defineProperty(We,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:se.classNames.concat([We.className])});var He=class extends xt{constructor(){super(...arguments),Object.defineProperty(this,"axis",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_beforeChanged(){super._beforeChanged();let e=this.get("sprite");if(this.isDirty("sprite")&&e&&(e.setAll({position:"absolute",role:"figure"}),this._disposers.push(e)),this.isDirty("location")){let t=e.dataItem;this.axis&&e&&t&&this.axis._prepareDataItem(t)}}_dispose(){let e=this.axis;e&&xe(e._bullets,(t,i)=>{i.uid==this.uid&&delete e._bullets[t]}),super._dispose()}};Object.defineProperty(He,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisBullet"});Object.defineProperty(He,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:xt.classNames.concat([He.className])});var $e=class extends vt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty($e,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisLabel"});Object.defineProperty($e,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:vt.classNames.concat([$e.className])});var Ze=class extends Dt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty(Ze,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisLabelRadial"});Object.defineProperty(Ze,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Dt.classNames.concat([Ze.className])});var Oe=class extends kt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty(Oe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisTick"});Object.defineProperty(Oe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:kt.classNames.concat([Oe.className])});var qe=class extends wt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}};Object.defineProperty(qe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"EditableAxisLabel"});Object.defineProperty(qe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:wt.classNames.concat([qe.className])});var ue=class extends V{constructor(){super(...arguments),Object.defineProperty(this,"_axisLength",{enumerable:!0,configurable:!0,writable:!0,value:100}),Object.defineProperty(this,"_start",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_end",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_inversed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_minSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_lc",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_ls",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_thumbDownPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downStart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEnd",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ticks",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>Oe._new(this._root,{themeTags:F(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template])))}),Object.defineProperty(this,"grid",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>de._new(this._root,{themeTags:F(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template])))}),Object.defineProperty(this,"axisFills",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>V._new(this._root,{themeTags:F(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template])))}),Object.defineProperty(this,"labels",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>$e._new(this._root,{themeTags:F(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}),Object.defineProperty(this,"axis",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}makeTick(e,t){let i=this.ticks.make();return i._setDataItem(e),e.setRaw("tick",i),i.set("themeTags",F(i.get("themeTags"),t)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(e,t){let i=this.grid.make();return i._setDataItem(e),e.setRaw("grid",i),i.set("themeTags",F(i.get("themeTags"),t)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(e,t){let i=this.axisFills.make();return i._setDataItem(e),i.set("themeTags",F(i.get("themeTags"),t)),this.axis.gridContainer.children.push(i),e.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(e,t){let i=this.labels.make();return i.set("themeTags",F(i.get("themeTags"),t)),this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(e),e.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this.set("isMeasured",!1);let e=this.thumb;e&&(this._disposers.push(e.events.on("pointerdown",t=>{this._handleThumbDown(t)})),this._disposers.push(e.events.on("globalpointerup",t=>{this._handleThumbUp(t)})),this._disposers.push(e.events.on("globalpointermove",t=>{this._handleThumbMove(t)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){let e=this.thumb;if(e){let t=this.axis.labelsContainer,i=this.get("pan");i=="zoom"?t.children.push(e):i=="none"&&t.children.removeValue(e)}}}_handleThumbDown(e){this._thumbDownPoint=this.toLocal(e.point);let t=this.axis;this._downStart=t.get("start"),this._downEnd=t.get("end")}_handleThumbUp(e){this._thumbDownPoint=void 0}_handleThumbMove(e){let t=this._thumbDownPoint;if(t){let i=this.toLocal(e.point),s=this._downStart,a=this._downEnd,r=this._getPan(i,t)*Math.min(1,a-s)/2*this.get("panSensitivity",1);this.axis.zoom(s-r,a+r,0)}}_getPan(e,t){return 0}positionToCoordinate(e){return this._inversed?(this._end-e)*this._axisLength:(e-this._start)*this._axisLength}updateTooltipBounds(e){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e=e*(i-t),this.get("inversed")?e=i-e:e=t+e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=i-e:e=e-t,e=e/(i-t),e}fixPosition(e){return this.get("inversed")?1-e:e}_updateLC(){}toggleVisibility(e,t,i,s){let a=this.axis,r=a.get("start",0),n=a.get("end",1),o=r+(n-r)*(i-1e-4),l=r+(n-r)*(s+1e-4);t<o||t>l?e.setPrivate("visible",!1):e.setPrivate("visible",!0)}_positionTooltip(e,t){let i=this.chart;i&&(e.set("pointTo",this._display.toGlobal(t)),i.inPlot(t)||e.hide())}processAxis(){}};Object.defineProperty(ue,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRenderer"});Object.defineProperty(ue,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([ue.className])});var Ke=class extends ue{constructor(){super(...arguments),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:pe.new(this._root,{width:O,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");let e=this.grid.template;e.set("height",O),e.set("width",0),e.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(0,i.height())}),this.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(i.width(),0)})}_changed(){var e;super._changed();let t=this.axis,i=t.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("x",-1e3));let s="opposite",a="inside";if(this.isDirty(s)||this.isDirty(a)){let r=this.chart,n=t.children;if(this.get(a)?t.addTag(a):t.removeTag(a),r){if(this.get(s)){let o=r.topAxesContainer.children;o.indexOf(t)==-1&&o.insertIndex(0,t),t.addTag(s),n.moveValue(this)}else{let o=r.bottomAxesContainer.children;o.indexOf(t)==-1&&o.moveValue(t),t.removeTag(s),n.moveValue(this,0)}(e=t.ghostLabel)===null||e===void 0||e._applyThemes(),this.labels.each(o=>{o._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}this.thumb.setPrivate("height",t.labelsContainer.height())}_getPan(e,t){return(t.x-e.x)/this.width()}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e-=this._ls,e=e*(i-t)/this._lc,this.get("inversed")?e=i-e:e=t+e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=i-e:e=e-t,e=e/(i-t)*this._lc,e+=this._ls,e}_updateLC(){let e=this.axis,t=e.parent;if(t){let i=t.innerWidth();this._lc=this.axisLength()/i,this._ls=(e.x()-t.get("paddingLeft",0))/i}}_updatePositions(){let e=this.axis,t=e.x()-Fe(e.get("centerX",0),e.width())-e.parent.get("paddingLeft",0);e.gridContainer.set("x",t),e.topGridContainer.set("x",t),e.bulletsContainer.set("y",this.y());let i=e.chart;if(i){let s=i.plotContainer,a=e.axisHeader,r=e.get("marginLeft",0),n=e.x()-r,o=e.parent;o&&(n-=o.get("paddingLeft",0)),a.children.length>0?(r=e.axisHeader.width(),e.set("marginLeft",r+1)):a.set("width",r),a.setAll({x:n,y:-1,height:s.height()+2})}}processAxis(){super.processAxis();let e=this.axis;e.get("width")==null&&e.set("width",O);let t=this._root.verticalLayout;e.set("layout",t),e.labelsContainer.set("width",O),e.axisHeader.setAll({layout:t})}axisLength(){return this.axis.width()}positionToPoint(e){return{x:this.positionToCoordinate(e),y:0}}updateTick(e,t,i,s){if(e){v(t)||(t=0);let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("x",this.positionToCoordinate(t));let r=e.get("length",0),n=e.get("inside",this.get("inside",!1));this.get("opposite")?(e.set("y",O),n||(r*=-1)):(e.set("y",0),n&&(r*=-1)),e.set("draw",o=>{o.moveTo(0,0),o.lineTo(0,r)}),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateLabel(e,t,i,s){if(e){let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a),v(t)||(t=0);let r=e.get("inside",this.get("inside",!1));this.get("opposite")?r?(e.set("position","absolute"),e.set("y",0)):(e.set("position","relative"),e.set("y",O)):r?(e.set("y",0),e.set("position","absolute")):(e.set("y",void 0),e.set("position","relative")),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("x",this.positionToCoordinate(t)),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateGrid(e,t,i){if(e){v(t)||(t=0);let s=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*s),e.set("x",this.positionToCoordinate(t)),this.toggleVisibility(e,t,0,1)}}updateBullet(e,t,i){if(e){let s=e.get("sprite");if(s){v(t)||(t=0);let a=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*a);let r=this.axis.roundAxisPosition(t,a),n=this.axis._bullets[r],o=-1;if(this.get("opposite")&&(o=1),e.get("stacked"))if(n){let l=n.get("sprite");l&&s.set("y",l.y()+l.height()*o)}else s.set("y",0);this.axis._bullets[r]=e,s.set("x",this.positionToCoordinate(t)),this.toggleVisibility(s,t,0,1)}}}updateFill(e,t,i){if(e){v(t)||(t=0),v(i)||(i=1);let s=this.positionToCoordinate(t),a=this.positionToCoordinate(i);this.fillDrawMethod(e,s,a)}}fillDrawMethod(e,t,i){e.set("draw",s=>{let a=this.axis.gridContainer.height(),r=this.width();i<t&&([i,t]=[t,i]),!(t>r||i<0)&&(s.moveTo(t,0),s.lineTo(i,0),s.lineTo(i,a),s.lineTo(t,a),s.lineTo(t,0))})}positionTooltip(e,t){this._positionTooltip(e,{x:this.positionToCoordinate(t),y:0})}updateTooltipBounds(e){let t=this.get("inside"),i=1e5,s=this._display.toGlobal({x:0,y:0}),a=s.x,r=0,n=this.axisLength(),o=i,l="up";this.get("opposite")?t?(l="up",r=s.y,o=i):(l="down",r=s.y-i,o=i):t?(l="down",r=s.y-i,o=i):(l="up",r=s.y,o=i);let h={left:a,right:a+n,top:r,bottom:r+o},u=e.get("bounds");ht(h,u)||(e.set("bounds",h),e.set("pointerOrientation",l))}};Object.defineProperty(Ke,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererX"});Object.defineProperty(Ke,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ue.classNames.concat([Ke.className])});var Je=class extends ue{constructor(){super(...arguments),Object.defineProperty(this,"_downY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:pe.new(this._root,{height:O,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})})}_afterNew(){this._settings.themeTags=F(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");let e=this.grid.template;e.set("width",O),e.set("height",0),e.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(i.width(),0)}),this.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(0,i.height())})}_getPan(e,t){return(e.y-t.y)/this.height()}_changed(){var e;super._changed();let t=this.axis,i=t.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("y",-1e3));let s=this.thumb,a="opposite",r="inside",n=this.chart;if(this.isDirty(a)||this.isDirty(r)){let l=t.children;if(this.get(r)?t.addTag(r):t.removeTag(r),n){if(this.get(a)){let h=n.rightAxesContainer.children;h.indexOf(t)==-1&&h.moveValue(t,0),t.addTag(a),l.moveValue(this,0)}else{let h=n.leftAxesContainer.children;h.indexOf(t)==-1&&h.moveValue(t),t.removeTag(a),l.moveValue(this)}(e=t.ghostLabel)===null||e===void 0||e._applyThemes(),this.labels.each(h=>{h._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}let o=t.labelsContainer.width();n&&(this.get(a)?s.set("centerX",0):s.set("centerX",o)),s.setPrivate("width",o)}processAxis(){super.processAxis();let e=this.axis;e.get("height")==null&&e.set("height",O);let t=this._root.horizontalLayout;e.set("layout",t),e.labelsContainer.set("height",O),e.axisHeader.set("layout",t)}_updatePositions(){let e=this.axis,t=e.y()-Fe(e.get("centerY",0),e.height());e.gridContainer.set("y",t),e.topGridContainer.set("y",t),e.bulletsContainer.set("x",this.x());let i=e.chart;if(i){let s=i.plotContainer,a=e.axisHeader,r=e.get("marginTop",0);a.children.length>0?(r=e.axisHeader.height(),e.set("marginTop",r+1)):a.set("height",r),a.setAll({y:e.y()-r,x:-1,width:s.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(e){return{x:0,y:this.positionToCoordinate(e)}}updateLabel(e,t,i,s){if(e){v(t)||(t=0);let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a);let r=this.get("opposite"),n=e.get("inside",this.get("inside",!1));r?(e.set("x",0),n?e.set("position","absolute"):e.set("position","relative")):n?(e.set("x",0),e.set("position","absolute")):(e.set("x",void 0),e.set("position","relative")),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("y",this.positionToCoordinate(t)),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateGrid(e,t,i){if(e){v(t)||(t=0);let s=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*s),e.set("y",this.positionToCoordinate(t)),this.toggleVisibility(e,t,0,1)}}updateTick(e,t,i,s){if(e){v(t)||(t=0);let a=.5;v(s)&&s>1?a=e.get("multiLocation",a):a=e.get("location",a),v(i)&&i!=t&&(t=t+(i-t)*a),e.set("y",this.positionToCoordinate(t));let r=e.get("length",0),n=e.get("inside",this.get("inside",!1));this.get("opposite")?(e.set("x",0),n&&(r*=-1)):n||(r*=-1),e.set("draw",o=>{o.moveTo(0,0),o.lineTo(r,0)}),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateBullet(e,t,i){if(e){let s=e.get("sprite");if(s){v(t)||(t=0);let a=e.get("location",.5);v(i)&&i!=t&&(t=t+(i-t)*a);let r=this.axis.roundAxisPosition(t,a),n=this.axis._bullets[r],o=1;if(this.get("opposite")&&(o=-1),e.get("stacked"))if(n){let l=n.get("sprite");l&&s.set("x",l.x()+l.width()*o)}else s.set("x",0);this.axis._bullets[r]=e,s.set("y",this.positionToCoordinate(t)),this.toggleVisibility(s,t,0,1)}}}updateFill(e,t,i){if(e){v(t)||(t=0),v(i)||(i=1);let s=this.positionToCoordinate(t),a=this.positionToCoordinate(i);this.fillDrawMethod(e,s,a)}}fillDrawMethod(e,t,i){e.set("draw",s=>{let a=this.axis.gridContainer.width(),r=this.height();i<t&&([i,t]=[t,i]),!(t>r||i<0)&&(s.moveTo(0,t),s.lineTo(a,t),s.lineTo(a,i),s.lineTo(0,i),s.lineTo(0,t))})}positionToCoordinate(e){return this._inversed?(e-this._start)*this._axisLength:(this._end-e)*this._axisLength}positionTooltip(e,t){this._positionTooltip(e,{x:0,y:this.positionToCoordinate(t)})}updateTooltipBounds(e){let t=this.get("inside"),i=1e5,s=this._display.toGlobal({x:0,y:0}),a=s.y,r=0,n=this.axisLength(),o=i,l="right";this.get("opposite")?t?(l="right",r=s.x-i,o=i):(l="left",r=s.x,o=i):t?(l="left",r=s.x,o=i):(l="right",r=s.x-i,o=i);let h={left:r,right:r+o,top:a,bottom:a+n},u=e.get("bounds");ht(h,u)||(e.set("bounds",h),e.set("pointerOrientation",l))}_updateLC(){let e=this.axis,t=e.parent;if(t){let i=t.innerHeight();this._lc=this.axisLength()/i,this._ls=e.y()/i}}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e-=this._ls,e=e*(i-t)/this._lc,this.get("inversed")?e=t+e:e=i-e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=e-t:e=i-e,e=e/(i-t)*this._lc,e+=this._ls,e}fixPosition(e){return this.get("inversed")?e:1-e}};Object.defineProperty(Je,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererY"});Object.defineProperty(Je,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ue.classNames.concat([Je.className])});var ce=class extends Re{_beforeChanged(){super._beforeChanged(),(this.isDirty("lowX0")||this.isDirty("lowY0")||this.isDirty("lowX1")||this.isDirty("lowY1")||this.isDirty("highX0")||this.isDirty("highX1")||this.isDirty("highY0")||this.isDirty("highY1"))&&(this._clear=!0)}_draw(){super._draw();let e=this._display;e.moveTo(this.get("lowX0",0),this.get("lowY0",0)),e.lineTo(this.get("lowX1",0),this.get("lowY1",0)),e.moveTo(this.get("highX0",0),this.get("highY0",0)),e.lineTo(this.get("highX1",0),this.get("highY1",0))}};Object.defineProperty(ce,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Candlestick"});Object.defineProperty(ce,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Re.classNames.concat([ce.className])});var we=class extends _e{constructor(){super(...arguments),Object.defineProperty(this,"allColumns",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(V.new(this._root,{}))}),Object.defineProperty(this,"allColumnsData",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>Re._new(this._root,{position:"absolute",themeTags:F(this.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template])))})}makeColumn(e,t){let i=t.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(e),t.push(i),i}_processAxisRange(e){super._processAxisRange(e),e.columns=new H(z.new({}),()=>Re._new(this._root,{position:"absolute",themeTags:F(e.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template,e.columns.template]))}_beforeColumnsDraw(){this.allColumnsData=[]}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",e=>{e.clear(),D(this.allColumnsData,t=>{let i=t.width,s=t.height,a=t.x,r=t.y,n=t.stroke,o=t.fill,l=t.strokeWidth,h=t.strokeOpacity,u=t.fillOpacity;e.beginFill(o,u),e.beginPath(),e.lineStyle(l,n,h),e.drawRect(a,r,i,s),e.endStroke(),e.endFill()})})}_updateSeriesGraphics(e,t,i,s,a,r,n,o){if(this.get("turboMode")){let l=t.get("stroke"),h=t.get("fillOpacity",1),u=t.get("strokeOpacity",1),c=t.get("strokeWidth",1),d=t.get("fill"),p=this.getPoint(i,a),f=this.getPoint(s,r),g=e.get("point");if(g){let m=this.getPoint(g.x,g.y);g.x=m.x+this._x,g.y=m.y+this._y}i=p.x,s=f.x,a=p.y,r=f.y,e.setRaw("left",i),e.setRaw("right",s),e.setRaw("top",a),e.setRaw("bottom",r),this.allColumnsData.push({width:s-i,height:r-a,x:i,y:a,stroke:l,fill:d,strokeWidth:c,strokeOpacity:u,fillOpacity:h})}else super._updateSeriesGraphics(e,t,i,s,a,r,n,o)}};Object.defineProperty(we,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ColumnSeries"});Object.defineProperty(we,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:_e.classNames.concat([we.className])});var Pe=class extends we{constructor(){super(...arguments),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({themeTags:["autocolor"]}),()=>ce._new(this._root,{themeTags:F(this.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template])))})}makeColumn(e,t){let i=t.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(e),t.push(i),i}_updateGraphics(e,t,i){super._updateGraphics(e,t,i);let s=this.getRaw("xAxis"),a=this.getRaw("yAxis"),r=this.get("vcy",1),n=this.get("vcx",1),o,l,h,u,c,d,p,f,g=this.get("locationX",e.get("locationX",.5)),m=this.get("locationY",e.get("locationY",.5)),b=this.get("openLocationX",e.get("openLocationX",g)),x=this.get("openLocationY",e.get("openLocationY",m)),_;if(i==0){let A=a.getDataItemPositionY(e,this._yOpenField,1,r),y=a.getDataItemPositionY(e,this._yField,1,r);u=a.getDataItemPositionY(e,this._yLowField,1,r),f=a.getDataItemPositionY(e,this._yHighField,1,r),p=Math.max(A,y),h=Math.min(A,y);let M=this._aLocationX0+b-.5,w=this._aLocationX1+g-.5;o=s.getDataItemPositionX(e,this._xField,M+(w-M)/2,n),l=o,c=o,d=o,_="vertical"}else{let A=s.getDataItemPositionX(e,this._xOpenField,1,n),y=s.getDataItemPositionX(e,this._xField,1,n);l=s.getDataItemPositionX(e,this._xLowField,1,n),d=s.getDataItemPositionX(e,this._xHighField,1,n),c=Math.max(A,y),o=Math.min(A,y);let M=this._aLocationY0+x-.5,w=this._aLocationY1+m-.5;h=a.getDataItemPositionY(e,this._yField,M+(w-M)/2,r),u=h,p=h,f=h,_="horizontal"}this._updateCandleGraphics(e,o,l,h,u,c,d,p,f,_)}_updateCandleGraphics(e,t,i,s,a,r,n,o,l,h){let u=e.get("graphics");if(u){let c=this.getPoint(t,s),d=this.getPoint(i,a),p=this.getPoint(r,o),f=this.getPoint(n,l);if(this.get("turboMode")){let g=this.allColumnsData[this.allColumnsData.length-1];g.lowX0=c.x,g.lowY0=c.y,g.lowX1=d.x,g.lowY1=d.y,g.highX0=p.x,g.highY0=p.y,g.highX1=f.x,g.highY1=f.y}else{let g=u.x(),m=u.y();u.set("lowX0",c.x-g),u.set("lowY0",c.y-m),u.set("lowX1",d.x-g),u.set("lowY1",d.y-m),u.set("highX0",p.x-g),u.set("highY0",p.y-m),u.set("highX1",f.x-g),u.set("highY1",f.y-m),u.set("orientation",h);let b=e.get("rangeGraphics");b&&D(b,x=>{x.set("lowX0",c.x-g),x.set("lowY0",c.y-m),x.set("lowX1",d.x-g),x.set("lowY1",d.y-m),x.set("highX0",p.x-g),x.set("highY0",p.y-m),x.set("highX1",f.x-g),x.set("highY1",f.y-m),x.set("orientation",h)})}}}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",e=>{e.clear(),D(this.allColumnsData,t=>{e.beginPath();let i=t.width,s=t.height,a=t.x,r=t.y,n=t.stroke,o=t.fill,l=t.strokeWidth,h=t.strokeOpacity,u=t.fillOpacity,c=t.lowX0,d=t.lowY0,p=t.lowX1,f=t.lowY1,g=t.highX0,m=t.highY0,b=t.highX1,x=t.highY1;e.beginFill(o,u),e.beginPath(),e.lineStyle(l,n,h),e.drawRect(a,r,i,s),e.moveTo(c,d),e.lineTo(p,f),e.moveTo(g,m),e.lineTo(b,x),e.endStroke(),e.endFill()})})}_processAxisRange(e){super._processAxisRange(e),e.columns=new H(z.new({}),()=>ce._new(this._root,{themeTags:F(e.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template,e.columns.template]))}};Object.defineProperty(Pe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CandlestickSeries"});Object.defineProperty(Pe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:we.classNames.concat([Pe.className])});var De=class extends ce{_draw(){let e=this._display;e.moveTo(this.get("lowX1",0),this.get("lowY1",0)),e.lineTo(this.get("highX1",0),this.get("highY1",0));let t=this.width(),i=this.height();if(this.get("orientation")=="vertical"){let s=i,a=0;e.moveTo(0,s),e.lineTo(t/2,s),e.moveTo(t/2,a),e.lineTo(t,a)}else{let s=0,a=t;e.moveTo(s,0),e.lineTo(s,i/2),e.moveTo(a,i/2),e.lineTo(a,i)}}};Object.defineProperty(De,"className",{enumerable:!0,configurable:!0,writable:!0,value:"OHLC"});Object.defineProperty(De,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ce.classNames.concat([De.className])});var Qe=class extends Pe{constructor(){super(...arguments),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({themeTags:["autocolor"]}),()=>De._new(this._root,{themeTags:F(this.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template])))})}makeColumn(e,t){let i=this.mainContainer.children.push(t.make());return i._setDataItem(e),t.push(i),i}_processAxisRange(e){super._processAxisRange(e),e.columns=new H(z.new({}),()=>De._new(this._root,{themeTags:F(e.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template,e.columns.template]))}};Object.defineProperty(Qe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"OHLCSeries"});Object.defineProperty(Qe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Pe.classNames.concat([Qe.className])});var q=class extends le{constructor(){super(...arguments),Object.defineProperty(this,"_endIndex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeGenerator",{enumerable:!0,configurable:!0,writable:!0,value:Qt()}),Object.defineProperty(this,"_fillGenerator",{enumerable:!0,configurable:!0,writable:!0,value:ei()}),Object.defineProperty(this,"_legendStroke",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_legendFill",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"strokes",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>V._new(this._root,{themeTags:F(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template])))}),Object.defineProperty(this,"fills",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new H(z.new({}),()=>V._new(this._root,{themeTags:F(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template])))}),Object.defineProperty(this,"_fillTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_previousPoint",{enumerable:!0,configurable:!0,writable:!0,value:[0,0,0,0]}),Object.defineProperty(this,"_dindex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_sindex",{enumerable:!0,configurable:!0,writable:!0,value:0})}_afterNew(){this._fillGenerator.y0(function(e){return e[3]}),this._fillGenerator.x0(function(e){return e[2]}),this._fillGenerator.y1(function(e){return e[1]}),this._fillGenerator.x1(function(e){return e[0]}),super._afterNew()}makeStroke(e){let t=this.mainContainer.children.push(e.make());return e.push(t),t}makeFill(e){let t=this.mainContainer.children.push(e.make());return e.push(t),t}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let e=this.get("xAxis"),t=this.get("yAxis");if(this.isDirty("stroke")){let i=this.get("stroke");this.strokes.template.set("stroke",i);let s=this._legendStroke;s&&s.states.lookup("default").set("stroke",i)}if(this.isDirty("fill")){let i=this.get("fill");this.fills.template.set("fill",i);let s=this._legendFill;s&&s.states.lookup("default").set("fill",i)}if(this.isDirty("fillPattern")){let i=this.get("fillPattern");this.fills.template.set("fillPattern",i);let s=this._legendFill;s&&s.states.lookup("default").set("fillPattern",i)}if(this.isDirty("curveFactory")){let i=this.get("curveFactory");i&&(this._strokeGenerator.curve(i),this._fillGenerator.curve(i))}if(e.inited&&t.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){this.fills.each(h=>{h.setPrivate("visible",!1)}),this.strokes.each(h=>{h.setPrivate("visible",!1)}),this.axisRanges.each(h=>{let u=h.fills;u&&u.each(d=>{d.setPrivate("visible",!1)});let c=h.strokes;c&&c.each(d=>{d.setPrivate("visible",!1)})});let i=this.startIndex(),s=this.strokes.template.get("templateField"),a=this.fills.template.get("templateField"),r=!0,n=!0;s&&(r=!1),a&&(n=!1);for(let h=i-1;h>=0;h--){let u=this.dataItems[h],c=!0,d=u.dataContext;if(s&&d[s]&&(r=!0),a&&d[a]&&(n=!0),D(this._valueFields,p=>{v(u.get(p))||(c=!1)}),c&&r&&n){i=h;break}}let o=this.dataItems.length,l=this.endIndex();if(l<o){l++;for(let h=l;h<o;h++){let u=this.dataItems[h],c=!0;if(D(this._valueFields,d=>{v(u.get(d))||(c=!1)}),c){l=h+1;break}}}if(i>0&&i--,this._endIndex=l,this._clearGraphics(),this._sindex=0,this._dindex=i,this.dataItems.length==1)this._startSegment(0);else for(;this._dindex<l-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(e=>{e.fills.clear(),e.strokes.clear()})}_startSegment(e){let t=this._endIndex,i=t,s=this.get("autoGapCount"),a=this.get("connect"),r=this.makeFill(this.fills),n=this._fillTemplate,o=this.fills.template;n&&n!=o&&(r.template=n),r.setPrivate("visible",!0);let l=this.makeStroke(this.strokes),h=this._strokeTemplate;h&&h!=this.strokes.template&&(l.template=h),l.setPrivate("visible",!0);let u=this.get("xAxis"),c=this.get("yAxis"),d=this.get("baseAxis"),p=this.get("vcx",1),f=this.get("vcy",1),g=this._xField,m=this._yField,b=this._xOpenField,x=this._yOpenField,_=this.get("openValueXField"),A=this.get("openValueYField");_||(b=this._xField),A||(x=this._yField);let y=this.get("stacked"),M=u.basePosition(),w=c.basePosition(),P;d===c?P=this._yField:P=this._xField;let k=[],I=[];k.push(I);let S=this.strokes.template.get("templateField"),C=this.fills.template.get("templateField"),L=this.get("locationX",.5),E=this.get("locationY",.5),U=this.get("openLocationX",L),te=this.get("openLocationY",E),X=this.get("minDistance",0),$,j=this.fills.template.get("visible");this.axisRanges.length>0&&(j=!0);let be=!1;(y||_||A)&&(be=!0);let ge={points:I,segments:k,stacked:y,getOpen:be,basePosX:M,basePosY:w,fillVisible:j,xField:g,yField:m,xOpenField:b,yOpenField:x,vcx:p,vcy:f,baseAxis:d,xAxis:u,yAxis:c,locationX:L,locationY:E,openLocationX:U,openLocationY:te,minDistance:X},ie=this._strokeTemplate,Te=this._fillTemplate;for($=e;$<i;$++){this._dindex=$;let W=this._dataItems[$],Q=W.get(g),Ae=W.get(m);if(Q==null||Ae==null?a||(I=[],k.push(I),ge.points=I):this._getPoints(W,ge),S){let N=W.dataContext[S];if(N)if(N instanceof z||(N=z.new(N)),this._strokeTemplate=N,$>e){i=$;break}else ie=N,l.template=N}if(C){let N=W.dataContext[C];if(N)if(N instanceof z||(N=z.new(N)),this._fillTemplate=N,$>e){i=$;break}else Te=N,r.template=N}if(!a){let N=this.dataItems[$+1];N&&d.shouldGap(W,N,s,P)&&(I=[],k.push(I),ge.points=I)}}r.setRaw("userData",[e,$]),l.setRaw("userData",[e,$]),$===t&&this._endLine(I,k[0][0]),l&&this._drawStroke(l,k),r&&this._drawFill(r,k),this.axisRanges.each(W=>{let Q=W.container,Ae=W.fills,N=this.makeFill(Ae);Q&&Q.children.push(N),N.setPrivate("visible",!0),this._drawFill(N,k);let hi=W.strokes,at=this.makeStroke(hi);Q&&Q.children.push(at),ie&&ie!=this.strokes.template&&(at.template=ie),Te&&Te!=this.fills.template&&(N.template=Te),at.setPrivate("visible",!0),this._drawStroke(at,k),N.setRaw("userData",[e,$]),at.setRaw("userData",[e,$])})}_getPoints(e,t){let i=t.points,s=e.get("locationX",t.locationX),a=e.get("locationY",t.locationY),r=this.get("exactLocationX",!1),n=this.get("exactLocationY",!1),o=t.xAxis.getDataItemPositionX(e,t.xField,s,t.vcx,r),l=t.yAxis.getDataItemPositionY(e,t.yField,a,t.vcy,n);if(this._shouldInclude(o)){let h=this.getPoint(o,l),u=[h.x,h.y];if(h.x+=this._x,h.y+=this._y,e.set("point",h),t.fillVisible){let c=o,d=l;if(t.baseAxis===t.xAxis?d=t.basePosY:t.baseAxis===t.yAxis&&(c=t.basePosX),t.getOpen){let f=e.get(t.xOpenField),g=e.get(t.yOpenField);if(f!=null&&g!=null){let m=e.get("openLocationX",t.openLocationX),b=e.get("openLocationY",t.openLocationY);if(t.stacked){let x=e.get("stackToItemX"),_=e.get("stackToItemY");x?(c=t.xAxis.getDataItemPositionX(x,t.xField,m,x.component.get("vcx"),r),ae(c)&&(c=t.basePosX)):t.yAxis===t.baseAxis?c=t.basePosX:c=t.xAxis.getDataItemPositionX(e,t.xOpenField,m,t.vcx,r),_?(d=t.yAxis.getDataItemPositionY(_,t.yField,b,_.component.get("vcy"),n),ae(d)&&(d=t.basePosY)):t.xAxis===t.baseAxis?d=t.basePosY:d=t.yAxis.getDataItemPositionY(e,t.yOpenField,b,t.vcy,n)}else c=t.xAxis.getDataItemPositionX(e,t.xOpenField,m,t.vcx,r),d=t.yAxis.getDataItemPositionY(e,t.yOpenField,b,t.vcy,n)}}let p=this.getPoint(c,d);u[2]=p.x,u[3]=p.y}if(t.minDistance>0){let c=u[0],d=u[1],p=u[2],f=u[3],g=this._previousPoint,m=g[0],b=g[1],x=g[2],_=g[3];(Math.hypot(c-m,d-b)>t.minDistance||p&&f&&Math.hypot(p-x,f-_)>t.minDistance)&&(i.push(u),this._previousPoint=u)}else i.push(u)}}_endLine(e,t){}_drawStroke(e,t){e.get("visible")&&!e.get("forceHidden")&&e.set("draw",i=>{D(t,s=>{this._strokeGenerator.context(i),this._strokeGenerator(s)})})}_drawFill(e,t){e.get("visible")&&!e.get("forceHidden")&&e.set("draw",i=>{D(t,s=>{this._fillGenerator.context(i),this._fillGenerator(s)})})}_processAxisRange(e){super._processAxisRange(e),e.fills=new H(z.new({}),()=>V._new(this._root,{themeTags:F(e.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,e.fills.template])),e.strokes=new H(z.new({}),()=>V._new(this._root,{themeTags:F(e.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,e.strokes.template]))}createLegendMarker(e){let t=this.get("legendDataItem");if(t){let i=t.get("marker"),s=t.get("markerRectangle");s&&s.setPrivate("visible",!1),i.set("background",pe.new(i._root,{fillOpacity:0,fill:Ut(0)}));let a=i.children.push(V._new(i._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=a;let r=i.children.push(V._new(i._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=r;let n=this._root.interfaceColors.get("disabled");if(a.states.create("disabled",{fill:n,stroke:n}),r.states.create("disabled",{fill:n,stroke:n}),this.bullets.length>0){let o=this.bullets.getIndex(0);if(o){let l=o(i._root,this,new K(this,{legend:!0},{}));if(l){let h=l.get("sprite");h instanceof V&&h.states.create("disabled",{fill:n,stroke:n}),h&&(h.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),i.children.push(h),h.setAll({x:i.width()/2,y:i.height()/2}),i.events.on("boundschanged",()=>{h.setAll({x:i.width()/2,y:i.height()/2})}))}}}}}};Object.defineProperty(q,"className",{enumerable:!0,configurable:!0,writable:!0,value:"LineSeries"});Object.defineProperty(q,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:le.classNames.concat([q.className])});var Ot=class{constructor(e,t){Object.defineProperty(this,"_line",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_point",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_x0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_x1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_t0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_tension",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._context=e,this._tension=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:$t(this,this._t0,ri(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){[e,t]=[t,e];let i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,$t(this,ri(this,i=ai(this,e,t)),i);break;default:$t(this,this._t0,i=ai(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function dt(T){function e(t){return new Ot(t,T)}return e.tension=function(t){return dt(+t)},e}function si(T){return T<0?-1:1}function ai(T,e,t){let i=T._x1-T._x0,s=e-T._x1,a=(T._y1-T._y0)/(i||s<0&&-0),r=(t-T._y1)/(s||i<0&&-0),n=(a*s+r*i)/(i+s);return(si(a)+si(r))*Math.min(Math.abs(a),Math.abs(r),.5*Math.abs(n))||0}function ri(T,e){let t=T._x1-T._x0;return t?(3*(T._y1-T._y0)/t-e)/2:e}function $t(T,e,t){let i=T._x0,s=T._y0,a=T._x1,r=T._y1,n=(a-i)/1.5*(1-T._tension);T._context.bezierCurveTo(s+n*e,i+n,r-n*t,a-n,r,a)}var et=class extends q{_afterNew(){this._setDefault("curveFactory",dt(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",dt(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};Object.defineProperty(et,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SmoothedYLineSeries"});Object.defineProperty(et,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([et.className])});var Ft=class{constructor(e,t){Object.defineProperty(this,"_line",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_point",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_x0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_x1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_t0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_tension",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._context=e,this._tension=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:St(this,this._t0,li(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){let i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,St(this,li(this,i=ni(this,e,t)),i);break;default:St(this,this._t0,i=ni(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function Xt(T){function e(t){return new Ft(t,T)}return e}function oi(T){return T<0?-1:1}function ni(T,e,t){let i=T._x1-T._x0,s=e-T._x1,a=(T._y1-T._y0)/(i||s<0&&-0),r=(t-T._y1)/(s||i<0&&-0),n=(a*s+r*i)/(i+s);return(oi(a)+oi(r))*Math.min(Math.abs(a),Math.abs(r),.5*Math.abs(n))||0}function li(T,e){let t=T._x1-T._x0;return t?(3*(T._y1-T._y0)/t-e)/2:e}function St(T,e,t){let i=T._x0,s=T._y0,a=T._x1,r=T._y1,n=(a-i)/1.5*(1-T._tension);T._context.bezierCurveTo(i+n,s+n*e,a-n,r-n*t,a,r)}var tt=class extends q{_afterNew(){this._setDefault("curveFactory",Xt(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",Xt(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};Object.defineProperty(tt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SmoothedXLineSeries"});Object.defineProperty(tt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([tt.className])});var it=class extends q{_afterNew(){this._setDefault("curveFactory",At.tension(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",At.tension(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};Object.defineProperty(it,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SmoothedXYLineSeries"});Object.defineProperty(it,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([it.className])});var st=class extends q{_afterNew(){this._setDefault("curveFactory",ti),super._afterNew()}_getPoints(e,t){let i=t.points,s=this.get("stepWidth",O).value/2,a=e.get("locationX",t.locationX),r=e.get("locationY",t.locationY),n=a,o=r;t.baseAxis===t.xAxis?(a-=s,n+=s):t.baseAxis===t.yAxis&&(r-=s,o+=s);let l=t.xAxis.getDataItemPositionX(e,t.xField,a,t.vcx),h=t.yAxis.getDataItemPositionY(e,t.yField,r,t.vcy),u=t.xAxis.getDataItemPositionX(e,t.xField,n,t.vcx),c=t.yAxis.getDataItemPositionY(e,t.yField,o,t.vcy);if(this._shouldInclude(l)){let d=this.getPoint(l,h),p=[d.x,d.y],f=this.getPoint(u,c),g=[f.x,f.y];if(t.fillVisible){let m=l,b=h,x=u,_=c;if(t.baseAxis===t.xAxis?(b=t.basePosY,_=t.basePosY):t.baseAxis===t.yAxis&&(m=t.basePosX,x=t.basePosX),t.getOpen){let M=e.get(t.xOpenField),w=e.get(t.yOpenField);if(M!=null&&w!=null)if(a=e.get("openLocationX",t.openLocationX),r=e.get("openLocationY",t.openLocationY),n=a,o=r,t.baseAxis===t.xAxis?(a-=s,n+=s):t.baseAxis===t.yAxis&&(r-=s,o+=s),t.stacked){let P=e.get("stackToItemX"),k=e.get("stackToItemY");P?(m=t.xAxis.getDataItemPositionX(P,t.xField,a,P.component.get("vcx")),x=t.xAxis.getDataItemPositionX(P,t.xField,n,P.component.get("vcx"))):t.yAxis===t.baseAxis?(m=t.basePosX,x=t.basePosX):t.baseAxis===t.yAxis&&(m=t.xAxis.getDataItemPositionX(e,t.xOpenField,a,t.vcx),x=t.xAxis.getDataItemPositionX(e,t.xOpenField,n,t.vcx)),k?(b=t.yAxis.getDataItemPositionY(k,t.yField,r,k.component.get("vcy")),_=t.yAxis.getDataItemPositionY(k,t.yField,o,k.component.get("vcy"))):t.xAxis===t.baseAxis?(b=t.basePosY,_=t.basePosY):t.baseAxis===t.yAxis&&(b=t.yAxis.getDataItemPositionY(e,t.yOpenField,r,t.vcy),_=t.yAxis.getDataItemPositionY(e,t.yOpenField,o,t.vcy))}else m=t.xAxis.getDataItemPositionX(e,t.xOpenField,a,t.vcx),b=t.yAxis.getDataItemPositionY(e,t.yOpenField,r,t.vcy),x=t.xAxis.getDataItemPositionX(e,t.xOpenField,n,t.vcx),_=t.yAxis.getDataItemPositionY(e,t.yOpenField,o,t.vcy)}let A=this.getPoint(m,b),y=this.getPoint(x,_);p[2]=A.x,p[3]=A.y,g[2]=y.x,g[3]=y.y}i.push(p),i.push(g),e.set("point",{x:p[0]+(g[0]-p[0])/2,y:p[1]+(g[1]-p[1])/2})}this.get("noRisers")&&(t.points=[],t.segments.push(i))}};Object.defineProperty(st,"className",{enumerable:!0,configurable:!0,writable:!0,value:"StepLineSeries"});Object.defineProperty(st,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:q.classNames.concat([st.className])});export{he as Axis,He as AxisBullet,$e as AxisLabel,Ze as AxisLabelRadial,ue as AxisRenderer,Ke as AxisRendererX,Je as AxisRendererY,Oe as AxisTick,_e as BaseColumnSeries,ce as Candlestick,Pe as CandlestickSeries,ve as CategoryAxis,ze as CategoryDateAxis,we as ColumnSeries,ye as DateAxis,nt as DefaultTheme,We as DurationAxis,qe as EditableAxisLabel,Be as GaplessDateAxis,de as Grid,q as LineSeries,De as OHLC,Qe as OHLCSeries,tt as SmoothedXLineSeries,it as SmoothedXYLineSeries,et as SmoothedYLineSeries,st as StepLineSeries,se as ValueAxis,Ce as XYChart,Ee as XYChartScrollbar,Ue as XYCursor,le as XYSeries};