vue-data-ui 3.27.1-beta.0 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/README.md +49 -41
  2. package/dist/{Arrow-CJeSufxg.js → Arrow-D6OAn5rm.js} +1 -1
  3. package/dist/{BaseDraggableDialog-T1gEsQid.js → BaseDraggableDialog-Bw_azO0n.js} +1 -1
  4. package/dist/BaseIcon-DDctLkeT.js +1 -0
  5. package/dist/{BaseLegendToggle-Dn_tNvn4.js → BaseLegendToggle-BOcw1ke8.js} +1 -1
  6. package/dist/BaseZoomControls-Cq5AOHQ0.js +1 -0
  7. package/dist/{ColorPicker-CUjEw53A.js → ColorPicker-DHQvvLT9.js} +1 -1
  8. package/dist/DataTable-BcVZLSs8.js +1 -0
  9. package/dist/{HillActions-DdvXld3a.js → HillActions-Bq3UJ1Ut.js} +1 -1
  10. package/dist/{Legend-DokTll4u.js → Legend-D8NunRPr.js} +1 -1
  11. package/dist/{NonSvgPenAndPaper-BLzQuIm6.js → NonSvgPenAndPaper-CxQZ0YED.js} +1 -1
  12. package/dist/{PackageVersion-D6pKL176.js → PackageVersion-ATrKWi8V.js} +1 -1
  13. package/dist/{PenAndPaper-DvJJaeU2.js → PenAndPaper-BsBFp16i.js} +1 -1
  14. package/dist/{Shape-tkp65OcG.js → Shape-gDVRWM6n.js} +1 -1
  15. package/dist/SlicerPreview-Dpu4nMz6.js +1 -0
  16. package/dist/{SparkTooltip-BlJLvizH.js → SparkTooltip-cWKhrsKX.js} +1 -1
  17. package/dist/{Title-BRAjxtjG.js → Title-BLA0tM3g.js} +1 -1
  18. package/dist/{Tooltip-BUXB0i6z.js → Tooltip-Iyb_S6oQ.js} +1 -1
  19. package/dist/UserOptions-BSJ_S_us.js +1 -0
  20. package/dist/{chartImage-NwZO-elv.js → chartImage-r-G4CkRK.js} +1 -1
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-graph.js +1 -0
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +1 -1
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-label.js +1 -1
  54. package/dist/components/vue-ui-mini-loader.js +1 -1
  55. package/dist/components/vue-ui-molecule.js +1 -1
  56. package/dist/components/vue-ui-mood-radar.js +1 -1
  57. package/dist/components/vue-ui-nested-donuts.js +1 -1
  58. package/dist/components/vue-ui-onion.js +1 -1
  59. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  60. package/dist/components/vue-ui-quadrant.js +1 -1
  61. package/dist/components/vue-ui-quick-chart.js +1 -1
  62. package/dist/components/vue-ui-radar.js +1 -1
  63. package/dist/components/vue-ui-rating.js +1 -1
  64. package/dist/components/vue-ui-relation-circle.js +1 -1
  65. package/dist/components/vue-ui-ridgeline.js +1 -1
  66. package/dist/components/vue-ui-rings.js +1 -1
  67. package/dist/components/vue-ui-scatter.js +1 -1
  68. package/dist/components/vue-ui-skeleton.js +1 -1
  69. package/dist/components/vue-ui-smiley.js +1 -1
  70. package/dist/components/vue-ui-spark-trend.js +1 -1
  71. package/dist/components/vue-ui-sparkbar.js +1 -1
  72. package/dist/components/vue-ui-sparkgauge.js +1 -1
  73. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  74. package/dist/components/vue-ui-sparkline.js +1 -1
  75. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  76. package/dist/components/vue-ui-stackbar.js +1 -1
  77. package/dist/components/vue-ui-stackline.js +1 -1
  78. package/dist/components/vue-ui-strip-plot.js +1 -1
  79. package/dist/components/vue-ui-table-heatmap.js +1 -1
  80. package/dist/components/vue-ui-table-sparkline.js +1 -1
  81. package/dist/components/vue-ui-table.js +1 -1
  82. package/dist/components/vue-ui-thermometer.js +1 -1
  83. package/dist/components/vue-ui-timer.js +1 -1
  84. package/dist/components/vue-ui-tiremarks.js +1 -1
  85. package/dist/components/vue-ui-treemap.js +1 -1
  86. package/dist/components/vue-ui-vertical-bar.js +1 -1
  87. package/dist/components/vue-ui-waffle.js +1 -1
  88. package/dist/components/vue-ui-wheel.js +1 -1
  89. package/dist/components/vue-ui-word-cloud.js +1 -1
  90. package/dist/components/vue-ui-world.js +1 -1
  91. package/dist/components/vue-ui-xy-canvas.js +1 -1
  92. package/dist/components/vue-ui-xy.js +1 -1
  93. package/dist/{dom-to-png-Cp3WLHmJ.js → dom-to-png-Cp6rAdnI.js} +1 -1
  94. package/dist/{exposedLib-CMTeSmyW.js → exposedLib-BDGMSW1B.js} +1 -1
  95. package/dist/{img-8sM3sVWU.js → img-DiP2_5_r.js} +1 -1
  96. package/dist/{labelUtils-Djp5nJtN.js → labelUtils-DXiFpsZl.js} +1 -1
  97. package/dist/{lib-zDxoqrgo.js → lib-DqD8nbyX.js} +4 -4
  98. package/dist/package-UBaXe2y9.js +1 -0
  99. package/dist/{pdf-Dlv_ks7R.js → pdf-y3S8SBFk.js} +1 -1
  100. package/dist/{render-common-DOYi0f4Z.js → render-common-tsNLeNaX.js} +1 -1
  101. package/dist/{resolveChartConfig-BSo1Oe9n.js → resolveChartConfig-ChGWTt5l.js} +1 -1
  102. package/dist/ssr/vue-ui-donut.js +1 -1
  103. package/dist/ssr/vue-ui-xy.js +1 -1
  104. package/dist/ssr.js +1 -1
  105. package/dist/style.css +1 -1
  106. package/dist/types/vue-data-ui.d.ts +323 -0
  107. package/dist/types/vue-ui-graph.d.ts +21 -0
  108. package/dist/useConfig-DM9fSqjh.js +1 -0
  109. package/dist/{useNestedProp-CT9phgWx.js → useNestedProp-DrLnzyHO.js} +1 -1
  110. package/dist/useObjectBindings-Cn4Vz0RY.js +1 -0
  111. package/dist/{usePrinter-CnyKPIFM.js → usePrinter-Cj4eIYC_.js} +1 -1
  112. package/dist/utils.js +1 -1
  113. package/dist/vue-data-ui-yeD7UyUU.js +1 -0
  114. package/dist/vue-data-ui.js +1 -1
  115. package/dist/vue-ui-3d-bar-COrzyTkO.js +19 -0
  116. package/dist/vue-ui-accordion-3lBpCjGm.js +1 -0
  117. package/dist/vue-ui-age-pyramid-CAoVjkOA.js +1 -0
  118. package/dist/vue-ui-annotator-CpTZHnPw.js +331 -0
  119. package/dist/vue-ui-bullet-yvY_gdw2.js +34 -0
  120. package/dist/vue-ui-bump-ChsFkIq9.js +10 -0
  121. package/dist/vue-ui-candlestick-D9UXZQoN.js +22 -0
  122. package/dist/vue-ui-carousel-table-CKyE4hME.js +1 -0
  123. package/dist/vue-ui-chestnut-BuLjW5nb.js +1 -0
  124. package/dist/vue-ui-chord-Bjwt2_BK.js +21 -0
  125. package/dist/vue-ui-circle-pack-BpAuZruK.js +13 -0
  126. package/dist/vue-ui-cursor-Dn-IBaP8.js +1 -0
  127. package/dist/vue-ui-dag-CyY3cSa6.js +9 -0
  128. package/dist/vue-ui-dashboard-DmyStkQM.js +1 -0
  129. package/dist/{vue-ui-digits-CL9SuIEI.js → vue-ui-digits-BBiRMr01.js} +2 -2
  130. package/dist/{vue-ui-donut-BaEodt-3.js → vue-ui-donut-CGyBWxzh.js} +2 -2
  131. package/dist/vue-ui-donut-DMF74OY0.js +47 -0
  132. package/dist/vue-ui-donut-evolution-Du4zLc8D.js +2 -0
  133. package/dist/vue-ui-dumbbell-CxL_AY5e.js +9 -0
  134. package/dist/vue-ui-flow-h6kTMamJ.js +3 -0
  135. package/dist/vue-ui-funnel-BG5Addzr.js +1 -0
  136. package/dist/vue-ui-galaxy-CgnshY8i.js +1 -0
  137. package/dist/vue-ui-gauge-a13ojQPr.js +1 -0
  138. package/dist/vue-ui-geo-CflzhtuD.js +1 -0
  139. package/dist/vue-ui-gizmo-K1lfslsA.js +1 -0
  140. package/dist/vue-ui-graph-C2Se8bnB.js +7 -0
  141. package/dist/vue-ui-heatmap-5NsQkMwS.js +1 -0
  142. package/dist/vue-ui-hill-COnjVS2L.js +1 -0
  143. package/dist/vue-ui-history-plot-BRJdXsNo.js +2 -0
  144. package/dist/vue-ui-horizontal-bar-G0wEKTRu.js +4 -0
  145. package/dist/vue-ui-kpi-BZjfQxmY.js +1 -0
  146. package/dist/{vue-ui-label-D1Aog-zO.js → vue-ui-label-BD_hTtgZ.js} +2 -2
  147. package/dist/vue-ui-mini-loader-ltQXdeeW.js +1 -0
  148. package/dist/vue-ui-molecule-DI-CS5w8.js +1 -0
  149. package/dist/vue-ui-mood-radar-B5ar9WAZ.js +1 -0
  150. package/dist/vue-ui-nested-donuts-BP2YzVma.js +19 -0
  151. package/dist/vue-ui-onion-CCiZ6jmF.js +5 -0
  152. package/dist/vue-ui-parallel-coordinate-plot-3E0CysDx.js +9 -0
  153. package/dist/vue-ui-quadrant-BwgwvKy8.js +2 -0
  154. package/dist/vue-ui-quick-chart-BXNg0LNe.js +17 -0
  155. package/dist/vue-ui-radar-B9Ntj_Gj.js +1 -0
  156. package/dist/vue-ui-rating-B33u3iIn.js +1 -0
  157. package/dist/vue-ui-relation-circle-B60IUw50.js +1 -0
  158. package/dist/vue-ui-ridgeline-BPbYng2A.js +2 -0
  159. package/dist/vue-ui-rings-BXo9p3Ab.js +1 -0
  160. package/dist/vue-ui-scatter-BwrYPDzh.js +9 -0
  161. package/dist/{vue-ui-skeleton-B-Acw3CC.js → vue-ui-skeleton-DTn7uIui.js} +3 -3
  162. package/dist/{vue-ui-smiley-Ciwqt6ek.js → vue-ui-smiley-qCRUFmpq.js} +1 -1
  163. package/dist/vue-ui-spark-trend-wKFu-O7B.js +1 -0
  164. package/dist/vue-ui-sparkbar-DPFzdX-D.js +1 -0
  165. package/dist/vue-ui-sparkgauge-DlEPsxc0.js +1 -0
  166. package/dist/vue-ui-sparkhistogram-DLZxE6oz.js +1 -0
  167. package/dist/vue-ui-sparkline-BflZPl7s.js +1 -0
  168. package/dist/vue-ui-sparkstackbar-DvSQfGeA.js +1 -0
  169. package/dist/vue-ui-stackbar-JKC9qE6M.js +29 -0
  170. package/dist/vue-ui-stackline-G7-oqfzp.js +39 -0
  171. package/dist/vue-ui-strip-plot-54u7AUip.js +2 -0
  172. package/dist/vue-ui-table-3F8i2ZjT.js +14 -0
  173. package/dist/vue-ui-table-heatmap-CtYPYMIJ.js +1 -0
  174. package/dist/vue-ui-table-sparkline-CTfYTzhA.js +1 -0
  175. package/dist/vue-ui-thermometer-BpFbPqxK.js +1 -0
  176. package/dist/vue-ui-timer-DsWRNtRa.js +64 -0
  177. package/dist/vue-ui-tiremarks-C4wVcSVP.js +1 -0
  178. package/dist/vue-ui-treemap-mYRv6gga.js +1 -0
  179. package/dist/vue-ui-waffle-DNBIZqZz.js +1 -0
  180. package/dist/vue-ui-wheel-DPHDp0t1.js +1 -0
  181. package/dist/vue-ui-word-cloud-BY4YsW7-.js +4 -0
  182. package/dist/vue-ui-world-DQWjoFDx.js +19 -0
  183. package/dist/vue-ui-xy-DfvcqUwW.js +31 -0
  184. package/dist/vue-ui-xy-M9aD-G5a.js +24 -0
  185. package/dist/vue-ui-xy-canvas-BpwG1Ipj.js +9 -0
  186. package/dist/vue_ui_donut_evolution-CVoh3twl.js +1 -0
  187. package/dist/vue_ui_graph-B1ACwQj7.js +1 -0
  188. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +1 -0
  189. package/package.json +1 -1
  190. package/dist/BaseIcon-Cz30ODFA.js +0 -1
  191. package/dist/BaseZoomControls-xq3tWD3j.js +0 -1
  192. package/dist/DataTable-DSUA5M9p.js +0 -1
  193. package/dist/SlicerPreview-GFRs2EWB.js +0 -1
  194. package/dist/UserOptions-D65t74CM.js +0 -1
  195. package/dist/package-DIR2F6AE.js +0 -1
  196. package/dist/useConfig-CKdzPrcf.js +0 -1
  197. package/dist/useObjectBindings-DM3xDKV3.js +0 -1
  198. package/dist/vue-data-ui-BG41UScx.js +0 -1
  199. package/dist/vue-ui-3d-bar-DiaiNy-k.js +0 -19
  200. package/dist/vue-ui-accordion-Dy5OVFKr.js +0 -1
  201. package/dist/vue-ui-age-pyramid-OeUr1yxi.js +0 -1
  202. package/dist/vue-ui-annotator-DA_xAFql.js +0 -331
  203. package/dist/vue-ui-bullet-B9lcCTVb.js +0 -34
  204. package/dist/vue-ui-bump-DYajIrva.js +0 -10
  205. package/dist/vue-ui-candlestick-CdAZuNxo.js +0 -22
  206. package/dist/vue-ui-carousel-table-ihGH0LDH.js +0 -1
  207. package/dist/vue-ui-chestnut-B2aNXFNO.js +0 -1
  208. package/dist/vue-ui-chord-fAckHfOW.js +0 -21
  209. package/dist/vue-ui-circle-pack-BWHVImkS.js +0 -13
  210. package/dist/vue-ui-cursor-DdXKXmhr.js +0 -1
  211. package/dist/vue-ui-dag-a0fNoIcJ.js +0 -9
  212. package/dist/vue-ui-dashboard-DkdYMB7n.js +0 -1
  213. package/dist/vue-ui-donut-DaYxdQmP.js +0 -47
  214. package/dist/vue-ui-donut-evolution-T8cRXKRQ.js +0 -2
  215. package/dist/vue-ui-dumbbell-B6HJxEZp.js +0 -9
  216. package/dist/vue-ui-flow-BlTCVFr3.js +0 -3
  217. package/dist/vue-ui-funnel-WgLFJadZ.js +0 -1
  218. package/dist/vue-ui-galaxy-B3nuI6E8.js +0 -1
  219. package/dist/vue-ui-gauge-BwTP65O4.js +0 -1
  220. package/dist/vue-ui-geo-CX3yH18H.js +0 -1
  221. package/dist/vue-ui-gizmo-CNHcBsku.js +0 -1
  222. package/dist/vue-ui-heatmap-CTdeoar7.js +0 -1
  223. package/dist/vue-ui-hill-DR5k8GWZ.js +0 -1
  224. package/dist/vue-ui-history-plot-C-9uH-Uj.js +0 -2
  225. package/dist/vue-ui-horizontal-bar-qqF7pL7U.js +0 -4
  226. package/dist/vue-ui-kpi-DVcLXGqG.js +0 -1
  227. package/dist/vue-ui-mini-loader-CX0Dx9tT.js +0 -1
  228. package/dist/vue-ui-molecule-B13qVX71.js +0 -1
  229. package/dist/vue-ui-mood-radar-C1BtB8lg.js +0 -1
  230. package/dist/vue-ui-nested-donuts-B90yrlJG.js +0 -19
  231. package/dist/vue-ui-onion-UMVO2DE_.js +0 -5
  232. package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +0 -9
  233. package/dist/vue-ui-quadrant-CPG6yAiu.js +0 -2
  234. package/dist/vue-ui-quick-chart-BTPb-Iz8.js +0 -17
  235. package/dist/vue-ui-radar-Hd-pE9ih.js +0 -1
  236. package/dist/vue-ui-rating-C_YxQYa_.js +0 -1
  237. package/dist/vue-ui-relation-circle-CHYG7ZJl.js +0 -1
  238. package/dist/vue-ui-ridgeline-DS1Gvljt.js +0 -2
  239. package/dist/vue-ui-rings-B-Hb13Uu.js +0 -1
  240. package/dist/vue-ui-scatter-BTgvOmuo.js +0 -9
  241. package/dist/vue-ui-spark-trend-CYqy6c0S.js +0 -1
  242. package/dist/vue-ui-sparkbar-CTXIgjmP.js +0 -1
  243. package/dist/vue-ui-sparkgauge-CObOL6s2.js +0 -1
  244. package/dist/vue-ui-sparkhistogram-ClFyDez-.js +0 -1
  245. package/dist/vue-ui-sparkline-DP_nYlW8.js +0 -1
  246. package/dist/vue-ui-sparkstackbar-B2f0ePMg.js +0 -1
  247. package/dist/vue-ui-stackbar-nMWHZ-f0.js +0 -29
  248. package/dist/vue-ui-stackline-B95y6Zc5.js +0 -39
  249. package/dist/vue-ui-strip-plot-gFNC4r-X.js +0 -2
  250. package/dist/vue-ui-table-Br2JgD_L.js +0 -14
  251. package/dist/vue-ui-table-heatmap-Btu2ejF4.js +0 -1
  252. package/dist/vue-ui-table-sparkline-B9mYHAxp.js +0 -1
  253. package/dist/vue-ui-thermometer-C6u1eLfo.js +0 -1
  254. package/dist/vue-ui-timer-DLgsfB1U.js +0 -64
  255. package/dist/vue-ui-tiremarks-8B9uE1Bx.js +0 -1
  256. package/dist/vue-ui-treemap-C4Mot-Os.js +0 -1
  257. package/dist/vue-ui-waffle-BwcwNpf7.js +0 -1
  258. package/dist/vue-ui-wheel-B3OGCXg7.js +0 -1
  259. package/dist/vue-ui-word-cloud-BPIyMBXq.js +0 -4
  260. package/dist/vue-ui-world-Cp0DeauH.js +0 -19
  261. package/dist/vue-ui-xy-BOE1jvUS.js +0 -31
  262. package/dist/vue-ui-xy-DSyKSn4L.js +0 -24
  263. package/dist/vue-ui-xy-canvas-CaxxiKSa.js +0 -9
  264. package/dist/vue_ui_donut_evolution-nzVwNQYv.js +0 -1
  265. package/dist/vue_ui_quick_chart-Da1GwklM.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{$ as n,Ct as r,D as i,Dt as a,Ht as o,J as s,Jt as c,S as ee,X as te,Yt as ne,Zt as re,at as ie,i as l,in as ae,jt as oe,nt as se,pt as ce,r as le,t as ue,w as de,zt as fe}from"./lib-DqD8nbyX.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-BH9r_0Vd.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-ChGWTt5l.js";import{t as ye}from"./chartImage-r-G4CkRK.js";import{n as be}from"./Title-BLA0tM3g.js";import{t as xe}from"./useChartExport-DtPNpc9M.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./annotationSlots-BRR85CqJ.js";import{n as Ee,t as De}from"./userOptionsSlots-DYuo-E5m.js";import{t as Oe}from"./usePrinter-Cj4eIYC_.js";import{t as ke}from"./Shape-gDVRWM6n.js";import{l as Ae,t as je}from"./useResponsive-D2CPcpda.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./BaseLegendToggle-BOcw1ke8.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./Legend-D8NunRPr.js";import{t as Re}from"./vue_ui_quadrant-BUv-SqzP.js";import{Fragment as u,Teleport as ze,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ue,nextTick as We,normalizeClass as v,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Ge,onMounted as Ke,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as qe,shallowRef as Je,toDisplayString as T,toRefs as Ye,unref as E,watch as Xe,withCtx as D}from"vue";var Ze=/* @__PURE__ */ e({default:()=>on}),Qe=[`id`],$e=[`id`],et=[`id`],tt={style:{position:`relative`}},nt=[`xmlns`,`aria-describedby`,`viewBox`,`id`],rt=[`x`,`y`,`width`,`height`],it={key:1},at=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],ot=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],st=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ct={key:2},lt=[`points`,`fill`],ut=[`points`,`fill`],dt=[`points`,`fill`],ft=[`points`,`fill`],pt={key:3},mt=[`y`,`fill`,`font-size`],ht=[`x`,`y`,`fill`,`font-size`],gt=[`x`,`y`,`fill`,`font-size`],_t=[`y`,`fill`,`font-size`],vt={key:4},yt=[`x`,`y`,`font-size`,`fill`],bt=[`x`,`y`,`font-size`,`fill`],xt=[`x`,`y`,`font-size`,`fill`],St=[`id`,`font-size`,`transform`,`fill`],Ct=[`id`,`font-size`,`transform`,`fill`],wt=[`id`,`font-size`,`transform`,`fill`],Tt={key:5},Et=[`fill`,`points`],Dt=[`x`,`y`,`width`,`height`],Ot=[`x`,`y`,`width`,`height`],kt=[`x`,`y`,`width`,`height`],At=[`x`,`y`,`width`,`height`],jt=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Mt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Nt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Pt={key:0,style:{"pointer-events":`none`}},Ft=[`x`,`y`,`font-size`,`fill`],It=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Lt={key:0},Rt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],zt={key:8,class:`vue-ui-dna`},Bt=[`points`,`fill`],Vt=[`points`,`fill`],Ht=[`points`,`fill`],Ut=[`points`,`fill`],Wt={key:9},Gt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Kt={key:10},qt=[`x`,`y`,`fill`],Jt=[`x`,`y`,`fill`],Yt=[`x`,`y`,`fill`],Xt=[`x`,`y`,`fill`],Zt=[`stroke`,`d`],Qt=[`stroke`,`d`],$t={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},en={key:5,class:`vue-data-ui-watermark`},tn=[`id`],nn=[`onClick`],rn={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},an=[`innerHTML`],on=/*#__PURE__*/ _e({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:_e,emit:Ze}){let on=g(()=>import(`./Tooltip-Iyb_S6oQ.js`)),sn=g(()=>import(`./BaseIcon-DDctLkeT.js`).then(e=>e.n)),cn=g(()=>import(`./vue-ui-accordion-3lBpCjGm.js`).then(e=>e.n)),ln=g(()=>import(`./DataTable-BcVZLSs8.js`)),un=g(()=>import(`./PenAndPaper-BsBFp16i.js`).then(e=>e.t)),dn=g(()=>import(`./UserOptions-BSJ_S_us.js`).then(e=>e.n)),fn=g(()=>import(`./PackageVersion-ATrKWi8V.js`).then(e=>e.t)),pn=g(()=>import(`./BaseDraggableDialog-Bw_azO0n.js`).then(e=>e.n)),{vue_ui_quadrant:mn}=t(),O=e,hn=d(()=>!!O.dataset&&O.dataset.length),k=S(te()),gn=Ze,_n=S(!1),vn=S(``),yn=S(0),A=S(!1),j=S(null),bn=S(null),xn=S(null),Sn=S(null),Cn=S(null),wn=S(0),Tn=S(0),En=S(0),Dn=S(!1),On=S(null),kn=S(null),An=S(null),jn=S(null),Mn=S({x:0,y:0}),Nn=S(`pointer`),Pn=S(!1),M=S(Vn()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.layout.grid),F=d(()=>M.value.style.chart.layout.labels),I=d(()=>M.value.style.chart.tooltip),L=d(()=>M.value.style.chart);he({config:()=>M.value,dataset:()=>O.dataset,component:`VueUiQuadrant`,rules:[ge.emptyArray,ge.noHint]});let R=d(()=>M.value.userOptions.useCursorPointer),Fn=d(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:In,FINAL_DATASET:Ln}=pe({...Ye(O),FINAL_CONFIG:M,prepareConfig:Vn,callback:()=>{Promise.resolve().then(async()=>{await We(),V.value.showTable=M.value.table.show})},skeletonDataset:O.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:ae({defaultConfig:M.value,userConfig:Fn.value})}),{userOptionsVisible:Rn,setUserOptionsVisibility:zn,keepUserOptionState:Bn}=Fe({config:M.value}),{svgRef:z}=Ie({config:L.value.title});function Vn(){return ve(O.config,mn,Re)}let Hn=re(O.config);Xe(()=>O.config,(e,t)=>{let n=re(e),r=n!==Hn;Hn=n;let i=Vn();if(!r){M.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=M.value.style.chart.tooltip.show;return}M.value=i,Rn.value=!M.value.userOptions.showOnChartHover,Gn(),wn.value+=1,Tn.value+=1,En.value+=1,V.value.plotLabels.show=F.value.plotLabels.show,V.value.showTable=M.value.table.show,V.value.showTooltip=I.value.show},{deep:!0});let B=Je(null),Un=Je(null),Wn=d(()=>M.value.debug);function Gn(){if(fe(O.dataset)?ie({componentName:`VueUiQuadrant`,type:`dataset`,debug:Wn.value}):Wn.value&&O.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&ie({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?ie({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&ie({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),M.value.responsive){let e=Ae(()=>{let{width:e,height:t}=je({chart:j.value,title:L.value.title.text?bn.value:null,legend:L.value.legend.show?xn.value:null,source:Sn.value,noTitle:Cn.value});H.value=48,requestAnimationFrame(()=>{U.value.height=t,U.value.usableHeight=t-H.value*2,U.value.width=e,U.value.usableWidth=e-H.value*2,U.value.top=H.value,U.value.left=H.value,U.value.right=e-H.value,U.value.bottom=t-H.value,U.value.centerX=e/2,U.value.centerY=t-t/2,U.value.padding=H.value})});B.value&&(Un.value&&B.value.unobserve(Un.value),B.value.disconnect()),B.value=new ResizeObserver(e),Un.value=j.value.parentNode,B.value.observe(Un.value)}}Ke(()=>{Dn.value=!0,Gn()}),Ge(()=>{B.value&&(Un.value&&B.value.unobserve(Un.value),B.value.disconnect())});let{isPrinting:Kn,isImaging:qn,generatePdf:Jn,generateImage:Yn}=Oe({elementId:`vue-ui-quadrant_${k.value}`,fileName:L.value.title.text||`vue-ui-quadrant`,options:M.value.userOptions.print}),Xn=d(()=>M.value.userOptions.show&&!L.value.title.text),Zn=d(()=>de(M.value.customPalette)),V=S({plotLabels:{show:F.value.plotLabels.show},showTable:M.value.table.show,showTooltip:I.value.show}),H=S(48),U=S({height:L.value.height,usableHeight:L.value.height-H.value*2,width:L.value.width,usableWidth:L.value.width-H.value*2,top:H.value,left:H.value,right:L.value.width-H.value,bottom:L.value.height-H.value,centerX:L.value.width/2,centerY:L.value.height-L.value.height/2,padding:H.value}),W=S({...JSON.parse(JSON.stringify(U.value)),startX:0,startY:0});Xe(()=>U.value,e=>{e&&(W.value={...JSON.parse(JSON.stringify(U.value)),startX:0,startY:0})},{deep:!0});let G=S(null),Qn=d(()=>{switch(G.value){case`TL`:return{x:W.value.startX+W.value.width/2,y:W.value.height,text:F.value.quadrantLabels.tl.text||`Top Left`,fontSize:F.value.quadrantLabels.tl.fontSize,fill:F.value.quadrantLabels.tl.color,bold:F.value.quadrantLabels.tl.bold};case`TR`:return{x:W.value.startX+W.value.width/2,y:W.value.height,text:F.value.quadrantLabels.tr.text||`Top Right`,fontSize:F.value.quadrantLabels.tr.fontSize,fill:F.value.quadrantLabels.tr.color,bold:F.value.quadrantLabels.tr.bold};case`BR`:return{x:W.value.startX+W.value.width/2,y:W.value.height*1.678,text:F.value.quadrantLabels.br.text||`Bottom Right`,fontSize:F.value.quadrantLabels.br.fontSize,fill:F.value.quadrantLabels.br.color,bold:F.value.quadrantLabels.br.bold};case`BL`:return{x:W.value.startX+W.value.width/2,y:W.value.height*1.678,text:F.value.quadrantLabels.bl.text||`Bottom Left`,fontSize:F.value.quadrantLabels.bl.fontSize,fill:F.value.quadrantLabels.bl.color,bold:F.value.quadrantLabels.bl.bold};default:return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1}}}),$n=S(null),er=S(!1);function tr({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){G.value&&Tr(i);let a={x:e-W.value.startX,y:t-W.value.startY,w:n-W.value.width,h:r-W.value.height},o=M.value.zoomAnimationFrames,s=0;function c(){er.value=!0,W.value.startX+=a.x/o,W.value.startY+=a.y/o,W.value.width+=a.w/o,W.value.height+=a.h/o,s+=1,s<o?$n.value=requestAnimationFrame(c):er.value=!1}c()}let K=d(()=>M.value.zoomEnabled);function q(e){if(K.value&&!er.value){if(A.value&&G.value===e)tr({targetX:0,targetY:0,targetW:U.value.width,targetH:U.value.height}),G.value=null,A.value=!1;else{switch(G.value=e,e){case`TL`:tr({targetX:0,targetY:0,targetW:U.value.width/2+U.value.left,targetH:U.value.height/2+U.value.top,side:`tl`});break;case`TR`:tr({targetX:U.value.width/2-U.value.left,targetY:0,targetW:U.value.width/2+U.value.left,targetH:U.value.height/2+U.value.top,side:`tr`});break;case`BR`:tr({targetX:U.value.width/2-U.value.left,targetY:U.value.height/2-U.value.top,targetW:U.value.width/2+U.value.left,targetH:U.value.height/2+U.value.top,side:`br`});break;case`BL`:tr({targetX:0,targetY:U.value.height/2-U.value.top,targetW:U.value.width/2+U.value.left,targetH:U.value.height/2+U.value.top,side:`bl`});break;default:W.value.startX=0,W.value.startY=0,W.value.width=U.value.width,W.value.height=U.value.height}A.value=!0}}}let nr=d(()=>{let e=P.value.graduations.steps,t=U.value.usableWidth/(e*2),n=U.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:U.value.padding+t*i,y:n+U.value.usableHeight*(i/e/2),height:U.value.usableHeight*(1-i/e),width:U.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),J=d(()=>{let e=P.value.xAxis.max,t=P.value.xAxis.min,n=P.value.yAxis.max,r=P.value.yAxis.min;return P.value.xAxis.auto&&(e=Math.max(...rr.value.flatMap(e=>e.series.map(e=>e.x))),t=Math.min(...rr.value.flatMap(e=>e.series.map(e=>e.x)))),P.value.yAxis.auto&&(n=Math.max(...rr.value.flatMap(e=>e.series.map(e=>e.y))),r=Math.min(...rr.value.flatMap(e=>e.series.map(e=>e.y)))),{x:{max:e,min:t},y:{max:n,min:r}}}),Y=S([]),rr=d(()=>Ln.value.map((e,t)=>({...e,series:oe({data:e.series,threshold:M.value.downsample.threshold}),id:`cat_${t}_${k.value}`,color:ee(e.color)||Zn.value[t]||o[t]}))),ir=d(()=>rr.value.filter(e=>!Y.value.includes(e.id))),ar=d(()=>rr.value.map((e,t)=>({...e,shape:e.shape||`circle`,series:e.series.map(t=>({...t,x:or(t.x),y:sr(t.y),xValue:t.x,yValue:t.y,quadrantSide:_r({x:t.x,y:t.y}),categoryName:e.name,category:e,shape:e.shape,color:e.color}))}))),X=d(()=>(Wn.value&&Ln.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&ie({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&ie({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),ir.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||Zn.value[t]||o[t],series:e.series.map(t=>({...t,category:e,x:or(t.x),y:sr(t.y),xValue:t.x,yValue:t.y,quadrantSide:_r({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:te()}))}))));function or(e){if(e>=0){let t=e/J.value.x.max;return U.value.centerX+U.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(J.value.x.min);return U.value.centerX-U.value.usableWidth/2*t}}function sr(e){if(e>=0){let t=e/J.value.y.max;return U.value.centerY+(1-U.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(J.value.y.min);return U.value.centerY-(1-U.value.usableHeight/2*t)}}let cr=d(()=>{let e=X.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=P.value.xAxis.name||`x`,n=P.value.yAxis.name||`y`;return{head:[M.value.translations.category,M.value.translations.item,t,n,M.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),itsShapes:e.map(e=>({shape:e.shape,color:e.color})),tableData:e}}),lr=d(()=>{let e=cr.value.head,t=cr.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,l(F.value.plotLabels.x.formatter,e.x,n({v:e.x,r:F.value.plotLabels.rounding})),l(F.value.plotLabels.y.formatter,e.y,n({v:e.y,r:F.value.plotLabels.rounding})),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:e}});function ur(){Y.value.length?Y.value=[]:fr.value.forEach(e=>{Y.value.push(e.id)}),gn(`selectLegend`,Er())}function dr(e){Y.value.includes(e)?Y.value=Y.value.filter(t=>t!==e):Y.value.push(e),gn(`selectLegend`,Er())}let fr=d(()=>ar.value.map(e=>({name:e.name,shape:e.shape,color:e.color,id:e.id,opacity:Y.value.includes(e.id)?.5:1,segregate:()=>dr(e.id),isSegregated:Y.value.includes(e.id)})));function pr(e){return fr.value.length?fr.value.find(t=>t.name===e)||(Wn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(Wn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function mr(e){let t=pr(e);t!==null&&Y.value.includes(t.id)&&dr(t.id)}function hr(e){let t=pr(e);t!==null&&(Y.value.includes(t.id)||dr(t.id))}let gr=d(()=>({cy:`quadrant-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``}));function _r(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=S(null),vr=S(null),yr=S(null);function br(){Z.value=null,vr.value=null,An.value=null,jn.value=null,_n.value=!1}function xr(e){if(!z.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=z.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();Mn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function Sr(e,t,r,i=`pointer`,o=null){M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:r}),Z.value=t.uid,vr.value={color:e.color,shape:e.shape},Nn.value=i,An.value=o,jn.value=t.uid,yr.value={datapoint:t,seriesIndex:r,series:X.value,config:M.value};let s=I.value.customFormat;if(a(s)&&ce(()=>s({seriesIndex:r,datapoint:t,series:X.value,config:M.value})))vn.value=s({seriesIndex:r,datapoint:t,series:X.value,config:M.value});else{let i=``;t.quadrantSide&&(i+=`<div style="color:${F.value.quadrantLabels[t.quadrantSide].color};font-weight:${F.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${F.value.quadrantLabels[t.quadrantSide].text}</div>`),i+=`<div>${e.name}</div>`,i+=`<div style="padding-bottom:6px;border-bottom:1px solid ${I.value.borderColor};margin-bottom:3px">${t.name}</div>`,i+=`<div>${P.value.xAxis.name?P.value.xAxis.name:`x`}: <b>${l(F.value.plotLabels.x.formatter,t.xValue,n({v:t.xValue,r:I.value.roundingValue}),{datapoint:t,category:e,categoryIndex:r})}</b></div>`,i+=`<div>${P.value.yAxis.name?P.value.yAxis.name:`y`}: <b>${l(F.value.plotLabels.y.formatter,t.yValue,n({v:t.yValue,r:I.value.roundingValue}),{datapoint:t,category:e,categoryIndex:r})}</b></div>`,vn.value=`<div style="text-align:left;font-size:${I.value.fontSize}px">${i}</div>`}i===`keyboard`&&We(()=>{xr(t.uid)}),_n.value=!0}function Cr(e,t){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(jn.value!==e.uid||Nn.value!==`keyboard`)&&(_n.value=!1,Z.value=null,vr.value=null)}function wr(e,t,n){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text};gn(`selectPlot`,r)}function Tr(e){if(!e)return;let t=X.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:F.value.quadrantLabels[e].text,items:[...t]};gn(`selectSide`,n)}let Q=d(()=>({TL:{tl:{x:U.value.left+U.value.usableWidth/4-20,y:0,fill:F.value.quadrantLabels.tl.color},tr:{x:U.value.left+U.value.usableWidth/4,y:0,fill:F.value.quadrantLabels.tr.color},br:{x:U.value.left+U.value.usableWidth/4,y:20,fill:F.value.quadrantLabels.br.color},bl:{x:U.value.left+U.value.usableWidth/4-20,y:20,fill:F.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${U.value.left+U.value.usableWidth/4-20},20 ${U.value.left+U.value.usableWidth/4+20},20`,vertical:`M ${U.value.left+U.value.usableWidth/4},0 ${U.value.left+U.value.usableWidth/4},40`}},TR:{tl:{x:U.value.centerX+U.value.usableWidth/4-20,y:0,fill:F.value.quadrantLabels.tl.color},tr:{x:U.value.centerX+U.value.usableWidth/4,y:0,fill:F.value.quadrantLabels.tr.color},br:{x:U.value.centerX+U.value.usableWidth/4,y:20,fill:F.value.quadrantLabels.br.color},bl:{x:U.value.centerX+U.value.usableWidth/4-20,y:20,fill:F.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${U.value.centerX+U.value.usableWidth/4-20},20 ${U.value.centerX+U.value.usableWidth/4+20},20`,vertical:`M ${U.value.centerX+U.value.usableWidth/4},0 ${U.value.centerX+U.value.usableWidth/4},40`}},BR:{tl:{x:U.value.centerX+U.value.usableWidth/4-20,y:U.value.centerY-48,fill:F.value.quadrantLabels.tl.color},tr:{x:U.value.centerX+U.value.usableWidth/4,y:U.value.centerY-48,fill:F.value.quadrantLabels.tr.color},br:{x:U.value.centerX+U.value.usableWidth/4,y:U.value.centerY-28,fill:F.value.quadrantLabels.br.color},bl:{x:U.value.centerX+U.value.usableWidth/4-20,y:U.value.centerY-28,fill:F.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${U.value.centerX+U.value.usableWidth/4-20},${U.value.centerY-28} ${U.value.centerX+U.value.usableWidth/4+20},${U.value.centerY-28}`,vertical:`M ${U.value.centerX+U.value.usableWidth/4},${U.value.centerY-48} ${U.value.centerX+U.value.usableWidth/4},${U.value.centerY-8}`}},BL:{tl:{x:U.value.left+U.value.usableWidth/4-20,y:U.value.centerY-48,fill:F.value.quadrantLabels.tl.color},tr:{x:U.value.left+U.value.usableWidth/4,y:U.value.centerY-48,fill:F.value.quadrantLabels.tr.color},br:{x:U.value.left+U.value.usableWidth/4,y:U.value.centerY-28,fill:F.value.quadrantLabels.br.color},bl:{x:U.value.left+U.value.usableWidth/4-20,y:U.value.centerY-28,fill:F.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${U.value.left+U.value.usableWidth/4-20},${U.value.centerY-28} ${U.value.left+U.value.usableWidth/4+20},${U.value.centerY-28}`,vertical:`M ${U.value.left+U.value.usableWidth/4},${U.value.centerY-48} ${U.value.left+U.value.usableWidth/4},${U.value.centerY-8}`}}}));function Er(){return X.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:F.value.quadrantLabels[e.quadrantSide].text}))}))}function Dr(e=null){We(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=cr.value.head,r=cr.value.body,a=t.concat([n]).concat(r),o=i(a);e?e(o):se({csvContent:o,title:L.value.title.text||`vue-ui-quadrant`})})}let Or=S(!1);function kr(e){Or.value=e,yn.value+=1}function Ar(){V.value.showTable=!V.value.showTable}function jr(){V.value.plotLabels.show=!V.value.plotLabels.show}function Mr(){V.value.showTooltip=!V.value.showTooltip}let Nr=S(!1);function Pr(){Nr.value=!Nr.value}let Fr=ye(j,()=>L.value.title.text),Ir=d(()=>Ce({config:M,style:L,mutableConfig:V,dialog:pn,accordion:cn,isFullscreen:Or,parent:j,maxWidth:800,isCursorPointer:R}));Xe(()=>V.value.showTable,e=>Se(e,M,On));function Lr(){V.value.showTable=!1,kn.value&&kn.value.setTableIconState(!1)}let Rr=d(()=>L.value.backgroundColor),zr=d(()=>L.value.legend),Br=d(()=>L.value.title),{isCallbackImaging:Vr,isCallbackSvg:Hr,generateSvg:Ur,onGenerateImage:Wr}=xe({svg:z,title:Br,legend:zr,legendItems:fr,backgroundColor:Rr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Yn});async function Gr(){if(gn(`copyAlt`,{config:M.value,dataset:ir.value}),!M.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:ir.value}))}function Kr(){An.value=null,jn.value=null,Pn.value=!0}function qr(){br(),Pn.value=!1}function Jr(e){if(!z.value||Nr.value||document.activeElement!==z.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){br();return}if(r){if(An.value===null)return;let e=$.value[An.value];if(!e)return;wr(e.category,e.plot,e.categoryIndex);return}let a=An.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ee=$.value[a];ee&&Sr(ee.category,ee.plot,ee.categoryIndex,`keyboard`,a)}let Yr=d(()=>({headers:lr.value?.colNames??[],rows:lr.value?.a11yBody??[]})),$=d(()=>X.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return _e({getData:Er,getImage:Fr,generatePdf:Jn,generateCsv:Dr,generateImage:Yn,generateSvg:Ur,hideSeries:hr,showSeries:mr,toggleTable:Ar,toggleLabels:jr,toggleTooltip:Mr,toggleAnnotator:Pr,toggleFullscreen:kr,copyAlt:Gr}),(e,t)=>(x(),m(`div`,{class:v(`vue-data-ui-component vue-ui-quadrant ${Or.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:j,id:`vue-ui-quadrant_${k.value}`,style:b(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};${M.value.responsive?`height: 100%`:``}`),onMouseenter:t[14]||=()=>E(zn)(!0),onMouseleave:t[15]||=()=>{E(zn)(!1),Pn.value||br()}},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,T(M.value.a11y.translations.keyboardNavigation),1)],8,$e),Yr.value?.rows?.length?(x(),f(Pe,{key:0,uid:k.value,head:Yr.value.headers,body:Yr.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),N.value.buttons.annotator?(x(),f(E(un),{key:1,svgRef:E(z),backgroundColor:L.value.backgroundColor,color:L.value.color,active:Nr.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:Pr},Be({_:2},[C(E(Te),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(_(E(we)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Xn.value?(x(),m(`div`,{key:2,ref_key:`noTitle`,ref:Cn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),L.value.title.text?(x(),m(`div`,{key:3,ref_key:`chartTitle`,ref:bn,style:`width:100%;background:transparent;padding-bottom:12px`},[(x(),f(be,{key:`table_${wn.value}`,config:{title:{cy:`quadrant-title`,...L.value.title},subtitle:{cy:`quadrant-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${k.value}`},null,8,et),N.value.show&&hn.value&&(E(Bn)||E(Rn))?(x(),f(E(dn),{ref_key:`userOptionsRef`,ref:kn,key:`user_options_${yn.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isImaging:E(qn),isPrinting:E(Kn),uid:k.value,hasTooltip:N.value.buttons.tooltip&&I.value.show,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasLabel:N.value.buttons.labels,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Or.value,isTooltip:V.value.showTooltip,titles:{...N.value.buttonTitles},chartElement:j.value,position:N.value.position,hasAnnotator:N.value.buttons.annotator,isAnnotation:Nr.value,callbacks:N.value.callbacks,printScale:N.value.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:kr,onGeneratePdf:E(Jn),onGenerateCsv:Dr,onGenerateImage:E(Wr),onGenerateSvg:E(Ur),onToggleTable:Ar,onToggleLabels:jr,onToggleTooltip:Mr,onToggleAnnotator:Pr,onCopyAlt:Gr,style:b({visibility:E(Bn)?E(Rn)?`visible`:`hidden`:`visible`})},Be({_:2},[C(E(Ee)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(_(E(De)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,tt,[(x(),m(`svg`,{ref_key:`svgRef`,ref:z,xmlns:E(ue),"aria-describedby":`chart-instructions-${k.value}`,class:v({"vue-data-ui-fullscreen--on":Or.value,"vue-data-ui-fulscreen--off":!Or.value}),viewBox:`${W.value.startX} ${W.value.startY} ${W.value.width} ${W.value.height}`,style:b(`max-width:100%;overflow:hidden;background:transparent;color:${L.value.color}`),id:`svg_${k.value}`,tabindex:`0`,onFocus:Kr,onBlur:qr,onKeydown:Jr},[He(E(fn)),e.$slots[`chart-background`]?(x(),m(`foreignObject`,{key:0,x:W.value.startX,y:W.value.startY,width:W.value.width,height:W.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,rt)):p(``,!0),h(`defs`,null,[(x(!0),m(u,null,C(X.value,(e,t)=>(x(),f(Me,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${k.value}_${t}`,key:`quadrant_gradient_${k.value}_${t}`,stops:[[`0%`,E(c)(E(ne)(e.color,.05),L.value.layout.areas.opacity),1],[`100%`,E(c)(e.color,L.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),P.value.graduations.show?(x(),m(`g`,it,[(x(!0),m(u,null,C(nr.value,e=>(x(),m(`rect`,{fill:P.value.graduations.fill?E(c)(P.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":P.value.graduations.strokeWidth,stroke:P.value.graduations.stroke,rx:P.value.graduations.roundingForce},null,8,at))),256))])):p(``,!0),h(`line`,{x1:U.value.left,y1:U.value.centerY,x2:U.value.right,y2:U.value.centerY,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,ot),h(`line`,{x1:U.value.centerX,y1:U.value.top,x2:U.value.centerX,y2:U.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,st),P.value.showArrows?(x(),m(`g`,ct,[h(`polygon`,{points:`${U.value.right-8},${U.value.centerY-6} ${U.value.right},${U.value.centerY} ${U.value.right-8},${U.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,lt),h(`polygon`,{points:`${U.value.left+8},${U.value.centerY-6} ${U.value.left},${U.value.centerY} ${U.value.left+8},${U.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,ut),h(`polygon`,{points:`${U.value.centerX-6},${U.value.top+8} ${U.value.centerX},${U.value.top} ${U.value.centerX+6},${U.value.top+8}`,fill:P.value.stroke,stroke:`none`},null,8,dt),h(`polygon`,{points:`${U.value.centerX-6},${U.value.bottom-8} ${U.value.centerX},${U.value.bottom} ${U.value.centerX+6},${U.value.bottom-8}`,fill:P.value.stroke,stroke:`none`},null,8,ft)])):p(``,!0),F.value.quadrantLabels.show&&!A.value?(x(),m(`g`,pt,[F.value.quadrantLabels.tl.text?(x(),m(`text`,{key:0,x:0,y:U.value.top-U.value.padding/2,"text-anchor":`start`,fill:F.value.quadrantLabels.tl.color,"font-size":F.value.quadrantLabels.tl.fontSize,style:b(`font-weight:${F.value.quadrantLabels.tl.bold?`bold`:``}`),onClick:t[0]||=e=>Tr(`tl`)},T(F.value.quadrantLabels.tl.text),13,mt)):p(``,!0),F.value.quadrantLabels.tr.text?(x(),m(`text`,{key:1,x:U.value.width,y:U.value.top-U.value.padding/2,"text-anchor":`end`,fill:F.value.quadrantLabels.tr.color,"font-size":F.value.quadrantLabels.tr.fontSize,style:b(`font-weight:${F.value.quadrantLabels.tr.bold?`bold`:``}`),onClick:t[1]||=e=>Tr(`tr`)},T(F.value.quadrantLabels.tr.text),13,ht)):p(``,!0),F.value.quadrantLabels.br.text?(x(),m(`text`,{key:2,x:U.value.width,y:U.value.bottom+U.value.padding*.7,"text-anchor":`end`,fill:F.value.quadrantLabels.br.color,"font-size":F.value.quadrantLabels.br.fontSize,style:b(`font-weight:${F.value.quadrantLabels.br.bold?`bold`:``}`),onClick:t[2]||=e=>Tr(`br`)},T(F.value.quadrantLabels.br.text),13,gt)):p(``,!0),F.value.quadrantLabels.bl.text?(x(),m(`text`,{key:3,x:0,y:U.value.bottom+U.value.padding*.7,"text-anchor":`start`,fill:F.value.quadrantLabels.bl.color,"font-size":F.value.quadrantLabels.bl.fontSize,style:b(`font-weight:${F.value.quadrantLabels.bl.bold?`bold`:``}`),onClick:t[3]||=e=>Tr(`bl`)},T(F.value.quadrantLabels.bl.text),13,_t)):p(``,!0)])):p(``,!0),F.value.axisLabels.show?(x(),m(`g`,vt,[P.value.yAxis.show?(x(),m(`text`,{key:0,x:U.value.centerX,y:U.value.top-U.value.padding/6,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},T(E(l)(F.value.plotLabels.y.formatter,J.value.y.max,E(n)({v:J.value.y.max,r:F.value.plotLabels.rounding}))),9,yt)):p(``,!0),h(`text`,{x:U.value.centerX,y:U.value.top-U.value.padding/2,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},T(P.value.yAxis.name),9,bt),P.value.yAxis.show?(x(),m(`text`,{key:1,x:U.value.centerX,y:U.value.bottom+U.value.padding*.35,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.negative},T(E(l)(F.value.plotLabels.y.formatter,J.value.y.min,E(n)({v:J.value.y.min,r:F.value.plotLabels.rounding}))),9,xt)):p(``,!0),P.value.xAxis.show?(x(),m(`text`,{key:2,id:`xLabelMin_${k.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${U.value.padding-F.value.axisLabels.fontSize}, ${U.value.height/2}), rotate(-90)`,fill:F.value.axisLabels.color.negative},T(E(l)(F.value.plotLabels.x.formatter,J.value.x.min,E(n)({v:J.value.x.min,r:F.value.plotLabels.rounding}))),9,St)):p(``,!0),P.value.xAxis.show?(x(),m(`text`,{key:3,id:`xLabelMax_${k.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${U.value.width-U.value.padding+F.value.axisLabels.fontSize}, ${U.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},T(E(l)(F.value.plotLabels.x.formatter,J.value.x.max,E(n)({v:J.value.x.max,r:F.value.plotLabels.rounding}))),9,Ct)):p(``,!0),h(`text`,{id:`xLabelMaxName_${k.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${U.value.width-F.value.axisLabels.fontSize}, ${U.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},T(P.value.xAxis.name),9,wt)])):p(``,!0),L.value.layout.areas.show?(x(),m(`g`,Tt,[(x(!0),m(u,null,C(X.value,(e,t)=>(x(),m(`g`,null,[e.series.length>2?(x(),m(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:L.value.layout.areas.useGradient?`url(#quadrant_gradient_${k.value}_${t})`:E(c)(e.color,L.value.layout.areas.opacity),points:E(r)(e)},null,8,Et)):p(``,!0)]))),256))])):p(``,!0),h(`g`,null,[h(`rect`,{onClick:t[4]||=e=>q(`TL`),x:U.value.left,y:U.value.top,width:U.value.usableWidth/2<=0?.001:U.value.usableWidth/2,height:U.value.usableHeight/2<=0?.001:U.value.usableHeight/2,fill:`transparent`,class:v({"vue-data-ui-zoom-plus":!A.value&&K.value,"vue-data-ui-zoom-minus":A.value&&K.value})},null,10,Dt),h(`rect`,{onClick:t[5]||=e=>q(`TR`),x:U.value.centerX,y:U.value.top,width:U.value.usableWidth/2<=0?.001:U.value.usableWidth/2,height:U.value.usableHeight/2<=0?.001:U.value.usableHeight/2,fill:`transparent`,class:v({"vue-data-ui-zoom-plus":!A.value&&K.value,"vue-data-ui-zoom-minus":A.value&&K.value})},null,10,Ot),h(`rect`,{onClick:t[6]||=e=>q(`BR`),x:U.value.centerX,y:U.value.centerY,width:U.value.usableWidth/2<=0?.001:U.value.usableWidth/2,height:U.value.usableHeight/2<=0?.001:U.value.usableHeight/2,fill:`transparent`,class:v({"vue-data-ui-zoom-plus":!A.value&&K.value,"vue-data-ui-zoom-minus":A.value&&K.value})},null,10,kt),h(`rect`,{onClick:t[7]||=e=>q(`BL`),x:U.value.left,y:U.value.centerY,width:U.value.usableWidth/2<=0?.001:U.value.usableWidth/2,height:U.value.usableHeight/2<=0?.001:U.value.usableHeight/2,fill:`transparent`,class:v({"vue-data-ui-zoom-plus":!A.value&&K.value,"vue-data-ui-zoom-minus":A.value&&K.value})},null,10,At)]),F.value.plotLabels.showAsTag?(x(),m(u,{key:7},[V.value.plotLabels.show?(x(),m(`g`,Lt,[(x(!0),m(u,null,C(X.value,(e,t)=>(x(),m(u,null,[(x(!0),m(u,null,C(e.series,n=>(x(),m(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-F.value.plotLabels.fontSize,onMouseover:r=>Sr(e,n,t),onMouseleave:e=>Cr(n,t),onClick:r=>wr(e,n,t)},[h(`div`,{style:b(`color:${E(le)(e.color)};margin: 0 auto; font-size:${F.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},T(n.name),5)],40,Rt))),256))],64))),256))])):p(``,!0)],64)):(x(),m(u,{key:6},[(x(!0),m(u,null,C(X.value,(t,n)=>(x(),m(`g`,null,[e.$slots.datapoint&&!E(In)?(x(!0),m(u,{key:0},C(t.series,r=>(x(),m(`g`,{key:r.uid},[(x(),m(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>Sr(t,r,n),onMouseleave:e=>Cr(r,n),onClick:e=>wr(t,r,n)},[w(e.$slots,`datapoint`,Ue({ref_for:!0},{datapoint:{...r,onEnter:()=>Sr(t,r,n),onLeave:()=>Cr(r,n),onClick:()=>wr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)],40,jt)),h(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(L.value.layout.plots.radius/(A.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Mt)]))),128)):e.$slots.datapointSvg&&!E(In)?(x(!0),m(u,{key:1},C(t.series,r=>(x(),m(`g`,{key:r.uid},[w(e.$slots,`datapointSvg`,Ue({ref_for:!0},{datapoint:{...r,onEnter:()=>Sr(t,r,n),onLeave:()=>Cr(r,n),onClick:()=>wr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)]))),128)):(x(!0),m(u,{key:2},C(t.series,(e,r)=>(x(),m(`g`,{key:e.uid},[He(ke,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:L.value.layout.plots.radius/(A.value?1.5:1),shape:t.shape,stroke:L.value.layout.plots.outline?L.value.layout.plots.outlineColor:`none`,strokeWidth:L.value.layout.plots.outlineWidth,onMouseenter:r=>Sr(t,e,n,`pointer`),onMouseleave:t=>Cr(e,n),onClick:r=>wr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),h(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(L.value.layout.plots.radius/(A.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Nt)]))),128))]))),256)),V.value.plotLabels.show?(x(),m(`g`,Pt,[(x(!0),m(u,null,C(X.value,e=>(x(),m(`g`,null,[(x(!0),m(u,null,C(e.series,e=>(x(),m(`g`,null,[String(e.name).includes(`
2
+ `)?(x(),m(`text`,{key:1,x:e.x,y:e.y+F.value.plotLabels.offsetY+L.value.layout.plots.radius,"text-anchor":`middle`,"font-size":F.value.plotLabels.fontSize/(A.value?1.5:1),fill:F.value.plotLabels.color,innerHTML:E(s)({content:String(e.name),fontSize:L.value.layout.labels.plotLabels.fontSize/(A.value?1.5:1),fill:L.value.layout.labels.plotLabels.color,x:e.x,y:e.y+L.value.layout.labels.plotLabels.offsetY+L.value.layout.plots.radius})},null,8,It)):(x(),m(`text`,{key:0,x:e.x,y:e.y+F.value.plotLabels.offsetY+L.value.layout.plots.radius,"text-anchor":`middle`,"font-size":F.value.plotLabels.fontSize/(A.value?1.5:1),fill:F.value.plotLabels.color},T(e.name),9,Ft))]))),256))]))),256))])):p(``,!0)],64)),A.value?(x(),m(`g`,zt,[G.value===`TL`?(x(),m(`polygon`,{key:0,points:`${U.value.left-1},${U.value.centerY} ${U.value.centerX},${U.value.centerY} ${U.value.centerX},${U.value.top-1} ${U.value.right},${U.value.top-1} ${U.value.right},${U.value.bottom} ${U.value.left-1},${U.value.bottom} ${U.value.left-1},${U.value.centerY}`,fill:L.value.backgroundColor,style:{opacity:`1`}},null,8,Bt)):p(``,!0),G.value===`TR`?(x(),m(`polygon`,{key:1,points:`${U.value.left},${U.value.top-1} ${U.value.centerX},${U.value.top-1} ${U.value.centerX},${U.value.centerY} ${U.value.right+1},${U.value.centerY} ${U.value.right+1},${U.value.bottom} ${U.value.left},${U.value.bottom} ${U.value.left},${U.value.top-1}`,fill:L.value.backgroundColor,style:{opacity:`1`}},null,8,Vt)):p(``,!0),G.value===`BR`?(x(),m(`polygon`,{key:2,points:`${U.value.left},${U.value.top} ${U.value.right+1},${U.value.top} ${U.value.right+1},${U.value.centerY} ${U.value.centerX},${U.value.centerY} ${U.value.centerX},${U.value.bottom+1} ${U.value.left},${U.value.bottom+1} ${U.value.left},${U.value.top}`,fill:L.value.backgroundColor,style:{opacity:`1`}},null,8,Ht)):p(``,!0),G.value===`BL`?(x(),m(`polygon`,{key:3,points:`${U.value.left-1},${U.value.top} ${U.value.right},${U.value.top} ${U.value.right},${U.value.bottom+1} ${U.value.centerX},${U.value.bottom+1} ${U.value.centerX},${U.value.centerY} ${U.value.left-1},${U.value.centerY} ${U.value.left-1},${U.value.top}`,fill:L.value.backgroundColor,style:{opacity:`1`}},null,8,Ut)):p(``,!0)])):p(``,!0),G.value&&!er.value?(x(),m(`g`,Wt,[h(`text`,{x:Qn.value.x,y:Qn.value.y-Qn.value.fontSize/1.5,"font-size":Qn.value.fontSize/1.5,fill:Qn.value.fill,"text-anchor":`middle`,"font-weight":Qn.value.bold?`bold`:`normal`},T(Qn.value.text),9,Gt)])):p(``,!0),A.value&&G.value?(x(),m(`g`,Kt,[h(`rect`,{x:Q.value[G.value].tl.x,y:Q.value[G.value].tl.y,height:`20`,width:`20`,fill:Q.value[G.value].tl.fill,style:b(`cursor: ${R.value?`pointer`:`default`}; opacity: ${G.value===`TL`?1:.2}`),onClick:t[8]||=e=>q(`TL`),class:v({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":G.value!==`TL`})},null,14,qt),h(`rect`,{x:Q.value[G.value].tr.x,y:Q.value[G.value].tr.y,height:`20`,width:`20`,fill:Q.value[G.value].tr.fill,style:b(`cursor: ${R.value?`pointer`:`default`}; opacity: ${G.value===`TR`?1:.2}`),onClick:t[9]||=e=>q(`TR`),class:v({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":G.value!==`TR`})},null,14,Jt),h(`rect`,{x:Q.value[G.value].br.x,y:Q.value[G.value].br.y,height:`20`,width:`20`,fill:Q.value[G.value].br.fill,style:b(`cursor: ${R.value?`pointer`:`default`}; opacity: ${G.value===`BR`?1:.2}`),onClick:t[10]||=e=>q(`BR`),class:v({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":G.value!==`BR`})},null,14,Yt),h(`rect`,{x:Q.value[G.value].bl.x,y:Q.value[G.value].bl.y,height:`20`,width:`20`,fill:Q.value[G.value].bl.fill,style:b(`cursor: ${R.value?`pointer`:`default`}; opacity: ${G.value===`BL`?1:.2}`),onClick:t[11]||=e=>q(`BL`),class:v({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":G.value!==`BL`})},null,14,Xt),h(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:L.value.backgroundColor,"stroke-width":1,d:Q.value[G.value].crosshairs.horizontal},null,8,Zt),h(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:L.value.backgroundColor,"stroke-width":1,d:Q.value[G.value].crosshairs.vertical},null,8,Qt)])):p(``,!0),w(e.$slots,`svg`,{svg:{...U.value,isPrintingImg:E(Kn)||E(qn)||E(Vr),isPrintingSvg:E(Hr)}},void 0,!0)],46,nt)),e.$slots.hint?(x(),m(`div`,$t,[w(e.$slots,`hint`,y(_({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Pn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(x(),m(`div`,en,[w(e.$slots,`watermark`,y(_({isPrinting:E(Kn)||E(qn)||E(Vr)||E(Hr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${k.value}`},null,8,tn),Dn.value&&(L.value.legend.show||e.$slots.legend)?(x(),f(ze,{key:6,to:L.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[h(`div`,{ref_key:`chartLegend`,ref:xn},[w(e.$slots,`legend`,{legend:fr.value},()=>[L.value.legend.show?(x(),f(Le,{key:`legend_${En.value}`,legendSet:fr.value,config:gr.value,isCursorPointer:R.value,onClickMarker:t[12]||=({legend:e})=>dr(e.id)},{item:D(({legend:e})=>[E(In)?p(``,!0):(x(),m(`div`,{key:0,onClick:t=>dr(e.id),style:b(`opacity:${Y.value.includes(e.id)?.5:1}`)},T(e.name),13,nn))]),legendToggle:D(()=>[fr.value.length>2&&L.value.legend.selectAllToggle.show&&!E(In)?(x(),f(Ne,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:Y.value.length>0,isCursorPointer:R.value,onToggle:ur},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(x(),m(`div`,{key:7,ref_key:`source`,ref:Sn,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),He(E(on),{teleportTo:I.value.teleportTo,show:V.value.showTooltip&&_n.value,backgroundColor:I.value.backgroundColor,color:I.value.color,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,fontSize:I.value.fontSize,backgroundOpacity:I.value.backgroundOpacity,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:j.value,content:vn.value,isFullscreen:Or.value,isCustom:I.value.customFormat&&typeof I.value.customFormat==`function`,smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:Nn.value===`keyboard`,a11yPosition:Mn.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(_({...yr.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(_({...yr.value})),void 0,!0)]),"tooltip-after":D(()=>[w(e.$slots,`tooltip-after`,y(_({...yr.value})),void 0,!0)]),default:D(()=>[I.value.showShape?(x(),m(`svg`,rn,[He(ke,{plot:{x:10,y:10},shape:vr.value.shape,color:vr.value.color,radius:8,stroke:L.value.layout.plots.outline?L.value.layout.plots.outlineColor:`none`,"stroke-width":L.value.layout.plots.outlineWidth},null,8,[`shape`,`color`,`stroke`,`stroke-width`])])):p(``,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),hn.value&&N.value.buttons.table?(x(),f(qe(Ir.value.component),Ue({key:8},Ir.value.props,{ref_key:`tableUnit`,ref:On,onClose:Lr}),Be({content:D(()=>[(x(),f(E(ln),{key:`table_${Tn.value}`,colNames:lr.value.colNames,head:lr.value.head,body:lr.value.body,config:lr.value.config,title:M.value.table.useDialog?``:Ir.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:R.value,onClose:Lr},{th:D(({th:e})=>[Ve(T(e),1)]),td:D(({td:e})=>[h(`div`,{innerHTML:e.name||e},null,8,an)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:D(()=>[Ve(T(Ir.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:D(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[13]||=e=>Dr(N.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[He(E(sn),{name:`fileCsv`,stroke:Ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),w(e.$slots,`skeleton`,{},()=>[E(In)?(x(),f(me,{key:0})):p(``,!0)],!0)],46,Qe))}},[[`__scopeId`,`data-v-e04c7a19`]]);export{Ze as n,on as t};
@@ -0,0 +1,17 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{$ as n,Dt as r,Ht as i,It as a,J as o,Kt as s,P as c,S as ee,X as l,_ as te,at as ne,b as u,et as re,f as d,h as ie,i as f,in as ae,nn as oe,p as se,pt as ce,t as le,w as ue,zt as de}from"./lib-DqD8nbyX.js";import{n as fe,t as pe}from"./BaseScanner-8NdoBs7B.js";import{n as me,t as he}from"./useHints-BH9r_0Vd.js";import{t as ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as _e}from"./useNestedProp-DrLnzyHO.js";import{t as ve}from"./useThemeCheck-BKNRbGeC.js";import{t as ye}from"./img-DiP2_5_r.js";import{t as be}from"./useChartExport-DtPNpc9M.js";import{n as xe,t as Se}from"./annotationSlots-BRR85CqJ.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./useTimeLabels-Das5O74F.js";import{t as Ee}from"./usePrinter-Cj4eIYC_.js";import{t as De}from"./useTransitions-DfSHzsdz.js";import{t as Oe}from"./useStableElementSize-CegFbRlF.js";import{t as ke}from"./useTimeLabelCollider-XQf_S7-z.js";import{l as Ae,t as je}from"./useResponsive-D2CPcpda.js";import{t as Me}from"./SlicerPreview-Dpu4nMz6.js";import{t as Ne}from"./BaseLegendToggle-BOcw1ke8.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./vue_ui_quick_chart-BRfcRW6Z.js";import{Fragment as p,Teleport as Le,computed as m,createBlock as Re,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as He,mergeProps as Ue,nextTick as We,normalizeClass as v,normalizeProps as Ge,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,shallowRef as Je,toDisplayString as w,toRefs as Ye,unref as T,watch as Xe,watchEffect as Ze,withCtx as Qe}from"vue";var E={LINE:`LINE`,BAR:`BAR`,DONUT:`DONUT`},$e=[`SERIE`,`SERIES`,`DATA`,`VALUE`,`VALUES`,`NUM`];function et({dataset:e,barLineSwitch:t=6,debug:n=!0}){let r=null,i=null,a=0;if((typeof e==`number`||typeof e==`string`)&&n&&console.warn(`The provided dataset (${e}) is not sufficient to build a chart`),nt(e)&&(D(e)&&(r=e.length<t?E.BAR:E.LINE,i=e,a=e.length),rt(e))){if(!at(e))return n&&console.warn(`The objects in the dataset array have a different data structure. Either keys or value types are different.`),!1;let o=Object.keys(e[0]),s=Object.values(e[0]);if(!o.some(e=>ot(e)))return n&&console.warn(`The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important.`),!1;st(s,e=>typeof e==`number`)&&(r=E.DONUT,i=e),st(s,e=>Array.isArray(e)&&D(e))&&(r=ct(e)>t?E.LINE:E.BAR,a=ct(e),i=e.map(e=>({...e,data:lt(e,e=>D(e))}))),e=e.map(e=>O(e)),i=i.map(e=>O(e))}return{dataset:e,type:r,usableDataset:i,maxSeriesLength:a}}function tt(e){return!e||nt(e)&&!e.length}function nt(e){return Array.isArray(e)}function D(e){if(!nt(e)||tt(e))return!1;let t=e.map(e=>Number(e));return![...new Set(t.flatMap(e=>typeof e==`number`&&!isNaN(e)))].includes(!1)}function rt(e){return!nt(e)||tt(e)||[...new Set(e.flatMap(e=>typeof e==`object`&&!Array.isArray(e)))].includes(!1)?!1:!e.map(e=>Object.keys(e).length>0).includes(!1)}function it(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){let a=n[i],o=r[i];if(a!==o||typeof e[a]!=typeof t[o])return!1}return!0}function at(e){if(e.length<=1)return!0;for(let t=0;t<e.length;t+=1)for(let n=t+1;n<e.length;n+=1)if(!it(e[t],e[n]))return!1;return!0}function ot(e){return $e.includes(e.toUpperCase())}function st(e,t){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n.includes(!0)}function ct(e){return Math.max(...[...e].flatMap(e=>Object.values(e).filter(e=>D(e)).map(e=>e.length)))}function lt(e,t){return Object.values(e).filter(e=>t(e))[0]}function O(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toUpperCase()]=e[n]);return t}var k=/* @__PURE__ */ e({default:()=>Ln}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`aria-describedby`,`viewBox`],ht=[`x`,`y`,`width`,`height`],gt=[`x`,`y`,`width`,`height`],_t=[`width`,`height`],vt=[`id`],yt=[`id`],bt=[`id`],xt=[`flood-color`],St={key:0,class:`donut-label-connectors`},Ct=[`d`,`stroke`,`stroke-width`,`filter`],wt=[`cx`,`cy`,`r`,`fill`,`filter`],Tt={class:`donut`},Et=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Dt=[`d`,`onMouseenter`,`onMouseout`,`onClick`],Ot={key:1,class:`donut-labels`},kt=[`cx`,`cy`,`fill`,`stroke`,`filter`],At=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],jt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Mt={key:2,class:`donut-hollow`},Nt=[`x`,`y`,`font-size`,`fill`],Pt=[`x`,`y`,`font-size`,`fill`],Ft={key:0,class:`line-grid`},It=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Rt={key:1,class:`line-axis`},zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Vt=[`d`,`stroke`,`stroke-width`],Ht=[`transform`,`font-size`,`fill`],Ut={key:3,class:`periodLabels`},Wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Gt={key:0},Kt=[`font-size`,`text-anchor`,`fill`,`transform`],qt=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],Jt={class:`plots`},Yt=[`d`,`stroke`,`stroke-width`],Xt=[`d`,`stroke`,`stroke-width`],Zt=[`d`,`stroke`,`stroke-width`],Qt=[`d`,`stroke`,`stroke-width`],$t=[`cx`,`cy`,`fill`,`stroke`],en={key:4,class:`dataLabels`},tn=[`font-size`,`fill`,`transform`],nn={key:5,class:`tooltip-traps`},rn=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],an={key:0,class:`line-grid`},on=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],sn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],cn={key:1,class:`line-axis`},ln=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],un=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dn=[`d`,`stroke`,`stroke-width`],fn=[`transform`,`font-size`,`fill`],pn={key:3,class:`periodLabels`},mn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],hn={key:0},gn=[`font-size`,`text-anchor`,`fill`,`transform`],_n=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],vn={class:`plots`},yn=[`x`,`width`,`height`,`y`,`fill`,`stroke`,`stroke-width`],bn={key:4,class:`dataLabels`},xn=[`transform`,`font-size`,`fill`],Sn={key:5,class:`tooltip-traps`},Cn=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],wn={key:6,class:`axis-labels`},Tn=[`font-size`,`fill`,`x`,`y`],En=[`font-size`,`fill`,`x`,`y`],Dn=[`font-size`,`fill`,`transform`],On=[`font-size`,`fill`,`transform`],kn=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],An={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},jn={key:5,class:`vue-data-ui-watermark`},Mn=[`id`],Nn=[`onClick`,`onKeydown`],Pn=[`onClick`,`onKeydown`],Fn=[`onClick`,`onKeydown`],In={key:1,class:`vue-ui-quick-chart-not-processable`},Ln=/*#__PURE__*/ ge({__name:`vue-ui-quick-chart`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ge,emit:$e}){let tt=Ve(()=>import(`./BaseIcon-DDctLkeT.js`).then(e=>e.n)),nt=Ve(()=>import(`./PackageVersion-ATrKWi8V.js`).then(e=>e.t)),it=Ve(()=>import(`./PenAndPaper-BsBFp16i.js`).then(e=>e.t)),at=Ve(()=>import(`./Tooltip-Iyb_S6oQ.js`)),ot=Ve(()=>import(`./UserOptions-BSJ_S_us.js`).then(e=>e.n)),{vue_ui_quick_chart:st}=t(),{isThemeValid:ct,warnInvalidTheme:lt}=ve(),O=e,k=x(null),Ln=x(null),Rn=x(null),zn=x(null),A=x(l()),j=x(!1),Bn=x(null),Vn=x(``),M=x(null),Hn=x(null),Un=x(null),N=x([]),Wn=x(0),Gn=x(0),Kn=x(!1),qn=x(null),Jn=x(null),P=x(null),Yn=x(null),Xn=x(null),Zn=x(null),Qn=Je(null),$n=x(!1),er=x(0),tr=x(0),nr=x(!1);function rr(){Qn.value=k.value?.parentNode??null}function ir(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function ar(){let e=++tr.value;$n.value=!1,await We(),await ir(),await ir(),e===tr.value&&(er.value+=1,$n.value=!0)}function or(){nr.value||(nr.value=!0,We(()=>{nr.value=!1,rr(),ar()}))}let sr=Oe({elementRef:Qn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{ar()}});x(`#FFFFFF`);let F=x(xr());me({config:()=>F.value,dataset:()=>O.dataset,component:`VueUiQuickChart`,rules:[he.emptyArray,{test:()=>!0,message:[`👀 This is a swiss-knife component. If you need more control, consider using dedicated components:`,``,`▶️ VueUiXy for time series line and/or bars`,``,`▶️ VueUiDonut, VueUiWaffle, VueUiRings for proportions`]}]});let{transitionEnabled:I}=De({config:()=>F.value.transitions,dataset:()=>O.dataset}),cr=m(()=>F.value.debug),lr=m(()=>F.value.useCursorPointer),L=x(null),ur=x({x:0,y:0}),R=x(`pointer`),dr=x(!1),fr=m(()=>ae({dafaultConfig:{backgroundColor:`#99999930`,customPalette:[`#BABABA`],showDataLabels:!1,paletteStartIndex:0,showUserOptions:!1,showTooltip:!1,xAxisLabel:``,yAxisLabel:``,xyAxisStroke:`#999999`,xyGridStroke:`#99999950`,xyPeriods:[],xyShowScale:!1,xyPaddingLeft:6,xyPaddingBottom:12,zoomXy:!1,zoomStartIndex:null,zoomEndIndex:null},userConfig:F.value.skeletonConfig??{}})),{loading:pr,FINAL_DATASET:mr,manualLoading:hr}=fe({...Ye(O),FINAL_CONFIG:F,prepareConfig:xr,skeletonDataset:O.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89],skeletonConfig:ae({defaultConfig:F.value,userConfig:fr.value})}),{svgRef:z}=Fe({config:{text:F.value.title}}),gr=m(()=>F.value.showUserOptionsOnChartHover),_r=m(()=>F.value.keepUserOptionsStateOnChartLeave),vr=x(!F.value.showUserOptionsOnChartHover),yr=x(!1);function br(e=!1){yr.value=e,gr.value&&(vr.value=e)}function xr(){let e=_e({userConfig:O.config,defaultConfig:st}),t={},n=e.theme;if(n){if(!ct.value(e))lt(e),t=e;else{let r=_e({userConfig:Ie[n]||O.config,defaultConfig:e});t={..._e({userConfig:O.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:oe[n]||i}}}else t=e;return t}function Sr(e){let t=re(e);return t?.tooltipPosition&&delete t.tooltipPosition,JSON.stringify(t)}let Cr=Sr(O.config);Xe(()=>O.config,(e,t)=>{let n=Sr(e),r=n!==Cr;Cr=n;let i=xr();if(!r){F.value.tooltipPosition=i.tooltipPosition,Pr.value.showTooltip=F.value.showTooltip;return}pr.value||(F.value=i),U.value.width=F.value.width,U.value.height=F.value.height,vr.value=!F.value.showUserOptionsOnChartHover,Ir(),Pr.value.showTooltip=F.value.showTooltip},{deep:!0}),Xe(()=>O.dataset,e=>{Array.isArray(e)&&e.length>0&&(hr.value=!1)},{immediate:!0});let wr=m(()=>ue(F.value.customPalette)),B=$e,Tr=m(()=>{let e=et({debug:cr.value,dataset:s(mr.value,[`serie`,`series`,`data`,`value`,`values`,`num`]),barLineSwitch:F.value.chartIsBarUnderDatasetLength});return!e&&cr.value&&console.error(`VueUiQuickChart : Dataset is not processable`),e}),V=x(Tr.value),Er=m(()=>!!V.value),H=m(()=>V.value?V.value.type:null),Dr=m(()=>[E.BAR,E.LINE].includes(H.value)),Or=m(()=>Dr.value&&F.value.zoomXy&&Number(V.value?.maxSeriesLength??0)>1);Xe(()=>H.value,e=>{e||ne({componentName:`VueUiQuickChart`,type:`dataset`,debug:cr.value})},{immediate:!0});let{isPrinting:kr,isImaging:Ar,generatePdf:jr,generateImage:Mr}=Ee({elementId:`${H.value}_${A.value}`,fileName:F.value.title||H.value,options:F.value.userOptionsPrint}),Nr=m(()=>F.value.showUserOptions&&!F.value.title),U=x({width:F.value.width,height:F.value.height}),Pr=x({showTooltip:F.value.showTooltip});Xe(F,()=>{Pr.value={showTooltip:F.value.showTooltip}},{immediate:!0});let W=Je(null),Fr=Je(null);qe(()=>{Kn.value=!0,rr(),sr.start(),Ir(),ar()});function Ir(){if(de(O.dataset)||(hr.value=F.value.loading),F.value.responsive){let e=Ae(()=>{let{width:e,height:t}=je({chart:k.value,title:F.value.title?Ln.value:null,legend:F.value.showLegend?Rn.value:null,slicer:Or.value?zn.value:null,source:Hn.value,noTitle:Un.value});requestAnimationFrame(()=>{U.value.width=e,U.value.height=t,or()})});W.value&&(Fr.value&&W.value.unobserve(Fr.value),W.value.disconnect()),W.value=new ResizeObserver(e),Fr.value=k.value.parentNode,W.value.observe(Fr.value)}gi(),or()}Ke(()=>{sr.stop(),ui(),Pi(),W.value&&(Fr.value&&W.value.unobserve(Fr.value),W.value.disconnect(),W.value=null,Fr.value=null)});let Lr=m(()=>{switch(H.value){case E.LINE:return`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`;case E.BAR:return`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`;case E.DONUT:return`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`;default:return`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`}});function Rr(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}function zr(e){return F.value.blurOnHover&&![null,void 0].includes(M.value)&&M.value!==e?`url(#blur_${A.value})`:``}function Br(){N.value.length?N.value=[]:H.value===E.DONUT?K.value.legend.forEach(e=>{N.value.push(e.id)}):H.value===E.LINE?Z.value.legend.forEach(e=>{N.value.push(e.id)}):H.value===E.BAR&&Q.value.legend.forEach(e=>{N.value.push(e.id)}),H.value===E.DONUT?B(`selectLegend`,K.value.dataset):H.value===E.LINE?B(`selectLegend`,Z.value.dataset):H.value===E.BAR&&B(`selectLegend`,Q.value.dataset)}function Vr(e,t){N.value.includes(e)?N.value=N.value.filter(t=>t!==e):N.value.length<t&&N.value.push(e)}let Hr=x(null),Ur=x(null),Wr=x(!1);function Gr(e,t){Wr.value=!0;let n=e.value,r=Tr.value.dataset.find((t,n)=>e.id===`donut_${n}`).VALUE;if(N.value.includes(e.id)){N.value=N.value.filter(t=>t!==e.id);function t(){n>r?(Wr.value=!1,cancelAnimationFrame(Ur.value),V.value={...V.value,dataset:V.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:r,VALUE:r}:t)},B(`selectLegend`,K.value.dataset)):(n+=r*.025,V.value={...V.value,dataset:V.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Ur.value=requestAnimationFrame(t))}t()}else if(t.length>1){function t(){n<r/100?(Wr.value=!1,cancelAnimationFrame(Hr.value),N.value.push(e.id),V.value={...V.value,dataset:V.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:0,VALUE:0}:t)},B(`selectLegend`,K.value.dataset)):(n/=1.1,V.value={...V.value,dataset:V.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Hr.value=requestAnimationFrame(t))}t()}else B(`selectLegend`,K.value.dataset)}let G=x(null);function Kr(e){G.value=e}let qr=m(()=>F.value.donutThicknessRatio<.01?.01:F.value.donutThicknessRatio>.4?.4:F.value.donutThicknessRatio),K=m(()=>{if(H.value!==E.DONUT)return null;let e=V.value.dataset.map((e,t)=>({...e,value:e.VALUE||e.DATA||e.SERIE||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`donut_${t}`})).map((e,t)=>({...e,color:e.COLOR?ee(e.COLOR):wr.value[t+F.value.paletteStartIndex]||i[t+F.value.paletteStartIndex]||i[(t+F.value.paletteStartIndex)%i.length],immutableValue:e.value}));function t(e,t){return n({v:isNaN(e.value/Rr(t))?0:e.value/Rr(t)*100,s:`%`,r:F.value.dataLabelRoundingPercentage})}function o(e){return e.proportion*100>F.value.donutHideLabelUnderPercentage}function s(e,t){let n=Tr.value.dataset.find((t,n)=>`donut_${n}`===e).VALUE;return Math.abs(String(Number(n.toFixed(0))).length-String(Number(t.toFixed(0))).length)}function c({datapoint:t,seriesIndex:i,triggerMode:a=`pointer`}){Bn.value={datapoint:t,seriesIndex:i,config:F.value,dataset:e},M.value=t.id,L.value=i,R.value=a;let o=F.value.tooltipCustomFormat;if(F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:t,seriesIndex:i}),r(o)&&ce(()=>o({datapoint:t,seriesIndex:i,series:e,config:F.value})))Vn.value=o({datapoint:t,seriesIndex:i,series:e,config:F.value});else{let e=``;e+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,e+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`,e+=`<b>${f(F.value.formatter,t.value,n({p:F.value.valuePrefix,v:t.value,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:i})}</b>`,e+=`<span>(${n({v:t.proportion*100,s:`%`,r:F.value.dataLabelRoundingPercentage})})</span></div>`,Vn.value=`<div>${e}</div>`}j.value=!0}function l({datapoint:e,seriesIndex:t}){F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:e,seriesIndex:t}),j.value=!1,M.value=null,G.value=null,L.value=null,R.value=`pointer`}function te({datapoint:e,seriesIndex:t}){F.value.events.datapointClick&&F.value.events.datapointClick({datapoint:e,seriesIndex:t}),B(`selectDatapoint`,e)}let ne={centerX:U.value.width/2,centerY:U.value.height/2},u=e.filter(e=>!N.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0),re=e.map((e,t)=>({...e,proportion:(e.value||0)/u,value:e.value||0,absoluteValue:Tr.value.dataset.find((t,n)=>`donut_${n}`===e.id).VALUE,shape:`circle`})),d=U.value.width/2,ie=U.value.height/2,ae=U.value.height*F.value.donutRadiusRatio;return{dataset:re.filter(e=>!N.value.includes(e.id)),legend:re,drawingArea:ne,displayArcPercentage:t,isArcBigEnough:o,useTooltip:c,killTooltip:l,selectDatapoint:te,getSpaces:s,total:u,cx:d,cy:ie,radius:ae,chart:a({series:e.filter(e=>!N.value.includes(e.id))},d,ie,ae,ae,1.99999,2,1,360,105.25,U.value.height*qr.value)}}),q=x({start:0,end:V.value.maxSeriesLength}),Jr=x({...q.value}),Yr=x(null),J=x(!1),Xr=x(!1),Zr=x(!1),Y=x(!1),Qr=x(!1),$r=x(null),X=x(null),ei=x(null),ti=x(!1),ni=x({time:0,x:0,y:0,pointerType:null}),ri={show:!1,selection:{fill:`#2D353C`,stroke:`transparent`,fillOpacity:.1,strokeOpacity:.5,strokeWidth:1,strokeDasharray:0}},ii=m(()=>{let e=F.value.dragToZoom??{};return{...ri,...e,selection:{...ri.selection,...e.selection??{}}}}),ai=m(()=>Dr.value&&ii.value.show&&J.value&&di()>1&&!pr.value),oi=null,si={};function ci(e,t=q.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function li(e){let t=ci(e);t&&B(`update:zoomState`,t)}function ui(){oi&&=(cancelAnimationFrame(oi),null),si={}}function di(){let e=Number(V.value?.maxSeriesLength);return Number.isFinite(e)?Math.max(0,e):0}function fi(e,t=q.value.start){let n=di();if(n<=0)return 0;let r=Math.max(0,Math.min(Number(t)||0,n-1)),i=Number(e);return Number.isFinite(i)?i>n?n:i<=r?Math.min(r+1,n):Math.max(0,i):Math.min(r+1,n)}function pi(){let e=di();if(e<=0){q.value={start:0,end:0},Jr.value={...q.value},Yr.value&&Yr.value.setRangeValues(0,0);return}let t=Number(q.value.start),n=Number(q.value.end);Number.isFinite(t)||(t=0),Number.isFinite(n)||(n=e),t=Math.max(0,Math.min(t,e-1)),n=Math.max(t+1,Math.min(n,e)),q.value={start:t,end:n},Jr.value={start:t,end:n},Yr.value&&Yr.value.setRangeValues(t,n)}function mi(e){if(!Dr.value)return null;let t=ci(e);return t?((t.start!==Number(q.value.start)||t.end!==Number(q.value.end))&&(ui(),q.value={start:t.start,end:t.end},Jr.value={...q.value},pi(),or()),{start:Number(q.value.start),end:Number(q.value.end)}):null}function hi(e){let t=mi(e);return t?(li(t),t):null}async function gi({applyControlledZoom:e=!0}={}){if(!Xr.value){if(!Dr.value){J.value=!1;return}Xr.value=!0;try{await We(),await We();let{zoomStartIndex:t,zoomEndIndex:n}=F.value,r=di();if(r<=0){q.value={start:0,end:0},Jr.value={...q.value},J.value=!1;return}let i=t==null?0:Number(t),a=n==null?r:fi(Number(n)+1,i);if(e&&ci(O.zoomState)){let e=ci(O.zoomState);i=e.start,a=e.end}Zr.value=!0,q.value={start:i,end:a},Jr.value={start:i,end:a},pi(),J.value=!0,await We(),Yr.value&&Yr.value.setRangeValues(q.value.start,q.value.end)}finally{queueMicrotask(()=>{Zr.value=!1}),Xr.value=!1,or()}}}async function _i({applyControlledZoom:e=!1,publish:t=!1}={}){ui(),await gi({applyControlledZoom:e}),t&&(li({start:Number(q.value.start),end:Number(q.value.end)}),B(`zoomReset`))}function vi(e){si={...si,...e},oi&&cancelAnimationFrame(oi),oi=requestAnimationFrame(()=>{let e={...q.value,...si};si={},oi=null,q.value=e,Jr.value={...e},pi(),li({start:Number(q.value.start),end:Number(q.value.end)}),or()})}function yi(e){if(Xr.value||Zr.value)return;let t=Number(e);Number.isFinite(t)&&(B(`zoomStart`,{index:t,isZoom:t!==0}),(t!==q.value.start||si.end!==void 0)&&vi({start:t}))}function bi(e){if(Xr.value||Zr.value)return;let t=si.start===void 0?q.value.start:si.start,n=fi(Number(e),t);B(`zoomEnd`,{index:n,isZoom:n!==di()}),(n!==q.value.end||si.start!==void 0)&&vi({end:n})}Xe([()=>O.zoomState,Dr,()=>Number(V.value?.maxSeriesLength??0)],async([e,t,n])=>{if(!(!t||n<=0||!e)){if(!J.value){await gi({applyControlledZoom:!0});return}mi(e)}},{deep:!0,immediate:!0}),Xe(Tr,async e=>{if(!e){J.value=!1;return}let t=V.value?.type,n=Number(V.value?.maxSeriesLength??0);V.value=e;let r=e.type,i=Number(e.maxSeriesLength??0);if(![E.BAR,E.LINE].includes(r)){ui(),J.value=!1,or();return}t!==r||n!==i?(ui(),J.value=!1,q.value={start:0,end:i},Jr.value={...q.value},Gn.value+=1,await We(),await gi({applyControlledZoom:!0})):O.zoomState&&mi(O.zoomState),or()},{deep:!0});let xi=m(()=>{if(!F.value.zoomMinimap.show||H.value===E.DONUT)return[];let e=[];D(V.value.dataset)&&(e=V.value.dataset),rt(V.value.dataset)&&(e=V.value.dataset.map((e,t)=>({values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,id:H.value===E.LINE?`line_${t}`:`bar_${t}`})).filter(e=>!N.value.includes(e.id)));let t=D(e)?e.length:Math.max(...e.map(e=>e.values.length)),n=[];if(D(e))n=e;else for(let r=0;r<t;r+=1)n.push(e.map(e=>e.values[r]||0).reduce((e,t)=>(e||0)+(t||0),0));let r=Math.min(...n);return n.map(e=>e+(r<0?Math.abs(r):0))});function Si(){let e=0;return Yn.value&&(e=Array.from(Yn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getComputedTextLength();return n>e?n:e},0)),e+4}let Ci=x(0),wi=Ae(e=>{Ci.value=e},100);Ze(e=>{let t=P.value;if(!t)return;let n=new ResizeObserver(e=>{wi(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Ke(()=>{Ci.value=0});let Ti=m(()=>{let e=0;return P.value&&(e=Ci.value),0+e}),Z=m(()=>{if(H.value!==E.LINE)return null;er.value;let e={height:U.value.height,width:U.value.width},t=Si();if(P.value){let e=P.value.getBBox().x;e<0&&(t+=Math.abs(e))}let a={left:t+F.value.xyPaddingLeft,top:F.value.xyPaddingTop,right:e.width-F.value.xyPaddingRight,bottom:e.height-F.value.xyPaddingBottom-Ti.value,width:Math.max(10,e.width-F.value.xyPaddingLeft-F.value.xyPaddingRight-t),height:Math.max(10,e.height-F.value.xyPaddingTop-F.value.xyPaddingBottom-Ti.value)},o=[];D(V.value.dataset)&&(o=[{values:V.value.dataset.slice(q.value.start,q.value.end),absoluteValues:V.value.dataset,absoluteIndices:V.value.dataset.map((e,t)=>t).slice(q.value.start,q.value.end),name:F.value.title,color:wr.value[F.value.paletteStartIndex]||i[F.value.paletteStartIndex],id:`line_0`}]),rt(V.value.dataset)&&(o=V.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`line_${t}`})).map((e,t)=>({...e,color:e.COLOR?ee(e.COLOR):wr.value[t+F.value.paletteStartIndex]||i[t+F.value.paletteStartIndex]||i[(t+F.value.paletteStartIndex)%i.length],values:e.values.slice(q.value.start,q.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(q.value.start,q.value.end)})));let s={max:Math.max(...o.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values)),min:Math.min(...o.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values)),maxSeries:Math.max(...o.map(e=>e.values.length))},c=s.max===s.min?te(Math.min(s.min,0),s.min===0?1:Math.max(s.min,0),F.value.xyScaleSegments):te(s.min<0?s.min:0,s.max<0?0:s.max,F.value.xyScaleSegments),l=s.min<0?Math.abs(s.min):0,ne=s.max<0?a.top:a.bottom-l/(c.max+l)*a.height,u=a.width/s.maxSeries,re=c.ticks.map(e=>({y:a.bottom-a.height*((e+l)/(c.max+l)),x:a.left-8,value:e})),d=o.map((e,t)=>({...e,shape:`circle`,coordinates:e.values.map((e,t)=>({x:a.left+u*(t+1)-u/2,y:a.bottom-(e+l)/(c.max+l)*a.height,value:e}))})).map(e=>{let t=[];return e.coordinates.forEach(e=>{t.push(`${e.x},${e.y} `)}),{...e,linePath:t.join(` `)}});function ie(e){return o.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!N.value.includes(e.id))}function ae(e,t=`pointer`){if(Y.value&&t===`pointer`)return;M.value=e,G.value=e,L.value=e,R.value=t;let i=ie(e);Bn.value={datapoint:i,seriesIndex:e,config:F.value,dataset:o};let a=F.value.tooltipCustomFormat;if(F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:i,seriesIndex:e+q.value.start}),r(a)&&ce(()=>a({datapoint:i,seriesIndex:e,series:o,config:F.value})))Vn.value=a({datapoint:i,seriesIndex:e,series:o,config:F.value});else{let e=``;$.value[i[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${F.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[i[0].absoluteIndex].text}</div>`),i.forEach((t,r)=>{e+=`
2
+ <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
+ <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>
4
+ <span>${t.name}:</span>
5
+ <b>${f(F.value.formatter,t.value,n({p:F.value.valuePrefix,v:t.value,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:r})}
6
+ </b>
7
+ </div>
8
+ `}),Vn.value=e}j.value=!0}function oe(e){let t=ie(e);F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:t,seriesIndex:e+q.value.start}),M.value=null,G.value=null,j.value=!1,L.value=null,R.value=`pointer`}function se(e){let t=ie(e);F.value.events.datapointClick&&F.value.events.datapointClick({datapoint:t,seriesIndex:e+q.value.start}),B(`selectDatapoint`,t)}return{absoluteZero:ne,dataset:d.filter(e=>!N.value.includes(e.id)),legend:d,drawingArea:a,extremes:s,slotSize:u,yLabels:re,useTooltip:ae,killTooltip:oe,selectDatapoint:se}}),Q=m(()=>{if(H.value!==E.BAR)return null;er.value;let e={height:U.value.height,width:U.value.width},t=Si();if(P.value){let e=P.value.getBBox().x;e<0&&(t+=Math.abs(e))}let a={left:t+F.value.xyPaddingLeft,top:F.value.xyPaddingTop,right:e.width-F.value.xyPaddingRight,bottom:e.height-F.value.xyPaddingBottom-Ti.value,width:Math.max(10,e.width-F.value.xyPaddingLeft-F.value.xyPaddingRight-t),height:Math.max(10,e.height-F.value.xyPaddingTop-F.value.xyPaddingBottom-Ti.value)},o=[];D(V.value.dataset)&&(o=[{values:V.value.dataset.slice(q.value.start,q.value.end),absoluteValues:V.value.dataset,absoluteIndices:V.value.dataset.map((e,t)=>t).slice(q.value.start,q.value.end),name:F.value.title,color:wr.value[F.value.paletteStartIndex]||i[F.value.paletteStartIndex],id:`bar_0`}]),rt(V.value.dataset)&&(o=V.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`bar_${t}`})).map((e,t)=>({...e,color:e.COLOR?ee(e.COLOR):wr.value[t+F.value.paletteStartIndex]||i[t+F.value.paletteStartIndex]||i[(t+F.value.paletteStartIndex)%i.length],values:e.values.slice(q.value.start,q.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(q.value.start,q.value.end)})));let s={max:Math.max(...o.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values))<0?0:Math.max(...o.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values))??1,min:Math.min(...o.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values))??0,maxSeries:Math.max(...o.filter(e=>!N.value.includes(e.id)).map(e=>e.values.length))??0},c=s.min===s.max?te(Math.min(s.min,0),s.min===0?1:Math.max(s.min,0),F.value.xyScaleSegments):te(s.min<0?s.min:0,s.max,F.value.xyScaleSegments),l=c.min<0?Math.abs(c.min):0,ne=a.bottom-l/(c.max+l)*a.height,u=a.width/s.maxSeries,re=c.ticks.map(e=>({y:a.bottom-a.height*((e+l)/(c.max+l)),x:a.left-8,value:e})),d=o.map((e,t)=>({...e,shape:`square`,coordinates:e.values.map((e,n)=>{let r=(e+l)/(s.max+l)*a.height,i=Math.abs(e)/Math.abs(s.min)*(a.height-ne),c=l/(s.max+l)*a.height,ee=u/o.filter(e=>!N.value.includes(e.id)).length-F.value.barGap/o.filter(e=>!N.value.includes(e.id)).length;return{x:a.left+u*n+ee*t+F.value.barGap/2,y:e>0?a.bottom-r:ne,height:e>0?r-c:i,value:e,width:ee}})})),ie=o.filter(e=>!N.value.includes(e.id)).map((e,t)=>({...e,coordinates:e.values.map((e,n)=>{let r=(e+l)/(s.max+l)*a.height,i=Math.abs(e)/(s.max+l)*a.height,c=l/(s.max+l)*a.height,ee=u/o.filter(e=>!N.value.includes(e.id)).length-F.value.barGap/o.filter(e=>!N.value.includes(e.id)).length;return{x:a.left+u*n+ee*t+F.value.barGap/2,y:e>0?a.bottom-r:ne,height:e>0?r-c:i,value:e,width:ee}})}));function ae(e){return o.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!N.value.includes(e.id))}function oe(e,t=`pointer`){if(Y.value&&t===`pointer`)return;M.value=e,G.value=e,L.value=e,R.value=t;let i=ae(e);Bn.value={datapoint:i,seriesIndex:e,config:F.value,dataset:o};let a=F.value.tooltipCustomFormat;if(F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:i,seriesIndex:e+q.value.start}),r(a)&&ce(()=>a({datapoint:i,seriesIndex:e,series:o,config:F.value})))Vn.value=a({point:i,seriesIndex:e,series:o,config:F.value});else{let e=``;$.value[i[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${F.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[i[0].absoluteIndex].text}</div>`),i.forEach((t,r)=>{e+=`
9
+ <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
10
+ <svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${t.color}"/></svg>
11
+ <span>${t.name}:</span>
12
+ <b>${f(F.value.formatter,t.value,n({p:F.value.valuePrefix,v:t.value,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:r})}
13
+ </b>
14
+ </div>
15
+ `}),Vn.value=e}j.value=!0}function se(e){let t=ae(e);F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:t,seriesIndex:e+q.value.start}),j.value=!1,M.value=null,G.value=null,L.value=null,R.value=`pointer`}function le(e){let t=ae(e);F.value.events.datapointClick&&F.value.events.datapointClick({datapoint:t,seriesIndex:e+q.value.start}),B(`selectDatapoint`,t)}return{absoluteZero:ne,dataset:ie.filter(e=>!N.value.includes(e.id)),absoluteDataset:ie,legend:d,drawingArea:a,extremes:s,slotSize:u,yLabels:re,useTooltip:oe,killTooltip:se,selectDatapoint:le}}),Ei=m(()=>H.value===E.LINE?Z.value?.drawingArea??null:H.value===E.BAR?Q.value?.drawingArea??null:null),Di=m(()=>H.value===E.LINE?Number(Z.value?.slotSize??0):H.value===E.BAR?Number(Q.value?.slotSize??0):0),Oi=m(()=>H.value===E.LINE?Number(Z.value?.extremes?.maxSeries??0):H.value===E.BAR?Number(Q.value?.extremes?.maxSeries??0):0),ki=m(()=>{let e=Ei.value;return!e||!Y.value||$r.value==null||X.value==null?null:{x:Math.min($r.value,X.value),y:e.top,width:Math.abs(X.value-$r.value),height:e.height}}),Ai=m(()=>!J.value||!Dr.value?!1:Number(q.value.start)!==0||Number(q.value.end)!==Number(di()));function ji(e){let t=z.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}function Mi(e){let t=Ei.value;return t?Math.min(Math.max(e,t.left),t.right):e}function Ni(){L.value=null,R.value=`pointer`,j.value=!1,M.value=null,G.value=null}function Pi(e){let t=e?.pointerId==null?ei.value:e.pointerId;t!=null&&z.value?.hasPointerCapture?.(t)&&z.value.releasePointerCapture(t),Y.value=!1,$r.value=null,X.value=null,ei.value=null}function Fi(){ti.value=!0,setTimeout(()=>{ti.value=!1},0)}function Ii(e){ti.value&&(ti.value=!1,e.preventDefault(),e.stopPropagation())}function Li(e){if(!ai.value||!Ai.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=ni.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(ni.value={time:0,x:0,y:0,pointerType:null},Fi(),Pi(e),Ni(),_i({applyControlledZoom:!1,publish:!0}),!0):(ni.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function Ri(e){let t=Ei.value,n=Di.value,r=Oi.value;if(!t||r<=0||!Number.isFinite(n)||n<=0)return null;let i=Math.floor((Mi(e)-t.left)/n);return Math.max(0,Math.min(r-1,i))}function zi(e,t){let n=Ri(e),r=Ri(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(q.value.start)+i,end:Number(q.value.start)+a+1}}function Bi(e){let t=hi(e);return t?(B(`zoomStart`,{index:t.start,isZoom:t.start!==0}),B(`zoomEnd`,{index:t.end,isZoom:t.end!==di()}),t):null}function Vi(e){if(!ai.value||Qi.value||e.button!==void 0&&e.button!==0||ei.value!=null&&e.pointerId!==ei.value)return;let t=Ei.value,n=ji(e);if(!t||!n||n.x<t.left||n.x>t.right||n.y<t.top||n.y>t.bottom||Oi.value<=1)return;Qr.value=!0,z.value?.focus?.({preventScroll:!0}),Ni();let r=Mi(n.x);ei.value=e.pointerId,Y.value=!0,$r.value=r,X.value=r}function Hi(e){if(!ai.value||!Y.value||ei.value!=null&&e.pointerId!==ei.value)return;let t=ji(e);t&&(X.value=Mi(t.x),Ni(),$r.value!=null&&Math.abs(X.value-$r.value)>=2&&!z.value?.hasPointerCapture?.(e.pointerId)&&z.value?.setPointerCapture?.(e.pointerId))}function Ui(e){if(!ai.value||!Y.value||ei.value!=null&&e.pointerId!==ei.value)return;let t=ji(e);t&&(X.value=Mi(t.x));let n=$r.value,r=X.value,i=Ei.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,Number(i?.width??0)*.01)){if(Li(e))return;Pi(e);return}let a=zi(Math.min(n,r),Math.max(n,r));if(!a){Pi(e);return}Pi(e),Bi(a)&&(ni.value={time:0,x:0,y:0,pointerType:null},Ni(),Fi())}let Wi=m(()=>{let e=Ei.value,t=U.value.width;return!e||t<=0||!F.value.zoomXyAutoFit?null:e.left/t}),Gi=m(()=>{let e=Ei.value,t=U.value.width;return!e||t<=0||!F.value.zoomXyAutoFit?null:(t-e.right)/t}),Ki=m(()=>{if(H.value===E.LINE)return Z.value.legend.map(e=>(Math.min(...e.absoluteValues.map(e=>e??0)),{...e,isVisible:!N.value.includes(e.id),type:`line`,series:e.absoluteValues}));if(H.value===E.BAR)return Q.value.legend.map(e=>(Math.min(...e.absoluteValues.map(e=>e??0)),{...e,isVisible:!N.value.includes(e.id),type:`bar`,series:e.absoluteValues}))}),$=x([]),qi=0;Ze(()=>{let e=++qi;(async()=>{let t=await Te({values:F.value.xyPeriods,maxDatapoints:V.value.maxSeriesLength,formatter:F.value.datetimeFormatter,start:q.value.start,end:q.value.end});e===qi&&($.value=t)})()});let Ji=m(()=>{let e=F.value.xyPeriodsModulo;return F.value.xyPeriods.length?Math.min(e,[...new Set($.value.map(e=>e.text))].length):e}),Yi=x(!1);function Xi(e){Yi.value=e,Wn.value+=1}function Zi(){Pr.value.showTooltip=!Pr.value.showTooltip}let Qi=x(!1);function $i(){Qi.value=!Qi.value}async function ea({scale:e=2}={}){if(!k.value)return;let{width:t,height:n}=k.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ye({domElement:k.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:F.value.title,width:t,height:n,aspectRatio:r}}let ta=m(()=>U.value.width),na=m(()=>U.value.height);ke({timeLabelsEls:P,timeLabels:$,slicer:q,configRef:F,rotationPath:[`xyPeriodLabelsRotation`],autoRotatePath:[`xyPeriodLabelsAutoRotate`,`enable`],isAutoSize:!1,rotation:F.value.xyPeriodLabelsAutoRotate.angle,height:na.value,width:ta.value});let ra=m(()=>F.value.backgroundColor),ia=m(()=>H.value===E.DONUT?K.value.legend:H.value===E.LINE?Z.value.legend:Q.value.legend),aa=m(()=>({show:F.value.showLegend,bold:!1,backgroundColor:F.value.backgroundColor,color:F.value.color,fontSize:F.value.legendFontSize,position:F.value.legendPosition})),oa=m(()=>({text:F.value.title,color:F.value.color,fontSize:F.value.titleFontSize,bold:F.value.titleBold,textAlign:F.value.titleTextAlign,subtitle:{text:``}})),{generateSvg:sa,onGenerateImage:ca}=be({svg:z,title:oa,legend:aa,legendItems:ia,backgroundColor:ra,getSvgCallback:()=>F.value.userOptionsCallbacks.svg,generateImage:Mr});async function la(){if(B(`copyAlt`,{config:F.value,dataset:{line:Z.value,bar:Q.value,donut:K.value}}),!F.value.userOptionsCallbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(F.value.userOptionsCallbacks.altCopy({config:F.value,dataset:{line:Z.value,bar:Q.value,donut:K.value}}))}function ua(e,t){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())}let da=m(()=>H.value===E.DONUT?K.value?.chart?.length??0:H.value===E.LINE?Z.value?.extremes?.maxSeries??0:H.value===E.BAR?Q.value?.extremes?.maxSeries??0:0);function fa(){L.value=null,dr.value=!0}function pa(){Qr.value=!1,L.value=null,R.value=`pointer`,j.value=!1,M.value=null,G.value=null,dr.value=!1}function ma(e){if(!z.value||Qi.value||document.activeElement!==z.value||(Qr.value=!1,!da.value))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(ai.value&&(Ai.value||Y.value)){Pi(),Ni(),_i({applyControlledZoom:!1,publish:!0});return}L.value=null,R.value=`pointer`,j.value=!1,M.value=null,G.value=null;return}if(r){if(L.value===null)return;if(H.value===E.DONUT){let e=K.value?.chart?.[L.value];if(!e)return;K.value.selectDatapoint({datapoint:e,seriesIndex:L.value});return}if(H.value===E.LINE){Z.value?.selectDatapoint(L.value);return}if(H.value===E.BAR){Q.value?.selectDatapoint(L.value);return}return}let a=L.value,o=G.value,s=a!==null&&a>=0&&a<da.value,c=o!==null&&o>=0&&o<da.value;if(s?n?(a+=1,a>=da.value&&(a=0)):t&&(--a,a<0&&(a=da.value-1)):c?(a=n?o+1:o-1,a>=da.value&&(a=0),a<0&&(a=da.value-1)):a=n?0:da.value-1,H.value===E.DONUT){let e=K.value?.chart?.[a];if(!e)return;ha(a),K.value.useTooltip({datapoint:e,seriesIndex:a,triggerMode:`keyboard`});return}if(H.value===E.LINE){ha(a),Z.value?.useTooltip(a,`keyboard`);return}H.value===E.BAR&&(ha(a),Q.value?.useTooltip(a,`keyboard`))}function ha(e){if(!Number.isFinite(e)||!z.value)return;let t=0,n=0;if(H.value===E.DONUT){let r=K.value?.chart?.[e];if(!r)return;t=d(r,!0).x,n=se(r)}if(H.value===E.LINE){let r=Z.value?.drawingArea,i=Z.value?.slotSize;if(!r||!i)return;t=r.left+i*(e+1)-i/2,n=r.top+r.height/2}if(H.value===E.BAR){let r=Q.value?.drawingArea,i=Q.value?.slotSize;if(!r||!i)return;t=r.left+i*(e+1)-i/2,n=r.top+r.height/2}let r=z.value.getBoundingClientRect();ur.value={x:r.left+t/U.value.width*r.width,y:r.top+n/U.value.height*r.height}}let ga=m(()=>{if(H.value===E.DONUT)return{headers:[`Series`,`Value`,`Percentage`],rows:(K.value?.dataset??[]).map(e=>{let t=K.value?.total?n({v:e.value/K.value.total*100,s:`%`,r:F.value.dataLabelRoundingPercentage}):`0%`;return[e.name,f(F.value.formatter,e.value,n({p:F.value.valuePrefix,v:e.value,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue})),t]})};if(H.value===E.LINE||H.value===E.BAR){let e=H.value===E.LINE?Z.value?.dataset??[]:Q.value?.dataset??[],t=H.value===E.LINE?Z.value?.extremes?.maxSeries??0:Q.value?.extremes?.maxSeries??0;return{headers:[`Index`,...e.map(e=>e.name)],rows:Array.from({length:t},(t,r)=>[$.value?.[r+q.value.start]?.text??String(r+q.value.start),...e.map(e=>{let t=e.values?.[r];return f(F.value.formatter,t,n({p:F.value.valuePrefix,v:t,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}))})])}}return{headers:[],rows:[]}});return ge({getImage:ea,generatePdf:jr,generateImage:Mr,generateSvg:sa,toggleTooltip:Zi,toggleAnnotator:$i,toggleFullscreen:Xi,copyAlt:la,resetZoom:()=>_i({applyControlledZoom:!1,publish:!0}),setZoomState:hi}),(e,t)=>Er.value?(b(),g(`div`,{key:0,id:`${H.value}_${A.value}`,ref_key:`quickChart`,ref:k,class:v({"vue-data-ui-component":!0,"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":Yi.value}),style:y(`background:${F.value.backgroundColor};color:${F.value.color};font-family:${F.value.fontFamily}; position: relative; ${F.value.responsive?`height: 100%`:``}`),onMouseenter:t[1]||=()=>br(!0),onMouseleave:t[2]||=()=>br(!1)},[_(`div`,{id:`chart-instructions-${A.value}`,class:`sr-only`},[_(`p`,null,w(F.value.a11y.translations.keyboardNavigation),1)],8,dt),ga.value.rows.length?(b(),Re(Pe,{key:0,uid:A.value,head:ga.value.headers,body:ga.value.rows,notice:F.value.a11y.translations.tableAvailable,caption:F.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):h(``,!0),F.value.userOptionsButtons.annotator?(b(),Re(T(it),{key:1,svgRef:T(z),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Qi.value,isCursorPointer:lr.value,palette:F.value.annotatorPalette,onClose:$i},ze({_:2},[S(T(Se),t=>({name:t,fn:Qe(n=>[C(e.$slots,t,Ge(He(T(xe)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):h(``,!0),Nr.value?(b(),g(`div`,{key:2,ref_key:`noTitle`,ref:Un,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):h(``,!0),F.value.showUserOptions&&(_r.value||vr.value)?(b(),Re(T(ot),{ref:`details`,key:`user_option_${Wn.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:T(kr),isImaging:T(Ar),uid:A.value,hasTooltip:F.value.userOptionsButtons.tooltip&&F.value.showTooltip,hasPdf:F.value.userOptionsButtons.pdf,hasImg:F.value.userOptionsButtons.img,hasSvg:F.value.userOptionsButtons.svg,hasFullscreen:F.value.userOptionsButtons.fullscreen,hasAltCopy:F.value.userOptionsButtons.altCopy,hasXls:!1,isTooltip:Pr.value.showTooltip,isFullscreen:Yi.value,titles:{...F.value.userOptionsButtonTitles},chartElement:k.value,position:F.value.userOptionsPosition,hasAnnotator:F.value.userOptionsButtons.annotator,isAnnotation:Qi.value,callbacks:F.value.userOptionsCallbacks,printScale:F.value.userOptionsPrint.scale,isCursorPointer:lr.value,onToggleFullscreen:Xi,onGeneratePdf:T(jr),onGenerateImage:T(ca),onGenerateSvg:T(sa),onToggleTooltip:Zi,onToggleAnnotator:$i,onCopyAlt:la,style:y({visibility:_r.value?vr.value?`visible`:`hidden`:`visible`})},ze({_:2},[S(T(Ce)(e.$slots,`menuIcon optionTooltip optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Qe(n=>[C(e.$slots,t,Ge(He(T(we)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isTooltip`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):h(``,!0),F.value.title?(b(),g(`div`,{key:4,ref_key:`quickChartTitle`,ref:Ln,class:`vue-ui-quick-chart-title`,style:y(`background:transparent;color:${F.value.color};font-size:${F.value.titleFontSize}px;font-weight:${F.value.titleBold?`bold`:`normal`};text-align:${F.value.titleTextAlign}`)},w(F.value.title),5)):h(``,!0),_(`div`,{id:`legend-top-${A.value}`},null,8,ft),_(`div`,pt,[H.value?(b(),g(`svg`,{key:0,ref_key:`svgRef`,ref:z,xmlns:T(le),"aria-describedby":`chart-instructions-${A.value}`,viewBox:Lr.value,style:y({maxWidth:`100%`,overflow:`visible`,background:`transparent`,color:F.value.color,cursor:ai.value?Y.value?`col-resize`:`crosshair`:void 0,touchAction:ai.value?`pan-y`:void 0,userSelect:ai.value?`none`:void 0}),class:v({"vue-data-ui-no-transition":!T(I),"vue-ui-quick-chart-zoom-pointer-focus":ai.value&&Qr.value}),tabindex:`0`,onFocus:fa,onBlur:pa,onKeydown:ma,onPointerdown:Vi,onPointermove:Hi,onPointerup:Ui,onPointercancel:Pi,onClickCapture:Ii},[Be(T(nt)),e.$slots[`chart-background`]&&H.value===E.BAR?(b(),g(`foreignObject`,{key:0,x:Q.value.drawingArea.left,y:Q.value.drawingArea.top,width:Q.value.drawingArea.width,height:Q.value.drawingArea.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,ht)):h(``,!0),e.$slots[`chart-background`]&&H.value===E.LINE?(b(),g(`foreignObject`,{key:1,x:Z.value.drawingArea.left,y:Z.value.drawingArea.top,width:Z.value.drawingArea.width,height:Z.value.drawingArea.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,gt)):h(``,!0),e.$slots[`chart-background`]&&H.value===E.DONUT?(b(),g(`foreignObject`,{key:2,x:0,y:0,width:U.value.width,height:U.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,_t)):h(``,!0),_(`defs`,null,[_(`filter`,{id:`blur_${A.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[_(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${A.value}`},null,8,yt),t[3]||=_(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,vt),_(`filter`,{id:`shadow_${A.value}`,"color-interpolation-filters":`sRGB`},[_(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":F.value.donutShadowColor},null,8,xt)],8,bt)]),H.value===E.DONUT?(b(),g(p,{key:3},[F.value.showDataLabels?(b(),g(`g`,St,[(b(!0),g(p,null,S(K.value.chart,(e,t)=>(b(),g(p,null,[K.value.isArcBigEnough(e)?(b(),g(`path`,{key:0,d:T(ie)(e,{x:U.value.width/2,y:U.value.height/2},16,16,!1,!1,U.value.height*qr.value,12,F.value.donutCurvedMarkers),stroke:e.color,"stroke-width":F.value.donutLabelMarkerStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:zr(e.id)},null,8,Ct)):h(``,!0)],64))),256))])):h(``,!0),_(`circle`,{cx:K.value.cx,cy:K.value.cy,r:K.value.radius,fill:F.value.backgroundColor,filter:F.value.donutUseShadow?`url(#shadow_${A.value})`:``},null,8,wt),_(`g`,Tt,[(b(!0),g(p,null,S(K.value.chart,(e,t)=>(b(),g(`path`,{d:e.arcSlice,fill:e.color,stroke:F.value.donutStroke||F.value.backgroundColor,"stroke-width":F.value.donutStrokeWidth,filter:zr(e.id)},null,8,Et))),256)),(b(!0),g(p,null,S(K.value.chart,(e,t)=>(b(),g(`path`,{d:e.arcSlice,fill:`transparent`,onMouseenter:n=>K.value.useTooltip({datapoint:e,seriesIndex:t,triggerMode:`pointer`}),onMouseout:n=>K.value.killTooltip({datapoint:e,seriesIndex:t}),onClick:n=>K.value.selectDatapoint({datapoint:e,seriesIndex:t})},null,40,Dt))),256))]),F.value.showDataLabels?(b(),g(`g`,Ot,[(b(!0),g(p,null,S(K.value.chart,(e,t)=>(b(),g(p,null,[K.value.isArcBigEnough(e)?(b(),g(`circle`,{key:0,cx:T(d)(e).x,cy:T(se)(e)-3.7,fill:e.color,stroke:F.value.backgroundColor,"stroke-width":1,r:3,filter:zr(e.id)},null,8,kt)):h(``,!0),K.value.isArcBigEnough(e)?(b(),g(`text`,{key:1,"text-anchor":T(d)(e,!0,20).anchor,x:T(d)(e,!0).x,y:T(se)(e),fill:F.value.color,"font-size":F.value.dataLabelFontSize,filter:zr(e.id)},w(K.value.displayArcPercentage(e,K.value.chart))+` (`+w(T(f)(F.value.formatter,e.value,T(n)({p:F.value.valuePrefix,v:e.value,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t}))+`) `,9,At)):h(``,!0),K.value.isArcBigEnough(e,!0,20)?(b(),g(`text`,{key:2,"text-anchor":T(d)(e).anchor,x:T(d)(e,!0).x,y:T(se)(e)+F.value.dataLabelFontSize,fill:F.value.color,"font-size":F.value.dataLabelFontSize,filter:zr(e.id)},w(e.name),9,jt)):h(``,!0)],64))),256))])):h(``,!0),F.value.donutShowTotal?(b(),g(`g`,Mt,[_(`text`,{"text-anchor":`middle`,x:K.value.drawingArea.centerX,y:K.value.drawingArea.centerY-F.value.donutTotalLabelFontSize/2,"font-size":F.value.donutTotalLabelFontSize,fill:F.value.color},w(F.value.donutTotalLabelText),9,Nt),_(`text`,{"text-anchor":`middle`,x:K.value.drawingArea.centerX,y:K.value.drawingArea.centerY+F.value.donutTotalLabelFontSize,"font-size":F.value.donutTotalLabelFontSize,fill:F.value.color},w(T(n)({p:F.value.valuePrefix,v:K.value.total,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue})),9,Pt)])):h(``,!0)],64)):h(``,!0),H.value===E.LINE?(b(),g(p,{key:4},[F.value.xyShowGrid?(b(),g(`g`,Ft,[(b(!0),g(p,null,S(Z.value.yLabels,e=>(b(),g(p,null,[e.y<=Z.value.drawingArea.bottom?(b(),g(`line`,{key:0,x1:Z.value.drawingArea.left,x2:Z.value.drawingArea.right,y1:e.y,y2:e.y,stroke:F.value.xyGridStroke,"stroke-width":F.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,It)):h(``,!0)],64))),256)),(b(!0),g(p,null,S(Z.value.extremes.maxSeries+1,(e,t)=>(b(),g(`line`,{x1:Z.value.drawingArea.left+Z.value.slotSize*t,x2:Z.value.drawingArea.left+Z.value.slotSize*t,y1:Z.value.drawingArea.top,y2:Z.value.drawingArea.bottom,stroke:F.value.xyGridStroke,"stroke-width":F.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,Lt))),256))])):h(``,!0),F.value.xyShowAxis?(b(),g(`g`,Rt,[_(`line`,{x1:Z.value.drawingArea.left,x2:Z.value.drawingArea.left,y1:Z.value.drawingArea.top,y2:Z.value.drawingArea.bottom,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,zt),_(`line`,{x1:Z.value.drawingArea.left,x2:Z.value.drawingArea.right,y1:isNaN(Z.value.absoluteZero)?Z.value.drawingArea.bottom:Z.value.absoluteZero,y2:isNaN(Z.value.absoluteZero)?Z.value.drawingArea.bottom:Z.value.absoluteZero,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,Bt)])):h(``,!0),F.value.xyShowScale?(b(),g(`g`,{key:2,class:`yLabels`,ref_key:`scaleLabels`,ref:Yn},[(b(!0),g(p,null,S(Z.value.yLabels,(e,t)=>(b(),g(p,{key:`sl_${t}`},[e.y<=Z.value.drawingArea.bottom?(b(),g(`path`,{key:0,class:v({"vue-data-ui-transition":T(I)}),d:`M${e.x+4},${e.y} ${Z.value.drawingArea.left},${e.y}`,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,10,Vt)):h(``,!0),e.y<=Z.value.drawingArea.bottom?(b(),g(`text`,{key:1,class:v({"vue-data-ui-transition":T(I)}),transform:`translate(${e.x}, ${e.y+F.value.xyLabelsYFontSize/3})`,"text-anchor":`end`,"font-size":F.value.xyLabelsYFontSize,fill:F.value.color},w(T(f)(F.value.formatter,e.value,T(n)({p:F.value.valuePrefix,v:e.value,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t})),11,Ht)):h(``,!0)],64))),128))],512)):h(``,!0),F.value.xyShowScale&&F.value.xyPeriods.length?(b(),g(`g`,Ut,[(b(!0),g(p,null,S($.value.map(e=>e.text),(e,t)=>(b(),g(p,null,[!F.value.xyPeriodsShowOnlyAtModulo||F.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((q.value.end-q.value.start)/Ji.value)===0||q.value.end-q.value.start<=Ji.value?(b(),g(`line`,{key:0,x1:Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2,x2:Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2,y1:Z.value.drawingArea.bottom,y2:Z.value.drawingArea.bottom+4,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,Wt)):h(``,!0)],64))),256)),_(`g`,{ref_key:`timeLabelsEls`,ref:P},[(b(!0),g(p,null,S($.value.map(e=>e.text),(e,t)=>(b(),g(p,null,[!F.value.xyPeriodsShowOnlyAtModulo||F.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((q.value.end-q.value.start)/Ji.value)===0||q.value.end-q.value.start<=Ji.value?(b(),g(`g`,Gt,[String(e).includes(`
16
+ `)?(b(),g(`text`,{key:1,class:`vue-data-ui-time-label`,"font-size":F.value.xyLabelsXFontSize,"text-anchor":F.value.xyPeriodLabelsRotation>0?`start`:F.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:F.value.color,transform:`translate(${Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2}, ${Z.value.drawingArea.bottom+F.value.xyLabelsXFontSize+6}), rotate(${F.value.xyPeriodLabelsRotation})`,innerHTML:T(o)({content:String(e),fontSize:F.value.xyLabelsXFontSize,fill:F.value.color,x:0,y:0})},null,8,qt)):(b(),g(`text`,{key:0,class:`vue-data-ui-time-label`,"font-size":F.value.xyLabelsXFontSize,"text-anchor":F.value.xyPeriodLabelsRotation>0?`start`:F.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:F.value.color,transform:`translate(${Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2}, ${Z.value.drawingArea.bottom+F.value.xyLabelsXFontSize+6}), rotate(${F.value.xyPeriodLabelsRotation})`},w(e),9,Kt))])):h(``,!0)],64))),256))],512)])):h(``,!0),_(`g`,Jt,[(b(!0),g(p,null,S(Z.value.dataset,(e,t)=>(b(),g(`g`,{key:`serie_${e.id}`,class:`line-plot-series`},[F.value.lineSmooth?(b(),g(p,{key:0},[_(`path`,{ref_for:!0,ref_key:`pathWrapper`,ref:qn,d:`M ${T(c)(e.coordinates)}`,stroke:F.value.backgroundColor,"stroke-width":F.value.lineStrokeWidth+1,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(I)})},null,10,Yt),_(`path`,{ref_for:!0,ref_key:`pathTop`,ref:Jn,d:`M ${T(c)(e.coordinates)}`,stroke:e.color,"stroke-width":F.value.lineStrokeWidth,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(I)}),style:y({transition:T(pr)?void 0:`all 0.2s ease-in-out`})},null,14,Xt)],64)):(b(),g(p,{key:1},[_(`path`,{ref_for:!0,ref_key:`pathWrapper`,ref:qn,d:`M ${e.linePath}`,stroke:F.value.backgroundColor,"stroke-width":F.value.lineStrokeWidth+1,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(I)})},null,10,Zt),_(`path`,{ref_for:!0,ref_key:`pathTop`,ref:Jn,d:`M ${e.linePath}`,stroke:e.color,"stroke-width":F.value.lineStrokeWidth,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(I)})},null,10,Qt)],64)),(b(!0),g(p,null,S(e.coordinates,(t,n)=>(b(),g(`circle`,{key:`dp_${e.id}_${n+q.value.start}`,cx:t.x,cy:T(u)(t.y),r:3,fill:e.color,stroke:F.value.backgroundColor,"stroke-width":`0.5`,class:v({"vue-ui-quick-chart-plot":!0,"vue-data-ui-transition":T(I)})},null,10,$t))),128))]))),128))]),F.value.showDataLabels?(b(),g(`g`,en,[(b(!0),g(p,null,S(Z.value.dataset,(e,t)=>(b(),g(p,{key:`ds_${e.id}`},[(b(!0),g(p,null,S(e.coordinates,(t,r)=>(b(),g(`text`,{class:v([`vue-ui-quick-chart-label`,{"vue-data-ui-transition":T(I)}]),key:`plot_${e.id}_${r+q.value.start}`,"text-anchor":`middle`,"font-size":F.value.dataLabelFontSize,fill:e.color,transform:`translate(${t.x}, ${T(u)(t.y)-F.value.dataLabelFontSize/2})`},w(T(f)(F.value.formatter,T(u)(t.value),T(n)({p:F.value.valuePrefix,v:T(u)(t.value),s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:r})),11,tn))),128))],64))),128))])):h(``,!0),yr.value?(b(),g(`g`,nn,[(b(!0),g(p,null,S(Z.value.extremes.maxSeries,(e,t)=>(b(),g(`rect`,{x:Z.value.drawingArea.left+t*Z.value.slotSize,y:Z.value.drawingArea.top,height:Z.value.drawingArea.height<=0?1e-5:Z.value.drawingArea.height,width:Z.value.slotSize<=0?1e-5:Z.value.slotSize,fill:[M.value,G.value].includes(t)?F.value.xyHighlighterColor:`transparent`,style:y(`opacity:${F.value.xyHighlighterOpacity}`),onMouseenter:e=>Z.value.useTooltip(t,`pointer`),onMouseleave:e=>Z.value.killTooltip(t),onClick:e=>Z.value.selectDatapoint(t)},null,44,rn))),256))])):h(``,!0)],64)):h(``,!0),H.value===E.BAR?(b(),g(p,{key:5},[F.value.xyShowGrid?(b(),g(`g`,an,[(b(!0),g(p,null,S(Q.value.yLabels,e=>(b(),g(p,null,[e.y<=Q.value.drawingArea.bottom?(b(),g(`line`,{key:0,x1:Q.value.drawingArea.left,x2:Q.value.drawingArea.right,y1:e.y,y2:e.y,stroke:F.value.xyGridStroke,"stroke-width":F.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,on)):h(``,!0)],64))),256)),N.value.length<Q.value.legend.length?(b(!0),g(p,{key:0},S(Q.value.extremes.maxSeries+1,(e,t)=>(b(),g(`line`,{x1:Q.value.drawingArea.left+Q.value.slotSize*t,x2:Q.value.drawingArea.left+Q.value.slotSize*t,y1:Q.value.drawingArea.top,y2:Q.value.drawingArea.bottom,stroke:F.value.xyGridStroke,"stroke-width":F.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,sn))),256)):h(``,!0)])):h(``,!0),F.value.xyShowAxis?(b(),g(`g`,cn,[_(`line`,{x1:Q.value.drawingArea.left,x2:Q.value.drawingArea.left,y1:Q.value.drawingArea.top,y2:Q.value.drawingArea.bottom,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,ln),_(`line`,{x1:Q.value.drawingArea.left,x2:Q.value.drawingArea.right,y1:isNaN(Q.value.absoluteZero)?Q.value.drawingArea.bottom:Q.value.absoluteZero,y2:isNaN(Q.value.absoluteZero)?Q.value.drawingArea.bottom:Q.value.absoluteZero,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,un)])):h(``,!0),F.value.xyShowScale?(b(),g(`g`,{key:2,class:`yLabels`,ref_key:`scaleLabels`,ref:Yn},[(b(!0),g(p,null,S(Q.value.yLabels,(e,t)=>(b(),g(p,{key:`sl_${t}`},[e.y<=Q.value.drawingArea.bottom?(b(),g(`path`,{key:0,class:v({"vue-data-ui-transition":T(I)}),d:`M${e.x+4},${e.y} ${Q.value.drawingArea.left},${e.y}`,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,10,dn)):h(``,!0),e.y<=Q.value.drawingArea.bottom?(b(),g(`text`,{key:1,class:v({"vue-data-ui-transition":T(I)}),transform:`translate(${e.x}, ${e.y+F.value.xyLabelsYFontSize/3})`,"text-anchor":`end`,"font-size":F.value.xyLabelsYFontSize,fill:F.value.color},w(T(f)(F.value.formatter,e.value,T(n)({p:F.value.valuePrefix,v:e.value,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t})),11,fn)):h(``,!0)],64))),128))],512)):h(``,!0),F.value.xyShowScale&&F.value.xyPeriods.length?(b(),g(`g`,pn,[(b(!0),g(p,null,S(F.value.xyPeriods.slice(q.value.start,q.value.end),(e,t)=>(b(),g(`line`,{x1:Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2,x2:Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2,y1:Q.value.drawingArea.bottom,y2:Q.value.drawingArea.bottom+4,stroke:F.value.xyAxisStroke,"stroke-width":F.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,mn))),256)),_(`g`,{ref_key:`timeLabelsEls`,ref:P},[(b(!0),g(p,null,S($.value.map(e=>e.text),(e,t)=>(b(),g(p,null,[!F.value.xyPeriodsShowOnlyAtModulo||F.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((q.value.end-q.value.start)/Ji.value)===0||q.value.end-q.value.start<=Ji.value?(b(),g(`g`,hn,[String(e).includes(`
17
+ `)?(b(),g(`text`,{key:1,class:`vue-data-ui-time-label`,"font-size":F.value.xyLabelsXFontSize,"text-anchor":F.value.xyPeriodLabelsRotation>0?`start`:F.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:F.value.color,transform:`translate(${Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2}, ${Q.value.drawingArea.bottom+F.value.xyLabelsXFontSize+6}), rotate(${F.value.xyPeriodLabelsRotation})`,innerHTML:T(o)({content:String(e),fontSize:F.value.xyLabelsXFontSize,fill:F.value.color,x:0,y:0})},null,8,_n)):(b(),g(`text`,{key:0,class:`vue-data-ui-time-label`,"font-size":F.value.xyLabelsXFontSize,"text-anchor":F.value.xyPeriodLabelsRotation>0?`start`:F.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:F.value.color,transform:`translate(${Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2}, ${Q.value.drawingArea.bottom+F.value.xyLabelsXFontSize+6}), rotate(${F.value.xyPeriodLabelsRotation})`},w(e),9,gn))])):h(``,!0)],64))),256))],512)])):h(``,!0),_(`g`,vn,[(b(!0),g(p,null,S(Q.value.dataset,(e,t)=>(b(),g(p,null,[(b(!0),g(p,null,S(e.coordinates,(t,n)=>(b(),g(`rect`,{x:t.x,width:t.width<=0?1e-5:t.width,height:T(u)(t.height<=0?1e-5:t.height),y:T(u)(t.y),fill:e.color,stroke:F.value.backgroundColor,"stroke-width":F.value.barStrokeWidth,"stroke-linecap":`round`,class:v({"vue-data-ui-transition":T(I)})},null,10,yn))),256))],64))),256))]),F.value.showDataLabels?(b(),g(`g`,bn,[(b(!0),g(p,null,S(Q.value.dataset,(e,t)=>(b(),g(p,{key:`ds_${e.id}`},[(b(!0),g(p,null,S(e.coordinates,(t,r)=>(b(),g(`text`,{class:v({"vue-data-ui-transition":T(I)}),key:`plot_${r+q.value.start}`,transform:`translate(${t.x+t.width/2}, ${T(u)(t.y)-F.value.dataLabelFontSize/2})`,"text-anchor":`middle`,"font-size":F.value.dataLabelFontSize,fill:e.color},w(T(f)(F.value.formatter,T(u)(t.value),T(n)({p:F.value.valuePrefix,v:T(u)(t.value),s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:r})),11,xn))),128))],64))),128))])):h(``,!0),yr.value&&N.value.length<Q.value.legend.length?(b(),g(`g`,Sn,[(b(!0),g(p,null,S(Q.value.extremes.maxSeries,(e,t)=>(b(),g(`rect`,{x:Q.value.drawingArea.left+t*Q.value.slotSize,y:Q.value.drawingArea.top,height:Q.value.drawingArea.height<=0?1e-5:Q.value.drawingArea.height,width:Q.value.slotSize<=0?1e-5:Q.value.slotSize,fill:[M.value,G.value].includes(t)?F.value.xyHighlighterColor:`transparent`,style:y(`opacity:${F.value.xyHighlighterOpacity}`),onMouseenter:e=>Q.value.useTooltip(t,`pointer`),onMouseleave:e=>Q.value.killTooltip(t),onClick:e=>Q.value.selectDatapoint(t)},null,44,Cn))),256))])):h(``,!0)],64)):h(``,!0),[E.LINE,E.BAR].includes(H.value)?(b(),g(`g`,wn,[F.value.xAxisLabel&&H.value===E.LINE?(b(),g(`g`,{key:0,ref_key:`xAxisLabel`,ref:Xn},[_(`text`,{"font-size":F.value.axisLabelsFontSize,fill:F.value.color,"text-anchor":`middle`,x:Z.value.drawingArea.left+Z.value.drawingArea.width/2,y:U.value.height-F.value.axisLabelsFontSize/3},w(F.value.xAxisLabel),9,Tn)],512)):h(``,!0),F.value.xAxisLabel&&H.value===E.BAR?(b(),g(`g`,{key:1,ref_key:`xAxisLabel`,ref:Xn},[_(`text`,{"font-size":F.value.axisLabelsFontSize,fill:F.value.color,"text-anchor":`middle`,x:Q.value.drawingArea.left+Q.value.drawingArea.width/2,y:U.value.height-F.value.axisLabelsFontSize/3},w(F.value.xAxisLabel),9,En)],512)):h(``,!0),F.value.yAxisLabel&&H.value===E.LINE?(b(),g(`g`,{key:2,ref_key:`yAxisLabel`,ref:Zn},[_(`text`,{"font-size":F.value.axisLabelsFontSize,fill:F.value.color,transform:`translate(${F.value.axisLabelsFontSize}, ${Z.value.drawingArea.top+Z.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":`middle`},w(F.value.yAxisLabel),9,Dn)],512)):h(``,!0),F.value.yAxisLabel&&H.value===E.BAR?(b(),g(`g`,{key:3,ref_key:`yAxisLabel`,ref:Zn},[_(`text`,{"font-size":F.value.axisLabelsFontSize,fill:F.value.color,transform:`translate(${F.value.axisLabelsFontSize}, ${Q.value.drawingArea.top+Q.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":`middle`},w(F.value.yAxisLabel),9,On)],512)):h(``,!0)])):h(``,!0),ki.value?(b(),g(`rect`,{key:7,x:ki.value.x,y:ki.value.y,width:ki.value.width,height:ki.value.height,fill:ii.value.selection.fill,"fill-opacity":ii.value.selection.fillOpacity,stroke:ii.value.selection.stroke,"stroke-opacity":ii.value.selection.strokeOpacity,"stroke-width":ii.value.selection.strokeWidth,"stroke-dasharray":ii.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,kn)):h(``,!0)],46,mt)):h(``,!0),e.$slots.hint?(b(),g(`div`,An,[C(e.$slots,`hint`,Ge(He({hint:F.value.a11y.translations.keyboardNavigation,isVisible:dr.value})),void 0,!0)])):h(``,!0)]),e.$slots.watermark?(b(),g(`div`,jn,[C(e.$slots,`watermark`,Ge(He({isPrinting:T(kr)||T(Ar)})),void 0,!0)])):h(``,!0),Or.value?(b(),g(`div`,{key:`slicer_${Gn.value}`,ref_key:`quickChartSlicer`,ref:zn},[(b(),Re(Me,{ref_key:`slicerComponent`,ref:Yr,key:`slicer_${Gn.value}`,timeLabels:$.value,background:F.value.zoomColor,borderColor:F.value.backgroundColor,fontSize:F.value.zoomFontSize,useResetSlot:F.value.zoomUseResetSlot,textColor:F.value.color,inputColor:F.value.zoomColor,selectColor:F.value.zoomHighlightColor,max:V.value.maxSeriesLength,min:0,valueStart:q.value.start,valueEnd:q.value.end,smoothMinimap:F.value.zoomMinimap.smooth,minimapSelectedColor:F.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:F.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:F.value.zoomMinimap.selectionRadius,minimapLineColor:F.value.zoomMinimap.lineColor,minimap:xi.value,minimapIndicatorColor:F.value.zoomMinimap.indicatorColor,verticalHandles:F.value.zoomMinimap.verticalHandles,minimapSelectedIndex:G.value,"onUpdate:start":yi,"onUpdate:end":bi,refreshStartPoint:F.value.zoomStartIndex===null?0:F.value.zoomStartIndex,refreshEndPoint:F.value.zoomEndIndex===null?V.value.maxSeriesLength:F.value.zoomEndIndex+1,enableRangeHandles:F.value.zoomEnableRangeHandles,enableSelectionDrag:F.value.zoomEnableSelectionDrag,minimapCompact:F.value.zoomMinimap.compact,minimapMerged:F.value.zoomMinimap.merged,allMinimaps:Ki.value,minimapFrameColor:F.value.zoomMinimap.frameColor,additionalMinimapHeight:F.value.zoomMinimap.additionalHeight,handleType:F.value.zoomMinimap.handleType,handleWidth:F.value.zoomMinimap.handleWidth,handleBorderWidth:F.value.zoomMinimap.handleBorderWidth,handleIconColor:F.value.zoomMinimap.handleIconColor,handleBorderColor:F.value.zoomMinimap.handleBorderColor,handleFill:F.value.zoomMinimap.handleFill,focusOnDrag:F.value.zoomFocusOnDrag,focusRangeRatio:F.value.zoomFocusRangeRatio,maxWidth:F.value.zoomMaxWidth,minimapLeftInsetRatio:Wi.value,minimapRightInsetRatio:Gi.value,onReset:t[0]||=()=>_i({applyControlledZoom:!1,publish:!0}),onTrapMouse:Kr},{"reset-action":Qe(({reset:t})=>[C(e.$slots,`reset-action`,Ge(He({reset:t})),void 0,!0)]),_:3},8,/* @__PURE__ */ `timeLabels.background.borderColor.fontSize.useResetSlot.textColor.inputColor.selectColor.max.valueStart.valueEnd.smoothMinimap.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectionRadius.minimapLineColor.minimap.minimapIndicatorColor.verticalHandles.minimapSelectedIndex.refreshStartPoint.refreshEndPoint.enableRangeHandles.enableSelectionDrag.minimapCompact.minimapMerged.allMinimaps.minimapFrameColor.additionalMinimapHeight.handleType.handleWidth.handleBorderWidth.handleIconColor.handleBorderColor.handleFill.focusOnDrag.focusRangeRatio.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio`.split(`.`)))])):h(``,!0),_(`div`,{id:`legend-bottom-${A.value}`},null,8,Mn),Kn.value&&F.value.showLegend?(b(),Re(Le,{key:7,to:F.value.legendPosition===`top`?`#legend-top-${A.value}`:`#legend-bottom-${A.value}`},[F.value.showLegend?(b(),g(`div`,{key:0,ref_key:`quickChartLegend`,ref:Rn,class:`vue-ui-quick-chart-legend`,style:y(`background:transparent;color:${F.value.color}`)},[(K.value?.legend?.length>2||Z.value?.legend?.length>2||Q.value?.legend?.length>2)&&F.value.showLegendSelectAllToggle&&!T(pr)?(b(),Re(Ne,{key:0,backgroundColor:F.value.legendSelectAllToggleBackgroundColor,color:F.value.legendSelectAllToggleColor,fontSize:F.value.legendFontSize,checked:N.value.length>0,isCursorPointer:lr.value,onToggle:Br},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):h(``,!0),H.value===E.DONUT?(b(!0),g(p,{key:1},S(K.value.legend,(t,r)=>(b(),g(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>Gr(t,K.value.dataset),style:y(`cursor: ${K.value.legend.length>1&&lr.value?`pointer`:`default`}; opacity:${N.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{ua(e,()=>{Gr(t,K.value.dataset)})}},[F.value.useCustomLegend?C(e.$slots,`legend`,Ue({ref_for:!0},{legend:{...t,isSegregated:N.value.includes(t.id),segregate:()=>{Gr(t,K.value.dataset)}}}),void 0,!0,0):(b(),g(p,{key:1},[Be(T(tt),{name:F.value.legendIcon,stroke:t.color,size:F.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),_(`span`,{style:y(`font-size:${F.value.legendFontSize}px`)},w(t.name),5),_(`span`,{style:y(`font-size:${F.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},w(N.value.includes(t.id)?`-`:T(f)(F.value.formatter,t.absoluteValue,T(n)({p:F.value.valuePrefix,v:t.absoluteValue,s:F.value.valueSuffix,r:F.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:r})),5),N.value.includes(t.id)?(b(),g(`span`,{key:0,style:y(`font-size:${F.value.legendFontSize}px`)},` ( - % ) `,4)):Wr.value?(b(),g(`span`,{key:1,style:y(`font-size:${F.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)},` ( - % ) `,4)):(b(),g(`span`,{key:2,style:y(`font-size:${F.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)},` (`+w(T(n)({v:t.value/K.value.total*100,s:`%`,r:F.value.dataLabelRoundingPercentage}))+`) `,5))],64))],44,Nn))),256)):h(``,!0),H.value===E.LINE?(b(!0),g(p,{key:2},S(Z.value.legend,(t,n)=>(b(),g(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>{Vr(t.id,Z.value.legend.length-1),B(`selectLegend`,Z.value.dataset)},style:y(`cursor: ${Z.value.legend.length>1&&lr.value?`pointer`:`default`}; opacity:${N.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{ua(e,()=>{Vr(t.id,Z.value.legend.length-1),B(`selectLegend`,Z.value.dataset)})}},[F.value.useCustomLegend?C(e.$slots,`legend`,Ue({ref_for:!0},{legend:{...t,isSegregated:N.value.includes(t.id),segregate:()=>{Vr(t.id,Z.value.legend.length-1),B(`selectLegend`,Z.value.dataset)}}}),void 0,!0,0):(b(),g(p,{key:1},[Be(T(tt),{name:F.value.legendIcon,stroke:t.color,size:F.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),_(`span`,{style:y(`font-size:${F.value.legendFontSize}px`)},w(t.name),5)],64))],44,Pn))),256)):h(``,!0),H.value===E.BAR?(b(!0),g(p,{key:3},S(Q.value.legend,(t,n)=>(b(),g(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>{Vr(t.id,Q.value.legend.length-1),B(`selectLegend`,Q.value.dataset)},style:y(`cursor: ${Q.value.legend.length>1&&lr.value?`pointer`:`default`}; opacity:${N.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{ua(e,()=>{Vr(t.id,Q.value.legend.length-1),B(`selectLegend`,Q.value.dataset)})}},[F.value.useCustomLegend?C(e.$slots,`legend`,Ue({ref_for:!0},{legend:{...t,isSegregated:N.value.includes(t.id),segregate:()=>{Vr(t.id,Q.value.legend.length-1),B(`selectLegend`,Q.value.dataset)}}}),void 0,!0,0):(b(),g(p,{key:1},[Be(T(tt),{name:F.value.legendIcon,stroke:t.color,size:F.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),_(`span`,{style:y(`font-size:${F.value.legendFontSize}px`)},w(t.name),5)],64))],44,Fn))),256)):h(``,!0)],4)):h(``,!0)],8,[`to`])):h(``,!0),e.$slots.source?(b(),g(`div`,{key:8,ref_key:`source`,ref:Hn,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):h(``,!0),Be(T(at),{teleportTo:F.value.tooltipTeleportTo,show:Pr.value.showTooltip&&j.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.tooltipBorderRadius,borderColor:F.value.tooltipBorderColor,borderWidth:F.value.tooltipBorderWidth,fontSize:F.value.tooltipFontSize,backgroundOpacity:F.value.tooltipBackgroundOpacity,position:F.value.tooltipPosition,offsetX:F.value.tooltipOffsetX,offsetY:F.value.tooltipOffsetY,parent:k.value,content:Vn.value,isFullscreen:Yi.value,isCustom:T(r)(F.value.tooltipCustomFormat),smooth:F.value.tooltipSmooth,smoothForce:F.value.tooltipSmoothForce,smoothSnapThreshold:F.value.tooltipSmoothSnapThreshold,backdropFilter:F.value.tooltipBackdropFilter,isA11yMode:R.value===`keyboard`,a11yPosition:ur.value},{"tooltip-before":Qe(()=>[C(e.$slots,`tooltip-before`,Ge(He({...Bn.value})),void 0,!0)]),tooltip:Qe(()=>[C(e.$slots,`tooltip`,Ge(He({...Bn.value})),void 0,!0)]),"tooltip-after":Qe(()=>[C(e.$slots,`tooltip-after`,Ge(He({...Bn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`smoothForce`,`smoothSnapThreshold`,`backdropFilter`,`isA11yMode`,`a11yPosition`]),C(e.$slots,`skeleton`,{},()=>[T(pr)?(b(),Re(pe,{key:0})):h(``,!0)],!0)],46,ut)):(b(),g(`div`,In,[Be(T(tt),{name:`circleCancel`,stroke:`red`}),t[4]||=_(`span`,null,`Dataset is not processable`,-1)]))}},[[`__scopeId`,`data-v-a6887da5`]]);export{k as n,Ln as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{$ as n,D as r,Dt as i,Ht as a,Jt as o,Lt as s,M as c,S as l,X as ee,Yt as te,Zt as ne,at as u,b as re,i as ie,in as ae,nn as oe,nt as se,pt as ce,t as le,w as ue,yt as de,zt as fe}from"./lib-DqD8nbyX.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he}from"./useHints-BH9r_0Vd.js";import{t as ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as _e}from"./useNestedProp-DrLnzyHO.js";import{t as ve}from"./useThemeCheck-BKNRbGeC.js";import{t as ye}from"./chartImage-r-G4CkRK.js";import{n as be}from"./Title-BLA0tM3g.js";import{t as xe}from"./useChartExport-DtPNpc9M.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./annotationSlots-BRR85CqJ.js";import{n as Ee,t as De}from"./userOptionsSlots-DYuo-E5m.js";import{t as Oe}from"./usePrinter-Cj4eIYC_.js";import{l as ke,t as Ae}from"./useResponsive-D2CPcpda.js";import{t as je}from"./DefGrad-DKMq1REY.js";import{t as Me}from"./BaseLegendToggle-BOcw1ke8.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as Pe}from"./useUserOptionState-CXlFnwPv.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./Legend-D8NunRPr.js";import{t as Le}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Re}from"./vue_ui_radar-68iK9Fam.js";import{Fragment as d,Teleport as ze,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Ke,onMounted as qe,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as T,toRefs as Xe,unref as E,watch as Ze,withCtx as D}from"vue";var Qe=/* @__PURE__ */ e({default:()=>kt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`width`,`height`],at={key:1},ot=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],st={key:0,style:{"pointer-events":`none`}},ct=[`d`,`stroke`,`stroke-width`],lt=[`d`,`stroke`,`stroke-width`],ut={key:2},dt=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`points`,`stroke`,`stroke-width`],pt=[`points`,`stroke`,`stroke-width`,`fill`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht={key:4},gt=[`onMouseenter`,`onMouseleave`,`onClick`],_t=[`cx`,`cy`,`r`],vt=[`cx`,`cy`,`fill`,`r`,`stroke`],yt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:5,class:`vue-data-ui-watermark`},xt=[`id`],St=[`onClick`],Ct={class:`vue-data-ui-legend-item`},wt=[`stroke`,`stroke-width`,`stroke-dasharray`],Tt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},Et={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},Dt={class:`vue-ui-radar-tooltip-datalabel-name`},Ot={key:0},kt=/*#__PURE__*/ ge({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:ge,emit:Qe}){let kt=_(()=>import(`./Tooltip-Iyb_S6oQ.js`)),At=_(()=>import(`./BaseIcon-DDctLkeT.js`).then(e=>e.n)),jt=_(()=>import(`./vue-ui-sparkbar-DPFzdX-D.js`).then(e=>e.n)),Mt=_(()=>import(`./vue-ui-accordion-3lBpCjGm.js`).then(e=>e.n)),Nt=_(()=>import(`./DataTable-BcVZLSs8.js`)),Pt=_(()=>import(`./PenAndPaper-BsBFp16i.js`).then(e=>e.t)),Ft=_(()=>import(`./UserOptions-BSJ_S_us.js`).then(e=>e.n)),It=_(()=>import(`./PackageVersion-ATrKWi8V.js`).then(e=>e.t)),Lt=_(()=>import(`./BaseDraggableDialog-Bw_azO0n.js`).then(e=>e.n)),{vue_ui_radar:Rt}=t(),{isThemeValid:zt,warnInvalidTheme:Bt}=ve(),O=e,Vt=f(()=>!!O.dataset&&Object.keys(O.dataset).length),k=S(ee()),Ht=S(!1),Ut=S(``),Wt=S(0),A=S(null),Gt=S(null),Kt=S(null),qt=S(null),Jt=S(null),Yt=S(0),Xt=S(0),Zt=S(0),Qt=S(!1),$t=S(null),en=S(null),j=S(null),tn=S({x:0,y:0}),nn=S(`pointer`),rn=S(!1),M=S(dn()),N=f(()=>M.value.userOptions),P=f(()=>M.value.style.chart.layout.labels),F=f(()=>M.value.style.chart.layout),I=f(()=>M.value.style.chart.tooltip),L=f(()=>M.value.style.chart);he({config:()=>M.value,dataset:()=>O.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let R=f(()=>M.value.userOptions.useCursorPointer),an=f(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:on,FINAL_DATASET:z}=pe({...Xe(O),FINAL_CONFIG:M,prepareConfig:dn,callback:()=>{Promise.resolve().then(async()=>{await We(),W.value.showTable=M.value.table.show})},skeletonDataset:O.config?.skeletonDataset??{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]},skeletonConfig:ae({defaultConfig:M.value,userConfig:an.value})}),{userOptionsVisible:sn,setUserOptionsVisibility:cn,keepUserOptionState:ln}=Pe({config:M.value}),{svgRef:B}=Fe({config:L.value.title});function un(e){return{...e,style:{...e.style,chart:{...e.style.chart,layout:{...e.style.chart.layout,grid:{rotate:0,...e.style.chart.layout.grid},labels:{...e.style.chart.layout.labels,dataLabels:{offset:0,...e.style.chart.layout.labels.dataLabels}}}}}}}function dn(){let e=un(_e({userConfig:O.config,defaultConfig:Rt})),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=_e({userConfig:Re[t]||O.config,defaultConfig:e}),r=_e({userConfig:O.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:oe[t]||a}}let fn=ne(O.config);Ze(()=>O.config,(e,t)=>{let n=ne(e),r=n!==fn;fn=n;let i=dn();if(!r){M.value.style.chart.tooltip=i.style.chart.tooltip,W.value.showTooltip=M.value.style.chart.tooltip.show;return}M.value=i,sn.value=!M.value.userOptions.showOnChartHover,pn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,W.value.dataLabels.show=P.value.dataLabels.show,W.value.showTable=M.value.table.show,W.value.showTooltip=I.value?I.value.show:!1},{deep:!0});let V=Ye(null),H=Ye(null),U=f(()=>M.value.debug);function pn(){if(fe(O.dataset)&&u({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),M.value.responsive){let e=ke(()=>{let{width:e,height:t}=Ae({chart:A.value,title:L.value.title.text?Gt.value:null,legend:L.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{G.value.width=e,G.value.height=t,Hn()})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=A.value.parentNode,V.value.observe(H.value)}Hn()}qe(()=>{Qt.value=!0,pn()}),Ke(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:mn,isImaging:hn,generatePdf:gn,generateImage:_n}=Oe({elementId:`vue-ui-radar_${k.value}`,fileName:L.value.title.text||`vue-ui-radar`,options:M.value.userOptions.print}),vn=f(()=>M.value.userOptions.show&&!L.value.title.text),yn=f(()=>ue(M.value.customPalette)),W=S({dataLabels:{show:P.value.dataLabels.show},showTable:M.value.table.show,showTooltip:I.value.show}),bn=f(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:I.value.animation.show,animationFrames:I.value.animation.animationFrames},labels:{fontSize:I.value.fontSize,name:{color:I.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),G=S({height:312,width:512}),xn=Qe,K=S([]),Sn=S(null),q=S(!1);function Cn(){K.value.length?K.value=[]:Z.value.forEach((e,t)=>{K.value.push(t)}),wn()}function wn(){xn(`selectLegend`,Z.value.filter((e,t)=>!K.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}function Tn(e){q.value=!0,K.value.includes(e)?(Sn.value=e,K.value=K.value.filter(t=>t!==e),setTimeout(()=>{q.value=!1,Sn.value=null},500)):(K.value.push(e),setTimeout(()=>{q.value=!1},500)),wn()}function En(){return Z.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function Dn(){let e=z.value;if([null,void 0].includes(e?.categories)){u({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:U.value});return}e.categories.length===0?u({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:U.value}):U.value&&e.categories.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`name`]}).forEach(e=>{u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}),[null,void 0].includes(e?.series)?u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target: number}[])`,debug:U.value}):U.value&&e.series.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`name`,`values`,`target`]}).forEach(e=>{u({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:t})})})}Ze(()=>z.value,()=>Dn(),{deep:!0,immediate:!0});let J=f(()=>{let e=Array.isArray(z.value?.categories)?z.value.categories:[],t=yn.value??a;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${k.value}_${n}`,color:l(e?.color)||t[n]||a[n%a.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),Y=f(()=>z.value.series.map((e,t)=>({...e,color:l(e.color)||yn.value[t]||a[t]||a[t%a.length],serieId:`radar_serie_${k.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));function On(e){return Y.value.length?Z.value.find(t=>t.name===e)||(U.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(U.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function kn(e){let t=On(e);t!==null&&K.value.includes(t.absoluteIndex)&&Tn(t.absoluteIndex)}function An(e){let t=On(e);t!==null&&(K.value.includes(t.absoluteIndex)||Tn(t.absoluteIndex))}let jn=f(()=>Math.max(0,...Y.value.flatMap(e=>e.values)));function Mn(e){return F.value.scaleToAxisMax?Math.max(1,e.target||0,...e.values):e.target||jn.value||1}let Nn=f(()=>Y.value.map((e,t)=>{let n=Rn.value.coordinates[t];return Un({centerX:G.value.width/2,centerY:G.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/Mn(e)})})),Pn=f(()=>Y.value.length),Fn=f(()=>Math.min(G.value.width,G.value.height)/3),In=f(()=>{let e=Number(F.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),Ln=f(()=>{let e=Number(F.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Rn=f(()=>c({plot:{x:G.value.width/2,y:G.value.height/2},radius:Fn.value,sides:Pn.value,rotation:Ln.value})),zn=f(()=>{let e=[];for(let t=0;t<Fn.value;t+=Fn.value/F.value.grid.graduations)e.push(t);return e}),X=f(()=>Rn.value.coordinates.map((e,t)=>{let n=Y.value[t],r=Y.value[t].values.map(t=>Un({centerX:G.value.width/2,centerY:G.value.height/2,apexX:e.x,apexY:e.y,proportion:t/Mn(n)}));return{...e,...n,plots:r}}).map(e=>({...e,labelX:Bn(e).x,labelY:Bn(e).y,labelAnchor:Bn(e).anchor})));function Bn({x:e,y:t}){let n=G.value.width/2,r=G.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),s=Number(P.value.dataLabels.offset??0),c=20+(Number.isFinite(s)?s:0);if(!o)return{x:e,y:t,anchor:`middle`};let l=i/o,ee=a/o,te=`middle`;return l>.01?te=`start`:l<-.01&&(te=`end`),{x:e+l*c,y:t+ee*c,anchor:te}}let Vn=f({get:()=>P.value.dataLabels.fontSize,set:e=>e}),{autoSizeLabels:Hn}=Le({svgRef:B,fontSize:P.value.dataLabels.fontSize,minFontSize:6,sizeRef:Vn,labelClass:`.vue-ui-radar-apex-label`});function Un({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let Z=f(()=>{let e=Y.value.map((e,t)=>e.values.map(t=>t/(e.target||jn.value)));return J.value.map((t,r)=>{let i=re(e.map(e=>e[r]).reduce((e,t)=>e+t,0)/Y.value.length);return{...t,absoluteIndex:r,totalProportion:i,shape:`circle`,opacity:K.value.includes(r)?.5:1,segregate:()=>Tn(r),isSegregated:K.value.includes(r),display:`${t.name}: ${n({v:(i??0)*100,s:`%`,r:L.value.legend.roundingPercentage})}`}})}),Wn=f(()=>({cy:`radar-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),Q=f(()=>{let e=[{name:M.value.translations.datapoint,color:``},{name:M.value.translations.target,color:``},...Z.value];return{head:e,body:z.value.series.map(e=>[e.name,ie(e.formatter,e.target,n({p:e.prefix,v:e.target,s:e.suffix,r:M.value.table.td.roundingValue})),...e.values.map((t,r)=>`${ie(e.formatter,t,n({p:J.value[r]?.prefix??``,v:t,s:J.value[r]?.suffix??``,r:M.value.table.td.roundingValue}))} (${isNaN(t/e.target)?``:n({v:t/e.target*100,s:`%`,r:M.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:e}}),Gn=S(null),Kn=S([]),qn=S(null);function Jn(e,t){Ht.value=!1,Gn.value=null,j.value=null,nn.value=`pointer`,M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Yn(e,t){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Xn(e,t,r=`pointer`){M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:t}),nn.value=r,j.value=t;let a=J.value.slice();Kn.value=[],Gn.value=t,Ht.value=!0,qn.value={datapoint:e,seriesIndex:t,series:{categories:a,datapoints:Y.value,radar:X.value},config:M.value};let o=I.value.customFormat;if(i(o)&&ce(()=>o({seriesIndex:t,datapoint:e,series:{categories:a,datapoints:Y.value,radar:X.value},config:M.value}))){Ut.value=o({seriesIndex:t,datapoint:e,series:{categories:a,datapoints:Y.value,radar:X.value},config:M.value});return}Ut.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${I.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!K.value.includes(t)){let r=a[t],i=e.values[t],o=isNaN(i/e.target)?0:i/e.target*100,s=ie(e.formatter,i,n({p:J.value[t].prefix,v:i,s:J.value[t].suffix,r:I.value.roundingValue}),{datapoint:e}),c=n({v:o,s:`%`,r:I.value.roundingPercentage}),l=I.value.showValue&&I.value.showPercentage?`${s} (${c})`:I.value.showValue&&!I.value.showPercentage?s:!I.value.showValue&&I.value.showPercentage?`${c}`:``;Kn.value.push({name:r?.name??`#${t+1}`,value:e.values[t]/e.target*100,color:r?.color,suffix:l,prefix:``,rounding:I.value.roundingPercentage,formatter:e.formatter})}}function Zn(e=null){We(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=[[``],[M.value.translations.target],...Z.value.flatMap(e=>[[e.name],[`%`]])],i=z.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,isNaN(t/e.target)?``:t/e.target*100])]),a=t.concat([n]).concat(i),o=r(a);e?e(o):se({csvContent:o,title:L.value.title.text||`vue-ui-radar`})})}let $=S(!1);function Qn(e){$.value=e,Wt.value+=1}function $n(){W.value.showTable=!W.value.showTable}function er(){W.value.showTooltip=!W.value.showTooltip}let tr=S(!1);function nr(){tr.value=!tr.value}let rr=ye(A,()=>L.value.title.text),ir=f(()=>Ce({config:M,style:L,mutableConfig:W,dialog:Lt,accordion:Mt,isFullscreen:$,parent:A,maxWidth:800,isCursorPointer:R}));Ze(()=>W.value.showTable,e=>Se(e,M,$t));function ar(){W.value.showTable=!1,en.value&&en.value.setTableIconState(!1)}let or=f(()=>Z.value.map(e=>({...e,name:e.display}))),sr=f(()=>L.value.backgroundColor),cr=f(()=>L.value.legend),lr=f(()=>L.value.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=xe({svg:B,title:lr,legend:cr,legendItems:or,backgroundColor:sr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:_n});async function mr(){if(xn(`copyAlt`,{config:M.value,dataset:X.value}),!M.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:X.value}))}function hr(){j.value=null,rn.value=!0}function gr(){j.value=null,nn.value=`pointer`,Ht.value=!1,Gn.value=null,rn.value=!1}function _r(e){if(!Number.isFinite(e)||!B.value)return;let t=X.value[e];if(!t)return;let n=B.value.getBoundingClientRect();tn.value={x:n.left+t.labelX/G.value.width*n.width,y:n.top+t.labelY/G.value.height*n.height}}function vr(e){if(!B.value||tr.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){j.value=null,nn.value=`pointer`,Ht.value=!1,Gn.value=null;return}if(r){if(j.value===null)return;let e=X.value[j.value];if(!e)return;Yn(e,j.value);return}let a=j.value;a===null||a<0||a>=X.value.length?a=n?0:X.value.length-1:n?(a+=1,a>=X.value.length&&(a=0)):t&&(--a,a<0&&(a=X.value.length-1));let o=X.value[a];o&&(j.value=a,_r(a),Xn(o,a,`keyboard`))}let yr=f(()=>({headers:Q.value?.colNames?.map(e=>e.name??e)??[],rows:Q.value?.body??[]}));return ge({getData:En,getImage:rr,generatePdf:gn,generateCsv:Zn,generateImage:_n,generateSvg:fr,hideSeries:An,showSeries:kn,toggleTable:$n,toggleTooltip:er,toggleAnnotator:nr,toggleFullscreen:Qn,copyAlt:mr}),(e,t)=>(x(),h(`div`,{class:Ge(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:A,id:`vue-ui-radar_${k.value}`,style:b(`font-family:${M.value.style.fontFamily};width:100%; ${M.value.responsive?`height: 100%;`:``} text-align:center;background:${L.value.backgroundColor}`),onMouseenter:t[2]||=()=>E(cn)(!0),onMouseleave:t[3]||=()=>E(cn)(!1)},[g(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[g(`p`,null,T(M.value.a11y.translations.keyboardNavigation),1)],8,et),yr.value?.rows?.length?(x(),p(Ne,{key:0,uid:k.value,head:yr.value.headers,body:yr.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),N.value.buttons.annotator?(x(),p(E(Pt),{key:1,svgRef:E(B),backgroundColor:L.value.backgroundColor,color:L.value.color,active:tr.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:nr},Be({_:2},[C(E(Te),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(we)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),vn.value?(x(),h(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),L.value.title.text?(x(),h(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent;padding-bottom:12px`},[(x(),p(be,{key:`title_${Yt.value}`,config:{title:{cy:`radar-div-title`,...L.value.title},subtitle:{cy:`radar-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${k.value}`},null,8,tt),N.value.show&&Vt.value&&(E(ln)||E(sn))?(x(),p(E(Ft),{ref_key:`userOptionsRef`,ref:en,key:`user_options_${Wt.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isImaging:E(hn),isPrinting:E(mn),uid:k.value,hasTooltip:N.value.buttons.tooltip&&I.value.show,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:$.value,isTooltip:W.value.showTooltip,titles:{...N.value.buttonTitles},chartElement:A.value,position:N.value.position,hasAnnotator:N.value.buttons.annotator,isAnnotation:tr.value,callbacks:N.value.callbacks,printScale:N.value.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Qn,onGeneratePdf:E(gn),onGenerateCsv:Zn,onGenerateImage:E(pr),onGenerateSvg:E(fr),onToggleTable:$n,onToggleTooltip:er,onToggleAnnotator:nr,onCopyAlt:mr,style:b({visibility:E(ln)?E(sn)?`visible`:`hidden`:`visible`})},Be({_:2},[C(E(Ee)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(De)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,nt,[(x(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:E(le),"aria-describedby":`chart-instructions-${k.value}`,class:Ge({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,style:b(`max-width:100%;overflow:visible;background:transparent;color:${L.value.color}`),tabindex:`0`,onFocus:hr,onBlur:gr,onKeydown:vr},[He(E(It)),e.$slots[`chart-background`]?(x(),h(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,it)):m(``,!0),g(`defs`,null,[(x(!0),h(d,null,C(J.value,(e,t)=>(x(),p(je,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${k.value}_${t}`,key:`radar_gradient_${k.value}_${t}`,stops:[[`0%`,E(o)(E(te)(e.color,.05),F.value.dataPolygon.opacity),1],[`100%`,E(o)(e.color,F.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),F.value.grid.show?(x(),h(`g`,at,[(x(!0),h(d,null,C(X.value,e=>(x(),h(`line`,{x1:G.value.width/2,y1:G.value.height/2,x2:e.x,y2:e.y,stroke:F.value.grid.stroke,"stroke-width":F.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,ot))),256)),F.value.grid.graduations>0?(x(),h(`g`,st,[(x(!0),h(d,null,C(zn.value,e=>(x(),h(`path`,{d:E(c)({plot:{x:G.value.width/2,y:G.value.height/2},radius:e,sides:Pn.value,rotation:Ln.value}).path,fill:`none`,stroke:F.value.grid.stroke,"stroke-width":F.value.grid.strokeWidth},null,8,ct))),256))])):m(``,!0)])):m(``,!0),g(`path`,{d:Rn.value.path,fill:`none`,stroke:F.value.outerPolygon.stroke,"stroke-width":F.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,lt),P.value.dataLabels.show?(x(),h(`g`,ut,[(x(!0),h(d,null,C(X.value,(e,t)=>(x(),h(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":P.value.dataLabels.fontSize,fill:P.value.dataLabels.color,onMouseenter:n=>Xn(e,t,`pointer`),onMouseleave:n=>Jn(e,t),onClick:n=>Yn(e,t)},T(e.name),41,dt))),256))])):m(``,!0),(x(!0),h(d,null,C(J.value,(e,t)=>(x(),h(`g`,null,[g(`g`,null,[M.value.useCssAnimation||!M.value.useCssAnimation&&!K.value.includes(t)?(x(),h(`polygon`,{key:0,points:E(s)(X.value.map(e=>e.plots[t]),!1,!0),stroke:L.value.backgroundColor,"stroke-width":F.value.dataPolygon.strokeWidth+1,fill:`none`,class:Ge({"animated-out":K.value.includes(t)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===t&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ft)):m(``,!0),M.value.useCssAnimation||!M.value.useCssAnimation&&!K.value.includes(t)?(x(),h(`polygon`,{key:1,points:E(s)(X.value.map(e=>e.plots[t]),!1,!0),stroke:e.color,"stroke-width":F.value.dataPolygon.strokeWidth,fill:F.value.dataPolygon.transparent?`transparent`:F.value.dataPolygon.useGradient?`url(#radar_gradient_${k.value}_${t})`:E(o)(e.color,F.value.dataPolygon.opacity),class:Ge({"animated-out":K.value.includes(t)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===t&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,pt)):m(``,!0)])]))),256)),F.value.targetReference.show?(x(),h(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${E(s)(Nn.value,!1,!0)}Z`,fill:`none`,stroke:F.value.targetReference.stroke,"stroke-width":F.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":F.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,mt)):m(``,!0),F.value.plots.show?(x(),h(`g`,ht,[(x(!0),h(d,null,C(X.value,(e,t)=>(x(),h(`g`,{key:`radar-category-${t}`},[(x(!0),h(d,null,C(e.plots,(n,r)=>(x(),h(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!K.value.includes(r)&&Xn(e,t,`pointer`),onMouseleave:n=>!K.value.includes(r)&&Jn(e,t),onClick:n=>!K.value.includes(r)&&Yn(e,t)},[g(`circle`,{cx:n.x,cy:n.y,r:In.value,fill:`transparent`,stroke:`transparent`,style:b({pointerEvents:K.value.includes(r)?`none`:`all`})},null,12,_t),g(`circle`,{cx:n.x,cy:n.y,fill:K.value.includes(r)?`transparent`:J.value[r]?J.value[r].color:`transparent`,r:Gn.value!==null&&Gn.value===t?F.value.plots.radius*1.6:F.value.plots.radius,stroke:K.value.includes(r)?`transparent`:L.value.backgroundColor,"stroke-width":.5,class:Ge({"animated-out":K.value.includes(r)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===r&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,vt)],40,gt))),128))]))),128))])):m(``,!0),w(e.$slots,`svg`,{svg:{...G.value,outerPolygon:Rn.value,isPrintingImg:E(mn)||E(hn)||E(ur),isPrintingSvg:E(dr)}},void 0,!0)],46,rt)),e.$slots.hint?(x(),h(`div`,yt,[w(e.$slots,`hint`,y(v({hint:M.value.a11y.translations.keyboardNavigation,isVisible:rn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(x(),h(`div`,bt,[w(e.$slots,`watermark`,y(v({isPrinting:E(mn)||E(hn)||E(ur)||E(dr)})),void 0,!0)])):m(``,!0),g(`div`,{id:`legend-bottom-${k.value}`},null,8,xt),Qt.value&&(L.value.legend.show||e.$slots.legend)?(x(),p(ze,{key:6,to:L.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[g(`div`,{ref_key:`chartLegend`,ref:Kt},[w(e.$slots,`legend`,{legend:Z.value},()=>[L.value.legend.show?(x(),p(Ie,{key:`legend_${Zt.value}`,legendSet:Z.value,config:Wn.value,isCursorPointer:R.value,onClickMarker:t[0]||=({i:e})=>Tn(e)},Be({item:D(({legend:e,index:t})=>[E(on)?m(``,!0):(x(),h(`div`,{key:0,onClick:t=>e.segregate(),style:b(`opacity:${K.value.includes(t)?.5:1}`)},T(e.display),13,St))]),legendToggle:D(()=>[Z.value.length>2&&L.value.legend.selectAllToggle.show&&!E(on)?(x(),p(Me,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:K.value.length>0,isCursorPointer:R.value,onToggle:Cn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):m(``,!0)]),_:2},[F.value.targetReference.show&&F.value.targetReference.showInLegend?{name:`after`,fn:D(()=>[g(`div`,Ct,[g(`div`,{style:b({display:`flex`,height:L.value.legend.fontSize})},[(x(),h(`svg`,{style:b({width:L.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[g(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:F.value.targetReference.stroke,"stroke-width":F.value.targetReference.strokeWidth*.7,"stroke-dasharray":F.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,wt)],4))],4),g(`span`,null,T(F.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):m(``,!0)],!0)],512)],8,[`to`])):m(``,!0),e.$slots.source?(x(),h(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),He(E(kt),{teleportTo:I.value.teleportTo,show:W.value.showTooltip&&Ht.value,backgroundColor:I.value.backgroundColor,color:I.value.color,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,backgroundOpacity:I.value.backgroundOpacity,fontSize:I.value.fontSize,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:A.value,content:Ut.value,isFullscreen:$.value,isCustom:I.value.customFormat&&typeof I.value.customFormat==`function`,smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:nn.value===`keyboard`,a11yPosition:tn.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(v({...qn.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(v({...qn.value})),void 0,!0)]),"tooltip-after":D(()=>[![`function`].includes(typeof I.value.customFormat)&&!e.$slots.tooltip?(x(),h(`div`,Tt,[He(E(jt),{dataset:Kn.value,config:bn.value,backgroundOpacity:0},{"data-label":D(({bar:e})=>[g(`div`,Et,[g(`span`,Dt,T(e.name+(I.value.showValue||I.value.showPercentage?`:`:``)),1),I.value.showValue||I.value.showPercentage?(x(),h(`span`,Ot,T(e.suffix),1)):m(``,!0)])]),_:1},8,[`dataset`,`config`])])):m(``,!0),w(e.$slots,`tooltip-after`,y(v({...qn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Vt.value&&N.value.buttons.table?(x(),p(Je(ir.value.component),Ue({key:8},ir.value.props,{ref_key:`tableUnit`,ref:$t,onClose:ar}),Be({content:D(()=>[(x(),p(E(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:M.value.table.useDialog?``:ir.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:R.value,onClose:ar},{th:D(({th:e})=>[Ve(T(e.name),1)]),td:D(({td:e})=>[Ve(T(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:D(()=>[Ve(T(ir.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:D(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Zn(N.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[He(E(At),{name:`fileCsv`,stroke:ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),w(e.$slots,`skeleton`,{},()=>[E(on)?(x(),p(me,{key:0})):m(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-4c2db0d1`]]);export{Qe as n,kt as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{$ as n,B as r,X as i,Yt as a,at as o,i as s,t as c,zt as ee}from"./lib-DqD8nbyX.js";import{n as te,t as l}from"./useHints-BH9r_0Vd.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as d}from"./useNestedProp-DrLnzyHO.js";import{t as f}from"./DefGrad-DKMq1REY.js";import{Fragment as p,computed as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createVNode as v,mergeProps as y,normalizeStyle as b,onMounted as x,openBlock as S,ref as C,renderList as ne,renderSlot as w,toDisplayString as T,unref as E,useSlots as re,watch as ie,withKeys as D}from"vue";var O=/* @__PURE__ */ e({default:()=>F}),k={key:0,class:`vue-ui-rating-title`,style:{width:`100%`}},A={key:0,style:{position:`relative`}},j={key:0,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},M={key:1,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},N=[`src`,`height`,`width`],ae=[`xmlns`,`height`,`width`],oe=[`points`,`fill`,`stroke`,`stroke-width`],se=[`src`,`alt`,`height`,`width`,`id`],ce=[`xmlns`,`viewBox`,`height`,`id`],le=[`points`,`fill`,`stroke`],ue=[`xmlns`,`height`],de=[`onClick`,`onMouseenter`,`onFocus`,`onKeyup`],P=[`onMouseenter`,`onFocus`],F=/*#__PURE__*/ u({__name:`vue-ui-rating`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`rate`],setup(e,{expose:u,emit:O}){let{vue_ui_rating:F}=t(),I=e,L=C(i()),R=C(!1),z=C(void 0),B=C(void 0),V=C([]),fe=re(),pe=O,H=m({get:()=>G(),set:e=>e}),U=m(()=>H.value.style.rating),W=m(()=>H.value.style);x(()=>{fe[`chart-background`]&&H.value.debug&&console.warn(`VueUiRating does not support the #chart-background slot.`)}),te({config:()=>H.value,dataset:()=>[],component:`VueUiRating`,rules:[l.noHint]});let me=m(()=>H.value.useCursorPointer);function G(){return d({userConfig:I.config,defaultConfig:F})}ie(()=>I.config,e=>{H.value=G(),X()},{deep:!0});let he=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)?Y(I.dataset.rating):I.dataset.rating),ge=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)),K=C(he.value),q=m(()=>H.value.type===`image`),J=m(()=>H.value.readonly);function Y(e){let t=0,n=0;for(let r in e){let i=parseInt(r),a=e[r];t+=i*a,n+=a}if(n===0)return 0;let r=t/n;return Math.min(H.value.to,Math.max(H.value.from,r))}x(()=>{X()});function X(){(!Object.hasOwn(I.dataset,`rating`)||ee(I.dataset))&&o({componentName:`VueUiRating`,type:`datasetAttribute`,property:`rating`,debug:H.value.debug}),V.value=[];for(let e=H.value.from;e<=H.value.to;e+=1)V.value.push(e)}function Z(e,t=!1){return e>z.value||J.value?t?W.value.image.inactiveOpacity:W.value.star.inactiveColor:t?1:W.value.star.useGradient?`url(#star_gradient_under_${L.value})`:W.value.star.activeColor}function Q(e,t=!1){let n=K.value-e,r=t?1:100;switch(!0){case n<=0:return .001;case n>1:return 1*r;default:return n*r}}function $(e){J.value||(K.value=e,pe(`rate`,e))}function _e(){return K.value}function ve(e=!0){J.value=e}return u({getData:_e,toggleReadonly:ve}),(e,t)=>(S(),g(`div`,{style:b(`background:${W.value.backgroundColor};font-family:${W.value.fontFamily};width:100%`),class:`vue-data-ui-component vue-ui-rating`,onMouseover:t[4]||=e=>R.value=!0,onMouseleave:t[5]||=e=>{R.value=!1,z.value=void 0}},[W.value.title.text?(S(),g(`div`,k,[_(`div`,{style:b(`color:${W.value.title.color};font-weight:${W.value.title.bold?`bold`:`normal`};text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.offsetY}px;font-size:${W.value.title.fontSize}px`)},T(W.value.title.text),5),W.value.title.subtitle.text?(S(),g(`div`,{key:0,style:b(`color:${W.value.title.subtitle.color};font-size:${W.value.title.subtitle.fontSize}px;text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.subtitle.offsetY}px;font-weight:${W.value.title.subtitle.bold?`bold`:`normal`}`)},T(W.value.title.subtitle.text),5)):h(``,!0)])):h(``,!0),U.value.show&&U.value.position===`top`?(S(),g(`div`,{key:1,style:b(`width:100%;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),_(`div`,{class:`vue-ui-rating-wrapper`,style:b(`height:${W.value.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[U.value.show&&U.value.position===`left`?(S(),g(`div`,{key:0,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-right:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),(S(!0),g(p,null,ne(V.value,(i,o)=>(S(),g(`div`,{class:`vue-ui-rating-unit-container`,style:b(`position:relative;height:${W.value.itemSize}px;width:${W.value.itemSize}px`)},[e.$slots[`layer-under`]||e.$slots[`layer-above`]?(S(),g(`div`,A,[e.$slots[`layer-under`]?(S(),g(`div`,j,[w(e.$slots,`layer-under`,y({ref_for:!0},{value:i,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0),e.$slots[`layer-above`]?(S(),g(`div`,M,[w(e.$slots,`layer-above`,y({ref_for:!0},{value:i,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0)])):(S(),g(p,{key:1},[q.value?(S(),g(`img`,{key:0,src:W.value.image.src,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;opacity:${isNaN(z.value)?W.value.image.inactiveOpacity:Z(i,!0)}`)},null,12,N)):(S(),g(`svg`,{key:1,xmlns:E(c),viewBox:`0 0 100 100`,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_under_${L.value}`,stops:[[`0%`,E(a)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(r)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:isNaN(z.value)?W.value.star.inactiveColor:Z(i),stroke:W.value.star.borderColor?W.value.star.borderColor:z.value?Z(i):W.value.star.inactiveColor,"stroke-width":W.value.star.borderWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,oe)],8,ae)),q.value?(S(),g(`img`,{key:2,src:W.value.image.src,alt:`${W.value.image.alt} ${i}`,height:W.value.itemSize,width:W.value.itemSize,id:`active_${L.value}_${i}`,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;clip:rect(0px,${Q(o,!0)*W.value.itemSize}px,${W.value.itemSize}px,0px`)},null,12,se)):(S(),g(`svg`,{key:3,xmlns:E(c),viewBox:`0 0 ${Q(o)} 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,id:`active_${L.value}_${i}`,style:{position:`absolute`,top:`0`,left:`0`}},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_over_${L.value}`,stops:[[`0%`,E(a)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(r)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:W.value.star.useGradient?`url(#star_gradient_over_${L.value})`:W.value.star.activeColor,stroke:W.value.star.activeColor},null,8,le)],8,ce))],64)),(S(),g(`svg`,{xmlns:E(c),viewBox:`0 0 100 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;${J.value?``:me.value?`cursor:pointer`:``}`)},[J.value?h(``,!0):(S(),g(`rect`,{key:0,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onClick:e=>$(i),onMouseenter:e=>z.value=i,onMouseleave:t[0]||=e=>z.value=void 0,onFocus:e=>B.value=i,onBlur:t[1]||=e=>B.value=void 0,tabindex:`0`,onKeyup:D(e=>$(i),[`enter`])},null,40,de)),J.value?(S(),g(`rect`,{key:1,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onMouseenter:e=>z.value=i,onMouseleave:t[2]||=e=>z.value=void 0,onFocus:e=>B.value=i,onBlur:t[3]||=e=>B.value=void 0},null,40,P)):h(``,!0)],12,ue)),W.value.tooltip.show&&ge.value&&J.value?(S(),g(`div`,{key:2,class:`vue-ui-rating-tooltip`,style:b(`border:1px solid ${W.value.tooltip.borderColor};position:absolute;top:${-48+W.value.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${W.value.tooltip.backgroundColor};display:${z.value===i?`block`:`none`};padding:2px 12px;border-radius:${W.value.tooltip.borderRadius}px;box-shadow:${W.value.tooltip.boxShadow}`)},[_(`div`,{style:b(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${W.value.tooltip.color}`)},[_(`span`,{style:b(`font-size:${W.value.tooltip.fontSize}px`)},T(i)+`:`,5),_(`span`,{style:b(`font-weight:${W.value.tooltip.bold?`bold`:`normal`};font-size:${W.value.tooltip.fontSize}px`)},T(E(s)(W.value.tooltip.formatter,I.dataset.rating[i],E(n)({v:I.dataset.rating[i],r:W.value.tooltip.roundingValue}),H.value)),5),_(`div`,{style:b(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${W.value.tooltip.borderColor}`)},` ▼ `,4)],4)],4)):h(``,!0)],4))),256)),U.value.show&&U.value.position===`right`?(S(),g(`div`,{key:1,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-left:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],4),U.value.show&&U.value.position===`bottom`?(S(),g(`div`,{key:2,style:b(`width:100%;text-align:center;margin-top:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],36))}},[[`__scopeId`,`data-v-cdcab4d9`]]);export{O as n,F as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{$ as n,Ht as r,X as i,at as a,i as o,in as ee,r as s,rn as c,t as te,w as ne,yt as re,zt as ie}from"./lib-DqD8nbyX.js";import{n as ae,t as oe}from"./BaseScanner-8NdoBs7B.js";import{n as se,t as ce}from"./useHints-BH9r_0Vd.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-ChGWTt5l.js";import{t as de}from"./img-DiP2_5_r.js";import{n as fe}from"./Title-BLA0tM3g.js";import{t as pe}from"./useChartExport-DtPNpc9M.js";import{n as me,t as he}from"./annotationSlots-BRR85CqJ.js";import{n as ge,t as _e}from"./userOptionsSlots-DYuo-E5m.js";import{t as ve}from"./usePrinter-Cj4eIYC_.js";import{l as ye,t as be}from"./useResponsive-D2CPcpda.js";import{t as xe}from"./A11yDataTable-DWNlWXzs.js";import{t as Se}from"./useUserOptionState-CXlFnwPv.js";import{t as Ce}from"./useChartAccessibility-DOMuYJfm.js";import{t as we}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Te}from"./vue_ui_relation_circle-Dkv-cSB6.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ee,createTextVNode as De,createVNode as Oe,defineAsyncComponent as ke,guardReactiveProps as h,mergeProps as Ae,normalizeClass as je,normalizeProps as g,normalizeStyle as _,onBeforeUnmount as Me,onMounted as Ne,openBlock as v,ref as y,renderList as b,renderSlot as x,shallowRef as Pe,toDisplayString as S,toRefs as Fe,unref as C,useCssVars as Ie,watch as Le,withCtx as Re}from"vue";var ze=/* @__PURE__ */ e({default:()=>ot}),Be=[`id`],Ve=[`id`],He={style:{position:`relative`}},Ue=[`xmlns`,`viewBox`,`aria-describedby`],We=[`width`,`height`],Ge=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Ke={key:1},qe=[`stroke`,`d`,`stroke-width`],Je={style:{"pointer-events":`none`}},Ye=[`cx`,`cy`,`fill`,`r`,`stroke`],Xe=[`x`,`y`,`fill`,`font-size`],Ze={key:2},Qe=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],$e={style:{"pointer-events":`none`}},et=[`cx`,`cy`,`fill`,`r`,`stroke`],tt=[`x`,`y`,`fill`,`font-size`],nt=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],rt=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],it={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},at={key:5,class:`vue-data-ui-watermark`},ot=/*#__PURE__*/ le({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:le,emit:ze}){Ie(e=>({v1381a32e:Pt.value,v5aa6ee0d:Nt.value,v4caba12f:Ft.value}));let ot=ke(()=>import(`./PenAndPaper-BsBFp16i.js`).then(e=>e.t)),st=ke(()=>import(`./UserOptions-BSJ_S_us.js`).then(e=>e.n)),ct=ke(()=>import(`./PackageVersion-ATrKWi8V.js`).then(e=>e.t)),{vue_ui_relation_circle:lt}=t(),w=e,ut=ze,dt=u(()=>!!w.dataset&&Object.keys(w.dataset).length),T=y(i()),ft=y(0),E=y(null),pt=y(null),mt=y(null),ht=y(null),gt=y(0),D=y(null),O=y(!1),k=y(wt()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.weightLabels),M=u(()=>k.value.style);se({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiRelationCircle`,rules:[ce.noHint]});let N=u(()=>k.value.userOptions.useCursorPointer),_t=u(()=>ee({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:k.value.skeletonConfig??{}})),{loading:vt,FINAL_DATASET:yt,manualLoading:bt}=ae({...Fe(w),FINAL_CONFIG:k,prepareConfig:wt,skeletonDataset:w.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:ee({defaultConfig:k.value,userConfig:_t.value})}),{userOptionsVisible:xt,setUserOptionsVisibility:St,keepUserOptionState:Ct}=Se({config:k.value}),{svgRef:P}=Ce({config:M.value.title});function wt(){return ue(w.config,lt,Te)}Le(()=>w.config,e=>{k.value=wt(),xt.value=!k.value.userOptions.showOnChartHover,B.value=M.value.size,V.value=j.value.size,H.value=M.value.plot.radius,U.value=M.value.labels.fontSize,W.value.height=M.value.size,W.value.width=M.value.size,Lt(),gt.value+=1},{deep:!0}),Le(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(bt.value=!1)},{deep:!0});let{isPrinting:Tt,isImaging:Et,generatePdf:Dt,generateImage:Ot}=ve({elementId:`relation_circle_${T.value}`,fileName:M.value.title.text||`vue-ui-relation-circle`,options:k.value.userOptions.print}),kt=u(()=>k.value.userOptions.show&&!M.value.title.text),At=u(()=>ne(k.value.customPalette)),F=y([]),I=y([]),L=y({}),R=y([]),jt=y(0),z=u(()=>yt.value.slice(0,M.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));Le(z,()=>{F.value=[],I.value=[],Bt(),Ht()});let B=y(M.value.size),V=y(j.value.size),H=y(M.value.plot.radius),U=y(M.value.labels.fontSize),W=y({height:M.value.size,width:M.value.size}),G=u({get(){return B.value*M.value.circle.radiusProportion},set(e){return e}}),Mt=u(()=>M.value.links.curved),Nt=u(()=>`${M.value.animation.speedMs}ms`),Pt=u(()=>G.value*2),Ft=u(()=>G.value*4),K=Pe(null),q=Pe(null);Ne(()=>{Lt(),document.getElementById(`relation_circle_${T.value}`).addEventListener(`click`,zt)});let It=u(()=>k.value.debug);function Lt(){if(ie(w.dataset)?(a({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),bt.value=!0):It.value&&w.dataset.forEach((e,t)=>{re({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{a({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),ie(w.dataset)||(bt.value=k.value.loading),k.value.responsive){let e=ye(()=>{let{width:e,height:t}=be({chart:E.value,title:M.value.title.text?pt.value:null,source:mt.value,noTitle:ht.value});requestAnimationFrame(()=>{B.value=Math.min(e,t),W.value.width=Math.max(.1,e),W.value.height=Math.max(.1,t-12),G.value=B.value*M.value.circle.radiusProportion,F.value=[],I.value=[],Bt(),Ht(),Rt(),k.value.responsiveProportionalSizing?(V.value=c({relator:B.value,adjuster:M.value.size,source:j.value.size,threshold:6,fallback:6}),H.value=c({relator:B.value,adjuster:M.value.size,source:M.value.plot.radius,threshold:1,fallback:1}),U.value=c({relator:B.value,adjuster:M.value.size,source:M.value.labels.fontSize,threshold:6,fallback:6})):(V.value=j.value.size,H.value=M.value.plot.radius,U.value=M.value.labels.fontSize)})});K.value&&(q.value&&K.value.unobserve(q.value),K.value.disconnect()),K.value=new ResizeObserver(e),q.value=E.value.parentNode,K.value.observe(q.value)}else F.value=[],I.value=[],Bt(),Ht();Rt()}Me(()=>{document.getElementById(`relation_circle_${T.value}`).removeEventListener(`click`,zt),K.value&&(q.value&&K.value.unobserve(q.value),K.value.disconnect())});let{autoSizeLabels:Rt}=we({svgRef:P,fontSize:M.value.labels.fontSize,minFontSize:M.value.labels.minFontSize,sizeRef:U,labelClass:`.vue-ui-relation-circle-legend`});function zt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(L.value={},R.value=[])}function Bt(){let e=6.28319/z.value.length,t=360/z.value.length,n=0,i=0;z.value.forEach((a,o)=>{let ee=a.weights.reduce((e,t)=>e+t,0),s=G.value*Math.cos(n)+W.value.width/2,c=G.value*Math.sin(n)+W.value.height/2+M.value.circle.offsetY;F.value.push({x:s,y:c,...a,color:a.color?a.color:At.value[o]?At.value[o]:r[o],regAngle:i,totalWeight:ee}),n+=e,i+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){I.value=[],F.value.forEach(e=>{F.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);I.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Vt({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Ut({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Ut(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:W.value.width/2,y:W.value.height/2+M.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Wt=u(()=>Math.max(...I.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(L.value,`x`)?R.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function J(e){return e.colorSource}function Kt(e){return Object.hasOwn(L.value,`x`)?R.value.includes(e.id)&&e.relationId===`${e.id}_${L.value.id}`||e.relationId===`${L.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function Y(e){return Object.hasOwn(L.value,`x`)?!!(R.value.includes(e.id)&&e.relationId===`${e.id}_${L.value.id}`||e.relationId===`${L.value.id}_${e.id}`):!1}function qt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Jt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Yt(e){return Object.hasOwn(L.value,`x`)?L.value.id===e.id||R.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Xt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let X=y(null);function Zt(e,t){X.value=t,D.value=t,k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){X.value=null,O.value||(D.value=null),k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,L.value.id&&e.id===L.value.id?(L.value={},R.value=[]):(L.value=e,R.value=[...e.relations]))}function en(e,t){D.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*M.value.links.maxWidth;return Math.max(.3,t)}let Z=y(!1);function nn(e){Z.value=e,ft.value+=1}let Q=y(!1);function rn(){Q.value=!Q.value}async function an({scale:e=2}={}){if(!E.value)return;let{width:t,height:n}=E.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await de({domElement:E.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.title.text,width:t,height:n,aspectRatio:r}}let on=u(()=>M.value.backgroundColor),sn=u(()=>M.value.title),{isCallbackImaging:cn,isCallbackSvg:ln,generateSvg:un,onGenerateImage:dn}=pe({svg:P,title:sn,legend:null,legendItems:null,backgroundColor:on,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Ot});async function fn(){if(ut(`copyAlt`,{config:k.value,dataset:z.value}),!k.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:z.value}))}function pn(){O.value=!0,F.value.length&&D.value===null&&(D.value=0)}function mn(){O.value=!1,D.value=null}function hn(e){if(!P.value||Q.value||document.activeElement!==P.value||!F.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){D.value=null,L.value={},R.value=[];return}if(r){if(D.value===null)return;let e=F.value[D.value];if(!e)return;$t(e,D.value);return}let a=D.value;a===null||a<0||a>=F.value.length?a=n?0:F.value.length-1:n?(a+=1,a>=F.value.length&&(a=0)):t&&(--a,a<0&&(a=F.value.length-1)),D.value=a,X.value=a;let o=F.value[a];o&&k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let $=u(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:z.value.map(e=>{let t=e.relations.map(e=>z.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return le({getImage:an,generatePdf:Dt,generateSvg:un,generateImage:Ot,toggleAnnotator:rn,toggleFullscreen:nn,copyAlt:fn}),(e,t)=>(v(),p(`div`,{ref_key:`relationCircleChart`,ref:E,class:`vue-data-ui-component vue-ui-relation-circle`,style:_(`width:100%;background:${M.value.backgroundColor};text-align:center;${k.value.responsive?`height: 100%`:``}`),id:`relation_circle_${T.value}`,onMouseenter:t[0]||=()=>C(St)(!0),onMouseleave:t[1]||=()=>C(St)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ve),$.value?.rows?.length?(v(),d(xe,{key:0,uid:T.value,head:$.value.headers,body:$.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),A.value.buttons.annotator?(v(),d(C(ot),{key:1,svgRef:C(P),backgroundColor:M.value.backgroundColor,color:M.value.color,active:Q.value,isCursorPointer:N.value,palette:A.value.annotatorPalette,onClose:rn},Ee({_:2},[b(C(he),t=>({name:t,fn:Re(n=>[x(e.$slots,t,g(h(C(me)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),kt.value?(v(),p(`div`,{key:2,ref_key:`noTitle`,ref:ht,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),M.value.title.text?(v(),p(`div`,{key:3,ref_key:`chartTitle`,ref:pt,style:`width:100%;background:transparent`},[(v(),d(fe,{key:`title_${gt.value}`,config:{title:{cy:`relation-div-title`,...M.value.title},subtitle:{cy:`relation-div-subtitle`,...M.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),A.value.show&&dt.value&&(C(Ct)||C(xt))?(v(),d(C(st),{ref:`details`,key:`user_options_${ft.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:C(Tt),isImaging:C(Et),uid:T.value,hasPdf:A.value.buttons.pdf,hasImg:A.value.buttons.img,hasSvg:A.value.buttons.svg,hasFullscreen:A.value.buttons.fullscreen,hasAltCopy:A.value.buttons.altCopy,hasXls:!1,isFullscreen:Z.value,titles:{...A.value.buttonTitles},chartElement:E.value,position:A.value.position,hasAnnotator:A.value.buttons.annotator,isAnnotation:Q.value,callbacks:A.value.callbacks,printScale:A.value.print.scale,isCursorPointer:N.value,onToggleFullscreen:nn,onGeneratePdf:C(Dt),onGenerateImage:C(dn),onGenerateSvg:C(un),onToggleAnnotator:rn,onCopyAlt:fn,style:_({visibility:C(Ct)?C(xt)?`visible`:`hidden`:`visible`})},Ee({_:2},[b(C(ge)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Re(n=>[x(e.$slots,t,g(h(C(_e)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),m(`div`,He,[(v(),p(`svg`,{ref_key:`svgRef`,ref:P,xmlns:C(te),class:je([{"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value},`relation-circle`]),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${T.value}`,tabindex:`0`,onFocus:pn,onBlur:mn,onKeydown:hn},[Oe(C(ct)),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,We)):f(``,!0),m(`circle`,{cx:(W.value.width<=0?1e-4:W.value.width)/2,cy:(W.value.height<=0?1e-4:W.value.height)/2+M.value.circle.offsetY,r:G.value<=0?1e-4:G.value,stroke:M.value.circle.stroke,"stroke-width":M.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,Ge),Mt.value?(v(),p(`g`,Ke,[(v(!0),p(l,null,b(I.value,(e,t)=>(v(),p(`path`,{key:`relation_${t}`,style:_(Kt(e)),stroke:J(e),class:je([`relation`,{"vue-ui-relation-circle-selected":L.value.hasOwnProperty(`id`)&&R.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${W.value.width/2},${W.value.height/2+M.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,qe))),128)),(v(!0),p(l,null,b(I.value,(t,r)=>(v(),p(`g`,Je,[Y(t)?x(e.$slots,`dataLabel`,Ae({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:J(t),weight:t.weight,fontSize:V.value}),void 0,!0,0):f(``,!0),Y(t)&&!e.$slots.dataLabel?(v(),p(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:J(t),r:V.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,Ye)):f(``,!0),Y(t)&&!e.$slots.dataLabel?(v(),p(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+V.value/3,fill:C(s)(J(t)),"text-anchor":`middle`,"font-size":V.value},S(C(o)(j.value.formatter,t.weight,C(n)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,Xe)):f(``,!0)]))),256))])):(v(),p(`g`,Ze,[(v(!0),p(l,null,b(I.value,(e,t)=>(v(),p(`line`,{key:`relation_${t}`,stroke:J(e),"stroke-width":tn(e),style:_(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:je({"vue-ui-relation-circle-selected":L.value.hasOwnProperty(`id`)&&R.value.includes(e.id)}),"stroke-linecap":`round`},null,14,Qe))),128)),(v(!0),p(l,null,b(I.value,(t,r)=>(v(),p(`g`,$e,[Y(t)?x(e.$slots,`dataLabel`,Ae({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:J(t),weight:t.weight,fontSize:V.value}),void 0,!0,0):f(``,!0),Y(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:J(t),r:V.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,et)):f(``,!0),Y(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+V.value/3,fill:C(s)(J(t)),"text-anchor":`middle`,"font-size":V.value},S(C(o)(j.value.formatter,t.weight,C(n)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,tt)):f(``,!0)]))),256))])),(v(!0),p(l,null,b(F.value,(e,t)=>(v(),p(`text`,{key:`plot_text_${t}`,"text-anchor":qt(e),transform:Xt(e),x:Jt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":L.value.id===e.id?`900`:`400`,style:_(`font-family:${M.value.fontFamily};${Yt(e)};cursor:${N.value?`pointer`:`default`}`),"font-size":U.value,fill:M.value.labels.color,"text-decoration":t===X.value||t===D.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[C(vt)?(v(),p(l,{key:0},[De(`--------`)],64)):(v(),p(l,{key:1},[De(S(e.label)+` (`+S(C(o)(j.value.formatter,e.totalWeight,C(n)({p:j.value.prefix,v:e.totalWeight,s:j.value.suffix,r:j.value.rounding}),{...e}))+`) `,1)],64))],44,nt))),128)),(v(!0),p(l,null,b(F.value,(e,t)=>(v(),p(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:_(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${N.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:M.value.plot.useSerieColor?e.color:M.value.plot.color,stroke:M.value.backgroundColor,"stroke-width":`1`,r:H.value*(t===X.value||t===D.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,rt))),128)),x(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:C(Tt)||C(Et)||C(cn),isPrintingSvg:C(ln)}},void 0,!0)],42,Ue)),e.$slots.hint?(v(),p(`div`,it,[x(e.$slots,`hint`,g(h({hint:k.value.a11y.translations.keyboardNavigation,isVisible:O.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,at,[x(e.$slots,`watermark`,g(h({isPrinting:C(Tt)||C(Et)||C(cn)||C(ln)})),void 0,!0)])):f(``,!0),e.$slots.source?(v(),p(`div`,{key:6,ref_key:`source`,ref:mt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C(vt)?(v(),d(oe,{key:0})):f(``,!0)],!0)],44,Be))}},[[`__scopeId`,`data-v-80fe08c8`]]);export{ze as n,ot as t};
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{$ as n,D as r,Ht as i,J as a,N as ee,P as te,S as o,U as ne,X as re,Xt as ie,at as s,i as ae,in as oe,nt as se,r as ce,t as le,tt as ue,w as de,xt as fe,yt as pe,zt as me}from"./lib-DqD8nbyX.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-BH9r_0Vd.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as be}from"./resolveChartConfig-ChGWTt5l.js";import{t as xe}from"./chartImage-r-G4CkRK.js";import{n as Se}from"./Title-BLA0tM3g.js";import{t as Ce}from"./useChartExport-DtPNpc9M.js";import{n as we,t as Te}from"./tableIntegration-CNoJ1CIY.js";import{n as Ee,t as De}from"./annotationSlots-BRR85CqJ.js";import{n as Oe,t as ke}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ae}from"./useTimeLabels-Das5O74F.js";import{t as je}from"./usePrinter-Cj4eIYC_.js";import{t as Me}from"./useTimeLabelCollider-XQf_S7-z.js";import{t as Ne}from"./Shape-gDVRWM6n.js";import{l as Pe,t as Fe}from"./useResponsive-D2CPcpda.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-BOcw1ke8.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ve}from"./Legend-D8NunRPr.js";import{t as He}from"./vue_ui_ridgeline-Di26JtQu.js";import{Fragment as c,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Ue,createTextVNode as We,createVNode as Ge,defineAsyncComponent as m,guardReactiveProps as Ke,mergeProps as qe,nextTick as Je,normalizeClass as Ye,normalizeProps as Xe,normalizeStyle as h,onBeforeUnmount as Ze,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as Qe,shallowRef as $e,toDisplayString as b,toRefs as et,unref as x,watch as S,watchEffect as tt,withCtx as C}from"vue";var nt=/* @__PURE__ */ e({default:()=>Tt}),rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st={key:0},ct=[`fill`,`d`],lt=[`stroke`,`stroke-width`,`d`],ut=[`fill`,`d`],dt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],mt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],ht={key:0},gt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],_t=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],vt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],bt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],xt=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],St={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ct={key:5,class:`vue-data-ui-watermark`},wt=[`onClick`],Tt=/*#__PURE__*/ ye({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:ye,emit:nt}){let Tt=m(()=>import(`./vue-ui-xy-M9aD-G5a.js`).then(e=>e.n)),Et=m(()=>import(`./BaseIcon-DDctLkeT.js`).then(e=>e.n)),Dt=m(()=>import(`./vue-ui-accordion-3lBpCjGm.js`).then(e=>e.n)),Ot=m(()=>import(`./DataTable-BcVZLSs8.js`)),kt=m(()=>import(`./PenAndPaper-BsBFp16i.js`).then(e=>e.t)),At=m(()=>import(`./UserOptions-BSJ_S_us.js`).then(e=>e.n)),jt=m(()=>import(`./PackageVersion-ATrKWi8V.js`).then(e=>e.t)),Mt=m(()=>import(`./BaseDraggableDialog-Bw_azO0n.js`).then(e=>e.n)),{vue_ui_ridgeline:Nt}=t(),w=e,Pt=l({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Ft=nt,T=_(null),It=_(null),Lt=_(null),E=$e(null),D=$e(null),Rt=_(null),zt=_(null),Bt=_(0),Vt=_(0),Ht=_(0),O=_(re()),Ut=_(0),Wt=_(0),Gt=_(512),k=_(null),A=_(null),Kt=_(null),qt=_(0),Jt=_(null),Yt=_(null),Xt=_(null),j=_(null),Zt=_(!1);function Qt(){return be(w.config,Nt,He)}let M=_(Qt()),N=l(()=>M.value.userOptions),P=l(()=>M.value.style.chart.areas),F=l(()=>M.value.style.chart.selector),I=l(()=>M.value.style.chart.xAxis.labels),L=l(()=>M.value.style.chart.yAxis.labels),R=l(()=>M.value.style.chart);_e({config:()=>M.value,dataset:()=>w.dataset,component:`VueUiRidgeline`,rules:[ve.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=l(()=>M.value.userOptions.useCursorPointer),$t=l(()=>oe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:en,FINAL_DATASET:B,manualLoading:tn}=he({...et(w),FINAL_CONFIG:M,prepareConfig:Qt,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:oe({defaultConfig:M.value,userConfig:$t.value})}),V=_(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:nn,setUserOptionsVisibility:rn,keepUserOptionState:an}=ze({config:M.value}),{svgRef:H}=Be({config:R.value.title}),on=l(()=>M.value.debug);function sn(){let e=B.value||[];if(!Array.isArray(e)||e.length===0){s({componentName:`VueUiRidgeline`,type:`dataset`,debug:on.value}),tn.value=!0;return}if(e.forEach((e,t)=>{pe({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{Pt.value=!1,s({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:on.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{pe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Pt.value=!1,s({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:on.value})})})}),Wt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),me(w.dataset)||(tn.value=M.value.loading),M.value.responsive){let t=Pe(()=>{let{width:t,height:n}=Fe({chart:T.value,title:R.value.title.text?It.value:null,legend:R.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value,padding:R.value.padding});requestAnimationFrame(()=>{Gt.value=t,V.value=e.length?n/e.length:0,qt.value=n-12})});E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect()),E.value=new ResizeObserver(t),D.value=T.value?.parentNode||null,D.value&&E.value.observe(D.value)}}Ze(()=>{E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect())});let{isPrinting:cn,isImaging:ln,generatePdf:un,generateImage:dn}=je({elementId:`vue-ui-ridgeline_${O.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),fn=l(()=>M.value.userOptions.show&&!R.value.title.text),pn=l(()=>de(M.value.customPalette)),U=_({showTable:M.value.table.show});S(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(nn.value=!M.value.userOptions.showOnChartHover,await Je(),sn(),Bt.value+=1,Ht.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),S(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(tn.value=!1)},{deep:!0}),S(()=>en.value,async e=>{e||(await Je(),sn())},{immediate:!0}),S(()=>w.config,()=>{M.value=Qt(B.value||null),nn.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Bt.value+=1,Ht.value+=1},{deep:!0});let mn=l(()=>P.value.height/P.value.rowHeight);function hn(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Ft(`selectLegend`,Y.value)}function gn(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Ft(`selectLegend`,Y.value)}function _n(e){return Z.value.length?Z.value.find(t=>t.name===e)||(on.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(on.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function vn(e){let t=_n(e);t!==null&&X.value.includes(t.id)&&gn(t.id)}function yn(e){let t=_n(e);t!==null&&(X.value.includes(t.id)||gn(t.id))}let W=l(()=>Pt.value?(B.value||[]).map(e=>({...e,labelLen:Nn(e.name,L.value.fontSize),uid:re(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?o(e.color):pn.value[t]||i[t]||i[t%i.length],r=ie(e.name);return{...e,color:n,id:r}})})):[]),bn=l(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*mn.value+R.value.padding.bottom),G=l(()=>{let e=R.value.padding;return{width:Gt.value,height:bn.value,padding:e}}),xn=l(()=>G.value.width),Sn=l(()=>G.value.height),Cn=_(0),wn=Pe(e=>{Cn.value=e},100);tt(e=>{let t=Jt.value;if(!t)return;let n=new ResizeObserver(e=>{wn(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Ze(()=>{Cn.value=0});let K=l(()=>({fullHeight:G.value.height+Cn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),Tn=l(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=_([]),En=0;tt(()=>{let e=++En;(async()=>{let t=await Ae({values:I.value.values,maxDatapoints:Tn.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===En&&(q.value=t)})()});let J=l(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/Tn.value,r=[];for(let e=0;e<Tn.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:bn.value});return r});function Dn(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function On(e){k.value=e;let t=Dn(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function kn(e){k.value=null;let t=Dn(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function An(e){let t=Dn(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Ft(`selectX`,t)}function jn(e,t){return e.length*t/2+t}function Mn(e,t,n){return e+jn(t,n)>K.value.right}function Nn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=l(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,i=(K.value.width-r)/Tn.value,a=Math.abs(Math.min(n,0)),o=t+a;function ie(e){return isNaN(e/o)?0:e/o}return W.value.map((e,t)=>{let n=V.value*mn.value*(1-ie(a)),o=K.value.top+V.value*t,s=K.value.top+o+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?s-n/2:s)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let ee=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+i*n,y:K.value.top+o+V.value*mn.value*(1-ie(ee+a)),value:t,isMaxPoint:t===Math.max(...e.values),zero:s}}),n=`${ee(t,s,!1,!1)}`,ae=`M ${r},${s} ${ne(t)} ${t.at(-1).x},${s}`,oe=`M ${r},${s} ${t.at(-1).x},${s}`,se=`M ${te(t)}`,ce=`M ${ne(t)}`,le=fe(P.value.smooth?se:ce);return{...e,uid:re(),plots:t,smoothPath:n,straightPath:ae,zeroPath:oe,pathLength:le,smoothPathRidge:se,straightPathRidge:ce}}).filter(e=>!X.value.includes(e.id))}})}),X=_([]);function Pn(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=ie(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>gn(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=l(()=>Pn(W.value)),Fn=l(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=_(!1);function In(e){Q.value=e,Ut.value+=1}let Ln=_({}),Rn=_([]);function zn(e){Ft(`selectDatapoint`,e),R.value.dialog.show&&(Rn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),A.value=e,Ln.value=ue({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),Kt.value&&Kt.value.open())}let Bn=_(null);function Vn(e){Bn.value=e}function Hn(){Bn.value=null}let Un=_(!1);function Wn(){Un.value=!Un.value}function Gn(){U.value.showTable=!U.value.showTable}let Kn=l(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=l(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:Kn.value.body,config:t}});function qn(e=null){Je(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...Kn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),i=r(n);e?e(i):se({csvContent:i,title:R.value.title.text||`vue-ui-ridgeline`})})}function Jn(){return Y.value}let Yn=xe(T,()=>R.value.title.text),Xn=l(()=>({min:0,max:Tn.value}));Me({timeLabelsEls:Jt,timeLabels:q,slicer:Xn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:xn,height:Sn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let Zn=l(()=>Te({config:M,style:R,mutableConfig:U,dialog:Mt,accordion:Dt,isFullscreen:Q,parent:T,maxWidth:800,isCursorPointer:z}));S(()=>U.value.showTable,e=>we(e,M,Yt));function Qn(){U.value.showTable=!1,Xt.value&&Xt.value.setTableIconState(!1)}let $n=l(()=>R.value.backgroundColor),er=l(()=>({...R.value.legend,position:`bottom`})),tr=l(()=>R.value.title),{isCallbackImaging:nr,isCallbackSvg:rr,generateSvg:ir,onGenerateImage:ar}=Ce({svg:H,title:tr,legend:er,legendItems:Z,backgroundColor:$n,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:dn});function or(e){sr(`xy-zoom`,e.dataset,e.config)}async function sr(e=`main-chart`,t=null,n=null){if(Ft(`copyAlt`,{source:e,config:e===`main-chart`?M.value:Ln.value,dataset:e===`main-chart`?Y.value:Rn.value}),!M.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:Ln.value,dataset:e===`main-chart`?Y.value:Rn.value}))}function cr(){j.value=null,Zt.value=!0}function lr(){pr(),Zt.value=!1}function ur(e){if(!H.value||Un.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,ee=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!ee)return;if(e.preventDefault(),e.stopPropagation(),ee){pr();return}if(a){if(j.value!==null){let e=Y.value[j.value];e&&zn(e);return}k.value&&An(k.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:dr(e+(n?1:-1)),j.value=e,Bn.value=e;return}if(!J.value.length)return;let te=k.value?.index??null;te=te===null?i?0:J.value.length-1:fr(te+(i?1:-1));let o=J.value[te];o&&On(o)}function dr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function fr(e){let t=J.value.length;return t?(e%t+t)%t:null}function pr(){j.value=null,Bn.value=null,k.value?kn(k.value):k.value=null}let mr=l(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return ye({getData:Jn,getImage:Yn,generateImage:dn,generateSvg:ir,generatePdf:un,generateCsv:qn,hideSeries:yn,showSeries:vn,toggleAnnotator:Wn,toggleTable:Gn,toggleFullscreen:In,copyAlt:sr}),(e,t)=>(g(),f(`div`,{ref_key:`ridgelineChart`,ref:T,class:Ye(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${O.value}`,style:h({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:t[3]||=()=>x(rn)(!0),onMouseleave:t[4]||=()=>x(rn)(!1)},[p(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[p(`p`,null,b(M.value.a11y.translations.keyboardNavigation),1)],8,it),mr.value.body.length?(g(),u(Re,{key:0,uid:O.value,head:mr.value.head,body:mr.value.body,caption:mr.value.caption,notice:mr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):d(``,!0),N.value.buttons.annotator&&x(H)?(g(),u(x(kt),{key:1,color:R.value.color,backgroundColor:R.value.backgroundColor,active:Un.value,svgRef:x(H),isCursorPointer:z.value,onClose:Wn},Ue({_:2},[v(x(De),t=>({name:t,fn:C(n=>[y(e.$slots,t,Xe(Ke(x(Ee)(t,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):d(``,!0),y(e.$slots,`userConfig`,{},void 0,!0),fn.value?(g(),f(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),R.value.title.text?(g(),f(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent;padding-bottom:24px`},[(g(),u(Se,{key:`title_${Bt.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),N.value.show&&Pt.value&&(x(an)||x(nn))?(g(),u(x(At),{ref_key:`userOptionsRef`,ref:Xt,key:`user_option_${Ut.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:x(cn),isImaging:x(ln),uid:O.value,hasTooltip:!1,callbacks:N.value.callbacks,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasLabel:!1,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Q.value,printScale:N.value.print.scale,chartElement:T.value,position:N.value.position,isTooltip:!1,titles:{...N.value.buttonTitles},hasAnnotator:N.value.buttons.annotator,isAnnotation:Un.value,tableDialog:M.value.table.useDialog,style:h({visibility:x(an)?x(nn)?`visible`:`hidden`:`visible`}),isCursorPointer:z.value,onToggleFullscreen:In,onGeneratePdf:x(un),onGenerateCsv:qn,onGenerateImage:x(ar),onGenerateSvg:x(ir),onToggleTable:Gn,onToggleAnnotator:Wn,onCopyAlt:sr},Ue({_:2},[v(x(Oe)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[y(e.$slots,t,Xe(Ke(x(ke)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.callbacks.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.printScale.chartElement.position.titles.hasAnnotator.isAnnotation.tableDialog.style.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg`.split(`.`))):d(``,!0),p(`div`,at,[(g(),f(`svg`,{ref_key:`svgRef`,ref:H,xmlns:x(le),"aria-describedby":`chart-instructions-${O.value}`,class:Ye({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:h(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${qt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:cr,onBlur:lr,onKeydown:ur},[Ge(x(jt)),p(`defs`,null,[(g(!0),f(c,null,v(Z.value,(e,t)=>(g(),u(Ie,{t:`linear`,id:`gradient-${e.id}-${O.value}`,key:`gradient-${e.id}-${O.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(g(!0),f(c,null,v(Y.value,(e,t)=>(g(),f(c,null,[(g(!0),f(c,null,v(e.datapoints,(e,t)=>(g(),u(Ie,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${O.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(g(!0),f(c,null,v(Y.value,(t,n)=>(g(),f(`g`,{key:`ds-${n}`},[(g(!0),f(c,null,v(t.datapoints,(t,r)=>(g(),f(`g`,{key:t.id},[e.$slots.pattern?(g(),f(`g`,st,[p(`defs`,null,[y(e.$slots,`pattern`,qe({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${O.value}_${t.uid}`}),void 0,!0)])])):d(``,!0),p(`path`,{fill:e.$slots.pattern?`url(#pattern_${O.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:h({opacity:P.value.opacity})},null,12,ct),p(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:h({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,lt),p(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${O.value})`:`url(#gradient-single-${O.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:h({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ut),R.value.zeroLine.show?(g(),f(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,dt)):d(``,!0),P.value.maxPoint.show&&t.plots.length>1?(g(!0),f(c,{key:2},v(t.plots,e=>(g(),f(c,null,[e.isMaxPoint?(g(),f(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?x(ce)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,ft)):d(``,!0)],64))),256)):d(``,!0),t.plots.length===1?(g(),f(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,pt)):d(``,!0)]))),128)),p(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:h({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Bn.value===n||A.value&&t.uid===A.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Vn(n),onMouseleave:Hn,onClick:e=>zn(t)},b(t.name),45,mt)]))),128)),I.value.values.length?(g(),f(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Jt},[(g(!0),f(c,null,v(J.value,(t,n)=>y(e.$slots,`time-label`,qe({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(g(),f(`g`,ht,[String(t.label).includes(`
2
+ `)?(g(),f(`text`,{key:1,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:h({opacity:k.value?k.value.index===n?1:.2:1}),innerHTML:x(a)({content:String(t.label),fontSize:R.value.xAxis.labels.fontSize,fill:R.value.xAxis.labels.color,stroke:R.value.backgroundColor,x:0,y:0})},null,12,_t)):(g(),f(`text`,{key:0,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,stroke:R.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:h({opacity:k.value?k.value.index===n?1:.2:1})},b(t.label),13,gt))])):d(``,!0)],!0)),256))],512)):d(``,!0),p(`g`,null,[(g(!0),f(c,null,v(J.value,(e,t)=>(g(),f(`rect`,{x:e.x,y:e.y,width:e.width<0?.1:e.width,height:e.height<0?.1:e.height,fill:`transparent`,onMouseenter:t=>On(e),onMouseleave:t=>kn(e),onClick:()=>An(e)},null,40,vt))),256)),F.value.show&&k.value?(g(),f(`line`,{key:0,x1:k.value.selectorX,x2:k.value.selectorX,y1:k.value.y,y2:k.value.y+k.value.height-V.value/2,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray,"stroke-linecap":`round`,style:{pointerEvents:`none`}},null,8,yt)):d(``,!0),k.value||F.value.labels.showLast?(g(!0),f(c,{key:1},v(Y.value,e=>(g(),f(c,null,[(g(!0),f(c,null,v(e.datapoints,e=>(g(),f(c,null,[(g(!0),f(c,null,v(e.plots,(t,r)=>(g(),f(c,null,[k.value&&k.value.index===r||!k.value&&r===e.plots.length-1&&R.value.selector.labels.showLast?(g(),f(`circle`,{key:0,cx:t.x,cy:t.y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?e.color:R.value.selector.dot.fill,style:{pointerEvents:`none`}},null,8,bt)):d(``,!0),k.value&&k.value.index===r||!k.value&&r===e.plots.length-1&&R.value.selector.labels.showLast?(g(),f(`text`,{key:1,x:Mn(t.x,x(ae)(R.value.selector.labels.formatter,t.value,x(n)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?t.x-R.value.selector.labels.fontSize/2:t.x+R.value.selector.labels.fontSize/2,y:t.y,"dominant-baseline":`middle`,stroke:R.value.backgroundColor,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`,"paint-order":`stroke fill`,"text-anchor":Mn(t.x,x(ae)(R.value.selector.labels.formatter,t.value,x(n)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?`end`:`start`,"font-size":F.value.labels.fontSize,fill:F.value.labels.color,style:{pointerEvents:`none`}},b(x(ae)(R.value.selector.labels.formatter,t.value,x(n)({p:R.value.xAxis.labels.prefix,v:t.value,s:R.value.xAxis.labels.suffix,r:R.value.selector.labels.rounding}))),9,xt)):d(``,!0)],64))),256))],64))),256))],64))),256)):d(``,!0)]),y(e.$slots,`svg`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:x(cn)||x(ln)||x(nr),isPrintingSvg:x(rr),data:Y.value}},void 0,!0)],46,ot)),e.$slots.hint?(g(),f(`div`,St,[y(e.$slots,`hint`,Xe(Ke({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Zt.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(g(),f(`div`,Ct,[y(e.$slots,`watermark`,Xe(Ke({isPrinting:x(cn)||x(ln)||x(nr)||x(rr)})),void 0,!0)])):d(``,!0),p(`div`,{ref_key:`chartLegend`,ref:Lt},[y(e.$slots,`legend`,{legend:Z.value},()=>[R.value.legend.show?(g(),u(Ve,{key:`legend_${Ht.value}`,legendSet:Z.value,config:Fn.value,isCursorPointer:z.value,onClickMarker:t[0]||=({legend:e})=>gn(e.id)},Ue({item:C(({legend:e})=>[x(en)?d(``,!0):(g(),f(`div`,{key:0,style:h(`opacity:${X.value.includes(e.id)?.5:1}`),onClick:t=>e.segregate()},b(e.name),13,wt))]),legendToggle:C(()=>[Z.value.length>2&&R.value.legend.selectAllToggle.show&&!x(en)?(g(),u(Le,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:X.value.length>0,isCursorPointer:z.value,onToggle:hn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):d(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:C(({legend:e,index:t})=>[Ge(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):d(``,!0)],!0)],512),e.$slots.source?(g(),f(`div`,{key:6,ref_key:`source`,ref:Rt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),Pt.value&&N.value.buttons.table?(g(),u(Qe(Zn.value.component),qe({key:7},Zn.value.props,{ref_key:`tableUnit`,ref:Yt,onClose:Qn}),Ue({content:C(()=>[(g(),u(x(Ot),{key:`table_${Vt.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:Zn.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:Qn},{th:C(({th:e})=>[p(`div`,null,b(e),1)]),td:C(({td:e})=>[We(b(e.name?e.name:x(ae)(F.value.labels.formatter,e,x(n)({p:R.value.xAxis.labels.prefix,v:e,s:R.value.xAxis.labels.suffix,r:M.value.table.td.roundingValue}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:C(()=>[We(b(Zn.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:C(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>qn(N.value.callbacks.csv),style:h({cursor:z.value?`pointer`:`default`})},[Ge(x(Et),{name:`fileCsv`,stroke:Zn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),R.value.dialog.show?(g(),u(x(Mt),{key:8,ref_key:`dialog`,ref:Kt,onClose:t[2]||=e=>A.value=null,backgroundColor:R.value.dialog.backgroundColor,color:R.value.dialog.color,headerBg:R.value.dialog.header.backgroundColor,headerColor:R.value.dialog.header.color,isFullscreen:Q.value,fullscreenParent:T.value,isCursorPointer:z.value,withPadding:``},{title:C(()=>[We(b(A.value.name),1)]),content:C(()=>[A.value?(g(),u(x(Tt),{key:0,config:Ln.value,dataset:Rn.value,onCopyAlt:or},null,8,[`config`,`dataset`])):d(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`,`isCursorPointer`])):d(``,!0),y(e.$slots,`skeleton`,{},()=>[x(en)?(g(),u(ge,{key:0})):d(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-65ccf420`]]);export{nt as n,Tt as t};