vue-data-ui 3.22.14 → 3.23.1

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 (229) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-Ci7Burxz.js → Arrow-CF0VFcBH.js} +1 -1
  4. package/dist/{BaseDraggableDialog-hyW32gLf.js → BaseDraggableDialog-LoqqwRtV.js} +2 -2
  5. package/dist/{BaseIcon-DJbOzCDs.js → BaseIcon-BfndwIWE.js} +4 -3
  6. package/dist/{BaseLegendToggle-DJU4VsLO.js → BaseLegendToggle-DZVucLnv.js} +1 -1
  7. package/dist/{BaseZoomControls-CwhpsHIL.js → BaseZoomControls-BZvCnZEi.js} +2 -2
  8. package/dist/{ColorPicker-BVWrKEQl.js → ColorPicker--ayG2YHf.js} +2 -2
  9. package/dist/{DataTable-rIsBpJMt.js → DataTable-BbKgJ5UI.js} +2 -2
  10. package/dist/HillActions-BD9j_sOU.js +187 -0
  11. package/dist/{Legend-DSPDFP3n.js → Legend-CQxUgOd-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-DZyYthbM.js → NonSvgPenAndPaper-4ypecDg1.js} +22 -22
  13. package/dist/{PackageVersion-BUmadjVO.js → PackageVersion-D6d8SCp9.js} +1 -1
  14. package/dist/{PenAndPaper-D--sbRMA.js → PenAndPaper-DAE-tnEQ.js} +14 -14
  15. package/dist/{Shape-Dmh9jBFh.js → Shape-C21CMlWS.js} +3 -3
  16. package/dist/Slicer-CIk57nL4.js +1163 -0
  17. package/dist/{SlicerPreview-CCIb3v8u.js → SlicerPreview-wUw1hFwe.js} +384 -370
  18. package/dist/{SparkTooltip-GjWLZ39s.js → SparkTooltip-CjsbIhzi.js} +6 -6
  19. package/dist/Title-BE3qg9xl.js +87 -0
  20. package/dist/{Tooltip-CEbqzIhL.js → Tooltip-DhjyfHwz.js} +2 -2
  21. package/dist/{UserOptions-BknvMNU1.js → UserOptions-Dt98of5H.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/composables.js +1 -1
  93. package/dist/{dom-to-png-BbPRUKX6.js → dom-to-png-BYIvdTe8.js} +1 -1
  94. package/dist/exposedLib-C0DPCgFj.js +28 -0
  95. package/dist/{geoProjections-BCP_PoiB.js → geoProjections-CEo3dVaL.js} +1 -1
  96. package/dist/{img-zY7_pJz1.js → img-Bnokohej.js} +1 -1
  97. package/dist/{labelUtils-DYdYmN_Q.js → labelUtils-BeVpDvTJ.js} +1 -1
  98. package/dist/{lib-C-QGo8GG.js → lib-Bttd6u5E.js} +27 -12
  99. package/dist/{package-QmuZcjWs.js → package-KvlL5CqE.js} +1 -1
  100. package/dist/{pdf-CuSS-5_j.js → pdf-CVIDfCrS.js} +1 -1
  101. package/dist/{render-common-DasqIYp9.js → render-common-oDYGTc5P.js} +21 -21
  102. package/dist/ssr/vue-ui-donut.js +1 -1
  103. package/dist/ssr/vue-ui-xy.js +1 -1
  104. package/dist/ssr.js +2 -2
  105. package/dist/style.css +1 -1
  106. package/dist/types/vue-data-ui.d.ts +496 -0
  107. package/dist/types/vue-ui-hill.d.ts +90 -0
  108. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  109. package/dist/{useConfig-C0V0eG7L.js → useConfig-D3scuR88.js} +774 -477
  110. package/dist/useHints-Dq_w2E8B.js +66 -0
  111. package/dist/{useNestedProp-BYfiWVP8.js → useNestedProp-vPNvh7rV.js} +5 -3
  112. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Brg8mm5J.js} +3 -2
  113. package/dist/{usePrinter-C5ordS-4.js → usePrinter-DN5bYhTG.js} +2 -2
  114. package/dist/{useSvgExport-Ba9qBr9M.js → useSvgExport-DH-FfcqQ.js} +1 -1
  115. package/dist/{useTimeLabels-B9CEuiLZ.js → useTimeLabels-d2f-W1L4.js} +2 -4
  116. package/dist/{useTooltipPosition-BsRysTrw.js → useTooltipPosition-DifeoeQW.js} +13 -13
  117. package/dist/useTransitions-g_zBREk2.js +39 -0
  118. package/dist/utils.js +14 -14
  119. package/dist/{vue-data-ui-D3jZ4lg1.js → vue-data-ui-DGWDPCwC.js} +85 -81
  120. package/dist/vue-data-ui.js +77 -76
  121. package/dist/vue-ui-3d-bar-C_Su9fve.js +1849 -0
  122. package/dist/{vue-ui-accordion-FimGHtuy.js → vue-ui-accordion-BxGriZik.js} +4 -4
  123. package/dist/vue-ui-age-pyramid-D4k1MkAL.js +1264 -0
  124. package/dist/vue-ui-annotator-CCtnM8Rv.js +2886 -0
  125. package/dist/vue-ui-bullet-DLZr2Uk8.js +724 -0
  126. package/dist/{vue-ui-bump-CG3WTTFy.js → vue-ui-bump-CcdzJZ9n.js} +334 -297
  127. package/dist/{vue-ui-candlestick-C3smYvQA.js → vue-ui-candlestick-EEEt7ORC.js} +468 -442
  128. package/dist/vue-ui-carousel-table-BicIpNAD.js +463 -0
  129. package/dist/{vue-ui-chestnut-i7FYoqi8.js → vue-ui-chestnut-BI7mC5dd.js} +523 -497
  130. package/dist/{vue-ui-chord-DCZo55QA.js → vue-ui-chord-DXaq8ZMu.js} +432 -426
  131. package/dist/vue-ui-circle-pack-XHJBMG51.js +1659 -0
  132. package/dist/{vue-ui-cursor-DEf_l0Xc.js → vue-ui-cursor-BqHr0n1Z.js} +61 -61
  133. package/dist/{vue-ui-dag-beo3-quD.js → vue-ui-dag-jMLVoQkb.js} +677 -674
  134. package/dist/vue-ui-dashboard-DVAUFETR.js +520 -0
  135. package/dist/{vue-ui-digits-BnMqGAhl.js → vue-ui-digits-Dy4gG6qm.js} +59 -51
  136. package/dist/vue-ui-donut-C0cWRLbU.js +2441 -0
  137. package/dist/{vue-ui-donut-Cr0uTWGk.js → vue-ui-donut-CYpxGBhl.js} +117 -116
  138. package/dist/{vue-ui-donut-evolution-D54NP3FP.js → vue-ui-donut-evolution-DwR47A2r.js} +534 -448
  139. package/dist/vue-ui-dumbbell-DxVbRjKR.js +1582 -0
  140. package/dist/{vue-ui-flow-CnateJjc.js → vue-ui-flow-DWaZF4FS.js} +415 -407
  141. package/dist/vue-ui-funnel-Bmpx5GHR.js +797 -0
  142. package/dist/vue-ui-galaxy-CWBP9oH9.js +1111 -0
  143. package/dist/vue-ui-gauge-ByE_txav.js +953 -0
  144. package/dist/{vue-ui-geo-DnO1RIFR.js → vue-ui-geo-ZA7CBy8f.js} +372 -357
  145. package/dist/{vue-ui-gizmo-DyxeSKIk.js → vue-ui-gizmo-SQCou0bQ.js} +57 -49
  146. package/dist/{vue-ui-heatmap-6Ja5LKYE.js → vue-ui-heatmap-CHd9gs_p.js} +473 -465
  147. package/dist/vue-ui-hill-BT183G-_.js +1768 -0
  148. package/dist/vue-ui-history-plot-BwnlC1mx.js +1723 -0
  149. package/dist/vue-ui-horizontal-bar-BUar2HUH.js +1733 -0
  150. package/dist/vue-ui-kpi-BF_9WWoo.js +104 -0
  151. package/dist/vue-ui-mini-loader-CvfukjXi.js +133 -0
  152. package/dist/vue-ui-molecule-Bi2CKHer.js +958 -0
  153. package/dist/{vue-ui-mood-radar-TWo57SKD.js → vue-ui-mood-radar-_zpbmvJs.js} +349 -341
  154. package/dist/{vue-ui-nested-donuts-W0TpPXIQ.js → vue-ui-nested-donuts-qHZAJ70u.js} +452 -416
  155. package/dist/vue-ui-onion-CB5RYIy5.js +1258 -0
  156. package/dist/vue-ui-parallel-coordinate-plot-BUwt-apg.js +1455 -0
  157. package/dist/{vue-ui-quadrant-BM9VLDcC.js → vue-ui-quadrant-CoROD3er.js} +636 -628
  158. package/dist/vue-ui-quick-chart-BcH7eY4-.js +2397 -0
  159. package/dist/{vue-ui-radar-BVz6Uq2k.js → vue-ui-radar-DGbaXGme.js} +380 -334
  160. package/dist/vue-ui-rating-Bo3zD3yW.js +360 -0
  161. package/dist/vue-ui-relation-circle-DaU1eTsG.js +925 -0
  162. package/dist/vue-ui-ridgeline-BCaGcyfk.js +1664 -0
  163. package/dist/{vue-ui-rings-DEZrfBYX.js → vue-ui-rings-BJUBn8_b.js} +450 -424
  164. package/dist/{vue-ui-scatter-owaIOpD0.js → vue-ui-scatter-Pcft1bUt.js} +721 -702
  165. package/dist/{vue-ui-skeleton-Cxszgax7.js → vue-ui-skeleton-EeJcGbCo.js} +395 -387
  166. package/dist/{vue-ui-smiley-DZBPvVeN.js → vue-ui-smiley-D0gibt5c.js} +128 -120
  167. package/dist/{vue-ui-spark-trend-CW4cLUqP.js → vue-ui-spark-trend-BRoQ7JpQ.js} +132 -117
  168. package/dist/{vue-ui-sparkbar-DeSSqv4v.js → vue-ui-sparkbar-DFp2k7-7.js} +119 -111
  169. package/dist/{vue-ui-sparkgauge-VSiPVgUQ.js → vue-ui-sparkgauge-D0Bq85Hs.js} +76 -68
  170. package/dist/vue-ui-sparkhistogram-BPln7v63.js +590 -0
  171. package/dist/{vue-ui-sparkline-DyZdAQMl.js → vue-ui-sparkline-C6Q45Dqp.js} +391 -365
  172. package/dist/vue-ui-sparkstackbar-CjK4bcQg.js +692 -0
  173. package/dist/vue-ui-stackbar-Ca8EPf3e.js +2353 -0
  174. package/dist/vue-ui-stackline-Pz5WWlWT.js +2467 -0
  175. package/dist/{vue-ui-strip-plot-BquHFKHA.js → vue-ui-strip-plot-Dw4MGDSO.js} +508 -487
  176. package/dist/vue-ui-table-Bjg-ujJu.js +1352 -0
  177. package/dist/vue-ui-table-heatmap-ljeYW8Wc.js +364 -0
  178. package/dist/{vue-ui-table-sparkline-CyGqW88t.js → vue-ui-table-sparkline-iRFmtK5S.js} +207 -181
  179. package/dist/vue-ui-thermometer-D8uiOaeA.js +777 -0
  180. package/dist/{vue-ui-timer-BVjydam-.js → vue-ui-timer-CYw983oL.js} +66 -58
  181. package/dist/vue-ui-tiremarks-CekiW2Ru.js +559 -0
  182. package/dist/vue-ui-treemap-h4VbnqPA.js +1760 -0
  183. package/dist/vue-ui-waffle-cu0w_s6L.js +1412 -0
  184. package/dist/{vue-ui-wheel-D-VVxvxY.js → vue-ui-wheel-tLvJadk5.js} +225 -217
  185. package/dist/{vue-ui-word-cloud-CcRch2t2.js → vue-ui-word-cloud-BjpGSsod.js} +440 -432
  186. package/dist/{vue-ui-world-BJq4PZqF.js → vue-ui-world-B4fCS3jN.js} +350 -342
  187. package/dist/{vue-ui-xy-D64AB5Qy.js → vue-ui-xy-7ZT9IRD8.js} +1639 -1595
  188. package/dist/{vue-ui-xy-canvas-mDqjPtxh.js → vue-ui-xy-canvas-BnLEwBpi.js} +459 -431
  189. package/dist/{vue-ui-xy-B8XBn08L.js → vue-ui-xy-gyNS0yH0.js} +216 -213
  190. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  191. package/package.json +4 -4
  192. package/dist/Slicer-JdCzBeYM.js +0 -1149
  193. package/dist/Title-Thf71-8D.js +0 -87
  194. package/dist/exposedLib-CfZhN94x.js +0 -25
  195. package/dist/useAutoSizeLabelsInsideViewbox-CSzmRywi.js +0 -50
  196. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  197. package/dist/vue-ui-3d-bar-D9-jAA5Z.js +0 -1824
  198. package/dist/vue-ui-age-pyramid-D4f-Agb7.js +0 -1246
  199. package/dist/vue-ui-annotator-P9E8hpJl.js +0 -2905
  200. package/dist/vue-ui-bullet-CKg0bShN.js +0 -709
  201. package/dist/vue-ui-carousel-table-BD_fxykj.js +0 -455
  202. package/dist/vue-ui-circle-pack--DUVDQx3.js +0 -1610
  203. package/dist/vue-ui-dashboard-mGLvP0UA.js +0 -512
  204. package/dist/vue-ui-donut-BCLG16Vb.js +0 -2418
  205. package/dist/vue-ui-dumbbell-DZ78WASa.js +0 -1564
  206. package/dist/vue-ui-funnel-DSpUMyDO.js +0 -781
  207. package/dist/vue-ui-galaxy-CxKafV1X.js +0 -1076
  208. package/dist/vue-ui-gauge-CegUK3FD.js +0 -925
  209. package/dist/vue-ui-history-plot-XOexkxeI.js +0 -1725
  210. package/dist/vue-ui-horizontal-bar-BCTdLxjK.js +0 -1689
  211. package/dist/vue-ui-kpi-EenGDZ-l.js +0 -96
  212. package/dist/vue-ui-mini-loader-CA7XxPk7.js +0 -125
  213. package/dist/vue-ui-molecule-5rpD2mlK.js +0 -932
  214. package/dist/vue-ui-onion-CDC9AGh1.js +0 -1199
  215. package/dist/vue-ui-parallel-coordinate-plot-DUOI7HoD.js +0 -1412
  216. package/dist/vue-ui-quick-chart-B8XCKef-.js +0 -2443
  217. package/dist/vue-ui-rating-B7ApWpIJ.js +0 -352
  218. package/dist/vue-ui-relation-circle-LVOR5VZ6.js +0 -917
  219. package/dist/vue-ui-ridgeline-BlyzSJHc.js +0 -1627
  220. package/dist/vue-ui-sparkhistogram-B5252IVr.js +0 -575
  221. package/dist/vue-ui-sparkstackbar-CiLgNzaI.js +0 -674
  222. package/dist/vue-ui-stackbar-Bwz6Z7M4.js +0 -2322
  223. package/dist/vue-ui-stackline-DX3YDRSg.js +0 -2427
  224. package/dist/vue-ui-table-DEhy61ln.js +0 -1339
  225. package/dist/vue-ui-table-heatmap-1LTxQfQX.js +0 -338
  226. package/dist/vue-ui-thermometer-CNvTQJUq.js +0 -769
  227. package/dist/vue-ui-tiremarks-3ZBAE8SA.js +0 -551
  228. package/dist/vue-ui-treemap-FqqXQvZw.js +0 -1727
  229. package/dist/vue-ui-waffle-B37Yx9uw.js +0 -1367
