vue-data-ui 2.11.0 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/{Arrow-BfdnOsct.cjs → Arrow-CogAJvGp.cjs} +1 -1
  2. package/dist/{Arrow-BSsIs5Aj.js → Arrow-OttzfahM.js} +1 -1
  3. package/dist/{BaseIcon-BPehVcsN.js → BaseIcon-CpIcYACc.js} +1 -1
  4. package/dist/{BaseIcon-dtfVrHa7.cjs → BaseIcon-DY-33nfj.cjs} +1 -1
  5. package/dist/{ColorPicker-ByaQGf5i.js → ColorPicker-BnsG9Qeu.js} +3 -3
  6. package/dist/{ColorPicker-C-nhrZ-J.cjs → ColorPicker-CrMLe8x_.cjs} +1 -1
  7. package/dist/{DataTable-BdekL1Hc.js → DataTable-CJOtzfgn.js} +2 -2
  8. package/dist/{DataTable-pT39kn0W.cjs → DataTable-CNCnRrD-.cjs} +1 -1
  9. package/dist/{Legend-HckkoJBL.js → Legend-DKQ4psNY.js} +2 -2
  10. package/dist/{Legend-C8PTNFsH.cjs → Legend-ieOu_fKK.cjs} +1 -1
  11. package/dist/{PackageVersion-B6nxekEz.cjs → PackageVersion-BxSGdh6L.cjs} +1 -1
  12. package/dist/{PackageVersion-BPCzY_N5.js → PackageVersion-D-aPPO0L.js} +1 -1
  13. package/dist/{PenAndPaper-BC1d2zL5.cjs → PenAndPaper-ByAFuR-l.cjs} +1 -1
  14. package/dist/{PenAndPaper-B3KDT2of.js → PenAndPaper-D9g_r8-6.js} +3 -3
  15. package/dist/{Shape-Cr-Qt6IO.cjs → Shape-BQIcurpe.cjs} +1 -1
  16. package/dist/{Shape-B0OqBXWl.js → Shape-DLjaeo5U.js} +1 -1
  17. package/dist/{Slicer-BXBqgQau.js → Slicer-DuqI_UVS.js} +2 -2
  18. package/dist/{Slicer-BWr1nt8v.cjs → Slicer-FXxFjXOP.cjs} +1 -1
  19. package/dist/{Title-GpO-QNhg.cjs → Title-D62pPwLz.cjs} +1 -1
  20. package/dist/{Title-Cq5kGGhS.js → Title-DIYoufYR.js} +1 -1
  21. package/dist/{Tooltip-CxzDtoXn.js → Tooltip-BFz2yelJ.js} +1 -1
  22. package/dist/{Tooltip-eL97y6Ym.cjs → Tooltip-C_H6-uAa.cjs} +1 -1
  23. package/dist/{dom-to-png-BeN7LHfC.cjs → dom-to-png-B3SeX1JP.cjs} +1 -1
  24. package/dist/{dom-to-png-G_nLlvER.js → dom-to-png-BB-m1MuD.js} +1 -1
  25. package/dist/{img-08K-Su3g.cjs → img-Bl4Pt1QH.cjs} +1 -1
  26. package/dist/{img-BzMFujbd.js → img-Cyr1eIO7.js} +1 -1
  27. package/dist/{index-CG-euAJp.cjs → index-Cn2tUOoX.cjs} +1 -1
  28. package/dist/{index-BMcwUsiG.js → index-d3erwTWB.js} +1 -1
  29. package/dist/{pdf-achyloML.cjs → pdf-BQABl7QG.cjs} +1 -1
  30. package/dist/{pdf-BJNBeUWV.js → pdf-BQRTRQlZ.js} +1 -1
  31. package/dist/{useNestedProp-DwQWwt5e.js → useNestedProp-BqKuhIvF.js} +1 -1
  32. package/dist/{useNestedProp-DYDoE86w.cjs → useNestedProp-C8955nsn.cjs} +1 -1
  33. package/dist/{usePrinter-BBqldIVF.cjs → usePrinter-BrH80VBz.cjs} +1 -1
  34. package/dist/{usePrinter-BpCNa5RW.js → usePrinter-CHrKIDM7.js} +3 -3
  35. package/dist/{vue-data-ui-DXciuF6V.js → vue-data-ui-BRKcN5_z.js} +63 -63
  36. package/dist/{vue-data-ui-BTz28Upr.cjs → vue-data-ui-BbzW2_-6.cjs} +1 -1
  37. package/dist/vue-data-ui.cjs +1 -1
  38. package/dist/vue-data-ui.js +1 -1
  39. package/dist/{vue-ui-3d-bar-D-x0k_IG.js → vue-ui-3d-bar-BIw7nTYA.js} +9 -9
  40. package/dist/{vue-ui-3d-bar-Cv0XQSLU.cjs → vue-ui-3d-bar-WFymJ4EL.cjs} +1 -1
  41. package/dist/{vue-ui-accordion-dJGHfrMl.cjs → vue-ui-accordion-7GoAZx3k.cjs} +1 -1
  42. package/dist/{vue-ui-accordion-DKw3ZQgh.js → vue-ui-accordion-BJyaBDyF.js} +3 -3
  43. package/dist/{vue-ui-age-pyramid-DzQ9EYPB.cjs → vue-ui-age-pyramid-DGpLdvsL.cjs} +1 -1
  44. package/dist/{vue-ui-age-pyramid-BKOh2L3c.js → vue-ui-age-pyramid-Dn_061NF.js} +10 -10
  45. package/dist/{vue-ui-annotator-BSGf2Uh1.js → vue-ui-annotator-Y65oZVga.js} +2 -2
  46. package/dist/{vue-ui-annotator-DJDY5xOf.cjs → vue-ui-annotator-ypStRKCB.cjs} +1 -1
  47. package/dist/{vue-ui-bullet-CJLZA5Lf.js → vue-ui-bullet-B5mjXy0q.js} +8 -8
  48. package/dist/{vue-ui-bullet-BHaeMobd.cjs → vue-ui-bullet-C_Ppz5nn.cjs} +1 -1
  49. package/dist/{vue-ui-candlestick-BLqrtK2S.js → vue-ui-candlestick-BIC2-GAV.js} +11 -11
  50. package/dist/{vue-ui-candlestick-D5aSctEq.cjs → vue-ui-candlestick-BrDk_pc_.cjs} +1 -1
  51. package/dist/{vue-ui-carousel-table-DoQSiBlh.cjs → vue-ui-carousel-table-BTxtBHvb.cjs} +1 -1
  52. package/dist/{vue-ui-carousel-table-CvDic9rq.js → vue-ui-carousel-table-CnvQ0CeQ.js} +4 -4
  53. package/dist/{vue-ui-chestnut-BW9_1uRo.cjs → vue-ui-chestnut-D_NZDyDN.cjs} +1 -1
  54. package/dist/{vue-ui-chestnut-Co3ZtHYQ.js → vue-ui-chestnut-IsRTDol2.js} +8 -8
  55. package/dist/{vue-ui-chord-CUREQYhU.cjs → vue-ui-chord-CZ66gJ7w.cjs} +1 -1
  56. package/dist/{vue-ui-chord-XU2pSfEx.js → vue-ui-chord-iSsr3a59.js} +12 -12
  57. package/dist/{vue-ui-circle-pack-DpbWAZFC.js → vue-ui-circle-pack-CS2l9IXg.js} +9 -9
  58. package/dist/{vue-ui-circle-pack-Bdtr6z4Z.cjs → vue-ui-circle-pack-lGkj98rL.cjs} +1 -1
  59. package/dist/{vue-ui-cursor-CuvyoiLa.js → vue-ui-cursor-Cq9lPDB7.js} +2 -2
  60. package/dist/{vue-ui-cursor-BAMt5dcz.cjs → vue-ui-cursor-YZyc0ARl.cjs} +1 -1
  61. package/dist/{vue-ui-dashboard-_LJuvqRE.js → vue-ui-dashboard-7Cm-15oc.js} +62 -62
  62. package/dist/{vue-ui-dashboard-Bvrpw4EQ.cjs → vue-ui-dashboard-jP2U4qtK.cjs} +1 -1
  63. package/dist/{vue-ui-digits-CeLZoNoA.js → vue-ui-digits-BecNI-j7.js} +2 -2
  64. package/dist/{vue-ui-digits-CGzSArOS.cjs → vue-ui-digits-C5PfeED6.cjs} +1 -1
  65. package/dist/{vue-ui-donut-BV_QLVp2.cjs → vue-ui-donut-BM9i2XHJ.cjs} +1 -1
  66. package/dist/{vue-ui-donut-BegwljuG.js → vue-ui-donut-D_bFxovZ.js} +12 -12
  67. package/dist/{vue-ui-donut-evolution-CQ-1_Xak.js → vue-ui-donut-evolution-C8dlmVur.js} +11 -11
  68. package/dist/{vue-ui-donut-evolution-euIDGiH3.cjs → vue-ui-donut-evolution-Oga32kTV.cjs} +1 -1
  69. package/dist/{vue-ui-dumbbell-BO0h5wGp.cjs → vue-ui-dumbbell-ClzXgan7.cjs} +1 -1
  70. package/dist/{vue-ui-dumbbell-CPylAaR8.js → vue-ui-dumbbell-Ds41wAQh.js} +10 -10
  71. package/dist/{vue-ui-flow-DWiA9yFS.cjs → vue-ui-flow-Bp1oqzTj.cjs} +1 -1
  72. package/dist/{vue-ui-flow-B8fyDK8A.js → vue-ui-flow-CqdSvk4_.js} +11 -11
  73. package/dist/{vue-ui-funnel-BAa1OwMy.js → vue-ui-funnel-CNDgAWjp.js} +9 -9
  74. package/dist/{vue-ui-funnel-yRS_OJcF.cjs → vue-ui-funnel-y3hN7BGU.cjs} +1 -1
  75. package/dist/{vue-ui-galaxy-DF41DbY7.cjs → vue-ui-galaxy-D5vKPiFH.cjs} +1 -1
  76. package/dist/{vue-ui-galaxy-DEZ-rfXE.js → vue-ui-galaxy-DzUAHZ4G.js} +11 -11
  77. package/dist/{vue-ui-gauge-CCGMpnvM.cjs → vue-ui-gauge-57ahTSbZ.cjs} +1 -1
  78. package/dist/{vue-ui-gauge-k3ejBVZj.js → vue-ui-gauge-Cj-4ZhyL.js} +7 -7
  79. package/dist/{vue-ui-gizmo-uSaL0tgk.js → vue-ui-gizmo-CCS3u0qr.js} +3 -3
  80. package/dist/{vue-ui-gizmo-DGRDcoNW.cjs → vue-ui-gizmo-D5_kCO9e.cjs} +1 -1
  81. package/dist/{vue-ui-heatmap-dKn60iwF.cjs → vue-ui-heatmap-B8sfOhVF.cjs} +1 -1
  82. package/dist/{vue-ui-heatmap-WgeuA6rb.js → vue-ui-heatmap-CBRd8kvj.js} +10 -10
  83. package/dist/{vue-ui-history-plot-jBlXPR4I.js → vue-ui-history-plot-4XT22zB_.js} +11 -11
  84. package/dist/{vue-ui-history-plot-Dnb4txKX.cjs → vue-ui-history-plot-DQVpKlp1.cjs} +1 -1
  85. package/dist/{vue-ui-kpi-N3ugHMNs.js → vue-ui-kpi-B-lBgRvZ.js} +3 -3
  86. package/dist/{vue-ui-kpi-C13Zgi4k.cjs → vue-ui-kpi-DjI1yXtc.cjs} +1 -1
  87. package/dist/{vue-ui-mini-loader-BnblpH8s.cjs → vue-ui-mini-loader-BpAnNEHG.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-BukHpIuC.js → vue-ui-mini-loader-_ksyazrb.js} +2 -2
  89. package/dist/{vue-ui-molecule-zkjb68lX.cjs → vue-ui-molecule-BqpYPmrd.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-DQADG59C.js → vue-ui-molecule-Db_QmLY6.js} +11 -11
  91. package/dist/{vue-ui-mood-radar-oO1NjJsj.cjs → vue-ui-mood-radar-DI_FioVr.cjs} +1 -1
  92. package/dist/{vue-ui-mood-radar-BdpZWnM1.js → vue-ui-mood-radar-Y_CGEC1L.js} +11 -11
  93. package/dist/{vue-ui-nested-donuts-8PBCRUKI.cjs → vue-ui-nested-donuts-B0rJlEH0.cjs} +1 -1
  94. package/dist/{vue-ui-nested-donuts-6EYydl-l.js → vue-ui-nested-donuts-DosW9Sfg.js} +11 -11
  95. package/dist/{vue-ui-onion-D0Y-pJox.cjs → vue-ui-onion-CEHc9oKt.cjs} +1 -1
  96. package/dist/{vue-ui-onion-Dqfii-y3.js → vue-ui-onion-CQwIVcfN.js} +11 -11
  97. package/dist/{vue-ui-parallel-coordinate-plot-cETB0SSp.cjs → vue-ui-parallel-coordinate-plot-C1sxm3Nr.cjs} +1 -1
  98. package/dist/{vue-ui-parallel-coordinate-plot-yUVuNHbG.js → vue-ui-parallel-coordinate-plot-Cdu0SvMZ.js} +12 -12
  99. package/dist/{vue-ui-quadrant-Bk24QzXW.js → vue-ui-quadrant-B8H5sBMi.js} +12 -12
  100. package/dist/{vue-ui-quadrant-C2Z9igq-.cjs → vue-ui-quadrant-DM3Afg_i.cjs} +1 -1
  101. package/dist/{vue-ui-quick-chart-BTBzFVVt.js → vue-ui-quick-chart-ClB6jwSV.js} +9 -9
  102. package/dist/{vue-ui-quick-chart-BNYO7nMz.cjs → vue-ui-quick-chart-ClJi48bc.cjs} +1 -1
  103. package/dist/{vue-ui-radar-d5WGxBWb.js → vue-ui-radar-BTluZs04.js} +12 -12
  104. package/dist/{vue-ui-radar-DpJ6BjWE.cjs → vue-ui-radar-f0QY_Mal.cjs} +1 -1
  105. package/dist/{vue-ui-rating-DlpuX8_4.cjs → vue-ui-rating-B71_TxmN.cjs} +1 -1
  106. package/dist/{vue-ui-rating-DHP9cn7v.js → vue-ui-rating-CTNYeoXO.js} +2 -2
  107. package/dist/{vue-ui-relation-circle-DFFnj0G-.js → vue-ui-relation-circle-CdHhoGcO.js} +7 -7
  108. package/dist/{vue-ui-relation-circle-C9r2L_By.cjs → vue-ui-relation-circle-DHOG2jKh.cjs} +1 -1
  109. package/dist/{vue-ui-ridgeline-CWcW0CKH.cjs → vue-ui-ridgeline-CxhklaLX.cjs} +1 -1
  110. package/dist/{vue-ui-ridgeline-B6SmiN8e.js → vue-ui-ridgeline-Dr6UOfwb.js} +12 -12
  111. package/dist/{vue-ui-rings-BZ6huPcE.cjs → vue-ui-rings-DoGxh2qe.cjs} +1 -1
  112. package/dist/{vue-ui-rings-07YzKS3V.js → vue-ui-rings-N2mHKtLh.js} +12 -12
  113. package/dist/{vue-ui-scatter-DZZtUBuf.js → vue-ui-scatter-BcJRyqbE.js} +12 -12
  114. package/dist/{vue-ui-scatter-DYRw6p9i.cjs → vue-ui-scatter-BnRkkP5Z.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-BoZyBfQF.js → vue-ui-skeleton-BOtCpAcY.js} +3 -3
  116. package/dist/{vue-ui-skeleton-LYOlEoA_.cjs → vue-ui-skeleton-Mcoev-5q.cjs} +1 -1
  117. package/dist/{vue-ui-smiley-D3A8OqM8.js → vue-ui-smiley-BPqpTUTh.js} +2 -2
  118. package/dist/{vue-ui-smiley-C9Au0iXl.cjs → vue-ui-smiley-Ch9trBZA.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-BfR_RtZy.js → vue-ui-spark-trend-BXo8mbxJ.js} +5 -5
  120. package/dist/{vue-ui-spark-trend-DnoxMeF3.cjs → vue-ui-spark-trend-PqEN-rL8.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-CJUkmhnj.js → vue-ui-sparkbar-DEsL52nJ.js} +4 -4
  122. package/dist/{vue-ui-sparkbar-CAHDM61K.cjs → vue-ui-sparkbar-DnRQFo63.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-DngkG6ub.cjs → vue-ui-sparkgauge-C0E5Sojk.cjs} +1 -1
  124. package/dist/{vue-ui-sparkgauge-CXt_UXa0.js → vue-ui-sparkgauge-DkawMq8d.js} +4 -4
  125. package/dist/{vue-ui-sparkhistogram-BGSXZdYJ.cjs → vue-ui-sparkhistogram-Bqtsbb3w.cjs} +1 -1
  126. package/dist/{vue-ui-sparkhistogram-e1KLP3lx.js → vue-ui-sparkhistogram-D8ZCXl7m.js} +5 -5
  127. package/dist/{vue-ui-sparkline-4HHF_g27.cjs → vue-ui-sparkline-BTruGe7A.cjs} +1 -1
  128. package/dist/{vue-ui-sparkline-C1c0gnoE.js → vue-ui-sparkline-D8LYPXpr.js} +4 -4
  129. package/dist/{vue-ui-sparkstackbar-CYI8Q-A7.cjs → vue-ui-sparkstackbar-DeXUgBIH.cjs} +1 -1
  130. package/dist/{vue-ui-sparkstackbar-WWHBMDoc.js → vue-ui-sparkstackbar-DzeVCG0H.js} +5 -5
  131. package/dist/{vue-ui-stackbar-LROMB081.cjs → vue-ui-stackbar-CaFp42Tn.cjs} +1 -1
  132. package/dist/{vue-ui-stackbar-Dswh_YhD.js → vue-ui-stackbar-DQ9CcKUd.js} +13 -13
  133. package/dist/{vue-ui-strip-plot-CkTMHioN.js → vue-ui-strip-plot-C6gcQLMI.js} +11 -11
  134. package/dist/{vue-ui-strip-plot-BHLCEMtE.cjs → vue-ui-strip-plot-DzNU6VRW.cjs} +1 -1
  135. package/dist/{vue-ui-table-BQLFbWJu.js → vue-ui-table-D7azsjo3.js} +3 -3
  136. package/dist/{vue-ui-table-ClPvrWk1.cjs → vue-ui-table-DP2ZaGWa.cjs} +1 -1
  137. package/dist/{vue-ui-table-heatmap-CzXQ_Jyj.cjs → vue-ui-table-heatmap-B2gZkAqm.cjs} +1 -1
  138. package/dist/{vue-ui-table-heatmap-Cq0Ayqw9.js → vue-ui-table-heatmap-DINNMAyX.js} +4 -4
  139. package/dist/{vue-ui-table-sparkline-kApN7-VK.js → vue-ui-table-sparkline-BrYh6fVq.js} +5 -5
  140. package/dist/{vue-ui-table-sparkline-CrWRDJhv.cjs → vue-ui-table-sparkline-CgN2nMYT.cjs} +1 -1
  141. package/dist/{vue-ui-thermometer-DYo8ZTAM.cjs → vue-ui-thermometer-DgZfQbR2.cjs} +1 -1
  142. package/dist/{vue-ui-thermometer-BqtB3WF_.js → vue-ui-thermometer-J0A6MZy_.js} +7 -7
  143. package/dist/{vue-ui-timer-DcHNiJK0.js → vue-ui-timer-CI8zPXh3.js} +5 -5
  144. package/dist/{vue-ui-timer-DprIzsAY.cjs → vue-ui-timer-ClM5FpoU.cjs} +1 -1
  145. package/dist/{vue-ui-tiremarks-Dpn0SavO.cjs → vue-ui-tiremarks-19Krsd1f.cjs} +1 -1
  146. package/dist/{vue-ui-tiremarks-fEn67LmT.js → vue-ui-tiremarks-BuNik_Pf.js} +7 -7
  147. package/dist/{vue-ui-treemap-C8uX5Ilw.cjs → vue-ui-treemap-DvmJ1MOU.cjs} +1 -1
  148. package/dist/{vue-ui-treemap-Cq5QKrAX.js → vue-ui-treemap-oUtdOGWu.js} +12 -12
  149. package/dist/{vue-ui-vertical-bar-BctpxL75.js → vue-ui-vertical-bar-2bHPN2lr.js} +12 -12
  150. package/dist/{vue-ui-vertical-bar-Bj-tNmvd.cjs → vue-ui-vertical-bar-RT-SM-us.cjs} +1 -1
  151. package/dist/{vue-ui-waffle-B3XGM76l.cjs → vue-ui-waffle-BSKRUJbJ.cjs} +1 -1
  152. package/dist/{vue-ui-waffle-inmP6xJa.js → vue-ui-waffle-BuISvHw-.js} +12 -12
  153. package/dist/{vue-ui-wheel-BExyiteC.js → vue-ui-wheel-CSy7_x22.js} +7 -7
  154. package/dist/{vue-ui-wheel-D4quM69U.cjs → vue-ui-wheel-DfBVkT9x.cjs} +1 -1
  155. package/dist/{vue-ui-word-cloud-D3O3LDR0.cjs → vue-ui-word-cloud-BlfCmzD-.cjs} +1 -1
  156. package/dist/{vue-ui-word-cloud-CO6OX7uL.js → vue-ui-word-cloud-DEpoSRMP.js} +10 -10
  157. package/dist/vue-ui-world-Cy1VBlK3.js +931 -0
  158. package/dist/vue-ui-world-EgFhVXSY.cjs +19 -0
  159. package/dist/{vue-ui-xy-BLnXnpd-.js → vue-ui-xy-PaM6vcjk.js} +16 -16
  160. package/dist/{vue-ui-xy-CnLejNy1.cjs → vue-ui-xy-aQEDcKbT.cjs} +2 -2
  161. package/dist/{vue-ui-xy-canvas-t3XI0Z_d.cjs → vue-ui-xy-canvas-C6-sYgU_.cjs} +1 -1
  162. package/dist/{vue-ui-xy-canvas-2hhjtxZN.js → vue-ui-xy-canvas-CSyX_xLO.js} +12 -12
  163. package/package.json +1 -1
  164. package/dist/vue-ui-world-BWv7KvDY.cjs +0 -19
  165. package/dist/vue-ui-world-j_aAVyB8.js +0 -1112
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CG-euAJp.cjs"),Q=require("./useResponsive-BBkmXXaa.cjs"),de=require("./Title-GpO-QNhg.cjs"),ee=require("./usePrinter-BBqldIVF.cjs"),ve=require("./DataTable-pT39kn0W.cjs"),he=require("./vue-ui-skeleton-LYOlEoA_.cjs"),ye=require("./Legend-C8PTNFsH.cjs"),fe=require("./vue-ui-accordion-dJGHfrMl.cjs"),te=require("./useNestedProp-DYDoE86w.cjs"),me=require("./PackageVersion-B6nxekEz.cjs"),be=require("./PenAndPaper-BC1d2zL5.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-Cn2tUOoX.cjs"),Q=require("./useResponsive-BBkmXXaa.cjs"),de=require("./Title-D62pPwLz.cjs"),ee=require("./usePrinter-BrH80VBz.cjs"),ve=require("./DataTable-CNCnRrD-.cjs"),he=require("./vue-ui-skeleton-Mcoev-5q.cjs"),ye=require("./Legend-ieOu_fKK.cjs"),fe=require("./vue-ui-accordion-7GoAZx3k.cjs"),te=require("./useNestedProp-C8955nsn.cjs"),me=require("./PackageVersion-BxSGdh6L.cjs"),be=require("./PenAndPaper-ByAFuR-l.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,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-BMcwUsiG.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-d3erwTWB.js";
3
3
  import { t as Be, u as je } from "./useResponsive-JZ9xq-JV.js";
