vue-data-ui 3.28.2 → 3.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +25 -1
  2. package/dist/{PackageVersion-BIhjLNBU.js → PackageVersion-CXT-eAuk.js} +1 -1
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-age-pyramid.js +1 -1
  5. package/dist/components/vue-ui-annotator.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-graph.js +1 -1
  27. package/dist/components/vue-ui-heatmap.js +1 -1
  28. package/dist/components/vue-ui-hill.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-mini-loader.js +1 -1
  33. package/dist/components/vue-ui-molecule.js +1 -1
  34. package/dist/components/vue-ui-mood-radar.js +1 -1
  35. package/dist/components/vue-ui-nested-donuts.js +1 -1
  36. package/dist/components/vue-ui-onion.js +1 -1
  37. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  38. package/dist/components/vue-ui-quadrant.js +1 -1
  39. package/dist/components/vue-ui-quick-chart.js +1 -1
  40. package/dist/components/vue-ui-radar.js +1 -1
  41. package/dist/components/vue-ui-rating.js +1 -1
  42. package/dist/components/vue-ui-relation-circle.js +1 -1
  43. package/dist/components/vue-ui-ridgeline.js +1 -1
  44. package/dist/components/vue-ui-rings.js +1 -1
  45. package/dist/components/vue-ui-scatter.js +1 -1
  46. package/dist/components/vue-ui-skeleton.js +1 -1
  47. package/dist/components/vue-ui-smiley.js +1 -1
  48. package/dist/components/vue-ui-spark-trend.js +1 -1
  49. package/dist/components/vue-ui-sparkbar.js +1 -1
  50. package/dist/components/vue-ui-sparkgauge.js +1 -1
  51. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  52. package/dist/components/vue-ui-sparkline.js +1 -1
  53. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  54. package/dist/components/vue-ui-stackbar.js +1 -1
  55. package/dist/components/vue-ui-stackline.js +1 -1
  56. package/dist/components/vue-ui-strip-plot.js +1 -1
  57. package/dist/components/vue-ui-table-heatmap.js +1 -1
  58. package/dist/components/vue-ui-table-sparkline.js +1 -1
  59. package/dist/components/vue-ui-table.js +1 -1
  60. package/dist/components/vue-ui-thermometer.js +1 -1
  61. package/dist/components/vue-ui-timer.js +1 -1
  62. package/dist/components/vue-ui-tiremarks.js +1 -1
  63. package/dist/components/vue-ui-treemap.js +1 -1
  64. package/dist/components/vue-ui-vertical-bar.js +1 -1
  65. package/dist/components/vue-ui-waffle.js +1 -1
  66. package/dist/components/vue-ui-wheel.js +1 -1
  67. package/dist/components/vue-ui-word-cloud.js +1 -1
  68. package/dist/components/vue-ui-world.js +1 -1
  69. package/dist/components/vue-ui-xy-canvas.js +1 -1
  70. package/dist/components/vue-ui-xy.js +1 -1
  71. package/dist/geoProjections-CX3Pvo1N.js +1 -0
  72. package/dist/llms.txt +9 -34
  73. package/dist/package-CgIKu3rP.js +1 -0
  74. package/dist/pdf-CVdqBWVS.js +1 -0
  75. package/dist/{render-common-B-s2XJ_I.js → render-common-C70bnUVe.js} +1 -1
  76. package/dist/ssr/vue-ui-donut.js +1 -1
  77. package/dist/ssr/vue-ui-xy.js +1 -1
  78. package/dist/ssr.js +1 -1
  79. package/dist/style.css +1 -1
  80. package/dist/{useHints-BH9r_0Vd.js → useHints-C-TwxM0Y.js} +1 -1
  81. package/dist/{useObjectBindings-DiMX4HGv.js → useObjectBindings-C15PEyQD.js} +1 -1
  82. package/dist/{usePrinter-sVoTzet1.js → usePrinter-DVf3YcG5.js} +1 -1
  83. package/dist/useSvgLabelLayout-42Kats14.js +1 -0
  84. package/dist/utils.js +1 -1
  85. package/dist/vue-data-ui-CrOhFey9.js +1 -0
  86. package/dist/vue-data-ui.js +1 -1
  87. package/dist/{vue-ui-3d-bar-CkHFiFp4.js → vue-ui-3d-bar-ljsy2rX6.js} +2 -2
  88. package/dist/{vue-ui-age-pyramid-vpIjdLg5.js → vue-ui-age-pyramid-a6CK7z3a.js} +1 -1
  89. package/dist/{vue-ui-annotator-CdCDYzdK.js → vue-ui-annotator-DCJdieNC.js} +3 -3
  90. package/dist/{vue-ui-bullet-rgxGRR1p.js → vue-ui-bullet-DX4A2Qwo.js} +2 -2
  91. package/dist/{vue-ui-bump-CeDsunDi.js → vue-ui-bump-IvRdB6MD.js} +2 -2
  92. package/dist/{vue-ui-candlestick-KJHOS5F7.js → vue-ui-candlestick-BgyUo13S.js} +2 -2
  93. package/dist/{vue-ui-carousel-table-CeI5SIxH.js → vue-ui-carousel-table-D01DGfA0.js} +1 -1
  94. package/dist/vue-ui-chestnut-DYrMSzmQ.js +1 -0
  95. package/dist/{vue-ui-chord-8rk7304-.js → vue-ui-chord-CwzQ7QbP.js} +2 -2
  96. package/dist/{vue-ui-circle-pack-BsH09EPG.js → vue-ui-circle-pack-DQHNM9sC.js} +2 -2
  97. package/dist/{vue-ui-cursor-Cpov2m58.js → vue-ui-cursor-CTFfbDX8.js} +1 -1
  98. package/dist/{vue-ui-dag-BHFL2cUA.js → vue-ui-dag-DF29_9Gg.js} +2 -2
  99. package/dist/{vue-ui-dashboard-BxXdhdNJ.js → vue-ui-dashboard-D98rMHjI.js} +1 -1
  100. package/dist/{vue-ui-digits-xHOLjA2_.js → vue-ui-digits-AoPCgSfP.js} +1 -1
  101. package/dist/{vue-ui-donut-CR3klUbX.js → vue-ui-donut-BQGnUso2.js} +1 -1
  102. package/dist/{vue-ui-donut-Vbp5Xs2-.js → vue-ui-donut-BYUkblpv.js} +2 -2
  103. package/dist/{vue-ui-donut-evolution-BTmztL3Y.js → vue-ui-donut-evolution-wxHDTKlg.js} +2 -2
  104. package/dist/{vue-ui-dumbbell-CDcgKS2A.js → vue-ui-dumbbell-DR7rjMt0.js} +2 -2
  105. package/dist/{vue-ui-flow-kVocPE27.js → vue-ui-flow-DtQlRSK_.js} +2 -2
  106. package/dist/vue-ui-funnel-BP3chlZy.js +1 -0
  107. package/dist/{vue-ui-galaxy-hP-9mVlB.js → vue-ui-galaxy-B7ogrJ6f.js} +1 -1
  108. package/dist/{vue-ui-gauge-BRabsLkh.js → vue-ui-gauge-CrmzNkjT.js} +1 -1
  109. package/dist/{vue-ui-geo-Dacnp6iw.js → vue-ui-geo-BbTvWbfX.js} +1 -1
  110. package/dist/{vue-ui-gizmo-Dp3hpHIX.js → vue-ui-gizmo-C3wgMKwb.js} +1 -1
  111. package/dist/{vue-ui-graph-DHU9hUry.js → vue-ui-graph-CzUVEiO-.js} +2 -2
  112. package/dist/{vue-ui-heatmap-kPnmZgWi.js → vue-ui-heatmap-BxR2ccwd.js} +1 -1
  113. package/dist/{vue-ui-hill-Ddbup7-b.js → vue-ui-hill-BDOd7LrC.js} +1 -1
  114. package/dist/{vue-ui-history-plot-CwO2o-2s.js → vue-ui-history-plot-0-vs_CVn.js} +2 -2
  115. package/dist/{vue-ui-horizontal-bar-CvX77vE4.js → vue-ui-horizontal-bar-C5pNTRKB.js} +2 -2
  116. package/dist/{vue-ui-kpi-CCOOwX_Q.js → vue-ui-kpi-Dfhsk0U1.js} +1 -1
  117. package/dist/{vue-ui-mini-loader-7gqQI5jy.js → vue-ui-mini-loader-Bbupx66Y.js} +1 -1
  118. package/dist/vue-ui-molecule-DUX1NUIY.js +1 -0
  119. package/dist/{vue-ui-mood-radar-GJ-lhgI0.js → vue-ui-mood-radar-B1N5AwX_.js} +1 -1
  120. package/dist/{vue-ui-nested-donuts-CrlPwpg8.js → vue-ui-nested-donuts-CfHH-cU6.js} +2 -2
  121. package/dist/{vue-ui-onion-CKmyy-Y_.js → vue-ui-onion-DRN-jIvq.js} +2 -2
  122. package/dist/{vue-ui-parallel-coordinate-plot-C0UqWt0M.js → vue-ui-parallel-coordinate-plot-UUPjQABF.js} +2 -2
  123. package/dist/{vue-ui-quadrant-CTGFBNo9.js → vue-ui-quadrant-zmtzn0lM.js} +2 -2
  124. package/dist/{vue-ui-quick-chart-ZBOPZhxA.js → vue-ui-quick-chart-DgU_IhKY.js} +2 -2
  125. package/dist/{vue-ui-radar-B1z3Ux3E.js → vue-ui-radar-BGSoxRaK.js} +1 -1
  126. package/dist/{vue-ui-rating-CV2b0tjA.js → vue-ui-rating-ChWXrWNJ.js} +1 -1
  127. package/dist/{vue-ui-relation-circle-DqN5N08e.js → vue-ui-relation-circle-XUw5UMrt.js} +1 -1
  128. package/dist/{vue-ui-ridgeline-DcSB5Qef.js → vue-ui-ridgeline-B5RJcFyA.js} +2 -2
  129. package/dist/{vue-ui-rings-CJqAnf-l.js → vue-ui-rings-BJaCLH2Q.js} +1 -1
  130. package/dist/{vue-ui-scatter-THQAeoWs.js → vue-ui-scatter-BA0hk_Tf.js} +2 -2
  131. package/dist/{vue-ui-skeleton-DqmhigQ0.js → vue-ui-skeleton-DpzaXPO3.js} +1 -1
  132. package/dist/{vue-ui-smiley-VTdQetY0.js → vue-ui-smiley--VTlUAdp.js} +1 -1
  133. package/dist/{vue-ui-spark-trend-B2Nf1raK.js → vue-ui-spark-trend-DJ63XtgQ.js} +1 -1
  134. package/dist/{vue-ui-sparkbar-CamZ_49V.js → vue-ui-sparkbar-C5wP9R67.js} +1 -1
  135. package/dist/{vue-ui-sparkgauge-Ffrp_7VV.js → vue-ui-sparkgauge-DQcAOGuG.js} +1 -1
  136. package/dist/{vue-ui-sparkhistogram-CLfzi3PO.js → vue-ui-sparkhistogram-BBiCxX6W.js} +1 -1
  137. package/dist/{vue-ui-sparkline-Y-sljnbS.js → vue-ui-sparkline-B_GkB9V_.js} +1 -1
  138. package/dist/{vue-ui-sparkstackbar-CYZ-ADO1.js → vue-ui-sparkstackbar-DSRXhqhJ.js} +1 -1
  139. package/dist/{vue-ui-stackbar-CQLYm10x.js → vue-ui-stackbar-QjOQHbld.js} +2 -2
  140. package/dist/{vue-ui-stackline-VpvF7MRx.js → vue-ui-stackline-CoII13bc.js} +2 -2
  141. package/dist/{vue-ui-strip-plot-B9Ogpw7K.js → vue-ui-strip-plot-d3UoFFrf.js} +2 -2
  142. package/dist/{vue-ui-table-Bi9C3LzP.js → vue-ui-table-CHFjZzW7.js} +1 -1
  143. package/dist/{vue-ui-table-heatmap-BtziURiu.js → vue-ui-table-heatmap-DzvPQnY9.js} +1 -1
  144. package/dist/{vue-ui-table-sparkline-DEVAL0cR.js → vue-ui-table-sparkline-BkZ7sn4X.js} +1 -1
  145. package/dist/{vue-ui-thermometer-ClN4EO0I.js → vue-ui-thermometer-B--g_Lkt.js} +1 -1
  146. package/dist/{vue-ui-timer-nqZxt1vU.js → vue-ui-timer-DmwEWrDh.js} +2 -2
  147. package/dist/{vue-ui-tiremarks-BeJBsgXo.js → vue-ui-tiremarks-160Gx7-3.js} +1 -1
  148. package/dist/{vue-ui-treemap-FA-yXwmv.js → vue-ui-treemap-B-Yjtob0.js} +1 -1
  149. package/dist/{vue-ui-waffle-CO07S6HV.js → vue-ui-waffle-BhzLg5ip.js} +1 -1
  150. package/dist/{vue-ui-wheel-BeaSWB4x.js → vue-ui-wheel-DHb4G42X.js} +1 -1
  151. package/dist/{vue-ui-word-cloud-C1OWGFng.js → vue-ui-word-cloud-BcpreM7A.js} +2 -2
  152. package/dist/{vue-ui-world-CUS_mKgl.js → vue-ui-world-BD9acchj.js} +2 -2
  153. package/dist/vue-ui-xy-C-2Phexw.js +24 -0
  154. package/dist/{vue-ui-xy-BigPHE0Q.js → vue-ui-xy-CB3lQs2m.js} +1 -1
  155. package/dist/{vue-ui-xy-canvas-CeC3gcrW.js → vue-ui-xy-canvas-Do4P4ajB.js} +2 -2
  156. package/package.json +141 -131
  157. package/dist/geoProjections-Bvj-eMvq.js +0 -1
  158. package/dist/package-DwcKiXuI.js +0 -1
  159. package/dist/pdf-DAicVFxx.js +0 -1
  160. package/dist/useSvgLabelLayout-D1I8sQUi.js +0 -1
  161. package/dist/vue-data-ui-BvHCscNE.js +0 -1
  162. package/dist/vue-ui-chestnut-CiY-2e77.js +0 -1
  163. package/dist/vue-ui-funnel-CZAdPYqK.js +0 -1
  164. package/dist/vue-ui-molecule-BPGs9Dom.js +0 -1
  165. package/dist/vue-ui-xy-6B_K-quN.js +0 -24
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{X as n}from"./lib-rPeBMZrn.js";import{n as r,t as i}from"./useHints-BH9r_0Vd.js";import{t as a}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ee}from"./useNestedProp-DnGoh-XS.js";import{n as te,t as ne}from"./annotationSlots-BRR85CqJ.js";import{n as re,t as ie}from"./userOptionsSlots-DYuo-E5m.js";import{t as ae}from"./usePrinter-sVoTzet1.js";import{t as oe}from"./useUserOptionState-CXlFnwPv.js";import{t as se}from"./UserOptions-uWHV_zPB.js";import{n as ce}from"./PenAndPaper-BGEp-TUm.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as le,normalizeClass as ue,normalizeProps as de,normalizeStyle as h,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as fe,unref as b,useCssVars as pe,watch as x,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>T}),me=[`id`],he=[`onMousedown`,`onTouchstart`],ge=[`onMousedown`,`onTouchstart`],_e=[`onMousedown`,`onTouchstart`],ve=[`onMousedown`,`onTouchstart`],ye=[`onMousedown`,`onTouchstart`],w=1,T=/*#__PURE__*/ a({__name:`vue-ui-dashboard`,props:{dataset:Array,config:Object},emits:[`change`,`copyAlt`],setup(e,{expose:a,emit:C}){pe(e=>({ed4ebd52:Me.value,v1504d0e3:Ne.value}));let T={VueDataUi:p(()=>import(`./vue-data-ui-BvHCscNE.js`).then(e=>e.n)),VueUi3dBar:p(()=>import(`./vue-ui-3d-bar-CkHFiFp4.js`).then(e=>e.n)),VueUiAccordion:p(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),VueUiAgePyramid:p(()=>import(`./vue-ui-age-pyramid-vpIjdLg5.js`).then(e=>e.n)),VueUiAnnotator:p(()=>import(`./vue-ui-annotator-CdCDYzdK.js`).then(e=>e.n)),VueUiCandlestick:p(()=>import(`./vue-ui-candlestick-KJHOS5F7.js`).then(e=>e.n)),VueUiChestnut:p(()=>import(`./vue-ui-chestnut-CiY-2e77.js`).then(e=>e.n)),VueUiDigits:p(()=>import(`./vue-ui-digits-xHOLjA2_.js`).then(e=>e.n)),VueUiDonut:p(()=>import(`./vue-ui-donut-Vbp5Xs2-.js`).then(e=>e.n)),VueUiDonutEvolution:p(()=>import(`./vue-ui-donut-evolution-BTmztL3Y.js`).then(e=>e.n)),VueUiDumbbell:p(()=>import(`./vue-ui-dumbbell-CDcgKS2A.js`).then(e=>e.n)),VueUiFlow:p(()=>import(`./vue-ui-flow-kVocPE27.js`).then(e=>e.n)),VueUiGalaxy:p(()=>import(`./vue-ui-galaxy-hP-9mVlB.js`).then(e=>e.n)),VueUiGauge:p(()=>import(`./vue-ui-gauge-BRabsLkh.js`).then(e=>e.n)),VueUiHeatmap:p(()=>import(`./vue-ui-heatmap-kPnmZgWi.js`).then(e=>e.n)),VueUiKpi:p(()=>import(`./vue-ui-kpi-CCOOwX_Q.js`).then(e=>e.n)),VueUiMiniLoader:p(()=>import(`./vue-ui-mini-loader-7gqQI5jy.js`).then(e=>e.n)),VueUiMolecule:p(()=>import(`./vue-ui-molecule-BPGs9Dom.js`).then(e=>e.n)),VueUiMoodRadar:p(()=>import(`./vue-ui-mood-radar-GJ-lhgI0.js`).then(e=>e.n)),VueUiNestedDonuts:p(()=>import(`./vue-ui-nested-donuts-CrlPwpg8.js`).then(e=>e.n)),VueUiOnion:p(()=>import(`./vue-ui-onion-CKmyy-Y_.js`).then(e=>e.n)),VueUiParallelCoordinatePlot:p(()=>import(`./vue-ui-parallel-coordinate-plot-C0UqWt0M.js`).then(e=>e.n)),VueUiQuadrant:p(()=>import(`./vue-ui-quadrant-CTGFBNo9.js`).then(e=>e.n)),VueUiQuickChart:p(()=>import(`./vue-ui-quick-chart-ZBOPZhxA.js`).then(e=>e.n)),VueUiRadar:p(()=>import(`./vue-ui-radar-B1z3Ux3E.js`).then(e=>e.n)),VueUiRating:p(()=>import(`./vue-ui-rating-CV2b0tjA.js`).then(e=>e.n)),VueUiRelationCircle:p(()=>import(`./vue-ui-relation-circle-DqN5N08e.js`).then(e=>e.n)),VueUiRings:p(()=>import(`./vue-ui-rings-CJqAnf-l.js`).then(e=>e.n)),VueUiScatter:p(()=>import(`./vue-ui-scatter-THQAeoWs.js`).then(e=>e.n)),VueUiSkeleton:p(()=>import(`./vue-ui-skeleton-DqmhigQ0.js`).then(e=>e.n)),VueUiSmiley:p(()=>import(`./vue-ui-smiley-VTdQetY0.js`).then(e=>e.n)),VueUiSparkHistogram:p(()=>import(`./vue-ui-sparkhistogram-CLfzi3PO.js`).then(e=>e.n)),VueUiSparkStackbar:p(()=>import(`./vue-ui-sparkstackbar-CYZ-ADO1.js`).then(e=>e.n)),VueUiSparkTrend:p(()=>import(`./vue-ui-spark-trend-B2Nf1raK.js`).then(e=>e.n)),VueUiSparkbar:p(()=>import(`./vue-ui-sparkbar-CamZ_49V.js`).then(e=>e.n)),VueUiSparkgauge:p(()=>import(`./vue-ui-sparkgauge-Ffrp_7VV.js`).then(e=>e.n)),VueUiSparkline:p(()=>import(`./vue-ui-sparkline-Y-sljnbS.js`).then(e=>e.n)),VueUiStripPlot:p(()=>import(`./vue-ui-strip-plot-B9Ogpw7K.js`).then(e=>e.n)),VueUiTable:p(()=>import(`./vue-ui-table-Bi9C3LzP.js`).then(e=>e.n)),VueUiTableHeatmap:p(()=>import(`./vue-ui-table-heatmap-BtziURiu.js`).then(e=>e.n)),VueUiTableSparkline:p(()=>import(`./vue-ui-table-sparkline-DEVAL0cR.js`).then(e=>e.n)),VueUiThermometer:p(()=>import(`./vue-ui-thermometer-ClN4EO0I.js`).then(e=>e.n)),VueUiTimer:p(()=>import(`./vue-ui-timer-nqZxt1vU.js`).then(e=>e.n)),VueUiTiremarks:p(()=>import(`./vue-ui-tiremarks-BeJBsgXo.js`).then(e=>e.n)),VueUiTreemap:p(()=>import(`./vue-ui-treemap-FA-yXwmv.js`).then(e=>e.n)),VueUiVerticalBar:p(()=>import(`./vue-ui-horizontal-bar-CvX77vE4.js`).then(e=>e.n)),VueUiHorizontalBar:p(()=>import(`./vue-ui-horizontal-bar-CvX77vE4.js`).then(e=>e.n)),VueUiWaffle:p(()=>import(`./vue-ui-waffle-CO07S6HV.js`).then(e=>e.n)),VueUiWheel:p(()=>import(`./vue-ui-wheel-BeaSWB4x.js`).then(e=>e.n)),VueUiWordCloud:p(()=>import(`./vue-ui-word-cloud-C1OWGFng.js`).then(e=>e.n)),VueUiXy:p(()=>import(`./vue-ui-xy-6B_K-quN.js`).then(e=>e.n)),VueUiXyCanvas:p(()=>import(`./vue-ui-xy-canvas-CeC3gcrW.js`).then(e=>e.n)),VueUiCarouselTable:p(()=>import(`./vue-ui-carousel-table-CeI5SIxH.js`).then(e=>e.n)),VueUiGizmo:p(()=>import(`./vue-ui-gizmo-Dp3hpHIX.js`).then(e=>e.n)),VueUiStackbar:p(()=>import(`./vue-ui-stackbar-CQLYm10x.js`).then(e=>e.n)),VueUiStackline:p(()=>import(`./vue-ui-stackline-VpvF7MRx.js`).then(e=>e.n)),VueUiBullet:p(()=>import(`./vue-ui-bullet-rgxGRR1p.js`).then(e=>e.n)),VueUiFunnel:p(()=>import(`./vue-ui-funnel-CZAdPYqK.js`).then(e=>e.n)),VueUiHistoryPlot:p(()=>import(`./vue-ui-history-plot-CwO2o-2s.js`).then(e=>e.n)),VueUiCirclePack:p(()=>import(`./vue-ui-circle-pack-BsH09EPG.js`).then(e=>e.n)),VueUiWorld:p(()=>import(`./vue-ui-world-CUS_mKgl.js`).then(e=>e.n)),VueUiChord:p(()=>import(`./vue-ui-chord-8rk7304-.js`).then(e=>e.n)),VueUiRidgeline:p(()=>import(`./vue-ui-ridgeline-DcSB5Qef.js`).then(e=>e.n)),VueUiDag:p(()=>import(`./vue-ui-dag-BHFL2cUA.js`).then(e=>e.n))},{vue_ui_dashboard:be}=t(),xe=_(null),Se=_(null),E=_(null),D=e,O=s(()=>ee({userConfig:D.config,defaultConfig:be}));r({config:()=>O.value,dataset:()=>D.dataset,component:`VueUiDashboard`,rules:[i.noHint]});let k=s(()=>O.value.userOptions.useCursorPointer),A=_(n()),j=_(O.value.locked);function Ce(){j.value=!j.value}x(()=>D.config,()=>{j.value=O.value.locked,Q.value=!O.value.userOptions.showOnChartHover});function M(){return D.dataset.map((e,t)=>({...e,index:t}))}let N=_(M());x(()=>D.dataset,()=>{N.value=M()});let P=s(()=>N.value.map(e=>({...e,resolvedComponent:typeof e.component==`string`?T[e.component]:e.component}))),F=_(null),I=_(null),L=_({x:0,y:0}),R=_({x:0,y:0}),z=_(null),B=_(!1),V=_(null),H=_(!1);function U(e){let t=e.target;(t.tagName===`INPUT`&&t.type===`range`||t.classList.contains(`range-handle`))&&(H.value=!0)}function W(e){let t=e.target;t.tagName===`INPUT`&&t.type===`range`&&(H.value=!1)}let{isPrinting:we,isImaging:Te,generatePdf:G,generateImage:Ee}=ae({elementId:`vue-ui-dashboard_${A.value}`,fileName:O.value.userOptions.print.filename||`dashboard`,options:{...O.value.userOptions.print,aspectRatio:O.value.style.board.aspectRatio}});function De(e){if(!j.value&&(B.value=!0,V.value=e,I.value===null)){F.value=e,L.value={x:event.clientX,y:event.clientY};let t=N.value[e],n=100-t.width,r=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>n&&(t.left=n),t.top>r&&(t.top=r),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function K(e,t){B.value=!0,V.value=e,I.value={index:e,direction:t};let n=N.value[e];R.value={x:event.clientX,y:event.clientY,initialWidth:n.width,initialHeight:n.height}}function q(e,t,n){if(I.value.direction.includes(`top`)){let t=e.height-n/z.value.offsetHeight*100;t>=w&&(e.top+=n/z.value.offsetHeight*100,e.height=t)}if(I.value.direction.includes(`bottom`)){let t=e.height+n/z.value.offsetHeight*100;t>=w&&(e.height=t)}if(I.value.direction.includes(`left`)){let n=e.width-t/z.value.offsetWidth*100;n>=w&&(e.left+=t/z.value.offsetWidth*100,e.width=n)}if(I.value.direction.includes(`right`)){let n=e.width+t/z.value.offsetWidth*100;n>=w&&(e.width=n)}}function Oe(e){if(!(j.value||H.value)){if(B.value=!0,F.value!==null){let t=N.value[F.value],n=e.clientX-L.value.x,r=e.clientY-L.value.y,i=t.left+n/z.value.offsetWidth*100,a=t.top+r/z.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),L.value={x:e.clientX,y:e.clientY}}if(I.value!==null){let t=N.value[I.value.index];q(t,e.clientX-R.value.x,e.clientY-R.value.y),R.value={x:e.clientX,y:e.clientY}}}}let J=C;x(N,e=>{e&&!B.value&&J(`change`,N.value)},{deep:!0});function ke(){F.value=null,I.value=null,B.value=!1,V.value=null,N.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function Ae(e){j.value||H.value||(B.value=!0,V.value=e,I.value===null&&(F.value=e,L.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function Y(e,t,n){if(B.value=!0,V.value=e,I.value===null){I.value={index:e,direction:t};let r=N.value[e];R.value={x:n.touches[0].clientX,y:n.touches[0].clientY,initialWidth:r.width,initialHeight:r.height}}}function X(e){if(B.value=!0,e.preventDefault(),I.value!==null){let t=N.value[I.value.index];q(t,e.touches[0].clientX-R.value.x,e.touches[0].clientY-R.value.y),R.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function je(e){if(!(j.value||H.value)&&(B.value=!0,e.preventDefault(),F.value!==null)){let t=N.value[F.value],n=e.touches[0].clientX-L.value.x,r=e.touches[0].clientY-L.value.y,i=t.left+n/z.value.offsetWidth*100,a=t.top+r/z.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),L.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function Z(){B.value=!1,V.value=null,F.value=null,I.value=null,N.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}let Me=s(()=>O.value.style.item.borderColor),Ne=s(()=>O.value.style.resizeHandles.backgroundColor),Pe=s(()=>O.value.style.board.aspectRatio),Fe=s(()=>O.value.style.board.backgroundColor),Ie=s(()=>O.value.style.board.border);function Le(){return N.value}let{userOptionsVisible:Q,setUserOptionsVisibility:Re,keepUserOptionState:ze}=oe({config:O.value}),$=_(!1);function Be(){$.value=!$.value}function Ve(){Re(!0)}function He(){Re(!1)}async function Ue(){J(`copyAlt`,{config:O.value,dataset:P.value}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:P.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return a({generatePdf:G,getItemsPositions:Le,toggleLock:Ce,copyAlt:Ue}),(e,t)=>(g(),u(`div`,{id:`vue-ui-dashboard_${A.value}`,onMousedown:U,onMouseup:W,onTouchstart:U,onTouchend:W,onMouseenter:Ve,onMouseleave:He,ref_key:`dashboardRef`,ref:xe,style:{position:`relative`},class:`vue-data-ui-component`},[d(`div`,{class:`vue-ui-dashboard-container`,ref_key:`dashboardContainer`,ref:z,style:h(`outline:${Ie.value}; background:${Fe.value}; aspect-ratio:${Pe.value};${$.value?`pointer-events:none`:``}`)},[d(`div`,{class:`vue-ui-dashboard-grid-container`,ref:`container`,onMousemove:Oe,onMouseup:ke,onTouchmove:je,onTouchend:Z,style:h(`background:${O.value.style.board.backgroundColor}`)},[t[4]||=d(`div`,{class:`vue-ui-dashboard-grid`},null,-1),(g(!0),u(o,null,v(P.value,(n,r)=>(g(),u(`div`,{key:n.id,class:ue({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":j.value}),style:h({width:`${n.width}%`,height:`${n.height}%`,left:`${n.left}%`,top:`${n.top}%`,cursor:`move`,boxShadow:V.value===r?`0 6px 12px -3px rgba(0,0,0,0.3)`:``,zIndex:V.value===r?P.value.length+1:n.index,backgroundColor:O.value.style.item.backgroundColor}),onMousedown:e=>De(r),onTouchstart:e=>Ae(r,n)},[j.value?l(``,!0):(g(),u(o,{key:0},[d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left`,onMousedown:e=>K(r,`top-left`),onTouchstart:e=>Y(r,`top-left`,e),onTouchmove:t[0]||=e=>X(e),onTouchend:Z},null,40,ge),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right`,onMousedown:e=>K(r,`top-right`),onTouchstart:e=>Y(r,`top-right`,e),onTouchmove:t[1]||=e=>X(e),onTouchend:Z},null,40,_e),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left`,onMousedown:e=>K(r,`bottom-left`),onTouchstart:e=>Y(r,`bottom-left`,e),onTouchmove:t[2]||=e=>X(e),onTouchend:Z},null,40,ve),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right`,onMousedown:e=>K(r,`bottom-right`),onTouchstart:e=>Y(r,`bottom-right`,e),onTouchmove:t[3]||=e=>X(e),onTouchend:Z},null,40,ye)],64)),y(e.$slots,`top`,{item:n,index:r},void 0,!0),n.resolvedComponent?(g(),c(fe(n.resolvedComponent),le({key:1,ref_for:!0},n.props),null,16)):y(e.$slots,`content`,{item:n,index:r,left:n.left,top:n.top,height:n.height,width:n.width},void 0,!0,2),y(e.$slots,`bottom`,{item:n,index:r},void 0,!0)],46,he))),128))],36)],4),(g(),u(`svg`,{style:h({width:`100%`,height:`100%`,pointerEvents:`none`,position:`absolute`,top:0,left:0,zIndex:P.value.length+1}),ref_key:`svgRef`,ref:E},null,4)),O.value.userOptions.buttons.annotator&&z.value&&E.value?(g(),c(ce,{key:0,color:O.value.style.board.color,backgroundColor:O.value.style.board.backgroundColor,active:$.value,svgRef:E.value,isCursorPointer:k.value,onClose:Be,style:h({zIndex:P.value.length+1}),palette:O.value.userOptions.annotatorPalette},f({_:2},[v(b(ne),t=>({name:t,fn:S(n=>[y(e.$slots,t,de(m(b(te)(t,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`style`,`palette`])):l(``,!0),(O.value.allowPrint||O.value.userOptions.show)&&(O.value.userOptions.buttons.pdf||O.value.userOptions.buttons.img)?(g(),c(se,{key:1,ref_key:`userOptionsRef`,ref:Se,backgroundColor:O.value.style.board.backgroundColor,color:O.value.style.board.color,isPrinting:b(we),isImaging:b(Te),uid:A.value,position:O.value.userOptions.position,hasTooltip:!1,hasPdf:O.value.userOptions.buttons.pdf,hasImg:O.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:!1,hasAltCopy:O.value.userOptions.buttons.altCopy,chartElement:z.value,callbacks:O.value.userOptions.callbacks,hasAnnotator:O.value.userOptions.buttons.annotator,isAnnotation:$.value,printScale:O.value.userOptions.print.scale,titles:{...O.value.userOptions.buttonTitles},isCursorPointer:k.value,onGeneratePdf:b(G),onGenerateImage:b(Ee),onToggleAnnotator:Be,onCopyAlt:Ue,style:h({visibility:b(ze)?b(Q)?`visible`:`hidden`:`visible`,zIndex:P.value.length+1})},f({_:2},[v(b(re)(e.$slots,`menuIcon optionPdf optionImg optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,de(m(b(ie)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`position`,`hasPdf`,`hasImg`,`hasAltCopy`,`chartElement`,`callbacks`,`hasAnnotator`,`isAnnotation`,`printScale`,`titles`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`style`])):l(``,!0)],40,me))}},[[`__scopeId`,`data-v-96466658`]]);export{C as n,T as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{X as n}from"./lib-rPeBMZrn.js";import{n as r,t as i}from"./useHints-C-TwxM0Y.js";import{t as a}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ee}from"./useNestedProp-DnGoh-XS.js";import{n as te,t as ne}from"./annotationSlots-BRR85CqJ.js";import{n as re,t as ie}from"./userOptionsSlots-DYuo-E5m.js";import{t as ae}from"./usePrinter-DVf3YcG5.js";import{t as oe}from"./useUserOptionState-CXlFnwPv.js";import{t as se}from"./UserOptions-uWHV_zPB.js";import{n as ce}from"./PenAndPaper-BGEp-TUm.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as le,normalizeClass as ue,normalizeProps as de,normalizeStyle as h,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as fe,unref as b,useCssVars as pe,watch as x,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>T}),me=[`id`],he=[`onMousedown`,`onTouchstart`],ge=[`onMousedown`,`onTouchstart`],_e=[`onMousedown`,`onTouchstart`],ve=[`onMousedown`,`onTouchstart`],ye=[`onMousedown`,`onTouchstart`],w=1,T=/*#__PURE__*/ a({__name:`vue-ui-dashboard`,props:{dataset:Array,config:Object},emits:[`change`,`copyAlt`],setup(e,{expose:a,emit:C}){pe(e=>({ed4ebd52:Me.value,v1504d0e3:Ne.value}));let T={VueDataUi:p(()=>import(`./vue-data-ui-CrOhFey9.js`).then(e=>e.n)),VueUi3dBar:p(()=>import(`./vue-ui-3d-bar-ljsy2rX6.js`).then(e=>e.n)),VueUiAccordion:p(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),VueUiAgePyramid:p(()=>import(`./vue-ui-age-pyramid-a6CK7z3a.js`).then(e=>e.n)),VueUiAnnotator:p(()=>import(`./vue-ui-annotator-DCJdieNC.js`).then(e=>e.n)),VueUiCandlestick:p(()=>import(`./vue-ui-candlestick-BgyUo13S.js`).then(e=>e.n)),VueUiChestnut:p(()=>import(`./vue-ui-chestnut-DYrMSzmQ.js`).then(e=>e.n)),VueUiDigits:p(()=>import(`./vue-ui-digits-AoPCgSfP.js`).then(e=>e.n)),VueUiDonut:p(()=>import(`./vue-ui-donut-BYUkblpv.js`).then(e=>e.n)),VueUiDonutEvolution:p(()=>import(`./vue-ui-donut-evolution-wxHDTKlg.js`).then(e=>e.n)),VueUiDumbbell:p(()=>import(`./vue-ui-dumbbell-DR7rjMt0.js`).then(e=>e.n)),VueUiFlow:p(()=>import(`./vue-ui-flow-DtQlRSK_.js`).then(e=>e.n)),VueUiGalaxy:p(()=>import(`./vue-ui-galaxy-B7ogrJ6f.js`).then(e=>e.n)),VueUiGauge:p(()=>import(`./vue-ui-gauge-CrmzNkjT.js`).then(e=>e.n)),VueUiHeatmap:p(()=>import(`./vue-ui-heatmap-BxR2ccwd.js`).then(e=>e.n)),VueUiKpi:p(()=>import(`./vue-ui-kpi-Dfhsk0U1.js`).then(e=>e.n)),VueUiMiniLoader:p(()=>import(`./vue-ui-mini-loader-Bbupx66Y.js`).then(e=>e.n)),VueUiMolecule:p(()=>import(`./vue-ui-molecule-DUX1NUIY.js`).then(e=>e.n)),VueUiMoodRadar:p(()=>import(`./vue-ui-mood-radar-B1N5AwX_.js`).then(e=>e.n)),VueUiNestedDonuts:p(()=>import(`./vue-ui-nested-donuts-CfHH-cU6.js`).then(e=>e.n)),VueUiOnion:p(()=>import(`./vue-ui-onion-DRN-jIvq.js`).then(e=>e.n)),VueUiParallelCoordinatePlot:p(()=>import(`./vue-ui-parallel-coordinate-plot-UUPjQABF.js`).then(e=>e.n)),VueUiQuadrant:p(()=>import(`./vue-ui-quadrant-zmtzn0lM.js`).then(e=>e.n)),VueUiQuickChart:p(()=>import(`./vue-ui-quick-chart-DgU_IhKY.js`).then(e=>e.n)),VueUiRadar:p(()=>import(`./vue-ui-radar-BGSoxRaK.js`).then(e=>e.n)),VueUiRating:p(()=>import(`./vue-ui-rating-ChWXrWNJ.js`).then(e=>e.n)),VueUiRelationCircle:p(()=>import(`./vue-ui-relation-circle-XUw5UMrt.js`).then(e=>e.n)),VueUiRings:p(()=>import(`./vue-ui-rings-BJaCLH2Q.js`).then(e=>e.n)),VueUiScatter:p(()=>import(`./vue-ui-scatter-BA0hk_Tf.js`).then(e=>e.n)),VueUiSkeleton:p(()=>import(`./vue-ui-skeleton-DpzaXPO3.js`).then(e=>e.n)),VueUiSmiley:p(()=>import(`./vue-ui-smiley--VTlUAdp.js`).then(e=>e.n)),VueUiSparkHistogram:p(()=>import(`./vue-ui-sparkhistogram-BBiCxX6W.js`).then(e=>e.n)),VueUiSparkStackbar:p(()=>import(`./vue-ui-sparkstackbar-DSRXhqhJ.js`).then(e=>e.n)),VueUiSparkTrend:p(()=>import(`./vue-ui-spark-trend-DJ63XtgQ.js`).then(e=>e.n)),VueUiSparkbar:p(()=>import(`./vue-ui-sparkbar-C5wP9R67.js`).then(e=>e.n)),VueUiSparkgauge:p(()=>import(`./vue-ui-sparkgauge-DQcAOGuG.js`).then(e=>e.n)),VueUiSparkline:p(()=>import(`./vue-ui-sparkline-B_GkB9V_.js`).then(e=>e.n)),VueUiStripPlot:p(()=>import(`./vue-ui-strip-plot-d3UoFFrf.js`).then(e=>e.n)),VueUiTable:p(()=>import(`./vue-ui-table-CHFjZzW7.js`).then(e=>e.n)),VueUiTableHeatmap:p(()=>import(`./vue-ui-table-heatmap-DzvPQnY9.js`).then(e=>e.n)),VueUiTableSparkline:p(()=>import(`./vue-ui-table-sparkline-BkZ7sn4X.js`).then(e=>e.n)),VueUiThermometer:p(()=>import(`./vue-ui-thermometer-B--g_Lkt.js`).then(e=>e.n)),VueUiTimer:p(()=>import(`./vue-ui-timer-DmwEWrDh.js`).then(e=>e.n)),VueUiTiremarks:p(()=>import(`./vue-ui-tiremarks-160Gx7-3.js`).then(e=>e.n)),VueUiTreemap:p(()=>import(`./vue-ui-treemap-B-Yjtob0.js`).then(e=>e.n)),VueUiVerticalBar:p(()=>import(`./vue-ui-horizontal-bar-C5pNTRKB.js`).then(e=>e.n)),VueUiHorizontalBar:p(()=>import(`./vue-ui-horizontal-bar-C5pNTRKB.js`).then(e=>e.n)),VueUiWaffle:p(()=>import(`./vue-ui-waffle-BhzLg5ip.js`).then(e=>e.n)),VueUiWheel:p(()=>import(`./vue-ui-wheel-DHb4G42X.js`).then(e=>e.n)),VueUiWordCloud:p(()=>import(`./vue-ui-word-cloud-BcpreM7A.js`).then(e=>e.n)),VueUiXy:p(()=>import(`./vue-ui-xy-C-2Phexw.js`).then(e=>e.n)),VueUiXyCanvas:p(()=>import(`./vue-ui-xy-canvas-Do4P4ajB.js`).then(e=>e.n)),VueUiCarouselTable:p(()=>import(`./vue-ui-carousel-table-D01DGfA0.js`).then(e=>e.n)),VueUiGizmo:p(()=>import(`./vue-ui-gizmo-C3wgMKwb.js`).then(e=>e.n)),VueUiStackbar:p(()=>import(`./vue-ui-stackbar-QjOQHbld.js`).then(e=>e.n)),VueUiStackline:p(()=>import(`./vue-ui-stackline-CoII13bc.js`).then(e=>e.n)),VueUiBullet:p(()=>import(`./vue-ui-bullet-DX4A2Qwo.js`).then(e=>e.n)),VueUiFunnel:p(()=>import(`./vue-ui-funnel-BP3chlZy.js`).then(e=>e.n)),VueUiHistoryPlot:p(()=>import(`./vue-ui-history-plot-0-vs_CVn.js`).then(e=>e.n)),VueUiCirclePack:p(()=>import(`./vue-ui-circle-pack-DQHNM9sC.js`).then(e=>e.n)),VueUiWorld:p(()=>import(`./vue-ui-world-BD9acchj.js`).then(e=>e.n)),VueUiChord:p(()=>import(`./vue-ui-chord-CwzQ7QbP.js`).then(e=>e.n)),VueUiRidgeline:p(()=>import(`./vue-ui-ridgeline-B5RJcFyA.js`).then(e=>e.n)),VueUiDag:p(()=>import(`./vue-ui-dag-DF29_9Gg.js`).then(e=>e.n))},{vue_ui_dashboard:be}=t(),xe=_(null),Se=_(null),E=_(null),D=e,O=s(()=>ee({userConfig:D.config,defaultConfig:be}));r({config:()=>O.value,dataset:()=>D.dataset,component:`VueUiDashboard`,rules:[i.noHint]});let k=s(()=>O.value.userOptions.useCursorPointer),A=_(n()),j=_(O.value.locked);function Ce(){j.value=!j.value}x(()=>D.config,()=>{j.value=O.value.locked,Q.value=!O.value.userOptions.showOnChartHover});function M(){return D.dataset.map((e,t)=>({...e,index:t}))}let N=_(M());x(()=>D.dataset,()=>{N.value=M()});let P=s(()=>N.value.map(e=>({...e,resolvedComponent:typeof e.component==`string`?T[e.component]:e.component}))),F=_(null),I=_(null),L=_({x:0,y:0}),R=_({x:0,y:0}),z=_(null),B=_(!1),V=_(null),H=_(!1);function U(e){let t=e.target;(t.tagName===`INPUT`&&t.type===`range`||t.classList.contains(`range-handle`))&&(H.value=!0)}function W(e){let t=e.target;t.tagName===`INPUT`&&t.type===`range`&&(H.value=!1)}let{isPrinting:we,isImaging:Te,generatePdf:G,generateImage:Ee}=ae({elementId:`vue-ui-dashboard_${A.value}`,fileName:O.value.userOptions.print.filename||`dashboard`,options:{...O.value.userOptions.print,aspectRatio:O.value.style.board.aspectRatio}});function De(e){if(!j.value&&(B.value=!0,V.value=e,I.value===null)){F.value=e,L.value={x:event.clientX,y:event.clientY};let t=N.value[e],n=100-t.width,r=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>n&&(t.left=n),t.top>r&&(t.top=r),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function K(e,t){B.value=!0,V.value=e,I.value={index:e,direction:t};let n=N.value[e];R.value={x:event.clientX,y:event.clientY,initialWidth:n.width,initialHeight:n.height}}function q(e,t,n){if(I.value.direction.includes(`top`)){let t=e.height-n/z.value.offsetHeight*100;t>=w&&(e.top+=n/z.value.offsetHeight*100,e.height=t)}if(I.value.direction.includes(`bottom`)){let t=e.height+n/z.value.offsetHeight*100;t>=w&&(e.height=t)}if(I.value.direction.includes(`left`)){let n=e.width-t/z.value.offsetWidth*100;n>=w&&(e.left+=t/z.value.offsetWidth*100,e.width=n)}if(I.value.direction.includes(`right`)){let n=e.width+t/z.value.offsetWidth*100;n>=w&&(e.width=n)}}function Oe(e){if(!(j.value||H.value)){if(B.value=!0,F.value!==null){let t=N.value[F.value],n=e.clientX-L.value.x,r=e.clientY-L.value.y,i=t.left+n/z.value.offsetWidth*100,a=t.top+r/z.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),L.value={x:e.clientX,y:e.clientY}}if(I.value!==null){let t=N.value[I.value.index];q(t,e.clientX-R.value.x,e.clientY-R.value.y),R.value={x:e.clientX,y:e.clientY}}}}let J=C;x(N,e=>{e&&!B.value&&J(`change`,N.value)},{deep:!0});function ke(){F.value=null,I.value=null,B.value=!1,V.value=null,N.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function Ae(e){j.value||H.value||(B.value=!0,V.value=e,I.value===null&&(F.value=e,L.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function Y(e,t,n){if(B.value=!0,V.value=e,I.value===null){I.value={index:e,direction:t};let r=N.value[e];R.value={x:n.touches[0].clientX,y:n.touches[0].clientY,initialWidth:r.width,initialHeight:r.height}}}function X(e){if(B.value=!0,e.preventDefault(),I.value!==null){let t=N.value[I.value.index];q(t,e.touches[0].clientX-R.value.x,e.touches[0].clientY-R.value.y),R.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function je(e){if(!(j.value||H.value)&&(B.value=!0,e.preventDefault(),F.value!==null)){let t=N.value[F.value],n=e.touches[0].clientX-L.value.x,r=e.touches[0].clientY-L.value.y,i=t.left+n/z.value.offsetWidth*100,a=t.top+r/z.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),L.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function Z(){B.value=!1,V.value=null,F.value=null,I.value=null,N.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}let Me=s(()=>O.value.style.item.borderColor),Ne=s(()=>O.value.style.resizeHandles.backgroundColor),Pe=s(()=>O.value.style.board.aspectRatio),Fe=s(()=>O.value.style.board.backgroundColor),Ie=s(()=>O.value.style.board.border);function Le(){return N.value}let{userOptionsVisible:Q,setUserOptionsVisibility:Re,keepUserOptionState:ze}=oe({config:O.value}),$=_(!1);function Be(){$.value=!$.value}function Ve(){Re(!0)}function He(){Re(!1)}async function Ue(){J(`copyAlt`,{config:O.value,dataset:P.value}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:P.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return a({generatePdf:G,getItemsPositions:Le,toggleLock:Ce,copyAlt:Ue}),(e,t)=>(g(),u(`div`,{id:`vue-ui-dashboard_${A.value}`,onMousedown:U,onMouseup:W,onTouchstart:U,onTouchend:W,onMouseenter:Ve,onMouseleave:He,ref_key:`dashboardRef`,ref:xe,style:{position:`relative`},class:`vue-data-ui-component`},[d(`div`,{class:`vue-ui-dashboard-container`,ref_key:`dashboardContainer`,ref:z,style:h(`outline:${Ie.value}; background:${Fe.value}; aspect-ratio:${Pe.value};${$.value?`pointer-events:none`:``}`)},[d(`div`,{class:`vue-ui-dashboard-grid-container`,ref:`container`,onMousemove:Oe,onMouseup:ke,onTouchmove:je,onTouchend:Z,style:h(`background:${O.value.style.board.backgroundColor}`)},[t[4]||=d(`div`,{class:`vue-ui-dashboard-grid`},null,-1),(g(!0),u(o,null,v(P.value,(n,r)=>(g(),u(`div`,{key:n.id,class:ue({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":j.value}),style:h({width:`${n.width}%`,height:`${n.height}%`,left:`${n.left}%`,top:`${n.top}%`,cursor:`move`,boxShadow:V.value===r?`0 6px 12px -3px rgba(0,0,0,0.3)`:``,zIndex:V.value===r?P.value.length+1:n.index,backgroundColor:O.value.style.item.backgroundColor}),onMousedown:e=>De(r),onTouchstart:e=>Ae(r,n)},[j.value?l(``,!0):(g(),u(o,{key:0},[d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left`,onMousedown:e=>K(r,`top-left`),onTouchstart:e=>Y(r,`top-left`,e),onTouchmove:t[0]||=e=>X(e),onTouchend:Z},null,40,ge),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right`,onMousedown:e=>K(r,`top-right`),onTouchstart:e=>Y(r,`top-right`,e),onTouchmove:t[1]||=e=>X(e),onTouchend:Z},null,40,_e),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left`,onMousedown:e=>K(r,`bottom-left`),onTouchstart:e=>Y(r,`bottom-left`,e),onTouchmove:t[2]||=e=>X(e),onTouchend:Z},null,40,ve),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right`,onMousedown:e=>K(r,`bottom-right`),onTouchstart:e=>Y(r,`bottom-right`,e),onTouchmove:t[3]||=e=>X(e),onTouchend:Z},null,40,ye)],64)),y(e.$slots,`top`,{item:n,index:r},void 0,!0),n.resolvedComponent?(g(),c(fe(n.resolvedComponent),le({key:1,ref_for:!0},n.props),null,16)):y(e.$slots,`content`,{item:n,index:r,left:n.left,top:n.top,height:n.height,width:n.width},void 0,!0,2),y(e.$slots,`bottom`,{item:n,index:r},void 0,!0)],46,he))),128))],36)],4),(g(),u(`svg`,{style:h({width:`100%`,height:`100%`,pointerEvents:`none`,position:`absolute`,top:0,left:0,zIndex:P.value.length+1}),ref_key:`svgRef`,ref:E},null,4)),O.value.userOptions.buttons.annotator&&z.value&&E.value?(g(),c(ce,{key:0,color:O.value.style.board.color,backgroundColor:O.value.style.board.backgroundColor,active:$.value,svgRef:E.value,isCursorPointer:k.value,onClose:Be,style:h({zIndex:P.value.length+1}),palette:O.value.userOptions.annotatorPalette},f({_:2},[v(b(ne),t=>({name:t,fn:S(n=>[y(e.$slots,t,de(m(b(te)(t,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`style`,`palette`])):l(``,!0),(O.value.allowPrint||O.value.userOptions.show)&&(O.value.userOptions.buttons.pdf||O.value.userOptions.buttons.img)?(g(),c(se,{key:1,ref_key:`userOptionsRef`,ref:Se,backgroundColor:O.value.style.board.backgroundColor,color:O.value.style.board.color,isPrinting:b(we),isImaging:b(Te),uid:A.value,position:O.value.userOptions.position,hasTooltip:!1,hasPdf:O.value.userOptions.buttons.pdf,hasImg:O.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:!1,hasAltCopy:O.value.userOptions.buttons.altCopy,chartElement:z.value,callbacks:O.value.userOptions.callbacks,hasAnnotator:O.value.userOptions.buttons.annotator,isAnnotation:$.value,printScale:O.value.userOptions.print.scale,titles:{...O.value.userOptions.buttonTitles},isCursorPointer:k.value,onGeneratePdf:b(G),onGenerateImage:b(Ee),onToggleAnnotator:Be,onCopyAlt:Ue,style:h({visibility:b(ze)?b(Q)?`visible`:`hidden`:`visible`,zIndex:P.value.length+1})},f({_:2},[v(b(re)(e.$slots,`menuIcon optionPdf optionImg optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,de(m(b(ie)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`position`,`hasPdf`,`hasImg`,`hasAltCopy`,`chartElement`,`callbacks`,`hasAnnotator`,`isAnnotation`,`printScale`,`titles`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`style`])):l(``,!0)],40,me))}},[[`__scopeId`,`data-v-96466658`]]);export{C as n,T as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{X as n,t as r}from"./lib-rPeBMZrn.js";import{n as i,t as a}from"./useHints-BH9r_0Vd.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{n as c}from"./PackageVersion-BIhjLNBU.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x}from"vue";var S={key:0},C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O=[`d`,`fill`],k=[`d`,`fill`],A={key:1},j=[`cx`,`cy`,`r`,`fill`],M={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let t=e,n=v({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),r=u(()=>2*(t.thickness||1)),i=u(()=>[void 0,null].includes(t.quanta)?n.value.X:n.value[t.quanta]);return(t,n)=>(_(),p(l,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(_(),p(`g`,S,[m(`path`,{d:`M ${e.x} ${e.y}
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{X as n,t as r}from"./lib-rPeBMZrn.js";import{n as i,t as a}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{n as c}from"./PackageVersion-CXT-eAuk.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x}from"vue";var S={key:0},C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O=[`d`,`fill`],k=[`d`,`fill`],A={key:1},j=[`cx`,`cy`,`r`,`fill`],M={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let t=e,n=v({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),r=u(()=>2*(t.thickness||1)),i=u(()=>[void 0,null].includes(t.quanta)?n.value.X:n.value[t.quanta]);return(t,n)=>(_(),p(l,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(_(),p(`g`,S,[m(`path`,{d:`M ${e.x} ${e.y}
2
2
  L ${e.x+r.value} ${e.y-r.value}
3
3
  L ${e.x+26-r.value} ${e.y-r.value}
4
4
  L ${e.x+26} ${e.y}
@@ -1,4 +1,4 @@
1
- import{t as e}from"./useConfig-6jO1fkp5.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,h as f,i as p,in as m,j as h,nn as g,p as _,st as v,t as y}from"./lib-rPeBMZrn.js";import{t as b}from"./vue_ui_donut-T5PeOqvf.js";import{_ as x,a as S,c as C,d as w,g as T,i as E,l as D,n as O,o as k,p as A,r as j,s as ee,t as te,u as M,v as N}from"./render-common-B-s2XJ_I.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=m({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=m({userConfig:b[i]||{},defaultConfig:n}),o=m({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:g[i]||r}}function P(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function F(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+P(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+P(t,0),0):P(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:P(F(o,`chart.padding.top`,24),24),right:P(F(o,`chart.padding.right`,24),24),bottom:P(F(o,`chart.padding.bottom`,24),24),left:P(F(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=P(F(o,`chart.donut.radius`,f),f),m=P(F(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:P(F(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function I(){return ue}function L(e){return k(S(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return x(e?.value??e?.absoluteValue??0,0)}function R(e){return T(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:k(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function z(e){return e.reduce((e,t)=>e+Math.abs(x(t.value,0)),0)}function fe(e){let t=S(e,`title`,{}),n=A(t,`subtitle`,{});if(!t.text)return 0;let r=x(t.fontSize,20),i=n.show!==!1&&n.text?x(n.fontSize,14):0;return x(t.paddingTop,12)+r+(i?i+12:0)+x(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=S(n,`legend`,{}),a=x(i.fontSize,12),o=x(i.markerSize,10),s=x(i.itemGap,24),c=x(i.rowGap,8),l=x(i.padding,8),u=x(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Ve(e,t),r=O(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function B(e,t){return!S(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function V(e){return!!E(e,`pie`,S(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=B(e,t),s=S(n,`legend.show`,!0),c=S(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=x(S(n,`padding.top`,24),24),f=x(S(n,`padding.right`,24),24),p=x(S(n,`padding.bottom`,24),24),m=x(S(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?x(E(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=x(S(n,`layout.donut.radiusRatio`,.35),.35),b=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*b),w=S(n,`layout.donut.radius`,null),T=w==null?C:Math.min(C,x(w,C)),D=x(S(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(T*D*2,T),12*(1+D)),k=S(n,`layout.donut.thickness`,S(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(T-1,k==null?O:x(k,O)));return{...e,drawingArea:h,center:v,radius:T,thickness:A,innerRadius:V(n)?0:Math.max(0,T-A)}}function he(e,t){let n=x(S(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,V(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:k(e.color,t[n]?.color),value:x(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(x(e.value,0)))),r=t.map(e=>Math.abs(x(e.value,0))/n);return h({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function H(e){return`gradient_${I()}`}function U(e,t){return`polar_gradient_${t}_${I()}`}function _e(e){return E(e.config,`type`,`classic`)!==`classic`||!S(e.config,`useGradient`,!1)?``:w(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${H(e)})`})}function W(e){return`drop_shadow_${I()}`}function ve(e){let{config:t,width:n}=e,r=S(t,`title`,{}),i=A(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?x(r.paddingLeft,12):a===`right`?n-x(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=x(r.fontSize,20),l=x(i.fontSize,14),u=x(r.paddingTop,12)+c,d=[N(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:k(r.color,j(t))})];return i.text&&d.push(N(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:k(i.color||r.color,j(t))})),M(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!S(n,`useGradient`,!1),o=!!S(n,`layout.donut.useShadow`,!1);if(i){let i=E(n,`type`,`classic`),o=x(S(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=V(n)?1:e.thickness/e.radius;r.push(M(`radialGradient`,{id:H(e)},[w(`stop`,{offset:`0%`,"stop-color":a(L(n),0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),w(`stop`,{offset:`100%`,"stop-color":a(L(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(M(`radialGradient`,{id:U(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[w(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),w(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=k(S(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=x(S(n,`layout.donut.shadowOpacity`,.2),.2),a=x(S(n,`layout.donut.shadowBlur`,6),6),o=x(S(n,`layout.donut.shadowOffsetY`,3),3);r.push(M(`filter`,{id:W(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[w(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?M(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return S(e.config,`useGradient`,!1)?`url(#${U(e,n)})`:t.color}function G(e){let{config:t}=e;return S(t,`layout.donut.borderColorAuto`,!0)?L(t):k(S(t,`layout.donut.borderColor`,L(t)),L(t))}function K(e){return S(e.config,`layout.donut.useShadow`,!1)?`url(#${W(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=G(e),r=x(S(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{x(t.proportion,0)<=0||(i.push(w(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:L(e.config)})),i.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:K(e)})))}),M(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=G(e),i=x(S(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(w(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:K(e)})))}),M(`g`,{"data-layer":`polar-slices`},a.join(``))}function q(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=S(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:x(S(i,r,s.rounding??0),s.rounding??0)});return p(s.formatter,n.value,c,{datapoint:n})}function J(e,n){let{config:r}=e,i=S(r,`layout.labels.percentage`,{}),a=x(n.proportion,0)*100,o=t({v:a,s:`%`,r:x(i.rounding,0)});return p(i.formatter,a,o,{datapoint:n})}function Y(e,t){let n=S(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?q(e,t):``,percentage:a?J(e,t):``}}function we(e,t){let{value:n,percentage:r}=Y(e,t);return r&&n?`${r} (${n})`:r||n||``}function X(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?q(e,t):``,s=a?J(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function Z(e,t){let n=S(e.config,`layout.labels`,{}).dataLabels??{};if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=x(n.hideUnderValue,0);return x(t.proportion,0)*100>r}function Te(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r=x(n.smallArcClusterThreshold,0),i=x(n.hideUnderValue,0),a=x(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Q(e){return!!S(e.config,`layout.curvedMarkers`,S(e.config,`layout.donut.curvedMarkers`,!1))}function Ee(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=x(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Q(e);function g(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function b({arc:e,index:t}){let n=g(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:_(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>b({arc:e,index:t})).filter(({arc:t})=>Z(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function De({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=S(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??_(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=Y(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:k(s.color,j(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},v(t+(n===m.length-1?` `:``)))).join(``):``,g=p?M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(o.color,j(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},v(p)):``;return M(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${g}`)}function Oe(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!E(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=x(r.fontSize??n.value?.fontSize??12,12);k(r.color??n.value?.color??j(e.config),j(e.config)),r.bold??n.value?.bold;let a=x(r.offset,16),o=Ee(e,t),s=[];return t.forEach((t,n)=>{if(!Z(e,t))return;let c=o[n];X(e,t),c?s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:x(r.smallArcClusterFontSize,i)})):s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:_(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?M(`g`,{"data-layer":`data-labels`},s.join(``)):``}function ke(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function Ae(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function je(e,t,n,r){let i=S(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=x(a.fontSize,i.dataLabels?.fontSize??12),c=x(o.fontSize,i.dataLabels?.fontSize??12),l=M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(a.color,j(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},v(String(X(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:k(o.color,j(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},v(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function Me(e,t,n){let r=S(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=x(a.fontSize,i.fontSize??12),d=x(s.fontSize,i.fontSize??12),f=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!Z(e,t))return;let a=ke(e,i,42),p=Ae(e,a);l?f.push(M(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":p},je(e,t,a.x,p))):(f.push(M(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":p,fill:valueFill},te({content:X(e,t),x:a.x,fontSize:u,fill:valueFill,textAnchor:p}))),s.show&&f.push(M(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":p,fill:k(s.color,j(e.config))},c({content:v(String(t.name??``)),fontSize:d,fill:k(s.color,j(e.config)),x:a.x}))))}),f.length?M(`g`,{"data-layer":`polar-data-labels`},f.join(``)):``}function Ne(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=S(e.config,`layout.labels.dataLabels`,{}),i=x(r.offset,16),a=x(r.markerFlatLength,12),o=Q(e);return f(t,!1,i,i,!1,!1,0,a,o)}function Pe(e,t){let n=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Ee(e,t),i=[];return t.forEach((t,a)=>{if(!Z(e,t))return;let o=r[a],s=Ne(e,t,o);s&&(i.push(w(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":x(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(w(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??_(t)-3.5,r:x(n.markerRadius,3),fill:t.color,stroke:L(e.config),"stroke-width":1})))}),i.length?M(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Fe(e,t,r){let i=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!Z(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(w(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":x(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(w(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:x(i.markerRadius,3),fill:t.color,stroke:L(e.config),"stroke-width":1}))}),a.length?M(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:N(e,{"text-anchor":`middle`,...t})}function Ie(e,n,r){if(E(e.config,`type`,`classic`)!==`classic`||V(e.config)||!n)return``;let i=S(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=x(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+x(a.offsetY,0),l=a.value??{},u=x(l.fontSize,r),d=p(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:x(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:k(a.color,j(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+x(l.offsetY,0),fill:k(l.color,k(a.color,j(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=x(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=x(u.fontSize,i),f=p(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:x(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+x(o.offsetY,0),fill:k(o.color,j(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(f,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+x(u.offsetY,0),fill:k(u.color,k(o.color,j(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?M(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Le(e,n){let{config:r,center:i}=e,a=S(r,`layout.donut.labels.total`,S(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=S(r,`layout.labels.dataLabels`,{}),s=x(a.fontSize,20),c=k(a.color,j(r)),l=p(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:x(a.rounding,0)}),{total:n});return N(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Re(e,t){let n=z(R(e));return n?x(t.value,0)/n*100:0}function ze(e,n){let r=S(e.config,`legend`,{}),i=S(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:x(r.roundingValue,o.rounding??0)});return p(o.formatter,n.value,s,{datapoint:n,serie:n})}function Be(e,n){let r=S(e.config,`legend`,{}),i=S(e.config,`layout.labels`,{}).percentage??{},a=Re(e,n),o=t({v:a,s:`%`,r:x(r.roundingPercentage,i.rounding??0)});return p(i.formatter,a,o,{datapoint:n,serie:n})}function Ve(e,t){let n=S(e.config,`legend`,{}),r=[],i=n.showPercentage?Be(e,t):``,a=n.showValue?ze(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function He(e,t){let n=S(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=B(e,t),i=k(n.color,j(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(w(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(N(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),M(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function Ue(e){return M(`g`,{"data-layer":`no-data`},[w(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:k(S(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function We(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function Ge(e,t,n){let r=`${E(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return M(`title`,{},v(r))}async function Ke(e){let t=e.config,n=x(e.width,S(t,`width`,512)),r=x(e.height,S(t,`height`,512)),i=R(e),a=z(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=E(t,`type`,`classic`),u=a>0&&s.some(e=>x(e.proportion,0)>0);return`
1
+ import{t as e}from"./useConfig-6jO1fkp5.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,h as f,i as p,in as m,j as h,nn as g,p as _,st as v,t as y}from"./lib-rPeBMZrn.js";import{t as b}from"./vue_ui_donut-T5PeOqvf.js";import{_ as x,a as S,c as C,d as w,g as T,i as E,l as D,n as O,o as k,p as A,r as j,s as ee,t as te,u as M,v as N}from"./render-common-C70bnUVe.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=m({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=m({userConfig:b[i]||{},defaultConfig:n}),o=m({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:g[i]||r}}function P(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function F(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+P(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+P(t,0),0):P(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:P(F(o,`chart.padding.top`,24),24),right:P(F(o,`chart.padding.right`,24),24),bottom:P(F(o,`chart.padding.bottom`,24),24),left:P(F(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=P(F(o,`chart.donut.radius`,f),f),m=P(F(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:P(F(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function I(){return ue}function L(e){return k(S(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return x(e?.value??e?.absoluteValue??0,0)}function R(e){return T(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:k(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function z(e){return e.reduce((e,t)=>e+Math.abs(x(t.value,0)),0)}function fe(e){let t=S(e,`title`,{}),n=A(t,`subtitle`,{});if(!t.text)return 0;let r=x(t.fontSize,20),i=n.show!==!1&&n.text?x(n.fontSize,14):0;return x(t.paddingTop,12)+r+(i?i+12:0)+x(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=S(n,`legend`,{}),a=x(i.fontSize,12),o=x(i.markerSize,10),s=x(i.itemGap,24),c=x(i.rowGap,8),l=x(i.padding,8),u=x(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Ve(e,t),r=O(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function B(e,t){return!S(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function V(e){return!!E(e,`pie`,S(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=B(e,t),s=S(n,`legend.show`,!0),c=S(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=x(S(n,`padding.top`,24),24),f=x(S(n,`padding.right`,24),24),p=x(S(n,`padding.bottom`,24),24),m=x(S(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?x(E(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=x(S(n,`layout.donut.radiusRatio`,.35),.35),b=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*b),w=S(n,`layout.donut.radius`,null),T=w==null?C:Math.min(C,x(w,C)),D=x(S(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(T*D*2,T),12*(1+D)),k=S(n,`layout.donut.thickness`,S(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(T-1,k==null?O:x(k,O)));return{...e,drawingArea:h,center:v,radius:T,thickness:A,innerRadius:V(n)?0:Math.max(0,T-A)}}function he(e,t){let n=x(S(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,V(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:k(e.color,t[n]?.color),value:x(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(x(e.value,0)))),r=t.map(e=>Math.abs(x(e.value,0))/n);return h({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function H(e){return`gradient_${I()}`}function U(e,t){return`polar_gradient_${t}_${I()}`}function _e(e){return E(e.config,`type`,`classic`)!==`classic`||!S(e.config,`useGradient`,!1)?``:w(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${H(e)})`})}function W(e){return`drop_shadow_${I()}`}function ve(e){let{config:t,width:n}=e,r=S(t,`title`,{}),i=A(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?x(r.paddingLeft,12):a===`right`?n-x(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=x(r.fontSize,20),l=x(i.fontSize,14),u=x(r.paddingTop,12)+c,d=[N(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:k(r.color,j(t))})];return i.text&&d.push(N(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:k(i.color||r.color,j(t))})),M(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!S(n,`useGradient`,!1),o=!!S(n,`layout.donut.useShadow`,!1);if(i){let i=E(n,`type`,`classic`),o=x(S(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=V(n)?1:e.thickness/e.radius;r.push(M(`radialGradient`,{id:H(e)},[w(`stop`,{offset:`0%`,"stop-color":a(L(n),0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),w(`stop`,{offset:`100%`,"stop-color":a(L(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(M(`radialGradient`,{id:U(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[w(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),w(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=k(S(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=x(S(n,`layout.donut.shadowOpacity`,.2),.2),a=x(S(n,`layout.donut.shadowBlur`,6),6),o=x(S(n,`layout.donut.shadowOffsetY`,3),3);r.push(M(`filter`,{id:W(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[w(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?M(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return S(e.config,`useGradient`,!1)?`url(#${U(e,n)})`:t.color}function G(e){let{config:t}=e;return S(t,`layout.donut.borderColorAuto`,!0)?L(t):k(S(t,`layout.donut.borderColor`,L(t)),L(t))}function K(e){return S(e.config,`layout.donut.useShadow`,!1)?`url(#${W(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=G(e),r=x(S(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{x(t.proportion,0)<=0||(i.push(w(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:L(e.config)})),i.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:K(e)})))}),M(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=G(e),i=x(S(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(w(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:K(e)})))}),M(`g`,{"data-layer":`polar-slices`},a.join(``))}function q(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=S(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:x(S(i,r,s.rounding??0),s.rounding??0)});return p(s.formatter,n.value,c,{datapoint:n})}function J(e,n){let{config:r}=e,i=S(r,`layout.labels.percentage`,{}),a=x(n.proportion,0)*100,o=t({v:a,s:`%`,r:x(i.rounding,0)});return p(i.formatter,a,o,{datapoint:n})}function Y(e,t){let n=S(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?q(e,t):``,percentage:a?J(e,t):``}}function we(e,t){let{value:n,percentage:r}=Y(e,t);return r&&n?`${r} (${n})`:r||n||``}function X(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?q(e,t):``,s=a?J(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function Z(e,t){let n=S(e.config,`layout.labels`,{}).dataLabels??{};if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=x(n.hideUnderValue,0);return x(t.proportion,0)*100>r}function Te(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r=x(n.smallArcClusterThreshold,0),i=x(n.hideUnderValue,0),a=x(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Q(e){return!!S(e.config,`layout.curvedMarkers`,S(e.config,`layout.donut.curvedMarkers`,!1))}function Ee(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=x(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Q(e);function g(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function b({arc:e,index:t}){let n=g(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:_(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>b({arc:e,index:t})).filter(({arc:t})=>Z(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function De({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=S(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??_(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=Y(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:k(s.color,j(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},v(t+(n===m.length-1?` `:``)))).join(``):``,g=p?M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(o.color,j(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},v(p)):``;return M(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${g}`)}function Oe(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!E(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=x(r.fontSize??n.value?.fontSize??12,12);k(r.color??n.value?.color??j(e.config),j(e.config)),r.bold??n.value?.bold;let a=x(r.offset,16),o=Ee(e,t),s=[];return t.forEach((t,n)=>{if(!Z(e,t))return;let c=o[n];X(e,t),c?s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:x(r.smallArcClusterFontSize,i)})):s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:_(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?M(`g`,{"data-layer":`data-labels`},s.join(``)):``}function ke(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function Ae(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function je(e,t,n,r){let i=S(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=x(a.fontSize,i.dataLabels?.fontSize??12),c=x(o.fontSize,i.dataLabels?.fontSize??12),l=M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(a.color,j(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},v(String(X(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:k(o.color,j(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},v(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function Me(e,t,n){let r=S(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=x(a.fontSize,i.fontSize??12),d=x(s.fontSize,i.fontSize??12),f=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!Z(e,t))return;let a=ke(e,i,42),p=Ae(e,a);l?f.push(M(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":p},je(e,t,a.x,p))):(f.push(M(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":p,fill:valueFill},te({content:X(e,t),x:a.x,fontSize:u,fill:valueFill,textAnchor:p}))),s.show&&f.push(M(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":p,fill:k(s.color,j(e.config))},c({content:v(String(t.name??``)),fontSize:d,fill:k(s.color,j(e.config)),x:a.x}))))}),f.length?M(`g`,{"data-layer":`polar-data-labels`},f.join(``)):``}function Ne(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=S(e.config,`layout.labels.dataLabels`,{}),i=x(r.offset,16),a=x(r.markerFlatLength,12),o=Q(e);return f(t,!1,i,i,!1,!1,0,a,o)}function Pe(e,t){let n=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Ee(e,t),i=[];return t.forEach((t,a)=>{if(!Z(e,t))return;let o=r[a],s=Ne(e,t,o);s&&(i.push(w(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":x(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(w(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??_(t)-3.5,r:x(n.markerRadius,3),fill:t.color,stroke:L(e.config),"stroke-width":1})))}),i.length?M(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Fe(e,t,r){let i=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!Z(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(w(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":x(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(w(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:x(i.markerRadius,3),fill:t.color,stroke:L(e.config),"stroke-width":1}))}),a.length?M(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:N(e,{"text-anchor":`middle`,...t})}function Ie(e,n,r){if(E(e.config,`type`,`classic`)!==`classic`||V(e.config)||!n)return``;let i=S(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=x(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+x(a.offsetY,0),l=a.value??{},u=x(l.fontSize,r),d=p(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:x(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:k(a.color,j(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+x(l.offsetY,0),fill:k(l.color,k(a.color,j(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=x(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=x(u.fontSize,i),f=p(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:x(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+x(o.offsetY,0),fill:k(o.color,j(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(f,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+x(u.offsetY,0),fill:k(u.color,k(o.color,j(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?M(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Le(e,n){let{config:r,center:i}=e,a=S(r,`layout.donut.labels.total`,S(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=S(r,`layout.labels.dataLabels`,{}),s=x(a.fontSize,20),c=k(a.color,j(r)),l=p(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:x(a.rounding,0)}),{total:n});return N(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Re(e,t){let n=z(R(e));return n?x(t.value,0)/n*100:0}function ze(e,n){let r=S(e.config,`legend`,{}),i=S(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:x(r.roundingValue,o.rounding??0)});return p(o.formatter,n.value,s,{datapoint:n,serie:n})}function Be(e,n){let r=S(e.config,`legend`,{}),i=S(e.config,`layout.labels`,{}).percentage??{},a=Re(e,n),o=t({v:a,s:`%`,r:x(r.roundingPercentage,i.rounding??0)});return p(i.formatter,a,o,{datapoint:n,serie:n})}function Ve(e,t){let n=S(e.config,`legend`,{}),r=[],i=n.showPercentage?Be(e,t):``,a=n.showValue?ze(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function He(e,t){let n=S(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=B(e,t),i=k(n.color,j(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(w(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(N(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),M(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function Ue(e){return M(`g`,{"data-layer":`no-data`},[w(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:k(S(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function We(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function Ge(e,t,n){let r=`${E(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return M(`title`,{},v(r))}async function Ke(e){let t=e.config,n=x(e.width,S(t,`width`,512)),r=x(e.height,S(t,`height`,512)),i=R(e),a=z(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=E(t,`type`,`classic`),u=a>0&&s.some(e=>x(e.proportion,0)>0);return`
2
2
  <svg
3
3
  xmlns="${y}"
4
4
  width="100%"
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Bt as r,D as i,Dt as a,Ht as o,It as s,Jt as c,S as l,X as u,Y as ee,Yt as te,Zt as ne,at as d,b as re,dt as ie,f,h as p,i as m,in as ae,it as oe,j as se,nn as ce,nt as le,p as h,s as ue,t as de,ut as fe,w as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-BH9r_0Vd.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-DPGnEuYM.js";import{n as we}from"./Title-BliHuXfT.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./annotationSlots-BRR85CqJ.js";import{n as Ae,t as je}from"./userOptionsSlots-DYuo-E5m.js";import{t as Me}from"./usePrinter-sVoTzet1.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ve,t as He}from"./labelUtils-CdtU-yB_.js";import{t as Ue}from"./vue_ui_donut-T5PeOqvf.js";import{t as We}from"./Legend-DM0ClX3D.js";import{Fragment as g,Teleport as Ge,computed as _,createBlock as v,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as Ye,guardReactiveProps as Xe,mergeProps as Ze,nextTick as Qe,normalizeClass as $e,normalizeProps as et,normalizeStyle as S,onBeforeUnmount as tt,onMounted as nt,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as D,toRefs as at,unref as O,useSlots as ot,vShow as st,watch as ct,withCtx as k,withDirectives as lt}from"vue";function ut(e){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:ee,isSmallArc:te}=e;return{smallArcLayoutsClassic:_(()=>{if(t.value.type!==`classic`)return{};let e={},ne=n.value||[];if(!ne.length)return e;let d=r.value.width/2,re=r.value.height/2,ie=i.value.top+16,f=r.value.height-i.value.bottom-16,p=a.value,m=p/3,ae=p*1.5,oe=d-(o.value+6),se=d+(o.value+6),ce=!!t.value.style.chart.layout.curvedMarkers;function le({midX:e,midY:t,bandX:n,bandY:r}){if(!ce)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<d?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-d,l=t-re,u=Math.sqrt(c*c+l*l)||1,ee=c/u,te=l/u,ne=u+9;function ie({x:e,y:t}){let n=e-d,r=t-re,i=Math.sqrt(n*n+r*r)||1;if(i>=ne)return{x:e,y:t};let a=ne/i;return{x:d+n*a,y:re+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,ne=(t+r)*.5,f=u+c,p=ne+l,m=(f-d)*(f-d)+(p-re)*(p-re),ae=u-c,oe=ne-l;(ae-d)*(ae-d)+(oe-re)*(oe-re)>m&&(c=-c,l=-l);let se=.78,ce=e+a*se,le=t+o*se,h=Math.max(0,Math.min(1,(s-18)/44)),ue=h*h*(3-2*h),de=2.5+ue*4,fe=1+ue*2.5;de*=.9;let pe=ie({x:ce+c*de+ee*fe,y:le+l*de+te*fe});return`M ${e} ${t} Q ${pe.x} ${pe.y} ${n} ${r}`}let f=s*.34;f<20&&(f=20),f>46&&(f=46);let p=s*.46;p<22&&(p=22),p>70&&(p=70);let m={x:e+ee*f,y:t+te*f},ae=d+i*Math.max(Math.abs(n-d),ne),oe={x:n-i*Math.min(p,Math.abs(ae-n)*.75),y:r},se=ie(m),le=ie(oe);return`M ${e} ${t} C ${se.x} ${se.y} ${le.x} ${le.y} ${n} ${r}`}function h(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(p*1.2);return ae+n}function ue({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:h(e.name)}}function de(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||ee.value.includes(n)?!1:te(t,n)}function fe(e){let t=e.inlineMarkerY<re,n=e.inlineMarkerX<d;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function pe(e,t){t.startsWith(`T`)?e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index):e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function me({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+m,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function he({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let ee=u,te=le({midX:s,midY:c,bandX:r,bandY:ee});e[i]=me({side:n,markerX:r,markerY:ee,labelY:u,connectorPath:te})})}let ge=ne.map((e,t)=>ue({arc:e,index:t})).filter(de),_e={TL:[],TR:[],BL:[],BR:[]};return ge.forEach(e=>{_e[fe(e)].push(e)}),Object.keys(_e).forEach(e=>{pe(_e[e],e)}),he({candidateList:_e.TL,side:`left`,bandMarkerX:oe,startY:ie,direction:`down`}),he({candidateList:_e.TR,side:`right`,bandMarkerX:se,startY:ie,direction:`down`}),_e.BL.length>1&&he({candidateList:_e.BL,side:`left`,bandMarkerX:oe,startY:f,direction:`up`}),_e.BR.length>1&&he({candidateList:_e.BR,side:`right`,bandMarkerX:se,startY:f,direction:`up`}),e})}}var dt=/* @__PURE__ */ e({default:()=>En}),ft=[`id`],pt=[`id`],mt=[`id`],ht={style:{position:`relative`}},gt=[`xmlns`,`aria-describedby`,`viewBox`],_t=[`width`,`height`],vt={key:1},yt={key:2},bt=[`id`],xt=[`id`],St=[`id`],Ct=[`flood-color`],wt=[`id`],Tt=[`flood-color`],Et=[`d`,`stroke`,`filter`],Dt=[`d`,`stroke`,`filter`],Ot=[`cx`,`cy`,`r`,`fill`,`filter`],kt={key:6},At=[`stroke`,`d`],jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Pt={key:0},Ft=[`stroke`,`d`],It={key:0},Lt=[`d`,`stroke`,`stroke-width`,`filter`],Rt={key:1},zt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Bt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Vt={key:1},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Wt={key:0},Gt=[`d`,`fill`,`stroke`,`stroke-width`],Kt=[`cx`,`cy`,`r`,`stroke`],qt=[`cx`,`cy`,`r`,`fill`],Jt=[`cx`,`cy`,`r`],Yt={key:0},Xt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Zt={key:1},Qt=[`cx`,`cy`,`r`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`x`,`y`,`fill`,`font-size`],nn=[`x`,`y`,`fill`,`font-size`],rn=[`filter`,`opacity`],an={key:0},on=[`x`,`y`],sn={key:1},cn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],hn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],gn={key:2},_n=[`x`,`y`,`width`],vn=[`x`,`y`,`width`],yn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bn={key:5,class:`vue-data-ui-watermark`},xn=[`id`],Sn=[`onClick`],Cn={key:8,class:`vue-ui-donut-hollow`},wn={key:0},Tn={key:1},En=/*#__PURE__*/ be({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:be,emit:dt}){let En=Ye(()=>import(`./Tooltip-C1q0Qoh7.js`)),Dn=Ye(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),On=Ye(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),kn=Ye(()=>import(`./DataTable-0Vv-aGHD.js`)),An=Ye(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),jn=Ye(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Mn=Ye(()=>import(`./PackageVersion-BIhjLNBU.js`).then(e=>e.t)),Nn=Ye(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_donut:Pn}=t(),{isThemeValid:Fn,warnInvalidTheme:In}=Se(),Ln=ot(),A=e,Rn=_({get(){return!!A.dataset&&A.dataset.length},set(e){return e}}),zn=it(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=it(null),Wn=it(null),Gn=it(null),Kn=it(null),qn=it(null),Jn=it(null),Yn=w(0),Xn=w(0),Zn=w(0),Qn=w(!1),$n=w(null),er=w(null),tr=w(null),nr=w({x:0,y:0}),rr=w(`pointer`),ir=w(!1),ar=_({get:()=>P.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),j=_({get:()=>P.value.style.chart.layout.labels.name.fontSize,set:e=>e}),or=_({get:()=>P.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),sr=!1,cr=()=>{P.value.autoSize&&!sr&&(sr=!0,requestAnimationFrame(()=>{sr=!1;let e=P.value,t=Bn.value,n=z.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:F.value.percentage.fontSize,minSize:F.value.percentage.minFontSize,sizeRef:ar},{selector:`.vue-data-ui-datalabel-name`,baseSize:F.value.name.fontSize,minSize:F.value.name.minFontSize,sizeRef:j},{selector:`.vue-data-ui-datalabel-inline`,baseSize:F.value.dataLabels.smallArcClusterFontSize,minSize:F.value.name.minFontSize,sizeRef:or}];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})=>{t.querySelectorAll(e).forEach(e=>{i.value=ue({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};nt(async()=>{Qn.value=!0,dr(),requestAnimationFrame(cr)});let lr;nt(()=>{zn.value&&(lr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){cr();break}}}),lr.observe(zn.value.parentElement))}),tt(()=>{lr?.disconnect()}),tt(()=>{Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect())});let ur=_(()=>P.value.debug);function dr(){if(he(A.dataset)?(d({componentName:`VueUiDonut`,type:`dataset`,debug:ur.value}),Rn.value=!1,xr.value=!0):(A.dataset.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{d({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:ur.value}),Rn.value=!1,xr.value=!0})}),ur.value&&A.dataset.forEach((e,t)=>{(!e.name||e.name===``)&&d({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),he(A.dataset)||(xr.value=P.value.loading),P.value.responsive){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:zn.value,title:P.value.style.chart.title.text?Un.value:null,legend:P.value.style.chart.legend.show?Wn.value:null,source:qn.value,noTitle:Jn.value,padding:P.value.autoSize?void 0:Nr.value});requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,cr()})});Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect()),Gn.value=new ResizeObserver(e),Kn.value=zn.value.parentNode,Gn.value.observe(Kn.value)}}let M=w(u()),fr=w(!1),pr=w(``),N=w(null),mr=w(0);function hr(){let e=xe({userConfig:A.config,defaultConfig:Pn}),t={},n=e.theme;if(!n)t=e;else if(!Fn.value(e))In(e),t=e;else{let r=xe({userConfig:Ue[n]||A.config,defaultConfig:e});t={...xe({userConfig:A.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||o}}return t}let P=w(hr()),F=_(()=>P.value.style.chart.layout.labels),I=_(()=>P.value.style.chart.layout.donut),gr=_(()=>P.value.style.chart.layout),L=_(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiDonut`,rules:[ye.singleSeries,ye.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let _r=_(()=>P.value.userOptions.useCursorPointer),vr=_(()=>ae({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:yr,FINAL_DATASET:br,manualLoading:xr,skeletonDataset:Sr}=ge({...at(A),FINAL_CONFIG:P,prepareConfig:hr,skeletonDataset:A.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:ae({defaultConfig:P.value,userConfig:vr.value})}),R=w(!0),Cr=w(0),wr=w(!1),Tr=null;function Er(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=oe(o);Cr.value=s,o<1?Tr=requestAnimationFrame(r):(Cr.value=1,Tr=null,t())}Tr!==null&&cancelAnimationFrame(Tr),Cr.value=0,Tr=requestAnimationFrame(r)})}ct(()=>yr.value,async e=>{if(e||wr.value)return;let t=br.value===Sr,n=P.value.startAnimation?.show;!t&&n?(wr.value=!0,await Er(P.value.startAnimation.durationMs||1e3)):Cr.value=1,R.value=!1},{immediate:!0});let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=ze({config:P.value}),{svgRef:z}=Be({config:L.value.title});function Ar(){Or(!0)}function jr(){Or(!1)}let Mr=ne(A.config);ct(()=>A.config,(e,t)=>{let n=ne(e),r=n!==Mr;Mr=n;let i=hr();r?(yr.value||(P.value=i),Dr.value=!P.value.userOptions.showOnChartHover,dr(),Yn.value+=1,Xn.value+=1,Zn.value+=1,B.value.dataLabels.show=F.value.dataLabels.show,B.value.showTable=P.value.table.show,B.value.showTooltip=L.value.tooltip.show,V.value.height=L.value.height,V.value.width=L.value.width):(P.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let Nr=_(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Pr,isImaging:Fr,generatePdf:Ir,generateImage:Lr}=Me({elementId:`donut__${M.value}`,fileName:L.value.title.text||`vue-ui-donut`,options:P.value.userOptions.print}),Rr=_(()=>P.value.userOptions.show&&!L.value.title.text),zr=_(()=>pe(P.value.customPalette)),B=w({dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show});ct(P,()=>{B.value={dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show}},{immediate:!0});let V=w({height:L.value.height,width:L.value.width}),Br=_(()=>{if(P.value.pie)return G.value;let e=I.value.strokeWidth/512,t=Math.min(V.value.width,V.value.height)*e,n=t>G.value?G.value:t;return Math.max(n,12*(1+e))}),Vr=dt,H=_(()=>br.value.sort((e,t)=>{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;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:re(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${M.value}_${t}`})));ct(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(xr.value=!1)},{immediate:!0});let U=it(H.value);ct(()=>H.value,e=>{U.value=e,requestAnimationFrame(cr)});function Hr(){return H.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let W=w([]),Ur=w(!1),Wr=w(null);function Gr(){Vr(`selectLegend`,$r.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Kr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=oe}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function qr(){W.value.length?W.value=[]:ei.value.forEach((e,t)=>{W.value.push(t)}),Gr()}function Jr(e){let t=H.value.find((t,n)=>n===e),n=U.value.find((t,n)=>n===e).value;if(W.value.includes(e)){W.value=W.value.filter(t=>t!==e);let r=t.value;function i(){U.value=U.value.map((t,n)=>e===n?{...t,value:r}:t),Gr()}function a(){Ur.value=!0,Wr.value=e,Kr({from:n,to:r,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{i(),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?a():(i(),requestAnimationFrame(cr))}else if(W.value.length<H.value.length-1){function t(){W.value.push(e),U.value=U.value.map((t,n)=>e===n?{...t,value:0}:t),Gr()}function r(){Ur.value=!0,Wr.value=e,Kr({from:n,to:0,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{t(),requestAnimationFrame(cr),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?r():t()}}function Yr(e){return H.value.length?H.value.find(t=>t.name===e)||(ur.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(ur.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Xr(e){let t=Yr(e);t!==null&&W.value.includes(t.seriesIndex)&&Jr(t.seriesIndex)}function Zr(e){let t=Yr(e);t!==null&&(W.value.includes(t.seriesIndex)||Jr(t.seriesIndex))}let Qr=_(()=>br.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),$r=_(()=>{if(R.value&&!yr.value){let e=Cr.value,t=H.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Qr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return U.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),U.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!W.value.includes(t))}),ei=_(()=>br.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/br.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let r=m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,index:t}),i=m(F.value.percentage.formatter,di(e),n({v:di(e),s:`%`,r:L.value.legend.roundingPercentage})),a=Di({val:r,percentage:W.value.includes(t)?`${Ei(e.proportion*100)}%`:i,showVal:L.value.legend.showValue,showPercentage:L.value.legend.showPercentage,config:L.value.legend});return{...e,opacity:W.value.includes(t)?.5:1,segregate:()=>!Ur.value&&Jr(t),isSegregated:W.value.includes(t),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${a}`}})),ti=_(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),G=_(()=>{let e=I.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(V.value.width*t,V.value.height*t);return Math.max(12,n)}),K=_(()=>s({series:$r.value},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),ni=_(()=>Math.abs($r.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ri=_(()=>s({series:[{value:1,color:I.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),q=_(()=>K.value.filter(e=>!e.ghost)),J=_(()=>{let e=Math.max(...$r.value.map(e=>e.value)),t=$r.value.map(t=>t.value/e);return se({series:t,center:{x:V.value.width/2,y:V.value.height/2},maxRadius:Math.min(V.value.width,V.value.height)/3,hasGhost:R.value})});function ii(e){return e.x>V.value.width/2+6?`start`:e.x<V.value.width/2-6?`end`:`middle`}function ai(e){return e.middlePoint.y>V.value.height/2?r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:V.value.width/2,centerY:V.value.height/2}).y:r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:V.value.width/2,centerY:V.value.height/2}).y-100}function Y(e){return e.proportion*100>F.value.dataLabels.hideUnderValue}function oi(e,t){let n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold,i=(li.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:X}=ut({FINAL_CONFIG:P,noGhostDonut:q,svg:V,padding:Nr,labels_inline_fontSize:or,minSize:G,findArcMidpoint:fe,calcMarkerOffsetX:f,calcMarkerOffsetY:h,animatingIndex:Wr,segregated:W,isSmallArc:oi});function si(e,t){let r=e.value/ci(t);return isNaN(r)?0:m(F.value.percentage.formatter,r*100,n({v:r*100,s:`%`,r:F.value.percentage.rounding}),{datapoint:e})}function ci(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Z=_(()=>$r.value.map(e=>e.value).reduce((e,t)=>e+t,0)),li=_(()=>{let e=H.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:H.value.map(t=>t.value/e)}),ui=_(()=>Z.value/$r.value.length);function di(e){return Ur.value?e.proportion*100:e.value/Z.value*100}let fi=w(null),pi=w(!1);function mi({datapoint:e,seriesIndex:t}){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),fr.value=!1,N.value=null,tr.value=null,rr.value=`pointer`}function Q({datapoint:e,relativeIndex:t,seriesIndex:r,show:i=!1,triggerMode:o=`pointer`}){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:r}),rr.value=o,tr.value=t,fi.value={datapoint:e,seriesIndex:r,config:P.value,series:H.value},fr.value=i,N.value=t;let s=``,l=L.value.tooltip.customFormat;if(pi.value=!1,a(l))try{let t=l({seriesIndex:r,datapoint:e,series:H.value,config:P.value});typeof t==`string`&&(pr.value=t,pi.value=!0)}catch{console.warn(`Custom format cannot be applied.`),pi.value=!1}pi.value||(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,s+=`<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}"/>${Ln.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${M.value}_${r})"/>`:``}</svg>`,s+=`<b>${Di({showVal:L.value.tooltip.showValue,showPercentage:L.value.tooltip.showPercentage,val:`<span>${m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:r})}</span>`,percentage:m(F.value.percentage.formatter,e.proportion*100,n({v:e.proportion*100,s:`%`,r:L.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:r}),config:L.value.tooltip})}</b></div>`,L.value.comments.showInTooltip&&e.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${c(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),pr.value=`<div>${s}</div>`)}function hi(e,t){let n=X.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=f(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:h(e)}}function gi(e,t,n){let{textAnchor:r,x:i}=hi(e,t),a=Oi(e),o=`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Bt as r,D as i,Dt as a,Ht as o,It as s,Jt as c,S as l,X as u,Y as ee,Yt as te,Zt as ne,at as d,b as re,dt as ie,f,h as p,i as m,in as ae,it as oe,j as se,nn as ce,nt as le,p as h,s as ue,t as de,ut as fe,w as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-DPGnEuYM.js";import{n as we}from"./Title-BliHuXfT.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./annotationSlots-BRR85CqJ.js";import{n as Ae,t as je}from"./userOptionsSlots-DYuo-E5m.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ve,t as He}from"./labelUtils-CdtU-yB_.js";import{t as Ue}from"./vue_ui_donut-T5PeOqvf.js";import{t as We}from"./Legend-DM0ClX3D.js";import{Fragment as g,Teleport as Ge,computed as _,createBlock as v,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as Ye,guardReactiveProps as Xe,mergeProps as Ze,nextTick as Qe,normalizeClass as $e,normalizeProps as et,normalizeStyle as S,onBeforeUnmount as tt,onMounted as nt,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as D,toRefs as at,unref as O,useSlots as ot,vShow as st,watch as ct,withCtx as k,withDirectives as lt}from"vue";function ut(e){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:ee,isSmallArc:te}=e;return{smallArcLayoutsClassic:_(()=>{if(t.value.type!==`classic`)return{};let e={},ne=n.value||[];if(!ne.length)return e;let d=r.value.width/2,re=r.value.height/2,ie=i.value.top+16,f=r.value.height-i.value.bottom-16,p=a.value,m=p/3,ae=p*1.5,oe=d-(o.value+6),se=d+(o.value+6),ce=!!t.value.style.chart.layout.curvedMarkers;function le({midX:e,midY:t,bandX:n,bandY:r}){if(!ce)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<d?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-d,l=t-re,u=Math.sqrt(c*c+l*l)||1,ee=c/u,te=l/u,ne=u+9;function ie({x:e,y:t}){let n=e-d,r=t-re,i=Math.sqrt(n*n+r*r)||1;if(i>=ne)return{x:e,y:t};let a=ne/i;return{x:d+n*a,y:re+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,ne=(t+r)*.5,f=u+c,p=ne+l,m=(f-d)*(f-d)+(p-re)*(p-re),ae=u-c,oe=ne-l;(ae-d)*(ae-d)+(oe-re)*(oe-re)>m&&(c=-c,l=-l);let se=.78,ce=e+a*se,le=t+o*se,h=Math.max(0,Math.min(1,(s-18)/44)),ue=h*h*(3-2*h),de=2.5+ue*4,fe=1+ue*2.5;de*=.9;let pe=ie({x:ce+c*de+ee*fe,y:le+l*de+te*fe});return`M ${e} ${t} Q ${pe.x} ${pe.y} ${n} ${r}`}let f=s*.34;f<20&&(f=20),f>46&&(f=46);let p=s*.46;p<22&&(p=22),p>70&&(p=70);let m={x:e+ee*f,y:t+te*f},ae=d+i*Math.max(Math.abs(n-d),ne),oe={x:n-i*Math.min(p,Math.abs(ae-n)*.75),y:r},se=ie(m),le=ie(oe);return`M ${e} ${t} C ${se.x} ${se.y} ${le.x} ${le.y} ${n} ${r}`}function h(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(p*1.2);return ae+n}function ue({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:h(e.name)}}function de(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||ee.value.includes(n)?!1:te(t,n)}function fe(e){let t=e.inlineMarkerY<re,n=e.inlineMarkerX<d;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function pe(e,t){t.startsWith(`T`)?e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index):e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function me({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+m,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function he({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let ee=u,te=le({midX:s,midY:c,bandX:r,bandY:ee});e[i]=me({side:n,markerX:r,markerY:ee,labelY:u,connectorPath:te})})}let ge=ne.map((e,t)=>ue({arc:e,index:t})).filter(de),_e={TL:[],TR:[],BL:[],BR:[]};return ge.forEach(e=>{_e[fe(e)].push(e)}),Object.keys(_e).forEach(e=>{pe(_e[e],e)}),he({candidateList:_e.TL,side:`left`,bandMarkerX:oe,startY:ie,direction:`down`}),he({candidateList:_e.TR,side:`right`,bandMarkerX:se,startY:ie,direction:`down`}),_e.BL.length>1&&he({candidateList:_e.BL,side:`left`,bandMarkerX:oe,startY:f,direction:`up`}),_e.BR.length>1&&he({candidateList:_e.BR,side:`right`,bandMarkerX:se,startY:f,direction:`up`}),e})}}var dt=/* @__PURE__ */ e({default:()=>En}),ft=[`id`],pt=[`id`],mt=[`id`],ht={style:{position:`relative`}},gt=[`xmlns`,`aria-describedby`,`viewBox`],_t=[`width`,`height`],vt={key:1},yt={key:2},bt=[`id`],xt=[`id`],St=[`id`],Ct=[`flood-color`],wt=[`id`],Tt=[`flood-color`],Et=[`d`,`stroke`,`filter`],Dt=[`d`,`stroke`,`filter`],Ot=[`cx`,`cy`,`r`,`fill`,`filter`],kt={key:6},At=[`stroke`,`d`],jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Pt={key:0},Ft=[`stroke`,`d`],It={key:0},Lt=[`d`,`stroke`,`stroke-width`,`filter`],Rt={key:1},zt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Bt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Vt={key:1},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Wt={key:0},Gt=[`d`,`fill`,`stroke`,`stroke-width`],Kt=[`cx`,`cy`,`r`,`stroke`],qt=[`cx`,`cy`,`r`,`fill`],Jt=[`cx`,`cy`,`r`],Yt={key:0},Xt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Zt={key:1},Qt=[`cx`,`cy`,`r`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`x`,`y`,`fill`,`font-size`],nn=[`x`,`y`,`fill`,`font-size`],rn=[`filter`,`opacity`],an={key:0},on=[`x`,`y`],sn={key:1},cn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],hn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],gn={key:2},_n=[`x`,`y`,`width`],vn=[`x`,`y`,`width`],yn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bn={key:5,class:`vue-data-ui-watermark`},xn=[`id`],Sn=[`onClick`],Cn={key:8,class:`vue-ui-donut-hollow`},wn={key:0},Tn={key:1},En=/*#__PURE__*/ be({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:be,emit:dt}){let En=Ye(()=>import(`./Tooltip-C1q0Qoh7.js`)),Dn=Ye(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),On=Ye(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),kn=Ye(()=>import(`./DataTable-0Vv-aGHD.js`)),An=Ye(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),jn=Ye(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Mn=Ye(()=>import(`./PackageVersion-CXT-eAuk.js`).then(e=>e.t)),Nn=Ye(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_donut:Pn}=t(),{isThemeValid:Fn,warnInvalidTheme:In}=Se(),Ln=ot(),A=e,Rn=_({get(){return!!A.dataset&&A.dataset.length},set(e){return e}}),zn=it(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=it(null),Wn=it(null),Gn=it(null),Kn=it(null),qn=it(null),Jn=it(null),Yn=w(0),Xn=w(0),Zn=w(0),Qn=w(!1),$n=w(null),er=w(null),tr=w(null),nr=w({x:0,y:0}),rr=w(`pointer`),ir=w(!1),ar=_({get:()=>P.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),j=_({get:()=>P.value.style.chart.layout.labels.name.fontSize,set:e=>e}),or=_({get:()=>P.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),sr=!1,cr=()=>{P.value.autoSize&&!sr&&(sr=!0,requestAnimationFrame(()=>{sr=!1;let e=P.value,t=Bn.value,n=z.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:F.value.percentage.fontSize,minSize:F.value.percentage.minFontSize,sizeRef:ar},{selector:`.vue-data-ui-datalabel-name`,baseSize:F.value.name.fontSize,minSize:F.value.name.minFontSize,sizeRef:j},{selector:`.vue-data-ui-datalabel-inline`,baseSize:F.value.dataLabels.smallArcClusterFontSize,minSize:F.value.name.minFontSize,sizeRef:or}];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})=>{t.querySelectorAll(e).forEach(e=>{i.value=ue({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};nt(async()=>{Qn.value=!0,dr(),requestAnimationFrame(cr)});let lr;nt(()=>{zn.value&&(lr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){cr();break}}}),lr.observe(zn.value.parentElement))}),tt(()=>{lr?.disconnect()}),tt(()=>{Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect())});let ur=_(()=>P.value.debug);function dr(){if(he(A.dataset)?(d({componentName:`VueUiDonut`,type:`dataset`,debug:ur.value}),Rn.value=!1,xr.value=!0):(A.dataset.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{d({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:ur.value}),Rn.value=!1,xr.value=!0})}),ur.value&&A.dataset.forEach((e,t)=>{e.name&&e.name!==``||d({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),he(A.dataset)||(xr.value=P.value.loading),P.value.responsive){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:zn.value,title:P.value.style.chart.title.text?Un.value:null,legend:P.value.style.chart.legend.show?Wn.value:null,source:qn.value,noTitle:Jn.value,padding:P.value.autoSize?void 0:Nr.value});requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,cr()})});Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect()),Gn.value=new ResizeObserver(e),Kn.value=zn.value.parentNode,Gn.value.observe(Kn.value)}}let M=w(u()),fr=w(!1),pr=w(``),N=w(null),mr=w(0);function hr(){let e=xe({userConfig:A.config,defaultConfig:Pn}),t={},n=e.theme;if(!n)t=e;else if(!Fn.value(e))In(e),t=e;else{let r=xe({userConfig:Ue[n]||A.config,defaultConfig:e});t={...xe({userConfig:A.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||o}}return t}let P=w(hr()),F=_(()=>P.value.style.chart.layout.labels),I=_(()=>P.value.style.chart.layout.donut),gr=_(()=>P.value.style.chart.layout),L=_(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiDonut`,rules:[ye.singleSeries,ye.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let _r=_(()=>P.value.userOptions.useCursorPointer),vr=_(()=>ae({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:yr,FINAL_DATASET:br,manualLoading:xr,skeletonDataset:Sr}=ge({...at(A),FINAL_CONFIG:P,prepareConfig:hr,skeletonDataset:A.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:ae({defaultConfig:P.value,userConfig:vr.value})}),R=w(!0),Cr=w(0),wr=w(!1),Tr=null;function Er(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=oe(o);Cr.value=s,o<1?Tr=requestAnimationFrame(r):(Cr.value=1,Tr=null,t())}Tr!==null&&cancelAnimationFrame(Tr),Cr.value=0,Tr=requestAnimationFrame(r)})}ct(()=>yr.value,async e=>{if(e||wr.value)return;let t=br.value===Sr,n=P.value.startAnimation?.show;!t&&n?(wr.value=!0,await Er(P.value.startAnimation.durationMs||1e3)):Cr.value=1,R.value=!1},{immediate:!0});let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=ze({config:P.value}),{svgRef:z}=Be({config:L.value.title});function Ar(){Or(!0)}function jr(){Or(!1)}let Mr=ne(A.config);ct(()=>A.config,(e,t)=>{let n=ne(e),r=n!==Mr;Mr=n;let i=hr();r?(yr.value||(P.value=i),Dr.value=!P.value.userOptions.showOnChartHover,dr(),Yn.value+=1,Xn.value+=1,Zn.value+=1,B.value.dataLabels.show=F.value.dataLabels.show,B.value.showTable=P.value.table.show,B.value.showTooltip=L.value.tooltip.show,V.value.height=L.value.height,V.value.width=L.value.width):(P.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let Nr=_(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Pr,isImaging:Fr,generatePdf:Ir,generateImage:Lr}=Me({elementId:`donut__${M.value}`,fileName:L.value.title.text||`vue-ui-donut`,options:P.value.userOptions.print}),Rr=_(()=>P.value.userOptions.show&&!L.value.title.text),zr=_(()=>pe(P.value.customPalette)),B=w({dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show});ct(P,()=>{B.value={dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show}},{immediate:!0});let V=w({height:L.value.height,width:L.value.width}),Br=_(()=>{if(P.value.pie)return G.value;let e=I.value.strokeWidth/512,t=Math.min(V.value.width,V.value.height)*e,n=t>G.value?G.value:t;return Math.max(n,12*(1+e))}),Vr=dt,H=_(()=>br.value.sort((e,t)=>{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;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:re(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${M.value}_${t}`})));ct(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(xr.value=!1)},{immediate:!0});let U=it(H.value);ct(()=>H.value,e=>{U.value=e,requestAnimationFrame(cr)});function Hr(){return H.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let W=w([]),Ur=w(!1),Wr=w(null);function Gr(){Vr(`selectLegend`,$r.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Kr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=oe}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function qr(){W.value.length?W.value=[]:ei.value.forEach((e,t)=>{W.value.push(t)}),Gr()}function Jr(e){let t=H.value.find((t,n)=>n===e),n=U.value.find((t,n)=>n===e).value;if(W.value.includes(e)){W.value=W.value.filter(t=>t!==e);let r=t.value;function i(){U.value=U.value.map((t,n)=>e===n?{...t,value:r}:t),Gr()}function a(){Ur.value=!0,Wr.value=e,Kr({from:n,to:r,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{i(),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?a():(i(),requestAnimationFrame(cr))}else if(W.value.length<H.value.length-1){function t(){W.value.push(e),U.value=U.value.map((t,n)=>e===n?{...t,value:0}:t),Gr()}function r(){Ur.value=!0,Wr.value=e,Kr({from:n,to:0,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{t(),requestAnimationFrame(cr),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?r():t()}}function Yr(e){return H.value.length?H.value.find(t=>t.name===e)||(ur.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(ur.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Xr(e){let t=Yr(e);t!==null&&W.value.includes(t.seriesIndex)&&Jr(t.seriesIndex)}function Zr(e){let t=Yr(e);t!==null&&(W.value.includes(t.seriesIndex)||Jr(t.seriesIndex))}let Qr=_(()=>br.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),$r=_(()=>{if(R.value&&!yr.value){let e=Cr.value,t=H.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Qr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return U.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),U.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!W.value.includes(t))}),ei=_(()=>br.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/br.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let r=m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,index:t}),i=m(F.value.percentage.formatter,di(e),n({v:di(e),s:`%`,r:L.value.legend.roundingPercentage})),a=Di({val:r,percentage:W.value.includes(t)?`${Ei(e.proportion*100)}%`:i,showVal:L.value.legend.showValue,showPercentage:L.value.legend.showPercentage,config:L.value.legend});return{...e,opacity:W.value.includes(t)?.5:1,segregate:()=>!Ur.value&&Jr(t),isSegregated:W.value.includes(t),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${a}`}})),ti=_(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),G=_(()=>{let e=I.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(V.value.width*t,V.value.height*t);return Math.max(12,n)}),K=_(()=>s({series:$r.value},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),ni=_(()=>Math.abs($r.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ri=_(()=>s({series:[{value:1,color:I.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),q=_(()=>K.value.filter(e=>!e.ghost)),J=_(()=>{let e=Math.max(...$r.value.map(e=>e.value)),t=$r.value.map(t=>t.value/e);return se({series:t,center:{x:V.value.width/2,y:V.value.height/2},maxRadius:Math.min(V.value.width,V.value.height)/3,hasGhost:R.value})});function ii(e){return e.x>V.value.width/2+6?`start`:e.x<V.value.width/2-6?`end`:`middle`}function ai(e){return e.middlePoint.y>V.value.height/2?r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:V.value.width/2,centerY:V.value.height/2}).y:r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:V.value.width/2,centerY:V.value.height/2}).y-100}function Y(e){return e.proportion*100>F.value.dataLabels.hideUnderValue}function oi(e,t){let n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold,i=(li.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:X}=ut({FINAL_CONFIG:P,noGhostDonut:q,svg:V,padding:Nr,labels_inline_fontSize:or,minSize:G,findArcMidpoint:fe,calcMarkerOffsetX:f,calcMarkerOffsetY:h,animatingIndex:Wr,segregated:W,isSmallArc:oi});function si(e,t){let r=e.value/ci(t);return isNaN(r)?0:m(F.value.percentage.formatter,r*100,n({v:r*100,s:`%`,r:F.value.percentage.rounding}),{datapoint:e})}function ci(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Z=_(()=>$r.value.map(e=>e.value).reduce((e,t)=>e+t,0)),li=_(()=>{let e=H.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:H.value.map(t=>t.value/e)}),ui=_(()=>Z.value/$r.value.length);function di(e){return Ur.value?e.proportion*100:e.value/Z.value*100}let fi=w(null),pi=w(!1);function mi({datapoint:e,seriesIndex:t}){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),fr.value=!1,N.value=null,tr.value=null,rr.value=`pointer`}function Q({datapoint:e,relativeIndex:t,seriesIndex:r,show:i=!1,triggerMode:o=`pointer`}){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:r}),rr.value=o,tr.value=t,fi.value={datapoint:e,seriesIndex:r,config:P.value,series:H.value},fr.value=i,N.value=t;let s=``,l=L.value.tooltip.customFormat;if(pi.value=!1,a(l))try{let t=l({seriesIndex:r,datapoint:e,series:H.value,config:P.value});typeof t==`string`&&(pr.value=t,pi.value=!0)}catch{console.warn(`Custom format cannot be applied.`),pi.value=!1}pi.value||(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,s+=`<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}"/>${Ln.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${M.value}_${r})"/>`:``}</svg>`,s+=`<b>${Di({showVal:L.value.tooltip.showValue,showPercentage:L.value.tooltip.showPercentage,val:`<span>${m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:r})}</span>`,percentage:m(F.value.percentage.formatter,e.proportion*100,n({v:e.proportion*100,s:`%`,r:L.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:r}),config:L.value.tooltip})}</b></div>`,L.value.comments.showInTooltip&&e.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${c(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),pr.value=`<div>${s}</div>`)}function hi(e,t){let n=X.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=f(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:h(e)}}function gi(e,t,n){let{textAnchor:r,x:i}=hi(e,t),a=Oi(e),o=`
2
2
  <tspan
3
3
  class="vue-data-ui-datalabel-inline"
4
4
  fill="${F.value.percentage.color}"
@@ -44,4 +44,4 @@ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO
44
44
  font-size="${j.value}px"
45
45
  style="font-weight:${F.value.name.bold?`bold`:`normal`}"
46
46
  >${e}</tspan>
47
- `}),i===`end`?`${F.value.name.show?u:``}${c}`:`${c}${F.value.name.show?u:``}`}function vi(e){return P.value.useBlurOnHover&&![null,void 0].includes(N.value)&&N.value!==e?`url(#blur_${M.value})`:``}function yi(e){if(!Ur.value||Wr.value===null||e.seriesIndex!==Wr.value)return 1;let t=(e.proportion??0)*100,n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let bi=_(()=>({head:$r.value.map(e=>({name:e.name,color:e.color})),body:$r.value.map(e=>e.value)}));function xi(e=null){Qe(()=>{let t=bi.value.head.map((e,t)=>[[e.name],[bi.value.body[t]],[isNaN(bi.value.body[t]/Z.value)?`-`:bi.value.body[t]/Z.value*100]]),n=[[L.value.title.text],[L.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=i(n);e?e(r):le({csvContent:r,title:L.value.title.text||`vue-ui-donut`})})}let Si=_(()=>{let e=[`__SUM__`,n({p:F.value.dataLabels.prefix,v:Z.value,s:F.value.dataLabels.suffix,r:P.value.table.td.roundingValue}),`100%`],t=bi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},bi.value.body[t],isNaN(bi.value.body[t]/Z.value)?`-`:(bi.value.body[t]/Z.value*100).toFixed(P.value.table.td.roundingPercentage)+`%`]),r=t.map(e=>e.map((e,t)=>t===0?e.name:e)),i={th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.value,P.value.table.columnNames.percentage],head:e,body:t,a11yBody:r,config:i}}),Ci=w(!1);function wi(e){Ci.value=e,mr.value+=1}let Ti=_(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ei(e){return Ve({num:e,rounding:L.value.legend.roundingPercentage})}function Di({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return He({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Oi(e){return Di({val:m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:F.value.value.rounding}),{datapoint:e}),percentage:si(e,q.value),showVal:F.value.value.show,showPercentage:F.value.percentage.show,config:F.value.dataLabels})}function $(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),Vr(`selectDatapoint`,{datapoint:e,index:t})}function ki(){B.value.showTable=!B.value.showTable}function Ai(){B.value.dataLabels.show=!B.value.dataLabels.show}function ji(){B.value.showTooltip=!B.value.showTooltip}let Mi=w(!1);function Ni(){Mi.value=!Mi.value}let Pi=Ce(zn,()=>L.value.title.text);function Fi(){if(!Bn.value)return;let{x:e,y:t,width:n,height:r}=Bn.value.getBBox();z.value&&z.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ii=_(()=>De({config:P,style:L,mutableConfig:B,dialog:Nn,accordion:On,isFullscreen:Ci,parent:zn,maxWidth:500,isCursorPointer:_r}));ct(()=>B.value.showTable,e=>Ee(e,P,$n));function Li(){B.value.showTable=!1,er.value&&er.value.setTableIconState(!1)}let Ri=_(()=>ei.value.map(e=>({...e,name:e.display}))),zi=_(()=>L.value.backgroundColor),Bi=_(()=>L.value.legend),Vi=_(()=>L.value.title),{isCallbackImaging:Hi,isCallbackSvg:Ui,generateSvg:Wi,onGenerateImage:Gi}=Te({svg:z,title:Vi,legend:Bi,legendItems:Ri,backgroundColor:zi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Lr});async function Ki(){Vr(`copyAlt`,{config:P.value,dataset:U.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:U.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qi(){tr.value=null,ir.value=!0}function Ji(){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null,ir.value=!1}function Yi(e){if(!z.value||Mi.value||document.activeElement!==z.value||!q.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null;return}if(r){if(tr.value===null)return;let e=q.value[tr.value];if(!e)return;$(e,tr.value);return}let a=tr.value,o=N.value,s=a!==null&&a>=0&&a<q.value.length,c=o!==null&&o>=0&&o<q.value.length;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;let l=q.value[a];l&&(tr.value=a,Xi(a),Q({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Xi(e){if(!Number.isFinite(e)||!z.value)return;let t=V.value.width/2,n=V.value.height/2;if(P.value.type===`classic`){let r=q.value[e];if(!r?.arcSlice)return;let i=fe(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=J.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=z.value.getBoundingClientRect();nr.value={x:r.left+t/V.value.width*r.width,y:r.top+n/V.value.height*r.height}}let Zi=_(()=>({headers:Si.value?.colNames??[],rows:Si.value?.a11yBody??[]}));return be({autoSize:Fi,getData:Hr,getImage:Pi,generatePdf:Ir,generateCsv:xi,generateImage:Lr,generateSvg:Wi,hideSeries:Zr,showSeries:Xr,toggleTable:ki,toggleLabels:Ai,toggleTooltip:ji,toggleAnnotator:Ni,toggleFullscreen:wi,copyAlt:Ki}),(t,i)=>(C(),b(`div`,{ref_key:`donutChart`,ref:zn,class:$e(`vue-data-ui-component vue-ui-donut ${Ci.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:S(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height:100%;`:``} text-align:center;background:${L.value.backgroundColor}`),id:`donut__${M.value}`,onMouseenter:Ar,onMouseleave:jr},[x(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[x(`p`,null,D(P.value.a11y.translations.keyboardNavigation),1)],8,pt),Zi.value?.rows?.length?(C(),v(Re,{key:0,uid:M.value,head:Zi.value.headers,body:Zi.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):y(``,!0),P.value.userOptions.buttons.annotator&&O(z)?(C(),v(O(An),{key:1,color:L.value.color,backgroundColor:L.value.backgroundColor,active:Mi.value,svgRef:O(z),isCursorPointer:_r.value,palette:P.value.userOptions.annotatorPalette,onClose:Ni},Ke({_:2},[T(O(ke),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(Oe)(e,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):y(``,!0),E(t.$slots,`userConfig`,{},void 0,!0),Rr.value?(C(),b(`div`,{key:2,ref_key:`noTitle`,ref:Jn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):y(``,!0),L.value.title.text?(C(),b(`div`,{key:3,ref_key:`chartTitle`,ref:Un,style:`width:100%;background:transparent;padding-bottom:24px`},[(C(),v(we,{key:`title_${Yn.value}`,config:{title:{cy:`donut-div-title`,...L.value.title},subtitle:{cy:`donut-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):y(``,!0),x(`div`,{id:`legend-top-${M.value}`},null,8,mt),P.value.userOptions.show&&Rn.value&&(O(kr)||O(Dr))?(C(),v(O(jn),{ref_key:`userOptionsRef`,ref:er,key:`user_option_${mr.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:O(Pr),isImaging:O(Fr),uid:M.value,hasTooltip:L.value.tooltip.show&&P.value.userOptions.buttons.tooltip,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasLabel:P.value.userOptions.buttons.labels,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ci.value,chartElement:zn.value,position:P.value.userOptions.position,callbacks:P.value.userOptions.callbacks,isTooltip:B.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Mi.value,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:_r.value,onToggleFullscreen:wi,onGeneratePdf:O(Ir),onGenerateCsv:xi,onGenerateImage:O(Gi),onGenerateSvg:O(Wi),onToggleTable:ki,onToggleLabels:Ai,onToggleTooltip:ji,onToggleAnnotator:Ni,onCopyAlt:Ki,style:S({visibility:O(kr)?O(Dr)?`visible`:`hidden`:`visible`})},Ke({_:2},[T(O(Ae)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(je)(e,n))),void 0,!0)])}))]),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.onGenerateImage.onGenerateSvg.style`.split(`.`))):y(``,!0),x(`div`,ht,[(C(),b(`svg`,{ref_key:`svgRef`,ref:z,xmlns:O(de),"aria-describedby":`chart-instructions-${M.value}`,class:$e({"vue-data-ui-fullscreen--on":Ci.value,"vue-data-ui-fulscreen--off":!Ci.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`,style:S(`max-width:100%; overflow: visible; background:transparent;color:${L.value.color};${Nr.value.css}`),tabindex:`0`,onFocus:qi,onBlur:Ji,onKeydown:Yi},[x(`g`,{ref_key:`G`,ref:Bn,class:`vue-data-ui-g`},[Je(O(Mn)),E(t.$slots,`svg-underlayer`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0),t.$slots[`chart-background`]?(C(),b(`foreignObject`,{key:0,x:0,y:0,width:V.value.width<=0?10:V.value.width,height:V.value.height<=0?10:V.value.height,style:{pointerEvents:`none`}},[E(t.$slots,`chart-background`,{},void 0,!0)],8,_t)):y(``,!0),P.value.type===`classic`&&!isNaN(Br.value/G.value)?(C(),b(`defs`,vt,[L.value.useGradient?(C(),v(Ie,{key:0,t:`radial`,id:`gradient_${M.value}`,stops:[[`0%`,O(c)(L.value.backgroundColor,0),0],[`${(1-Br.value/G.value)*100}%`,O(c)(`#FFFFFF`,0),0],[`${(1-Br.value/G.value/2)*100}%`,O(c)(`#FFFFFF`,L.value.gradientIntensity),1],[`100%`,O(c)(L.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):y(``,!0)])):y(``,!0),P.value.type===`polar`?(C(),b(`defs`,yt,[(C(!0),b(g,null,T(J.value,(e,t)=>(C(),v(Ie,{t:`radial`,id:`polar_gradient_${t}_${M.value}`,key:`pg_${t}_${M.value}`,cx:(isNaN(e.middlePoint.x/V.value.width*100)?0:e.middlePoint.x/V.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/V.value.height*100)?0:e.middlePoint.y/V.value.height*100)+`%`,r:`62%`,stops:[[`0%`,O(te)(K.value[t].color,.05),L.value.gradientIntensity/100],[`100%`,K.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):y(``,!0),x(`defs`,null,[x(`filter`,{id:`blur_${M.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${M.value}`},null,8,xt),i[5]||=x(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,bt),x(`filter`,{id:`shadow_${M.value}`,"color-interpolation-filters":`sRGB`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":I.value.shadowColor},null,8,Ct)],8,St),x(`filter`,{id:`drop_shadow_${M.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":I.value.shadowColor},null,8,Tt)],8,wt)]),P.value.type===`classic`?(C(!0),b(g,{key:3},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:O(X)[t]?.connectorPath||O(p)(e,{x:V.value.width/2,y:V.value.height/2},16,16,!1,!1,Br.value,12,gr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t)},null,8,Et)):y(``,!0)]))),256)):y(``,!0),P.value.type===`polar`?(C(!0),b(g,{key:4},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:`M ${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x},${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Dt)):y(``,!0)]))),256)):y(``,!0),P.value.type===`classic`&&I.value.useShadow?(C(),b(`circle`,{key:5,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:L.value.backgroundColor,filter:`url(#shadow_${M.value})`},null,8,Ot)):y(``,!0),t.$slots.pattern?(C(),b(`g`,kt,[(C(!0),b(g,null,T(e.dataset,(e,n)=>(C(),b(`defs`,{key:`pattern-${e.patternIndex}`},[E(t.$slots,`pattern`,Ze({ref_for:!0},{seriesIndex:n,patternId:`pattern_${M.value}_${n}`}),void 0,!0)]))),128))])):y(``,!0),Z.value&&P.value.type===`classic`?(C(),b(g,{key:7},[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:L.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,At))),256)),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,jt))),256)),t.$slots.pattern?(C(),b(`g`,Mt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,Nt))),256))])):y(``,!0)],64)):y(``,!0),Z.value&&P.value.type===`polar`?(C(),b(g,{key:8},[K.value.length>1?(C(),b(`g`,Pt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,d:J.value[t].path,fill:`#FFFFFF`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256)),I.value.useShadow?(C(),b(`g`,It,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`transparent`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:`url(#drop_shadow_${M.value})`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256))])):y(``,!0),t.$slots.pattern?(C(),b(`g`,Rt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,zt))),256))])):y(``,!0),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:L.value.useGradient?`url(#polar_gradient_${t}_${M.value})`:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Bt))),256))])):(C(),b(`g`,Vt,[t.$slots.pattern?(C(),b(`circle`,{key:0,cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`url(#pattern_${M.value}_${K.value[0].patternIndex})`,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ht)):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:L.value.useGradient?`url(#polar_gradient_0_${M.value})`:K.value[0].color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ut)]))],64)):(C(),b(g,{key:9},[P.value.type===`classic`&&!ni.value?(C(),b(`g`,Wt,[(C(!0),b(g,null,T(ri.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Gt))),256))])):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`transparent`,stroke:L.value.backgroundColor},null,8,Kt)],64)),L.value.useGradient&&P.value.type===`classic`?(C(),b(`circle`,{key:10,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`url(#gradient_${M.value})`},null,8,qt)):y(``,!0),x(`circle`,{ref_key:`circle_hollow`,ref:Hn,style:{pointerEvents:`none`},fill:`none`,cx:V.value.width/2,cy:V.value.height/2,r:Math.max(.1,Br.value*1.7)},null,8,Jt),Z.value?(C(),b(g,{key:11},[K.value.length>1||P.value.type===`classic`?(C(),b(`g`,Yt,[(C(!0),b(g,null,T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`path`,{d:P.value.type===`classic`?e.arcSlice:J.value[t].path,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,fill:N.value===t?I.value.selectedColor:`transparent`,onMouseenter:n=>Q({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>$(e,t)},null,40,Xt))),256))])):(C(),b(`g`,Zt,[x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`transparent`,onMouseenter:i[0]||=e=>Q({datapoint:K.value[0],relativeIndex:0,seriesIndex:K.value[0].seriesIndex,show:!0}),onMouseleave:i[1]||=e=>mi({datapoint:K.value[0],seriesIndex:K.value[0].seriesIndex}),onClick:i[2]||=e=>$(K.value[0],t.i)},null,40,Qt)]))],64)):y(``,!0),P.value.type===`classic`?(C(),b(`g`,{key:12,ref_key:`G_hollow`,ref:Vn,class:`vue-data-ui-donut-hollow-labels`},[F.value.hollow.total.show?(C(),b(`text`,{key:0,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.offsetY,fill:F.value.hollow.total.color,"font-size":F.value.hollow.total.fontSize,style:S(`font-weight:${F.value.hollow.total.bold?`bold`:``}`)},D(F.value.hollow.total.text),13,$t)):y(``,!0),F.value.hollow.total.show?(C(),b(`text`,{key:1,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+F.value.hollow.total.fontSize-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.value.offsetY,fill:F.value.hollow.total.value.color,"font-size":F.value.hollow.total.value.fontSize,style:S(`font-weight:${F.value.hollow.total.value.bold?`bold`:``}`)},D(O(m)(F.value.hollow.total.value.formatter,Z.value,O(n)({p:F.value.hollow.total.value.prefix,v:Z.value,s:F.value.hollow.total.value.suffix}))),13,en)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:2,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.offsetY,fill:F.value.hollow.average.color,"font-size":F.value.hollow.average.fontSize,style:S(`font-weight:${F.value.hollow.average.bold?`bold`:``}`)},D(F.value.hollow.average.text),13,tn)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:3,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.fontSize+F.value.hollow.average.value.offsetY,fill:F.value.hollow.average.value.color,"font-size":F.value.hollow.average.value.fontSize,style:S(`font-weight:${F.value.hollow.average.value.bold?`bold`:``}`)},D(Ur.value||R.value?`--`:O(m)(F.value.hollow.average.value.formatter,O(ie)(ui.value),O(n)({p:F.value.hollow.average.value.prefix,v:O(ie)(ui.value),s:F.value.hollow.average.value.suffix,r:F.value.hollow.average.value.rounding}))),13,nn)):y(``,!0)],512)):y(``,!0),(C(!0),b(g,null,T(q.value.filter(e=>!e.ghost),(e,n)=>(C(),b(`g`,{filter:vi(n),key:e.seriesIndex,opacity:yi(e)},[F.value.dataLabels.useLabelSlots?(C(),b(`g`,an,[(C(),b(`foreignObject`,{x:O(f)(e,!0).anchor===`end`?O(f)(e).x-120:O(f)(e,!0).anchor===`middle`?O(f)(e).x-60:O(f)(e).x,y:O(h)(e)-(Ti.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[x(`div`,null,[E(t.$slots,`dataLabel`,Ze({ref_for:!0},{datapoint:e,isBlur:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n,isSafari:Ti.value,isVisible:Y(e)&&B.value.dataLabels.show,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,percentage:si(e,q.value)}),void 0,!0)])],8,on))])):(C(),b(`g`,sn,[P.value.type===`classic`?(C(),b(g,{key:0},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(X)[n]?.markerX??O(f)(e).x,cy:O(X)[n]?.markerY??O(h)(e)-3.5,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,cn)):y(``,!0),F.value.dataLabels.oneLine||O(X)[n]?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:gi(e,n,!!O(X)[n])},null,40,ln)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[lt(x(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),fill:F.value.percentage.color,"font-size":ar.value+`px`,style:S(`font-weight:${F.value.percentage.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,un),[[st,Y(e)&&B.value.dataLabels.show]]),lt(x(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value*1.2,fill:F.value.name.color,"font-size":j.value+`px`,style:S(`font-weight:${F.value.name.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value})},null,44,dn),[[st,Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show]])],64))],64)):y(``,!0),P.value.type===`polar`?(C(),b(g,{key:1},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x,cy:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,fn)):y(``,!0),F.value.dataLabels.oneLine?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:_i(e,n)},null,44,pn)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[Y(e)&&B.value.dataLabels.show?(C(),b(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:F.value.percentage.color,"font-size":ar.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.percentage.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,mn)):y(``,!0),Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show?(C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2,fill:F.value.name.color,"font-size":j.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.name.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2})},null,44,hn)):y(``,!0)],64))],64)):y(``,!0)])),B.value.dataLabels.show&&L.value.comments.show&&e.comment?(C(),b(`g`,gn,[Y(e)&&P.value.type===`classic`?(C(),b(`foreignObject`,{key:0,x:L.value.comments.offsetX+(O(f)(e,!0).anchor===`end`?O(f)(e).x-L.value.comments.width:O(f)(e,!0).anchor===`middle`?O(f)(e).x-L.value.comments.width/2:O(f)(e).x),y:O(h)(e)+24+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,isFirstLoad:R.value}},void 0,!0)])],8,_n)):y(``,!0),Y(e)&&P.value.type===`polar`?(C(),b(`foreignObject`,{key:1,x:L.value.comments.offsetX+(ii(J.value[n].middlePoint)===`end`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width:ii(J.value[n].middlePoint)===`middle`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width/2:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x),y:ai(J.value[n])+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:ii(J.value[n].middlePoint),flexAlign:ii(J.value[n].middlePoint),isFirstLoad:R.value}},void 0,!0)])],12,vn)):y(``,!0)])):y(``,!0)],8,rn))),128)),E(t.$slots,`svg`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0)],512)],46,gt)),t.$slots.hint?(C(),b(`div`,yn,[E(t.$slots,`hint`,et(Xe({hint:P.value.a11y.translations.keyboardNavigation,isVisible:ir.value})),void 0,!0)])):y(``,!0)]),t.$slots.watermark?(C(),b(`div`,bn,[E(t.$slots,`watermark`,et(Xe({isPrinting:O(Pr)||O(Fr)||O(Hi)||O(Ui)})),void 0,!0)])):y(``,!0),x(`div`,{id:`legend-bottom-${M.value}`},null,8,xn),Qn.value&&(L.value.legend.show||t.$slots.legend)?(C(),v(Ge,{key:6,to:L.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[x(`div`,{ref_key:`chartLegend`,ref:Wn},[E(t.$slots,`legend`,{legend:ei.value},()=>[L.value.legend.show?(C(),v(We,{key:`legend_${Zn.value}`,legendSet:ei.value,config:ti.value,onClickMarker:i[3]||=({i:e})=>Jr(e),isCursorPointer:_r.value},Ke({item:k(({legend:e,index:t})=>[x(`div`,{style:S(`opacity:${W.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},D(e.display),13,Sn)]),legendToggle:k(()=>[ei.value.length>2&&L.value.legend.selectAllToggle.show&&!O(yr)?(C(),v(Le,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:_r.value,onToggle:qr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):y(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:k(({legend:e,index:t})=>[Je(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${M.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):y(``,!0)],!0)],512)],8,[`to`])):y(``,!0),t.$slots.source?(C(),b(`div`,{key:7,ref_key:`source`,ref:qn,dir:`auto`},[E(t.$slots,`source`,{},void 0,!0)],512)):y(``,!0),t.$slots.hollow?(C(),b(`div`,Cn,[E(t.$slots,`hollow`,et(Xe({total:Z.value,average:ui.value,dataset:H.value,...V.value})),void 0,!0)])):y(``,!0),Je(O(En),{teleportTo:L.value.tooltip.teleportTo,show:B.value.showTooltip&&fr.value,backgroundColor:L.value.tooltip.backgroundColor,color:L.value.tooltip.color,fontSize:L.value.tooltip.fontSize,borderRadius:L.value.tooltip.borderRadius,borderColor:L.value.tooltip.borderColor,borderWidth:L.value.tooltip.borderWidth,backgroundOpacity:L.value.tooltip.backgroundOpacity,position:L.value.tooltip.position,offsetX:L.value.tooltip.offsetX,offsetY:L.value.tooltip.offsetY,parent:zn.value,content:pr.value,isCustom:pi.value,isFullscreen:Ci.value,smooth:L.value.tooltip.smooth,backdropFilter:L.value.tooltip.backdropFilter,smoothForce:L.value.tooltip.smoothForce,smoothSnapThreshold:L.value.tooltip.smoothSnapThrehsold,isA11yMode:rr.value===`keyboard`,a11yPosition:nr.value},{"tooltip-before":k(()=>[E(t.$slots,`tooltip-before`,et(Xe({...fi.value})),void 0,!0)]),tooltip:k(()=>[E(t.$slots,`tooltip`,et(Xe({...fi.value})),void 0,!0)]),"tooltip-after":k(()=>[E(t.$slots,`tooltip-after`,et(Xe({...fi.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Rn.value&&P.value.userOptions.buttons.table?(C(),v(rt(Ii.value.component),Ze({key:9},Ii.value.props,{ref_key:`tableUnit`,ref:$n,onClose:Li}),Ke({content:k(()=>[(C(),v(O(kn),{key:`table_${Xn.value}`,colNames:Si.value.colNames,head:Si.value.head,body:Si.value.body,config:Si.value.config,title:P.value.table.useDialog?``:Ii.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:_r.value,onClose:Li},{th:k(({th:e})=>[e===`__SUM__`?(C(),b(`div`,wn,[Je(O(Dn),{name:`sigma`,stroke:Si.value.config.th.color,size:16},null,8,[`stroke`])])):(C(),b(`div`,Tn,D(e),1))]),td:k(({td:e})=>[qe(D(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:O(m)(F.value.percentage.formatter,e,O(n)({v:e,s:`%`,r:F.value.percentage.rounding})):O(m)(F.value.value.formatter,e,O(n)({p:F.value.dataLabels.prefix,v:e,s:F.value.dataLabels.suffix,r:F.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[qe(D(Ii.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[x(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[4]||=e=>xi(P.value.userOptions.callbacks.csv),style:S({cursor:_r.value?`pointer`:`default`})},[Je(O(Dn),{name:`fileCsv`,stroke:Ii.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):y(``,!0),E(t.$slots,`skeleton`,{},()=>[O(yr)?(C(),v(_e,{key:0})):y(``,!0)],!0)],46,ft))}},[[`__scopeId`,`data-v-28a94025`]]);export{dt as n,En as t};
47
+ `}),i===`end`?`${F.value.name.show?u:``}${c}`:`${c}${F.value.name.show?u:``}`}function vi(e){return P.value.useBlurOnHover&&![null,void 0].includes(N.value)&&N.value!==e?`url(#blur_${M.value})`:``}function yi(e){if(!Ur.value||Wr.value===null||e.seriesIndex!==Wr.value)return 1;let t=(e.proportion??0)*100,n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let bi=_(()=>({head:$r.value.map(e=>({name:e.name,color:e.color})),body:$r.value.map(e=>e.value)}));function xi(e=null){Qe(()=>{let t=bi.value.head.map((e,t)=>[[e.name],[bi.value.body[t]],[isNaN(bi.value.body[t]/Z.value)?`-`:bi.value.body[t]/Z.value*100]]),n=[[L.value.title.text],[L.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=i(n);e?e(r):le({csvContent:r,title:L.value.title.text||`vue-ui-donut`})})}let Si=_(()=>{let e=[`__SUM__`,n({p:F.value.dataLabels.prefix,v:Z.value,s:F.value.dataLabels.suffix,r:P.value.table.td.roundingValue}),`100%`],t=bi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},bi.value.body[t],isNaN(bi.value.body[t]/Z.value)?`-`:(bi.value.body[t]/Z.value*100).toFixed(P.value.table.td.roundingPercentage)+`%`]),r=t.map(e=>e.map((e,t)=>t===0?e.name:e)),i={th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.value,P.value.table.columnNames.percentage],head:e,body:t,a11yBody:r,config:i}}),Ci=w(!1);function wi(e){Ci.value=e,mr.value+=1}let Ti=_(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ei(e){return Ve({num:e,rounding:L.value.legend.roundingPercentage})}function Di({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return He({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Oi(e){return Di({val:m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:F.value.value.rounding}),{datapoint:e}),percentage:si(e,q.value),showVal:F.value.value.show,showPercentage:F.value.percentage.show,config:F.value.dataLabels})}function $(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),Vr(`selectDatapoint`,{datapoint:e,index:t})}function ki(){B.value.showTable=!B.value.showTable}function Ai(){B.value.dataLabels.show=!B.value.dataLabels.show}function ji(){B.value.showTooltip=!B.value.showTooltip}let Mi=w(!1);function Ni(){Mi.value=!Mi.value}let Pi=Ce(zn,()=>L.value.title.text);function Fi(){if(!Bn.value)return;let{x:e,y:t,width:n,height:r}=Bn.value.getBBox();z.value&&z.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ii=_(()=>De({config:P,style:L,mutableConfig:B,dialog:Nn,accordion:On,isFullscreen:Ci,parent:zn,maxWidth:500,isCursorPointer:_r}));ct(()=>B.value.showTable,e=>Ee(e,P,$n));function Li(){B.value.showTable=!1,er.value&&er.value.setTableIconState(!1)}let Ri=_(()=>ei.value.map(e=>({...e,name:e.display}))),zi=_(()=>L.value.backgroundColor),Bi=_(()=>L.value.legend),Vi=_(()=>L.value.title),{isCallbackImaging:Hi,isCallbackSvg:Ui,generateSvg:Wi,onGenerateImage:Gi}=Te({svg:z,title:Vi,legend:Bi,legendItems:Ri,backgroundColor:zi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Lr});async function Ki(){Vr(`copyAlt`,{config:P.value,dataset:U.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:U.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qi(){tr.value=null,ir.value=!0}function Ji(){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null,ir.value=!1}function Yi(e){if(!z.value||Mi.value||document.activeElement!==z.value||!q.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null;return}if(r){if(tr.value===null)return;let e=q.value[tr.value];if(!e)return;$(e,tr.value);return}let a=tr.value,o=N.value,s=a!==null&&a>=0&&a<q.value.length,c=o!==null&&o>=0&&o<q.value.length;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;let l=q.value[a];l&&(tr.value=a,Xi(a),Q({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Xi(e){if(!Number.isFinite(e)||!z.value)return;let t=V.value.width/2,n=V.value.height/2;if(P.value.type===`classic`){let r=q.value[e];if(!r?.arcSlice)return;let i=fe(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=J.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=z.value.getBoundingClientRect();nr.value={x:r.left+t/V.value.width*r.width,y:r.top+n/V.value.height*r.height}}let Zi=_(()=>({headers:Si.value?.colNames??[],rows:Si.value?.a11yBody??[]}));return be({autoSize:Fi,getData:Hr,getImage:Pi,generatePdf:Ir,generateCsv:xi,generateImage:Lr,generateSvg:Wi,hideSeries:Zr,showSeries:Xr,toggleTable:ki,toggleLabels:Ai,toggleTooltip:ji,toggleAnnotator:Ni,toggleFullscreen:wi,copyAlt:Ki}),(t,i)=>(C(),b(`div`,{ref_key:`donutChart`,ref:zn,class:$e(`vue-data-ui-component vue-ui-donut ${Ci.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:S(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height:100%;`:``} text-align:center;background:${L.value.backgroundColor}`),id:`donut__${M.value}`,onMouseenter:Ar,onMouseleave:jr},[x(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[x(`p`,null,D(P.value.a11y.translations.keyboardNavigation),1)],8,pt),Zi.value?.rows?.length?(C(),v(Re,{key:0,uid:M.value,head:Zi.value.headers,body:Zi.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):y(``,!0),P.value.userOptions.buttons.annotator&&O(z)?(C(),v(O(An),{key:1,color:L.value.color,backgroundColor:L.value.backgroundColor,active:Mi.value,svgRef:O(z),isCursorPointer:_r.value,palette:P.value.userOptions.annotatorPalette,onClose:Ni},Ke({_:2},[T(O(ke),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(Oe)(e,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):y(``,!0),E(t.$slots,`userConfig`,{},void 0,!0),Rr.value?(C(),b(`div`,{key:2,ref_key:`noTitle`,ref:Jn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):y(``,!0),L.value.title.text?(C(),b(`div`,{key:3,ref_key:`chartTitle`,ref:Un,style:`width:100%;background:transparent;padding-bottom:24px`},[(C(),v(we,{key:`title_${Yn.value}`,config:{title:{cy:`donut-div-title`,...L.value.title},subtitle:{cy:`donut-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):y(``,!0),x(`div`,{id:`legend-top-${M.value}`},null,8,mt),P.value.userOptions.show&&Rn.value&&(O(kr)||O(Dr))?(C(),v(O(jn),{ref_key:`userOptionsRef`,ref:er,key:`user_option_${mr.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:O(Pr),isImaging:O(Fr),uid:M.value,hasTooltip:L.value.tooltip.show&&P.value.userOptions.buttons.tooltip,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasLabel:P.value.userOptions.buttons.labels,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ci.value,chartElement:zn.value,position:P.value.userOptions.position,callbacks:P.value.userOptions.callbacks,isTooltip:B.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Mi.value,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:_r.value,onToggleFullscreen:wi,onGeneratePdf:O(Ir),onGenerateCsv:xi,onGenerateImage:O(Gi),onGenerateSvg:O(Wi),onToggleTable:ki,onToggleLabels:Ai,onToggleTooltip:ji,onToggleAnnotator:Ni,onCopyAlt:Ki,style:S({visibility:O(kr)?O(Dr)?`visible`:`hidden`:`visible`})},Ke({_:2},[T(O(Ae)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(je)(e,n))),void 0,!0)])}))]),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.onGenerateImage.onGenerateSvg.style`.split(`.`))):y(``,!0),x(`div`,ht,[(C(),b(`svg`,{ref_key:`svgRef`,ref:z,xmlns:O(de),"aria-describedby":`chart-instructions-${M.value}`,class:$e({"vue-data-ui-fullscreen--on":Ci.value,"vue-data-ui-fulscreen--off":!Ci.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`,style:S(`max-width:100%; overflow: visible; background:transparent;color:${L.value.color};${Nr.value.css}`),tabindex:`0`,onFocus:qi,onBlur:Ji,onKeydown:Yi},[x(`g`,{ref_key:`G`,ref:Bn,class:`vue-data-ui-g`},[Je(O(Mn)),E(t.$slots,`svg-underlayer`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0),t.$slots[`chart-background`]?(C(),b(`foreignObject`,{key:0,x:0,y:0,width:V.value.width<=0?10:V.value.width,height:V.value.height<=0?10:V.value.height,style:{pointerEvents:`none`}},[E(t.$slots,`chart-background`,{},void 0,!0)],8,_t)):y(``,!0),P.value.type===`classic`&&!isNaN(Br.value/G.value)?(C(),b(`defs`,vt,[L.value.useGradient?(C(),v(Ie,{key:0,t:`radial`,id:`gradient_${M.value}`,stops:[[`0%`,O(c)(L.value.backgroundColor,0),0],[`${(1-Br.value/G.value)*100}%`,O(c)(`#FFFFFF`,0),0],[`${(1-Br.value/G.value/2)*100}%`,O(c)(`#FFFFFF`,L.value.gradientIntensity),1],[`100%`,O(c)(L.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):y(``,!0)])):y(``,!0),P.value.type===`polar`?(C(),b(`defs`,yt,[(C(!0),b(g,null,T(J.value,(e,t)=>(C(),v(Ie,{t:`radial`,id:`polar_gradient_${t}_${M.value}`,key:`pg_${t}_${M.value}`,cx:(isNaN(e.middlePoint.x/V.value.width*100)?0:e.middlePoint.x/V.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/V.value.height*100)?0:e.middlePoint.y/V.value.height*100)+`%`,r:`62%`,stops:[[`0%`,O(te)(K.value[t].color,.05),L.value.gradientIntensity/100],[`100%`,K.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):y(``,!0),x(`defs`,null,[x(`filter`,{id:`blur_${M.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${M.value}`},null,8,xt),i[5]||=x(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,bt),x(`filter`,{id:`shadow_${M.value}`,"color-interpolation-filters":`sRGB`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":I.value.shadowColor},null,8,Ct)],8,St),x(`filter`,{id:`drop_shadow_${M.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":I.value.shadowColor},null,8,Tt)],8,wt)]),P.value.type===`classic`?(C(!0),b(g,{key:3},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:O(X)[t]?.connectorPath||O(p)(e,{x:V.value.width/2,y:V.value.height/2},16,16,!1,!1,Br.value,12,gr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t)},null,8,Et)):y(``,!0)]))),256)):y(``,!0),P.value.type===`polar`?(C(!0),b(g,{key:4},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:`M ${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x},${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Dt)):y(``,!0)]))),256)):y(``,!0),P.value.type===`classic`&&I.value.useShadow?(C(),b(`circle`,{key:5,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:L.value.backgroundColor,filter:`url(#shadow_${M.value})`},null,8,Ot)):y(``,!0),t.$slots.pattern?(C(),b(`g`,kt,[(C(!0),b(g,null,T(e.dataset,(e,n)=>(C(),b(`defs`,{key:`pattern-${e.patternIndex}`},[E(t.$slots,`pattern`,Ze({ref_for:!0},{seriesIndex:n,patternId:`pattern_${M.value}_${n}`}),void 0,!0)]))),128))])):y(``,!0),Z.value&&P.value.type===`classic`?(C(),b(g,{key:7},[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:L.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,At))),256)),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,jt))),256)),t.$slots.pattern?(C(),b(`g`,Mt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,Nt))),256))])):y(``,!0)],64)):y(``,!0),Z.value&&P.value.type===`polar`?(C(),b(g,{key:8},[K.value.length>1?(C(),b(`g`,Pt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,d:J.value[t].path,fill:`#FFFFFF`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256)),I.value.useShadow?(C(),b(`g`,It,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`transparent`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:`url(#drop_shadow_${M.value})`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256))])):y(``,!0),t.$slots.pattern?(C(),b(`g`,Rt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,zt))),256))])):y(``,!0),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:L.value.useGradient?`url(#polar_gradient_${t}_${M.value})`:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Bt))),256))])):(C(),b(`g`,Vt,[t.$slots.pattern?(C(),b(`circle`,{key:0,cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`url(#pattern_${M.value}_${K.value[0].patternIndex})`,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ht)):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:L.value.useGradient?`url(#polar_gradient_0_${M.value})`:K.value[0].color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ut)]))],64)):(C(),b(g,{key:9},[P.value.type===`classic`&&!ni.value?(C(),b(`g`,Wt,[(C(!0),b(g,null,T(ri.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Gt))),256))])):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`transparent`,stroke:L.value.backgroundColor},null,8,Kt)],64)),L.value.useGradient&&P.value.type===`classic`?(C(),b(`circle`,{key:10,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`url(#gradient_${M.value})`},null,8,qt)):y(``,!0),x(`circle`,{ref_key:`circle_hollow`,ref:Hn,style:{pointerEvents:`none`},fill:`none`,cx:V.value.width/2,cy:V.value.height/2,r:Math.max(.1,Br.value*1.7)},null,8,Jt),Z.value?(C(),b(g,{key:11},[K.value.length>1||P.value.type===`classic`?(C(),b(`g`,Yt,[(C(!0),b(g,null,T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`path`,{d:P.value.type===`classic`?e.arcSlice:J.value[t].path,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,fill:N.value===t?I.value.selectedColor:`transparent`,onMouseenter:n=>Q({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>$(e,t)},null,40,Xt))),256))])):(C(),b(`g`,Zt,[x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`transparent`,onMouseenter:i[0]||=e=>Q({datapoint:K.value[0],relativeIndex:0,seriesIndex:K.value[0].seriesIndex,show:!0}),onMouseleave:i[1]||=e=>mi({datapoint:K.value[0],seriesIndex:K.value[0].seriesIndex}),onClick:i[2]||=e=>$(K.value[0],t.i)},null,40,Qt)]))],64)):y(``,!0),P.value.type===`classic`?(C(),b(`g`,{key:12,ref_key:`G_hollow`,ref:Vn,class:`vue-data-ui-donut-hollow-labels`},[F.value.hollow.total.show?(C(),b(`text`,{key:0,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.offsetY,fill:F.value.hollow.total.color,"font-size":F.value.hollow.total.fontSize,style:S(`font-weight:${F.value.hollow.total.bold?`bold`:``}`)},D(F.value.hollow.total.text),13,$t)):y(``,!0),F.value.hollow.total.show?(C(),b(`text`,{key:1,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+F.value.hollow.total.fontSize-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.value.offsetY,fill:F.value.hollow.total.value.color,"font-size":F.value.hollow.total.value.fontSize,style:S(`font-weight:${F.value.hollow.total.value.bold?`bold`:``}`)},D(O(m)(F.value.hollow.total.value.formatter,Z.value,O(n)({p:F.value.hollow.total.value.prefix,v:Z.value,s:F.value.hollow.total.value.suffix}))),13,en)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:2,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.offsetY,fill:F.value.hollow.average.color,"font-size":F.value.hollow.average.fontSize,style:S(`font-weight:${F.value.hollow.average.bold?`bold`:``}`)},D(F.value.hollow.average.text),13,tn)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:3,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.fontSize+F.value.hollow.average.value.offsetY,fill:F.value.hollow.average.value.color,"font-size":F.value.hollow.average.value.fontSize,style:S(`font-weight:${F.value.hollow.average.value.bold?`bold`:``}`)},D(Ur.value||R.value?`--`:O(m)(F.value.hollow.average.value.formatter,O(ie)(ui.value),O(n)({p:F.value.hollow.average.value.prefix,v:O(ie)(ui.value),s:F.value.hollow.average.value.suffix,r:F.value.hollow.average.value.rounding}))),13,nn)):y(``,!0)],512)):y(``,!0),(C(!0),b(g,null,T(q.value.filter(e=>!e.ghost),(e,n)=>(C(),b(`g`,{filter:vi(n),key:e.seriesIndex,opacity:yi(e)},[F.value.dataLabels.useLabelSlots?(C(),b(`g`,an,[(C(),b(`foreignObject`,{x:O(f)(e,!0).anchor===`end`?O(f)(e).x-120:O(f)(e,!0).anchor===`middle`?O(f)(e).x-60:O(f)(e).x,y:O(h)(e)-(Ti.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[x(`div`,null,[E(t.$slots,`dataLabel`,Ze({ref_for:!0},{datapoint:e,isBlur:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n,isSafari:Ti.value,isVisible:Y(e)&&B.value.dataLabels.show,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,percentage:si(e,q.value)}),void 0,!0)])],8,on))])):(C(),b(`g`,sn,[P.value.type===`classic`?(C(),b(g,{key:0},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(X)[n]?.markerX??O(f)(e).x,cy:O(X)[n]?.markerY??O(h)(e)-3.5,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,cn)):y(``,!0),F.value.dataLabels.oneLine||O(X)[n]?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:gi(e,n,!!O(X)[n])},null,40,ln)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[lt(x(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),fill:F.value.percentage.color,"font-size":ar.value+`px`,style:S(`font-weight:${F.value.percentage.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,un),[[st,Y(e)&&B.value.dataLabels.show]]),lt(x(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value*1.2,fill:F.value.name.color,"font-size":j.value+`px`,style:S(`font-weight:${F.value.name.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value})},null,44,dn),[[st,Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show]])],64))],64)):y(``,!0),P.value.type===`polar`?(C(),b(g,{key:1},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x,cy:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,fn)):y(``,!0),F.value.dataLabels.oneLine?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:_i(e,n)},null,44,pn)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[Y(e)&&B.value.dataLabels.show?(C(),b(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:F.value.percentage.color,"font-size":ar.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.percentage.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,mn)):y(``,!0),Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show?(C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2,fill:F.value.name.color,"font-size":j.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.name.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2})},null,44,hn)):y(``,!0)],64))],64)):y(``,!0)])),B.value.dataLabels.show&&L.value.comments.show&&e.comment?(C(),b(`g`,gn,[Y(e)&&P.value.type===`classic`?(C(),b(`foreignObject`,{key:0,x:L.value.comments.offsetX+(O(f)(e,!0).anchor===`end`?O(f)(e).x-L.value.comments.width:O(f)(e,!0).anchor===`middle`?O(f)(e).x-L.value.comments.width/2:O(f)(e).x),y:O(h)(e)+24+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,isFirstLoad:R.value}},void 0,!0)])],8,_n)):y(``,!0),Y(e)&&P.value.type===`polar`?(C(),b(`foreignObject`,{key:1,x:L.value.comments.offsetX+(ii(J.value[n].middlePoint)===`end`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width:ii(J.value[n].middlePoint)===`middle`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width/2:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x),y:ai(J.value[n])+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:ii(J.value[n].middlePoint),flexAlign:ii(J.value[n].middlePoint),isFirstLoad:R.value}},void 0,!0)])],12,vn)):y(``,!0)])):y(``,!0)],8,rn))),128)),E(t.$slots,`svg`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0)],512)],46,gt)),t.$slots.hint?(C(),b(`div`,yn,[E(t.$slots,`hint`,et(Xe({hint:P.value.a11y.translations.keyboardNavigation,isVisible:ir.value})),void 0,!0)])):y(``,!0)]),t.$slots.watermark?(C(),b(`div`,bn,[E(t.$slots,`watermark`,et(Xe({isPrinting:O(Pr)||O(Fr)||O(Hi)||O(Ui)})),void 0,!0)])):y(``,!0),x(`div`,{id:`legend-bottom-${M.value}`},null,8,xn),Qn.value&&(L.value.legend.show||t.$slots.legend)?(C(),v(Ge,{key:6,to:L.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[x(`div`,{ref_key:`chartLegend`,ref:Wn},[E(t.$slots,`legend`,{legend:ei.value},()=>[L.value.legend.show?(C(),v(We,{key:`legend_${Zn.value}`,legendSet:ei.value,config:ti.value,onClickMarker:i[3]||=({i:e})=>Jr(e),isCursorPointer:_r.value},Ke({item:k(({legend:e,index:t})=>[x(`div`,{style:S(`opacity:${W.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},D(e.display),13,Sn)]),legendToggle:k(()=>[ei.value.length>2&&L.value.legend.selectAllToggle.show&&!O(yr)?(C(),v(Le,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:_r.value,onToggle:qr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):y(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:k(({legend:e,index:t})=>[Je(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${M.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):y(``,!0)],!0)],512)],8,[`to`])):y(``,!0),t.$slots.source?(C(),b(`div`,{key:7,ref_key:`source`,ref:qn,dir:`auto`},[E(t.$slots,`source`,{},void 0,!0)],512)):y(``,!0),t.$slots.hollow?(C(),b(`div`,Cn,[E(t.$slots,`hollow`,et(Xe({total:Z.value,average:ui.value,dataset:H.value,...V.value})),void 0,!0)])):y(``,!0),Je(O(En),{teleportTo:L.value.tooltip.teleportTo,show:B.value.showTooltip&&fr.value,backgroundColor:L.value.tooltip.backgroundColor,color:L.value.tooltip.color,fontSize:L.value.tooltip.fontSize,borderRadius:L.value.tooltip.borderRadius,borderColor:L.value.tooltip.borderColor,borderWidth:L.value.tooltip.borderWidth,backgroundOpacity:L.value.tooltip.backgroundOpacity,position:L.value.tooltip.position,offsetX:L.value.tooltip.offsetX,offsetY:L.value.tooltip.offsetY,parent:zn.value,content:pr.value,isCustom:pi.value,isFullscreen:Ci.value,smooth:L.value.tooltip.smooth,backdropFilter:L.value.tooltip.backdropFilter,smoothForce:L.value.tooltip.smoothForce,smoothSnapThreshold:L.value.tooltip.smoothSnapThrehsold,isA11yMode:rr.value===`keyboard`,a11yPosition:nr.value},{"tooltip-before":k(()=>[E(t.$slots,`tooltip-before`,et(Xe({...fi.value})),void 0,!0)]),tooltip:k(()=>[E(t.$slots,`tooltip`,et(Xe({...fi.value})),void 0,!0)]),"tooltip-after":k(()=>[E(t.$slots,`tooltip-after`,et(Xe({...fi.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Rn.value&&P.value.userOptions.buttons.table?(C(),v(rt(Ii.value.component),Ze({key:9},Ii.value.props,{ref_key:`tableUnit`,ref:$n,onClose:Li}),Ke({content:k(()=>[(C(),v(O(kn),{key:`table_${Xn.value}`,colNames:Si.value.colNames,head:Si.value.head,body:Si.value.body,config:Si.value.config,title:P.value.table.useDialog?``:Ii.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:_r.value,onClose:Li},{th:k(({th:e})=>[e===`__SUM__`?(C(),b(`div`,wn,[Je(O(Dn),{name:`sigma`,stroke:Si.value.config.th.color,size:16},null,8,[`stroke`])])):(C(),b(`div`,Tn,D(e),1))]),td:k(({td:e})=>[qe(D(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:O(m)(F.value.percentage.formatter,e,O(n)({v:e,s:`%`,r:F.value.percentage.rounding})):O(m)(F.value.value.formatter,e,O(n)({p:F.value.dataLabels.prefix,v:e,s:F.value.dataLabels.suffix,r:F.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[qe(D(Ii.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[x(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[4]||=e=>xi(P.value.userOptions.callbacks.csv),style:S({cursor:_r.value?`pointer`:`default`})},[Je(O(Dn),{name:`fileCsv`,stroke:Ii.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):y(``,!0),E(t.$slots,`skeleton`,{},()=>[O(yr)?(C(),v(_e,{key:0})):y(``,!0)],!0)],46,ft))}},[[`__scopeId`,`data-v-774756cd`]]);export{dt as n,En as t};