vue-data-ui 2.10.5 → 2.10.6

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 (167) hide show
  1. package/dist/{Arrow-Badwqciu.cjs → Arrow-Cl3tB80E.cjs} +1 -1
  2. package/dist/{Arrow-Bb5xelJS.js → Arrow-rRiIHng2.js} +1 -1
  3. package/dist/{BaseIcon-HDOMbyJq.js → BaseIcon-COlnFbOq.js} +1 -1
  4. package/dist/{BaseIcon-CvuQ41yl.cjs → BaseIcon-CiINppo2.cjs} +1 -1
  5. package/dist/{ColorPicker-NOWXYDyd.cjs → ColorPicker-9QCAgrqp.cjs} +1 -1
  6. package/dist/{ColorPicker-BODnRb0v.js → ColorPicker-UNzkvlGG.js} +3 -3
  7. package/dist/{DataTable-CGMCHKzY.js → DataTable-CXbN2mJi.js} +2 -2
  8. package/dist/{DataTable-Bu_0tRZE.cjs → DataTable-DOiZOQ3J.cjs} +1 -1
  9. package/dist/{Legend-CLZW3_-V.js → Legend-BU9C5fBQ.js} +2 -2
  10. package/dist/{Legend-BDIC5aus.cjs → Legend-CFqKBI0j.cjs} +1 -1
  11. package/dist/{PackageVersion-DrU5ubC-.js → PackageVersion-0Lu6RIig.js} +1 -1
  12. package/dist/{PackageVersion-CKutD59c.cjs → PackageVersion-BMNt7NsQ.cjs} +1 -1
  13. package/dist/{PenAndPaper-Bnvy0XRn.cjs → PenAndPaper-BUwLP3Wx.cjs} +1 -1
  14. package/dist/{PenAndPaper-BF6RVx_0.js → PenAndPaper-D4Uu-GqW.js} +3 -3
  15. package/dist/{Shape-NYJ-EMUq.cjs → Shape-2NRWULE_.cjs} +1 -1
  16. package/dist/{Shape-D5Dtzm3x.js → Shape-BavMx2aa.js} +1 -1
  17. package/dist/{Slicer-BrajQoJL.js → Slicer-B_qJHvNR.js} +2 -2
  18. package/dist/{Slicer-Cdgf9oDx.cjs → Slicer-Ct8BAk8F.cjs} +1 -1
  19. package/dist/{Title-Cj4tUZSu.cjs → Title-BkfQdTEX.cjs} +1 -1
  20. package/dist/{Title-BNsKKvQy.js → Title-DrVDm1wy.js} +1 -1
  21. package/dist/{Tooltip-Dm2APAls.js → Tooltip-BFT6mZ5a.js} +1 -1
  22. package/dist/{Tooltip-CLjMKc28.cjs → Tooltip-BK88meti.cjs} +1 -1
  23. package/dist/{dom-to-png-Z6Fps788.js → dom-to-png-0WSGIcUV.js} +1 -1
  24. package/dist/{dom-to-png-BlAkXMo8.cjs → dom-to-png-CyVwBzNm.cjs} +1 -1
  25. package/dist/{img-DhPFunow.js → img-BT-UmGcu.js} +1 -1
  26. package/dist/{img-0HoPau8z.cjs → img-DqK-SXIP.cjs} +1 -1
  27. package/dist/index-Cai0fWP7.cjs +9 -0
  28. package/dist/{index-D2h9qRb4.js → index-hMo72hAq.js} +18 -9
  29. package/dist/{pdf-Dm8bjLUW.cjs → pdf-DY3kwqSx.cjs} +1 -1
  30. package/dist/{pdf-BpYF_lP6.js → pdf-G7o-GM_m.js} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +9 -0
  33. package/dist/types/vue-data-ui.d.ts +9 -0
  34. package/dist/{useNestedProp-CAbtwUJj.cjs → useNestedProp-DcWhlk8h.cjs} +1 -1
  35. package/dist/{useNestedProp-DlWfv-mw.js → useNestedProp-DhEaBTgF.js} +1 -1
  36. package/dist/{usePrinter-B9NkBzf5.cjs → usePrinter-B4ojFS2B.cjs} +1 -1
  37. package/dist/{usePrinter-BGkHpXM9.js → usePrinter-D2z-bUtX.js} +3 -3
  38. package/dist/{vue-data-ui-DPoOpdO-.cjs → vue-data-ui-BR4hs3ky.cjs} +1 -1
  39. package/dist/{vue-data-ui-kWX-2oPX.js → vue-data-ui-BTkU5knB.js} +62 -62
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +7 -7
  42. package/dist/{vue-ui-3d-bar-CwsCsbwY.cjs → vue-ui-3d-bar-Cx2zND3j.cjs} +1 -1
  43. package/dist/{vue-ui-3d-bar-CAJh6lT_.js → vue-ui-3d-bar-DD3_LLbq.js} +9 -9
  44. package/dist/{vue-ui-accordion-C-v1kmEc.js → vue-ui-accordion-CHMdpjnX.js} +3 -3
  45. package/dist/{vue-ui-accordion-ChE9WO8Q.cjs → vue-ui-accordion-DUGBjyB1.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-DdwMF6_I.js → vue-ui-age-pyramid-CUS2cIAl.js} +10 -10
  47. package/dist/{vue-ui-age-pyramid-CAtI3F1S.cjs → vue-ui-age-pyramid-WpMKbqUM.cjs} +1 -1
  48. package/dist/{vue-ui-annotator-DQ0W7Q5C.cjs → vue-ui-annotator-B5VYzARK.cjs} +1 -1
  49. package/dist/{vue-ui-annotator-bkpTEqep.js → vue-ui-annotator-Ckyjvy1h.js} +2 -2
  50. package/dist/{vue-ui-bullet-CQtNg-wR.cjs → vue-ui-bullet-Clccjys0.cjs} +1 -1
  51. package/dist/{vue-ui-bullet-BEAyOY56.js → vue-ui-bullet-i97qMAx7.js} +8 -8
  52. package/dist/{vue-ui-candlestick-DJtpSDju.cjs → vue-ui-candlestick-B35fn-Jo.cjs} +1 -1
  53. package/dist/{vue-ui-candlestick-DKYirN9r.js → vue-ui-candlestick-Dmu21ktX.js} +11 -11
  54. package/dist/{vue-ui-carousel-table-VFiMfJos.cjs → vue-ui-carousel-table-23ggTo5D.cjs} +1 -1
  55. package/dist/{vue-ui-carousel-table-q1hGM_Iw.js → vue-ui-carousel-table-cvW3wpY7.js} +4 -4
  56. package/dist/{vue-ui-chestnut-B1VUR7mU.js → vue-ui-chestnut-CZpShJyS.js} +8 -8
  57. package/dist/{vue-ui-chestnut-DRGps83_.cjs → vue-ui-chestnut-CkuDV8dp.cjs} +1 -1
  58. package/dist/{vue-ui-circle-pack-Bw_j7w4u.js → vue-ui-circle-pack-B6d9PjE2.js} +9 -9
  59. package/dist/{vue-ui-circle-pack-CkpLDinw.cjs → vue-ui-circle-pack-C2IQV5_6.cjs} +1 -1
  60. package/dist/{vue-ui-cursor-ZkCZRUcy.js → vue-ui-cursor-CG4bTWjj.js} +2 -2
  61. package/dist/{vue-ui-cursor-D_ZN42gT.cjs → vue-ui-cursor-CZBmEqOC.cjs} +1 -1
  62. package/dist/{vue-ui-dashboard-Bcj-LfoN.cjs → vue-ui-dashboard-D-95GOHa.cjs} +1 -1
  63. package/dist/{vue-ui-dashboard-DnEpTStU.js → vue-ui-dashboard-DqM_deY-.js} +62 -62
  64. package/dist/{vue-ui-digits-Bsseebr6.js → vue-ui-digits-CKpey7p1.js} +2 -2
  65. package/dist/{vue-ui-digits-p0PWcPJX.cjs → vue-ui-digits-Cdauuy8X.cjs} +1 -1
  66. package/dist/{vue-ui-donut-CwvMWv_q.js → vue-ui-donut-Dp2Yy4fh.js} +36 -36
  67. package/dist/{vue-ui-donut-evolution-C9eui30b.cjs → vue-ui-donut-evolution-Cg1VnagT.cjs} +1 -1
  68. package/dist/{vue-ui-donut-evolution-BzNh2QwP.js → vue-ui-donut-evolution-ClL_5jhm.js} +11 -11
  69. package/dist/{vue-ui-donut-C3mhQ-03.cjs → vue-ui-donut-j519aqqU.cjs} +1 -1
  70. package/dist/{vue-ui-dumbbell-BvNEHy9Z.js → vue-ui-dumbbell-C8tOQUbs.js} +10 -10
  71. package/dist/{vue-ui-dumbbell-BheHAxmy.cjs → vue-ui-dumbbell-CNJ9en-A.cjs} +1 -1
  72. package/dist/{vue-ui-flow-vz29fymj.cjs → vue-ui-flow-BYypzs-j.cjs} +1 -1
  73. package/dist/{vue-ui-flow-DBuLJlEV.js → vue-ui-flow-Ouw_lvpb.js} +9 -9
  74. package/dist/{vue-ui-funnel-DhoOe49e.js → vue-ui-funnel-CfxmaNEA.js} +9 -9
  75. package/dist/{vue-ui-funnel-D8brKLer.cjs → vue-ui-funnel-DbVCaDxm.cjs} +1 -1
  76. package/dist/{vue-ui-galaxy-DUQ5z3km.js → vue-ui-galaxy-dm_p5xAR.js} +11 -11
  77. package/dist/{vue-ui-galaxy-YP3Gl3vG.cjs → vue-ui-galaxy-zBDItFVz.cjs} +1 -1
  78. package/dist/{vue-ui-gauge-WH6OGXAD.cjs → vue-ui-gauge-Dr-7ojj9.cjs} +1 -1
  79. package/dist/{vue-ui-gauge-C_8QgadB.js → vue-ui-gauge-DwwvbGca.js} +7 -7
  80. package/dist/{vue-ui-gizmo-D2AJKoeB.cjs → vue-ui-gizmo-CB5NfNit.cjs} +1 -1
  81. package/dist/{vue-ui-gizmo-DFy9X5IT.js → vue-ui-gizmo-Cq0SpTfm.js} +3 -3
  82. package/dist/{vue-ui-heatmap-DH93m9RC.js → vue-ui-heatmap-DNSOppoO.js} +10 -10
  83. package/dist/{vue-ui-heatmap-Dx8XPeob.cjs → vue-ui-heatmap-DtRSx7DO.cjs} +1 -1
  84. package/dist/{vue-ui-history-plot-Cmc7KMnB.cjs → vue-ui-history-plot-BvC3L9g3.cjs} +1 -1
  85. package/dist/{vue-ui-history-plot-C-9fJrMv.js → vue-ui-history-plot-r9eLYJCe.js} +11 -11
  86. package/dist/{vue-ui-kpi-C6cv6sCW.js → vue-ui-kpi-BBpxo07S.js} +3 -3
  87. package/dist/{vue-ui-kpi-DqpTRLkQ.cjs → vue-ui-kpi-raHWFHjI.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-BH-Hztc3.js → vue-ui-mini-loader-CGtQXPzk.js} +2 -2
  89. package/dist/{vue-ui-mini-loader-CpxzfBja.cjs → vue-ui-mini-loader-STx0NSvX.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-avfEzaAy.cjs → vue-ui-molecule-B4WJo2V5.cjs} +1 -1
  91. package/dist/{vue-ui-molecule-1475qvln.js → vue-ui-molecule-EYSvyl-h.js} +11 -11
  92. package/dist/{vue-ui-mood-radar-CnAmD4WX.cjs → vue-ui-mood-radar-CfHUyyMY.cjs} +1 -1
  93. package/dist/{vue-ui-mood-radar-SJjT1sCF.js → vue-ui-mood-radar-Crk-XB3O.js} +11 -11
  94. package/dist/vue-ui-nested-donuts-DRJZT5Bv.cjs +17 -0
  95. package/dist/vue-ui-nested-donuts-Rm4P3uEP.js +1137 -0
  96. package/dist/{vue-ui-onion-CA2N8k0p.cjs → vue-ui-onion-Bgvs96ms.cjs} +1 -1
  97. package/dist/{vue-ui-onion-DzreNeV2.js → vue-ui-onion-Dzl_kjlE.js} +11 -11
  98. package/dist/{vue-ui-parallel-coordinate-plot-CyoOsjFp.js → vue-ui-parallel-coordinate-plot-98c0XRsu.js} +12 -12
  99. package/dist/{vue-ui-parallel-coordinate-plot-V6vt-U3H.cjs → vue-ui-parallel-coordinate-plot-YuLiWTox.cjs} +1 -1
  100. package/dist/{vue-ui-quadrant-C7Fb-DVA.cjs → vue-ui-quadrant-CiqJKJu1.cjs} +1 -1
  101. package/dist/{vue-ui-quadrant-DkMAnQHE.js → vue-ui-quadrant-Dd1ryxBx.js} +40 -40
  102. package/dist/{vue-ui-quick-chart-BNf57IFn.js → vue-ui-quick-chart-CTsvK-CY.js} +9 -9
  103. package/dist/{vue-ui-quick-chart-CQp5GSbr.cjs → vue-ui-quick-chart-DMceIo39.cjs} +1 -1
  104. package/dist/{vue-ui-radar-DHxUS4r0.js → vue-ui-radar-CHYpedpk.js} +12 -12
  105. package/dist/{vue-ui-radar-DVv2P3B3.cjs → vue-ui-radar-Dp8-SmYd.cjs} +1 -1
  106. package/dist/{vue-ui-rating-2dp8n1gK.js → vue-ui-rating-DSsm92zG.js} +10 -10
  107. package/dist/{vue-ui-rating-CA5buZm1.cjs → vue-ui-rating-uVphq_sK.cjs} +1 -1
  108. package/dist/{vue-ui-relation-circle-BGY0EsvO.cjs → vue-ui-relation-circle-46wKUZTv.cjs} +1 -1
  109. package/dist/{vue-ui-relation-circle-hU35G-pb.js → vue-ui-relation-circle-BPVBRieo.js} +7 -7
  110. package/dist/{vue-ui-ridgeline-CTE25ofY.js → vue-ui-ridgeline-B6GA2tXb.js} +49 -49
  111. package/dist/{vue-ui-ridgeline-dhS0sX29.cjs → vue-ui-ridgeline-OULIMr6I.cjs} +1 -1
  112. package/dist/{vue-ui-rings-BgJT1xPm.js → vue-ui-rings-Cl-607b8.js} +12 -12
  113. package/dist/{vue-ui-rings-2XntvE5b.cjs → vue-ui-rings-HVHIYYrh.cjs} +1 -1
  114. package/dist/{vue-ui-scatter-Brh98c-o.cjs → vue-ui-scatter-BZ4DPyoL.cjs} +1 -1
  115. package/dist/{vue-ui-scatter-YKeV-y-p.js → vue-ui-scatter-ClYbim5F.js} +44 -44
  116. package/dist/{vue-ui-skeleton-CNP_4H8z.js → vue-ui-skeleton-C3t9bL6f.js} +19 -19
  117. package/dist/{vue-ui-skeleton-CK5DdXVo.cjs → vue-ui-skeleton-C954hFY-.cjs} +1 -1
  118. package/dist/{vue-ui-smiley-3uIAUF4w.cjs → vue-ui-smiley-BBGCa2S0.cjs} +1 -1
  119. package/dist/{vue-ui-smiley-BUlzuzq6.js → vue-ui-smiley-DsKnKBFv.js} +2 -2
  120. package/dist/{vue-ui-spark-trend-CfhhjekZ.cjs → vue-ui-spark-trend-CBa0FhIy.cjs} +1 -1
  121. package/dist/{vue-ui-spark-trend-DmwQZLUP.js → vue-ui-spark-trend-Da-HE7x2.js} +5 -5
  122. package/dist/{vue-ui-sparkbar-BxKGdAq3.cjs → vue-ui-sparkbar-CUul3e3U.cjs} +1 -1
  123. package/dist/{vue-ui-sparkbar-TLxa0K9v.js → vue-ui-sparkbar-DgQxbUeJ.js} +4 -4
  124. package/dist/{vue-ui-sparkgauge-CIwnnQYW.js → vue-ui-sparkgauge-BKA5GnGO.js} +4 -4
  125. package/dist/{vue-ui-sparkgauge-CWXLMSHa.cjs → vue-ui-sparkgauge-DYPVqz6I.cjs} +1 -1
  126. package/dist/{vue-ui-sparkhistogram-Df0Edni4.cjs → vue-ui-sparkhistogram-CNN9tXh1.cjs} +1 -1
  127. package/dist/{vue-ui-sparkhistogram-w1rEgV9S.js → vue-ui-sparkhistogram-CdZy4SfH.js} +5 -5
  128. package/dist/{vue-ui-sparkline-BQCbVZw5.cjs → vue-ui-sparkline-BCP4gyTp.cjs} +1 -1
  129. package/dist/{vue-ui-sparkline-C2Sf6sF4.js → vue-ui-sparkline-DCNNoruu.js} +15 -15
  130. package/dist/{vue-ui-sparkstackbar-BaVuTNxy.js → vue-ui-sparkstackbar-BAXGFcPk.js} +5 -5
  131. package/dist/{vue-ui-sparkstackbar-BlyzQCK8.cjs → vue-ui-sparkstackbar-sgehFSit.cjs} +1 -1
  132. package/dist/{vue-ui-stackbar-ypv8uR9d.cjs → vue-ui-stackbar-87l909wS.cjs} +1 -1
  133. package/dist/{vue-ui-stackbar-D4H8uFQ5.js → vue-ui-stackbar-Cto9A9WG.js} +13 -13
  134. package/dist/{vue-ui-strip-plot-Dxh7xzZf.js → vue-ui-strip-plot-C0F8_S_g.js} +11 -11
  135. package/dist/{vue-ui-strip-plot-CmrAJ6uF.cjs → vue-ui-strip-plot-Deegqmms.cjs} +1 -1
  136. package/dist/{vue-ui-table-BD8QgS2P.js → vue-ui-table-1vUkkwSp.js} +3 -3
  137. package/dist/{vue-ui-table-BmyVGToW.cjs → vue-ui-table-BUxFdYM7.cjs} +1 -1
  138. package/dist/{vue-ui-table-heatmap-DZIrV6Bq.js → vue-ui-table-heatmap-PPGfjMxh.js} +4 -4
  139. package/dist/{vue-ui-table-heatmap-CXTW4REL.cjs → vue-ui-table-heatmap-uDH3owRO.cjs} +1 -1
  140. package/dist/{vue-ui-table-sparkline--R1CzNtx.cjs → vue-ui-table-sparkline-CPSlJVB1.cjs} +1 -1
  141. package/dist/{vue-ui-table-sparkline-B0aYy2JL.js → vue-ui-table-sparkline-D9LEgrxj.js} +5 -5
  142. package/dist/{vue-ui-thermometer-Dh0nVf-h.js → vue-ui-thermometer-BxngpuEZ.js} +7 -7
  143. package/dist/{vue-ui-thermometer-DtOy35Jd.cjs → vue-ui-thermometer-D8P88pea.cjs} +1 -1
  144. package/dist/{vue-ui-timer-Bo3p5wjo.cjs → vue-ui-timer-B_dh6otW.cjs} +1 -1
  145. package/dist/{vue-ui-timer-C4JkVftX.js → vue-ui-timer-C3dxY--Q.js} +5 -5
  146. package/dist/{vue-ui-tiremarks-GLU60Yzo.js → vue-ui-tiremarks-_oZ6wL6K.js} +7 -7
  147. package/dist/{vue-ui-tiremarks-B-3AEiND.cjs → vue-ui-tiremarks-mISKtpmD.cjs} +1 -1
  148. package/dist/{vue-ui-treemap-ZiuUtYjs.cjs → vue-ui-treemap-CZZXcX0f.cjs} +1 -1
  149. package/dist/{vue-ui-treemap-QyQqnbJc.js → vue-ui-treemap-D5Dcd84h.js} +12 -12
  150. package/dist/{vue-ui-vertical-bar-DHZvOGpR.cjs → vue-ui-vertical-bar-C-KAVKXj.cjs} +1 -1
  151. package/dist/{vue-ui-vertical-bar-CbwZCrcW.js → vue-ui-vertical-bar-CtWXk6co.js} +12 -12
  152. package/dist/{vue-ui-waffle-D_zRZStV.js → vue-ui-waffle-BD2GnRkO.js} +12 -12
  153. package/dist/{vue-ui-waffle-Yi5W6qYr.cjs → vue-ui-waffle-C9qyTIzz.cjs} +1 -1
  154. package/dist/{vue-ui-wheel-D85CwfOC.cjs → vue-ui-wheel-CKfr_7kH.cjs} +1 -1
  155. package/dist/{vue-ui-wheel-D_wbd08e.js → vue-ui-wheel-HydW49fo.js} +7 -7
  156. package/dist/{vue-ui-word-cloud-CkActnvX.cjs → vue-ui-word-cloud-C4ISeFpy.cjs} +1 -1
  157. package/dist/{vue-ui-word-cloud-jMOFgeRb.js → vue-ui-word-cloud-C9Pbi6ey.js} +10 -10
  158. package/dist/{vue-ui-world-aTdY2yXo.cjs → vue-ui-world-BlAD3UPb.cjs} +1 -1
  159. package/dist/{vue-ui-world-XMoqQwg7.js → vue-ui-world-D-AsGwlW.js} +11 -11
  160. package/dist/{vue-ui-xy-DL6V_DZs.js → vue-ui-xy-CMw6P4C0.js} +16 -16
  161. package/dist/{vue-ui-xy-DYEFXjnb.cjs → vue-ui-xy-CS-xjZVI.cjs} +2 -2
  162. package/dist/{vue-ui-xy-canvas-K0Qm3FPR.cjs → vue-ui-xy-canvas-Dd7IFwSK.cjs} +1 -1
  163. package/dist/{vue-ui-xy-canvas-DpX9D7Ny.js → vue-ui-xy-canvas-DtKI-IQA.js} +12 -12
  164. package/package.json +1 -1
  165. package/dist/index-D6F-xMcR.cjs +0 -9
  166. package/dist/vue-ui-nested-donuts-6MGMcByL.js +0 -937
  167. package/dist/vue-ui-nested-donuts-BkQJr_zV.cjs +0 -17
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D6F-xMcR.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),We=require("./Title-Cj4tUZSu.cjs"),Pe=require("./usePrinter-B9NkBzf5.cjs"),je=require("./DataTable-Bu_0tRZE.cjs"),He=require("./Tooltip-CLjMKc28.cjs"),Je=require("./Legend-BDIC5aus.cjs"),Ke=require("./vue-ui-skeleton-CK5DdXVo.cjs"),Qe=require("./vue-ui-accordion-ChE9WO8Q.cjs"),Fe=require("./useNestedProp-CAbtwUJj.cjs"),Ze=require("./PackageVersion-CKutD59c.cjs"),et=require("./PenAndPaper-Bnvy0XRn.cjs"),tt=require("./useUserOptionState-BgepsfED.cjs"),lt=require("./Shape-NYJ-EMUq.cjs"),ot=require("./useChartAccessibility-Cm7nkzTG.cjs"),at=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),nt=["id"],rt=["xmlns","viewBox"],ut=["width","height"],st={key:1},it=["id"],ct=["stop-color"],dt=["offset","stop-color"],vt=["offset","stop-color"],ht=["stop-color"],ft={key:2},mt=["id","cx","cy"],yt=["stop-color","stop-opacity"],pt=["stop-color"],gt=["id"],kt=["id"],bt=["id"],wt=["flood-color"],Ct=["id"],Bt=["flood-color"],_t=["d","stroke","filter"],xt=["d","stroke","filter"],$t=["cx","cy","r","fill","filter"],St={key:6},Nt=["stroke","d"],Et={key:0},Pt=["d","fill","stroke","stroke-width","filter"],Ft=["d","fill","stroke","stroke-width","filter"],Vt={key:0},Lt=["stroke","d"],Tt={key:0},Ot=["d","stroke","stroke-width","filter"],zt={key:1},At=["d","fill","stroke","stroke-width","filter"],Mt=["d","fill","stroke","stroke-width","filter"],Xt={key:1},Dt=["cx","cy","r","fill","stroke","stroke-width"],Yt=["cx","cy","r","fill","stroke","stroke-width"],It=["cx","cy","r","stroke"],qt=["cx","cy","r","fill"],Rt={key:0},Gt=["d","fill","onMouseenter","onClick"],Ut={key:1},Wt=["cx","cy","r","fill"],jt=["x","y","fill","font-size"],Ht=["x","y","fill","font-size"],Jt=["x","y","fill","font-size"],Kt=["x","y","fill","font-size"],Qt=["filter"],Zt={key:0},el=["x","y"],tl={key:1},ll=["cx","cy","fill","stroke","filter","onClick"],ol=["cx","cy","fill","stroke","filter","onClick"],al=["text-anchor","x","y","fill","font-size","onClick"],nl=["text-anchor","x","y","fill","font-size","onClick"],rl=["text-anchor","x","y","fill","font-size","onClick"],ul=["text-anchor","x","y","fill","font-size","onClick"],sl={key:2},il=["x","y","width"],cl=["x","y","width"],dl={key:5,class:"vue-data-ui-watermark"},vl=["onClick"],hl={key:0,style:{"font-variant-numeric":"tabular-nums"}},fl={key:1},ml=["innerHTML"],yl={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Q,{expose:Ve,emit:Le}){const{vue_ui_donut:Te}=n.useConfig(),Oe=e.useSlots(),b=Q,A=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),M=e.ref(null),Z=e.ref(null),ee=e.ref(null),Y=e.ref(null),te=e.ref(null),le=e.ref(null),oe=e.ref(0),ae=e.ref(0),ne=e.ref(0);e.onMounted(()=>{re()}),e.onBeforeUnmount(()=>{Y.value&&Y.value.disconnect()});function re(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{A.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive){const o=Ee.throttle(()=>{const{width:r,height:l}=Ee.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Z.value:null,legend:t.value.style.chart.legend.show?ee.value:null,source:te.value,noTitle:le.value,padding:de.value});requestAnimationFrame(()=>{u.value.width=r,u.value.height=l})});Y.value=new ResizeObserver(o),Y.value.observe(M.value.parentNode)}}const d=e.ref(n.createUid()),ze=e.ref(null),I=e.ref(!1),U=e.ref(""),p=e.ref(null),ue=e.ref(0);function se(){const o=Fe.useNestedProp({userConfig:b.config,defaultConfig:Te});return o.theme?{...Fe.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>se(),set:o=>o}),y=e.ref(!0),$=e.ref([]);function Ae(o,r=1e3,l=50){return new Promise(a=>{const s=o.length;$.value=Array(s).fill(0);let v=0;o.forEach((h,m)=>{setTimeout(()=>{const N=performance.now();function _(D){const G=Math.min((D-N)/r,1),Ue=n.easeOutCubic(G);$.value[m]=h*Ue,$.value=[...$.value],G<1?requestAnimationFrame(_):($.value[m]=h,$.value=[...$.value],v+=1,v===s&&a())}requestAnimationFrame(_)},m*l)})})}e.onMounted(async()=>{const o=b.dataset.map(r=>r.values.reduce((l,a)=>l+a,0));t.value.startAnimation.show&&await Ae(o,t.value.startAnimation.durationMs,t.value.startAnimation.staggerMs),y.value=!1});const{userOptionsVisible:W,setUserOptionsVisibility:ie,keepUserOptionState:ce}=tt.useUserOptionState({config:t.value}),{svgRef:j}=ot.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>b.config,o=>{t.value=se(),W.value=!t.value.userOptions.showOnChartHover,re(),oe.value+=1,ae.value+=1,ne.value+=1,c.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const de=e.computed(()=>{const{top:o,right:r,bottom:l,left:a}=t.value.style.chart.padding;return{css:`padding:${o}px ${r}px ${l}px ${a}px`,top:o,right:r,bottom:l,left:a}}),{isPrinting:ve,isImaging:he,generatePdf:fe,generateImage:me}=Pe.usePrinter({elementId:`donut__${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut",options:t.value.userOptions.print}),Me=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ye=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),u=e.ref({height:360,width:512}),T=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,r=Math.min(u.value.width,u.value.height)*o,l=r>f.value?f.value:r;return Math.max(l,3)}),pe=Le,S=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||"",patternIndex:r,seriesIndex:r,ghost:!1,pattern:`pattern_${d.value}_${r}`}))),w=e.ref(S.value);e.watch(()=>S.value,o=>w.value=o);function Xe(){return S.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const x=e.ref([]);e.ref(null),e.ref(null);const V=e.ref(!1);function ge({from:o,to:r,duration:l,onUpdate:a,onDone:s,easing:v=n.easeOutCubic}){const h=performance.now();function m(N){const _=Math.min((N-h)/l,1),D=v(_),G=o+(r-o)*D;a(G,_),_<1?requestAnimationFrame(m):(a(r,1),s&&s())}requestAnimationFrame(m)}function ke(o){const r=S.value.find((s,v)=>v===o);let a=w.value.find((s,v)=>v===o).value;if(x.value.includes(o)){let v=function(){w.value=w.value.map((m,N)=>o===N?{...m,value:s}:m)},h=function(){V.value=!0,ge({from:a,to:s,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(m,N)=>{w.value=w.value.map((_,D)=>o===D?{..._,value:m}:_)},onDone:()=>{v(),V.value=!1}})};x.value=x.value.filter(m=>m!==o);const s=r.value;t.value.serieToggleAnimation.show&&t.value.type==="classic"?h():v()}else if(x.value.length<S.value.length-1){let s=function(){x.value.push(o),w.value=w.value.map((h,m)=>o===m?{...h,value:0}:h)},v=function(){V.value=!0,ge({from:a,to:0,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(h,m)=>{w.value=w.value.map((N,_)=>o===_?{...N,value:h}:N)},onDone:()=>{s(),V.value=!1}})};t.value.serieToggleAnimation.show&&t.value.type==="classic"?v():s()}pe("selectLegend",E.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const De=e.computed(()=>b.dataset.reduce((o,r)=>o+r.values.reduce((l,a)=>l+a,0),0)),E=e.computed(()=>{if(y.value){const o=$.value.map((l,a)=>({...S.value[a],value:l,color:S.value[a].color,ghost:!1})),r=De.value-$.value.reduce((l,a)=>l+a,0);return r>0&&o.push({name:"__ghost__",value:r,color:"transparent",ghost:!0}),o}else return w.value.forEach((o,r)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),w.value.map((o,r)=>({...o,seriesIndex:r})).filter((o,r)=>!x.value.includes(r))}),be=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle",patternIndex:r})).map((o,r)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:x.value.includes(r)?.5:1,segregate:()=>!V.value&&ke(r),isSegregated:x.value.includes(r)}))),Ye=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const o=Math.min(u.value.width/3,u.value.height/3);return o<55?55:o}),g=e.computed(()=>n.makeDonut({series:E.value},u.value.width/2,u.value.height/2,f.value,f.value,1.99999,2,1,360,105.25,T.value)),C=e.computed(()=>g.value.filter(o=>!o.ghost)),i=e.computed(()=>{const o=Math.max(...E.value.map(l=>l.value)),r=E.value.map(l=>l.value/o);return n.createPolarAreas({series:r,center:{x:u.value.width/2,y:u.value.height/2},maxRadius:Math.min(u.value.width,u.value.height)/3,hasGhost:y.value})});function O(o){return o.x>u.value.width/2+6?"start":o.x<u.value.width/2-6?"end":"middle"}function Ie(o){return o.middlePoint.y>u.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:u.value.width/2,centerY:u.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:u.value.width/2,centerY:u.value.height/2}).y-100}function B(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function H(o,r){const l=o.value/qe(r);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function qe(o){return[...o].map(r=>r.value).reduce((r,l)=>r+l,0)}const k=e.computed(()=>E.value.map(o=>o.value).reduce((o,r)=>o+r,0)),we=e.computed(()=>k.value/E.value.length),Ce=e.computed(()=>o=>V.value?o.proportion*100:o.value/k.value*100),J=e.ref(null),X=e.ref(!1);function Be({datapoint:o,relativeIndex:r,seriesIndex:l,show:a=!1}){J.value={datapoint:o,seriesIndex:l,config:t.value,series:S.value},I.value=a,p.value=r;let s="";const v=t.value.style.chart.tooltip.customFormat;if(X.value=!1,n.isFunction(v))try{const h=v({seriesIndex:l,datapoint:o,series:S.value,config:t.value});typeof h=="string"&&(U.value=h,X.value=!0)}catch{console.warn("Custom format cannot be applied."),X.value=!1}if(!X.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,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="${o.color}"/>${Oe.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${d.value}_${l})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,relativeIndex:r,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const h=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:r,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${h})</span></div>`:s+=`<b>${h}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),U.value=`<div>${s}</div>`}}function L(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${d.value})`:""}const P=e.computed(()=>{const o=E.value.map(l=>({name:l.name,color:l.color})),r=E.value.map(l=>l.value);return{head:o,body:r}});function _e(){e.nextTick(()=>{const o=P.value.head.map((a,s)=>[[a.name],[P.value.body[s]],[isNaN(P.value.body[s]/k.value)?"-":P.value.body[s]/k.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(r);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const q=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=P.value.head.map((s,v)=>[{color:s.color,name:s.name},P.value.body[v],isNaN(P.value.body[v]/k.value)?"-":(P.value.body[v]/k.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:o,body:r,config:l}}),z=e.ref(!1);function Re(o){z.value=o,ue.value+=1}const xe=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ge(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function F(o,r){pe("selectDatapoint",{datapoint:o,index:r})}function $e(){c.value.showTable=!c.value.showTable}function Se(){c.value.dataLabels.show=!c.value.dataLabels.show}function Ne(){c.value.showTooltip=!c.value.showTooltip}const R=e.ref(!1);function K(){R.value=!R.value}return Ve({getData:Xe,generatePdf:fe,generateCsv:_e,generateImage:me,toggleTable:$e,toggleLabels:Se,toggleTooltip:Ne,toggleAnnotator:K}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:M,class:e.normalizeClass(`vue-ui-donut ${z.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`donut__${d.value}`,onMouseenter:r[6]||(r[6]=()=>e.unref(ie)(!0)),onMouseleave:r[7]||(r[7]=()=>e.unref(ie)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(j)?(e.openBlock(),e.createBlock(et._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:R.value,svgRef:e.unref(j),onClose:K},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Me.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:le,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(We._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value&&(e.unref(ce)||e.unref(W))?(e.openBlock(),e.createBlock(Pe.UserOptions,{ref_key:"details",ref:ze,key:`user_option_${ue.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ve),isImaging:e.unref(he),uid:d.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:M.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:R.value,onToggleFullscreen:Re,onGeneratePdf:e.unref(fe),onGenerateCsv:_e,onGenerateImage:e.unref(me),onToggleTable:$e,onToggleLabels:Se,onToggleTooltip:Ne,onToggleAnnotator:K,style:e.normalizeStyle({visibility:e.unref(ce)?e.unref(W)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${de.value.css}`)},[e.createVNode(Ze._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ut)):e.createCommentVNode("",!0),t.value.type==="classic"&&!isNaN(T.value/f.value)?(e.openBlock(),e.createElementBlock("defs",st,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ct),e.createElementVNode("stop",{offset:`${(1-T.value/f.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,dt),e.createElementVNode("stop",{offset:`${(1-T.value/f.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,vt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ht)],8,it)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${d.value}`,cx:(isNaN(l.middlePoint.x/u.value.width*100)?0:l.middlePoint.x/u.value.width*100)+"%",cy:(isNaN(l.middlePoint.y/u.value.height*100)?0:l.middlePoint.y/u.value.height*100)+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(g.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":g.value[a].color},null,8,pt)],8,mt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${d.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${d.value}`},null,8,kt),r[8]||(r[8]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,gt),e.createElementVNode("filter",{id:`shadow_${d.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,wt)],8,bt),e.createElementVNode("filter",{id:`drop_shadow_${d.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Bt)],8,Ct)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:u.value.width/2,y:u.value.height/2},16,16,!1,!1,T.value,12,t.value.style.chart.layout.curvedMarkers),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a)},null,8,_t)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x},${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y} ${i.value[a].middlePoint.x},${i.value[a].middlePoint.y}`,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,xt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"&&t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("circle",{key:5,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:t.value.style.chart.backgroundColor,filter:`url(#shadow_${d.value})`},null,8,$t)):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.dataset,(l,a)=>(e.openBlock(),e.createElementBlock("defs",{key:`pattern-${l.patternIndex}`},[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a,patternId:`pattern_${d.value}_${a}`}),void 0,!0)]))),128))])):e.createCommentVNode("",!0),k.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,Nt))),256)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Pt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Ft))),256))],64)):e.createCommentVNode("",!0),k.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[g.value.length>1?(e.openBlock(),e.createElementBlock("g",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${d.value})`,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ot))),256))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,At))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${d.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Mt))),256))])):(e.openBlock(),e.createElementBlock("g",Xt,[o.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:`url(#pattern_${d.value}_${g.value[0].patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Dt)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${d.value})`:g.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Yt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:9,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,It)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:10,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:`url(#gradient_${d.value})`},null,8,qt)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[g.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("path",{d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>Be({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=s=>{I.value=!1,p.value=null}),onClick:s=>F(l,a)},null,40,Gt))),256))])):(e.openBlock(),e.createElementBlock("g",Ut,[e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent",onMouseenter:r[1]||(r[1]=l=>Be({datapoint:g.value[0],relativeIndex:0,seriesIndex:g.value[0].seriesIndex,show:!0})),onMouseleave:r[2]||(r[2]=l=>{I.value=!1,p.value=null}),onClick:r[3]||(r[3]=l=>F(g.value[0],o.i))},null,40,Wt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,k.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:k.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,Ht)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(V.value||y.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,we.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:we.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Kt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:L(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Zt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(xe.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.mergeProps({ref_for:!0},{datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:xe.value,isVisible:B(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:H(l,C.value)}),void 0,!0)])],8,el))])):(e.openBlock(),e.createElementBlock("g",tl,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a)},null,8,ll)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,ol)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,al)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,nl)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.percentage.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,rl)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.name.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,ul)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",sl,[B(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,isFirstLoad:y.value}},void 0,!0)])],8,il)):e.createCommentVNode("",!0),B(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(O(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width:O(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x),y:Ie(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:"visible",pointerEvents:"none"})},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:O(i.value[a].middlePoint),flexAlign:O(i.value[a].middlePoint),isFirstLoad:y.value}},void 0,!0)])],12,cl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Qt))),256)),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,rt)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dl,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ve)||e.unref(he)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ke.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:T.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:ee},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Je.Legend,{key:`legend_${ne.value}`,legendSet:be.value,config:Ye.value,onClickMarker:r[4]||(r[4]=({i:l})=>ke(l))},e.createSlots({item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${x.value.includes(a)?.5:1}`),onClick:s=>l.segregate()},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),x.value.includes(a)?(e.openBlock(),e.createElementBlock("span",fl," ( "+e.toDisplayString(Ge(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",hl," ("+e.toDisplayString(isNaN(l.value/k.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,Ce.value(l),e.unref(n.dataLabel)({v:Ce.value(l),s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,vl)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:a})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${d.value}_${a})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:be.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:te,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:c.value.showTooltip&&I.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:M.value,content:U.value,isCustom:X.value,isFullscreen:z.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),A.value?(e.openBlock(),e.createBlock(Qe.default,{key:8,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(je.DataTable,{key:`table_${ae.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ml)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,nt))}},pl=at._export_sfc(yl,[["__scopeId","data-v-5f5d7ad3"]]);exports.default=pl;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cai0fWP7.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),We=require("./Title-BkfQdTEX.cjs"),Pe=require("./usePrinter-B4ojFS2B.cjs"),je=require("./DataTable-DOiZOQ3J.cjs"),He=require("./Tooltip-BK88meti.cjs"),Je=require("./Legend-CFqKBI0j.cjs"),Ke=require("./vue-ui-skeleton-C954hFY-.cjs"),Qe=require("./vue-ui-accordion-DUGBjyB1.cjs"),Fe=require("./useNestedProp-DcWhlk8h.cjs"),Ze=require("./PackageVersion-BMNt7NsQ.cjs"),et=require("./PenAndPaper-BUwLP3Wx.cjs"),tt=require("./useUserOptionState-BgepsfED.cjs"),lt=require("./Shape-2NRWULE_.cjs"),ot=require("./useChartAccessibility-Cm7nkzTG.cjs"),at=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),nt=["id"],rt=["xmlns","viewBox"],ut=["width","height"],st={key:1},it=["id"],ct=["stop-color"],dt=["offset","stop-color"],vt=["offset","stop-color"],ht=["stop-color"],ft={key:2},mt=["id","cx","cy"],yt=["stop-color","stop-opacity"],pt=["stop-color"],gt=["id"],kt=["id"],bt=["id"],wt=["flood-color"],Ct=["id"],Bt=["flood-color"],_t=["d","stroke","filter"],xt=["d","stroke","filter"],$t=["cx","cy","r","fill","filter"],St={key:6},Nt=["stroke","d"],Et={key:0},Pt=["d","fill","stroke","stroke-width","filter"],Ft=["d","fill","stroke","stroke-width","filter"],Vt={key:0},Lt=["stroke","d"],Tt={key:0},Ot=["d","stroke","stroke-width","filter"],zt={key:1},At=["d","fill","stroke","stroke-width","filter"],Mt=["d","fill","stroke","stroke-width","filter"],Xt={key:1},Dt=["cx","cy","r","fill","stroke","stroke-width"],Yt=["cx","cy","r","fill","stroke","stroke-width"],It=["cx","cy","r","stroke"],qt=["cx","cy","r","fill"],Rt={key:0},Gt=["d","fill","onMouseenter","onClick"],Ut={key:1},Wt=["cx","cy","r","fill"],jt=["x","y","fill","font-size"],Ht=["x","y","fill","font-size"],Jt=["x","y","fill","font-size"],Kt=["x","y","fill","font-size"],Qt=["filter"],Zt={key:0},el=["x","y"],tl={key:1},ll=["cx","cy","fill","stroke","filter","onClick"],ol=["cx","cy","fill","stroke","filter","onClick"],al=["text-anchor","x","y","fill","font-size","onClick"],nl=["text-anchor","x","y","fill","font-size","onClick"],rl=["text-anchor","x","y","fill","font-size","onClick"],ul=["text-anchor","x","y","fill","font-size","onClick"],sl={key:2},il=["x","y","width"],cl=["x","y","width"],dl={key:5,class:"vue-data-ui-watermark"},vl=["onClick"],hl={key:0,style:{"font-variant-numeric":"tabular-nums"}},fl={key:1},ml=["innerHTML"],yl={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Q,{expose:Ve,emit:Le}){const{vue_ui_donut:Te}=n.useConfig(),Oe=e.useSlots(),b=Q,A=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),M=e.ref(null),Z=e.ref(null),ee=e.ref(null),Y=e.ref(null),te=e.ref(null),le=e.ref(null),oe=e.ref(0),ae=e.ref(0),ne=e.ref(0);e.onMounted(()=>{re()}),e.onBeforeUnmount(()=>{Y.value&&Y.value.disconnect()});function re(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{A.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive){const o=Ee.throttle(()=>{const{width:r,height:l}=Ee.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Z.value:null,legend:t.value.style.chart.legend.show?ee.value:null,source:te.value,noTitle:le.value,padding:de.value});requestAnimationFrame(()=>{u.value.width=r,u.value.height=l})});Y.value=new ResizeObserver(o),Y.value.observe(M.value.parentNode)}}const d=e.ref(n.createUid()),ze=e.ref(null),I=e.ref(!1),U=e.ref(""),p=e.ref(null),ue=e.ref(0);function se(){const o=Fe.useNestedProp({userConfig:b.config,defaultConfig:Te});return o.theme?{...Fe.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>se(),set:o=>o}),y=e.ref(!0),$=e.ref([]);function Ae(o,r=1e3,l=50){return new Promise(a=>{const s=o.length;$.value=Array(s).fill(0);let v=0;o.forEach((h,m)=>{setTimeout(()=>{const N=performance.now();function _(D){const G=Math.min((D-N)/r,1),Ue=n.easeOutCubic(G);$.value[m]=h*Ue,$.value=[...$.value],G<1?requestAnimationFrame(_):($.value[m]=h,$.value=[...$.value],v+=1,v===s&&a())}requestAnimationFrame(_)},m*l)})})}e.onMounted(async()=>{const o=b.dataset.map(r=>r.values.reduce((l,a)=>l+a,0));t.value.startAnimation.show&&await Ae(o,t.value.startAnimation.durationMs,t.value.startAnimation.staggerMs),y.value=!1});const{userOptionsVisible:W,setUserOptionsVisibility:ie,keepUserOptionState:ce}=tt.useUserOptionState({config:t.value}),{svgRef:j}=ot.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>b.config,o=>{t.value=se(),W.value=!t.value.userOptions.showOnChartHover,re(),oe.value+=1,ae.value+=1,ne.value+=1,c.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const de=e.computed(()=>{const{top:o,right:r,bottom:l,left:a}=t.value.style.chart.padding;return{css:`padding:${o}px ${r}px ${l}px ${a}px`,top:o,right:r,bottom:l,left:a}}),{isPrinting:ve,isImaging:he,generatePdf:fe,generateImage:me}=Pe.usePrinter({elementId:`donut__${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut",options:t.value.userOptions.print}),Me=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ye=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),u=e.ref({height:360,width:512}),T=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,r=Math.min(u.value.width,u.value.height)*o,l=r>f.value?f.value:r;return Math.max(l,3)}),pe=Le,S=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||"",patternIndex:r,seriesIndex:r,ghost:!1,pattern:`pattern_${d.value}_${r}`}))),w=e.ref(S.value);e.watch(()=>S.value,o=>w.value=o);function Xe(){return S.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const x=e.ref([]);e.ref(null),e.ref(null);const V=e.ref(!1);function ge({from:o,to:r,duration:l,onUpdate:a,onDone:s,easing:v=n.easeOutCubic}){const h=performance.now();function m(N){const _=Math.min((N-h)/l,1),D=v(_),G=o+(r-o)*D;a(G,_),_<1?requestAnimationFrame(m):(a(r,1),s&&s())}requestAnimationFrame(m)}function ke(o){const r=S.value.find((s,v)=>v===o);let a=w.value.find((s,v)=>v===o).value;if(x.value.includes(o)){let v=function(){w.value=w.value.map((m,N)=>o===N?{...m,value:s}:m)},h=function(){V.value=!0,ge({from:a,to:s,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(m,N)=>{w.value=w.value.map((_,D)=>o===D?{..._,value:m}:_)},onDone:()=>{v(),V.value=!1}})};x.value=x.value.filter(m=>m!==o);const s=r.value;t.value.serieToggleAnimation.show&&t.value.type==="classic"?h():v()}else if(x.value.length<S.value.length-1){let s=function(){x.value.push(o),w.value=w.value.map((h,m)=>o===m?{...h,value:0}:h)},v=function(){V.value=!0,ge({from:a,to:0,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(h,m)=>{w.value=w.value.map((N,_)=>o===_?{...N,value:h}:N)},onDone:()=>{s(),V.value=!1}})};t.value.serieToggleAnimation.show&&t.value.type==="classic"?v():s()}pe("selectLegend",E.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const De=e.computed(()=>b.dataset.reduce((o,r)=>o+r.values.reduce((l,a)=>l+a,0),0)),E=e.computed(()=>{if(y.value){const o=$.value.map((l,a)=>({...S.value[a],value:l,color:S.value[a].color,ghost:!1})),r=De.value-$.value.reduce((l,a)=>l+a,0);return r>0&&o.push({name:"__ghost__",value:r,color:"transparent",ghost:!0}),o}else return w.value.forEach((o,r)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),w.value.map((o,r)=>({...o,seriesIndex:r})).filter((o,r)=>!x.value.includes(r))}),be=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle",patternIndex:r})).map((o,r)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:x.value.includes(r)?.5:1,segregate:()=>!V.value&&ke(r),isSegregated:x.value.includes(r)}))),Ye=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const o=Math.min(u.value.width/3,u.value.height/3);return o<55?55:o}),g=e.computed(()=>n.makeDonut({series:E.value},u.value.width/2,u.value.height/2,f.value,f.value,1.99999,2,1,360,105.25,T.value)),C=e.computed(()=>g.value.filter(o=>!o.ghost)),i=e.computed(()=>{const o=Math.max(...E.value.map(l=>l.value)),r=E.value.map(l=>l.value/o);return n.createPolarAreas({series:r,center:{x:u.value.width/2,y:u.value.height/2},maxRadius:Math.min(u.value.width,u.value.height)/3,hasGhost:y.value})});function O(o){return o.x>u.value.width/2+6?"start":o.x<u.value.width/2-6?"end":"middle"}function Ie(o){return o.middlePoint.y>u.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:u.value.width/2,centerY:u.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:u.value.width/2,centerY:u.value.height/2}).y-100}function B(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function H(o,r){const l=o.value/qe(r);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function qe(o){return[...o].map(r=>r.value).reduce((r,l)=>r+l,0)}const k=e.computed(()=>E.value.map(o=>o.value).reduce((o,r)=>o+r,0)),we=e.computed(()=>k.value/E.value.length),Ce=e.computed(()=>o=>V.value?o.proportion*100:o.value/k.value*100),J=e.ref(null),X=e.ref(!1);function Be({datapoint:o,relativeIndex:r,seriesIndex:l,show:a=!1}){J.value={datapoint:o,seriesIndex:l,config:t.value,series:S.value},I.value=a,p.value=r;let s="";const v=t.value.style.chart.tooltip.customFormat;if(X.value=!1,n.isFunction(v))try{const h=v({seriesIndex:l,datapoint:o,series:S.value,config:t.value});typeof h=="string"&&(U.value=h,X.value=!0)}catch{console.warn("Custom format cannot be applied."),X.value=!1}if(!X.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,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="${o.color}"/>${Oe.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${d.value}_${l})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,relativeIndex:r,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const h=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:r,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${h})</span></div>`:s+=`<b>${h}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),U.value=`<div>${s}</div>`}}function L(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${d.value})`:""}const P=e.computed(()=>{const o=E.value.map(l=>({name:l.name,color:l.color})),r=E.value.map(l=>l.value);return{head:o,body:r}});function _e(){e.nextTick(()=>{const o=P.value.head.map((a,s)=>[[a.name],[P.value.body[s]],[isNaN(P.value.body[s]/k.value)?"-":P.value.body[s]/k.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(r);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const q=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=P.value.head.map((s,v)=>[{color:s.color,name:s.name},P.value.body[v],isNaN(P.value.body[v]/k.value)?"-":(P.value.body[v]/k.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:o,body:r,config:l}}),z=e.ref(!1);function Re(o){z.value=o,ue.value+=1}const xe=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ge(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function F(o,r){pe("selectDatapoint",{datapoint:o,index:r})}function $e(){c.value.showTable=!c.value.showTable}function Se(){c.value.dataLabels.show=!c.value.dataLabels.show}function Ne(){c.value.showTooltip=!c.value.showTooltip}const R=e.ref(!1);function K(){R.value=!R.value}return Ve({getData:Xe,generatePdf:fe,generateCsv:_e,generateImage:me,toggleTable:$e,toggleLabels:Se,toggleTooltip:Ne,toggleAnnotator:K}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:M,class:e.normalizeClass(`vue-ui-donut ${z.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`donut__${d.value}`,onMouseenter:r[6]||(r[6]=()=>e.unref(ie)(!0)),onMouseleave:r[7]||(r[7]=()=>e.unref(ie)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(j)?(e.openBlock(),e.createBlock(et._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:R.value,svgRef:e.unref(j),onClose:K},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Me.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:le,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(We._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value&&(e.unref(ce)||e.unref(W))?(e.openBlock(),e.createBlock(Pe.UserOptions,{ref_key:"details",ref:ze,key:`user_option_${ue.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ve),isImaging:e.unref(he),uid:d.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:M.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:R.value,onToggleFullscreen:Re,onGeneratePdf:e.unref(fe),onGenerateCsv:_e,onGenerateImage:e.unref(me),onToggleTable:$e,onToggleLabels:Se,onToggleTooltip:Ne,onToggleAnnotator:K,style:e.normalizeStyle({visibility:e.unref(ce)?e.unref(W)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${de.value.css}`)},[e.createVNode(Ze._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ut)):e.createCommentVNode("",!0),t.value.type==="classic"&&!isNaN(T.value/f.value)?(e.openBlock(),e.createElementBlock("defs",st,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ct),e.createElementVNode("stop",{offset:`${(1-T.value/f.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,dt),e.createElementVNode("stop",{offset:`${(1-T.value/f.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,vt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ht)],8,it)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${d.value}`,cx:(isNaN(l.middlePoint.x/u.value.width*100)?0:l.middlePoint.x/u.value.width*100)+"%",cy:(isNaN(l.middlePoint.y/u.value.height*100)?0:l.middlePoint.y/u.value.height*100)+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(g.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":g.value[a].color},null,8,pt)],8,mt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${d.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${d.value}`},null,8,kt),r[8]||(r[8]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,gt),e.createElementVNode("filter",{id:`shadow_${d.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,wt)],8,bt),e.createElementVNode("filter",{id:`drop_shadow_${d.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Bt)],8,Ct)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:u.value.width/2,y:u.value.height/2},16,16,!1,!1,T.value,12,t.value.style.chart.layout.curvedMarkers),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a)},null,8,_t)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x},${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y} ${i.value[a].middlePoint.x},${i.value[a].middlePoint.y}`,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,xt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"&&t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("circle",{key:5,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:t.value.style.chart.backgroundColor,filter:`url(#shadow_${d.value})`},null,8,$t)):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.dataset,(l,a)=>(e.openBlock(),e.createElementBlock("defs",{key:`pattern-${l.patternIndex}`},[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a,patternId:`pattern_${d.value}_${a}`}),void 0,!0)]))),128))])):e.createCommentVNode("",!0),k.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,Nt))),256)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Pt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Ft))),256))],64)):e.createCommentVNode("",!0),k.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[g.value.length>1?(e.openBlock(),e.createElementBlock("g",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${d.value})`,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ot))),256))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,At))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${d.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Mt))),256))])):(e.openBlock(),e.createElementBlock("g",Xt,[o.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:`url(#pattern_${d.value}_${g.value[0].patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Dt)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${d.value})`:g.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Yt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:9,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,It)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:10,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:`url(#gradient_${d.value})`},null,8,qt)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[g.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("path",{d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>Be({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=s=>{I.value=!1,p.value=null}),onClick:s=>F(l,a)},null,40,Gt))),256))])):(e.openBlock(),e.createElementBlock("g",Ut,[e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent",onMouseenter:r[1]||(r[1]=l=>Be({datapoint:g.value[0],relativeIndex:0,seriesIndex:g.value[0].seriesIndex,show:!0})),onMouseleave:r[2]||(r[2]=l=>{I.value=!1,p.value=null}),onClick:r[3]||(r[3]=l=>F(g.value[0],o.i))},null,40,Wt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,k.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:k.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,Ht)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(V.value||y.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,we.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:we.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Kt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:L(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Zt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(xe.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.mergeProps({ref_for:!0},{datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:xe.value,isVisible:B(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:H(l,C.value)}),void 0,!0)])],8,el))])):(e.openBlock(),e.createElementBlock("g",tl,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a)},null,8,ll)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,ol)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,al)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,nl)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.percentage.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,rl)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.name.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,ul)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",sl,[B(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,isFirstLoad:y.value}},void 0,!0)])],8,il)):e.createCommentVNode("",!0),B(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(O(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width:O(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x),y:Ie(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:"visible",pointerEvents:"none"})},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:O(i.value[a].middlePoint),flexAlign:O(i.value[a].middlePoint),isFirstLoad:y.value}},void 0,!0)])],12,cl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Qt))),256)),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,rt)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dl,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ve)||e.unref(he)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ke.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:T.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:ee},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Je.Legend,{key:`legend_${ne.value}`,legendSet:be.value,config:Ye.value,onClickMarker:r[4]||(r[4]=({i:l})=>ke(l))},e.createSlots({item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${x.value.includes(a)?.5:1}`),onClick:s=>l.segregate()},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),x.value.includes(a)?(e.openBlock(),e.createElementBlock("span",fl," ( "+e.toDisplayString(Ge(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",hl," ("+e.toDisplayString(isNaN(l.value/k.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,Ce.value(l),e.unref(n.dataLabel)({v:Ce.value(l),s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,vl)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:a})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${d.value}_${a})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:be.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:te,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:c.value.showTooltip&&I.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:M.value,content:U.value,isCustom:X.value,isFullscreen:z.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),A.value?(e.openBlock(),e.createBlock(Qe.default,{key:8,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(je.DataTable,{key:`table_${ae.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ml)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,nt))}},pl=at._export_sfc(yl,[["__scopeId","data-v-5f5d7ad3"]]);exports.default=pl;
@@ -1,15 +1,15 @@
1
1
  import { computed as g, ref as d, watch as fe, onMounted as be, onBeforeUnmount as Ie, createElementBlock as r, openBlock as o, unref as u, normalizeStyle as F, normalizeClass as ge, createBlock as L, createCommentVNode as v, createElementVNode as i, createSlots as Ge, withCtx as _, renderSlot as m, normalizeProps as V, guardReactiveProps as E, createVNode as Me, Fragment as C, renderList as $, toDisplayString as A, createTextVNode as me, nextTick as De } from "vue";
2
- import { u as Fe, c as pe, a as Ve, o as Ee, e as _e, g as Re, v as ke, D as He, f as z, X as xe, i as B, l as we, h as Ce, q as We, r as Ue } from "./index-D2h9qRb4.js";
2
+ import { u as Fe, c as pe, a as Ve, o as Ee, e as _e, g as Re, v as ke, D as He, f as z, X as xe, i as B, l as we, h as Ce, q as We, r as Ue } from "./index-hMo72hAq.js";
3
3
  import { t as Be, u as je } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as qe } from "./Title-BNsKKvQy.js";
5
- import { u as Ye, U as Ze } from "./usePrinter-BGkHpXM9.js";
6
- import { D as Je } from "./DataTable-CGMCHKzY.js";
7
- import Ke from "./vue-ui-skeleton-CNP_4H8z.js";
8
- import { L as Qe } from "./Legend-CLZW3_-V.js";
9
- import et from "./vue-ui-accordion-C-v1kmEc.js";
10
- import { u as $e } from "./useNestedProp-DlWfv-mw.js";
11
- import { _ as tt } from "./PackageVersion-DrU5ubC-.js";
12
- import { _ as lt } from "./PenAndPaper-BF6RVx_0.js";
4
+ import { _ as qe } from "./Title-DrVDm1wy.js";
5
+ import { u as Ye, U as Ze } from "./usePrinter-D2z-bUtX.js";
6
+ import { D as Je } from "./DataTable-CXbN2mJi.js";
7
+ import Ke from "./vue-ui-skeleton-C3t9bL6f.js";
8
+ import { L as Qe } from "./Legend-BU9C5fBQ.js";
9
+ import et from "./vue-ui-accordion-CHMdpjnX.js";
10
+ import { u as $e } from "./useNestedProp-DhEaBTgF.js";
11
+ import { _ as tt } from "./PackageVersion-0Lu6RIig.js";
12
+ import { _ as lt } from "./PenAndPaper-D4Uu-GqW.js";
13
13
  import { u as at } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { u as st } from "./useChartAccessibility-BWojgys7.js";
15
15
  import { _ as ot } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D6F-xMcR.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-Cj4tUZSu.cjs"),ee=require("./usePrinter-B9NkBzf5.cjs"),ve=require("./DataTable-Bu_0tRZE.cjs"),he=require("./vue-ui-skeleton-CK5DdXVo.cjs"),ye=require("./Legend-BDIC5aus.cjs"),fe=require("./vue-ui-accordion-ChE9WO8Q.cjs"),te=require("./useNestedProp-CAbtwUJj.cjs"),me=require("./PackageVersion-CKutD59c.cjs"),be=require("./PenAndPaper-Bnvy0XRn.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],xe=["xmlns","viewBox"],Ce=["x","y","width","height"],we={key:1},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Le={key:3},Se=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill"],ze={key:4},Ae=["x","y","font-size","fill","font-weight"],Pe=["id"],Te=["stop-color"],Xe=["stop-color"],Oe=["stop-color"],De=["id"],Fe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Ge=["id"],qe=["stop-color"],Re=["stop-color"],He=["id"],Ue=["stop-color"],We=["stop-color"],je={key:0},Ye=["d","fill"],Ze={key:1},Je=["x","y","height","width","fill"],Ke=["cx","cy","r","fill","stroke","stroke-width"],Qe=["cx","cy","r","fill","stroke","stroke-width"],et={key:5},tt=["x","y","fill","font-size"],lt={key:6},at=["x","y","fill","font-size"],ot={key:5,class:"vue-data-ui-watermark"},rt=["xmlns","height","width"],st=["fill"],nt=["innerHTML"],ut={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(le,{expose:ae,emit:ct}){const{vue_ui_dumbbell:oe}=s.useConfig(),v=le,b=e.computed({get(){return!!v.dataset&&v.dataset.length},set(a){return a}}),c=e.ref(s.createUid()),V=e.ref(0),_=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=pe.useUserOptionState({config:t.value}),{svgRef:I}=ge.useChartAccessibility({config:t.value.style.chart.title});function G(){const a=te.useNestedProp({userConfig:v.config,defaultConfig:oe});return a.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,q(),X.value+=1,O.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width,p.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>v.dataset,a=>{Y()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{q()});function q(){if(s.objectIsEmpty(v.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):v.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:n,height:l}=Q.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{g.value=n,i.value=l/v.dataset.length,d.value=C()})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:R,isImaging:H,generatePdf:U,generateImage:W}=ee.usePrinter({elementId:`dumbbell_${c.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell",options:t.value.userOptions.print}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),y=e.computed(()=>v.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...y.value.flatMap(a=>[a.start,a.end])),min:Math.min(...y.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*v.dataset.length,o=u.value.ticks.length*(g.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*v.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return y.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,h=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:h,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const d=e.ref([]),j=e.ref(null),se=e.computed(()=>y.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{Y()});function Y(){d.value=C();let a=d.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=y.value.map(o=>o.end-o.start);a>=se.value?(cancelAnimationFrame(j.value),d.value=C()):(d.value=d.value.map((o,h)=>{o.endVal+=l[h]*(t.value.animationSpeed/100);const m=r.value.left+(o.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,S=m+(N-m)/2;return{...o,startX:m,endX:N,centerX:S,y:r.value.top+h*i.value+i.value/2,endVal:o.endVal}}),a=d.value.map(o=>o.endVal).reduce((o,h)=>o+h,0),j.value=requestAnimationFrame(n))}t.value.useAnimation?n():d.value=C()}const Z=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${c.value})`:t.value.style.chart.plots.endColor}]),ne=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=d.value.map(l=>({name:l.name})),n=d.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((h,m)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ce=s.dataLabel({v:100*(f.value.body[m].end/f.value.body[m].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:h.name},N,S,ce]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function J(){e.nextTick(()=>{const a=f.value.head.map((o,h)=>[[o.name],[f.value.body[h].start],[f.value.body[h].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function ue(a){k.value=a,V.value+=1}function ie(){return d.value}function K(){p.value.showTable=!p.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return ae({getData:ie,generatePdf:U,generateCsv:J,generateImage:W,toggleTable:K,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:_,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${c.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(H),uid:c.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(W),onToggleTable:K,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:r.value.left,y:r.value.top,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(u.value.ticks.length-1),x2:r.value.left+o*r.value.width/(u.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,Be))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Ee))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,$e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,Se))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,Ve))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(u.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ae))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Te),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Oe)],8,Pe),e.createElementVNode("radialGradient",{id:`end_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Fe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,De)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Re)],8,Ge),e.createElementVNode("linearGradient",{id:`grad_negative_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,We)],8,He)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",je,[e.createElementVNode("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cai0fWP7.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-BkfQdTEX.cjs"),ee=require("./usePrinter-B4ojFS2B.cjs"),ve=require("./DataTable-DOiZOQ3J.cjs"),he=require("./vue-ui-skeleton-C954hFY-.cjs"),ye=require("./Legend-CFqKBI0j.cjs"),fe=require("./vue-ui-accordion-DUGBjyB1.cjs"),te=require("./useNestedProp-DcWhlk8h.cjs"),me=require("./PackageVersion-BMNt7NsQ.cjs"),be=require("./PenAndPaper-BUwLP3Wx.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],xe=["xmlns","viewBox"],Ce=["x","y","width","height"],we={key:1},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Le={key:3},Se=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill"],ze={key:4},Ae=["x","y","font-size","fill","font-weight"],Pe=["id"],Te=["stop-color"],Xe=["stop-color"],Oe=["stop-color"],De=["id"],Fe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Ge=["id"],qe=["stop-color"],Re=["stop-color"],He=["id"],Ue=["stop-color"],We=["stop-color"],je={key:0},Ye=["d","fill"],Ze={key:1},Je=["x","y","height","width","fill"],Ke=["cx","cy","r","fill","stroke","stroke-width"],Qe=["cx","cy","r","fill","stroke","stroke-width"],et={key:5},tt=["x","y","fill","font-size"],lt={key:6},at=["x","y","fill","font-size"],ot={key:5,class:"vue-data-ui-watermark"},rt=["xmlns","height","width"],st=["fill"],nt=["innerHTML"],ut={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(le,{expose:ae,emit:ct}){const{vue_ui_dumbbell:oe}=s.useConfig(),v=le,b=e.computed({get(){return!!v.dataset&&v.dataset.length},set(a){return a}}),c=e.ref(s.createUid()),V=e.ref(0),_=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=pe.useUserOptionState({config:t.value}),{svgRef:I}=ge.useChartAccessibility({config:t.value.style.chart.title});function G(){const a=te.useNestedProp({userConfig:v.config,defaultConfig:oe});return a.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,q(),X.value+=1,O.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width,p.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>v.dataset,a=>{Y()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{q()});function q(){if(s.objectIsEmpty(v.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):v.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:n,height:l}=Q.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{g.value=n,i.value=l/v.dataset.length,d.value=C()})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:R,isImaging:H,generatePdf:U,generateImage:W}=ee.usePrinter({elementId:`dumbbell_${c.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell",options:t.value.userOptions.print}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),y=e.computed(()=>v.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...y.value.flatMap(a=>[a.start,a.end])),min:Math.min(...y.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*v.dataset.length,o=u.value.ticks.length*(g.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*v.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return y.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,h=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:h,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const d=e.ref([]),j=e.ref(null),se=e.computed(()=>y.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{Y()});function Y(){d.value=C();let a=d.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=y.value.map(o=>o.end-o.start);a>=se.value?(cancelAnimationFrame(j.value),d.value=C()):(d.value=d.value.map((o,h)=>{o.endVal+=l[h]*(t.value.animationSpeed/100);const m=r.value.left+(o.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,S=m+(N-m)/2;return{...o,startX:m,endX:N,centerX:S,y:r.value.top+h*i.value+i.value/2,endVal:o.endVal}}),a=d.value.map(o=>o.endVal).reduce((o,h)=>o+h,0),j.value=requestAnimationFrame(n))}t.value.useAnimation?n():d.value=C()}const Z=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${c.value})`:t.value.style.chart.plots.endColor}]),ne=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=d.value.map(l=>({name:l.name})),n=d.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((h,m)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ce=s.dataLabel({v:100*(f.value.body[m].end/f.value.body[m].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:h.name},N,S,ce]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function J(){e.nextTick(()=>{const a=f.value.head.map((o,h)=>[[o.name],[f.value.body[h].start],[f.value.body[h].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function ue(a){k.value=a,V.value+=1}function ie(){return d.value}function K(){p.value.showTable=!p.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return ae({getData:ie,generatePdf:U,generateCsv:J,generateImage:W,toggleTable:K,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:_,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${c.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(H),uid:c.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(W),onToggleTable:K,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:r.value.left,y:r.value.top,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(u.value.ticks.length-1),x2:r.value.left+o*r.value.width/(u.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,Be))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Ee))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,$e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,Se))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,Ve))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(u.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ae))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Te),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Oe)],8,Pe),e.createElementVNode("radialGradient",{id:`end_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Fe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,De)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Re)],8,Ge),e.createElementVNode("linearGradient",{id:`grad_negative_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,We)],8,He)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",je,[e.createElementVNode("path",{d:`M
2
2
  ${l.startX},${l.y+t.value.style.chart.plots.radius/2}
3
3
  C ${l.centerX},${l.y} ${l.centerX},${l.y}
4
4
  ${l.endX},${l.y+t.value.style.chart.plots.radius/2}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D6F-xMcR.cjs"),ye=require("./Title-Cj4tUZSu.cjs"),oe=require("./usePrinter-B9NkBzf5.cjs"),be=require("./DataTable-Bu_0tRZE.cjs"),we=require("./vue-ui-accordion-ChE9WO8Q.cjs"),Ce=require("./vue-ui-skeleton-CK5DdXVo.cjs"),le=require("./useNestedProp-CAbtwUJj.cjs"),Ne=require("./PackageVersion-CKutD59c.cjs"),xe=require("./PenAndPaper-Bnvy0XRn.cjs"),$e=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./useChartAccessibility-Cm7nkzTG.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Pe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Te=["xmlns","viewBox"],Oe=["width","height"],Fe=["id"],ze=["stop-color"],Ie=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],Ae=["x","y","font-size","fill"],He=["x","y","font-size","fill"],Me={key:4,class:"vue-data-ui-watermark"},qe={key:6,ref:"source",dir:"auto"},De=["innerHTML"],Ue={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ne,{expose:ae}){const{vue_ui_flow:re}=s.useConfig(),h=ne,B=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{z()});function z(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),I=e.ref(null),L=e.ref(0),V=e.ref(0),y=e.ref(!1);function se(o){y.value=o,L.value+=1}const t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:H}=$e.useUserOptionState({config:t.value}),{svgRef:M}=Be.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=le.useNestedProp({userConfig:h.config,defaultConfig:re});return o.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=q(),S.value=!t.value.userOptions.showOnChartHover,z(),V.value+=1,b.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:D,isImaging:U,generatePdf:Y,generateImage:G}=oe.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),P=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(a){o[a]||(o[a]={inflow:0,outflow:0})}P.value.forEach(([a,r,c])=>{n(a),n(r),o[a].outflow+=c,o[r].inflow+=c});let l=0;for(const a in o){const r=Math.max(o[a].inflow,o[a].outflow);l=Math.max(l,r)}return l});function ie(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ce(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function de(o){const n={},l={};function a(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,$=m+1;a(u,m),a(i,$),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=E.value[i]||E.value[i%E.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ie(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const r={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;r[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ce(m)},i+=m+R.value})}const c=[];for(const u in n){let i=r[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const $=r[v].y+t.value.style.chart.padding.top,O=r[u],F=r[v],K=s.checkNaN(i),Q=s.checkNaN(i+k/n[u].outflow*O.height),ee=s.checkNaN($),te=s.checkNaN($+k/n[v].inflow*F.height),ke={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(O.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(O.x)+s.checkNaN(g.value)} ${Q} L ${s.checkNaN(F.x)} ${te} L ${s.checkNaN(F.x)} ${ee} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ke),i+=Q-K,r[v].y+=te-ee})}return{nodeCoordinates:r,links:c}}const f=e.computed(()=>{const o=de(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),ve=e.computed(()=>he(f.value.nodes));function he(o){const n={};for(const a in o){const{x:r,height:c}=o[a];n[r]||(n[r]=0),n[r]+=c+R.value}return Math.max(...Object.values(n))}const w=e.computed(()=>{const{top:o,right:n,left:l,bottom:a}=t.value.style.chart.padding,r=P.value.length*j.value;return{height:ve.value+o+a,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:r-n,p_top:o,p_bottom:a}});function fe(o){const n={},l={},a=new Set;return P.value.forEach(([r,c,u])=>{n[r]||(n[r]=[]),l[c]||(l[c]=[]),n[r].push(c),l[c].push(r)}),n[o]&&n[o].forEach(r=>a.add(r)),l[o]&&l[o].forEach(r=>a.add(r)),Array.from(a).concat(o)}const p=e.ref(null),C=e.ref(null);function pe(o){p.value=fe(o.name),C.value=o.name}function me(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:a,value:r})=>({source:o,target:n,sourceColor:l,targetColor:a,value:r})));function Z(){e.nextTick(()=>{const o=X.value.map((a,r)=>[[a.source],[a.target],[a.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((r,c)=>[{color:r.sourceColor,name:r.source},{color:r.targetColor,name:r.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:r.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function ge(){return f.value}function J(){b.value.showTable=!b.value.showTable}const x=e.ref(!1);function T(){x.value=!x.value}return ae({getData:ge,generateCsv:Z,generateImage:G,generatePdf:Y,toggleTable:J,toggleAnnotator:T}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:I,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe._sfc_main,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:T},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",Ee,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(),e.createBlock(ye._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&B.value&&(e.unref(H)||e.unref(S))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(U),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:se,onGeneratePdf:e.unref(Y),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:J,onToggleAnnotator:T,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgRef",ref:M,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${w.value.width} ${w.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width,height:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Oe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,a)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Ie)],8,Fe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:r=>pe(l),onMouseleave:n[0]||(n[0]=r=>me()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:a})),13,He))),256)),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Te)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createBlock(we.default,{key:7,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(be.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,De)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Se))}},Ye=_e._export_sfc(Ue,[["__scopeId","data-v-34c6a87d"]]);exports.default=Ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cai0fWP7.cjs"),ye=require("./Title-BkfQdTEX.cjs"),oe=require("./usePrinter-B4ojFS2B.cjs"),be=require("./DataTable-DOiZOQ3J.cjs"),we=require("./vue-ui-accordion-DUGBjyB1.cjs"),Ce=require("./vue-ui-skeleton-C954hFY-.cjs"),le=require("./useNestedProp-DcWhlk8h.cjs"),Ne=require("./PackageVersion-BMNt7NsQ.cjs"),xe=require("./PenAndPaper-BUwLP3Wx.cjs"),$e=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./useChartAccessibility-Cm7nkzTG.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Pe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Te=["xmlns","viewBox"],Oe=["width","height"],Fe=["id"],ze=["stop-color"],Ie=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],Ae=["x","y","font-size","fill"],He=["x","y","font-size","fill"],Me={key:4,class:"vue-data-ui-watermark"},qe={key:6,ref:"source",dir:"auto"},De=["innerHTML"],Ue={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ne,{expose:ae}){const{vue_ui_flow:re}=s.useConfig(),h=ne,B=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{z()});function z(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),I=e.ref(null),L=e.ref(0),V=e.ref(0),y=e.ref(!1);function se(o){y.value=o,L.value+=1}const t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:H}=$e.useUserOptionState({config:t.value}),{svgRef:M}=Be.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=le.useNestedProp({userConfig:h.config,defaultConfig:re});return o.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=q(),S.value=!t.value.userOptions.showOnChartHover,z(),V.value+=1,b.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:D,isImaging:U,generatePdf:Y,generateImage:G}=oe.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),P=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(a){o[a]||(o[a]={inflow:0,outflow:0})}P.value.forEach(([a,r,c])=>{n(a),n(r),o[a].outflow+=c,o[r].inflow+=c});let l=0;for(const a in o){const r=Math.max(o[a].inflow,o[a].outflow);l=Math.max(l,r)}return l});function ie(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ce(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function de(o){const n={},l={};function a(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,$=m+1;a(u,m),a(i,$),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=E.value[i]||E.value[i%E.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ie(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const r={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;r[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ce(m)},i+=m+R.value})}const c=[];for(const u in n){let i=r[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const $=r[v].y+t.value.style.chart.padding.top,O=r[u],F=r[v],K=s.checkNaN(i),Q=s.checkNaN(i+k/n[u].outflow*O.height),ee=s.checkNaN($),te=s.checkNaN($+k/n[v].inflow*F.height),ke={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(O.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(O.x)+s.checkNaN(g.value)} ${Q} L ${s.checkNaN(F.x)} ${te} L ${s.checkNaN(F.x)} ${ee} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ke),i+=Q-K,r[v].y+=te-ee})}return{nodeCoordinates:r,links:c}}const f=e.computed(()=>{const o=de(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),ve=e.computed(()=>he(f.value.nodes));function he(o){const n={};for(const a in o){const{x:r,height:c}=o[a];n[r]||(n[r]=0),n[r]+=c+R.value}return Math.max(...Object.values(n))}const w=e.computed(()=>{const{top:o,right:n,left:l,bottom:a}=t.value.style.chart.padding,r=P.value.length*j.value;return{height:ve.value+o+a,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:r-n,p_top:o,p_bottom:a}});function fe(o){const n={},l={},a=new Set;return P.value.forEach(([r,c,u])=>{n[r]||(n[r]=[]),l[c]||(l[c]=[]),n[r].push(c),l[c].push(r)}),n[o]&&n[o].forEach(r=>a.add(r)),l[o]&&l[o].forEach(r=>a.add(r)),Array.from(a).concat(o)}const p=e.ref(null),C=e.ref(null);function pe(o){p.value=fe(o.name),C.value=o.name}function me(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:a,value:r})=>({source:o,target:n,sourceColor:l,targetColor:a,value:r})));function Z(){e.nextTick(()=>{const o=X.value.map((a,r)=>[[a.source],[a.target],[a.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((r,c)=>[{color:r.sourceColor,name:r.source},{color:r.targetColor,name:r.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:r.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function ge(){return f.value}function J(){b.value.showTable=!b.value.showTable}const x=e.ref(!1);function T(){x.value=!x.value}return ae({getData:ge,generateCsv:Z,generateImage:G,generatePdf:Y,toggleTable:J,toggleAnnotator:T}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:I,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe._sfc_main,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:T},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",Ee,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(),e.createBlock(ye._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&B.value&&(e.unref(H)||e.unref(S))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(U),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:se,onGeneratePdf:e.unref(Y),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:J,onToggleAnnotator:T,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgRef",ref:M,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${w.value.width} ${w.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width,height:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Oe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,a)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Ie)],8,Fe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:r=>pe(l),onMouseleave:n[0]||(n[0]=r=>me()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,a)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:a})),13,He))),256)),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Te)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createBlock(we.default,{key:7,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(be.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,De)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Se))}},Ye=_e._export_sfc(Ue,[["__scopeId","data-v-34c6a87d"]]);exports.default=Ye;
@@ -1,13 +1,13 @@
1
1
  import { computed as g, onMounted as Ye, ref as k, watch as De, createElementBlock as c, openBlock as i, unref as u, normalizeStyle as _, normalizeClass as ye, createBlock as P, createCommentVNode as w, createSlots as Ge, withCtx as y, renderSlot as p, normalizeProps as M, guardReactiveProps as z, createVNode as be, createElementVNode as Y, Fragment as F, renderList as A, toDisplayString as W, createTextVNode as Ue, nextTick as Ve } from "vue";
2
- import { u as Be, o as je, e as Re, c as ke, t as Xe, p as q, a as We, b as qe, v as f, f as we, X as Je, G as Ce, J as Ze, i as Ke, q as Qe, r as et } from "./index-D2h9qRb4.js";
3
- import { _ as tt } from "./Title-BNsKKvQy.js";
4
- import { u as ot, U as lt } from "./usePrinter-BGkHpXM9.js";
5
- import { D as at } from "./DataTable-CGMCHKzY.js";
6
- import nt from "./vue-ui-accordion-C-v1kmEc.js";
7
- import st from "./vue-ui-skeleton-CNP_4H8z.js";
8
- import { u as $e } from "./useNestedProp-DlWfv-mw.js";
9
- import { _ as ut } from "./PackageVersion-DrU5ubC-.js";
10
- import { _ as rt } from "./PenAndPaper-BF6RVx_0.js";
2
+ import { u as Be, o as je, e as Re, c as ke, t as Xe, p as q, a as We, b as qe, v as f, f as we, X as Je, G as Ce, J as Ze, i as Ke, q as Qe, r as et } from "./index-hMo72hAq.js";
3
+ import { _ as tt } from "./Title-DrVDm1wy.js";
4
+ import { u as ot, U as lt } from "./usePrinter-D2z-bUtX.js";
5
+ import { D as at } from "./DataTable-CXbN2mJi.js";
6
+ import nt from "./vue-ui-accordion-CHMdpjnX.js";
7
+ import st from "./vue-ui-skeleton-C3t9bL6f.js";
8
+ import { u as $e } from "./useNestedProp-DhEaBTgF.js";
9
+ import { _ as ut } from "./PackageVersion-0Lu6RIig.js";
10
+ import { _ as rt } from "./PenAndPaper-D4Uu-GqW.js";
11
11
  import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
12
12
  import { u as ct } from "./useChartAccessibility-BWojgys7.js";
13
13
  import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,15 +1,15 @@
1
1
  import { useCssVars as Le, computed as v, onMounted as Te, ref as c, watch as Ae, createElementBlock as u, openBlock as s, unref as n, normalizeStyle as _, normalizeClass as T, createBlock as A, createCommentVNode as f, createSlots as Ne, withCtx as g, renderSlot as b, normalizeProps as M, guardReactiveProps as R, createVNode as Oe, createElementVNode as C, mergeProps as q, Fragment as V, renderList as B, toDisplayString as U, createTextVNode as ze, nextTick as Se } from "vue";
2
- import { u as Fe, o as Ie, e as me, g as Pe, c as De, d as Me, l as Re, i as E, f as G, X as Ve, G as Be, F as Y, a as Ue, q as Ee, r as Ge } from "./index-D2h9qRb4.js";
3
- import { u as be } from "./useNestedProp-DlWfv-mw.js";
4
- import { u as je, U as He } from "./usePrinter-BGkHpXM9.js";
5
- import { _ as Xe } from "./Title-BNsKKvQy.js";
6
- import { _ as qe } from "./PenAndPaper-BF6RVx_0.js";
7
- import { D as Ye } from "./DataTable-CGMCHKzY.js";
8
- import We from "./vue-ui-accordion-C-v1kmEc.js";
2
+ import { u as Fe, o as Ie, e as me, g as Pe, c as De, d as Me, l as Re, i as E, f as G, X as Ve, G as Be, F as Y, a as Ue, q as Ee, r as Ge } from "./index-hMo72hAq.js";
3
+ import { u as be } from "./useNestedProp-DhEaBTgF.js";
4
+ import { u as je, U as He } from "./usePrinter-D2z-bUtX.js";
5
+ import { _ as Xe } from "./Title-DrVDm1wy.js";
6
+ import { _ as qe } from "./PenAndPaper-D4Uu-GqW.js";
7
+ import { D as Ye } from "./DataTable-CXbN2mJi.js";
8
+ import We from "./vue-ui-accordion-CHMdpjnX.js";
9
9
  import { t as Je, u as Ke } from "./useResponsive-Cw4oZ8sQ.js";
10
- import Qe from "./vue-ui-skeleton-CNP_4H8z.js";
10
+ import Qe from "./vue-ui-skeleton-C3t9bL6f.js";
11
11
  import { u as Ze } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { _ as et } from "./PackageVersion-DrU5ubC-.js";
12
+ import { _ as et } from "./PackageVersion-0Lu6RIig.js";
13
13
  import { u as tt } from "./useChartAccessibility-BWojgys7.js";
14
14
  import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const lt = ["id"], st = ["xmlns", "viewBox"], ot = ["width", "height"], nt = ["id"], rt = ["stop-color"], ut = ["stop-color"], it = ["stop-color"], ct = ["stroke", "stroke-width"], vt = ["stroke", "stroke-width"], dt = ["x", "y", "font-size", "fill", "font-weight"], ht = ["points", "fill"], ft = ["stroke", "stroke-width", "rx"], mt = ["x", "y", "font-size", "fill", "font-weight"], bt = ["x", "y", "font-size", "fill", "font-weight"], yt = {