vue-data-ui 2.7.2 → 2.7.3

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 (195) hide show
  1. package/dist/{Arrow-Cuf9zUpa.cjs → Arrow-CwCPcRDq.cjs} +1 -1
  2. package/dist/{Arrow-SOQeOwmT.js → Arrow-DZ9pNVTr.js} +1 -1
  3. package/dist/{BaseIcon-C0unoacb.cjs → BaseIcon-BQ6ScTsr.cjs} +1 -1
  4. package/dist/{BaseIcon-DqYzMisq.js → BaseIcon-CdxldTMn.js} +4 -3
  5. package/dist/{ColorPicker-DLNc3kpl.cjs → ColorPicker-D6mp4NrH.cjs} +1 -1
  6. package/dist/{ColorPicker-DyOTLjAA.js → ColorPicker-DF9jbKW-.js} +3 -3
  7. package/dist/{DataTable-ByOfBGEi.cjs → DataTable-4qcYZrGF.cjs} +1 -1
  8. package/dist/{DataTable-C_28ZqiP.js → DataTable-BFNGlApm.js} +2 -2
  9. package/dist/{Legend-CmKaL7xe.js → Legend-B4eIw732.js} +2 -2
  10. package/dist/{Legend-mrAy7yUC.cjs → Legend-D8qnv865.cjs} +1 -1
  11. package/dist/{PackageVersion-39l3KkzC.js → PackageVersion-BZ8-AoE_.js} +1 -1
  12. package/dist/{PackageVersion-By81XV8X.cjs → PackageVersion-sCi6-fwm.cjs} +1 -1
  13. package/dist/PenAndPaper--_AE7XzJ.js +374 -0
  14. package/dist/PenAndPaper-DXiYR_ED.cjs +1 -0
  15. package/dist/{Shape-iIO-95sh.js → Shape-BQd108EW.js} +1 -1
  16. package/dist/{Shape-x7U3IhoM.cjs → Shape-BjIO2Dd_.cjs} +1 -1
  17. package/dist/{Slicer-Ct66sqV1.cjs → Slicer-B10GL6W6.cjs} +1 -1
  18. package/dist/{Slicer-C49MotZz.js → Slicer-BtX8p8CI.js} +2 -2
  19. package/dist/{Title-BgVFZwZZ.cjs → Title-DWFudmma.cjs} +1 -1
  20. package/dist/{Title-Co3F59jq.js → Title-ND4kMErl.js} +1 -1
  21. package/dist/{Tooltip-Cr89wMKa.js → Tooltip-BWe5TPIJ.js} +1 -1
  22. package/dist/{Tooltip-B8E9uCVm.cjs → Tooltip-DPqJ5wwr.cjs} +1 -1
  23. package/dist/{dom-to-png-D9eujpXB.cjs → dom-to-png-DBOO7SYL.cjs} +1 -1
  24. package/dist/{dom-to-png-DtBlqZMR.js → dom-to-png-DOe_fDQ9.js} +1 -1
  25. package/dist/{img-DgRUFehB.cjs → img-BTldOAS7.cjs} +1 -1
  26. package/dist/{img-DQDP5JIH.js → img-K80BXoXO.js} +1 -1
  27. package/dist/{index-gC66Se26.js → index-B_dU_4T8.js} +1 -1
  28. package/dist/{index-BeJeDy5m.cjs → index-HGCbG8YK.cjs} +1 -1
  29. package/dist/{pdf-lJiGVhtL.js → pdf-BKSh5KBc.js} +1 -1
  30. package/dist/{pdf-Bu1ahAX2.cjs → pdf-IEdK_h03.cjs} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +2 -1
  33. package/dist/types/vue-data-ui.d.ts +2 -1
  34. package/dist/{useNestedProp-BusTOV-6.js → useNestedProp-7s4Pw7x0.js} +1 -1
  35. package/dist/{useNestedProp-CF-iHhIC.cjs → useNestedProp-O_JTsxQj.cjs} +1 -1
  36. package/dist/{usePrinter-Bz_kd3vb.cjs → usePrinter-B2PvJuo8.cjs} +1 -1
  37. package/dist/{usePrinter-KMFl0n0s.js → usePrinter-CLObTJ4a.js} +3 -3
  38. package/dist/{vue-data-ui-BApY_erH.js → vue-data-ui-Dvy8nai9.js} +60 -60
  39. package/dist/{vue-data-ui-Bak-lr4I.cjs → vue-data-ui-NmIWCiVH.cjs} +1 -1
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +1 -1
  42. package/dist/vue-ui-3d-bar-CUG7pspB.cjs +19 -0
  43. package/dist/{vue-ui-3d-bar-BWjU0K3_.js → vue-ui-3d-bar-Cf-VSMqf.js} +30 -30
  44. package/dist/{vue-ui-accordion-j2beIma_.js → vue-ui-accordion-C5dj9Voo.js} +3 -3
  45. package/dist/{vue-ui-accordion-CZBJSHT_.cjs → vue-ui-accordion-CSuxLH7L.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-Cmw4WVB4.js → vue-ui-age-pyramid-BYHyKvk4.js} +22 -22
  47. package/dist/vue-ui-age-pyramid-qT6V3Y8O.cjs +1 -0
  48. package/dist/{vue-ui-annotator-BVv5XkoE.cjs → vue-ui-annotator-KzRsqSTn.cjs} +1 -1
  49. package/dist/{vue-ui-annotator-CKmqZjUD.js → vue-ui-annotator-clyvpxxd.js} +2 -2
  50. package/dist/{vue-ui-bullet-U_yJjO0m.js → vue-ui-bullet-CJL4NBSU.js} +36 -36
  51. package/dist/vue-ui-bullet-DMuibl8n.cjs +34 -0
  52. package/dist/{vue-ui-candlestick-DhdlFIQE.js → vue-ui-candlestick-1jHdWerO.js} +11 -11
  53. package/dist/vue-ui-candlestick-CMsFiP9C.cjs +2 -0
  54. package/dist/{vue-ui-carousel-table-Ej7qzKkp.js → vue-ui-carousel-table-BCVjpGff.js} +4 -4
  55. package/dist/{vue-ui-carousel-table-BhC5cEe3.cjs → vue-ui-carousel-table-CtGRQBIN.cjs} +1 -1
  56. package/dist/{vue-ui-chestnut-BzNHXzDj.cjs → vue-ui-chestnut-CEQFlk-j.cjs} +1 -1
  57. package/dist/{vue-ui-chestnut-L0bS5jtX.js → vue-ui-chestnut-YX5q5qpY.js} +32 -32
  58. package/dist/{vue-ui-circle-pack-DwCzeO3L.js → vue-ui-circle-pack-DFhj3arJ.js} +44 -44
  59. package/dist/vue-ui-circle-pack-cXdePcYh.cjs +1 -0
  60. package/dist/{vue-ui-cursor-0mZP5nBc.cjs → vue-ui-cursor-DGtZLxpF.cjs} +1 -1
  61. package/dist/{vue-ui-cursor-DwHdXwLS.js → vue-ui-cursor-DwDTg8Za.js} +2 -2
  62. package/dist/{vue-ui-dashboard-DILmOchy.js → vue-ui-dashboard-DQ4-1OKY.js} +3 -3
  63. package/dist/{vue-ui-dashboard-CegApY8_.cjs → vue-ui-dashboard-etx_lWpJ.cjs} +1 -1
  64. package/dist/{vue-ui-digits-Dbwzk-sl.js → vue-ui-digits-Crcwygqg.js} +2 -2
  65. package/dist/{vue-ui-digits-me8Nky0A.cjs → vue-ui-digits-lRbvyU_i.cjs} +1 -1
  66. package/dist/{vue-ui-donut-DwE-iZSV.js → vue-ui-donut-C2h_qoIM.js} +12 -12
  67. package/dist/vue-ui-donut-DQeJn_KK.cjs +1 -0
  68. package/dist/vue-ui-donut-evolution-Dbg5HueS.cjs +1 -0
  69. package/dist/{vue-ui-donut-evolution-DhFABvEv.js → vue-ui-donut-evolution-DbzqkGBx.js} +69 -69
  70. package/dist/{vue-ui-dumbbell-Cqq4iV6-.js → vue-ui-dumbbell-BVuQjSso.js} +52 -52
  71. package/dist/{vue-ui-dumbbell-CL15d-aQ.cjs → vue-ui-dumbbell-BaYSfxY1.cjs} +1 -1
  72. package/dist/{vue-ui-flow-CU-orj9I.js → vue-ui-flow-2FOH_Mxn.js} +75 -75
  73. package/dist/vue-ui-flow-B8NKKaa2.cjs +1 -0
  74. package/dist/{vue-ui-funnel-DQmQmdNV.js → vue-ui-funnel-CYt4xsc4.js} +28 -28
  75. package/dist/vue-ui-funnel-Cgm1VcJC.cjs +1 -0
  76. package/dist/{vue-ui-galaxy-nqyCbQ9j.js → vue-ui-galaxy-CmmTED3N.js} +39 -39
  77. package/dist/vue-ui-galaxy-D8oPaBdc.cjs +1 -0
  78. package/dist/vue-ui-gauge-Ushp2qER.cjs +1 -0
  79. package/dist/{vue-ui-gauge-BV3CJfqe.js → vue-ui-gauge-vlhW2o0y.js} +26 -26
  80. package/dist/{vue-ui-gizmo-CNRAH2zT.cjs → vue-ui-gizmo-B16t4cjE.cjs} +1 -1
  81. package/dist/{vue-ui-gizmo-CJwSAsxs.js → vue-ui-gizmo-DtWADzHM.js} +3 -3
  82. package/dist/{vue-ui-heatmap-B1s7KejC.js → vue-ui-heatmap-BcNWrSYu.js} +10 -10
  83. package/dist/vue-ui-heatmap-PVrUXZ6f.cjs +1 -0
  84. package/dist/vue-ui-history-plot-D9hGmpzL.cjs +1 -0
  85. package/dist/{vue-ui-history-plot-z_KFt5z_.js → vue-ui-history-plot-aqwCckl3.js} +35 -35
  86. package/dist/{vue-ui-kpi-DabR5K70.js → vue-ui-kpi-fIEea6oo.js} +3 -3
  87. package/dist/{vue-ui-kpi-FaGp6_XP.cjs → vue-ui-kpi-zRnAot1s.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-_plxZxma.cjs → vue-ui-mini-loader-0TKahM6o.cjs} +1 -1
  89. package/dist/{vue-ui-mini-loader-w-BmywLJ.js → vue-ui-mini-loader-CnequKa7.js} +2 -2
  90. package/dist/{vue-ui-molecule-3ClCLk7L.cjs → vue-ui-molecule-C7qRnQk-.cjs} +1 -1
  91. package/dist/{vue-ui-molecule-aiWG--to.js → vue-ui-molecule-bHqvHzsr.js} +45 -45
  92. package/dist/vue-ui-mood-radar-BGHGOC3W.cjs +1 -0
  93. package/dist/{vue-ui-mood-radar-DwxCn06q.js → vue-ui-mood-radar-BLLnwnLw.js} +40 -40
  94. package/dist/{vue-ui-nested-donuts-ONgAaLY-.js → vue-ui-nested-donuts-C5mqI9Vf.js} +65 -65
  95. package/dist/vue-ui-nested-donuts-r9LWv_9T.cjs +17 -0
  96. package/dist/vue-ui-onion-CKJJIQO8.cjs +5 -0
  97. package/dist/{vue-ui-onion-DjoQuBo8.js → vue-ui-onion-DGU0vHXZ.js} +75 -75
  98. package/dist/{vue-ui-parallel-coordinate-plot-DWGVzaHE.js → vue-ui-parallel-coordinate-plot-B4tVo343.js} +38 -38
  99. package/dist/vue-ui-parallel-coordinate-plot-CTF--y5O.cjs +8 -0
  100. package/dist/{vue-ui-quadrant-CgiD9c7i.js → vue-ui-quadrant-CDZspHBg.js} +54 -54
  101. package/dist/vue-ui-quadrant-De8bmwz_.cjs +1 -0
  102. package/dist/vue-ui-quick-chart-Bi7Vdl9I.cjs +15 -0
  103. package/dist/{vue-ui-quick-chart-5NiRxtpD.js → vue-ui-quick-chart-baWAo-Ln.js} +9 -9
  104. package/dist/{vue-ui-radar-CfKAy0nI.js → vue-ui-radar-CG8tGSHg.js} +55 -55
  105. package/dist/vue-ui-radar-DAxiwdD4.cjs +1 -0
  106. package/dist/{vue-ui-rating-yiM_5H0W.cjs → vue-ui-rating-Bm6BESO1.cjs} +1 -1
  107. package/dist/{vue-ui-rating-CbZvsZNv.js → vue-ui-rating-CcMWLaSP.js} +2 -2
  108. package/dist/{vue-ui-relation-circle-RRK2jhHr.js → vue-ui-relation-circle-D4vD3HD_.js} +7 -7
  109. package/dist/vue-ui-relation-circle-rM2pEsYK.cjs +1 -0
  110. package/dist/vue-ui-rings-Mt51bBc5.cjs +2 -0
  111. package/dist/{vue-ui-rings-CiMKMEpp.js → vue-ui-rings-R91Q3vZF.js} +62 -62
  112. package/dist/{vue-ui-scatter-9PFXuvoo.js → vue-ui-scatter-BKY7zeC_.js} +44 -44
  113. package/dist/vue-ui-scatter-COs46vAF.cjs +1 -0
  114. package/dist/{vue-ui-skeleton-KW-jcPRN.cjs → vue-ui-skeleton-BBWwBSGZ.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-7Zfds6H1.js → vue-ui-skeleton-CTZKsfWs.js} +3 -3
  116. package/dist/{vue-ui-smiley-D0jhMBUh.js → vue-ui-smiley-3XabGcpa.js} +2 -2
  117. package/dist/{vue-ui-smiley-BNQlshyY.cjs → vue-ui-smiley-CZ2XNWEt.cjs} +1 -1
  118. package/dist/{vue-ui-spark-trend-CLm12POW.cjs → vue-ui-spark-trend-CZnUiwhV.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-D8nDY0fS.js → vue-ui-spark-trend-Dd_5kNG9.js} +5 -5
  120. package/dist/{vue-ui-sparkbar-ChEbpWYC.cjs → vue-ui-sparkbar-CZJ8RFMM.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-wKlwMCph.js → vue-ui-sparkbar-DT_G3f_6.js} +4 -4
  122. package/dist/{vue-ui-sparkgauge-CvhIe_mP.js → vue-ui-sparkgauge-CoGcwj8-.js} +4 -4
  123. package/dist/{vue-ui-sparkgauge-DG824sGI.cjs → vue-ui-sparkgauge-Cra2_GdA.cjs} +1 -1
  124. package/dist/{vue-ui-sparkhistogram-B8k8a538.cjs → vue-ui-sparkhistogram-ClJhce64.cjs} +1 -1
  125. package/dist/{vue-ui-sparkhistogram-CVmbTFTc.js → vue-ui-sparkhistogram-ZI-zkp6j.js} +5 -5
  126. package/dist/{vue-ui-sparkline-CtqAbSzZ.js → vue-ui-sparkline-C4HvM0A7.js} +4 -4
  127. package/dist/{vue-ui-sparkline-7wnWuXDQ.cjs → vue-ui-sparkline-Cehnojts.cjs} +1 -1
  128. package/dist/{vue-ui-sparkstackbar-57SONMGP.cjs → vue-ui-sparkstackbar-B6su4lbU.cjs} +1 -1
  129. package/dist/{vue-ui-sparkstackbar-DfwEeUC5.js → vue-ui-sparkstackbar-DbXifSgX.js} +5 -5
  130. package/dist/vue-ui-stackbar-Dxjx916g.cjs +6 -0
  131. package/dist/{vue-ui-stackbar-CGSVPiPx.js → vue-ui-stackbar-bBQdWmxo.js} +86 -86
  132. package/dist/{vue-ui-strip-plot-fJFkn8_0.js → vue-ui-strip-plot-BaAUPB0O.js} +36 -36
  133. package/dist/vue-ui-strip-plot-D3Mc4jJS.cjs +1 -0
  134. package/dist/{vue-ui-table-Das3959J.cjs → vue-ui-table-CO12Arh5.cjs} +1 -1
  135. package/dist/{vue-ui-table-CliL2Wsp.js → vue-ui-table-DyjampQ2.js} +1 -1
  136. package/dist/{vue-ui-table-heatmap-C28ozf2S.cjs → vue-ui-table-heatmap-BrXBITN7.cjs} +1 -1
  137. package/dist/{vue-ui-table-heatmap-ZsJMMGpG.js → vue-ui-table-heatmap-DC3LbLR1.js} +4 -4
  138. package/dist/{vue-ui-table-sparkline-0i9FAXug.cjs → vue-ui-table-sparkline-C-L8YXVO.cjs} +1 -1
  139. package/dist/{vue-ui-table-sparkline-CrQNShdH.js → vue-ui-table-sparkline-MCUi0UPR.js} +5 -5
  140. package/dist/{vue-ui-thermometer-BaGL6WSb.js → vue-ui-thermometer-0Jw0Kc3K.js} +50 -50
  141. package/dist/vue-ui-thermometer-BbAmbpxI.cjs +1 -0
  142. package/dist/{vue-ui-timer-CFtgJ_Vi.cjs → vue-ui-timer-CgcO44Ga.cjs} +1 -1
  143. package/dist/{vue-ui-timer-Nk94fV-n.js → vue-ui-timer-D43Y73z-.js} +5 -5
  144. package/dist/vue-ui-tiremarks-B7GobiRR.cjs +1 -0
  145. package/dist/{vue-ui-tiremarks-zYgdq_99.js → vue-ui-tiremarks-C2z7LZOy.js} +25 -25
  146. package/dist/vue-ui-treemap-YuZUqTkv.cjs +1 -0
  147. package/dist/{vue-ui-treemap-CAxPcxn-.js → vue-ui-treemap-t2jSZWbw.js} +12 -12
  148. package/dist/{vue-ui-vertical-bar-Di3FBkwJ.js → vue-ui-vertical-bar-CXbzdSDN.js} +80 -80
  149. package/dist/vue-ui-vertical-bar-RH9oo9ao.cjs +4 -0
  150. package/dist/vue-ui-waffle-C6PA3aJK.cjs +1 -0
  151. package/dist/{vue-ui-waffle-DBJAQsEf.js → vue-ui-waffle-Z9KsaCxx.js} +45 -45
  152. package/dist/{vue-ui-wheel-BTZEr2Vs.js → vue-ui-wheel-BbBHPjUa.js} +27 -27
  153. package/dist/vue-ui-wheel-BmWfP7V3.cjs +1 -0
  154. package/dist/{vue-ui-word-cloud-DBCVUkLM.js → vue-ui-word-cloud-CUi3fEZc.js} +72 -72
  155. package/dist/{vue-ui-word-cloud-BEaRWIu-.cjs → vue-ui-word-cloud-DysEgxAX.cjs} +1 -1
  156. package/dist/{vue-ui-xy-DbN93Pcf.cjs → vue-ui-xy-B7Q6HDzu.cjs} +2 -2
  157. package/dist/{vue-ui-xy-aKaGgYGL.js → vue-ui-xy-BWN8izeD.js} +16 -16
  158. package/dist/vue-ui-xy-canvas-DZB78JsG.cjs +9 -0
  159. package/dist/vue-ui-xy-canvas-DfhloBZx.js +1672 -0
  160. package/package.json +1 -1
  161. package/dist/PenAndPaper-CmcfpltX.js +0 -243
  162. package/dist/PenAndPaper-DNbX5hR8.cjs +0 -1
  163. package/dist/vue-ui-3d-bar-CmbTiJVx.cjs +0 -19
  164. package/dist/vue-ui-age-pyramid-Sv-HbbDJ.cjs +0 -1
  165. package/dist/vue-ui-bullet-vcmTY4AX.cjs +0 -34
  166. package/dist/vue-ui-candlestick-DQT-8PRz.cjs +0 -2
  167. package/dist/vue-ui-circle-pack-CVLJs0XP.cjs +0 -1
  168. package/dist/vue-ui-donut-FoRYusUX.cjs +0 -1
  169. package/dist/vue-ui-donut-evolution-BIK2yfIJ.cjs +0 -1
  170. package/dist/vue-ui-flow-N825fjRf.cjs +0 -1
  171. package/dist/vue-ui-funnel-B6XMYl89.cjs +0 -1
  172. package/dist/vue-ui-galaxy-p-sbDnSY.cjs +0 -1
  173. package/dist/vue-ui-gauge-DsZFk8T_.cjs +0 -1
  174. package/dist/vue-ui-heatmap-VXgeMOwT.cjs +0 -1
  175. package/dist/vue-ui-history-plot-JmeGiR--.cjs +0 -1
  176. package/dist/vue-ui-mood-radar-CO5sPVVG.cjs +0 -1
  177. package/dist/vue-ui-nested-donuts-D0nALasd.cjs +0 -17
  178. package/dist/vue-ui-onion-CBqx4q4k.cjs +0 -5
  179. package/dist/vue-ui-parallel-coordinate-plot-uNCmnSvz.cjs +0 -8
  180. package/dist/vue-ui-quadrant-BOkyMgCm.cjs +0 -1
  181. package/dist/vue-ui-quick-chart-BRp_bNso.cjs +0 -15
  182. package/dist/vue-ui-radar-BpicgiWF.cjs +0 -1
  183. package/dist/vue-ui-relation-circle-Dg6rdyGP.cjs +0 -1
  184. package/dist/vue-ui-rings-A49lyv-J.cjs +0 -2
  185. package/dist/vue-ui-scatter-C_jHsy8M.cjs +0 -1
  186. package/dist/vue-ui-stackbar--0FZ_eBi.cjs +0 -6
  187. package/dist/vue-ui-strip-plot-C_ggDAQ-.cjs +0 -1
  188. package/dist/vue-ui-thermometer-h0rymM2v.cjs +0 -1
  189. package/dist/vue-ui-tiremarks-Cj8-XGcp.cjs +0 -1
  190. package/dist/vue-ui-treemap-CybL6mVf.cjs +0 -1
  191. package/dist/vue-ui-vertical-bar-D4IkwvAB.cjs +0 -4
  192. package/dist/vue-ui-waffle-7otLUrER.cjs +0 -1
  193. package/dist/vue-ui-wheel-BUJXtmeP.cjs +0 -1
  194. package/dist/vue-ui-xy-canvas-CF_lqLg-.cjs +0 -9
  195. package/dist/vue-ui-xy-canvas-CVQ__d4u.js +0 -1500
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BeJeDy5m.cjs"),Ne=require("./useResponsive-DQmBAoBf.cjs"),ce=require("./BaseIcon-C0unoacb.cjs"),Xe=require("./Tooltip-B8E9uCVm.cjs"),Ve=require("./usePrinter-Bz_kd3vb.cjs"),Ye=require("./Slicer-Ct66sqV1.cjs"),Ze=require("./vue-ui-skeleton-KW-jcPRN.cjs"),Pe=require("./useNestedProp-CF-iHhIC.cjs"),Je=require("./PackageVersion-By81XV8X.cjs"),Qe=require("./PenAndPaper-DNbX5hR8.cjs"),Ke=require("./useChartAccessibility-Cm7nkzTG.cjs"),et=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},tt=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function lt({dataset:v,barLineSwitch:B=6}){let f=null,_=null,L=0;if((typeof v=="number"||typeof v=="string")&&console.warn(`The provided dataset (${v}) is not sufficient to build a chart`),te(v)&&(I(v)&&(v.length<B?f=S.BAR:f=S.LINE,_=v,L=v.length),de(v))){if(!ot(v))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(v[0]),G=Object.values(v[0]);if(!U.some(E=>nt(E)))return 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;$e(G,E=>typeof E=="number")&&(f=S.DONUT,_=v),$e(G,E=>Array.isArray(E)&&I(E))&&(Fe(v)>B?f=S.LINE:f=S.BAR,L=Fe(v),_=v.map(E=>({...E,data:rt(E,$=>I($))}))),v=v.map(E=>Ie(E)),_=_.map(E=>Ie(E))}return te(v)&&[...new Set(v.flatMap(U=>Array.isArray(U)))][0],{dataset:v,type:f,usableDataset:_,maxSeriesLength:L}}function Oe(v){return!v||te(v)&&!v.length}function te(v){return Array.isArray(v)}function I(v){if(!te(v)||Oe(v))return!1;const B=v.map(f=>Number(f));return![...new Set(B.flatMap(f=>typeof f=="number"&&!isNaN(f)))].includes(!1)}function de(v){return!te(v)||Oe(v)||!![...new Set(v.flatMap(f=>typeof f=="object"&&!Array.isArray(f)))].includes(!1)?!1:!v.map(f=>Object.keys(f).length>0).includes(!1)}function at(v,B){const f=Object.keys(v).sort(),_=Object.keys(B).sort();if(f.length!==_.length)return!1;for(let L=0;L<f.length;L+=1){const P=f[L],D=_[L];if(P!==D||typeof v[P]!=typeof B[D])return!1}return!0}function ot(v){if(v.length<=1)return!0;for(let B=0;B<v.length;B+=1)for(let f=B+1;f<v.length;f+=1)if(!at(v[B],v[f]))return!1;return!0}function nt(v){return tt.includes(v.toUpperCase())}function $e(v,B){let f=[];for(let _=0;_<v.length;_+=1)f.push(B(v[_]));return f.includes(!0)}function Fe(v){return Math.max(...[...v].flatMap(B=>Object.values(B).filter(f=>I(f)).map(f=>f.length)))}function rt(v,B){return Object.values(v).filter(f=>B(f))[0]}function Ie(v){const B={};for(let f in v)v.hasOwnProperty(f)&&(B[f.toUpperCase()]=v[f]);return B}const it=["id"],ut=["xmlns","viewBox"],st=["x","y","width","height"],ct=["x","y","width","height"],dt=["width","height"],vt=["id"],mt=["id"],ht=["id"],ft=["flood-color"],pt={key:0,class:"donut-label-connectors"},kt=["d","stroke","stroke-width","filter"],gt=["cx","cy","r","fill","filter"],yt={class:"donut"},xt=["d","fill","stroke","stroke-width","filter"],St=["d","onMouseenter","onClick"],bt={key:1,class:"donut-labels quick-animation"},Bt=["cx","cy","fill","stroke","filter"],wt=["text-anchor","x","y","fill","font-size","filter"],Et=["text-anchor","x","y","fill","font-size","filter"],At={key:2,class:"donut-hollow quick-animation"},Lt=["x","y","font-size","fill"],Ct=["x","y","font-size","fill"],_t={key:0,class:"line-grid"},zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt=["x1","x2","y1","y2","stroke","stroke-width"],Vt={key:1,class:"line-axis"},Pt=["x1","x2","y1","y2","stroke","stroke-width"],$t=["x1","x2","y1","y2","stroke","stroke-width"],Ft={key:2,class:"yLabels"},It=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["x","y","font-size","fill"],Tt={key:3,class:"periodLabels"},Rt=["x1","x2","y1","y2","stroke","stroke-width"],Mt=["font-size","text-anchor","fill","transform"],Dt={class:"plots"},Ut={class:"line-plot-series"},qt=["d","stroke","stroke-width"],Ht=["d","stroke","stroke-width"],Wt=["d","stroke","stroke-width"],jt=["d","stroke","stroke-width"],Gt=["cx","cy","fill","stroke"],Xt={key:4,class:"dataLabels"},Yt=["font-size","fill","x","y"],Zt={class:"tooltip-traps"},Jt=["x","y","height","width","fill","onMouseenter","onClick"],Qt={key:0,class:"line-grid"},Kt=["x1","x2","y1","y2","stroke","stroke-width"],el=["x1","x2","y1","y2","stroke","stroke-width"],tl={key:1,class:"line-axis"},ll=["x1","x2","y1","y2","stroke","stroke-width"],al=["x1","x2","y1","y2","stroke","stroke-width"],ol={key:2,class:"yLabels"},nl=["x1","x2","y1","y2","stroke","stroke-width"],rl=["x","y","font-size","fill"],il={key:3,class:"periodLabels"},ul=["x1","x2","y1","y2","stroke","stroke-width"],sl=["font-size","text-anchor","transform","fill"],cl={class:"plots"},dl=["x","width","height","y","fill","stroke","stroke-width"],vl=["to"],ml=["from","to"],hl={key:4,class:"dataLabels"},fl=["x","y","font-size","fill"],pl={class:"tooltip-traps"},kl=["x","y","height","width","fill","onMouseenter","onClick"],gl={key:6,class:"axis-labels"},yl={key:0},xl=["font-size","fill","x","y"],Sl={key:1},bl=["font-size","fill","x","y"],Bl={key:2},wl=["font-size","fill","transform"],El={key:3},Al=["font-size","fill","transform"],Ll={key:6,class:"vue-data-ui-watermark"},Cl=["onClick"],_l=["onClick"],zl=["onClick"],Nl={key:1,class:"vue-ui-quick-chart-not-processable"},Vl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(v,{expose:B,emit:f}){const{vue_ui_quick_chart:_}=i.useConfig(),L=v,P=e.ref(null),D=e.ref(null),U=e.ref(null),G=e.ref(null),E=e.ref(i.createUid()),$=e.ref(!1),X=e.ref(null),O=e.ref(""),V=e.ref(null),he=e.ref(null),fe=e.ref(null),x=e.ref([]),pe=e.ref(0),le=e.ref(0),t=e.computed({get:()=>xe(),set:a=>a}),{svgRef:ke}=Ke.useChartAccessibility({config:{text:t.value.title}}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),ge=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),ae=e.ref(!t.value.showUserOptionsOnChartHover);function ye(a=!1){Te.value&&(ae.value=a)}function xe(){const a=Pe.useNestedProp({userConfig:L.config,defaultConfig:_});let s={};return a.theme?s={...Pe.useNestedProp({userConfig:i.themes.vue_ui_quick_chart[a.theme]||L.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:s=a,L.config&&i.hasDeepProperty(L.config,"zoomStartIndex")?s.zoomStartIndex=L.config.zoomStartIndex:s.zoomStartIndex=null,L.config&&i.hasDeepProperty(L.config,"zoomEndIndex")?s.zoomEndIndex=L.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>L.config,a=>{t.value=xe(),g.value.width=t.value.width,g.value.height=t.value.height,ae.value=!t.value.showUserOptionsOnChartHover,Be(),J.value.showTooltip=t.value.showTooltip},{deep:!0}),e.watch(()=>L.dataset,a=>{p.value=Z.value,h.value.start=0,h.value.end=p.value.maxSeriesLength,le.value+=1},{deep:!0});const Y=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),q=f,Z=e.computed(()=>{const a=lt({dataset:i.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return a||console.error("VueUiQuickChart : Dataset is not processable"),a}),p=e.ref(Z.value),Re=e.computed(()=>!!p.value),b=e.computed(()=>p.value?p.value.type:null);e.watch(()=>b.value,a=>{a||i.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:oe,isImaging:ne,generatePdf:Se,generateImage:be}=Ve.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value,options:t.value.userOptionsPrint}),Me=e.computed(()=>t.value.showUserOptions&&!t.value.title),g=e.ref({width:t.value.width,height:t.value.height}),J=e.ref({showTooltip:t.value.showTooltip}),re=e.ref(null);e.onMounted(()=>{Be()});function Be(){if(t.value.responsive){const a=Ne.throttle(()=>{const{width:s,height:l}=Ne.useResponsive({chart:P.value,title:t.value.title?D.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&p.value.maxSeriesLength>1?G.value:null,source:he.value,noTitle:fe.value});requestAnimationFrame(()=>{g.value.width=s,g.value.height=l})});re.value=new ResizeObserver(a),re.value.observe(P.value.parentNode)}_e()}e.onBeforeUnmount(()=>{re.value&&re.value.disconnect()});const De=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.BAR:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.DONUT:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;default:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`}});function we(a){return[...a].map(s=>s.value).reduce((s,l)=>s+l,0)}function Q(a){return t.value.blurOnHover&&![null,void 0].includes(V.value)&&V.value!==a?`url(#blur_${E.value})`:""}function Ee(a,s){x.value.includes(a)?x.value=x.value.filter(l=>l!==a):x.value.length<s&&x.value.push(a)}const Ae=e.ref(null),Le=e.ref(null),ie=e.ref(!1);function Ue(a,s){ie.value=!0;let l=a.value;const r=Z.value.dataset.find((u,m)=>a.id===`donut_${m}`).VALUE;if(x.value.includes(a.id)){let u=function(){l>r?(ie.value=!1,cancelAnimationFrame(Le.value),p.value={...p.value,dataset:p.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,p.value={...p.value,dataset:p.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:l,VALUE:l}:m)},Le.value=requestAnimationFrame(u))};x.value=x.value.filter(m=>m!==a.id),u()}else if(s.length>1){let u=function(){l<r/100?(ie.value=!1,cancelAnimationFrame(Ae.value),x.value.push(a.id),p.value={...p.value,dataset:p.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:0,VALUE:0}:m)}):(l/=1.1,p.value={...p.value,dataset:p.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:l,VALUE:l}:m)},Ae.value=requestAnimationFrame(u))};u()}}const F=e.ref(null);function qe(a){F.value=a}const Ce=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const a=p.value.dataset.map((o,n)=>({...o,value:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`donut_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],immutableValue:o.value}));function s(o,n){return i.dataLabel({v:isNaN(o.value/we(n))?0:o.value/we(n)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(o){return o.proportion*100>t.value.donutHideLabelUnderPercentage}function r(o,n){const y=Z.value.dataset.find((A,z)=>`donut_${z}`===o).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(n.toFixed(0))).length)}function u({datapoint:o,seriesIndex:n}){X.value={datapoint:o,seriesIndex:n,config:t.value,dataset:a},V.value=o.id;const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:o,seriesIndex:n,series:a,config:t.value})))O.value=y({datapoint:o,seriesIndex:n,series:a,config:t.value});else{let k="";k+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,k+=`<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="${o.color}"/></svg>`,k+=`<b>${i.applyDataLabel(t.value.formatter,o.value,i.dataLabel({p:t.value.valuePrefix,v:o.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:o,seriesIndex:n})}</b>`,k+=`<span>(${i.dataLabel({v:o.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,O.value=`<div>${k}</div>`}$.value=!0}function m(){$.value=!1,V.value=null,F.value=null}const C={centerX:g.value.width/2,centerY:g.value.height/2},N=a.filter(o=>!x.value.includes(o.id)).map(o=>o.value||0).reduce((o,n)=>o+n,0),W=a.map((o,n)=>({...o,proportion:(o.value||0)/N,value:o.value||0,absoluteValue:Z.value.dataset.find((y,k)=>`donut_${k}`===o.id).VALUE})),T=g.value.width/2,j=g.value.height/2,R=g.value.height*t.value.donutRadiusRatio;return{dataset:W.filter(o=>!x.value.includes(o.id)),legend:W,drawingArea:C,displayArcPercentage:s,isArcBigEnough:l,useTooltip:u,killTooltip:m,getSpaces:r,total:N,cx:T,cy:j,radius:R,chart:i.makeDonut({series:a.filter(o=>!x.value.includes(o.id))},T,j,R,R,1.99999,2,1,360,105.25,g.value.height*Ce.value)}}),h=e.ref({start:0,end:p.value.maxSeriesLength});function He(){_e()}const H=e.ref(null);async function _e(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&H.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),H.value&&H.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),H.value&&H.value.setEndValue(We(t.value.zoomEndIndex+1)))):(h.value={start:0,end:p.value.maxSeriesLength},le.value+=1)}function We(a){const s=p.value.maxSeriesLength;return a>s?s:a<0||t.value.zoomStartIndex!==null&&a<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:a}const je=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let a=[];I(p.value.dataset)&&(a=p.value.dataset),de(p.value.dataset)&&(a=p.value.dataset.map((u,m)=>({values:u.VALUE||u.DATA||u.SERIE||u.SERIES||u.VALUES||u.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(u=>!x.value.includes(u.id)));const s=I(a)?a.length:Math.max(...a.map(u=>u.values.length));let l=[];if(I(a))l=a;else for(let u=0;u<s;u+=1)l.push(a.map(m=>m.values[u]||0).reduce((m,C)=>(m||0)+(C||0),0));const r=Math.min(...l);return l.map(u=>u+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const a={height:g.value.height,width:g.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:a.width-t.value.xyPaddingRight,bottom:a.height-t.value.xyPaddingBottom,width:a.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:a.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];I(p.value.dataset)&&(l=[{values:p.value.dataset.slice(h.value.start,h.value.end),absoluteIndices:p.value.dataset.map((o,n)=>n).slice(h.value.start,h.value.end),name:t.value.title,color:Y.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"line_0"}]),de(p.value.dataset)&&(l=p.value.dataset.map((o,n)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`line_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],values:o.values.slice(h.value.start,h.value.end),absoluteIndices:o.values.map((y,k)=>k).slice(h.value.start,h.value.end)})));const r={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.map(o=>o.values.length))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,C=r.max<0?s.top:s.bottom-m/(u.max+m)*s.height,N=s.width/r.maxSeries,W=u.ticks.map(o=>({y:s.bottom-s.height*((o+m)/(u.max+m)),x:s.left-8,value:o})),T=l.map((o,n)=>({...o,coordinates:o.values.map((y,k)=>({x:s.left+N*(k+1)-N/2,y:s.bottom-(y+m)/(u.max+m)*s.height,value:y}))})).map(o=>{let n=[];return o.coordinates.forEach(y=>{n.push(`${y.x},${y.y} `)}),{...o,linePath:n.join(" ")}});function j(o){V.value=o,F.value=o;const n=l.map(k=>({...k,value:k.values[o],absoluteIndex:k.absoluteIndices[o]})).filter(k=>!x.value.includes(k.id));X.value={datapoint:n,seriesIndex:o,config:t.value,dataset:l};const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:n,seriesIndex:o,series:l,config:t.value})))O.value=y({datapoint:n,seriesIndex:o,series:l,config:t.value});else{let k="";t.value.xyPeriods[n[0].absoluteIndex]&&(k+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[n[0].absoluteIndex]}</div>`),n.forEach((A,z)=>{k+=`
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="${A.color}"/></svg>
4
- <span>${A.name}:</span>
5
- <b>${i.applyDataLabel(t.value.formatter,A.value,i.dataLabel({p:t.value.valuePrefix,v:A.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:A,seriesIndex:z})}
6
- </b>
7
- </div>
8
- `}),O.value=k}$.value=!0}function R(){V.value=null,F.value=null,$.value=!1}return{absoluteZero:C,dataset:T.filter(o=>!x.value.includes(o.id)),legend:T,drawingArea:s,extremes:r,slotSize:N,yLabels:W,useTooltip:j,killTooltip:R}}),c=e.computed(()=>{if(b.value!==S.BAR)return null;const a={height:g.value.height,width:g.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:a.width-t.value.xyPaddingRight,bottom:a.height-t.value.xyPaddingBottom,width:a.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:a.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];I(p.value.dataset)&&(l=[{values:p.value.dataset.slice(h.value.start,h.value.end),absoluteIndices:p.value.dataset.map((n,y)=>y).slice(h.value.start,h.value.end),name:t.value.title,color:Y.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"bar_0"}]),de(p.value.dataset)&&(l=p.value.dataset.map((n,y)=>({...n,values:n.VALUE||n.DATA||n.SERIE||n.SERIES||n.VALUES||n.NUM||0,name:n.NAME||n.DESCRIPTION||n.TITLE||n.LABEL||`Serie ${y}`,id:`bar_${y}`})).map((n,y)=>({...n,color:n.COLOR?i.convertColorToHex(n.COLOR):Y.value[y+t.value.paletteStartIndex]||i.palette[y+t.value.paletteStartIndex]||i.palette[(y+t.value.paletteStartIndex)%i.palette.length],values:n.values.slice(h.value.start,h.value.end),absoluteIndices:n.values.map((k,A)=>A).slice(h.value.start,h.value.end)})));const r={max:Math.max(...l.filter(n=>!x.value.includes(n.id)).flatMap(n=>n.values))<0?0:Math.max(...l.filter(n=>!x.value.includes(n.id)).flatMap(n=>n.values)),min:Math.min(...l.filter(n=>!x.value.includes(n.id)).flatMap(n=>n.values)),maxSeries:Math.max(...l.filter(n=>!x.value.includes(n.id)).map(n=>n.values.length))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max,t.value.xyScaleSegments),m=u.min<0?Math.abs(u.min):0,C=s.bottom-m/(u.max+m)*s.height,N=s.width/r.maxSeries,W=u.ticks.map(n=>({y:s.bottom-s.height*((n+m)/(u.max+m)),x:s.left-8,value:n})),T=l.map((n,y)=>({...n,coordinates:n.values.map((k,A)=>{const z=(k+m)/(r.max+m)*s.height,K=Math.abs(k)/Math.abs(r.min)*(s.height-C),me=m/(r.max+m)*s.height,ee=N/l.filter(M=>!x.value.includes(M.id)).length-t.value.barGap/l.filter(M=>!x.value.includes(M.id)).length;return{x:s.left+N*A+ee*y+t.value.barGap/2,y:k>0?s.bottom-z:C,height:k>0?z-me:K,value:k,width:ee}})})),j=l.filter(n=>!x.value.includes(n.id)).map((n,y)=>({...n,coordinates:n.values.map((k,A)=>{const z=(k+m)/(r.max+m)*s.height,K=Math.abs(k)/(r.max+m)*s.height,me=m/(r.max+m)*s.height,ee=N/l.filter(M=>!x.value.includes(M.id)).length-t.value.barGap/l.filter(M=>!x.value.includes(M.id)).length;return{x:s.left+N*A+ee*y+t.value.barGap/2,y:k>0?s.bottom-z:C,height:k>0?z-me:K,value:k,width:ee}})}));function R(n){V.value=n,F.value=n;const y=l.map(A=>({...A,value:A.values[n],absoluteIndex:A.absoluteIndices[n]})).filter(A=>!x.value.includes(A.id));X.value={datapoint:y,seriesIndex:n,config:t.value,dataset:l};const k=t.value.tooltipCustomFormat;if(i.isFunction(k)&&i.functionReturnsString(()=>k({datapoint:y,seriesIndex:n,series:l,config:t.value})))O.value=k({point:y,seriesIndex:n,series:l,config:t.value});else{let A="";t.value.xyPeriods[y[0].absoluteIndex]&&(A+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[y[0].absoluteIndex]}</div>`),y.forEach((z,K)=>{A+=`
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="${z.color}"/></svg>
11
- <span>${z.name}:</span>
12
- <b>${i.applyDataLabel(t.value.formatter,z.value,i.dataLabel({p:t.value.valuePrefix,v:z.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:z,seriesIndex:K})}
13
- </b>
14
- </div>
15
- `}),O.value=A}$.value=!0}function o(){$.value=!1,V.value=null,F.value=null}return{absoluteZero:C,dataset:j.filter(n=>!x.value.includes(n.id)),legend:T,drawingArea:s,extremes:r,slotSize:N,yLabels:W,useTooltip:R,killTooltip:o}}),ue=e.ref(!1);function Ge(a){ue.value=a,pe.value+=1}function ze(){J.value.showTooltip=!J.value.showTooltip}const se=e.ref(!1);function ve(){se.value=!se.value}return B({generatePdf:Se,generateImage:be,toggleTooltip:ze,toggleAnnotator:ve}),(a,s)=>Re.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${b.value}_${E.value}`,ref_key:"quickChart",ref:P,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":ue.value}),style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-family:${t.value.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:s[5]||(s[5]=()=>ye(!0)),onMouseleave:s[6]||(s[6]=()=>ye(!1))},[t.value.userOptionsButtons.annotator?(e.openBlock(),e.createBlock(Qe.PenAndPaper,{key:0,svgRef:e.unref(ke),backgroundColor:t.value.backgroundColor,color:t.value.color,active:se.value,onClose:ve},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Me.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:fe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.showUserOptions&&(ge.value||ae.value)?(e.openBlock(),e.createBlock(Ve.UserOptions,{ref:"details",key:`user_option_${pe.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(oe),isImaging:e.unref(ne),uid:E.value,hasTooltip:t.value.userOptionsButtons.tooltip&&t.value.showTooltip,hasPdf:t.value.userOptionsButtons.pdf,hasImg:t.value.userOptionsButtons.img,hasFullscreen:t.value.userOptionsButtons.fullscreen,hasXls:!1,isTooltip:J.value.showTooltip,isFullscreen:ue.value,titles:{...t.value.userOptionsButtonTitles},chartElement:P.value,position:t.value.userOptionsPosition,hasAnnotator:t.value.userOptionsButtons.annotator,isAnnotation:se.value,onToggleFullscreen:Ge,onGeneratePdf:e.unref(Se),onGenerateImage:e.unref(be),onToggleTooltip:ze,onToggleAnnotator:ve,style:e.normalizeStyle({visibility:ge.value?ae.value?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"quickChartTitle",ref:D,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;color:${t.value.color};font-size:${t.value.titleFontSize}px;font-weight:${t.value.titleBold?"bold":"normal"};text-align:${t.value.titleTextAlign}`)},e.toDisplayString(t.value.title),5)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ke,xmlns:e.unref(i.XMLNS),viewBox:De.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createVNode(Je._sfc_main),a.$slots["chart-background"]&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:c.value.drawingArea.left,y:c.value.drawingArea.top,width:c.value.drawingArea.width,height:c.value.drawingArea.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,st)):e.createCommentVNode("",!0),a.$slots["chart-background"]&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:d.value.drawingArea.left,y:d.value.drawingArea.top,width:d.value.drawingArea.width,height:d.value.drawingArea.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,ct)):e.createCommentVNode("",!0),a.$slots["chart-background"]&&b.value===S.DONUT?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:0,y:0,width:g.value.width,height:g.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,dt)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${E.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${E.value}`},null,8,mt),s[7]||(s[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,vt),e.createElementVNode("filter",{id:`shadow_${E.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.donutShadowColor},null,8,ft)],8,ht)]),b.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(i.calcNutArrowPath)(l,{x:g.value.width/2,y:g.value.height/2},16,16,!1,!1,g.value.height*Ce.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Q(l.id)},null,8,kt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:w.value.cx,cy:w.value.cy,r:w.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${E.value})`:""},null,8,gt),e.createElementVNode("g",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:Q(l.id)},null,8,xt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:u=>w.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:s[0]||(s[0]=u=>w.value.killTooltip()),onClick:u=>q("selectDatapoint",l)},null,40,St))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(i.calcMarkerOffsetX)(l).x,cy:e.unref(i.calcMarkerOffsetY)(l)-3.7,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":1,r:3,filter:Q(l.id)},null,8,Bt)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(i.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(i.calcMarkerOffsetX)(l,!0).x,y:e.unref(i.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Q(l.id)},e.toDisplayString(w.value.displayArcPercentage(l,w.value.chart))+" ("+e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,l.value,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r}))+") ",9,wt)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(i.calcMarkerOffsetX)(l).anchor,x:e.unref(i.calcMarkerOffsetX)(l,!0).x,y:e.unref(i.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Q(l.id)},e.toDisplayString(l.name),9,Et)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",At,[e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,Lt),e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.valuePrefix,v:w.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,Ct)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,zt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*r,x2:d.value.drawingArea.left+d.value.slotSize*r,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Nt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Vt,[e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.left,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Pt),e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,y2:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,$t)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:d.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,It)):e.createCommentVNode("",!0),l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,l.value,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,Ot)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(h.value.start,h.value.end),(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.xyPeriodsShowOnlyAtModulo||t.value.xyPeriodsShowOnlyAtModulo&&r%Math.floor((h.value.end-h.value.start)/t.value.xyPeriodsModulo)===0||h.value.end-h.value.start<=t.value.xyPeriodsModulo?(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,y1:d.value.drawingArea.bottom,y2:d.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Rt)):e.createCommentVNode("",!0),!t.value.xyPeriodsShowOnlyAtModulo||t.value.xyPeriodsShowOnlyAtModulo&&r%Math.floor((h.value.end-h.value.start)/t.value.xyPeriodsModulo)===0||h.value.end-h.value.start<=t.value.xyPeriodsModulo?(e.openBlock(),e.createElementBlock("text",{key:1,"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",fill:t.value.color,transform:`translate(${d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,Mt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",Ut,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(i.createSmoothPath)(l.coordinates)}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,qt),e.createElementVNode("path",{d:`M ${e.unref(i.createSmoothPath)(l.coordinates)}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Ht)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Wt),e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,jt)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:e.unref(i.checkNaN)(u.y),r:3,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,Gt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:u.x,y:e.unref(i.checkNaN)(u.y)-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,e.unref(i.checkNaN)(u.value),e.unref(i.dataLabel)({p:t.value.valuePrefix,v:e.unref(i.checkNaN)(u.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:u,seriesIndex:m})),9,Yt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+r*d.value.slotSize,y:d.value.drawingArea.top,height:d.value.drawingArea.height<=0?1e-5:d.value.drawingArea.height,width:d.value.slotSize<=0?1e-5:d.value.slotSize,fill:[V.value,F.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:u=>d.value.useTooltip(r),onMouseleave:s[1]||(s[1]=u=>d.value.killTooltip()),onClick:u=>q("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,Jt))),256))])],64)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",Qt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Kt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*r,x2:c.value.drawingArea.left+c.value.slotSize*r,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,el))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",tl,[e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.left,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,ll),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,y2:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,al)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,nl)):e.createCommentVNode("",!0),l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,l.value,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,rl)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(h.value.start,h.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,ul))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(h.value.start,h.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,sl))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("rect",{x:u.x,width:u.width<=0?1e-5:u.width,height:e.unref(i.checkNaN)(u.height<=0?1e-5:u.height),y:e.unref(i.checkNaN)(u.y),fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.barAnimated&&u.value<0})},[t.value.barAnimated&&u.value>0&&!e.unref(oe)&&!e.unref(ne)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:u.height,dur:"0.5s"},null,8,vl)):e.createCommentVNode("",!0),t.value.barAnimated&&u.value>0&&!e.unref(oe)&&!e.unref(ne)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-u.height,dur:"0.5s"},null,8,ml)):e.createCommentVNode("",!0)],10,dl))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("text",{x:u.x+u.width/2,y:e.unref(i.checkNaN)(u.y)-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,e.unref(i.checkNaN)(u.value),e.unref(i.dataLabel)({p:t.value.valuePrefix,v:e.unref(i.checkNaN)(u.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:u,seriesIndex:m})),9,fl))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+r*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:[V.value,F.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:u=>c.value.useTooltip(r),onMouseleave:s[2]||(s[2]=u=>c.value.killTooltip()),onClick:u=>q("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,kl))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(b.value)?(e.openBlock(),e.createElementBlock("g",gl,[t.value.xAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",yl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:d.value.drawingArea.left+d.value.drawingArea.width/2,y:g.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,xl)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",Sl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:c.value.drawingArea.left+c.value.drawingArea.width/2,y:g.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,bl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",Bl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${d.value.drawingArea.top+d.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,wl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",El,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${c.value.drawingArea.top+c.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,Al)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,ut)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ze.default,{key:5,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ll,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(oe)||e.unref(ne)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&p.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${le.value}`,ref_key:"quickChartSlicer",ref:G},[(e.openBlock(),e.createBlock(Ye.Slicer,{ref_key:"slicerComponent",ref:H,key:`slicer_${le.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[h.value.start]?t.value.xyPeriods[h.value.start]:"",labelRight:t.value.xyPeriods[h.value.end-1]?t.value.xyPeriods[h.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:p.value.maxSeriesLength,min:0,valueStart:h.value.start,valueEnd:h.value.end,smoothMinimap:t.value.zoomMinimap.smooth,minimapSelectedColor:t.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:t.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:t.value.zoomMinimap.selectionRadius,minimapLineColor:t.value.zoomMinimap.lineColor,minimap:je.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,verticalHandles:t.value.zoomMinimap.verticalHandles,minimapSelectedIndex:F.value,start:h.value.start,"onUpdate:start":s[3]||(s[3]=l=>h.value.start=l),end:h.value.end,"onUpdate:end":s[4]||(s[4]=l=>h.value.end=l),refreshStartPoint:t.value.zoomStartIndex!==null?t.value.zoomStartIndex:0,refreshEndPoint:t.value.zoomEndIndex!==null?t.value.zoomEndIndex+1:p.value.maxSeriesLength,enableRangeHandles:t.value.zoomEnableRangeHandles,enableSelectionDrag:t.value.zoomEnableSelectionDrag,onReset:He,onTrapMouse:qe},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","minimapIndicatorColor","verticalHandles","minimapSelectedIndex","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${t.value.color}`)},[b.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(w.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:u=>{Ue(l,w.value.dataset),q("selectLegend",l)},style:e.normalizeStyle(`cursor: ${w.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(a.$slots,"legend",e.mergeProps({key:0,ref_for:!0},{legend:l}),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ce.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},e.toDisplayString(x.value.includes(l.id)?"-":e.unref(i.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):ie.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ( - % ) ",4)):(e.openBlock(),e.createElementBlock("span",{key:2,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ("+e.toDisplayString(e.unref(i.dataLabel)({v:l.value/w.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,Cl))),256)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:u=>{Ee(l.id,d.value.legend.length-1),q("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(a.$slots,"legend",e.mergeProps({key:0,ref_for:!0},{legend:l}),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ce.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,_l))),256)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:u=>{Ee(l.id,c.value.legend.length-1),q("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(a.$slots,"legend",e.mergeProps({key:0,ref_for:!0},{legend:l}),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ce.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,zl))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:he,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Xe._sfc_main,{show:J.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:P.value,content:O.value,isFullscreen:ue.value,isCustom:e.unref(i.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...X.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...X.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"])],46,it)):(e.openBlock(),e.createElementBlock("div",Nl,[e.createVNode(ce.default,{name:"circleCancel",stroke:"red"}),s[8]||(s[8]=e.createElementVNode("span",null,"Dataset is not processable",-1))]))}},Pl=et._export_sfc(Vl,[["__scopeId","data-v-e110140a"]]);exports.default=Pl;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BeJeDy5m.cjs"),se=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-BgVFZwZZ.cjs"),ue=require("./usePrinter-Bz_kd3vb.cjs"),$e=require("./Tooltip-B8E9uCVm.cjs"),_e=require("./vue-ui-sparkbar-ChEbpWYC.cjs"),Te=require("./Legend-mrAy7yUC.cjs"),Ne=require("./DataTable-ByOfBGEi.cjs"),xe=require("./vue-ui-skeleton-KW-jcPRN.cjs"),Se=require("./vue-ui-accordion-CZBJSHT_.cjs"),ie=require("./useNestedProp-CF-iHhIC.cjs"),Ee=require("./PackageVersion-By81XV8X.cjs"),Ve=require("./PenAndPaper-DNbX5hR8.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Ae=require("./useChartAccessibility-Cm7nkzTG.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],ze=["xmlns","viewBox"],Ie=["width","height"],Re=["id"],qe=["stop-color"],Me=["stop-color"],Ue={key:1},De=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:0},We=["d","stroke","stroke-width"],He=["d","stroke","stroke-width"],je={key:2},Xe=["x","y","text-anchor","font-size","fill","onMouseenter"],Ye=["points","stroke","stroke-width"],Je=["points","stroke","stroke-width","fill"],Ke={key:3},Qe=["cx","cy","fill","r","stroke"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt={key:0,style:{"max-width":"200px",margin:"0 auto"}},ot={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ce,{expose:de,emit:ve}){const{vue_ui_radar:pe}=n.useConfig(),d=ce,b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),he=e.ref(null),T=e.ref(!1),N=e.ref(""),L=e.ref(0),C=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>j(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:G,keepUserOptionState:W}=Oe.useUserOptionState({config:t.value}),{svgRef:H}=Ae.useChartAccessibility({config:t.value.style.chart.title});function j(){const o=ie.useNestedProp({userConfig:d.config,defaultConfig:pe});return o.theme?{...ie.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=j(),x.value=!t.value.userOptions.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1,p.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tootlip.show},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=se.throttle(()=>{const{width:a,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});requestAnimationFrame(()=>{u.value.width=a,u.value.height=l})});B.value=new ResizeObserver(o),B.value.observe(C.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),fe=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=ve,i=e.ref([]),w=e.ref(null),m=e.ref(!1);function ee(o){m.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{m.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{m.value=!1},500)),me("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ye(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),h=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),te=e.computed(()=>Math.max(...h.value.flatMap(o=>o.values))),oe=e.computed(()=>h.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),ae=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:oe.value,rotation:0})),ke=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>ae.value.coordinates.map((o,a)=>{const l=h.value[a].values.map(r=>be({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(h.value[a].target||te.value)}));return{...o,...h.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function be({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const y=e.computed(()=>{const o=h.value.map((a,l)=>a.values.map(r=>r/(a.target||te.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/h.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>ee(l),isSegregated:i.value.includes(l)}))}),Ce=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),$=e.ref(null),V=e.ref([]),O=e.ref(null);function we(o,a){V.value=[],$.value=a,T.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function le(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,lt)=>[c.name,c.target,...c.values.flatMap(F=>[F,isNaN(F/c.target)?"":F/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const k=e.ref(!1);function Be(o){k.value=o,L.value+=1}function re(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const _=e.ref(!1);function A(){_.value=!_.value}return de({getData:ye,generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:re,toggleTooltip:ne,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:C,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve.PenAndPaper,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:A},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(W)||e.unref(x))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne,onToggleAnnotator:A,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ee._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Me)],8,Re))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,De))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:oe.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:ae.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,He),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>we(l,r),onMouseleave:a[0]||(a[0]=s=>{T.value=!1,$.value=null})},e.toDisplayString(l.name),41,Xe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Ye)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:$.value!==null&&$.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===c&&t.value.useCssAnimation})},null,10,Qe))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${D.value}`,legendSet:y.value,config:Ce.value,onClickMarker:a[1]||(a[1]=({i:l})=>ee(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{show:p.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:N.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(_e.default,{dataset:V.value,config:fe.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},at=Fe._export_sfc(ot,[["__scopeId","data-v-b6116edd"]]);exports.default=at;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BeJeDy5m.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-BgVFZwZZ.cjs"),te=require("./usePrinter-Bz_kd3vb.cjs"),$e=require("./vue-ui-skeleton-KW-jcPRN.cjs"),le=require("./useNestedProp-CF-iHhIC.cjs"),Pe=require("./PackageVersion-By81XV8X.cjs"),_e=require("./PenAndPaper-DNbX5hR8.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,o=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(P))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(Pe._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BeJeDy5m.cjs"),oe=require("./useResponsive-DQmBAoBf.cjs"),Ce=require("./Title-BgVFZwZZ.cjs"),ae=require("./usePrinter-Bz_kd3vb.cjs"),we=require("./Tooltip-B8E9uCVm.cjs"),$e=require("./DataTable-ByOfBGEi.cjs"),Ne=require("./Legend-mrAy7yUC.cjs"),Te=require("./vue-ui-skeleton-KW-jcPRN.cjs"),xe=require("./vue-ui-accordion-CZBJSHT_.cjs"),re=require("./useNestedProp-CF-iHhIC.cjs"),Se=require("./PackageVersion-By81XV8X.cjs"),Be=require("./PenAndPaper-DNbX5hR8.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Pe=require("./Shape-x7U3IhoM.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ee=["xmlns","viewBox"],Ie=["width","height"],Ae=["id"],ze=["stop-color"],Fe=["stop-color"],Re={key:1},qe=["stroke","cx","cy","r","fill"],Me=["stroke","stroke-width","cx","cy","r","fill"],Ue=["stroke","stroke-width","cx","cy","r","fill"],De=["cx","cy","r","onMouseenter"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Ge={key:0},je={key:1},Xe=["innerHTML"],Ye={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:se,emit:ue}){const{vue_ui_rings:ie}=n.useConfig(),ce=e.useSlots(),p=ne,b=e.ref(!1),$=e.computed(()=>!!p.dataset&&p.dataset.length),g=e.ref(n.createUid()),de=e.ref(null),N=e.ref(!1),_=e.ref(""),m=e.ref(null),E=e.ref(0),C=e.ref(null),I=e.ref(null),A=e.ref(null),z=e.ref(null),F=e.ref(null),R=e.ref(0),q=e.ref(0),M=e.ref(0),t=e.computed({get:()=>H(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:D}=_e.useUserOptionState({config:t.value}),{svgRef:W}=Ve.useChartAccessibility({config:t.value.style.chart.title});function H(){const l=re.useNestedProp({userConfig:p.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=H(),P.value=!t.value.userOptions.showOnChartHover,G(),R.value+=1,q.value+=1,M.value+=1,h.value.showTable=t.value.table.show,h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const T=e.ref(null);e.onMounted(()=>{G()});function G(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):p.dataset.forEach((l,a)=>{l.values.length||n.error({componentName:"VueUiRings",type:"dataset"}),n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=oe.throttle(()=>{const{width:a,height:o}=oe.useResponsive({chart:C.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:z.value,noTitle:F.value});requestAnimationFrame(()=>{s.value.width=a,s.value.height=o})});T.value=new ResizeObserver(l),T.value.observe(C.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:j,isImaging:X,generatePdf:Y,generateImage:J}=ae.usePrinter({elementId:`rings_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings",options:t.value.userOptions.print}),ve=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),K=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),pe=e.computed(()=>Math.min(s.value.height,s.value.width)),he=ue,d=e.ref([]);function V(l){d.value.includes(l)?d.value=d.value.filter(a=>a!==l):d.value.push(l),he("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const fe=e.computed(()=>Math.max(...x.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l)));function Q(l){return l/fe.value}const x=e.computed(()=>p.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=n.sanitizeArray(l).reduce((v,w)=>v+w,0);return{name:a,color:o||n.convertColorToHex(o)||K.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/p.dataset.map(v=>(v.values||[]).reduce((w,ke)=>w+ke,0)).reduce((v,w)=>v+w,0),uid:n.createUid(),absoluteIndex:r}})),Z=e.computed(()=>x.value.map(l=>({...l,shape:"circle",opacity:d.value.includes(l.uid)?.5:1,segregate:()=>V(l.uid),isSegregated:d.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ge=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>x.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>x.value.filter(l=>!d.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r,absoluteIndex:u},v)=>({absoluteIndex:u,uid:r,name:l,color:o||n.convertColorToHex(o)||K.value[v]||n.palette[v]||n.palette[v%n.palette.length],value:a,proportion:Q(a),percentage:a/f.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*Q(a)})).toSorted((l,a)=>a.value-l.value));function me(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const i=e.computed(()=>pe.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ye(l,a){if(d.value.length===p.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}" />${ce.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${g.value}_${a.absoluteIndex})" />`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
2
- </b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${n.dataLabel({v:o.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${n.dataLabel({v:o.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}N.value=!0}const y=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=y.value.head.map((u,v)=>[{color:u.color,name:u.name},n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.value.body[v],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(y.value.body[v]/f.value)?"-":(y.value.body[v]/f.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:r}});function ee(){e.nextTick(()=>{const l=y.value.head.map((r,u)=>[[r.name],[y.value.body[u]],[isNaN(y.value.body[u]/f.value)?"-":y.value.body[u]/f.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const k=e.ref(!1);function be(l){k.value=l,E.value+=1}function te(){h.value.showTable=!h.value.showTable}function le(){h.value.showTooltip=!h.value.showTooltip}const B=e.ref(!1);function O(){B.value=!B.value}return se({getData:me,generatePdf:Y,generateCsv:ee,generateImage:J,toggleTable:te,toggleTooltip:le,toggleAnnotator:O}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:C,class:e.normalizeClass(`vue-ui-rings ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${g.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,N.value=!1,e.unref(U)(!1)}),onMouseenter:a[4]||(a[4]=()=>e.unref(U)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be.PenAndPaper,{key:0,svgRef:e.unref(W),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:O},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:I,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(D)||e.unref(P))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:de,key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(X),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:h.value.showTooltip,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:be,onGeneratePdf:e.unref(Y),onGenerateCsv:ee,onGenerateImage:e.unref(J),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(D)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:W,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:s.value.width<=0?10:s.value.width,height:s.value.height<=0?10:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(o.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Fe)],8,Ae))),256))]),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:o.absoluteIndex,patternId:`pattern_${g.value}_${o.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,qe),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${g.value}_${r})`:o.color},null,14,Me),l.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:`url(#pattern_${g.value}_${o.absoluteIndex})`},null,14,Ue)):e.createCommentVNode("",!0),e.createElementVNode("circle",{stroke:"none",cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ye(r,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,N.value=!1})},null,40,De)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ne.Legend,{key:`legend_${M.value}`,legendSet:Z.value,config:ge.value,onClickMarker:a[1]||(a[1]=({legend:o})=>V(o.uid))},e.createSlots({item:e.withCtx(({legend:o,index:r})=>[e.createElementVNode("div",{onClick:u=>V(o.uid),style:e.normalizeStyle(`opacity:${d.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:r}))+" ",1),d.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",je," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ge," ("+e.toDisplayString(isNaN(o.value/f.value)?"-":e.unref(n.dataLabel)({v:o.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,He)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:o,index:r})=>[e.createVNode(Pe._sfc_main,{shape:o.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${g.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:z,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(we._sfc_main,{show:h.value.showTooltip&&N.value&&d.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:_.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),$.value?(e.openBlock(),e.createBlock(xe.default,{key:8,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Xe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Oe))}},Je=Le._export_sfc(Ye,[["__scopeId","data-v-be9fc972"]]);exports.default=Je;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BeJeDy5m.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-BgVFZwZZ.cjs"),_e=require("./usePrinter-Bz_kd3vb.cjs"),Oe=require("./Tooltip-B8E9uCVm.cjs"),De=require("./Legend-mrAy7yUC.cjs"),Ce=require("./Shape-x7U3IhoM.cjs"),Fe=require("./DataTable-ByOfBGEi.cjs"),We=require("./vue-ui-skeleton-KW-jcPRN.cjs"),qe=require("./vue-ui-accordion-CZBJSHT_.cjs"),Ne=require("./useNestedProp-CF-iHhIC.cjs"),Ie=require("./PackageVersion-By81XV8X.cjs"),Xe=require("./PenAndPaper-DNbX5hR8.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],Ge=["xmlns","viewBox"],He=["width","height"],Je={key:1},Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:2},et=["points","fill","stroke-width","stroke-dasharray","stroke"],tt={key:0},lt=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],at={key:1},ot={key:3},st=["id"],rt=["stop-color"],nt=["stop-color"],ut=["id"],it=["stop-color"],ct=["stop-color"],vt=["x","y","width","height","fill","stroke","stroke-width","rx"],yt=["x","y","height","width","fill","stroke","stroke-width","rx"],dt={key:0},pt=["d","stroke","stroke-width"],ht=["d","stroke","stroke-width"],ft=["d","stroke","stroke-width"],mt=["d","stroke","stroke-width"],gt={key:4,style:{"pointer-events":"none !important"}},kt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],xt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],bt=["x","y","font-size","fill","font-weight","text-anchor"],wt=["x","y","font-size","fill","font-weight"],Bt=["cx","cy","r","fill","stroke","stroke-width"],_t=["cx","cy","r","fill","stroke","stroke-width"],Ct=["x","y","font-size","fill","font-weight","text-anchor"],Nt={key:5},St=["x","y","font-size","fill"],Mt=["x","y","font-size","fill"],$t=["id","transform","font-size","font-weight","fill"],Et={key:6},zt=["x","y","font-size","fill"],Lt=["x","y","font-size","fill"],Vt=["font-size","font-weight","fill","x","y"],At=["id"],Tt=["x","y","width","height"],Pt={key:7},Ot=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],Dt=["x","y","fill","font-size","font-weight"],Ft={key:5,class:"vue-data-ui-watermark"},Wt=["onClick"],qt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},It={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},Xt={key:0},Rt=["innerHTML"],Yt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Se,{expose:Me}){const{vue_ui_scatter:$e}=s.useConfig(),N=Se,P=e.computed(()=>!!N.dataset&&N.dataset.length),k=e.ref(s.createUid()),Ee=e.ref(null),I=e.ref(!1),X=e.ref(""),K=e.ref(0),T=e.ref(null),Q=e.ref(null),Z=e.ref(null),ee=e.ref(null),te=e.ref(null),le=e.ref(0),ae=e.ref(0),oe=e.ref(0),t=e.computed({get:()=>ue(),set:l=>l}),{userOptionsVisible:R,setUserOptionsVisibility:se,keepUserOptionState:re}=Re.useUserOptionState({config:t.value}),{svgRef:ne}=Ye.useChartAccessibility({config:t.value.style.title});function ue(){const l=Ne.useNestedProp({userConfig:N.config,defaultConfig:$e});return l.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_scatter[l.theme]||N.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>N.config,l=>{t.value=ue(),R.value=!t.value.userOptions.showOnChartHover,ie(),le.value+=1,ae.value+=1,oe.value+=1,B.value.showTable=t.value.table.show,B.value.showTooltip=t.value.style.tooltip.show},{deep:!0});const O=e.ref(null);e.onMounted(()=>{ie()});function ie(){if(s.objectIsEmpty(N.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const l=Be.throttle(()=>{const{width:n,height:a}=Be.useResponsive({chart:T.value,title:t.value.style.title.text?Q.value:null,legend:t.value.style.legend.show?Z.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{h.value.width=n,h.value.height=a})});O.value=new ResizeObserver(l),O.value.observe(T.value.parentNode)}}e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});const{isPrinting:ce,isImaging:ve,generatePdf:ye,generateImage:de}=_e.usePrinter({elementId:`vue-ui-scatter_${k.value}`,fileName:t.value.style.title.text||"vue-ui-scatter",options:t.value.userOptions.print}),ze=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),pe=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),h=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),D=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),u=e.computed(()=>({top:t.value.style.layout.padding.top+D.value,right:h.value.width-t.value.style.layout.padding.right-D.value,bottom:h.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-D.value,width:h.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-D.value})),v=e.computed(()=>{N.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(f=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:f,index:i})}),o.values&&o.values.forEach((f,E)=>{s.getMissingDatasetAttributes({datasetObject:f,requiredAttributes:["x","y"]}).forEach(A=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${A}`,index:`${i} - ${E}`})})})});const l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),n=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:l>=0?0:l,xMax:n,yMin:a>=0?0:a,yMax:r}}),y=e.computed(()=>({x:u.value.left+Math.abs(v.value.xMin)/(v.value.xMax+Math.abs(v.value.xMin))*u.value.width,y:u.value.bottom-Math.abs(v.value.yMin)/(v.value.yMax+Math.abs(v.value.yMin))*u.value.height})),$=e.computed(()=>N.dataset.map((l,n)=>{const a=`cluster_${k.value}_${n}`;return{...l,values:s.largestTriangleThreeBuckets({data:l.values,threshold:t.value.downsample.threshold}),id:a,color:l.color?l.color:pe.value[n]||s.palette[n]||s.palette[n%s.palette.length],opacity:p.value.includes(a)?.5:1,shape:l.shape??"circle",segregate:()=>ke(a),isSegregated:p.value.includes(a)}})),Le=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),Y=e.computed(()=>$.value.map((l,n)=>({...l,plots:l.values.map(a=>({x:u.value.left+(a.x+Math.abs(v.value.xMin))/(v.value.xMax+Math.abs(v.value.xMin))*u.value.width,y:u.value.bottom-(a.y+Math.abs(v.value.yMin))/(v.value.yMax+Math.abs(v.value.yMin))*u.value.height,v:{...a,name:a.name||""},clusterName:l.name,color:l.color?l.color:pe.value[n]||s.palette[n]||s.palette[n%s.palette.length],id:`plot_${k.value}_${Math.random()}`,weight:a.weight??t.value.style.layout.plots.radius}))})).filter(l=>!p.value.includes(l.id))),x=e.computed(()=>Y.value.map(l=>{const n=l.plots.reduce((d,z)=>d+z.x,0)/l.plots.length,a=l.plots.reduce((d,z)=>d+z.y,0)/l.plots.length;let r=0,o=0,i=0;for(const d of l.plots)r+=(d.x-n)*(d.y-a),o+=(d.x-n)**2,i+=(d.y-a)**2;const f=r/Math.sqrt(o*i),E=f*(Math.sqrt(i)/Math.sqrt(o)),A=a-E*n,C={x1:u.value.left,x2:u.value.right,y1:E*u.value.left+A,y2:E*u.value.right+A,coefficient:f},g=(C.y2-C.y1)/(C.x2-C.x1),w=C.y1-g*C.x1,S=Math.min(h.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(u.value.top-w)/g)),q={x:S,y:g*S+w<=t.value.style.layout.padding.top?u.value.top:g*S+w};return{...l,correlation:C,label:q,plots:l.plots.map(d=>{const z=(d.x+g*d.y-g*w)/(1+Math.pow(g,2)),G=(g*d.x+Math.pow(g,2)*d.y+w)/(1+Math.pow(g,2)),m=Math.sqrt(Math.pow(d.x-z,2)+Math.pow(d.y-G,2));return{...d,deviation:m,shape:l.shape,color:l.color}})}})),he=e.computed(()=>Math.max(...x.value.flatMap(l=>l.plots.map(n=>Math.abs(n.deviation)))));function Ve(){return x.value}function fe(l,n){const a=Array.isArray(l)?l.flatMap(m=>m.plots.map(L=>({x:L.x,y:L.y}))):l.plots.map(m=>({x:m.x,y:m.y}));let r=1/0,o=-1/0,i=1/0,f=-1/0;a.forEach(({x:m,y:L})=>{r=Math.min(r,m),o=Math.max(o,m),i=Math.min(i,L),f=Math.max(f,L)});const E=o-r,A=f-i,C=E/n,g=A/n,w=Array(n).fill(0),S=Array(n).fill(0);a.forEach(({x:m,y:L})=>{const H=Math.floor((m-r)/C),J=Math.floor((L-i)/g);w[H]||(w[H]=0),S[J]||(S[J]=0),w[H]+=1,S[J]+=1});const q=[],d=[];for(let m=0;m<n;m+=1)q.push(r+(m+.5)*C),d.push(i+(m+.5)*g);const z=Math.max(...w),G=Math.max(...S);return{x:w,y:S,avgX:q,avgY:d,maxX:z,maxY:G}}const M=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>fe(Y.value,M.value)),Ae=e.computed(()=>{const l=u.value.top-t.value.style.layout.marginalBars.offset,n=u.value.right+t.value.style.layout.marginalBars.offset;return Y.value.map(a=>{const r=fe(a,M.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:l-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPathVertical(r.avgY.map((o,i)=>({y:o,x:n+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:a.color,id:a.id}})}),_=e.ref(void 0),c=e.ref(null),j=e.ref(null);function me(l,n){_.value=l.id,c.value=l;let a="";j.value={datapoint:l,seriesIndex:n,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}))?X.value=r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}):(l.clusterName&&(a+=`<div style="display:flex;gap:3px;align-items:center">${l.clusterName}</div>`),l.v.name&&(a+=`<div>${l.v.name}</div>`),a+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(l.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,l.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(l.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,l.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:l.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,a+="</div>",X.value=`<div>${a}</div>`),I.value=!0}function ge(){I.value=!1,_.value=void 0,c.value=null}const p=e.ref([]);function ke(l){p.value.includes(l)?p.value=p.value.filter(n=>n!==l):p.value.length<N.dataset.length-1&&p.value.push(l)}function xe(){e.nextTick(()=>{const l=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,f)=>i+f,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,f)=>i+f,0)/o.plots.length]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),r=s.createCsvContent(a);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const F=e.computed(()=>{const l=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:n,config:a,colNames:l}}),V=e.ref(!1);function Te(l){V.value=l,K.value+=1}function be(){B.value.showTable=!B.value.showTable}function we(){B.value.showTooltip=!B.value.showTooltip}const W=e.ref(!1);function U(){W.value=!W.value}return Me({getData:Ve,generatePdf:ye,generateCsv:xe,generateImage:de,toggleTable:be,toggleTooltip:we,toggleAnnotator:U}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:T,id:`vue-ui-scatter_${k.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[2]||(n[2]=()=>e.unref(se)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(se)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Xe.PenAndPaper,{key:0,svgRef:e.unref(ne),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:W.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ze.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${le.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(re)||e.unref(R))?(e.openBlock(),e.createBlock(_e.UserOptions,{ref_key:"details",ref:Ee,key:`user_options_${K.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ve),isPrinting:e.unref(ce),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:B.value.showTooltip,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:W.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(ye),onGenerateCsv:xe,onGenerateImage:e.unref(de),onToggleTable:be,onToggleTooltip:we,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ne,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${h.value.width<=0?10:h.value.width} ${h.value.height<=0?10:h.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:h.value.width<=0?10:h.value.width,height:h.value.height<=0?10:h.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,He)):e.createCommentVNode("",!0),t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("line",{x1:y.value.x,x2:y.value.x,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ke),e.createElementVNode("line",{x1:u.value.left,x2:u.value.right,y1:y.value.y,y2:y.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Qe)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:a.plots}),fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:a.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,et)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[!a.shape||a.shape==="circle"?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:_.value&&_.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:f=>me(o,r),onMouseleave:ge,style:e.normalizeStyle(`opacity:${_.value&&_.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/he.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,lt))),256))])):(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createBlock(Ce._sfc_main,{plot:{x:o.x,y:o.y},radius:_.value&&_.value===o.id?o.weight*2:o.weight,shape:a.shape,color:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:f=>me(o,r),onMouseleave:ge,style:e.normalizeStyle(`opacity:${_.value&&_.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/he.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",ot,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${k.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,rt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,nt)],8,st),e.createElementVNode("linearGradient",{id:`marginal_y_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,it),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,ct)],8,ut)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-u.value.width/M.value/2,y:u.value.top-t.value.style.layout.marginalBars.offset-a/b.value.maxX*t.value.style.layout.marginalBars.size,width:u.value.width/M.value<=0?1e-4:u.value.width/M.value,height:a/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,vt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:u.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-u.value.height/M.value/2,height:u.value.height/M.value<=0?1e-4:u.value.height/M.value,width:a/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,yt)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,pt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${a.dX}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ht)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${a.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ft)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${a.dY}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,mt))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",gt,[e.createElementVNode("line",{x1:y.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,kt),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:y.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,xt),e.createElementVNode("text",{x:y.value.x+(c.value.x>y.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>y.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,bt),e.createElementVNode("text",{x:c.value.x,y:y.value.y+(c.value.y>y.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,wt),e.createElementVNode("circle",{cx:y.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,Bt),e.createElementVNode("circle",{cx:c.value.x,cy:y.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,_t),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<y.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<u.value.left+100?"start":c.value.x>u.value.right-100?"end":c.value.x>y.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,Ct)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Nt,[e.createElementVNode("text",{x:u.value.left-5,y:y.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(v.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(v.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,St),e.createElementVNode("text",{x:u.value.right+3,y:y.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(v.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(v.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,Mt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${k.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${u.value.top+u.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,$t)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Et,[e.createElementVNode("text",{x:y.value.x,y:u.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(v.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(v.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,zt),e.createElementVNode("text",{x:y.value.x,y:u.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(v.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(v.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,Lt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:u.value.left+u.value.width/2,y:u.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,Vt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${k.value}`},[e.createElementVNode("rect",{x:u.value.left,y:u.value.top,width:u.value.width<=0?1e-4:u.value.width,height:u.value.height<=0?1e-4:u.value.height},null,8,Tt)],8,At),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.correlation.x1,x2:a.correlation.x2,y1:a.correlation.y1,y2:a.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:a.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${k.value})`},null,8,Ot))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:a.label.x,y:a.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?a.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,Dt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,Ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ce)||e.unref(ve)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:6,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Z},[t.value.style.legend.show?(e.openBlock(),e.createBlock(De.Legend,{key:`legend_${oe.value}`,legendSet:$.value,config:Le.value,onClickMarker:n[0]||(n[0]=({legend:a})=>ke(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Wt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Oe._sfc_main,{show:B.value.showTooltip&&I.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:T.value,content:X.value,isFullscreen:V.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",qt,[(e.openBlock(),e.createElementBlock("svg",It,[e.createVNode(Ce._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),P.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${ae.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=a=>B.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[a.shape?(e.openBlock(),e.createElementBlock("div",Xt,[e.createElementVNode("span",null,e.toDisplayString(a.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:a},null,8,Rt))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},jt=je._export_sfc(Yt,[["__scopeId","data-v-e97afbcb"]]);exports.default=jt;
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BeJeDy5m.cjs"),Te=require("./useNestedProp-CF-iHhIC.cjs"),Me=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./usePrinter-Bz_kd3vb.cjs"),ot=require("./Slicer-Ct66sqV1.cjs"),rt=require("./Tooltip-B8E9uCVm.cjs"),st=require("./Title-BgVFZwZZ.cjs"),nt=require("./Legend-mrAy7yUC.cjs"),it=require("./vue-ui-accordion-CZBJSHT_.cjs"),ut=require("./DataTable-ByOfBGEi.cjs"),ct=require("./vue-ui-skeleton-KW-jcPRN.cjs"),dt=require("./PackageVersion-By81XV8X.cjs"),ht=require("./PenAndPaper-DNbX5hR8.cjs"),vt=require("./useUserOptionState-BgepsfED.cjs"),mt=require("./Shape-x7U3IhoM.cjs"),gt=require("./useChartAccessibility-Cm7nkzTG.cjs"),yt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),bt=["id"],ft=["xmlns","viewBox"],pt=["x","y","width","height"],kt={key:1},xt=["id"],wt=["stop-color"],Bt=["stop-color"],Ct=["stop-color"],St=["x1","x2","y1","y2","stroke"],zt=["x1","x2","y1","y2","stroke"],Lt=["x1","x2","y1","y2","stroke"],_t=["x1","x2","y1","y2","stroke"],Et={key:0},Nt=["x","y","height","rx","width","fill","stroke","stroke-width"],$t={key:0},Vt=["x","y","height","rx","width","fill","stroke","stroke-width"],Tt=["x","y","width","rx","height","fill","stroke","stroke-width"],Mt={key:0},Pt=["x","y","width","rx","height","fill","stroke","stroke-width"],Ft=["x1","x2","y1","y2","stroke","stroke-width"],It=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["x","y","font-size","fill","font-weight"],Ot=["transform","font-size","fill","font-weight"],Dt=["x","y","font-size","fill","font-weight"],At={key:0},qt=["x","y","font-size","font-weight","fill"],Ht=["x","y","font-size","fill","font-weight"],Ut={key:0},Wt=["x","y","font-size","font-weight","fill"],Yt=["x1","x2","y1","y2","stroke"],Xt=["x","y","font-size","font-weight","fill"],Gt=["x1","x2","y1","y2","stroke"],Jt=["font-size","font-weight","fill","text-anchor","transform"],Zt={key:0},Kt={key:1},Qt=["text-anchor","font-size","font-weight","fill","transform","onClick"],jt={key:0},ea={key:1},ta=["font-size","font-weight","fill","x","y","onClick"],aa=["x","y","width","height","onClick","onMouseenter","fill"],la=["x","y","width","height","onClick","onMouseenter","fill"],oa={key:4,class:"vue-data-ui-watermark"},ra=["onClick"],sa=["innerHTML"],na={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend","selectTimeLabel"],setup(G,{expose:Fe,emit:Ie}){const{vue_ui_stackbar:Re}=u.useConfig(),Oe=e.useSlots(),h=G,J=Ie,T=e.computed({get(){return!!h.dataset&&h.dataset.length},set(l){return l}}),P=e.ref(null),C=e.ref(u.createUid()),D=e.ref(!1),Z=e.ref(null),K=e.ref(""),f=e.ref([]),te=e.ref(0),ae=e.ref(null),le=e.ref(null),oe=e.ref(null),re=e.ref(null),se=e.ref(0),A=e.ref(!1),F=e.ref(null),_=e.ref(!1),De=e.ref(0),Ae=e.ref(0),qe=e.ref(0),M=e.ref(null);e.onMounted(()=>{j()});const t=e.computed({get:()=>ce(),set:l=>l}),{userOptionsVisible:Q,setUserOptionsVisibility:ne,keepUserOptionState:ie}=vt.useUserOptionState({config:t.value}),{svgRef:ue}=gt.useChartAccessibility({config:t.value.style.chart.title});function ce(){const l=Te.useNestedProp({userConfig:h.config,defaultConfig:Re});let r={};return l.theme?r={...Te.useNestedProp({userConfig:u.themes.vue_ui_stackbar[l.theme]||h.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:r=l,h.config&&u.hasDeepProperty(h.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=h.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,h.config&&u.hasDeepProperty(h.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=h.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,h.config&&u.hasDeepProperty(h.config,"style.chart.zoom.startIndex")?r.style.chart.zoom.startIndex=h.config.style.chart.zoom.startIndex:r.style.chart.zoom.startIndex=null,h.config&&u.hasDeepProperty(h.config,"style.chart.zoom.endIndex")?r.style.chart.zoom.endIndex=h.config.style.chart.zoom.endIndex:r.style.chart.zoom.endIndex=null,r}e.watch(()=>h.config,l=>{t.value=ce(),Q.value=!t.value.userOptions.showOnChartHover,j(),De.value+=1,Ae.value+=1,qe.value+=1,y.value.dataLabels.show=t.value.style.chart.bars.dataLabels.show,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>h.dataset,l=>{be()},{deep:!0});const y=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:de,isImaging:he,generatePdf:ve,generateImage:me}=Pe.usePrinter({elementId:`stackbar_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar",options:t.value.userOptions.print}),q=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),He=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),ge=e.ref(null),ye=e.ref(null);e.onMounted(()=>{j()});function j(){if(u.objectIsEmpty(h.dataset)?u.error({componentName:"VueUiStackbar",type:"dataset"}):h.dataset.forEach((l,r)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{T.value=!1,u.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{_.value=!0},10),t.value.responsive){const l=Me.throttle(()=>{_.value=!1;const{width:r,height:a}=Me.useResponsive({chart:P.value,title:t.value.style.chart.title.text?ae.value:null,legend:t.value.style.chart.legend.show?le.value:null,slicer:t.value.style.chart.zoom.show&&z.value>1?oe.value:null,source:re.value});requestAnimationFrame(()=>{q.value.width=r,q.value.height=a,clearTimeout(ye.value),ye.value=setTimeout(()=>{_.value=!0},10)})});ge.value=new ResizeObserver(l),ge.value.observe(P.value.parentNode)}fe()}const s=e.computed(()=>{const{height:l,width:r}=q.value,{right:a}=q.value.paddingRatio,o=t.value.style.chart.padding.top,i=r-r*a,n=l-t.value.style.chart.padding.bottom,b=t.value.style.chart.padding.left,E=r-b-r*a,N=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:i,bottom:n,left:b,width:E,height:N<0?0:N}}),S=e.computed(()=>h.dataset.map((l,r)=>{const a=u.convertColorToHex(l.color)||He.value[r]||u.palette[r]||u.palette[r%u.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:u.createUid(),color:a}})),z=e.computed(()=>Math.max(...S.value.filter(l=>!f.value.includes(l.id)).map(l=>l.series.length))),c=e.ref({start:0,end:Math.max(...h.dataset.map(l=>l.series.length))});function be(){fe()}async function fe(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&M.value?(t.value.style.chart.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),M.value&&M.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),M.value&&M.value.setEndValue(Ue(t.value.style.chart.zoom.endIndex+1)))):(c.value={start:0,end:Math.max(...h.dataset.map(l=>l.series.length))},se.value+=1)}function Ue(l){const r=Math.max(...h.dataset.map(a=>a.series.length));return l>r?r:l<0||t.value.style.chart.zoom.startIndex!==null&&l<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:l}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(c.value.end-c.value.start):l=s.value.height/(c.value.end-c.value.start),l<=0?0:l}),I=e.computed(()=>u.sumSeries(S.value.filter(l=>!f.value.includes(l.id))).slice(c.value.start,c.value.end)),We=e.computed(()=>u.sumSeries(S.value.filter(l=>!f.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(c.value.start,c.value.end)),H=e.computed(()=>{const l=S.value.filter(r=>!f.value.includes(r.id));return{positive:u.sumSeries(l.map(r=>({...r,series:r.series.slice(c.value.start,c.value.end).map(a=>a>=0?a:0)}))),negative:u.sumSeries(l.map(r=>({...r,series:r.series.slice(c.value.start,c.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...H.value.positive),r=Math.min(...H.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?u.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):u.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(i=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((i+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((i+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:i}))}),L=e.computed(()=>{const l=[];for(let r=0;r<z.value;r+=1)l.push({text:t.value.style.chart.grid.x.timeLabels.values[r]||String(r),absoluteIndex:r});return l.slice(c.value.start,c.value.end)}),g=e.computed(()=>{if(!T.value)return[];let l=Array(z.value).fill(0),r=Array(z.value).fill(0),a=Array(z.value).fill(0),o=Array(z.value).fill(0);const i=Math.max(...H.value.positive)||0,n=Math.min(...H.value.negative),b=[-1/0,1/0,NaN,void 0,null].includes(n)?0:n,E=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?u.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:b>0?0:b,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:i<0?0:i,t.value.style.chart.grid.scale.ticks):u.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:b>0?0:b,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:i<0?0:i,t.value.style.chart.grid.scale.ticks),{min:N,max:R}=E,$=R+(N>=0?0:Math.abs(N))||1,p=s.value.height,X=s.value.width,$e=w.value[0]?w.value[0].zero:s.value.bottom,Ve=w.value[0]?w.value[0].horizontal_zero:s.value.left;return S.value.filter(O=>!f.value.includes(O.id)).map(O=>{const B=O.series.slice(c.value.start,c.value.end),Ze=O.signedSeries.slice(c.value.start,c.value.end),Ke=B.map((v,m)=>s.value.left+d.value*m+d.value*t.value.style.chart.bars.gapRatio/4),Qe=B.map((v,m)=>s.value.top+d.value*m+d.value*t.value.style.chart.bars.gapRatio/4),je=B.map((v,m)=>{const k=t.value.style.chart.bars.distributed?(v||0)/I.value[m]:(v||0)/$;let V,x;return v>0?(x=p*k,V=$e-x-l[m],l[m]+=x):(x=p*k,V=$e+a[m],a[m]+=Math.abs(x)),V}),et=B.map((v,m)=>{const k=t.value.style.chart.bars.distributed?(v||0)/I.value[m]:(v||0)/$;let V,x;return v>0?(x=X*k,V=Ve+r[m],r[m]+=x):(x=X*k,V=Ve-Math.abs(x)-o[m],o[m]+=Math.abs(x)),V}),tt=B.map((v,m)=>{const k=t.value.style.chart.bars.distributed?(v||0)/I.value[m]:(v||0)/$;return v>0?p*k:p*Math.abs(k)}),at=B.map((v,m)=>{const k=t.value.style.chart.bars.distributed?(v||0)/I.value[m]:(v||0)/$;return v>0?X*k:X*Math.abs(k)}),lt=B.map(v=>Math.abs(v)).reduce((v,m)=>v+m,0);return{...O,proportions:B.map((v,m)=>t.value.style.chart.bars.distributed?(v||0)/I.value[m]:(v||0)/lt),series:B,signedSeries:Ze,x:Ke,y:je,height:tt,horizontal_width:at,horizontal_y:Qe,horizontal_x:et}})}),pe=e.computed(()=>We.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function U(l,r,a,o,i){const n=i===-1&&l>=0?-l:l;return u.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,n,u.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:n,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ke(l,r,a,o){return u.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,u.dataLabel({v:isNaN(l)?0:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function xe(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));J("selectDatapoint",{datapoint:r,period:L.value[l]})}function we(l){F.value=l,D.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(i=>({name:i.name,absoluteIndex:i.absoluteIndex,value:i.series[l]===0?0:(i.signedSeries[l]===-1&&i.series[l]>=0?-i.series[l]:i.series[l])||null,proportion:i.proportions[l]||null,color:i.color,id:i.id}));Z.value={datapoint:a,seriesIndex:l,config:t.value,series:g.value};const o=a.map(i=>Math.abs(i.value)).reduce((i,n)=>i+n,0);if(u.isFunction(r)&&u.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))K.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:i,showPercentage:n,borderColor:b,roundingValue:E,roundingPercentage:N}=t.value.style.chart.tooltip;let R="";L.value[l]&&L.value[l].text&&t.value.style.chart.tooltip.showTimeLabel&&(R+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${b};padding-bottom:6px;margin-bottom:3px;">${L.value[l].text}</div>`);const $=[i&&n?"(":"",i&&n?")":""];a.reverse().forEach(p=>{R+=`
2
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
3
- <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${p.id})`:p.color}"/>${Oe.pattern?`<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${C.value}_${p.absoluteIndex})"/>`:""}</svg>
4
- ${p.name}${i||n?":":""} ${i?u.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:p.value,s:t.value.style.chart.bars.dataLabels.suffix,r:E}):""} ${$[0]}${n?u.dataLabel({v:isNaN(p.value/o)?0:Math.abs(p.value)/o*100,s:"%",r:N}):""}${$[1]}
5
- </div>
6
- `}),K.value=`<div>${R}</div>`}}function Ye(l){A.value=l,te.value+=1}function Be(){y.value.showTable=!y.value.showTable}function Ce(){y.value.dataLabels.show=!y.value.dataLabels.show}function Se(){y.value.showTooltip=!y.value.showTooltip}function Xe(){return g.value}const ze=e.computed(()=>{if(g.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=g.value.map(({name:a,color:o})=>({label:a,color:o})),r=[];for(let a=c.value.start;a<c.value.end;a+=1){const o=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];S.value.forEach(i=>{o.push(Number((i.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),r.push(o)}return{head:l,body:r}});function Le(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=["",...ze.value.head.map(n=>n.label)],a=ze.value.body,o=l.concat([r]).concat(a),i=u.createCsvContent(o);u.downloadCsv({csvContent:i,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const W=e.computed(()=>{const l=[""].concat(g.value.map(i=>i.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let r=[];for(let i=0;i<z.value;i+=1){const n=g.value.map(b=>b.series[i]??0).reduce((b,E)=>b+E,0);r.push([t.value.style.chart.grid.x.timeLabels.values.slice(c.value.start,c.value.end)[i]??i+1].concat(g.value.map(b=>(b.series[i]??0).toFixed(t.value.table.td.roundingValue))).concat((n??0).toFixed(t.value.table.td.roundingValue)))}const a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.period].concat(g.value.map(i=>i.name)).concat(t.value.table.columnNames.total);return{head:l,body:r.slice(0,c.value.end-c.value.start),config:a,colNames:o}});function Ge(l,r){if(J("selectLegend",g.value.find(a=>a.absoluteIndex===l)),f.value.includes(r.id))f.value=f.value.filter(a=>a!==r.id);else{if(f.value.length===S.value.length-1)return;f.value.push(r.id)}}const _e=e.computed(()=>S.value.map((l,r)=>({...l,shape:"square"})).map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>Ge(l.absoluteIndex,l),isSegregated:f.value.includes(l.id)}))),Je=e.computed(()=>({cy:"stackbar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),Y=e.ref(!1);function ee(){Y.value=!Y.value}function Ee(l,r){const a=JSON.parse(JSON.stringify(g.value)).map(o=>({name:o.name,value:o.series[r]===0?0:(o.signedSeries[r]===-1&&o.series[r]>=0?-o.series[r]:o.series[r])||null,proportion:o.proportions[r]||null,color:o.color,id:o.id}));J("selectTimeLabel",{datapoint:a,absoluteIndex:l.absoluteIndex,label:l.text})}function Ne(l,r){return t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?t.value.style.chart.bars.dataLabels.hideEmptyPercentages?r>0:!0:t.value.style.chart.bars.dataLabels.hideEmptyValues?l!==0:!0}return Fe({getData:Xe,generatePdf:ve,generateCsv:Le,generateImage:me,toggleTable:Be,toggleLabels:Ce,toggleTooltip:Se,toggleAnnotator:ee}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${C.value}`,ref_key:"stackbarChart",ref:P,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":A.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:r[6]||(r[6]=()=>e.unref(ne)(!0)),onMouseleave:r[7]||(r[7]=()=>e.unref(ne)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ht.PenAndPaper,{key:0,svgRef:e.unref(ue),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:ee},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:ae,style:"width:100%;background:transparent;padding-bottom:24px"},[e.createVNode(st._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value&&(e.unref(ie)||e.unref(Q))?(e.openBlock(),e.createBlock(Pe.UserOptions,{ref:"details",key:`user_option_${te.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(de),isImaging:e.unref(he),uid:C.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,chartElement:P.value,position:t.value.userOptions.position,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:Ye,onGeneratePdf:e.unref(ve),onGenerateCsv:Le,onGenerateImage:e.unref(me),onToggleTable:Be,onToggleLabels:Ce,onToggleTooltip:Se,onToggleAnnotator:ee,style:e.normalizeStyle({visibility:e.unref(ie)?e.unref(Q)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:o})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:o})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:ue,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.chartWidth<=0?10:s.value.chartWidth} ${s.value.chartHeight<=0?10:s.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(dt._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width<=0?10:s.value.width,height:s.value.height<=0?10:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,pt)):e.createCommentVNode("",!0),t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,wt),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(u.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,Bt),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ct)],8,xt))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,St))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(c.value.end-c.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:s.value.top+d.value*o,y2:s.value.top+d.value*o,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,zt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(c.value.end-c.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left+d.value*o,x2:s.value.left+d.value*o,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,Lt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,_t))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[l.$slots.pattern?(e.openBlock(),e.createElementBlock("defs",Et,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${C.value}_${a.absoluteIndex}`}),void 0,!0)])):e.createCommentVNode("",!0),t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(i,n)=>(e.openBlock(),e.createElementBlock("rect",{x:i,y:a.y[n]<0?0:a.y[n],height:a.height[n]<0?1e-4:a.height[n]||0,rx:t.value.style.chart.bars.borderRadius>a.height[n]/2?(a.height[n]<0?0:a.height[n])/2:t.value.style.chart.bars.borderRadius,width:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":_.value})},null,10,Nt))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(i,n)=>(e.openBlock(),e.createElementBlock("rect",{x:i,y:a.y[n]<0?0:a.y[n],height:a.height[n]<0?1e-4:a.height[n]||0,rx:t.value.style.chart.bars.borderRadius>a.height[n]/2?(a.height[n]<0?0:a.height[n])/2:t.value.style.chart.bars.borderRadius,width:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:`url(#pattern_${C.value}_${a.absoluteIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":_.value})},null,10,Vt))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(i,n)=>(e.openBlock(),e.createElementBlock("rect",{x:e.unref(u.forceValidValue)(i,s.value.left),y:a.horizontal_y[n]<0?0:a.horizontal_y[n],width:e.unref(u.forceValidValue)(a.horizontal_width[n]<0?1e-4:a.horizontal_width[n]),rx:t.value.style.chart.bars.borderRadius>a.height[n]/2?(a.height[n]<0?0:a.height[n])/2:t.value.style.chart.bars.borderRadius,height:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":_.value})},null,10,Tt))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(i,n)=>(e.openBlock(),e.createElementBlock("rect",{x:e.unref(u.forceValidValue)(i,s.value.left),y:a.horizontal_y[n]<0?0:a.horizontal_y[n],width:e.unref(u.forceValidValue)(a.horizontal_width[n]<0?1e-4:a.horizontal_width[n]),rx:t.value.style.chart.bars.borderRadius>a.height[n]/2?(a.height[n]<0?0:a.height[n])/2:t.value.style.chart.bars.borderRadius,height:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:`url(#pattern_${C.value}_${a.absoluteIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":_.value})},null,10,Pt))),256))])):e.createCommentVNode("",!0)],64))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:6,x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ft)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:7,x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,It)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:8,x:s.value.left+s.value.width/2,y:s.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,Rt)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:9,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${s.value.top+s.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,Ot)):e.createCommentVNode("",!0),y.value.dataLabels.show&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(i,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[Ne(a.series[n],a.proportions[n])?(e.openBlock(),e.createElementBlock("text",{key:0,x:i+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[n]+a.height[n]/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(u.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ke(a.proportions[n]*100,a,o,n):U(a.series[n],a,o,n,a.signedSeries[n])),9,Dt)):e.createCommentVNode("",!0)],64))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.chart.bars.dataLabels.hideEmptyValues||a.value!==0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.left+d.value*o+d.value/2,y:s.value.top-t.value.style.chart.bars.totalValues.fontSize/3,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(U(a.value,a,o,a.sign)),9,qt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),y.value.dataLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(i,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[Ne(a.series[n],a.proportions[n])?(e.openBlock(),e.createElementBlock("text",{key:0,x:i+(a.horizontal_width[n]<0?1e-4:a.horizontal_width[n])/2,y:a.horizontal_y[n]+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(u.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ke(a.proportions[n]*100,a,o,n):U(a.series[n],a,o,n,a.signedSeries[n])),9,Ht)):e.createCommentVNode("",!0)],64))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",Ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.chart.bars.dataLabels.hideEmptyValues||a.value!==0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.right+t.value.style.chart.bars.totalValues.fontSize/3,y:s.value.top+d.value*o+d.value/2,"text-anchor":"start","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(U(a.value,a,o,a.sign)),9,Wt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,Yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,Xt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:13},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.bottom,y2:s.value.bottom+6,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,Gt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle",transform:`translate(${a.horizontal_x}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,Jt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:14},[l.$slots["time-label"]?(e.openBlock(),e.createElementBlock("g",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.renderSlot(l.$slots,"time-label",e.mergeProps({ref_for:!0},{x:s.value.left+d.value*o+d.value/2,y:s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY,fontSize:t.value.style.chart.grid.x.timeLabels.fontSize,fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${s.value.left+d.value*o+d.value/2}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`,absoluteIndex:a.absoluteIndex,content:a.text,textAnchor:t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle",show:!0}),void 0,!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${s.value.left+d.value*o+d.value/2}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`,style:{cursor:"pointer"},onClick:()=>Ee(a,o)},e.toDisplayString(a.text),9,Qt))),256))]))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:15},[l.$slots["time-label"]?(e.openBlock(),e.createElementBlock("g",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.renderSlot(l.$slots,"time-label",e.mergeProps({ref_for:!0},{x:s.value.left-8,y:s.value.top+d.value*o+d.value/2+t.value.style.chart.grid.y.axisLabels.fontSize/3,fontSize:t.value.style.chart.grid.x.timeLabels.fontSize,fill:t.value.style.chart.grid.x.timeLabels.color,transform:null,absoluteIndex:a.absoluteIndex,content:a.text,textAnchor:"end",show:!0}),void 0,!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",ea,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"end","font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,x:s.value.left-8,y:s.value.top+d.value*o+d.value/2+t.value.style.chart.grid.y.axisLabels.fontSize/3,style:{cursor:"pointer"},onClick:()=>Ee(a,o)},e.toDisplayString(a.text),9,ta))),256))]))],64)):e.createCommentVNode("",!0),y.value.showTooltip&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:16},e.renderList(c.value.end-c.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+o*d.value,y:s.value.top,width:d.value,height:s.value.height<0?0:s.value.height,onClick:i=>xe(o),onMouseenter:i=>we(o),onMouseleave:r[0]||(r[0]=i=>{F.value=null,D.value=!1}),fill:o===F.value?t.value.style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:t.value.style.chart.highlighter.opacity/100})},null,44,aa))),256)):e.createCommentVNode("",!0),y.value.showTooltip&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:17},e.renderList(c.value.end-c.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left,y:s.value.top+o*d.value,width:s.value.width<0?0:s.value.width,height:d.value,onClick:i=>xe(o),onMouseenter:i=>we(o),onMouseleave:r[1]||(r[1]=i=>{F.value=null,D.value=!1}),fill:o===F.value?t.value.style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:t.value.style.chart.highlighter.opacity/100})},null,44,la))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...s.value})),void 0,!0)],12,ft)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",oa,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(de)||e.unref(he)})),void 0,!0)])):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ct.default,{key:5,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:oe,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-dom-to-png-ignore":""},[t.value.style.chart.zoom.show&&z.value>1?(e.openBlock(),e.createBlock(ot.Slicer,{ref_key:"slicerComponent",ref:M,key:`slicer_${se.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[c.value.start]?t.value.style.chart.grid.x.timeLabels.values[c.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[c.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[c.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...G.dataset.map(a=>a.series.length)),min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":r[2]||(r[2]=a=>c.value.start=a),end:c.value.end,"onUpdate:end":r[3]||(r[3]=a=>c.value.end=a),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:Math.max(...G.dataset.map(a=>a.series.length)),enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:be},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):e.createCommentVNode("",!0)],4),e.createVNode(rt._sfc_main,{show:y.value.showTooltip&&D.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:P.value,content:K.value,isFullscreen:A.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:le},[t.value.style.chart.legend.show&&T.value?(e.openBlock(),e.createBlock(nt.Legend,{key:0,legendSet:_e.value,config:Je.value,onClickMarker:r[4]||(r[4]=({legend:a})=>a.segregate())},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,ra)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:o})=>[e.createVNode(mt._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${C.value}_${o})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_e.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:re,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),c.value.end-c.value.start<200?(e.openBlock(),e.createBlock(it.default,{key:7,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ut.DataTable,{colNames:W.value.colNames,head:W.value.head,body:W.value.body,config:W.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,sa)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:e.unref(u.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,bt))}},ia=yt._export_sfc(na,[["__scopeId","data-v-1c876490"]]);exports.default=ia;