4
- import { _ as qe } from "./Title-Cq5kGGhS.js";
5
- import { u as Ye, U as Ze } from "./usePrinter-BpCNa5RW.js";
6
- import { D as Je } from "./DataTable-BdekL1Hc.js";
7
- import Ke from "./vue-ui-skeleton-BoZyBfQF.js";
8
- import { L as Qe } from "./Legend-HckkoJBL.js";
9
- import et from "./vue-ui-accordion-DKw3ZQgh.js";
10
- import { u as $e } from "./useNestedProp-DwQWwt5e.js";
11
- import { _ as tt } from "./PackageVersion-BPCzY_N5.js";
12
- import { _ as lt } from "./PenAndPaper-B3KDT2of.js";
4
+ import { _ as qe } from "./Title-DIYoufYR.js";
5
+ import { u as Ye, U as Ze } from "./usePrinter-CHrKIDM7.js";
6
+ import { D as Je } from "./DataTable-CJOtzfgn.js";
7
+ import Ke from "./vue-ui-skeleton-BOtCpAcY.js";
8
+ import { L as Qe } from "./Legend-DKQ4psNY.js";
9
+ import et from "./vue-ui-accordion-BJyaBDyF.js";
10
+ import { u as $e } from "./useNestedProp-BqKuhIvF.js";
11
+ import { _ as tt } from "./PackageVersion-D-aPPO0L.js";
12
+ import { _ as lt } from "./PenAndPaper-D9g_r8-6.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,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CG-euAJp.cjs"),Le=require("./Title-GpO-QNhg.cjs"),ge=require("./usePrinter-BBqldIVF.cjs"),ze=require("./DataTable-pT39kn0W.cjs"),Fe=require("./vue-ui-accordion-dJGHfrMl.cjs"),Ve=require("./vue-ui-skeleton-LYOlEoA_.cjs"),me=require("./useNestedProp-DYDoE86w.cjs"),Ae=require("./PackageVersion-B6nxekEz.cjs"),Ie=require("./PenAndPaper-BC1d2zL5.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),De=require("./useChartAccessibility-Cm7nkzTG.cjs"),He=require("./Tooltip-eL97y6Ym.cjs"),qe=require("./Legend-C8PTNFsH.cjs"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},je={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ge=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Je=["stop-color"],Ke=["d","fill","stroke","stroke-width"],Qe=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],et=["x","y","font-size","fill"],tt=["x","y","font-size","fill"],ot={key:4,class:"vue-data-ui-watermark"},lt=["onClick"],at={key:6,ref:"source",dir:"auto"},nt=["innerHTML"],rt={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ye,{expose:be}){const{vue_ui_flow:ke}=n.useConfig(),y=ye,V=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{G()});function G(){n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiFlow",type:"dataset"})}const A=e.ref(n.createUid()),I=e.ref(null),W=e.ref(0),X=e.ref(0),M=e.ref(!1),D=e.ref(""),Ce=e.ref(null),S=e.ref(!1);function we(o){S.value=o,W.value+=1}const t=e.computed({get:()=>Q(),set:o=>o}),{userOptionsVisible:H,setUserOptionsVisibility:Z,keepUserOptionState:J}=Me.useUserOptionState({config:t.value}),{svgRef:K}=De.useChartAccessibility({config:t.value.style.chart.title});function Q(){const o=me.useNestedProp({userConfig:y.config,defaultConfig:ke});let a=o;return o.theme?a={...me.useNestedProp({userConfig:n.themes.vue_ui_flow[o.theme]||y.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:a=o,a.nodeCategories=y.config.nodeCategories||{},a.nodeCategoryColors=y.config.nodeCategoryColors||{},a}e.watch(()=>y.config,o=>{t.value=Q(),H.value=!t.value.userOptions.showOnChartHover,G(),X.value+=1,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:oe,generateImage:le}=ge.usePrinter({elementId:`flow_${A.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow",options:t.value.userOptions.print}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ae=e.computed(()=>t.value.style.chart.nodes.gap),T=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$e=e.computed(()=>t.value.style.chart.links.width),q=e.computed(()=>!y.dataset||!y.dataset.length?[]:y.dataset.map((o,a)=>[o[0],o[1],n.checkNaN(o[2]),o[3]?n.convertColorToHex(o[3]):P.value[a]||P.value[a%P.value.length]||n.palette[a]||n.palette[a%n.palette.length]])),ne=e.computed(()=>{const o={};function a(r){o[r]||(o[r]={inflow:0,outflow:0})}q.value.forEach(([r,u,h])=>{a(r),a(u),o[r].outflow+=h,o[u].inflow+=h});let l=0;for(const r in o){const u=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,u)}return l});function xe(o){return o/ne.value*100+t.value.style.chart.nodes.minHeight}function Se(o){const a=t.value.style.chart.nodes.minHeight;return(o-a)/100*ne.value}function Te(o){const a={},l={};function r(s,c){a[s]||(a[s]={height:0,level:null,inflow:0,outflow:0,uid:n.createUid()}),a[s].level===null&&(a[s].level=c),l[c]||(l[c]=[]),l[c].includes(s)||l[c].push(s)}o.forEach(([s,c,d])=>{var i;const v=((i=a[s])==null?void 0:i.level)??0,p=v+1;r(s,v),r(c,p),a[s].children||(a[s].children=[]),a[s].children.push({target:c,value:d}),a[s].outflow+=d,a[c].inflow+=d});const u=new Set(o.map(([s])=>s)),h=new Set(o.map(([,s])=>s)),w=Array.from(u).filter(s=>!h.has(s)),_={};w.forEach((s,c)=>{_[s]=P.value[c]||n.palette[c%n.palette.length]});const b={};o.forEach(([s,c,d,v])=>{v&&(b[s]=v,b[c]=v)}),Object.keys(a).forEach((s,c)=>{var p,i;const d=(p=t.value.nodeCategories)==null?void 0:p[s],v=d?(i=t.value.nodeCategoryColors)==null?void 0:i[d]:null;a[s].color=b[s]||v||(w.includes(s)?_[s]:null)||n.palette[c%n.palette.length]});for(const s in a)a[s].height=xe(Math.max(a[s].inflow,a[s].outflow)),a[s].name=s;const C={};for(const s in l){let c=0;l[s].forEach((d,v)=>{const p=a[d];C[d]={x:parseInt(s,10)*$e.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p.height,i:v,color:p.color,value:Se(p.height)},c+=p.height+ae.value})}const x=[];for(const s of Object.keys(a)){let c=C[s].absoluteY+t.value.style.chart.padding.top;const d=a[s],v=C[s];d.children&&d.children.forEach(({target:p,value:i})=>{const f=C[p],N=a[p],F=n.checkNaN(c),he=n.checkNaN(c+i/d.outflow*v.height),j=n.checkNaN(f.y+t.value.style.chart.padding.top),pe=n.checkNaN(j+i/N.inflow*f.height);x.push({id:n.createUid(),source:s,target:p,path:`M ${n.checkNaN(v.x+T.value)} ${F} L ${n.checkNaN(v.x+T.value)} ${he} L ${n.checkNaN(f.x)} ${pe} L ${n.checkNaN(f.x)} ${j} Z`,value:i,sourceColor:d.color,targetColor:N.color}),c+=he-F,C[p].y+=pe-j})}return{nodeCoordinates:C,links:x}}const g=e.computed(()=>{const o=Te(y.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((a,l)=>({...o.nodeCoordinates[a],name:a})),links:o.links}});e.computed(()=>Be(g.value.nodes));function Be(o){const a={};for(const r in o){const{x:u,height:h}=o[r];a[u]||(a[u]=0),a[u]+=h+ae.value}return Math.max(...Object.values(a))}const E=e.computed(()=>{const{top:o,right:a,bottom:l,left:r}=t.value.style.chart.padding,u=Math.max(...g.value.nodes.map(b=>b.x)),h=r+u+T.value+a,w=Math.max(...g.value.nodes.map(b=>b.absoluteY+b.height)),_=o+w+l;return{width:h,height:_}});function _e(o){const a={},l={},r=new Set;return q.value.forEach(([u,h,w])=>{a[u]||(a[u]=[]),l[h]||(l[h]=[]),a[u].push(h),l[h].push(u)}),a[o]&&a[o].forEach(u=>r.add(u)),l[o]&&l[o].forEach(u=>r.add(u)),Array.from(r).concat(o)}const m=e.ref(null),B=e.ref(null),R=e.ref(null),O=e.ref(!1);function Ee(o){$.value=[],m.value=_e(o.name),B.value=o.name;const a=o.name,l=q.value;let r=0,u=0,h=[],w=[];const _=new Set(l.map(([i])=>i)),b=new Set(l.map(([,i])=>i)),fe=Array.from(_).filter(i=>!b.has(i)),C=l.filter(([i])=>fe.includes(i)).reduce((i,[f,N,F])=>i+F,0),x={};g.value.nodes.forEach(i=>{x[i.name]=i.color}),l.forEach(([i,f,N])=>{f===a&&(r+=N,h.push({source:i,value:N,color:x[i]})),i===a&&(u+=N,w.push({target:f,value:N,color:x[f]}))});const s=Math.max(r,u),c=C>0?s/C*100:0,d={name:a,inflow:r,outflow:u,from:h,to:w,percentOfTotal:c,color:x[a]||"#000000"};R.value={datapoint:d},M.value=!0;let v="";const p=t.value.style.chart.tooltip.customFormat;if(O.value=!1,n.isFunction(p))try{const i=p({datapoint:d,series:g.value,config:t.value});typeof i=="string"&&(D.value=i,O.value=!0)}catch{console.warn("Custom format cannot be applied.")}if(!O.value){const i=t.value.style.chart.tooltip.showPercentage?`<div>${n.dataLabel({p:t.value.style.chart.tooltip.translations.percentOfTotal,v:d.percentOfTotal,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</div>`:"";v+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${d.color}">⏹</span>${d.name}${i}</div>`,d.from.length&&(v+=`<div>${t.value.style.chart.tooltip.translations.from}</div>`,d.from.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹←</span> ${f.source}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),d.to.length&&(v+=`<div style="margin-top:6px;">${t.value.style.chart.tooltip.translations.to}</div>`,d.to.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹→</span> ${f.target}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),D.value=v}}function re(){m.value=null,B.value=null,M.value=!1}const se=e.computed(()=>g.value.links.map(({source:o,target:a,sourceColor:l,targetColor:r,value:u})=>({source:o,target:a,sourceColor:l,targetColor:r,value:u})));function ue(){e.nextTick(()=>{const o=se.value.map((r,u)=>[[r.source],[r.target],[r.value]]),a=[[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=n.createCsvContent(a);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const L=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],a=se.value.map((u,h)=>[{color:u.sourceColor,name:u.source},{color:u.targetColor,name:u.target},n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:u.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:a,config:l}});function Pe(){return g.value}function ie(){k.value.showTable=!k.value.showTable}const z=e.ref(!1);function Y(){z.value=!z.value}function ce(){k.value.showTooltip=!k.value.showTooltip}const de=e.computed(()=>{const o=new Set(g.value.nodes.map(a=>t.value.nodeCategories[a.name]||"__uncategorized__"));return Array.from(o).map(a=>({name:a,color:t.value.nodeCategoryColors[a]||n.palette[0],shape:"square",count:g.value.nodes.filter(l=>(t.value.nodeCategories[l.name]||"__uncategorized__")===a).length})).map((a,l)=>({...a,segregate:()=>U({legend:a,i:l}),opacity:$.value.length?$.value.includes(l)?1:.5:1}))}),ve=e.computed(()=>de.value.filter(o=>o.name!=="__uncategorized__")),$=e.ref([]);function U({legend:o,i:a}){var r;const l=o.name;if((r=m.value)!=null&&r.every(u=>t.value.nodeCategories[u]===l)){m.value=null,B.value=null,$.value=[];return}$.value=[a],m.value=g.value.nodes.filter(u=>t.value.nodeCategories[u.name]===l).map(u=>u.name),B.value=null}const Oe=e.computed(()=>({cy:"flow-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:t.value.style.chart.legend.paddingBottom,fontWeight:t.value.style.chart.legend.bold?"bold":"normal"}));return be({getData:Pe,generateCsv:ue,generateImage:le,generatePdf:oe,toggleTable:ie,toggleAnnotator:Y,toggleTooltip:ce,drillCategory:U,unselectNode:re}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:I,class:e.normalizeClass(`vue-ui-flow ${S.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_${A.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(Z)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(Z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:Y},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",Ue,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",je,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${X.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&&V.value&&(e.unref(J)||e.unref(H))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref:"details",key:`user_option_${W.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:A.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:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:k.value.showTooltip,onToggleTooltip:ce,onToggleFullscreen:we,onGeneratePdf:e.unref(oe),onGenerateCsv:ue,onGenerateImage:e.unref(le),onToggleTable:ie,onToggleAnnotator:Y,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(H)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","hasTooltip","isTooltip","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgRef",ref:K,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:E.value.width,height:E.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.links,(l,r)=>(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,Je)],8,Xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cn2tUOoX.cjs"),Le=require("./Title-D62pPwLz.cjs"),ge=require("./usePrinter-BrH80VBz.cjs"),ze=require("./DataTable-CNCnRrD-.cjs"),Fe=require("./vue-ui-accordion-7GoAZx3k.cjs"),Ve=require("./vue-ui-skeleton-Mcoev-5q.cjs"),me=require("./useNestedProp-C8955nsn.cjs"),Ae=require("./PackageVersion-BxSGdh6L.cjs"),Ie=require("./PenAndPaper-ByAFuR-l.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),De=require("./useChartAccessibility-Cm7nkzTG.cjs"),He=require("./Tooltip-C_H6-uAa.cjs"),qe=require("./Legend-ieOu_fKK.cjs"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},je={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ge=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Je=["stop-color"],Ke=["d","fill","stroke","stroke-width"],Qe=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],et=["x","y","font-size","fill"],tt=["x","y","font-size","fill"],ot={key:4,class:"vue-data-ui-watermark"},lt=["onClick"],at={key:6,ref:"source",dir:"auto"},nt=["innerHTML"],rt={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ye,{expose:be}){const{vue_ui_flow:ke}=n.useConfig(),y=ye,V=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{G()});function G(){n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiFlow",type:"dataset"})}const A=e.ref(n.createUid()),I=e.ref(null),W=e.ref(0),X=e.ref(0),M=e.ref(!1),D=e.ref(""),Ce=e.ref(null),S=e.ref(!1);function we(o){S.value=o,W.value+=1}const t=e.computed({get:()=>Q(),set:o=>o}),{userOptionsVisible:H,setUserOptionsVisibility:Z,keepUserOptionState:J}=Me.useUserOptionState({config:t.value}),{svgRef:K}=De.useChartAccessibility({config:t.value.style.chart.title});function Q(){const o=me.useNestedProp({userConfig:y.config,defaultConfig:ke});let a=o;return o.theme?a={...me.useNestedProp({userConfig:n.themes.vue_ui_flow[o.theme]||y.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:a=o,a.nodeCategories=y.config.nodeCategories||{},a.nodeCategoryColors=y.config.nodeCategoryColors||{},a}e.watch(()=>y.config,o=>{t.value=Q(),H.value=!t.value.userOptions.showOnChartHover,G(),X.value+=1,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:oe,generateImage:le}=ge.usePrinter({elementId:`flow_${A.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow",options:t.value.userOptions.print}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ae=e.computed(()=>t.value.style.chart.nodes.gap),T=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$e=e.computed(()=>t.value.style.chart.links.width),q=e.computed(()=>!y.dataset||!y.dataset.length?[]:y.dataset.map((o,a)=>[o[0],o[1],n.checkNaN(o[2]),o[3]?n.convertColorToHex(o[3]):P.value[a]||P.value[a%P.value.length]||n.palette[a]||n.palette[a%n.palette.length]])),ne=e.computed(()=>{const o={};function a(r){o[r]||(o[r]={inflow:0,outflow:0})}q.value.forEach(([r,u,h])=>{a(r),a(u),o[r].outflow+=h,o[u].inflow+=h});let l=0;for(const r in o){const u=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,u)}return l});function xe(o){return o/ne.value*100+t.value.style.chart.nodes.minHeight}function Se(o){const a=t.value.style.chart.nodes.minHeight;return(o-a)/100*ne.value}function Te(o){const a={},l={};function r(s,c){a[s]||(a[s]={height:0,level:null,inflow:0,outflow:0,uid:n.createUid()}),a[s].level===null&&(a[s].level=c),l[c]||(l[c]=[]),l[c].includes(s)||l[c].push(s)}o.forEach(([s,c,d])=>{var i;const v=((i=a[s])==null?void 0:i.level)??0,p=v+1;r(s,v),r(c,p),a[s].children||(a[s].children=[]),a[s].children.push({target:c,value:d}),a[s].outflow+=d,a[c].inflow+=d});const u=new Set(o.map(([s])=>s)),h=new Set(o.map(([,s])=>s)),w=Array.from(u).filter(s=>!h.has(s)),_={};w.forEach((s,c)=>{_[s]=P.value[c]||n.palette[c%n.palette.length]});const b={};o.forEach(([s,c,d,v])=>{v&&(b[s]=v,b[c]=v)}),Object.keys(a).forEach((s,c)=>{var p,i;const d=(p=t.value.nodeCategories)==null?void 0:p[s],v=d?(i=t.value.nodeCategoryColors)==null?void 0:i[d]:null;a[s].color=b[s]||v||(w.includes(s)?_[s]:null)||n.palette[c%n.palette.length]});for(const s in a)a[s].height=xe(Math.max(a[s].inflow,a[s].outflow)),a[s].name=s;const C={};for(const s in l){let c=0;l[s].forEach((d,v)=>{const p=a[d];C[d]={x:parseInt(s,10)*$e.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p.height,i:v,color:p.color,value:Se(p.height)},c+=p.height+ae.value})}const x=[];for(const s of Object.keys(a)){let c=C[s].absoluteY+t.value.style.chart.padding.top;const d=a[s],v=C[s];d.children&&d.children.forEach(({target:p,value:i})=>{const f=C[p],N=a[p],F=n.checkNaN(c),he=n.checkNaN(c+i/d.outflow*v.height),j=n.checkNaN(f.y+t.value.style.chart.padding.top),pe=n.checkNaN(j+i/N.inflow*f.height);x.push({id:n.createUid(),source:s,target:p,path:`M ${n.checkNaN(v.x+T.value)} ${F} L ${n.checkNaN(v.x+T.value)} ${he} L ${n.checkNaN(f.x)} ${pe} L ${n.checkNaN(f.x)} ${j} Z`,value:i,sourceColor:d.color,targetColor:N.color}),c+=he-F,C[p].y+=pe-j})}return{nodeCoordinates:C,links:x}}const g=e.computed(()=>{const o=Te(y.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((a,l)=>({...o.nodeCoordinates[a],name:a})),links:o.links}});e.computed(()=>Be(g.value.nodes));function Be(o){const a={};for(const r in o){const{x:u,height:h}=o[r];a[u]||(a[u]=0),a[u]+=h+ae.value}return Math.max(...Object.values(a))}const E=e.computed(()=>{const{top:o,right:a,bottom:l,left:r}=t.value.style.chart.padding,u=Math.max(...g.value.nodes.map(b=>b.x)),h=r+u+T.value+a,w=Math.max(...g.value.nodes.map(b=>b.absoluteY+b.height)),_=o+w+l;return{width:h,height:_}});function _e(o){const a={},l={},r=new Set;return q.value.forEach(([u,h,w])=>{a[u]||(a[u]=[]),l[h]||(l[h]=[]),a[u].push(h),l[h].push(u)}),a[o]&&a[o].forEach(u=>r.add(u)),l[o]&&l[o].forEach(u=>r.add(u)),Array.from(r).concat(o)}const m=e.ref(null),B=e.ref(null),R=e.ref(null),O=e.ref(!1);function Ee(o){$.value=[],m.value=_e(o.name),B.value=o.name;const a=o.name,l=q.value;let r=0,u=0,h=[],w=[];const _=new Set(l.map(([i])=>i)),b=new Set(l.map(([,i])=>i)),fe=Array.from(_).filter(i=>!b.has(i)),C=l.filter(([i])=>fe.includes(i)).reduce((i,[f,N,F])=>i+F,0),x={};g.value.nodes.forEach(i=>{x[i.name]=i.color}),l.forEach(([i,f,N])=>{f===a&&(r+=N,h.push({source:i,value:N,color:x[i]})),i===a&&(u+=N,w.push({target:f,value:N,color:x[f]}))});const s=Math.max(r,u),c=C>0?s/C*100:0,d={name:a,inflow:r,outflow:u,from:h,to:w,percentOfTotal:c,color:x[a]||"#000000"};R.value={datapoint:d},M.value=!0;let v="";const p=t.value.style.chart.tooltip.customFormat;if(O.value=!1,n.isFunction(p))try{const i=p({datapoint:d,series:g.value,config:t.value});typeof i=="string"&&(D.value=i,O.value=!0)}catch{console.warn("Custom format cannot be applied.")}if(!O.value){const i=t.value.style.chart.tooltip.showPercentage?`<div>${n.dataLabel({p:t.value.style.chart.tooltip.translations.percentOfTotal,v:d.percentOfTotal,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</div>`:"";v+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${d.color}">⏹</span>${d.name}${i}</div>`,d.from.length&&(v+=`<div>${t.value.style.chart.tooltip.translations.from}</div>`,d.from.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹←</span> ${f.source}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),d.to.length&&(v+=`<div style="margin-top:6px;">${t.value.style.chart.tooltip.translations.to}</div>`,d.to.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹→</span> ${f.target}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),D.value=v}}function re(){m.value=null,B.value=null,M.value=!1}const se=e.computed(()=>g.value.links.map(({source:o,target:a,sourceColor:l,targetColor:r,value:u})=>({source:o,target:a,sourceColor:l,targetColor:r,value:u})));function ue(){e.nextTick(()=>{const o=se.value.map((r,u)=>[[r.source],[r.target],[r.value]]),a=[[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=n.createCsvContent(a);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const L=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],a=se.value.map((u,h)=>[{color:u.sourceColor,name:u.source},{color:u.targetColor,name:u.target},n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:u.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:a,config:l}});function Pe(){return g.value}function ie(){k.value.showTable=!k.value.showTable}const z=e.ref(!1);function Y(){z.value=!z.value}function ce(){k.value.showTooltip=!k.value.showTooltip}const de=e.computed(()=>{const o=new Set(g.value.nodes.map(a=>t.value.nodeCategories[a.name]||"__uncategorized__"));return Array.from(o).map(a=>({name:a,color:t.value.nodeCategoryColors[a]||n.palette[0],shape:"square",count:g.value.nodes.filter(l=>(t.value.nodeCategories[l.name]||"__uncategorized__")===a).length})).map((a,l)=>({...a,segregate:()=>U({legend:a,i:l}),opacity:$.value.length?$.value.includes(l)?1:.5:1}))}),ve=e.computed(()=>de.value.filter(o=>o.name!=="__uncategorized__")),$=e.ref([]);function U({legend:o,i:a}){var r;const l=o.name;if((r=m.value)!=null&&r.every(u=>t.value.nodeCategories[u]===l)){m.value=null,B.value=null,$.value=[];return}$.value=[a],m.value=g.value.nodes.filter(u=>t.value.nodeCategories[u.name]===l).map(u=>u.name),B.value=null}const Oe=e.computed(()=>({cy:"flow-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:t.value.style.chart.legend.paddingBottom,fontWeight:t.value.style.chart.legend.bold?"bold":"normal"}));return be({getData:Pe,generateCsv:ue,generateImage:le,generatePdf:oe,toggleTable:ie,toggleAnnotator:Y,toggleTooltip:ce,drillCategory:U,unselectNode:re}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:I,class:e.normalizeClass(`vue-ui-flow ${S.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_${A.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(Z)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(Z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:Y},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",Ue,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",je,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${X.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&&V.value&&(e.unref(J)||e.unref(H))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref:"details",key:`user_option_${W.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:A.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:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:k.value.showTooltip,onToggleTooltip:ce,onToggleFullscreen:we,onGeneratePdf:e.unref(oe),onGenerateCsv:ue,onGenerateImage:e.unref(le),onToggleTable:ie,onToggleAnnotator:Y,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(H)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","hasTooltip","isTooltip","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgRef",ref:K,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:E.value.width,height:E.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.links,(l,r)=>(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,Je)],8,Xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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(`
2
2
  opacity:${m.value?m.value.includes(l.source)&&m.value.includes(l.target)?1:.3:B.value?[l.target,l.source].includes(B.value)?1:.3:t.value.style.chart.links.opacity}
3
3
  `)},null,12,Ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(n.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(n.checkNaN)(l.height),width:T.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:u=>Ee(l),onMouseleave:a[0]||(a[0]=u=>re()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.3:1}`)},null,44,Qe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+T.value/2,y:e.unref(n.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(n.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(n.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+T.value/2,y:e.unref(n.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(n.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(n.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:r})),13,tt))),256)),e.renderSlot(o.$slots,"svg",{svg:E.value},void 0,!0)],14,Ge)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Ce},[t.value.style.chart.legend.show&&ve.value.length?(e.openBlock(),e.createBlock(qe.Legend,{key:0,legendSet:ve.value,config:Oe.value,onClickMarker:a[1]||(a[1]=l=>U(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${$.value.length?$.value.includes(r)?1:.5:1}`)},e.toDisplayString(l.name)+" ("+e.toDisplayString(l.count)+") ",13,lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:de.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:k.value.showTooltip&&M.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:I.value,content:D.value,isCustom:O.value,isFullscreen:S.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(Fe.default,{key:7,hideDetails:"",config:{open:k.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(ze.DataTable,{colNames:L.value.colNames,head:L.value.head,body:L.value.body,config:L.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),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,Ye))}},st=Re._export_sfc(rt,[["__scopeId","data-v-6fcb877a"]]);exports.default=st;
@@ -1,17 +1,17 @@
1
1
  import { computed as g, onMounted as et, ref as b, watch as tt, createElementBlock as m, openBlock as c, unref as d, normalizeStyle as P, normalizeClass as Ae, createBlock as Y, createCommentVNode as T, createElementVNode as B, createVNode as ce, createSlots as ot, withCtx as w, renderSlot as k, normalizeProps as D, guardReactiveProps as R, Fragment as U, renderList as V, toDisplayString as W, createTextVNode as lt, nextTick as at } from "vue";
2
- import { u as nt, o as st, e as rt, c as de, t as ut, p as S, a as it, b as ct, v as $, d as dt, f as j, X as vt, G as Me, J as ft, i as ve, q as ht, r as pt, x as gt } from "./index-BMcwUsiG.js";
3
- import { _ as mt } from "./Title-Cq5kGGhS.js";
4
- import { u as yt, U as bt } from "./usePrinter-BpCNa5RW.js";
5
- import { D as kt } from "./DataTable-BdekL1Hc.js";
6
- import Ct from "./vue-ui-accordion-DKw3ZQgh.js";
7
- import wt from "./vue-ui-skeleton-BoZyBfQF.js";
8
- import { u as He } from "./useNestedProp-DwQWwt5e.js";
9
- import { _ as $t } from "./PackageVersion-BPCzY_N5.js";
10
- import { _ as _t } from "./PenAndPaper-B3KDT2of.js";
2
+ import { u as nt, o as st, e as rt, c as de, t as ut, p as S, a as it, b as ct, v as $, d as dt, f as j, X as vt, G as Me, J as ft, i as ve, q as ht, r as pt, x as gt } from "./index-d3erwTWB.js";
3
+ import { _ as mt } from "./Title-DIYoufYR.js";
4
+ import { u as yt, U as bt } from "./usePrinter-CHrKIDM7.js";
5
+ import { D as kt } from "./DataTable-CJOtzfgn.js";
6
+ import Ct from "./vue-ui-accordion-BJyaBDyF.js";
7
+ import wt from "./vue-ui-skeleton-BOtCpAcY.js";
8
+ import { u as He } from "./useNestedProp-BqKuhIvF.js";
9
+ import { _ as $t } from "./PackageVersion-D-aPPO0L.js";
10
+ import { _ as _t } from "./PenAndPaper-D9g_r8-6.js";
11
11
  import { u as xt } from "./useUserOptionState-BIvW1Kz7.js";
12
12
  import { u as Tt } from "./useChartAccessibility-BWojgys7.js";
13
- import { _ as Nt } from "./Tooltip-CxzDtoXn.js";
14
- import { L as Ot } from "./Legend-HckkoJBL.js";
13
+ import { _ as Nt } from "./Tooltip-BFz2yelJ.js";
14
+ import { L as Ot } from "./Legend-DKQ4psNY.js";
15
15
  import { _ as St } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const Ft = ["id"], Lt = {
17
17
  key: 1,
@@ -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-BMcwUsiG.js";
3
- import { u as be } from "./useNestedProp-DwQWwt5e.js";
4
- import { u as je, U as He } from "./usePrinter-BpCNa5RW.js";
5
- import { _ as Xe } from "./Title-Cq5kGGhS.js";
6
- import { _ as qe } from "./PenAndPaper-B3KDT2of.js";
7
- import { D as Ye } from "./DataTable-BdekL1Hc.js";
8
- import We from "./vue-ui-accordion-DKw3ZQgh.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-d3erwTWB.js";
3
+ import { u as be } from "./useNestedProp-BqKuhIvF.js";
4
+ import { u as je, U as He } from "./usePrinter-CHrKIDM7.js";
5
+ import { _ as Xe } from "./Title-DIYoufYR.js";
6
+ import { _ as qe } from "./PenAndPaper-D9g_r8-6.js";
7
+ import { D as Ye } from "./DataTable-CJOtzfgn.js";
8
+ import We from "./vue-ui-accordion-BJyaBDyF.js";
9
9
  import { t as Je, u as Ke } from "./useResponsive-JZ9xq-JV.js";
10
- import Qe from "./vue-ui-skeleton-BoZyBfQF.js";
10
+ import Qe from "./vue-ui-skeleton-BOtCpAcY.js";
11
11
  import { u as Ze } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { _ as et } from "./PackageVersion-BPCzY_N5.js";
12
+ import { _ as et } from "./PackageVersion-D-aPPO0L.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 = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CG-euAJp.cjs"),J=require("./useNestedProp-DYDoE86w.cjs"),K=require("./usePrinter-BBqldIVF.cjs"),ue=require("./Title-GpO-QNhg.cjs"),ie=require("./PenAndPaper-BC1d2zL5.cjs"),ce=require("./DataTable-pT39kn0W.cjs"),ve=require("./vue-ui-accordion-dJGHfrMl.cjs"),Q=require("./useResponsive-BBkmXXaa.cjs"),de=require("./vue-ui-skeleton-LYOlEoA_.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./PackageVersion-B6nxekEz.cjs"),me=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ye=["xmlns","viewBox"],ge=["width","height"],ke=["id"],Ce=["stop-color"],we=["stop-color"],xe=["stop-color"],Le=["stroke","stroke-width"],$e=["stroke","stroke-width"],Be=["x","y","font-size","fill","font-weight"],_e=["points","fill"],Se=["stroke","stroke-width","rx"],Ne=["x","y","font-size","fill","font-weight"],ze=["x","y","font-size","fill","font-weight"],Te={key:5,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Pe={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(a=>({"58a5200a":ne.value}));const{vue_ui_funnel:te}=r.useConfig(),d=Z,b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:o,height:l}=Q.useResponsive({chart:L.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,f.value=H(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(L.value.parentNode)}}const L=e.ref(null),g=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),m=e.ref(!1);function F(){const a=J.useNestedProp({userConfig:d.config,defaultConfig:te});return a.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:R}=he.useUserOptionState({config:t.value}),{svgRef:q}=me.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:U,generatePdf:j,generateImage:G}=K.usePrinter({elementId:`funnel_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel",options:t.value.userOptions.print}),ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{m.value=!0},h.value.length*150);function H(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const f=e.ref(H()),y=e.computed(()=>f.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),X=e.computed(()=>f.value.width*t.value.style.chart.barCircleSpacingRatio),s=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,n=f.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(f.value.width-l-X.value)*(a.value/h.value[0].value);return{...a,cx:f.value.left+l/2,cy:n+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:f.value.left+l+X.value,y:n}})),le=e.computed(()=>{const a=s.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${s.value[0].x},${s.value[0].y+(y.value-p.value)/2} ${a.toString()} ${s.value.at(-1).x},${s.value.at(-1).y+(y.value-p.value)/2}`}),oe=e.computed(()=>({x1:s.value[0].cx,y1:s.value[0].cy,x2:s.value.at(-1).cx,y2:s.value.at(-1).cy})),C=e.ref(!1);function re(a){C.value=a,T.value+=1}const ne=e.computed(()=>`${h.value.length*150}ms`),$=e.ref(!1);function S(){$.value=!$.value}function Y(){k.value.showTable=!k.value.showTable}const w=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),B=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=w.value.head.map((v,c)=>{const x=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,w.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:w.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:s.value[c]}),N=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,s.value[c].proportion*100,r.dataLabel({v:s.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:s.value[c]});return[{color:v.color,name:v.name},x,N]}),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:a,body:o,config:l}});function W(){e.nextTick(()=>{const a=w.value.head.map((n,v)=>[[n.name],[w.value.body[v]],[s.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function se(){return h.value}return ee({getData:se,generatePdf:j,generateCsv:W,generateImage:G,toggleTable:Y,toggleAnnotator:S}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:L,class:e.normalizeClass(`vue-ui-funnel ${C.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:`funnel_${g.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:S},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,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:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ue._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(R)||e.unref(_))?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(U),uid:g.value,hasTooltip:!1,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:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,chartElement:L.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleAnnotator:S,onToggleFullscreen:re,onGeneratePdf:e.unref(j),onGenerateImage:e.unref(G),onToggleTable:Y,onGenerateCsv:W,style:e.normalizeStyle({visibility:e.unref(R)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),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:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:q,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$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(a.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,Ce),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,xe)],8,ke)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},oe.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?f.value.height:0,strokeDashoffset:t.value.useCssAnimation?f.value.height:0}}),null,16,Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({cx:l,cy:n,r:v,fill:c},x)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({ref_for:!0},{cx:l,cy:n,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*x}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Be))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:le.value,fill:`url(#funnel_area_${g.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,_e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({x:l,y:n,height:v,width:c,fill:x},N)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({ref_for:!0},{x:l,y:n,height:v,width:c,fill:x},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*N}ms`}}),null,16,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(l.name),15,Ne),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,ze)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ve.default,{key:8,hideDetails:"",config:{open:k.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(ce.DataTable,{key:`table_${P.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ee=pe._export_sfc(Pe,[["__scopeId","data-v-1f0bddfb"]]);exports.default=Ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),J=require("./useNestedProp-C8955nsn.cjs"),K=require("./usePrinter-BrH80VBz.cjs"),ue=require("./Title-D62pPwLz.cjs"),ie=require("./PenAndPaper-ByAFuR-l.cjs"),ce=require("./DataTable-CNCnRrD-.cjs"),ve=require("./vue-ui-accordion-7GoAZx3k.cjs"),Q=require("./useResponsive-BBkmXXaa.cjs"),de=require("./vue-ui-skeleton-Mcoev-5q.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./PackageVersion-BxSGdh6L.cjs"),me=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ye=["xmlns","viewBox"],ge=["width","height"],ke=["id"],Ce=["stop-color"],we=["stop-color"],xe=["stop-color"],Le=["stroke","stroke-width"],$e=["stroke","stroke-width"],Be=["x","y","font-size","fill","font-weight"],_e=["points","fill"],Se=["stroke","stroke-width","rx"],Ne=["x","y","font-size","fill","font-weight"],ze=["x","y","font-size","fill","font-weight"],Te={key:5,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Pe={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(a=>({"58a5200a":ne.value}));const{vue_ui_funnel:te}=r.useConfig(),d=Z,b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:o,height:l}=Q.useResponsive({chart:L.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,f.value=H(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(L.value.parentNode)}}const L=e.ref(null),g=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),m=e.ref(!1);function F(){const a=J.useNestedProp({userConfig:d.config,defaultConfig:te});return a.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:R}=he.useUserOptionState({config:t.value}),{svgRef:q}=me.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:U,generatePdf:j,generateImage:G}=K.usePrinter({elementId:`funnel_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel",options:t.value.userOptions.print}),ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{m.value=!0},h.value.length*150);function H(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const f=e.ref(H()),y=e.computed(()=>f.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),X=e.computed(()=>f.value.width*t.value.style.chart.barCircleSpacingRatio),s=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,n=f.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(f.value.width-l-X.value)*(a.value/h.value[0].value);return{...a,cx:f.value.left+l/2,cy:n+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:f.value.left+l+X.value,y:n}})),le=e.computed(()=>{const a=s.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${s.value[0].x},${s.value[0].y+(y.value-p.value)/2} ${a.toString()} ${s.value.at(-1).x},${s.value.at(-1).y+(y.value-p.value)/2}`}),oe=e.computed(()=>({x1:s.value[0].cx,y1:s.value[0].cy,x2:s.value.at(-1).cx,y2:s.value.at(-1).cy})),C=e.ref(!1);function re(a){C.value=a,T.value+=1}const ne=e.computed(()=>`${h.value.length*150}ms`),$=e.ref(!1);function S(){$.value=!$.value}function Y(){k.value.showTable=!k.value.showTable}const w=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),B=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=w.value.head.map((v,c)=>{const x=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,w.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:w.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:s.value[c]}),N=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,s.value[c].proportion*100,r.dataLabel({v:s.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:s.value[c]});return[{color:v.color,name:v.name},x,N]}),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:a,body:o,config:l}});function W(){e.nextTick(()=>{const a=w.value.head.map((n,v)=>[[n.name],[w.value.body[v]],[s.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function se(){return h.value}return ee({getData:se,generatePdf:j,generateCsv:W,generateImage:G,toggleTable:Y,toggleAnnotator:S}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:L,class:e.normalizeClass(`vue-ui-funnel ${C.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:`funnel_${g.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:S},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,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:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ue._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(R)||e.unref(_))?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(U),uid:g.value,hasTooltip:!1,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:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,chartElement:L.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleAnnotator:S,onToggleFullscreen:re,onGeneratePdf:e.unref(j),onGenerateImage:e.unref(G),onToggleTable:Y,onGenerateCsv:W,style:e.normalizeStyle({visibility:e.unref(R)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),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:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:q,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$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(a.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,Ce),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,xe)],8,ke)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},oe.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?f.value.height:0,strokeDashoffset:t.value.useCssAnimation?f.value.height:0}}),null,16,Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({cx:l,cy:n,r:v,fill:c},x)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({ref_for:!0},{cx:l,cy:n,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*x}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Be))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:le.value,fill:`url(#funnel_area_${g.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,_e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({x:l,y:n,height:v,width:c,fill:x},N)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({ref_for:!0},{x:l,y:n,height:v,width:c,fill:x},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*N}ms`}}),null,16,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(l.name),15,Ne),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,ze)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ve.default,{key:8,hideDetails:"",config:{open:k.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(ce.DataTable,{key:`table_${P.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ee=pe._export_sfc(Pe,[["__scopeId","data-v-1f0bddfb"]]);exports.default=Ee;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CG-euAJp.cjs"),ce=require("./Legend-C8PTNFsH.cjs"),de=require("./Title-GpO-QNhg.cjs"),ve=require("./Tooltip-eL97y6Ym.cjs"),he=require("./DataTable-pT39kn0W.cjs"),Y=require("./usePrinter-BBqldIVF.cjs"),pe=require("./vue-ui-skeleton-LYOlEoA_.cjs"),fe=require("./vue-ui-accordion-dJGHfrMl.cjs"),J=require("./useNestedProp-DYDoE86w.cjs"),ye=require("./PackageVersion-B6nxekEz.cjs"),ge=require("./PenAndPaper-BC1d2zL5.cjs"),me=require("./useUserOptionState-BgepsfED.cjs"),be=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},xe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},$e=["xmlns","viewBox"],Be=["width","height"],Se=["id"],Te=["stdDeviation"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],_e=["filter"],Ve=["d","stroke","stroke-width"],Ee=["d","stroke-width","onMouseenter","onClick"],Le={key:5,class:"vue-data-ui-watermark"},Oe=["onClick"],Fe={key:0},Ae={key:1},Ie={key:8,ref:"source",dir:"auto"},ze=["innerHTML"],De={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(K,{expose:Q,emit:Z}){const{vue_ui_galaxy:ee}=r.useConfig(),c=K,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),x=e.ref(null),te=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:F,keepUserOptionState:A}=me.useUserOptionState({config:t.value}),{svgRef:I}=be.useChartAccessibility({config:t.value.style.chart.title});function z(){const l=J.useNestedProp({userConfig:c.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:D,isImaging:q,generatePdf:M,generateImage:R}=Y.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy",options:t.value.userOptions.print}),le=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Z,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||oe.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function ae(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),re=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*re.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ne(l){y.value=l,V.value+=1}const N=e.ref(null);function se({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.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.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ue=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ie=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ie,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function j(){u.value.showTable=!u.value.showTable}function X(){u.value.showTooltip=!u.value.showTooltip}const w=e.ref(!1);function P(){w.value=!w.value}return Q({getData:ae,generatePdf:M,generateCsv:H,generateImage:R,toggleTable:j,toggleTooltip:X,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:x,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(F)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(A)||e.unref(S))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(q),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(M),onGenerateCsv:H,onGenerateImage:e.unref(R),onToggleTable:j,onToggleTooltip:X,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ye._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Te)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ve)],8,_e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>se({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,Ee)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pe.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ce.Legend,{key:`legend_${O.value}`,legendSet:W.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ae," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Fe," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Oe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ve._sfc_main,{show:u.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(fe.default,{key:9,hideDetails:"",config:{open:u.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(he.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},qe=ke._export_sfc(De,[["__scopeId","data-v-41382c10"]]);exports.default=qe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),ce=require("./Legend-ieOu_fKK.cjs"),de=require("./Title-D62pPwLz.cjs"),ve=require("./Tooltip-C_H6-uAa.cjs"),he=require("./DataTable-CNCnRrD-.cjs"),Y=require("./usePrinter-BrH80VBz.cjs"),pe=require("./vue-ui-skeleton-Mcoev-5q.cjs"),fe=require("./vue-ui-accordion-7GoAZx3k.cjs"),J=require("./useNestedProp-C8955nsn.cjs"),ye=require("./PackageVersion-BxSGdh6L.cjs"),ge=require("./PenAndPaper-ByAFuR-l.cjs"),me=require("./useUserOptionState-BgepsfED.cjs"),be=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},xe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},$e=["xmlns","viewBox"],Be=["width","height"],Se=["id"],Te=["stdDeviation"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],_e=["filter"],Ve=["d","stroke","stroke-width"],Ee=["d","stroke-width","onMouseenter","onClick"],Le={key:5,class:"vue-data-ui-watermark"},Oe=["onClick"],Fe={key:0},Ae={key:1},Ie={key:8,ref:"source",dir:"auto"},ze=["innerHTML"],De={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(K,{expose:Q,emit:Z}){const{vue_ui_galaxy:ee}=r.useConfig(),c=K,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),x=e.ref(null),te=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:F,keepUserOptionState:A}=me.useUserOptionState({config:t.value}),{svgRef:I}=be.useChartAccessibility({config:t.value.style.chart.title});function z(){const l=J.useNestedProp({userConfig:c.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:D,isImaging:q,generatePdf:M,generateImage:R}=Y.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy",options:t.value.userOptions.print}),le=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Z,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||oe.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function ae(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),re=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*re.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ne(l){y.value=l,V.value+=1}const N=e.ref(null);function se({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.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.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ue=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ie=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ie,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function j(){u.value.showTable=!u.value.showTable}function X(){u.value.showTooltip=!u.value.showTooltip}const w=e.ref(!1);function P(){w.value=!w.value}return Q({getData:ae,generatePdf:M,generateCsv:H,generateImage:R,toggleTable:j,toggleTooltip:X,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:x,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(F)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(A)||e.unref(S))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(q),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(M),onGenerateCsv:H,onGenerateImage:e.unref(R),onToggleTable:j,onToggleTooltip:X,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ye._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Te)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ve)],8,_e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>se({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,Ee)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pe.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ce.Legend,{key:`legend_${O.value}`,legendSet:W.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ae," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Fe," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Oe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ve._sfc_main,{show:u.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(fe.default,{key:9,hideDetails:"",config:{open:u.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(he.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},qe=ke._export_sfc(De,[["__scopeId","data-v-41382c10"]]);exports.default=qe;
@@ -1,15 +1,15 @@
1
1
  import { computed as h, onMounted as Fe, ref as n, watch as Ae, createElementBlock as i, openBlock as o, unref as u, normalizeStyle as A, normalizeClass as E, createBlock as $, createCommentVNode as c, renderSlot as v, createVNode as ce, createSlots as Ee, withCtx as d, normalizeProps as _, guardReactiveProps as T, createElementVNode as O, Fragment as ve, renderList as de, createTextVNode as he, toDisplayString as V, nextTick as Ve } from "vue";
2
- import { u as De, o as Me, e as pe, g as Be, c as ye, t as Ge, p as D, a as ze, b as Ue, H as fe, d as We, K as He, f as k, X as Re, i as ge, x as be, q as Xe, r as je, y as Ye } from "./index-BMcwUsiG.js";
3
- import { L as qe } from "./Legend-HckkoJBL.js";
4
- import { _ as Ke } from "./Title-Cq5kGGhS.js";
5
- import { _ as Je } from "./Tooltip-CxzDtoXn.js";
6
- import { D as Qe } from "./DataTable-BdekL1Hc.js";
7
- import { u as Ze, U as et } from "./usePrinter-BpCNa5RW.js";
8
- import tt from "./vue-ui-skeleton-BoZyBfQF.js";
9
- import lt from "./vue-ui-accordion-DKw3ZQgh.js";
10
- import { u as me } from "./useNestedProp-DwQWwt5e.js";
11
- import { _ as at } from "./PackageVersion-BPCzY_N5.js";
12
- import { _ as ot } from "./PenAndPaper-B3KDT2of.js";
2
+ import { u as De, o as Me, e as pe, g as Be, c as ye, t as Ge, p as D, a as ze, b as Ue, H as fe, d as We, K as He, f as k, X as Re, i as ge, x as be, q as Xe, r as je, y as Ye } from "./index-d3erwTWB.js";
3
+ import { L as qe } from "./Legend-DKQ4psNY.js";
4
+ import { _ as Ke } from "./Title-DIYoufYR.js";
5
+ import { _ as Je } from "./Tooltip-BFz2yelJ.js";
6
+ import { D as Qe } from "./DataTable-CJOtzfgn.js";
7
+ import { u as Ze, U as et } from "./usePrinter-CHrKIDM7.js";
8
+ import tt from "./vue-ui-skeleton-BOtCpAcY.js";
9
+ import lt from "./vue-ui-accordion-BJyaBDyF.js";
10
+ import { u as me } from "./useNestedProp-BqKuhIvF.js";
11
+ import { _ as at } from "./PackageVersion-D-aPPO0L.js";
12
+ import { _ as ot } from "./PenAndPaper-D9g_r8-6.js";
13
13
  import { u as st } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { u as rt } from "./useChartAccessibility-BWojgys7.js";
15
15
  import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";