@@ -0,0 +1,2441 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, Bt as n, D as r, Jt as i, K as a, Kt as o, Mt as s, Pt as c, S as l, Vt as u, X as d, at as ee, b as te, et as f, f as p, h as ne, i as m, j as h, jt as re, kt as ie, ot as ae, p as g, pt as oe, q as se, s as ce, t as le, tt as ue, w as de, xt as fe } from "./lib-Bttd6u5E.js";
3
+ import { n as pe, t as me } from "./useHints-Dq_w2E8B.js";
4
+ import { t as he } from "./useConfig-D3scuR88.js";
5
+ import { t as ge } from "./usePrinter-DN5bYhTG.js";
6
+ import { n as _e, t as ve } from "./BaseScanner-DZvpgOjM.js";
7
+ import { t as ye } from "./useSvgExport-DH-FfcqQ.js";
8
+ import { t as be } from "./useNestedProp-vPNvh7rV.js";
9
+ import { t as xe } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as Se } from "./img-Bnokohej.js";
11
+ import { n as Ce } from "./Title-BE3qg9xl.js";
12
+ import { t as we } from "./Shape-C21CMlWS.js";
13
+ import { t as Te } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
+ import { l as Ee, t as De } from "./useResponsive-ZtArZtUf.js";
15
+ import { t as Oe } from "./DefGrad-DVBqDjhO.js";
16
+ import { t as ke } from "./BaseLegendToggle-DZVucLnv.js";
17
+ import { t as Ae } from "./A11yDataTable-DdRsVULz.js";
18
+ import { t as je } from "./useUserOptionState-DK-_1ddE.js";
19
+ import { t as Me } from "./useChartAccessibility-DYqac8yF.js";
20
+ import { n as Ne, t as Pe } from "./labelUtils-BeVpDvTJ.js";
21
+ import { t as Fe } from "./vue_ui_donut-BDGqG07h.js";
22
+ import { t as Ie } from "./Legend-CQxUgOd-.js";
23
+ import { Fragment as _, Teleport as Le, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as Ve, guardReactiveProps as C, mergeProps as He, nextTick as Ue, normalizeClass as We, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as Ge, onMounted as Ke, openBlock as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as qe, shallowRef as Je, toDisplayString as Ye, toRefs as Xe, unref as A, useSlots as Ze, vShow as Qe, watch as $e, withCtx as j, withDirectives as et } from "vue";
24
+ //#region src/useSmallArcLayouts.js
25
+ function tt(e) {
26
+ let { FINAL_CONFIG: t, noGhostDonut: n, svg: r, padding: i, labels_inline_fontSize: a, minSize: o, findArcMidpoint: s, calcMarkerOffsetX: c, calcMarkerOffsetY: l, animatingIndex: u, segregated: d, isSmallArc: ee } = e;
27
+ return { smallArcLayoutsClassic: v(() => {
28
+ if (t.value.type !== "classic") return {};
29
+ let e = {}, te = n.value || [];
30
+ if (!te.length) return e;
31
+ let f = r.value.width / 2, p = r.value.height / 2, ne = i.value.top + 16, m = r.value.height - i.value.bottom - 16, h = a.value, re = h / 3, ie = h * 1.5, ae = f - (o.value + 6), g = f + (o.value + 6), oe = !!t.value.style.chart.layout.curvedMarkers;
32
+ function se({ midX: e, midY: t, bandX: n, bandY: r }) {
33
+ if (!oe) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
34
+ let i = n < f ? -1 : 1, a = n - e, o = r - t, s = Math.sqrt(a * a + o * o) || 1, c = e - f, l = t - p, u = Math.sqrt(c * c + l * l) || 1, d = c / u, ee = l / u, te = u + 9;
35
+ function ne({ x: e, y: t }) {
36
+ let n = e - f, r = t - p, i = Math.sqrt(n * n + r * r) || 1;
37
+ if (i >= te) return {
38
+ x: e,
39
+ y: t
40
+ };
41
+ let a = te / i;
42
+ return {
43
+ x: f + n * a,
44
+ y: p + r * a
45
+ };
46
+ }
47
+ if (s < 56) {
48
+ let i = a / s, c = -(o / s), l = i, u = (e + n) * .5, te = (t + r) * .5, m = u + c, h = te + l, re = (m - f) * (m - f) + (h - p) * (h - p), ie = u - c, ae = te - l;
49
+ (ie - f) * (ie - f) + (ae - p) * (ae - p) > re && (c = -c, l = -l);
50
+ let g = .78, oe = e + a * g, se = t + o * g, ce = Math.max(0, Math.min(1, (s - 18) / 44)), le = ce * ce * (3 - 2 * ce), ue = 2.5 + le * 4, de = 1 + le * 2.5;
51
+ ue *= .9;
52
+ let fe = ne({
53
+ x: oe + c * ue + d * de,
54
+ y: se + l * ue + ee * de
55
+ });
56
+ return `M ${e} ${t} Q ${fe.x} ${fe.y} ${n} ${r}`;
57
+ }
58
+ let m = s * .34;
59
+ m < 20 && (m = 20), m > 46 && (m = 46);
60
+ let h = s * .46;
61
+ h < 22 && (h = 22), h > 70 && (h = 70);
62
+ let re = {
63
+ x: e + d * m,
64
+ y: t + ee * m
65
+ }, ie = f + i * Math.max(Math.abs(n - f), te), ae = {
66
+ x: n - i * Math.min(h, Math.abs(ie - n) * .75),
67
+ y: r
68
+ }, g = ne(re), se = ne(ae);
69
+ return `M ${e} ${t} C ${g.x} ${g.y} ${se.x} ${se.y} ${n} ${r}`;
70
+ }
71
+ function ce(e) {
72
+ let t = String(e ?? "").split(/\n/g), n = Math.max(0, t.length - 1) * (h * 1.2);
73
+ return ie + n;
74
+ }
75
+ function le({ arc: e, index: t }) {
76
+ let { x: n, y: r } = s(e.path);
77
+ return {
78
+ arc: e,
79
+ index: t,
80
+ midX: n,
81
+ midY: r,
82
+ inlineMarkerX: c(e).x,
83
+ inlineMarkerY: l(e) - 3.5,
84
+ labelHeight: ce(e.name)
85
+ };
86
+ }
87
+ function ue(e) {
88
+ let { arc: t } = e, n = t.seriesIndex ?? 0;
89
+ return u.value === n || d.value.includes(n) ? !1 : ee(t, n);
90
+ }
91
+ function de(e) {
92
+ let t = e.inlineMarkerY < p, n = e.inlineMarkerX < f;
93
+ return t && n ? "TL" : t && !n ? "TR" : !t && n ? "BL" : "BR";
94
+ }
95
+ function fe(e, t) {
96
+ if (t.startsWith("T")) {
97
+ e.sort((e, t) => e.inlineMarkerY - t.inlineMarkerY || e.index - t.index);
98
+ return;
99
+ }
100
+ e.sort((e, t) => t.inlineMarkerY - e.inlineMarkerY || e.index - t.index);
101
+ }
102
+ function pe({ side: e, markerX: t, markerY: n, labelY: r, connectorPath: i }) {
103
+ return {
104
+ side: e,
105
+ labelX: e === "left" ? t - 8 : t + 8,
106
+ labelY: r + re,
107
+ textAnchor: e === "left" ? "end" : "start",
108
+ markerX: t,
109
+ markerY: n,
110
+ connectorPath: i
111
+ };
112
+ }
113
+ function me({ candidateList: t, side: n, bandMarkerX: r, startY: i, direction: a }) {
114
+ let o = i;
115
+ t.forEach((t) => {
116
+ let { index: i, midX: s, midY: c, labelHeight: l } = t, u;
117
+ a === "down" ? (u = o, o += l) : (o -= l, u = o);
118
+ let d = u, ee = se({
119
+ midX: s,
120
+ midY: c,
121
+ bandX: r,
122
+ bandY: d
123
+ });
124
+ e[i] = pe({
125
+ side: n,
126
+ markerX: r,
127
+ markerY: d,
128
+ labelY: u,
129
+ connectorPath: ee
130
+ });
131
+ });
132
+ }
133
+ let he = te.map((e, t) => le({
134
+ arc: e,
135
+ index: t
136
+ })).filter(ue), ge = {
137
+ TL: [],
138
+ TR: [],
139
+ BL: [],
140
+ BR: []
141
+ };
142
+ return he.forEach((e) => {
143
+ ge[de(e)].push(e);
144
+ }), Object.keys(ge).forEach((e) => {
145
+ fe(ge[e], e);
146
+ }), me({
147
+ candidateList: ge.TL,
148
+ side: "left",
149
+ bandMarkerX: ae,
150
+ startY: ne,
151
+ direction: "down"
152
+ }), me({
153
+ candidateList: ge.TR,
154
+ side: "right",
155
+ bandMarkerX: g,
156
+ startY: ne,
157
+ direction: "down"
158
+ }), ge.BL.length > 1 && me({
159
+ candidateList: ge.BL,
160
+ side: "left",
161
+ bandMarkerX: ae,
162
+ startY: m,
163
+ direction: "up"
164
+ }), ge.BR.length > 1 && me({
165
+ candidateList: ge.BR,
166
+ side: "right",
167
+ bandMarkerX: g,
168
+ startY: m,
169
+ direction: "up"
170
+ }), e;
171
+ }) };
172
+ }
173
+ //#endregion
174
+ //#region src/components/vue-ui-donut.vue
175
+ var nt = /* @__PURE__ */ e({ default: () => gn }), rt = ["id"], it = ["id"], at = ["id"], ot = { style: { position: "relative" } }, st = [
176
+ "xmlns",
177
+ "aria-describedby",
178
+ "viewBox"
179
+ ], ct = ["width", "height"], lt = { key: 1 }, ut = { key: 2 }, dt = ["id"], ft = ["id"], pt = ["id"], mt = ["flood-color"], ht = ["id"], gt = ["flood-color"], _t = [
180
+ "d",
181
+ "stroke",
182
+ "filter"
183
+ ], vt = [
184
+ "d",
185
+ "stroke",
186
+ "filter"
187
+ ], yt = [
188
+ "cx",
189
+ "cy",
190
+ "r",
191
+ "fill",
192
+ "filter"
193
+ ], bt = { key: 6 }, xt = ["stroke", "d"], St = [
194
+ "d",
195
+ "fill",
196
+ "stroke",
197
+ "stroke-width",
198
+ "filter"
199
+ ], Ct = { key: 0 }, wt = [
200
+ "d",
201
+ "fill",
202
+ "stroke",
203
+ "stroke-width",
204
+ "filter"
205
+ ], Tt = { key: 0 }, Et = ["stroke", "d"], Dt = { key: 0 }, Ot = [
206
+ "d",
207
+ "stroke",
208
+ "stroke-width",
209
+ "filter"
210
+ ], kt = { key: 1 }, At = [
211
+ "d",
212
+ "fill",
213
+ "stroke",
214
+ "stroke-width",
215
+ "filter"
216
+ ], jt = [
217
+ "d",
218
+ "fill",
219
+ "stroke",
220
+ "stroke-width",
221
+ "filter"
222
+ ], Mt = { key: 1 }, Nt = [
223
+ "cx",
224
+ "cy",
225
+ "r",
226
+ "fill",
227
+ "stroke",
228
+ "stroke-width"
229
+ ], Pt = [
230
+ "cx",
231
+ "cy",
232
+ "r",
233
+ "fill",
234
+ "stroke",
235
+ "stroke-width"
236
+ ], Ft = { key: 0 }, It = [
237
+ "d",
238
+ "fill",
239
+ "stroke",
240
+ "stroke-width"
241
+ ], Lt = [
242
+ "cx",
243
+ "cy",
244
+ "r",
245
+ "stroke"
246
+ ], Rt = [
247
+ "cx",
248
+ "cy",
249
+ "r",
250
+ "fill"
251
+ ], zt = [
252
+ "cx",
253
+ "cy",
254
+ "r"
255
+ ], Bt = { key: 0 }, Vt = [
256
+ "d",
257
+ "stroke",
258
+ "fill",
259
+ "onMouseenter",
260
+ "onMouseleave",
261
+ "onClick"
262
+ ], Ht = { key: 1 }, Ut = [
263
+ "cx",
264
+ "cy",
265
+ "r"
266
+ ], Wt = [
267
+ "x",
268
+ "y",
269
+ "fill",
270
+ "font-size"
271
+ ], Gt = [
272
+ "x",
273
+ "y",
274
+ "fill",
275
+ "font-size"
276
+ ], Kt = [
277
+ "x",
278
+ "y",
279
+ "fill",
280
+ "font-size"
281
+ ], qt = [
282
+ "x",
283
+ "y",
284
+ "fill",
285
+ "font-size"
286
+ ], Jt = ["filter", "opacity"], Yt = { key: 0 }, Xt = ["x", "y"], Zt = { key: 1 }, Qt = [
287
+ "cx",
288
+ "cy",
289
+ "fill",
290
+ "stroke",
291
+ "filter",
292
+ "onClick",
293
+ "onMouseenter",
294
+ "onMouseleave"
295
+ ], $t = [
296
+ "text-anchor",
297
+ "x",
298
+ "y",
299
+ "onClick",
300
+ "onMouseenter",
301
+ "onMouseleave",
302
+ "innerHTML"
303
+ ], en = [
304
+ "text-anchor",
305
+ "x",
306
+ "y",
307
+ "fill",
308
+ "font-size",
309
+ "onClick",
310
+ "onMouseenter",
311
+ "onMouseleave"
312
+ ], tn = [
313
+ "text-anchor",
314
+ "x",
315
+ "y",
316
+ "fill",
317
+ "font-size",
318
+ "onClick",
319
+ "onMouseenter",
320
+ "onMouseleave",
321
+ "innerHTML"
322
+ ], nn = [
323
+ "cx",
324
+ "cy",
325
+ "fill",
326
+ "stroke",
327
+ "filter",
328
+ "onClick",
329
+ "onMouseenter",
330
+ "onMouseleave"
331
+ ], rn = [
332
+ "text-anchor",
333
+ "x",
334
+ "y",
335
+ "onClick",
336
+ "onMouseenter",
337
+ "onMouseleave",
338
+ "innerHTML"
339
+ ], an = [
340
+ "text-anchor",
341
+ "x",
342
+ "y",
343
+ "fill",
344
+ "font-size",
345
+ "onClick",
346
+ "onMouseenter",
347
+ "onMouseleave"
348
+ ], on = [
349
+ "text-anchor",
350
+ "x",
351
+ "y",
352
+ "fill",
353
+ "font-size",
354
+ "onClick",
355
+ "onMouseenter",
356
+ "onMouseleave",
357
+ "innerHTML"
358
+ ], sn = { key: 2 }, cn = [
359
+ "x",
360
+ "y",
361
+ "width"
362
+ ], ln = [
363
+ "x",
364
+ "y",
365
+ "width"
366
+ ], un = {
367
+ key: 0,
368
+ style: {
369
+ position: "absolute",
370
+ top: "100%",
371
+ left: "0",
372
+ width: "100%"
373
+ },
374
+ "data-dom-to-png-ignore": "",
375
+ "aria-hidden": "true"
376
+ }, dn = {
377
+ key: 5,
378
+ class: "vue-data-ui-watermark"
379
+ }, fn = ["id"], pn = ["onClick"], mn = {
380
+ key: 8,
381
+ class: "vue-ui-donut-hollow"
382
+ }, hn = ["innerHTML"], gn = /*#__PURE__*/ Te({
383
+ __name: "vue-ui-donut",
384
+ props: {
385
+ config: {
386
+ type: Object,
387
+ default() {
388
+ return {};
389
+ }
390
+ },
391
+ dataset: {
392
+ type: Array,
393
+ default() {
394
+ return [];
395
+ }
396
+ }
397
+ },
398
+ emits: [
399
+ "selectLegend",
400
+ "selectDatapoint",
401
+ "copyAlt"
402
+ ],
403
+ setup(e, { expose: Te, emit: nt }) {
404
+ let gn = Ve(() => import("./Tooltip-DhjyfHwz.js")), _n = Ve(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), vn = Ve(() => import("./vue-ui-accordion-BxGriZik.js").then((e) => e.n)), yn = Ve(() => import("./DataTable-BbKgJ5UI.js")), bn = Ve(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), xn = Ve(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Sn = Ve(() => import("./PackageVersion-D6d8SCp9.js").then((e) => e.t)), Cn = Ve(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_donut: wn } = he(), { isThemeValid: Tn, warnInvalidTheme: En } = xe(), Dn = Ze(), M = e, On = v({
405
+ get() {
406
+ return !!M.dataset && M.dataset.length;
407
+ },
408
+ set(e) {
409
+ return e;
410
+ }
411
+ }), N = Je(null), kn = D(null), An = D(null), jn = D(null), Mn = Je(null), Nn = Je(null), Pn = Je(null), Fn = Je(null), In = Je(null), Ln = Je(null), Rn = D(0), zn = D(0), Bn = D(0), Vn = D(!1), Hn = D(null), Un = D(null), Wn = D(!1), Gn = D(!1), Kn = D(null), qn = D({
412
+ x: 0,
413
+ y: 0
414
+ }), Jn = D("pointer"), Yn = D(!1), Xn = v({
415
+ get: () => L.value.style.chart.layout.labels.percentage.fontSize,
416
+ set: (e) => e
417
+ }), P = v({
418
+ get: () => L.value.style.chart.layout.labels.name.fontSize,
419
+ set: (e) => e
420
+ }), Zn = v({
421
+ get: () => L.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
422
+ set: (e) => e
423
+ }), Qn = !1, $n = () => {
424
+ !L.value.autoSize || Qn || (Qn = !0, requestAnimationFrame(() => {
425
+ Qn = !1;
426
+ let e = L.value, t = kn.value, n = z.value;
427
+ if (!e.autoSize || !t || !n) return;
428
+ let [r, i, a, o] = n.getAttribute("viewBox").split(" ").map(Number), s = {
429
+ x: r,
430
+ y: i,
431
+ width: a,
432
+ height: o
433
+ }, c = [
434
+ {
435
+ selector: ".vue-data-ui-datalabel-value",
436
+ baseSize: e.style.chart.layout.labels.percentage.fontSize,
437
+ minSize: e.style.chart.layout.labels.percentage.minFontSize,
438
+ sizeRef: Xn
439
+ },
440
+ {
441
+ selector: ".vue-data-ui-datalabel-name",
442
+ baseSize: e.style.chart.layout.labels.name.fontSize,
443
+ minSize: e.style.chart.layout.labels.name.minFontSize,
444
+ sizeRef: P
445
+ },
446
+ {
447
+ selector: ".vue-data-ui-datalabel-inline",
448
+ baseSize: e.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
449
+ minSize: e.style.chart.layout.labels.name.minFontSize,
450
+ sizeRef: Zn
451
+ }
452
+ ];
453
+ c.map((e) => t.querySelectorAll(e.selector).length).reduce((e, t) => e + t, 0) !== 0 && c.forEach(({ selector: e, baseSize: n, minSize: r, sizeRef: i }) => {
454
+ t.querySelectorAll(e).forEach((e) => {
455
+ i.value = ce({
456
+ el: e,
457
+ bounds: s,
458
+ currentFontSize: n,
459
+ minFontSize: r,
460
+ attempts: 200,
461
+ padding: 1
462
+ });
463
+ });
464
+ });
465
+ }));
466
+ };
467
+ Ke(async () => {
468
+ Vn.value = !0, nr(), requestAnimationFrame($n);
469
+ });
470
+ let er;
471
+ Ke(() => {
472
+ N.value && (er = new ResizeObserver((e) => {
473
+ for (let t of e) {
474
+ let { width: e, height: n } = t.contentRect;
475
+ if (e > 0 && n > 0) {
476
+ $n();
477
+ break;
478
+ }
479
+ }
480
+ }), er.observe(N.value.parentElement));
481
+ }), Ge(() => {
482
+ er?.disconnect();
483
+ }), Ge(() => {
484
+ Pn.value && (Fn.value && Pn.value.unobserve(Fn.value), Pn.value.disconnect());
485
+ });
486
+ let tr = v(() => !!L.value.debug);
487
+ function nr() {
488
+ if (re(M.dataset) ? (ue({
489
+ componentName: "VueUiDonut",
490
+ type: "dataset",
491
+ debug: tr.value
492
+ }), On.value = !1, dr.value = !0) : (M.dataset.forEach((e, t) => {
493
+ oe({
494
+ datasetObject: e,
495
+ requiredAttributes: ["name", "values"]
496
+ }).forEach((e) => {
497
+ ue({
498
+ componentName: "VueUiDonut",
499
+ type: "datasetSerieAttribute",
500
+ property: e,
501
+ index: t,
502
+ debug: tr.value
503
+ }), On.value = !1, dr.value = !0;
504
+ });
505
+ }), M.dataset.forEach((e, t) => {
506
+ (!e.name || e.name === "") && ue({
507
+ componentName: "VueUiDonut",
508
+ type: "datasetAttributeEmpty",
509
+ property: "name",
510
+ index: t,
511
+ debug: tr.value
512
+ });
513
+ })), re(M.dataset) || (dr.value = L.value.loading), L.value.responsive) {
514
+ let e = Ee(() => {
515
+ let { width: e, height: t } = De({
516
+ chart: N.value,
517
+ title: L.value.style.chart.title.text ? Mn.value : null,
518
+ legend: L.value.style.chart.legend.show ? Nn.value : null,
519
+ source: In.value,
520
+ noTitle: Ln.value,
521
+ padding: L.value.autoSize ? void 0 : Sr.value
522
+ });
523
+ requestAnimationFrame(() => {
524
+ V.value.width = e, V.value.height = t, $n();
525
+ });
526
+ });
527
+ Pn.value && (Fn.value && Pn.value.unobserve(Fn.value), Pn.value.disconnect()), Pn.value = new ResizeObserver(e), Fn.value = N.value.parentNode, Pn.value.observe(Fn.value);
528
+ }
529
+ }
530
+ let F = D(se()), rr = D(!1), ir = D(""), I = D(null), ar = D(0);
531
+ function or() {
532
+ let e = be({
533
+ userConfig: M.config,
534
+ defaultConfig: wn
535
+ }), t = {}, n = e.theme;
536
+ if (!n) t = e;
537
+ else if (!Tn.value(e)) En(e), t = e;
538
+ else {
539
+ let r = be({
540
+ userConfig: Fe[n] || M.config,
541
+ defaultConfig: e
542
+ });
543
+ t = {
544
+ ...be({
545
+ userConfig: M.config,
546
+ defaultConfig: r
547
+ }),
548
+ customPalette: e.customPalette.length ? e.customPalette : o[n] || c
549
+ };
550
+ }
551
+ return t;
552
+ }
553
+ let L = D(or());
554
+ pe({
555
+ config: () => L.value,
556
+ dataset: () => M.dataset,
557
+ component: "VueUiDonut",
558
+ rules: [
559
+ me.singleSeries,
560
+ me.emptyArray,
561
+ {
562
+ test: (e) => e.length > 6,
563
+ message: [
564
+ "👀 The number of series is > 6. Consider:",
565
+ "",
566
+ "▶️ Grouping small values dynamically into a single \"Other\" series.",
567
+ "",
568
+ "▶️ Using filters to let users choose a maximum number of series to display.",
569
+ "",
570
+ "▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
571
+ ]
572
+ }
573
+ ]
574
+ });
575
+ let sr = v(() => L.value.userOptions.useCursorPointer), cr = v(() => i({
576
+ defaultConfig: {
577
+ useCssAnimation: !1,
578
+ table: { show: !1 },
579
+ startAnimation: { show: !1 },
580
+ userOptions: { show: !1 },
581
+ style: { chart: {
582
+ backgroundColor: "#99999930",
583
+ layout: { labels: {
584
+ dataLabels: { show: !1 },
585
+ hollow: {
586
+ average: { show: !1 },
587
+ total: { show: !1 }
588
+ },
589
+ value: { show: !1 }
590
+ } },
591
+ legend: {
592
+ backgroundColor: "transparent",
593
+ showValue: !1,
594
+ showPercentage: !1
595
+ },
596
+ title: {
597
+ color: "#1A1A1A",
598
+ subtitle: { color: "#5A5A5A" }
599
+ }
600
+ } }
601
+ },
602
+ userConfig: L.value.skeletonConfig ?? {}
603
+ })), { loading: lr, FINAL_DATASET: ur, manualLoading: dr, skeletonDataset: fr } = _e({
604
+ ...Xe(M),
605
+ FINAL_CONFIG: L,
606
+ prepareConfig: or,
607
+ skeletonDataset: M.config?.skeletonDataset ?? [
608
+ {
609
+ name: "",
610
+ values: [3],
611
+ color: "#BABABA"
612
+ },
613
+ {
614
+ name: "",
615
+ values: [2],
616
+ color: "#AAAAAA"
617
+ },
618
+ {
619
+ name: "",
620
+ values: [1],
621
+ color: "#CACACA"
622
+ }
623
+ ],
624
+ skeletonConfig: i({
625
+ defaultConfig: L.value,
626
+ userConfig: cr.value
627
+ })
628
+ }), R = D(!0), pr = D(0), mr = D(!1), hr = null;
629
+ function gr(e = 1e3) {
630
+ return new Promise((t) => {
631
+ let n = performance.now();
632
+ function r(i) {
633
+ let a = i - n, o = Math.min(a / e, 1), s = f(o);
634
+ pr.value = s, o < 1 ? hr = requestAnimationFrame(r) : (pr.value = 1, hr = null, t());
635
+ }
636
+ hr !== null && cancelAnimationFrame(hr), pr.value = 0, hr = requestAnimationFrame(r);
637
+ });
638
+ }
639
+ $e(() => lr.value, async (e) => {
640
+ if (e || mr.value) return;
641
+ let t = ur.value === fr, n = L.value.startAnimation?.show;
642
+ !t && n ? (mr.value = !0, await gr(L.value.startAnimation.durationMs || 1e3)) : pr.value = 1, R.value = !1;
643
+ }, { immediate: !0 });
644
+ let { userOptionsVisible: _r, setUserOptionsVisibility: vr, keepUserOptionState: yr } = je({ config: L.value }), { svgRef: z } = Me({ config: L.value.style.chart.title });
645
+ function br() {
646
+ vr(!0);
647
+ }
648
+ function xr() {
649
+ vr(!1);
650
+ }
651
+ $e(() => M.config, (e) => {
652
+ lr.value || (L.value = or()), _r.value = !L.value.userOptions.showOnChartHover, nr(), Rn.value += 1, zn.value += 1, Bn.value += 1, B.value.dataLabels.show = L.value.style.chart.layout.labels.dataLabels.show, B.value.showTable = L.value.table.show, B.value.showTooltip = L.value.style.chart.tooltip.show, V.value.height = L.value.style.chart.height, V.value.width = L.value.style.chart.width;
653
+ }, { deep: !0 });
654
+ let Sr = v(() => {
655
+ let { top: e, right: t, bottom: n, left: r } = L.value.style.chart.padding;
656
+ return {
657
+ css: `padding:${e}px ${t}px ${n}px ${r}px`,
658
+ top: e,
659
+ right: t,
660
+ bottom: n,
661
+ left: r
662
+ };
663
+ }), { isPrinting: Cr, isImaging: wr, generatePdf: Tr, generateImage: Er } = ge({
664
+ elementId: `donut__${F.value}`,
665
+ fileName: L.value.style.chart.title.text || "vue-ui-donut",
666
+ options: L.value.userOptions.print
667
+ }), Dr = v(() => L.value.userOptions.show && !L.value.style.chart.title.text), Or = v(() => de(L.value.customPalette)), B = D({
668
+ dataLabels: { show: L.value.style.chart.layout.labels.dataLabels.show },
669
+ showTable: L.value.table.show,
670
+ showTooltip: L.value.style.chart.tooltip.show
671
+ });
672
+ $e(L, () => {
673
+ B.value = {
674
+ dataLabels: { show: L.value.style.chart.layout.labels.dataLabels.show },
675
+ showTable: L.value.table.show,
676
+ showTooltip: L.value.style.chart.tooltip.show
677
+ };
678
+ }, { immediate: !0 });
679
+ let V = D({
680
+ height: L.value.style.chart.height,
681
+ width: L.value.style.chart.width
682
+ }), kr = v(() => {
683
+ if (L.value.pie) return G.value;
684
+ let e = L.value.style.chart.layout.donut.strokeWidth / 512, t = Math.min(V.value.width, V.value.height) * e, n = t > G.value ? G.value : t;
685
+ return Math.max(n, 12 * (1 + e));
686
+ }), Ar = nt, H = v(() => ur.value.sort((e, t) => {
687
+ let n = Array.isArray(e.values) ? e.values.reduce((e, t) => e + t, 0) : e.value ?? 0, r = Array.isArray(t.values) ? t.values.reduce((e, t) => e + t, 0) : t.value ?? 0;
688
+ return e.ghost && !t.ghost ? 1 : t.ghost && !e.ghost ? -1 : r - n;
689
+ }).map((e, t) => ({
690
+ name: e.name,
691
+ color: l(e.color) || Or.value[t] || c[t] || c[t % c.length],
692
+ value: te(e.values.reduce((e, t) => e + t, 0)),
693
+ absoluteValues: e.values,
694
+ comment: e.comment || "",
695
+ patternIndex: t,
696
+ seriesIndex: t,
697
+ ghost: !1,
698
+ pattern: `pattern_${F.value}_${t}`
699
+ })));
700
+ $e(() => M.dataset, (e) => {
701
+ Array.isArray(e) && e.length > 0 && (dr.value = !1);
702
+ }, { immediate: !0 });
703
+ let U = Je(H.value);
704
+ $e(() => H.value, (e) => {
705
+ U.value = e, requestAnimationFrame($n);
706
+ });
707
+ function jr() {
708
+ return H.value.map((e) => ({
709
+ name: e.name,
710
+ color: e.color,
711
+ value: e.value
712
+ }));
713
+ }
714
+ let W = D([]), Mr = D(!1), Nr = D(null);
715
+ function Pr() {
716
+ Ar("selectLegend", Hr.value.map((e) => ({
717
+ name: e.name,
718
+ color: e.color,
719
+ value: e.value
720
+ })));
721
+ }
722
+ function Fr({ from: e, to: t, duration: n, onUpdate: r, onDone: i, easing: a = f }) {
723
+ let o = performance.now();
724
+ function s(c) {
725
+ let l = Math.min((c - o) / n, 1), u = a(l);
726
+ r(e + (t - e) * u, l), l < 1 ? requestAnimationFrame(s) : (r(t, 1), i && i());
727
+ }
728
+ requestAnimationFrame(s);
729
+ }
730
+ function Ir() {
731
+ W.value.length ? W.value = [] : Ur.value.forEach((e, t) => {
732
+ W.value.push(t);
733
+ }), Pr();
734
+ }
735
+ function Lr(e) {
736
+ let t = H.value.find((t, n) => n === e), n = U.value.find((t, n) => n === e).value;
737
+ if (W.value.includes(e)) {
738
+ W.value = W.value.filter((t) => t !== e);
739
+ let r = t.value;
740
+ function i() {
741
+ U.value = U.value.map((t, n) => e === n ? {
742
+ ...t,
743
+ value: r
744
+ } : t), Pr();
745
+ }
746
+ function a() {
747
+ Mr.value = !0, Nr.value = e, Fr({
748
+ from: n,
749
+ to: r,
750
+ duration: L.value.serieToggleAnimation.durationMs,
751
+ onUpdate: (t, n) => {
752
+ U.value = U.value.map((n, r) => e === r ? {
753
+ ...n,
754
+ value: t
755
+ } : n), requestAnimationFrame($n);
756
+ },
757
+ onDone: () => {
758
+ i(), Mr.value = !1, Nr.value = null;
759
+ }
760
+ });
761
+ }
762
+ L.value.serieToggleAnimation.show && L.value.type === "classic" ? a() : (i(), requestAnimationFrame($n));
763
+ } else if (W.value.length < H.value.length - 1) {
764
+ function t() {
765
+ W.value.push(e), U.value = U.value.map((t, n) => e === n ? {
766
+ ...t,
767
+ value: 0
768
+ } : t), Pr();
769
+ }
770
+ function r() {
771
+ Mr.value = !0, Nr.value = e, Fr({
772
+ from: n,
773
+ to: 0,
774
+ duration: L.value.serieToggleAnimation.durationMs,
775
+ onUpdate: (t, n) => {
776
+ U.value = U.value.map((n, r) => e === r ? {
777
+ ...n,
778
+ value: t
779
+ } : n), requestAnimationFrame($n);
780
+ },
781
+ onDone: () => {
782
+ t(), requestAnimationFrame($n), Mr.value = !1, Nr.value = null;
783
+ }
784
+ });
785
+ }
786
+ L.value.serieToggleAnimation.show && L.value.type === "classic" ? r() : t();
787
+ }
788
+ }
789
+ function Rr(e) {
790
+ return H.value.length ? H.value.find((t) => t.name === e) || (L.value.debug && console.warn(`VueUiDonut - Series name not found "${e}"`), null) : (L.value.debug && console.warn("VueUiDonut - There are no series to show."), null);
791
+ }
792
+ function zr(e) {
793
+ let t = Rr(e);
794
+ t !== null && W.value.includes(t.seriesIndex) && Lr(t.seriesIndex);
795
+ }
796
+ function Br(e) {
797
+ let t = Rr(e);
798
+ t !== null && (W.value.includes(t.seriesIndex) || Lr(t.seriesIndex));
799
+ }
800
+ let Vr = v(() => ur.value.reduce((e, t) => e + t.values.reduce((e, t) => e + t, 0), 0)), Hr = v(() => {
801
+ if (R.value && !lr.value) {
802
+ let e = pr.value, t = H.value.map((t) => ({
803
+ ...t,
804
+ value: t.value * e,
805
+ color: t.color,
806
+ ghost: !1
807
+ })), n = Vr.value * (1 - e);
808
+ return n > 0 && t.push({
809
+ name: "__ghost__",
810
+ value: n,
811
+ color: "transparent",
812
+ ghost: !0
813
+ }), t;
814
+ }
815
+ return U.value.forEach((e) => {
816
+ if ([null, void 0].includes(e.values)) return {
817
+ ...e,
818
+ values: []
819
+ };
820
+ }), U.value.map((e, t) => ({
821
+ ...e,
822
+ seriesIndex: t
823
+ })).filter((e, t) => !W.value.includes(t));
824
+ }), Ur = v(() => ur.value.map((e, t) => {
825
+ let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / ur.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
826
+ return {
827
+ name: e.name,
828
+ color: l(e.color) || Or.value[t] || c[t] || c[t % c.length],
829
+ value: n,
830
+ shape: "circle",
831
+ patternIndex: t,
832
+ proportion: r
833
+ };
834
+ }).map((e, t) => {
835
+ let n = m(L.value.style.chart.layout.labels.value.formatter, e.value, d({
836
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
837
+ v: e.value,
838
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
839
+ r: L.value.style.chart.legend.roundingValue
840
+ }), {
841
+ datapoint: e,
842
+ index: t
843
+ }), r = m(L.value.style.chart.layout.labels.percentage.formatter, ei(e), d({
844
+ v: ei(e),
845
+ s: "%",
846
+ r: L.value.style.chart.legend.roundingPercentage
847
+ })), i = gi({
848
+ val: n,
849
+ percentage: W.value.includes(t) ? `${hi(e.proportion * 100)}%` : r,
850
+ showVal: L.value.style.chart.legend.showValue,
851
+ showPercentage: L.value.style.chart.legend.showPercentage,
852
+ config: L.value.style.chart.legend
853
+ });
854
+ return {
855
+ ...e,
856
+ opacity: W.value.includes(t) ? .5 : 1,
857
+ segregate: () => !Mr.value && Lr(t),
858
+ isSegregated: W.value.includes(t),
859
+ display: `${e.name}${L.value.style.chart.legend.showPercentage || L.value.style.chart.legend.showValue ? ": " : ""}${i}`
860
+ };
861
+ })), Wr = v(() => ({
862
+ cy: "donut-div-legend",
863
+ backgroundColor: L.value.style.chart.legend.backgroundColor,
864
+ color: L.value.style.chart.legend.color,
865
+ fontSize: L.value.style.chart.legend.fontSize,
866
+ paddingBottom: 12,
867
+ fontWeight: L.value.style.chart.legend.bold ? "bold" : ""
868
+ })), G = v(() => {
869
+ let e = L.value.style.chart.layout.donut.radiusRatio, t = Math.max(.1, Math.min(.50001, e)), n = Math.min(V.value.width * t, V.value.height * t);
870
+ return Math.max(12, n);
871
+ }), K = v(() => ie({ series: Hr.value }, V.value.width / 2, V.value.height / 2, G.value, G.value, 1.99999, 2, 1, 360, 105.25, kr.value)), Gr = v(() => Math.abs(Hr.value.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0), Kr = v(() => ie({ series: [{
872
+ value: 1,
873
+ color: L.value.style.chart.layout.donut.emptyFill,
874
+ name: "_",
875
+ seriesIndex: 0,
876
+ patternIndex: -1,
877
+ ghost: !1,
878
+ absoluteValues: [1]
879
+ }] }, V.value.width / 2, V.value.height / 2, G.value, G.value, 1.99999, 2, 1, 360, 105.25, kr.value)), q = v(() => K.value.filter((e) => !e.ghost)), J = v(() => {
880
+ let e = Math.max(...Hr.value.map((e) => e.value)), t = Hr.value.map((t) => t.value / e);
881
+ return h({
882
+ series: t,
883
+ center: {
884
+ x: V.value.width / 2,
885
+ y: V.value.height / 2
886
+ },
887
+ maxRadius: Math.min(V.value.width, V.value.height) / 3,
888
+ hasGhost: R.value
889
+ });
890
+ });
891
+ function qr(e) {
892
+ return e.x > V.value.width / 2 + 6 ? "start" : e.x < V.value.width / 2 - 6 ? "end" : "middle";
893
+ }
894
+ function Jr(e) {
895
+ return e.middlePoint.y > V.value.height / 2 ? s({
896
+ initX: e.middlePoint.x,
897
+ initY: e.middlePoint.y,
898
+ offset: 100,
899
+ centerX: V.value.width / 2,
900
+ centerY: V.value.height / 2
901
+ }).y : s({
902
+ initX: e.middlePoint.x,
903
+ initY: e.middlePoint.y,
904
+ offset: 0,
905
+ centerX: V.value.width / 2,
906
+ centerY: V.value.height / 2
907
+ }).y - 100;
908
+ }
909
+ function Y(e) {
910
+ return e.proportion * 100 > L.value.style.chart.layout.labels.dataLabels.hideUnderValue;
911
+ }
912
+ function Yr(e, t) {
913
+ let n = L.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = L.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, i = (Qr.value[t] ?? e.proportion ?? 0) * 100;
914
+ return i > n && i <= r;
915
+ }
916
+ let { smallArcLayoutsClassic: X } = tt({
917
+ FINAL_CONFIG: L,
918
+ noGhostDonut: q,
919
+ svg: V,
920
+ padding: Sr,
921
+ labels_inline_fontSize: Zn,
922
+ minSize: G,
923
+ findArcMidpoint: ee,
924
+ calcMarkerOffsetX: p,
925
+ calcMarkerOffsetY: g,
926
+ animatingIndex: Nr,
927
+ segregated: W,
928
+ isSmallArc: Yr
929
+ });
930
+ function Xr(e, t) {
931
+ let n = e.value / Zr(t);
932
+ return isNaN(n) ? 0 : m(L.value.style.chart.layout.labels.percentage.formatter, n * 100, d({
933
+ v: n * 100,
934
+ s: "%",
935
+ r: L.value.style.chart.layout.labels.percentage.rounding
936
+ }), { datapoint: e });
937
+ }
938
+ function Zr(e) {
939
+ return [...e].map((e) => e.value).reduce((e, t) => e + t, 0);
940
+ }
941
+ let Z = v(() => Hr.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Qr = v(() => {
942
+ let e = H.value.reduce((e, t) => e + t.value, 0);
943
+ return e <= 0 ? [] : H.value.map((t) => t.value / e);
944
+ }), $r = v(() => Z.value / Hr.value.length);
945
+ function ei(e) {
946
+ return Mr.value ? e.proportion * 100 : e.value / Z.value * 100;
947
+ }
948
+ let ti = D(null), ni = D(!1);
949
+ function ri({ datapoint: e, seriesIndex: t }) {
950
+ L.value.events.datapointLeave && L.value.events.datapointLeave({
951
+ datapoint: e,
952
+ seriesIndex: t
953
+ }), rr.value = !1, I.value = null, Kn.value = null, Jn.value = "pointer";
954
+ }
955
+ function Q({ datapoint: e, relativeIndex: t, seriesIndex: n, show: r = !1, triggerMode: i = "pointer" }) {
956
+ L.value.events.datapointEnter && L.value.events.datapointEnter({
957
+ datapoint: e,
958
+ seriesIndex: n
959
+ }), Jn.value = i, Kn.value = t, ti.value = {
960
+ datapoint: e,
961
+ seriesIndex: n,
962
+ config: L.value,
963
+ series: H.value
964
+ }, rr.value = r, I.value = t;
965
+ let a = "", o = L.value.style.chart.tooltip.customFormat;
966
+ if (ni.value = !1, fe(o)) try {
967
+ let t = o({
968
+ seriesIndex: n,
969
+ datapoint: e,
970
+ series: H.value,
971
+ config: L.value
972
+ });
973
+ typeof t == "string" && (ir.value = t, ni.value = !0);
974
+ } catch {
975
+ console.warn("Custom format cannot be applied."), ni.value = !1;
976
+ }
977
+ ni.value || (a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, a += `<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="${e.color}"/>${Dn.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${F.value}_${n})"/>` : ""}</svg>`, a += `<b>${gi({
978
+ showVal: L.value.style.chart.tooltip.showValue,
979
+ showPercentage: L.value.style.chart.tooltip.showPercentage,
980
+ val: `<span>${m(L.value.style.chart.layout.labels.value.formatter, e.value, d({
981
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
982
+ v: e.value,
983
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
984
+ r: L.value.style.chart.tooltip.roundingValue
985
+ }), {
986
+ datapoint: e,
987
+ relativeIndex: t,
988
+ seriesIndex: n
989
+ })}</span>`,
990
+ percentage: m(L.value.style.chart.layout.labels.percentage.formatter, e.proportion * 100, d({
991
+ v: e.proportion * 100,
992
+ s: "%",
993
+ r: L.value.style.chart.tooltip.roundingPercentage
994
+ }), {
995
+ datapoint: e,
996
+ relativeIndex: t,
997
+ seriesIndex: n
998
+ }),
999
+ config: L.value.style.chart.tooltip
1000
+ })}</b></div>`, L.value.style.chart.comments.showInTooltip && e.comment && (a += `<div class="vue-data-ui-tooltip-comment" style="background:${e.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`), ir.value = `<div>${a}</div>`);
1001
+ }
1002
+ function ii(e, t) {
1003
+ let n = X.value[t];
1004
+ if (n) return {
1005
+ textAnchor: n.textAnchor,
1006
+ x: n.labelX,
1007
+ y: n.labelY
1008
+ };
1009
+ let r = p(e, !0, 12);
1010
+ return {
1011
+ textAnchor: r.anchor,
1012
+ x: r.x,
1013
+ y: g(e)
1014
+ };
1015
+ }
1016
+ function ai(e, t, n) {
1017
+ let { textAnchor: r, x: i } = ii(e, t), a = _i(e), o = `
1018
+ <tspan
1019
+ class="vue-data-ui-datalabel-inline"
1020
+ fill="${L.value.style.chart.layout.labels.percentage.color}"
1021
+ font-size="${n ? Zn.value : Xn.value}px"
1022
+ style="font-weight:${L.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
1023
+ >${a}</tspan>
1024
+ `, s = String(e.name ?? "").split(/\n/g), c = "";
1025
+ return s.forEach((e, t) => {
1026
+ c += t === 0 ? `
1027
+ <tspan
1028
+ class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1029
+ fill="${L.value.style.chart.layout.labels.name.color}"
1030
+ font-size="${n ? Zn.value : P.value}px"
1031
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1032
+ >${e}</tspan>
1033
+ ` : `
1034
+ <tspan
1035
+ class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1036
+ x="${i}"
1037
+ dy="${(n ? Zn.value : P.value) * 1.2}"
1038
+ fill="${L.value.style.chart.layout.labels.name.color}"
1039
+ font-size="${n ? Zn.value : P.value}px"
1040
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1041
+ >${e}</tspan>
1042
+ `;
1043
+ }), r === "end" ? `${L.value.style.chart.layout.labels.name.show ? c : ""}${o}` : `${o}${L.value.style.chart.layout.labels.name.show ? c : ""}`;
1044
+ }
1045
+ function oi(e, t) {
1046
+ let n = J.value[t].middlePoint, r = qr(n), i = s({
1047
+ initX: n.x,
1048
+ initY: n.y,
1049
+ offset: 42,
1050
+ centerX: V.value.width / 2,
1051
+ centerY: V.value.height / 2
1052
+ }), a = i.x;
1053
+ i.y;
1054
+ let o = _i(e), c = `
1055
+ <tspan
1056
+ class="vue-data-ui-datalabel-value"
1057
+ fill="${L.value.style.chart.layout.labels.percentage.color}"
1058
+ font-size="${Xn.value}px"
1059
+ style="font-weight:${L.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
1060
+ >${o}</tspan>
1061
+ `, l = String(e.name ?? "").split(/\n/g), u = "";
1062
+ return l.forEach((e, t) => {
1063
+ u += t === 0 ? `
1064
+ <tspan
1065
+ class="vue-data-ui-datalabel-name"
1066
+ fill="${L.value.style.chart.layout.labels.name.color}"
1067
+ font-size="${P.value}px"
1068
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1069
+ >${e}</tspan>
1070
+ ` : `
1071
+ <tspan
1072
+ class="vue-data-ui-datalabel-name"
1073
+ x="${a}"
1074
+ dy="${P.value * 1.2}"
1075
+ fill="${L.value.style.chart.layout.labels.name.color}"
1076
+ font-size="${P.value}px"
1077
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1078
+ >${e}</tspan>
1079
+ `;
1080
+ }), r === "end" ? `${L.value.style.chart.layout.labels.name.show ? u : ""}${c}` : `${c}${L.value.style.chart.layout.labels.name.show ? u : ""}`;
1081
+ }
1082
+ function si(e) {
1083
+ return L.value.useBlurOnHover && ![null, void 0].includes(I.value) && I.value !== e ? `url(#blur_${F.value})` : "";
1084
+ }
1085
+ function ci(e) {
1086
+ if (!Mr.value || Nr.value === null || e.seriesIndex !== Nr.value) return 1;
1087
+ let t = (e.proportion ?? 0) * 100, n = L.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = L.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, i = n;
1088
+ return t >= r ? 1 : t <= i ? 0 : (t - i) / (r - i);
1089
+ }
1090
+ let li = v(() => ({
1091
+ head: Hr.value.map((e) => ({
1092
+ name: e.name,
1093
+ color: e.color
1094
+ })),
1095
+ body: Hr.value.map((e) => e.value)
1096
+ }));
1097
+ function ui(e = null) {
1098
+ Ue(() => {
1099
+ let n = li.value.head.map((e, t) => [
1100
+ [e.name],
1101
+ [li.value.body[t]],
1102
+ [isNaN(li.value.body[t] / Z.value) ? "-" : li.value.body[t] / Z.value * 100]
1103
+ ]), i = [
1104
+ [L.value.style.chart.title.text],
1105
+ [L.value.style.chart.title.subtitle.text],
1106
+ [
1107
+ [""],
1108
+ ["val"],
1109
+ ["%"]
1110
+ ]
1111
+ ].concat(n), a = r(i);
1112
+ e ? e(a) : t({
1113
+ csvContent: a,
1114
+ title: L.value.style.chart.title.text || "vue-ui-donut"
1115
+ });
1116
+ });
1117
+ }
1118
+ let di = v(() => {
1119
+ let e = [
1120
+ " <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>",
1121
+ d({
1122
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
1123
+ v: Z.value,
1124
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
1125
+ r: L.value.table.td.roundingValue
1126
+ }),
1127
+ "100%"
1128
+ ], t = li.value.head.map((e, t) => [
1129
+ {
1130
+ color: e.color,
1131
+ name: e.name || "-"
1132
+ },
1133
+ li.value.body[t],
1134
+ isNaN(li.value.body[t] / Z.value) ? "-" : (li.value.body[t] / Z.value * 100).toFixed(L.value.table.td.roundingPercentage) + "%"
1135
+ ]), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
1136
+ th: {
1137
+ backgroundColor: L.value.table.th.backgroundColor,
1138
+ color: L.value.table.th.color,
1139
+ outline: L.value.table.th.outline
1140
+ },
1141
+ td: {
1142
+ backgroundColor: L.value.table.td.backgroundColor,
1143
+ color: L.value.table.td.color,
1144
+ outline: L.value.table.td.outline
1145
+ },
1146
+ breakpoint: L.value.table.responsiveBreakpoint
1147
+ };
1148
+ return {
1149
+ colNames: [
1150
+ L.value.table.columnNames.series,
1151
+ L.value.table.columnNames.value,
1152
+ L.value.table.columnNames.percentage
1153
+ ],
1154
+ head: e,
1155
+ body: t,
1156
+ a11yBody: n,
1157
+ config: r
1158
+ };
1159
+ }), fi = D(!1);
1160
+ function pi(e) {
1161
+ fi.value = e, ar.value += 1;
1162
+ }
1163
+ let mi = v(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
1164
+ function hi(e) {
1165
+ return Ne({
1166
+ num: e,
1167
+ rounding: L.value.style.chart.legend.roundingPercentage
1168
+ });
1169
+ }
1170
+ function gi({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
1171
+ return Pe({
1172
+ config: i,
1173
+ val: e,
1174
+ percentage: t,
1175
+ showVal: n,
1176
+ showPercentage: r
1177
+ });
1178
+ }
1179
+ function _i(e) {
1180
+ return gi({
1181
+ val: m(L.value.style.chart.layout.labels.value.formatter, e.value, d({
1182
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
1183
+ v: e.value,
1184
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
1185
+ r: L.value.style.chart.layout.labels.value.rounding
1186
+ }), { datapoint: e }),
1187
+ percentage: Xr(e, q.value),
1188
+ showVal: L.value.style.chart.layout.labels.value.show,
1189
+ showPercentage: L.value.style.chart.layout.labels.percentage.show,
1190
+ config: L.value.style.chart.layout.labels.dataLabels
1191
+ });
1192
+ }
1193
+ function $(e, t) {
1194
+ L.value.events.datapointClick && L.value.events.datapointClick({
1195
+ datapoint: e,
1196
+ seriesIndex: e.seriesIndex
1197
+ }), Ar("selectDatapoint", {
1198
+ datapoint: e,
1199
+ index: t
1200
+ });
1201
+ }
1202
+ function vi() {
1203
+ B.value.showTable = !B.value.showTable;
1204
+ }
1205
+ function yi() {
1206
+ B.value.dataLabels.show = !B.value.dataLabels.show;
1207
+ }
1208
+ function bi() {
1209
+ B.value.showTooltip = !B.value.showTooltip;
1210
+ }
1211
+ let xi = D(!1);
1212
+ function Si() {
1213
+ xi.value = !xi.value;
1214
+ }
1215
+ async function Ci({ scale: e = 2 } = {}) {
1216
+ if (!N.value) return;
1217
+ let { width: t, height: n } = N.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Se({
1218
+ domElement: N.value,
1219
+ base64: !0,
1220
+ img: !0,
1221
+ scale: e
1222
+ });
1223
+ return {
1224
+ imageUri: i,
1225
+ base64: a,
1226
+ title: L.value.style.chart.title.text,
1227
+ width: t,
1228
+ height: n,
1229
+ aspectRatio: r
1230
+ };
1231
+ }
1232
+ function wi() {
1233
+ if (!kn.value) return;
1234
+ let { x: e, y: t, width: n, height: r } = kn.value.getBBox();
1235
+ z.value && z.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
1236
+ }
1237
+ let Ti = v(() => {
1238
+ let e = L.value.table.useDialog && !L.value.table.show, t = B.value.showTable;
1239
+ return {
1240
+ component: e ? Cn : vn,
1241
+ title: `${L.value.style.chart.title.text}${L.value.style.chart.title.subtitle.text ? `: ${L.value.style.chart.title.subtitle.text}` : ""}`,
1242
+ props: e ? {
1243
+ backgroundColor: L.value.table.th.backgroundColor,
1244
+ color: L.value.table.th.color,
1245
+ headerColor: L.value.table.th.color,
1246
+ headerBg: L.value.table.th.backgroundColor,
1247
+ isFullscreen: fi.value,
1248
+ fullscreenParent: N.value,
1249
+ forcedWidth: Math.min(500, window.innerWidth * .8),
1250
+ isCursorPointer: sr.value
1251
+ } : {
1252
+ hideDetails: !0,
1253
+ config: {
1254
+ open: t,
1255
+ maxHeight: 1e4,
1256
+ body: {
1257
+ backgroundColor: L.value.style.chart.backgroundColor,
1258
+ color: L.value.style.chart.color
1259
+ },
1260
+ head: {
1261
+ backgroundColor: L.value.style.chart.backgroundColor,
1262
+ color: L.value.style.chart.color
1263
+ }
1264
+ }
1265
+ }
1266
+ };
1267
+ });
1268
+ $e(() => B.value.showTable, (e) => {
1269
+ L.value.table.show || (e && L.value.table.useDialog && Hn.value ? Hn.value.open() : "close" in Hn.value && Hn.value.close());
1270
+ });
1271
+ function Ei() {
1272
+ B.value.showTable = !1, Un.value && Un.value.setTableIconState(!1);
1273
+ }
1274
+ let Di = v(() => Ur.value.map((e) => ({
1275
+ ...e,
1276
+ name: e.display
1277
+ }))), Oi = v(() => L.value.style.chart.backgroundColor), ki = v(() => L.value.style.chart.legend), Ai = v(() => L.value.style.chart.title), { exportSvg: ji, getSvg: Mi } = ye({
1278
+ svg: z,
1279
+ title: Ai,
1280
+ legend: ki,
1281
+ legendItems: Di,
1282
+ backgroundColor: Oi
1283
+ });
1284
+ async function Ni({ isCb: e }) {
1285
+ Gn.value = !0, await Ue();
1286
+ try {
1287
+ if (e) {
1288
+ let { blob: e, url: t, text: n, dataUrl: r } = await Mi();
1289
+ await Promise.resolve(L.value.userOptions.callbacks.svg({
1290
+ blob: e,
1291
+ url: t,
1292
+ text: n,
1293
+ dataUrl: r
1294
+ }));
1295
+ } else await Promise.resolve(ji());
1296
+ } finally {
1297
+ Gn.value = !1;
1298
+ }
1299
+ }
1300
+ function Pi(e) {
1301
+ if (e?.stage === "start") {
1302
+ Wn.value = !0;
1303
+ return;
1304
+ }
1305
+ if (e?.stage === "end") {
1306
+ Wn.value = !1;
1307
+ return;
1308
+ }
1309
+ Er();
1310
+ }
1311
+ async function Fi() {
1312
+ if (Ar("copyAlt", {
1313
+ config: L.value,
1314
+ dataset: U.value
1315
+ }), !L.value.userOptions.callbacks.altCopy) {
1316
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1317
+ return;
1318
+ }
1319
+ await Promise.resolve(L.value.userOptions.callbacks.altCopy({
1320
+ config: L.value,
1321
+ dataset: U.value
1322
+ }));
1323
+ }
1324
+ function Ii() {
1325
+ Kn.value = null, Yn.value = !0;
1326
+ }
1327
+ function Li() {
1328
+ Kn.value = null, Jn.value = "pointer", rr.value = !1, I.value = null, Yn.value = !1;
1329
+ }
1330
+ function Ri(e) {
1331
+ if (!z.value || xi.value || document.activeElement !== z.value || !q.value.length) return;
1332
+ let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1333
+ if (!t && !n && !r && !i) return;
1334
+ if (e.preventDefault(), e.stopPropagation(), i) {
1335
+ Kn.value = null, Jn.value = "pointer", rr.value = !1, I.value = null;
1336
+ return;
1337
+ }
1338
+ if (r) {
1339
+ if (Kn.value === null) return;
1340
+ let e = q.value[Kn.value];
1341
+ if (!e) return;
1342
+ $(e, Kn.value);
1343
+ return;
1344
+ }
1345
+ let a = Kn.value, o = I.value, s = a !== null && a >= 0 && a < q.value.length, c = o !== null && o >= 0 && o < q.value.length;
1346
+ s ? n ? (a += 1, a >= q.value.length && (a = 0)) : t && (--a, a < 0 && (a = q.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= q.value.length && (a = 0), a < 0 && (a = q.value.length - 1)) : a = n ? 0 : q.value.length - 1;
1347
+ let l = q.value[a];
1348
+ l && (Kn.value = a, zi(a), Q({
1349
+ datapoint: l,
1350
+ relativeIndex: a,
1351
+ seriesIndex: l.seriesIndex,
1352
+ show: !0,
1353
+ triggerMode: "keyboard"
1354
+ }));
1355
+ }
1356
+ function zi(e) {
1357
+ if (!Number.isFinite(e) || !z.value) return;
1358
+ let t = V.value.width / 2, n = V.value.height / 2;
1359
+ if (L.value.type === "classic") {
1360
+ let r = q.value[e];
1361
+ if (!r?.arcSlice) return;
1362
+ let i = ee(r.arcSlice);
1363
+ if (!i) return;
1364
+ t = i.x, n = i.y;
1365
+ } else {
1366
+ let r = J.value[e]?.middlePoint;
1367
+ if (!r) return;
1368
+ t = r.x, n = r.y;
1369
+ }
1370
+ let r = z.value.getBoundingClientRect();
1371
+ qn.value = {
1372
+ x: r.left + t / V.value.width * r.width,
1373
+ y: r.top + n / V.value.height * r.height
1374
+ };
1375
+ }
1376
+ let Bi = v(() => ({
1377
+ headers: di.value?.colNames ?? [],
1378
+ rows: di.value?.a11yBody ?? []
1379
+ }));
1380
+ return Te({
1381
+ autoSize: wi,
1382
+ getData: jr,
1383
+ getImage: Ci,
1384
+ generatePdf: Tr,
1385
+ generateCsv: ui,
1386
+ generateImage: Er,
1387
+ generateSvg: Ni,
1388
+ hideSeries: Br,
1389
+ showSeries: zr,
1390
+ toggleTable: vi,
1391
+ toggleLabels: yi,
1392
+ toggleTooltip: bi,
1393
+ toggleAnnotator: Si,
1394
+ toggleFullscreen: pi,
1395
+ copyAlt: Fi
1396
+ }), (t, r) => (E(), x("div", {
1397
+ ref_key: "donutChart",
1398
+ ref: N,
1399
+ class: We(`vue-data-ui-component vue-ui-donut ${fi.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${L.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1400
+ style: T(`font-family:${L.value.style.fontFamily};width:100%; ${L.value.responsive ? "height:100%;" : ""} text-align:center;background:${L.value.style.chart.backgroundColor}`),
1401
+ id: `donut__${F.value}`,
1402
+ onMouseenter: br,
1403
+ onMouseleave: xr
1404
+ }, [
1405
+ S("div", {
1406
+ id: `chart-instructions-${F.value}`,
1407
+ class: "sr-only"
1408
+ }, [S("p", null, Ye(L.value.a11y.translations.keyboardNavigation), 1)], 8, it),
1409
+ Bi.value?.rows?.length ? (E(), y(Ae, {
1410
+ key: 0,
1411
+ uid: F.value,
1412
+ head: Bi.value.headers,
1413
+ body: Bi.value.rows,
1414
+ notice: L.value.a11y.translations.tableAvailable,
1415
+ caption: L.value.a11y.translations.tableCaption
1416
+ }, null, 8, [
1417
+ "uid",
1418
+ "head",
1419
+ "body",
1420
+ "notice",
1421
+ "caption"
1422
+ ])) : b("", !0),
1423
+ L.value.userOptions.buttons.annotator && A(z) ? (E(), y(A(bn), {
1424
+ key: 1,
1425
+ color: L.value.style.chart.color,
1426
+ backgroundColor: L.value.style.chart.backgroundColor,
1427
+ active: xi.value,
1428
+ svgRef: A(z),
1429
+ isCursorPointer: sr.value,
1430
+ onClose: Si
1431
+ }, {
1432
+ "annotator-action-close": j(() => [k(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1433
+ "annotator-action-color": j(({ color: e }) => [k(t.$slots, "annotator-action-color", w(C({ color: e })), void 0, !0)]),
1434
+ "annotator-action-draw": j(({ mode: e }) => [k(t.$slots, "annotator-action-draw", w(C({ mode: e })), void 0, !0)]),
1435
+ "annotator-action-undo": j(({ disabled: e }) => [k(t.$slots, "annotator-action-undo", w(C({ disabled: e })), void 0, !0)]),
1436
+ "annotator-action-redo": j(({ disabled: e }) => [k(t.$slots, "annotator-action-redo", w(C({ disabled: e })), void 0, !0)]),
1437
+ "annotator-action-delete": j(({ disabled: e }) => [k(t.$slots, "annotator-action-delete", w(C({ disabled: e })), void 0, !0)]),
1438
+ _: 3
1439
+ }, 8, [
1440
+ "color",
1441
+ "backgroundColor",
1442
+ "active",
1443
+ "svgRef",
1444
+ "isCursorPointer"
1445
+ ])) : b("", !0),
1446
+ k(t.$slots, "userConfig", {}, void 0, !0),
1447
+ Dr.value ? (E(), x("div", {
1448
+ key: 2,
1449
+ ref_key: "noTitle",
1450
+ ref: Ln,
1451
+ class: "vue-data-ui-no-title-space",
1452
+ style: "height:36px; width: 100%;background:transparent"
1453
+ }, null, 512)) : b("", !0),
1454
+ L.value.style.chart.title.text ? (E(), x("div", {
1455
+ key: 3,
1456
+ ref_key: "chartTitle",
1457
+ ref: Mn,
1458
+ style: "width:100%;background:transparent;padding-bottom:24px"
1459
+ }, [(E(), y(Ce, {
1460
+ key: `title_${Rn.value}`,
1461
+ config: {
1462
+ title: {
1463
+ cy: "donut-div-title",
1464
+ ...L.value.style.chart.title
1465
+ },
1466
+ subtitle: {
1467
+ cy: "donut-div-subtitle",
1468
+ ...L.value.style.chart.title.subtitle
1469
+ }
1470
+ }
1471
+ }, null, 8, ["config"]))], 512)) : b("", !0),
1472
+ S("div", { id: `legend-top-${F.value}` }, null, 8, at),
1473
+ L.value.userOptions.show && On.value && (A(yr) || A(_r)) ? (E(), y(A(xn), {
1474
+ ref_key: "userOptionsRef",
1475
+ ref: Un,
1476
+ key: `user_option_${ar.value}`,
1477
+ backgroundColor: L.value.style.chart.backgroundColor,
1478
+ color: L.value.style.chart.color,
1479
+ isPrinting: A(Cr),
1480
+ isImaging: A(wr),
1481
+ uid: F.value,
1482
+ hasTooltip: L.value.style.chart.tooltip.show && L.value.userOptions.buttons.tooltip,
1483
+ hasPdf: L.value.userOptions.buttons.pdf,
1484
+ hasImg: L.value.userOptions.buttons.img,
1485
+ hasSvg: L.value.userOptions.buttons.svg,
1486
+ hasXls: L.value.userOptions.buttons.csv,
1487
+ hasTable: L.value.userOptions.buttons.table,
1488
+ hasLabel: L.value.userOptions.buttons.labels,
1489
+ hasFullscreen: L.value.userOptions.buttons.fullscreen,
1490
+ hasAltCopy: L.value.userOptions.buttons.altCopy,
1491
+ isFullscreen: fi.value,
1492
+ chartElement: N.value,
1493
+ position: L.value.userOptions.position,
1494
+ callbacks: L.value.userOptions.callbacks,
1495
+ isTooltip: B.value.showTooltip,
1496
+ titles: { ...L.value.userOptions.buttonTitles },
1497
+ hasAnnotator: L.value.userOptions.buttons.annotator,
1498
+ isAnnotation: xi.value,
1499
+ printScale: L.value.userOptions.print.scale,
1500
+ tableDialog: L.value.table.useDialog,
1501
+ isCursorPointer: sr.value,
1502
+ onToggleFullscreen: pi,
1503
+ onGeneratePdf: A(Tr),
1504
+ onGenerateCsv: ui,
1505
+ onGenerateImage: Pi,
1506
+ onGenerateSvg: Ni,
1507
+ onToggleTable: vi,
1508
+ onToggleLabels: yi,
1509
+ onToggleTooltip: bi,
1510
+ onToggleAnnotator: Si,
1511
+ onCopyAlt: Fi,
1512
+ style: T({ visibility: A(yr) ? A(_r) ? "visible" : "hidden" : "visible" })
1513
+ }, Re({ _: 2 }, [
1514
+ t.$slots.menuIcon ? {
1515
+ name: "menuIcon",
1516
+ fn: j(({ isOpen: e, color: n }) => [k(t.$slots, "menuIcon", w(C({
1517
+ isOpen: e,
1518
+ color: n
1519
+ })), void 0, !0)]),
1520
+ key: "0"
1521
+ } : void 0,
1522
+ t.$slots.optionTooltip ? {
1523
+ name: "optionTooltip",
1524
+ fn: j(() => [k(t.$slots, "optionTooltip", {}, void 0, !0)]),
1525
+ key: "1"
1526
+ } : void 0,
1527
+ t.$slots.optionPdf ? {
1528
+ name: "optionPdf",
1529
+ fn: j(() => [k(t.$slots, "optionPdf", {}, void 0, !0)]),
1530
+ key: "2"
1531
+ } : void 0,
1532
+ t.$slots.optionCsv ? {
1533
+ name: "optionCsv",
1534
+ fn: j(() => [k(t.$slots, "optionCsv", {}, void 0, !0)]),
1535
+ key: "3"
1536
+ } : void 0,
1537
+ t.$slots.optionImg ? {
1538
+ name: "optionImg",
1539
+ fn: j(() => [k(t.$slots, "optionImg", {}, void 0, !0)]),
1540
+ key: "4"
1541
+ } : void 0,
1542
+ t.$slots.optionSvg ? {
1543
+ name: "optionSvg",
1544
+ fn: j(() => [k(t.$slots, "optionSvg", {}, void 0, !0)]),
1545
+ key: "5"
1546
+ } : void 0,
1547
+ t.$slots.optionTable ? {
1548
+ name: "optionTable",
1549
+ fn: j(() => [k(t.$slots, "optionTable", {}, void 0, !0)]),
1550
+ key: "6"
1551
+ } : void 0,
1552
+ t.$slots.optionLabels ? {
1553
+ name: "optionLabels",
1554
+ fn: j(() => [k(t.$slots, "optionLabels", {}, void 0, !0)]),
1555
+ key: "7"
1556
+ } : void 0,
1557
+ t.$slots.optionFullscreen ? {
1558
+ name: "optionFullscreen",
1559
+ fn: j(({ toggleFullscreen: e, isFullscreen: n }) => [k(t.$slots, "optionFullscreen", w(C({
1560
+ toggleFullscreen: e,
1561
+ isFullscreen: n
1562
+ })), void 0, !0)]),
1563
+ key: "8"
1564
+ } : void 0,
1565
+ t.$slots.optionAnnotator ? {
1566
+ name: "optionAnnotator",
1567
+ fn: j(({ toggleAnnotator: e, isAnnotator: n }) => [k(t.$slots, "optionAnnotator", w(C({
1568
+ toggleAnnotator: e,
1569
+ isAnnotator: n
1570
+ })), void 0, !0)]),
1571
+ key: "9"
1572
+ } : void 0,
1573
+ t.$slots.optionAltCopy ? {
1574
+ name: "optionAltCopy",
1575
+ fn: j(({ altCopy: e }) => [k(t.$slots, "optionAltCopy", w(C({ altCopy: e })), void 0, !0)]),
1576
+ key: "10"
1577
+ } : void 0,
1578
+ t.$slots["custom-menu-before"] ? {
1579
+ name: "custom-menu-before",
1580
+ fn: j(() => [k(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1581
+ key: "11"
1582
+ } : void 0,
1583
+ t.$slots["custom-menu-after"] ? {
1584
+ name: "custom-menu-after",
1585
+ fn: j(() => [k(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1586
+ key: "12"
1587
+ } : void 0
1588
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.isTooltip.titles.hasAnnotator.isAnnotation.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : b("", !0),
1589
+ S("div", ot, [(E(), x("svg", {
1590
+ ref_key: "svgRef",
1591
+ ref: z,
1592
+ xmlns: A(le),
1593
+ "aria-describedby": `chart-instructions-${F.value}`,
1594
+ class: We({
1595
+ "vue-data-ui-fullscreen--on": fi.value,
1596
+ "vue-data-ui-fulscreen--off": !fi.value,
1597
+ "vue-data-ui-svg": !0
1598
+ }),
1599
+ viewBox: `0 0 ${V.value.width <= 0 ? 10 : V.value.width} ${V.value.height <= 0 ? 10 : V.value.height}`,
1600
+ style: T(`max-width:100%; overflow: visible; background:transparent;color:${L.value.style.chart.color};${Sr.value.css}`),
1601
+ tabindex: "0",
1602
+ onFocus: Ii,
1603
+ onBlur: Li,
1604
+ onKeydown: Ri
1605
+ }, [S("g", {
1606
+ ref_key: "G",
1607
+ ref: kn,
1608
+ class: "vue-data-ui-g"
1609
+ }, [
1610
+ Be(A(Sn)),
1611
+ t.$slots["chart-background"] ? (E(), x("foreignObject", {
1612
+ key: 0,
1613
+ x: 0,
1614
+ y: 0,
1615
+ width: V.value.width <= 0 ? 10 : V.value.width,
1616
+ height: V.value.height <= 0 ? 10 : V.value.height,
1617
+ style: { pointerEvents: "none" }
1618
+ }, [k(t.$slots, "chart-background", {}, void 0, !0)], 8, ct)) : b("", !0),
1619
+ L.value.type === "classic" && !isNaN(kr.value / G.value) ? (E(), x("defs", lt, [L.value.style.chart.useGradient ? (E(), y(Oe, {
1620
+ key: 0,
1621
+ t: "radial",
1622
+ id: `gradient_${F.value}`,
1623
+ stops: [
1624
+ [
1625
+ "0%",
1626
+ A(n)(L.value.style.chart.backgroundColor, 0),
1627
+ 0
1628
+ ],
1629
+ [
1630
+ `${(1 - kr.value / G.value) * 100}%`,
1631
+ A(n)("#FFFFFF", 0),
1632
+ 0
1633
+ ],
1634
+ [
1635
+ `${(1 - kr.value / G.value / 2) * 100}%`,
1636
+ A(n)("#FFFFFF", L.value.style.chart.gradientIntensity),
1637
+ 1
1638
+ ],
1639
+ [
1640
+ "100%",
1641
+ A(n)(L.value.style.chart.backgroundColor, 0),
1642
+ 0
1643
+ ]
1644
+ ]
1645
+ }, null, 8, ["id", "stops"])) : b("", !0)])) : b("", !0),
1646
+ L.value.type === "polar" ? (E(), x("defs", ut, [(E(!0), x(_, null, O(J.value, (e, t) => (E(), y(Oe, {
1647
+ t: "radial",
1648
+ id: `polar_gradient_${t}_${F.value}`,
1649
+ key: `pg_${t}_${F.value}`,
1650
+ cx: (isNaN(e.middlePoint.x / V.value.width * 100) ? 0 : e.middlePoint.x / V.value.width * 100) + "%",
1651
+ cy: (isNaN(e.middlePoint.y / V.value.height * 100) ? 0 : e.middlePoint.y / V.value.height * 100) + "%",
1652
+ r: "62%",
1653
+ stops: [[
1654
+ "0%",
1655
+ A(u)(K.value[t].color, .05),
1656
+ L.value.style.chart.gradientIntensity / 100
1657
+ ], [
1658
+ "100%",
1659
+ K.value[t].color,
1660
+ 1
1661
+ ]]
1662
+ }, null, 8, [
1663
+ "id",
1664
+ "cx",
1665
+ "cy",
1666
+ "stops"
1667
+ ]))), 128))])) : b("", !0),
1668
+ S("defs", null, [
1669
+ S("filter", {
1670
+ id: `blur_${F.value}`,
1671
+ x: "-50%",
1672
+ y: "-50%",
1673
+ width: "200%",
1674
+ height: "200%"
1675
+ }, [S("feGaussianBlur", {
1676
+ in: "SourceGraphic",
1677
+ stdDeviation: 2,
1678
+ id: `blur_std_${F.value}`
1679
+ }, null, 8, ft), r[5] ||= S("feColorMatrix", {
1680
+ type: "saturate",
1681
+ values: "0"
1682
+ }, null, -1)], 8, dt),
1683
+ S("filter", {
1684
+ id: `shadow_${F.value}`,
1685
+ "color-interpolation-filters": "sRGB"
1686
+ }, [S("feDropShadow", {
1687
+ dx: "0",
1688
+ dy: "0",
1689
+ stdDeviation: "10",
1690
+ "flood-opacity": "0.5",
1691
+ "flood-color": L.value.style.chart.layout.donut.shadowColor
1692
+ }, null, 8, mt)], 8, pt),
1693
+ S("filter", {
1694
+ id: `drop_shadow_${F.value}`,
1695
+ "color-interpolation-filters": "sRGB",
1696
+ x: "-50%",
1697
+ y: "-50%",
1698
+ width: "200%",
1699
+ height: "200%"
1700
+ }, [S("feDropShadow", {
1701
+ dx: "0",
1702
+ dy: "0",
1703
+ stdDeviation: "3",
1704
+ "flood-opacity": "1",
1705
+ "flood-color": L.value.style.chart.layout.donut.shadowColor
1706
+ }, null, 8, gt)], 8, ht)
1707
+ ]),
1708
+ L.value.type === "classic" ? (E(!0), x(_, { key: 3 }, O(K.value.filter((e) => !e.ghost), (e, t) => (E(), x("g", null, [Y(e) && B.value.dataLabels.show ? (E(), x("path", {
1709
+ key: 0,
1710
+ d: A(X)[t]?.connectorPath || A(ne)(e, {
1711
+ x: V.value.width / 2,
1712
+ y: V.value.height / 2
1713
+ }, 16, 16, !1, !1, kr.value, 12, L.value.style.chart.layout.curvedMarkers),
1714
+ stroke: e.color,
1715
+ "stroke-width": "1",
1716
+ "stroke-linecap": "round",
1717
+ "stroke-linejoin": "round",
1718
+ fill: "none",
1719
+ filter: si(t)
1720
+ }, null, 8, _t)) : b("", !0)]))), 256)) : b("", !0),
1721
+ L.value.type === "polar" ? (E(!0), x(_, { key: 4 }, O(K.value.filter((e) => !e.ghost), (e, t) => (E(), x("g", null, [Y(e) && B.value.dataLabels.show ? (E(), x("path", {
1722
+ key: 0,
1723
+ d: `M ${A(s)({
1724
+ initX: J.value[t].middlePoint.x,
1725
+ initY: J.value[t].middlePoint.y,
1726
+ offset: 24,
1727
+ centerX: V.value.width / 2,
1728
+ centerY: V.value.height / 2
1729
+ }).x},${A(s)({
1730
+ initX: J.value[t].middlePoint.x,
1731
+ initY: J.value[t].middlePoint.y,
1732
+ offset: 24,
1733
+ centerX: V.value.width / 2,
1734
+ centerY: V.value.height / 2
1735
+ }).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,
1736
+ stroke: e.color,
1737
+ "stroke-width": "1",
1738
+ "stroke-linecap": "round",
1739
+ "stroke-linejoin": "round",
1740
+ fill: "none",
1741
+ filter: si(t),
1742
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1743
+ }, null, 12, vt)) : b("", !0)]))), 256)) : b("", !0),
1744
+ L.value.type === "classic" && L.value.style.chart.layout.donut.useShadow ? (E(), x("circle", {
1745
+ key: 5,
1746
+ cx: V.value.width / 2,
1747
+ cy: V.value.height / 2,
1748
+ r: G.value <= 0 ? 10 : G.value,
1749
+ fill: L.value.style.chart.backgroundColor,
1750
+ filter: `url(#shadow_${F.value})`
1751
+ }, null, 8, yt)) : b("", !0),
1752
+ t.$slots.pattern ? (E(), x("g", bt, [(E(!0), x(_, null, O(e.dataset, (e, n) => (E(), x("defs", { key: `pattern-${e.patternIndex}` }, [k(t.$slots, "pattern", He({ ref_for: !0 }, {
1753
+ seriesIndex: n,
1754
+ patternId: `pattern_${F.value}_${n}`
1755
+ }), void 0, !0)]))), 128))])) : b("", !0),
1756
+ Z.value && L.value.type === "classic" ? (E(), x(_, { key: 7 }, [
1757
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1758
+ stroke: L.value.style.chart.backgroundColor,
1759
+ d: e.arcSlice,
1760
+ fill: "#FFFFFF"
1761
+ }, null, 8, xt))), 256)),
1762
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1763
+ class: "vue-ui-donut-arc-path",
1764
+ d: e.arcSlice,
1765
+ fill: e.color,
1766
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1767
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1768
+ filter: si(t)
1769
+ }, null, 8, St))), 256)),
1770
+ t.$slots.pattern ? (E(), x("g", Ct, [(E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1771
+ class: "vue-ui-donut-arc-path",
1772
+ d: e.arcSlice,
1773
+ fill: `url(#${e.pattern})`,
1774
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1775
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1776
+ filter: si(t)
1777
+ }, null, 8, wt))), 256))])) : b("", !0)
1778
+ ], 64)) : b("", !0),
1779
+ Z.value && L.value.type === "polar" ? (E(), x(_, { key: 8 }, [K.value.length > 1 ? (E(), x("g", Tt, [
1780
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1781
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1782
+ d: J.value[t].path,
1783
+ fill: "#FFFFFF",
1784
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1785
+ }, null, 12, Et))), 256)),
1786
+ L.value.style.chart.layout.donut.useShadow ? (E(), x("g", Dt, [(E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1787
+ class: "vue-ui-donut-arc-path",
1788
+ d: J.value[t].path,
1789
+ fill: "transparent",
1790
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1791
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1792
+ filter: `url(#drop_shadow_${F.value})`,
1793
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1794
+ }, null, 12, Ot))), 256))])) : b("", !0),
1795
+ t.$slots.pattern ? (E(), x("g", kt, [(E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1796
+ class: "vue-ui-donut-arc-path",
1797
+ d: J.value[t].path,
1798
+ fill: `url(#${e.pattern})`,
1799
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1800
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1801
+ filter: si(t),
1802
+ style: T({
1803
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1804
+ transformOrigin: "center"
1805
+ })
1806
+ }, null, 12, At))), 256))])) : b("", !0),
1807
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1808
+ class: "vue-ui-donut-arc-path",
1809
+ d: J.value[t].path,
1810
+ fill: L.value.style.chart.useGradient ? `url(#polar_gradient_${t}_${F.value})` : e.color,
1811
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1812
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1813
+ filter: si(t),
1814
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1815
+ }, null, 12, jt))), 256))
1816
+ ])) : (E(), x("g", Mt, [t.$slots.pattern ? (E(), x("circle", {
1817
+ key: 0,
1818
+ cx: V.value.width / 2,
1819
+ cy: V.value.height / 2,
1820
+ r: G.value,
1821
+ fill: `url(#pattern_${F.value}_${K.value[0].patternIndex})`,
1822
+ stroke: L.value.style.chart.backgroundColor,
1823
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth
1824
+ }, null, 8, Nt)) : b("", !0), S("circle", {
1825
+ cx: V.value.width / 2,
1826
+ cy: V.value.height / 2,
1827
+ r: G.value,
1828
+ fill: L.value.style.chart.useGradient ? `url(#polar_gradient_0_${F.value})` : K.value[0].color,
1829
+ stroke: L.value.style.chart.backgroundColor,
1830
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth
1831
+ }, null, 8, Pt)]))], 64)) : (E(), x(_, { key: 9 }, [L.value.type === "classic" && !Gr.value ? (E(), x("g", Ft, [(E(!0), x(_, null, O(Kr.value, (e, t) => (E(), x("path", {
1832
+ class: "vue-ui-donut-arc-path",
1833
+ d: e.arcSlice,
1834
+ fill: e.color,
1835
+ stroke: L.value.style.chart.backgroundColor,
1836
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth
1837
+ }, null, 8, It))), 256))])) : b("", !0), S("circle", {
1838
+ cx: V.value.width / 2,
1839
+ cy: V.value.height / 2,
1840
+ r: G.value <= 0 ? 10 : G.value,
1841
+ fill: "transparent",
1842
+ stroke: L.value.style.chart.backgroundColor
1843
+ }, null, 8, Lt)], 64)),
1844
+ L.value.style.chart.useGradient && L.value.type === "classic" ? (E(), x("circle", {
1845
+ key: 10,
1846
+ cx: V.value.width / 2,
1847
+ cy: V.value.height / 2,
1848
+ r: G.value <= 0 ? 10 : G.value,
1849
+ fill: `url(#gradient_${F.value})`
1850
+ }, null, 8, Rt)) : b("", !0),
1851
+ S("circle", {
1852
+ ref_key: "circle_hollow",
1853
+ ref: jn,
1854
+ style: { pointerEvents: "none" },
1855
+ fill: "none",
1856
+ cx: V.value.width / 2,
1857
+ cy: V.value.height / 2,
1858
+ r: Math.max(.1, kr.value * 1.7)
1859
+ }, null, 8, zt),
1860
+ Z.value ? (E(), x(_, { key: 11 }, [K.value.length > 1 || L.value.type === "classic" ? (E(), x("g", Bt, [(E(!0), x(_, null, O(K.value.filter((e) => !e.ghost), (e, t) => (E(), x("path", {
1861
+ d: L.value.type === "classic" ? e.arcSlice : J.value[t].path,
1862
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1863
+ fill: I.value === t ? L.value.style.chart.layout.donut.selectedColor : "transparent",
1864
+ onMouseenter: (n) => Q({
1865
+ datapoint: e,
1866
+ relativeIndex: t,
1867
+ seriesIndex: e.seriesIndex,
1868
+ show: !0
1869
+ }),
1870
+ onMouseleave: (t) => ri({
1871
+ datapoint: e,
1872
+ seriesIndex: e.seriesIndex
1873
+ }),
1874
+ onClick: (n) => $(e, t)
1875
+ }, null, 40, Vt))), 256))])) : (E(), x("g", Ht, [S("circle", {
1876
+ cx: V.value.width / 2,
1877
+ cy: V.value.height / 2,
1878
+ r: G.value,
1879
+ fill: "transparent",
1880
+ onMouseenter: r[0] ||= (e) => Q({
1881
+ datapoint: K.value[0],
1882
+ relativeIndex: 0,
1883
+ seriesIndex: K.value[0].seriesIndex,
1884
+ show: !0
1885
+ }),
1886
+ onMouseleave: r[1] ||= (e) => ri({
1887
+ datapoint: K.value[0],
1888
+ seriesIndex: K.value[0].seriesIndex
1889
+ }),
1890
+ onClick: r[2] ||= (e) => $(K.value[0], t.i)
1891
+ }, null, 40, Ut)]))], 64)) : b("", !0),
1892
+ L.value.type === "classic" ? (E(), x("g", {
1893
+ key: 12,
1894
+ ref_key: "G_hollow",
1895
+ ref: An,
1896
+ class: "vue-data-ui-donut-hollow-labels"
1897
+ }, [
1898
+ L.value.style.chart.layout.labels.hollow.total.show ? (E(), x("text", {
1899
+ key: 0,
1900
+ "text-anchor": "middle",
1901
+ x: V.value.width / 2,
1902
+ y: V.value.height / 2 - (L.value.style.chart.layout.labels.hollow.average.show ? L.value.style.chart.layout.labels.hollow.total.fontSize : 0) + L.value.style.chart.layout.labels.hollow.total.offsetY,
1903
+ fill: L.value.style.chart.layout.labels.hollow.total.color,
1904
+ "font-size": L.value.style.chart.layout.labels.hollow.total.fontSize,
1905
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1906
+ }, Ye(L.value.style.chart.layout.labels.hollow.total.text), 13, Wt)) : b("", !0),
1907
+ L.value.style.chart.layout.labels.hollow.total.show ? (E(), x("text", {
1908
+ key: 1,
1909
+ "text-anchor": "middle",
1910
+ x: V.value.width / 2,
1911
+ y: V.value.height / 2 + L.value.style.chart.layout.labels.hollow.total.fontSize - (L.value.style.chart.layout.labels.hollow.average.show ? L.value.style.chart.layout.labels.hollow.total.fontSize : 0) + L.value.style.chart.layout.labels.hollow.total.value.offsetY,
1912
+ fill: L.value.style.chart.layout.labels.hollow.total.value.color,
1913
+ "font-size": L.value.style.chart.layout.labels.hollow.total.value.fontSize,
1914
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1915
+ }, Ye(A(m)(L.value.style.chart.layout.labels.hollow.total.value.formatter, Z.value, A(d)({
1916
+ p: L.value.style.chart.layout.labels.hollow.total.value.prefix,
1917
+ v: Z.value,
1918
+ s: L.value.style.chart.layout.labels.hollow.total.value.suffix
1919
+ }))), 13, Gt)) : b("", !0),
1920
+ L.value.style.chart.layout.labels.hollow.average.show ? (E(), x("text", {
1921
+ key: 2,
1922
+ "text-anchor": "middle",
1923
+ x: V.value.width / 2,
1924
+ y: V.value.height / 2 + (L.value.style.chart.layout.labels.hollow.total.show ? L.value.style.chart.layout.labels.hollow.average.fontSize : 0) + L.value.style.chart.layout.labels.hollow.average.offsetY,
1925
+ fill: L.value.style.chart.layout.labels.hollow.average.color,
1926
+ "font-size": L.value.style.chart.layout.labels.hollow.average.fontSize,
1927
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1928
+ }, Ye(L.value.style.chart.layout.labels.hollow.average.text), 13, Kt)) : b("", !0),
1929
+ L.value.style.chart.layout.labels.hollow.average.show ? (E(), x("text", {
1930
+ key: 3,
1931
+ "text-anchor": "middle",
1932
+ x: V.value.width / 2,
1933
+ y: V.value.height / 2 + (L.value.style.chart.layout.labels.hollow.total.show ? L.value.style.chart.layout.labels.hollow.average.fontSize : 0) + L.value.style.chart.layout.labels.hollow.average.fontSize + L.value.style.chart.layout.labels.hollow.average.value.offsetY,
1934
+ fill: L.value.style.chart.layout.labels.hollow.average.value.color,
1935
+ "font-size": L.value.style.chart.layout.labels.hollow.average.value.fontSize,
1936
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1937
+ }, Ye(Mr.value || R.value ? "--" : A(m)(L.value.style.chart.layout.labels.hollow.average.value.formatter, A(ae)($r.value), A(d)({
1938
+ p: L.value.style.chart.layout.labels.hollow.average.value.prefix,
1939
+ v: A(ae)($r.value),
1940
+ s: L.value.style.chart.layout.labels.hollow.average.value.suffix,
1941
+ r: L.value.style.chart.layout.labels.hollow.average.value.rounding
1942
+ }))), 13, qt)) : b("", !0)
1943
+ ], 512)) : b("", !0),
1944
+ (E(!0), x(_, null, O(q.value.filter((e) => !e.ghost), (e, n) => (E(), x("g", {
1945
+ filter: si(n),
1946
+ key: e.seriesIndex,
1947
+ opacity: ci(e)
1948
+ }, [L.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (E(), x("g", Yt, [(E(), x("foreignObject", {
1949
+ x: A(p)(e, !0).anchor === "end" ? A(p)(e).x - 120 : A(p)(e, !0).anchor === "middle" ? A(p)(e).x - 60 : A(p)(e).x,
1950
+ y: A(g)(e) - (mi.value ? 20 : 0),
1951
+ width: "120",
1952
+ height: "60",
1953
+ style: { overflow: "visible" }
1954
+ }, [S("div", null, [k(t.$slots, "dataLabel", He({ ref_for: !0 }, {
1955
+ datapoint: e,
1956
+ isBlur: !L.value.useBlurOnHover || [null, void 0].includes(I.value) || I.value === n,
1957
+ isSafari: mi.value,
1958
+ isVisible: Y(e) && B.value.dataLabels.show,
1959
+ textAlign: A(p)(e, !0, 16, !0).anchor,
1960
+ flexAlign: A(p)(e, !0, 16).anchor,
1961
+ percentage: Xr(e, q.value)
1962
+ }), void 0, !0)])], 8, Xt))])) : (E(), x("g", Zt, [L.value.type === "classic" ? (E(), x(_, { key: 0 }, [Y(e) && B.value.dataLabels.show ? (E(), x("circle", {
1963
+ key: 0,
1964
+ cx: A(X)[n]?.markerX ?? A(p)(e).x,
1965
+ cy: A(X)[n]?.markerY ?? A(g)(e) - 3.5,
1966
+ fill: e.color,
1967
+ stroke: L.value.style.chart.backgroundColor,
1968
+ "stroke-width": 1,
1969
+ r: 3,
1970
+ filter: !L.value.useBlurOnHover || [null, void 0].includes(I.value) || I.value === n ? "" : `url(#blur_${F.value})`,
1971
+ onClick: (t) => $(e, n),
1972
+ onMouseenter: (t) => Q({
1973
+ datapoint: e,
1974
+ relativeIndex: n,
1975
+ seriesIndex: e.seriesIndex,
1976
+ show: !0
1977
+ }),
1978
+ onMouseleave: (t) => ri({
1979
+ datapoint: e,
1980
+ seriesIndex: e.seriesIndex
1981
+ })
1982
+ }, null, 40, Qt)) : b("", !0), L.value.style.chart.layout.labels.dataLabels.oneLine || A(X)[n] ? et((E(), x("text", {
1983
+ key: 1,
1984
+ class: "vue-data-ui-datalabel-inline",
1985
+ "text-anchor": A(X)[n]?.textAnchor || A(p)(e, !0, 12).anchor,
1986
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
1987
+ y: A(X)[n]?.labelY ?? A(g)(e),
1988
+ onClick: (t) => $(e, n),
1989
+ onMouseenter: (t) => Q({
1990
+ datapoint: e,
1991
+ relativeIndex: n,
1992
+ seriesIndex: e.seriesIndex,
1993
+ show: !0
1994
+ }),
1995
+ onMouseleave: (t) => ri({
1996
+ datapoint: e,
1997
+ seriesIndex: e.seriesIndex
1998
+ }),
1999
+ innerHTML: ai(e, n, !!A(X)[n])
2000
+ }, null, 40, $t)), [[Qe, Y(e) && B.value.dataLabels.show]]) : (E(), x(_, { key: 2 }, [et(S("text", {
2001
+ class: "vue-data-ui-datalabel-value",
2002
+ "text-anchor": A(X)[n]?.textAnchor || A(p)(e, !0, 12).anchor,
2003
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
2004
+ y: A(X)[n]?.labelY ?? A(g)(e),
2005
+ fill: L.value.style.chart.layout.labels.percentage.color,
2006
+ "font-size": Xn.value + "px",
2007
+ style: T(`font-weight:${L.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
2008
+ onClick: (t) => $(e, n),
2009
+ onMouseenter: (t) => Q({
2010
+ datapoint: e,
2011
+ relativeIndex: n,
2012
+ seriesIndex: e.seriesIndex,
2013
+ show: !0
2014
+ }),
2015
+ onMouseleave: (t) => ri({
2016
+ datapoint: e,
2017
+ seriesIndex: e.seriesIndex
2018
+ })
2019
+ }, Ye(_i(e)), 45, en), [[Qe, Y(e) && B.value.dataLabels.show]]), et(S("text", {
2020
+ class: "vue-data-ui-datalabel-name",
2021
+ "text-anchor": A(X)[n]?.textAnchor || A(p)(e).anchor,
2022
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
2023
+ y: (A(X)[n]?.labelY ?? A(g)(e)) + P.value * 1.2,
2024
+ fill: L.value.style.chart.layout.labels.name.color,
2025
+ "font-size": P.value + "px",
2026
+ style: T(`font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
2027
+ onClick: (t) => $(e, n),
2028
+ onMouseenter: (t) => Q({
2029
+ datapoint: e,
2030
+ relativeIndex: n,
2031
+ seriesIndex: e.seriesIndex,
2032
+ show: !0
2033
+ }),
2034
+ onMouseleave: (t) => ri({
2035
+ datapoint: e,
2036
+ seriesIndex: e.seriesIndex
2037
+ }),
2038
+ innerHTML: A(a)({
2039
+ content: e.name,
2040
+ fontSize: P.value,
2041
+ fill: L.value.style.chart.layout.labels.name.color,
2042
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
2043
+ y: (A(X)[n]?.labelY ?? A(g)(e)) + P.value
2044
+ })
2045
+ }, null, 44, tn), [[Qe, Y(e, !0, 12) && B.value.dataLabels.show && L.value.style.chart.layout.labels.name.show]])], 64))], 64)) : b("", !0), L.value.type === "polar" ? (E(), x(_, { key: 1 }, [Y(e) && B.value.dataLabels.show ? (E(), x("circle", {
2046
+ key: 0,
2047
+ cx: A(s)({
2048
+ initX: J.value[n].middlePoint.x,
2049
+ initY: J.value[n].middlePoint.y,
2050
+ offset: 24,
2051
+ centerX: V.value.width / 2,
2052
+ centerY: V.value.height / 2
2053
+ }).x,
2054
+ cy: A(s)({
2055
+ initX: J.value[n].middlePoint.x,
2056
+ initY: J.value[n].middlePoint.y,
2057
+ offset: 24,
2058
+ centerX: V.value.width / 2,
2059
+ centerY: V.value.height / 2
2060
+ }).y,
2061
+ fill: e.color,
2062
+ stroke: L.value.style.chart.backgroundColor,
2063
+ "stroke-width": 1,
2064
+ r: 3,
2065
+ filter: !L.value.useBlurOnHover || [null, void 0].includes(I.value) || I.value === n ? "" : `url(#blur_${F.value})`,
2066
+ onClick: (t) => $(e, n),
2067
+ onMouseenter: (t) => Q({
2068
+ datapoint: e,
2069
+ relativeIndex: n,
2070
+ seriesIndex: e.seriesIndex,
2071
+ show: !0
2072
+ }),
2073
+ onMouseleave: (t) => ri({
2074
+ datapoint: e,
2075
+ seriesIndex: e.seriesIndex
2076
+ }),
2077
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
2078
+ }, null, 44, nn)) : b("", !0), L.value.style.chart.layout.labels.dataLabels.oneLine ? et((E(), x("text", {
2079
+ key: 1,
2080
+ class: "vue-data-ui-datalabel-inline",
2081
+ "text-anchor": qr(J.value[n].middlePoint),
2082
+ x: A(s)({
2083
+ initX: J.value[n].middlePoint.x,
2084
+ initY: J.value[n].middlePoint.y,
2085
+ offset: 42,
2086
+ centerX: V.value.width / 2,
2087
+ centerY: V.value.height / 2
2088
+ }).x,
2089
+ y: A(s)({
2090
+ initX: J.value[n].middlePoint.x,
2091
+ initY: J.value[n].middlePoint.y,
2092
+ offset: 42,
2093
+ centerX: V.value.width / 2,
2094
+ centerY: V.value.height / 2
2095
+ }).y,
2096
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` }),
2097
+ onClick: (t) => $(e, n),
2098
+ onMouseenter: (t) => Q({
2099
+ datapoint: e,
2100
+ relativeIndex: n,
2101
+ seriesIndex: e.seriesIndex,
2102
+ show: !0
2103
+ }),
2104
+ onMouseleave: (t) => ri({
2105
+ datapoint: e,
2106
+ seriesIndex: e.seriesIndex
2107
+ }),
2108
+ innerHTML: oi(e, n)
2109
+ }, null, 44, rn)), [[Qe, Y(e) && B.value.dataLabels.show]]) : (E(), x(_, { key: 2 }, [Y(e) && B.value.dataLabels.show ? (E(), x("text", {
2110
+ key: 0,
2111
+ class: "vue-data-ui-datalabel-value",
2112
+ "text-anchor": qr(J.value[n].middlePoint),
2113
+ x: A(s)({
2114
+ initX: J.value[n].middlePoint.x,
2115
+ initY: J.value[n].middlePoint.y,
2116
+ offset: 42,
2117
+ centerX: V.value.width / 2,
2118
+ centerY: V.value.height / 2
2119
+ }).x,
2120
+ y: A(s)({
2121
+ initX: J.value[n].middlePoint.x,
2122
+ initY: J.value[n].middlePoint.y,
2123
+ offset: 42,
2124
+ centerX: V.value.width / 2,
2125
+ centerY: V.value.height / 2
2126
+ }).y,
2127
+ fill: L.value.style.chart.layout.labels.percentage.color,
2128
+ "font-size": Xn.value,
2129
+ style: T({
2130
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2131
+ fontWeight: L.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
2132
+ }),
2133
+ onClick: (t) => $(e, n),
2134
+ onMouseenter: (t) => Q({
2135
+ datapoint: e,
2136
+ relativeIndex: n,
2137
+ seriesIndex: e.seriesIndex,
2138
+ show: !0
2139
+ }),
2140
+ onMouseleave: (t) => ri({
2141
+ datapoint: e,
2142
+ seriesIndex: e.seriesIndex
2143
+ })
2144
+ }, Ye(_i(e)), 45, an)) : b("", !0), Y(e, !0, 12) && B.value.dataLabels.show && L.value.style.chart.layout.labels.name.show ? (E(), x("text", {
2145
+ key: 1,
2146
+ class: "vue-data-ui-datalabel-name",
2147
+ "text-anchor": qr(J.value[n].middlePoint),
2148
+ x: A(s)({
2149
+ initX: J.value[n].middlePoint.x,
2150
+ initY: J.value[n].middlePoint.y,
2151
+ offset: 42,
2152
+ centerX: V.value.width / 2,
2153
+ centerY: V.value.height / 2
2154
+ }).x,
2155
+ y: A(s)({
2156
+ initX: J.value[n].middlePoint.x,
2157
+ initY: J.value[n].middlePoint.y,
2158
+ offset: 42,
2159
+ centerX: V.value.width / 2,
2160
+ centerY: V.value.height / 2
2161
+ }).y + P.value * 1.2,
2162
+ fill: L.value.style.chart.layout.labels.name.color,
2163
+ "font-size": P.value,
2164
+ style: T({
2165
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2166
+ fontWeight: L.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
2167
+ }),
2168
+ onClick: (t) => $(e, n),
2169
+ onMouseenter: (t) => Q({
2170
+ datapoint: e,
2171
+ relativeIndex: n,
2172
+ seriesIndex: e.seriesIndex,
2173
+ show: !0
2174
+ }),
2175
+ onMouseleave: (t) => ri({
2176
+ datapoint: e,
2177
+ seriesIndex: e.seriesIndex
2178
+ }),
2179
+ innerHTML: A(a)({
2180
+ content: e.name,
2181
+ fontSize: P.value,
2182
+ fill: L.value.style.chart.layout.labels.name.color,
2183
+ x: A(s)({
2184
+ initX: J.value[n].middlePoint.x,
2185
+ initY: J.value[n].middlePoint.y,
2186
+ offset: 42,
2187
+ centerX: V.value.width / 2,
2188
+ centerY: V.value.height / 2
2189
+ }).x,
2190
+ y: A(s)({
2191
+ initX: J.value[n].middlePoint.x,
2192
+ initY: J.value[n].middlePoint.y,
2193
+ offset: 42,
2194
+ centerX: V.value.width / 2,
2195
+ centerY: V.value.height / 2
2196
+ }).y + P.value * 1.2
2197
+ })
2198
+ }, null, 44, on)) : b("", !0)], 64))], 64)) : b("", !0)])), B.value.dataLabels.show && L.value.style.chart.comments.show && e.comment ? (E(), x("g", sn, [Y(e) && L.value.type === "classic" ? (E(), x("foreignObject", {
2199
+ key: 0,
2200
+ x: L.value.style.chart.comments.offsetX + (A(p)(e, !0).anchor === "end" ? A(p)(e).x - L.value.style.chart.comments.width : A(p)(e, !0).anchor === "middle" ? A(p)(e).x - L.value.style.chart.comments.width / 2 : A(p)(e).x),
2201
+ y: A(g)(e) + 24 + L.value.style.chart.comments.offsetY,
2202
+ width: L.value.style.chart.comments.width,
2203
+ height: "200",
2204
+ style: {
2205
+ overflow: "visible",
2206
+ "pointer-events": "none"
2207
+ }
2208
+ }, [S("div", null, [k(t.$slots, "plot-comment", { plot: {
2209
+ ...e,
2210
+ textAlign: A(p)(e, !0, 16, !0).anchor,
2211
+ flexAlign: A(p)(e, !0, 16).anchor,
2212
+ isFirstLoad: R.value
2213
+ } }, void 0, !0)])], 8, cn)) : b("", !0), Y(e) && L.value.type === "polar" ? (E(), x("foreignObject", {
2214
+ key: 1,
2215
+ x: L.value.style.chart.comments.offsetX + (qr(J.value[n].middlePoint) === "end" ? A(s)({
2216
+ initX: J.value[n].middlePoint.x,
2217
+ initY: J.value[n].middlePoint.y,
2218
+ offset: 42,
2219
+ centerX: V.value.width / 2,
2220
+ centerY: V.value.height / 2
2221
+ }).x - L.value.style.chart.comments.width : qr(J.value[n].middlePoint) === "middle" ? A(s)({
2222
+ initX: J.value[n].middlePoint.x,
2223
+ initY: J.value[n].middlePoint.y,
2224
+ offset: 42,
2225
+ centerX: V.value.width / 2,
2226
+ centerY: V.value.height / 2
2227
+ }).x - L.value.style.chart.comments.width / 2 : A(s)({
2228
+ initX: J.value[n].middlePoint.x,
2229
+ initY: J.value[n].middlePoint.y,
2230
+ offset: 42,
2231
+ centerX: V.value.width / 2,
2232
+ centerY: V.value.height / 2
2233
+ }).x),
2234
+ y: Jr(J.value[n]) + L.value.style.chart.comments.offsetY,
2235
+ width: L.value.style.chart.comments.width,
2236
+ height: "200",
2237
+ style: T({
2238
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2239
+ overflow: "visible",
2240
+ pointerEvents: "none"
2241
+ })
2242
+ }, [S("div", null, [k(t.$slots, "plot-comment", { plot: {
2243
+ ...e,
2244
+ textAlign: qr(J.value[n].middlePoint),
2245
+ flexAlign: qr(J.value[n].middlePoint),
2246
+ isFirstLoad: R.value
2247
+ } }, void 0, !0)])], 12, ln)) : b("", !0)])) : b("", !0)], 8, Jt))), 128)),
2248
+ k(t.$slots, "svg", { svg: {
2249
+ ...V.value,
2250
+ datapoints: K.value,
2251
+ isPrintingImg: A(Cr) || A(wr) || Wn.value,
2252
+ isPrintingSvg: Gn.value
2253
+ } }, void 0, !0)
2254
+ ], 512)], 46, st)), t.$slots.hint ? (E(), x("div", un, [k(t.$slots, "hint", w(C({
2255
+ hint: L.value.a11y.translations.keyboardNavigation,
2256
+ isVisible: Yn.value
2257
+ })), void 0, !0)])) : b("", !0)]),
2258
+ t.$slots.watermark ? (E(), x("div", dn, [k(t.$slots, "watermark", w(C({ isPrinting: A(Cr) || A(wr) || Wn.value || Gn.value })), void 0, !0)])) : b("", !0),
2259
+ S("div", { id: `legend-bottom-${F.value}` }, null, 8, fn),
2260
+ Vn.value && (L.value.style.chart.legend.show || t.$slots.legend) ? (E(), y(Le, {
2261
+ key: 6,
2262
+ to: L.value.style.chart.legend.position === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
2263
+ }, [S("div", {
2264
+ ref_key: "chartLegend",
2265
+ ref: Nn
2266
+ }, [k(t.$slots, "legend", { legend: Ur.value }, () => [L.value.style.chart.legend.show ? (E(), y(Ie, {
2267
+ key: `legend_${Bn.value}`,
2268
+ legendSet: Ur.value,
2269
+ config: Wr.value,
2270
+ onClickMarker: r[3] ||= ({ i: e }) => Lr(e),
2271
+ isCursorPointer: sr.value
2272
+ }, Re({
2273
+ item: j(({ legend: e, index: t }) => [S("div", {
2274
+ style: T(`opacity:${W.value.includes(t) ? .5 : 1}`),
2275
+ onClick: (t) => e.segregate()
2276
+ }, Ye(e.display), 13, pn)]),
2277
+ legendToggle: j(() => [Ur.value.length > 2 && L.value.style.chart.legend.selectAllToggle.show && !A(lr) ? (E(), y(ke, {
2278
+ key: 0,
2279
+ backgroundColor: L.value.style.chart.legend.selectAllToggle.backgroundColor,
2280
+ color: L.value.style.chart.legend.selectAllToggle.color,
2281
+ fontSize: L.value.style.chart.legend.fontSize,
2282
+ checked: W.value.length > 0,
2283
+ isCursorPointer: sr.value,
2284
+ onToggle: Ir
2285
+ }, null, 8, [
2286
+ "backgroundColor",
2287
+ "color",
2288
+ "fontSize",
2289
+ "checked",
2290
+ "isCursorPointer"
2291
+ ])) : b("", !0)]),
2292
+ _: 2
2293
+ }, [t.$slots.pattern ? {
2294
+ name: "legend-pattern",
2295
+ fn: j(({ legend: e, index: t }) => [Be(we, {
2296
+ shape: e.shape,
2297
+ radius: 30,
2298
+ stroke: "none",
2299
+ plot: {
2300
+ x: 30,
2301
+ y: 30
2302
+ },
2303
+ fill: `url(#pattern_${F.value}_${t})`
2304
+ }, null, 8, ["shape", "fill"])]),
2305
+ key: "0"
2306
+ } : void 0]), 1032, [
2307
+ "legendSet",
2308
+ "config",
2309
+ "isCursorPointer"
2310
+ ])) : b("", !0)], !0)], 512)], 8, ["to"])) : b("", !0),
2311
+ t.$slots.source ? (E(), x("div", {
2312
+ key: 7,
2313
+ ref_key: "source",
2314
+ ref: In,
2315
+ dir: "auto"
2316
+ }, [k(t.$slots, "source", {}, void 0, !0)], 512)) : b("", !0),
2317
+ t.$slots.hollow ? (E(), x("div", mn, [k(t.$slots, "hollow", w(C({
2318
+ total: Z.value,
2319
+ average: $r.value,
2320
+ dataset: H.value,
2321
+ ...V.value
2322
+ })), void 0, !0)])) : b("", !0),
2323
+ Be(A(gn), {
2324
+ teleportTo: L.value.style.chart.tooltip.teleportTo,
2325
+ show: B.value.showTooltip && rr.value,
2326
+ backgroundColor: L.value.style.chart.tooltip.backgroundColor,
2327
+ color: L.value.style.chart.tooltip.color,
2328
+ fontSize: L.value.style.chart.tooltip.fontSize,
2329
+ borderRadius: L.value.style.chart.tooltip.borderRadius,
2330
+ borderColor: L.value.style.chart.tooltip.borderColor,
2331
+ borderWidth: L.value.style.chart.tooltip.borderWidth,
2332
+ backgroundOpacity: L.value.style.chart.tooltip.backgroundOpacity,
2333
+ position: L.value.style.chart.tooltip.position,
2334
+ offsetX: L.value.style.chart.tooltip.offsetX,
2335
+ offsetY: L.value.style.chart.tooltip.offsetY,
2336
+ parent: N.value,
2337
+ content: ir.value,
2338
+ isCustom: ni.value,
2339
+ isFullscreen: fi.value,
2340
+ smooth: L.value.style.chart.tooltip.smooth,
2341
+ backdropFilter: L.value.style.chart.tooltip.backdropFilter,
2342
+ smoothForce: L.value.style.chart.tooltip.smoothForce,
2343
+ smoothSnapThreshold: L.value.style.chart.tooltip.smoothSnapThrehsold,
2344
+ isA11yMode: Jn.value === "keyboard",
2345
+ a11yPosition: qn.value
2346
+ }, {
2347
+ "tooltip-before": j(() => [k(t.$slots, "tooltip-before", w(C({ ...ti.value })), void 0, !0)]),
2348
+ tooltip: j(() => [k(t.$slots, "tooltip", w(C({ ...ti.value })), void 0, !0)]),
2349
+ "tooltip-after": j(() => [k(t.$slots, "tooltip-after", w(C({ ...ti.value })), void 0, !0)]),
2350
+ _: 3
2351
+ }, 8, [
2352
+ "teleportTo",
2353
+ "show",
2354
+ "backgroundColor",
2355
+ "color",
2356
+ "fontSize",
2357
+ "borderRadius",
2358
+ "borderColor",
2359
+ "borderWidth",
2360
+ "backgroundOpacity",
2361
+ "position",
2362
+ "offsetX",
2363
+ "offsetY",
2364
+ "parent",
2365
+ "content",
2366
+ "isCustom",
2367
+ "isFullscreen",
2368
+ "smooth",
2369
+ "backdropFilter",
2370
+ "smoothForce",
2371
+ "smoothSnapThreshold",
2372
+ "isA11yMode",
2373
+ "a11yPosition"
2374
+ ]),
2375
+ On.value && L.value.userOptions.buttons.table ? (E(), y(qe(Ti.value.component), He({ key: 9 }, Ti.value.props, {
2376
+ ref_key: "tableUnit",
2377
+ ref: Hn,
2378
+ onClose: Ei
2379
+ }), Re({
2380
+ content: j(() => [(E(), y(A(yn), {
2381
+ key: `table_${zn.value}`,
2382
+ colNames: di.value.colNames,
2383
+ head: di.value.head,
2384
+ body: di.value.body,
2385
+ config: di.value.config,
2386
+ title: L.value.table.useDialog ? "" : Ti.value.title,
2387
+ withCloseButton: !L.value.table.useDialog,
2388
+ isCursorPointer: sr.value,
2389
+ onClose: Ei
2390
+ }, {
2391
+ th: j(({ th: e }) => [S("div", {
2392
+ innerHTML: e,
2393
+ style: {
2394
+ display: "flex",
2395
+ "align-items": "center"
2396
+ }
2397
+ }, null, 8, hn)]),
2398
+ td: j(({ td: e }) => [ze(Ye(e.name ? e.name : isNaN(Number(e)) ? e.includes("%") ? e : A(m)(L.value.style.chart.layout.labels.percentage.formatter, e, A(d)({
2399
+ v: e,
2400
+ s: "%",
2401
+ r: L.value.style.chart.layout.labels.percentage.rounding
2402
+ })) : A(m)(L.value.style.chart.layout.labels.value.formatter, e, A(d)({
2403
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
2404
+ v: e,
2405
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
2406
+ r: L.value.style.chart.layout.labels.value.rounding
2407
+ }))), 1)]),
2408
+ _: 1
2409
+ }, 8, [
2410
+ "colNames",
2411
+ "head",
2412
+ "body",
2413
+ "config",
2414
+ "title",
2415
+ "withCloseButton",
2416
+ "isCursorPointer"
2417
+ ]))]),
2418
+ _: 2
2419
+ }, [L.value.table.useDialog ? {
2420
+ name: "title",
2421
+ fn: j(() => [ze(Ye(Ti.value.title), 1)]),
2422
+ key: "0"
2423
+ } : void 0, L.value.table.useDialog ? {
2424
+ name: "actions",
2425
+ fn: j(() => [S("button", {
2426
+ tabindex: "0",
2427
+ class: "vue-ui-user-options-button",
2428
+ onClick: r[4] ||= (e) => ui(L.value.userOptions.callbacks.csv),
2429
+ style: T({ cursor: sr.value ? "pointer" : "default" })
2430
+ }, [Be(A(_n), {
2431
+ name: "fileCsv",
2432
+ stroke: Ti.value.props.color
2433
+ }, null, 8, ["stroke"])], 4)]),
2434
+ key: "1"
2435
+ } : void 0]), 1040)) : b("", !0),
2436
+ k(t.$slots, "skeleton", {}, () => [A(lr) ? (E(), y(ve, { key: 0 })) : b("", !0)], !0)
2437
+ ], 46, rt));
2438
+ }
2439
+ }, [["__scopeId", "data-v-f2bbb030"]]);
2440
+ //#endregion
2441
+ export { nt as n, gn as t };