vue-data-ui 2.10.2-beta.0 → 2.10.2-beta.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-DvrzYEem.js → Arrow-B2-rOYz8.js} +1 -1
  2. package/dist/{Arrow-DiKmN6eo.cjs → Arrow-D6UBVyNr.cjs} +1 -1
  3. package/dist/{BaseIcon-1opvCDaQ.js → BaseIcon-Br5G8Cdk.js} +1 -1
  4. package/dist/{BaseIcon-BRmHoHji.cjs → BaseIcon-DfoJJxST.cjs} +1 -1
  5. package/dist/{ColorPicker-G7dML0BS.js → ColorPicker-CiQzB3a-.js} +3 -3
  6. package/dist/{ColorPicker-BQY41CwB.cjs → ColorPicker-Dvgprgpv.cjs} +1 -1
  7. package/dist/{DataTable-DSZwidNa.cjs → DataTable-CGucPqAQ.cjs} +1 -1
  8. package/dist/{DataTable-DVAtzq48.js → DataTable-Dk-94kK2.js} +2 -2
  9. package/dist/{Legend-DUY48WfL.cjs → Legend-B9aoKeq3.cjs} +1 -1
  10. package/dist/{Legend-ClChB3yO.js → Legend-Cx6NYPTA.js} +2 -2
  11. package/dist/{PackageVersion-BVqKnl8d.js → PackageVersion-BdNfnIm2.js} +3 -3
  12. package/dist/PackageVersion-C2bjLIu9.cjs +1 -0
  13. package/dist/{PenAndPaper-Bt9JtDPx.cjs → PenAndPaper-CJIFAI78.cjs} +1 -1
  14. package/dist/{PenAndPaper-3jmU5GLm.js → PenAndPaper-wrVNMaG8.js} +3 -3
  15. package/dist/{Shape-x1m9d0T3.cjs → Shape-Cn2RU1NY.cjs} +1 -1
  16. package/dist/{Shape-BOc09O7_.js → Shape-vIKj52KP.js} +1 -1
  17. package/dist/{Slicer-B7Gt3_Nl.cjs → Slicer-t3EfI94H.cjs} +1 -1
  18. package/dist/{Slicer-dM7HrmEG.js → Slicer-yki6JqTB.js} +2 -2
  19. package/dist/{Title-CcgS3et4.cjs → Title-Bae0QJu7.cjs} +1 -1
  20. package/dist/{Title-Bsx1bBKe.js → Title-CDYBDpu3.js} +1 -1
  21. package/dist/{Tooltip-C8rHMEUK.js → Tooltip-BzsAOdBd.js} +1 -1
  22. package/dist/{Tooltip-DWCw-8oz.cjs → Tooltip-CfqYTd5O.cjs} +1 -1
  23. package/dist/{dom-to-png-CHXF3z4X.cjs → dom-to-png-DgRl9bEH.cjs} +1 -1
  24. package/dist/{dom-to-png-JSc0Wutr.js → dom-to-png-IAiARGiU.js} +1 -1
  25. package/dist/{img-7aPSvY3c.js → img-DaDUVggy.js} +1 -1
  26. package/dist/{img-Czqt0BR-.cjs → img-DxEvbX77.cjs} +1 -1
  27. package/dist/{index-DooXAewR.js → index-BI6O7K58.js} +1 -1
  28. package/dist/{index-BzyzkUsY.cjs → index-DgIVCHLv.cjs} +1 -1
  29. package/dist/{pdf-CS-UdLZt.js → pdf-DBVNp7s2.js} +1 -1
  30. package/dist/{pdf-B9tvtSl9.cjs → pdf-Dq3h9PEr.cjs} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/{useNestedProp-CWnDOg1g.cjs → useNestedProp-CCR03NVM.cjs} +1 -1
  33. package/dist/{useNestedProp-CeA-IFZT.js → useNestedProp-Cvz4MkSy.js} +1 -1
  34. package/dist/{usePrinter-CBfmcTyQ.cjs → usePrinter-B2xVvtiy.cjs} +1 -1
  35. package/dist/{usePrinter-rVrVRW1p.js → usePrinter-Jr3eyr8H.js} +3 -3
  36. package/dist/{vue-data-ui-B7d3aUDp.cjs → vue-data-ui-DhWKehHS.cjs} +1 -1
  37. package/dist/{vue-data-ui-Tce5_-Eb.js → vue-data-ui-bm5wfGa_.js} +62 -62
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +1 -1
  40. package/dist/{vue-ui-3d-bar-gO5QnUl-.cjs → vue-ui-3d-bar-Bpm8dKya.cjs} +1 -1
  41. package/dist/{vue-ui-3d-bar-B8Xjt8JB.js → vue-ui-3d-bar-CHOAZoDV.js} +9 -9
  42. package/dist/{vue-ui-accordion-B4ML49fc.cjs → vue-ui-accordion-DE1isSE9.cjs} +1 -1
  43. package/dist/{vue-ui-accordion-DLa3SOIQ.js → vue-ui-accordion-ldF7KsjV.js} +3 -3
  44. package/dist/{vue-ui-age-pyramid-DLDGvlfL.cjs → vue-ui-age-pyramid-BnHOxOPT.cjs} +1 -1
  45. package/dist/{vue-ui-age-pyramid-BRLXIdCs.js → vue-ui-age-pyramid-BuKSta-B.js} +10 -10
  46. package/dist/{vue-ui-annotator-DpgWa9Cn.cjs → vue-ui-annotator-B9j16TKW.cjs} +1 -1
  47. package/dist/{vue-ui-annotator-NtzLi6e5.js → vue-ui-annotator-BBuH-QB4.js} +2 -2
  48. package/dist/{vue-ui-bullet-oESdTIjM.js → vue-ui-bullet-B0C_rPTQ.js} +8 -8
  49. package/dist/{vue-ui-bullet-DIGwu5xc.cjs → vue-ui-bullet-CRChR0Qe.cjs} +1 -1
  50. package/dist/{vue-ui-candlestick-Dsb2-JRF.cjs → vue-ui-candlestick-Bq66GLxw.cjs} +1 -1
  51. package/dist/{vue-ui-candlestick-CnAI7klD.js → vue-ui-candlestick-By5MsCcS.js} +11 -11
  52. package/dist/{vue-ui-carousel-table-CAmFkQql.js → vue-ui-carousel-table-BOtjI2Ov.js} +4 -4
  53. package/dist/{vue-ui-carousel-table-DUu0feRu.cjs → vue-ui-carousel-table-CyywZulq.cjs} +1 -1
  54. package/dist/{vue-ui-chestnut-CCrwb8aH.js → vue-ui-chestnut-BS2kXrPU.js} +8 -8
  55. package/dist/{vue-ui-chestnut-Bkg_-3Jh.cjs → vue-ui-chestnut-D8QPZS8n.cjs} +1 -1
  56. package/dist/{vue-ui-circle-pack-Baw5MjxR.js → vue-ui-circle-pack-C8m10WZ0.js} +9 -9
  57. package/dist/{vue-ui-circle-pack-D2LmdTWH.cjs → vue-ui-circle-pack-iOxdB75t.cjs} +1 -1
  58. package/dist/{vue-ui-cursor-BC3eK7ZM.js → vue-ui-cursor-Bn-CCFO0.js} +2 -2
  59. package/dist/{vue-ui-cursor-CfMz226i.cjs → vue-ui-cursor-Ccym3tFb.cjs} +1 -1
  60. package/dist/{vue-ui-dashboard-OU8D2OTa.cjs → vue-ui-dashboard-Cw4IXhXY.cjs} +1 -1
  61. package/dist/{vue-ui-dashboard-BOU2cJ2b.js → vue-ui-dashboard-D-vs2N_7.js} +62 -62
  62. package/dist/{vue-ui-digits-DGQWpbm2.js → vue-ui-digits-BXBXg7wv.js} +2 -2
  63. package/dist/{vue-ui-digits-BSLSYNb7.cjs → vue-ui-digits-D66h3nUw.cjs} +1 -1
  64. package/dist/{vue-ui-donut-LglxgRri.js → vue-ui-donut-BGZIwC5D.js} +12 -12
  65. package/dist/{vue-ui-donut-DO9gOTvW.cjs → vue-ui-donut-Bf3THSxi.cjs} +1 -1
  66. package/dist/{vue-ui-donut-evolution-CGnR05_I.js → vue-ui-donut-evolution-5yOibvNM.js} +11 -11
  67. package/dist/{vue-ui-donut-evolution-jwuqDtAA.cjs → vue-ui-donut-evolution-xxrUJzgG.cjs} +1 -1
  68. package/dist/{vue-ui-dumbbell-DkBWRski.js → vue-ui-dumbbell-C-KqKhxI.js} +10 -10
  69. package/dist/{vue-ui-dumbbell-CSE5loIk.cjs → vue-ui-dumbbell-CWn7cNsm.cjs} +1 -1
  70. package/dist/{vue-ui-flow-B2AXCnm5.js → vue-ui-flow-D4_2VnaB.js} +9 -9
  71. package/dist/{vue-ui-flow-tg58e_cr.cjs → vue-ui-flow-DFxWNRRJ.cjs} +1 -1
  72. package/dist/{vue-ui-funnel-DuzxYzyD.js → vue-ui-funnel-ADEjZ8yz.js} +9 -9
  73. package/dist/{vue-ui-funnel-DcQWW2NS.cjs → vue-ui-funnel-DIoqpwbm.cjs} +1 -1
  74. package/dist/{vue-ui-galaxy-ySnbPS-x.cjs → vue-ui-galaxy-BRle40mR.cjs} +1 -1
  75. package/dist/{vue-ui-galaxy-ESjv8ZqA.js → vue-ui-galaxy-DLtA9Ebb.js} +11 -11
  76. package/dist/{vue-ui-gauge-Bwo4YkkZ.cjs → vue-ui-gauge-B4vEWkRk.cjs} +1 -1
  77. package/dist/{vue-ui-gauge-vp6PLuJ2.js → vue-ui-gauge-BVj-IBdi.js} +7 -7
  78. package/dist/{vue-ui-gizmo-BrN-J1Ee.js → vue-ui-gizmo-BTe8CPyi.js} +3 -3
  79. package/dist/{vue-ui-gizmo-CddlRjeu.cjs → vue-ui-gizmo-BwBtkZ5z.cjs} +1 -1
  80. package/dist/{vue-ui-heatmap-CBRtJ8Cd.js → vue-ui-heatmap-DrXMOxbe.js} +10 -10
  81. package/dist/{vue-ui-heatmap-s-ma5UVQ.cjs → vue-ui-heatmap-VdFtflO6.cjs} +1 -1
  82. package/dist/{vue-ui-history-plot-Yc_8sbsM.cjs → vue-ui-history-plot-B-ScOcEy.cjs} +1 -1
  83. package/dist/{vue-ui-history-plot-CaZhV-nU.js → vue-ui-history-plot-_DfuZIMP.js} +11 -11
  84. package/dist/{vue-ui-kpi-IRvK3TS2.cjs → vue-ui-kpi-DSQV0Kf2.cjs} +1 -1
  85. package/dist/{vue-ui-kpi-CjkmnlkE.js → vue-ui-kpi-DfFiDtCP.js} +3 -3
  86. package/dist/{vue-ui-mini-loader-CYVzNUON.js → vue-ui-mini-loader-1JZipPcP.js} +2 -2
  87. package/dist/{vue-ui-mini-loader-BQzcs6uB.cjs → vue-ui-mini-loader-CDOlO_1_.cjs} +1 -1
  88. package/dist/{vue-ui-molecule-Bci1mou3.js → vue-ui-molecule-Db_C7mVS.js} +11 -11
  89. package/dist/{vue-ui-molecule-DJ5RuqdD.cjs → vue-ui-molecule-jEcRTe4V.cjs} +1 -1
  90. package/dist/{vue-ui-mood-radar-CjKeANNT.cjs → vue-ui-mood-radar-BoKSTE-Y.cjs} +1 -1
  91. package/dist/{vue-ui-mood-radar-BQBLof4Z.js → vue-ui-mood-radar-m48vvkft.js} +11 -11
  92. package/dist/{vue-ui-nested-donuts-DrNhJSPg.js → vue-ui-nested-donuts-DNhMOryo.js} +11 -11
  93. package/dist/{vue-ui-nested-donuts-a1bC0MIy.cjs → vue-ui-nested-donuts-ihd00Tpn.cjs} +1 -1
  94. package/dist/{vue-ui-onion-Xy3gKPoa.cjs → vue-ui-onion-D9AHOWa5.cjs} +1 -1
  95. package/dist/{vue-ui-onion-S2zaH8gC.js → vue-ui-onion-YKxsqnI7.js} +11 -11
  96. package/dist/{vue-ui-parallel-coordinate-plot-B1SL_FlT.js → vue-ui-parallel-coordinate-plot-7SCwFkrU.js} +12 -12
  97. package/dist/{vue-ui-parallel-coordinate-plot-DlDkqRXZ.cjs → vue-ui-parallel-coordinate-plot-BmO6zenq.cjs} +1 -1
  98. package/dist/{vue-ui-quadrant-BbI_WV9P.js → vue-ui-quadrant-Bi0by7IK.js} +12 -12
  99. package/dist/{vue-ui-quadrant-Er30dYmu.cjs → vue-ui-quadrant-CAJ4dTBu.cjs} +1 -1
  100. package/dist/{vue-ui-quick-chart-F5MYUxBh.cjs → vue-ui-quick-chart-C37lGqa1.cjs} +1 -1
  101. package/dist/{vue-ui-quick-chart-CuQeZuMv.js → vue-ui-quick-chart-DlV0Qv_x.js} +9 -9
  102. package/dist/{vue-ui-radar-ZGmdrOWg.js → vue-ui-radar-B14zLIww.js} +12 -12
  103. package/dist/{vue-ui-radar-ODXlpihN.cjs → vue-ui-radar-H08KmB3s.cjs} +1 -1
  104. package/dist/{vue-ui-rating-CGDzme3N.cjs → vue-ui-rating-CYarWaTf.cjs} +1 -1
  105. package/dist/{vue-ui-rating-kTiSrHnd.js → vue-ui-rating-CdSQUBG6.js} +2 -2
  106. package/dist/{vue-ui-relation-circle-Ciae1qCQ.cjs → vue-ui-relation-circle-A4Vw8kYl.cjs} +1 -1
  107. package/dist/{vue-ui-relation-circle-CbQYCuW1.js → vue-ui-relation-circle-IzAvPPGl.js} +7 -7
  108. package/dist/{vue-ui-ridgeline-BYyeFIhk.js → vue-ui-ridgeline-BF5X6KQR.js} +12 -12
  109. package/dist/{vue-ui-ridgeline-c1obnD3W.cjs → vue-ui-ridgeline-BaHgOn_p.cjs} +1 -1
  110. package/dist/{vue-ui-rings-DlT7Q9C_.js → vue-ui-rings-DUhnXy1h.js} +12 -12
  111. package/dist/{vue-ui-rings-JyiU6_sc.cjs → vue-ui-rings-DnVeMrOw.cjs} +1 -1
  112. package/dist/{vue-ui-scatter-ntN0LVrZ.js → vue-ui-scatter-D7bXuxob.js} +12 -12
  113. package/dist/{vue-ui-scatter-CuJCs6sT.cjs → vue-ui-scatter-DoGX7iHp.cjs} +1 -1
  114. package/dist/{vue-ui-skeleton-CZb-ZjJ-.cjs → vue-ui-skeleton-DeEGdJEn.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-BJBwGLvQ.js → vue-ui-skeleton-Dxm7rqic.js} +3 -3
  116. package/dist/{vue-ui-smiley-TZDNziHi.js → vue-ui-smiley-95l4UiqT.js} +2 -2
  117. package/dist/{vue-ui-smiley-BPtUaxih.cjs → vue-ui-smiley-DmAtXVht.cjs} +1 -1
  118. package/dist/{vue-ui-spark-trend-bueclFIq.cjs → vue-ui-spark-trend-C3CO25Jy.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-Dcr7S70f.js → vue-ui-spark-trend-DdH43oVm.js} +5 -5
  120. package/dist/{vue-ui-sparkbar-BQlWKjxx.cjs → vue-ui-sparkbar-C2roDWfv.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-CmMSpIWT.js → vue-ui-sparkbar-DTe3QrR3.js} +4 -4
  122. package/dist/{vue-ui-sparkgauge-BZyTGzW5.js → vue-ui-sparkgauge-BwclNj3C.js} +4 -4
  123. package/dist/{vue-ui-sparkgauge-B7nCrYcd.cjs → vue-ui-sparkgauge-nq6-9TjT.cjs} +1 -1
  124. package/dist/{vue-ui-sparkhistogram-Dlnfvocd.cjs → vue-ui-sparkhistogram-BdWirDjI.cjs} +1 -1
  125. package/dist/{vue-ui-sparkhistogram-C9a9yysC.js → vue-ui-sparkhistogram-Brau127G.js} +5 -5
  126. package/dist/{vue-ui-sparkline-BYXy4_ye.cjs → vue-ui-sparkline-B2mOJzkG.cjs} +1 -1
  127. package/dist/{vue-ui-sparkline-SWxohDk9.js → vue-ui-sparkline-qqfyQyVz.js} +4 -4
  128. package/dist/{vue-ui-sparkstackbar-DLHaGMca.cjs → vue-ui-sparkstackbar-BJl9lbBp.cjs} +1 -1
  129. package/dist/{vue-ui-sparkstackbar-B2kazMC5.js → vue-ui-sparkstackbar-DLlDU0B2.js} +5 -5
  130. package/dist/{vue-ui-stackbar-DFHLxQ-o.cjs → vue-ui-stackbar-CEvmDjq3.cjs} +1 -1
  131. package/dist/{vue-ui-stackbar-AvRusEob.js → vue-ui-stackbar-RRGnblUm.js} +13 -13
  132. package/dist/{vue-ui-strip-plot-ISii3FHM.js → vue-ui-strip-plot-C9LKjSkW.js} +11 -11
  133. package/dist/{vue-ui-strip-plot-BtqRC7h3.cjs → vue-ui-strip-plot-Dlsv-yRI.cjs} +1 -1
  134. package/dist/{vue-ui-table-DKsKbnap.js → vue-ui-table-DxdJ151X.js} +3 -3
  135. package/dist/{vue-ui-table-heatmap-C5G_CELV.cjs → vue-ui-table-heatmap-BhxOvDDW.cjs} +1 -1
  136. package/dist/{vue-ui-table-heatmap-CLLk1u2z.js → vue-ui-table-heatmap-CzGeU_uL.js} +4 -4
  137. package/dist/{vue-ui-table-DeSxVc3g.cjs → vue-ui-table-qULtmHGA.cjs} +1 -1
  138. package/dist/{vue-ui-table-sparkline-5vuYcAME.cjs → vue-ui-table-sparkline-D1hriLB0.cjs} +1 -1
  139. package/dist/{vue-ui-table-sparkline-BncY35Is.js → vue-ui-table-sparkline-DSZhEDKX.js} +5 -5
  140. package/dist/{vue-ui-thermometer-jm_63HZL.cjs → vue-ui-thermometer-Cvnh4jvE.cjs} +1 -1
  141. package/dist/{vue-ui-thermometer-xOTD55R3.js → vue-ui-thermometer-Pw4X3Bun.js} +7 -7
  142. package/dist/{vue-ui-timer-DmwSXmTW.cjs → vue-ui-timer-BlmIXPv6.cjs} +1 -1
  143. package/dist/{vue-ui-timer-m_ncHz58.js → vue-ui-timer-CvvexEeN.js} +5 -5
  144. package/dist/{vue-ui-tiremarks-0UU9Mw4i.cjs → vue-ui-tiremarks-BAkMBz3o.cjs} +1 -1
  145. package/dist/{vue-ui-tiremarks-GaLo5qjV.js → vue-ui-tiremarks-DbZQvV_2.js} +7 -7
  146. package/dist/{vue-ui-treemap-CFSNLj9T.js → vue-ui-treemap-CF-RjM16.js} +12 -12
  147. package/dist/{vue-ui-treemap-BVFJiMAZ.cjs → vue-ui-treemap-a6b1vWy-.cjs} +1 -1
  148. package/dist/{vue-ui-vertical-bar-CWaIXNCd.cjs → vue-ui-vertical-bar-Dm5zMIeE.cjs} +1 -1
  149. package/dist/{vue-ui-vertical-bar-z2t7Pcta.js → vue-ui-vertical-bar-ZJbSI-xR.js} +12 -12
  150. package/dist/{vue-ui-waffle-B57vn44W.js → vue-ui-waffle-I9AKkwb4.js} +12 -12
  151. package/dist/{vue-ui-waffle-DFH1pRat.cjs → vue-ui-waffle-XNiw-qtb.cjs} +1 -1
  152. package/dist/{vue-ui-wheel-CeDuJhdJ.js → vue-ui-wheel-BA7wZUZL.js} +7 -7
  153. package/dist/{vue-ui-wheel-BInY09xB.cjs → vue-ui-wheel-DJUrO6CA.cjs} +1 -1
  154. package/dist/vue-ui-word-cloud-BVqb1Yix.js +648 -0
  155. package/dist/vue-ui-word-cloud-ByjkRq1g.cjs +1 -0
  156. package/dist/{vue-ui-world-KRmkbVed.cjs → vue-ui-world-9nlcZMH1.cjs} +1 -1
  157. package/dist/{vue-ui-world-OzkiVQUb.js → vue-ui-world-DkYRlp5s.js} +11 -11
  158. package/dist/{vue-ui-xy-CfE-caY1.js → vue-ui-xy-B1HwPMFi.js} +16 -16
  159. package/dist/{vue-ui-xy-vkK0CrKz.cjs → vue-ui-xy-B4sqGuw6.cjs} +2 -2
  160. package/dist/{vue-ui-xy-canvas-CkjbrUpb.cjs → vue-ui-xy-canvas-C-rykR_6.cjs} +1 -1
  161. package/dist/{vue-ui-xy-canvas-DtQzJAsY.js → vue-ui-xy-canvas-CGCtkn9g.js} +12 -12
  162. package/package.json +1 -1
  163. package/dist/PackageVersion-B5BeU3j9.cjs +0 -1
  164. package/dist/vue-ui-word-cloud-CrQ8lUc4.js +0 -630
  165. package/dist/vue-ui-word-cloud-OChNmjNF.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BzyzkUsY.cjs"),oe=require("./Title-CcgS3et4.cjs"),Y=require("./usePrinter-CBfmcTyQ.cjs"),re=require("./vue-ui-skeleton-CZb-ZjJ-.cjs"),z=require("./useNestedProp-CWnDOg1g.cjs"),le=require("./PackageVersion-B5BeU3j9.cjs"),ae=require("./PenAndPaper-Bt9JtDPx.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DgIVCHLv.cjs"),oe=require("./Title-Bae0QJu7.cjs"),Y=require("./usePrinter-B2xVvtiy.cjs"),re=require("./vue-ui-skeleton-DeEGdJEn.cjs"),z=require("./useNestedProp-CCR03NVM.cjs"),le=require("./PackageVersion-C2bjLIu9.cjs"),ae=require("./PenAndPaper-CJIFAI78.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
@@ -1,11 +1,11 @@
1
1
  import { useCssVars as ke, computed as d, onMounted as be, ref as m, watch as _e, createElementBlock as u, openBlock as l, unref as h, normalizeStyle as te, normalizeClass as I, createBlock as O, createCommentVNode as i, createSlots as xe, withCtx as _, renderSlot as f, normalizeProps as P, guardReactiveProps as A, createVNode as we, createElementVNode as v, Fragment as M, renderList as se, toDisplayString as Ce } from "vue";
2
- import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-DooXAewR.js";
3
- import { _ as Te } from "./Title-Bsx1bBKe.js";
4
- import { u as qe, U as Le } from "./usePrinter-rVrVRW1p.js";
5
- import Ve from "./vue-ui-skeleton-BJBwGLvQ.js";
6
- import { u as le } from "./useNestedProp-CeA-IFZT.js";
7
- import { _ as Ee } from "./PackageVersion-BVqKnl8d.js";
8
- import { _ as Ge } from "./PenAndPaper-3jmU5GLm.js";
2
+ import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-BI6O7K58.js";
3
+ import { _ as Te } from "./Title-CDYBDpu3.js";
4
+ import { u as qe, U as Le } from "./usePrinter-Jr3eyr8H.js";
5
+ import Ve from "./vue-ui-skeleton-Dxm7rqic.js";
6
+ import { u as le } from "./useNestedProp-Cvz4MkSy.js";
7
+ import { _ as Ee } from "./PackageVersion-BdNfnIm2.js";
8
+ import { _ as Ge } from "./PenAndPaper-wrVNMaG8.js";
9
9
  import { u as We } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { u as je } from "./useChartAccessibility-BWojgys7.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-CWnDOg1g.cjs"),w=require("./index-BzyzkUsY.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-BRmHoHji.cjs"),O=require("./Title-CcgS3et4.cjs"),U=require("./PackageVersion-B5BeU3j9.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-CCR03NVM.cjs"),w=require("./index-DgIVCHLv.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-DfoJJxST.cjs"),O=require("./Title-Bae0QJu7.cjs"),U=require("./PackageVersion-C2bjLIu9.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
2
2
  let interval;
3
3
  let elapsed = 0;
4
4
  let paused = false;
@@ -1,10 +1,10 @@
1
1
  import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
2
- import { u as oe } from "./useNestedProp-CeA-IFZT.js";
3
- import { u as re, c as ue, X as ie, F as V } from "./index-DooXAewR.js";
2
+ import { u as oe } from "./useNestedProp-Cvz4MkSy.js";
3
+ import { u as re, c as ue, X as ie, F as V } from "./index-BI6O7K58.js";
4
4
  import { t as ne, u as ce } from "./useResponsive-Cw4oZ8sQ.js";
5
- import R from "./BaseIcon-1opvCDaQ.js";
6
- import { _ as de } from "./Title-Bsx1bBKe.js";
7
- import { _ as he } from "./PackageVersion-BVqKnl8d.js";
5
+ import R from "./BaseIcon-Br5G8Cdk.js";
6
+ import { _ as de } from "./Title-CDYBDpu3.js";
7
+ import { _ as he } from "./PackageVersion-BdNfnIm2.js";
8
8
  import { u as ve } from "./useChartAccessibility-BWojgys7.js";
9
9
  import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  class fe {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-CWnDOg1g.cjs"),c=require("./index-BzyzkUsY.cjs"),K=require("./Title-CcgS3et4.cjs"),j=require("./usePrinter-CBfmcTyQ.cjs"),Q=require("./vue-ui-skeleton-CZb-ZjJ-.cjs"),W=require("./PackageVersion-B5BeU3j9.cjs"),Z=require("./PenAndPaper-Bt9JtDPx.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-CCR03NVM.cjs"),c=require("./index-DgIVCHLv.cjs"),K=require("./Title-Bae0QJu7.cjs"),j=require("./usePrinter-B2xVvtiy.cjs"),Q=require("./vue-ui-skeleton-DeEGdJEn.cjs"),W=require("./PackageVersion-C2bjLIu9.cjs"),Z=require("./PenAndPaper-CJIFAI78.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
@@ -1,11 +1,11 @@
1
1
  import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as O, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
2
- import { u as ae } from "./useNestedProp-CeA-IFZT.js";
3
- import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-DooXAewR.js";
4
- import { _ as $e } from "./Title-Bsx1bBKe.js";
5
- import { u as we, U as xe } from "./usePrinter-rVrVRW1p.js";
6
- import Oe from "./vue-ui-skeleton-BJBwGLvQ.js";
7
- import { _ as Pe } from "./PackageVersion-BVqKnl8d.js";
8
- import { _ as Ae } from "./PenAndPaper-3jmU5GLm.js";
2
+ import { u as ae } from "./useNestedProp-Cvz4MkSy.js";
3
+ import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-BI6O7K58.js";
4
+ import { _ as $e } from "./Title-CDYBDpu3.js";
5
+ import { u as we, U as xe } from "./usePrinter-Jr3eyr8H.js";
6
+ import Oe from "./vue-ui-skeleton-Dxm7rqic.js";
7
+ import { _ as Pe } from "./PackageVersion-BdNfnIm2.js";
8
+ import { _ as Ae } from "./PenAndPaper-wrVNMaG8.js";
9
9
  import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,19 +1,19 @@
1
1
  import { useSlots as pt, onMounted as je, computed as C, ref as g, watch as gt, onBeforeUnmount as mt, createElementBlock as y, openBlock as v, unref as m, normalizeStyle as L, normalizeClass as me, createBlock as X, createCommentVNode as _, createElementVNode as O, createVNode as ye, createSlots as yt, withCtx as x, renderSlot as $, normalizeProps as j, guardReactiveProps as Y, Fragment as ce, renderList as be, withKeys as Ye, withModifiers as ke, mergeProps as Ke, createTextVNode as de, toDisplayString as K, nextTick as bt } from "vue";
2
- import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-DooXAewR.js";
3
- import { _ as Nt } from "./Title-Bsx1bBKe.js";
4
- import { u as zt, U as Ft } from "./usePrinter-rVrVRW1p.js";
5
- import { _ as At } from "./Tooltip-C8rHMEUK.js";
6
- import { L as Pt } from "./Legend-ClChB3yO.js";
7
- import Rt from "./vue-ui-skeleton-BJBwGLvQ.js";
8
- import { D as Lt } from "./DataTable-DVAtzq48.js";
9
- import Dt from "./vue-ui-accordion-DLa3SOIQ.js";
2
+ import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-BI6O7K58.js";
3
+ import { _ as Nt } from "./Title-CDYBDpu3.js";
4
+ import { u as zt, U as Ft } from "./usePrinter-Jr3eyr8H.js";
5
+ import { _ as At } from "./Tooltip-BzsAOdBd.js";
6
+ import { L as Pt } from "./Legend-Cx6NYPTA.js";
7
+ import Rt from "./vue-ui-skeleton-Dxm7rqic.js";
8
+ import { D as Lt } from "./DataTable-Dk-94kK2.js";
9
+ import Dt from "./vue-ui-accordion-ldF7KsjV.js";
10
10
  import { t as Mt, u as Vt } from "./useResponsive-Cw4oZ8sQ.js";
11
- import { u as tt } from "./useNestedProp-CeA-IFZT.js";
12
- import { _ as Bt } from "./PackageVersion-BVqKnl8d.js";
13
- import { _ as Ht } from "./PenAndPaper-3jmU5GLm.js";
11
+ import { u as tt } from "./useNestedProp-Cvz4MkSy.js";
12
+ import { _ as Bt } from "./PackageVersion-BdNfnIm2.js";
13
+ import { _ as Ht } from "./PenAndPaper-wrVNMaG8.js";
14
14
  import { u as Ut } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { u as Wt } from "./useChartAccessibility-BWojgys7.js";
16
- import Et from "./BaseIcon-1opvCDaQ.js";
16
+ import Et from "./BaseIcon-Br5G8Cdk.js";
17
17
  import { _ as Gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
18
  function ot(n, r) {
19
19
  const u = n.length;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BzyzkUsY.cjs"),Me=require("./Title-CcgS3et4.cjs"),Se=require("./usePrinter-CBfmcTyQ.cjs"),He=require("./Tooltip-DWCw-8oz.cjs"),Ue=require("./Legend-DUY48WfL.cjs"),We=require("./vue-ui-skeleton-CZb-ZjJ-.cjs"),Ge=require("./DataTable-DSZwidNa.cjs"),je=require("./vue-ui-accordion-B4ML49fc.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-CWnDOg1g.cjs"),Xe=require("./PackageVersion-B5BeU3j9.cjs"),Ye=require("./PenAndPaper-Bt9JtDPx.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-BRmHoHji.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),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,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DgIVCHLv.cjs"),Me=require("./Title-Bae0QJu7.cjs"),Se=require("./usePrinter-B2xVvtiy.cjs"),He=require("./Tooltip-CfqYTd5O.cjs"),Ue=require("./Legend-B9aoKeq3.cjs"),We=require("./vue-ui-skeleton-DeEGdJEn.cjs"),Ge=require("./DataTable-CGucPqAQ.cjs"),je=require("./vue-ui-accordion-DE1isSE9.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-CCR03NVM.cjs"),Xe=require("./PackageVersion-C2bjLIu9.cjs"),Ye=require("./PenAndPaper-CJIFAI78.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-DfoJJxST.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),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,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BzyzkUsY.cjs"),ge=require("./useResponsive-DQmBAoBf.cjs"),Re=require("./Title-CcgS3et4.cjs"),me=require("./usePrinter-CBfmcTyQ.cjs"),qe=require("./Tooltip-DWCw-8oz.cjs"),be=require("./Legend-DUY48WfL.cjs"),Ue=require("./vue-ui-skeleton-CZb-ZjJ-.cjs"),He=require("./BaseIcon-BRmHoHji.cjs"),Xe=require("./vue-ui-accordion-B4ML49fc.cjs"),ke=require("./useNestedProp-CWnDOg1g.cjs"),je=require("./PackageVersion-B5BeU3j9.cjs"),We=require("./PenAndPaper-Bt9JtDPx.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./Shape-x1m9d0T3.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Qe=["onClick"],Ze=["xmlns","viewBox"],et=["width","height"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot={key:1},nt=["x","y","width","height","fill","rx"],rt=["x","y","width","height","fill","rx","stroke","stroke-width"],ut=["x","y","width","height","fill","rx","stroke","stroke-width"],st=["x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","text-anchor","font-size","fill","font-weight"],dt=["x","y","font-size","fill","font-weight"],vt=["x","y","font-size","fill","font-weight"],ht=["x","y","font-size","fill","font-weight"],pt=["y","width","height","fill","onMouseenter"],yt={key:6,class:"vue-data-ui-watermark"},ft=["onClick"],gt={style:"width:100%;padding-top: 36px;position:relative"},mt={class:"vue-ui-data-table"},bt={key:0},kt={style:{width:"100%"}},Ct=["data-cell"],_t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],$t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},St=["data-cell"],Vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Tt=["data-cell"],Bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Et=["data-cell"],Lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt=["data-cell"],zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(_e,{expose:xe,emit:we}){e.useCssVars(a=>({a6ba6a4e:a.tdo}));const{vue_ui_vertical_bar:Ne}=n.useConfig(),$e=e.useSlots(),g=_e,E=e.computed(()=>!!g.dataset&&g.dataset.length),f=e.ref(n.createUid()),Se=e.ref(null),F=e.ref(!1),I=e.ref(""),L=e.ref(0),Ve=e.ref(null),X=e.ref(0),V=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),Te=we,t=e.computed({get:()=>Z(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=Ge.useUserOptionState({config:t.value}),{svgRef:Q}=Ye.useChartAccessibility({config:t.value.style.chart.title});function Z(){const a=ke.useNestedProp({userConfig:g.config,defaultConfig:Ne});return a.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||g.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>g.config,a=>{t.value=Z(),R.value=!t.value.userOptions.showOnChartHover,ue(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>g.dataset,z,{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-vertical-bar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar",options:t.value.userOptions.print}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),re=e.ref(!1),Ee=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(n.objectIsEmpty(g.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=g.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Le(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:V.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ce.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Le(){new ResizeObserver(o=>{o.forEach(l=>{re.value=l.contentRect.width<Ee.value})}).observe(ne.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),se=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(g.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),g.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${f.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>se.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${f.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>se.value?o.value-a.value:a.value-o.value))),ie=e.computed(()=>({cy:"vertical-bar-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":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Pe=e.computed(()=>(s.value+c.value)*L.value),ce=e.ref(512),i=e.computed(()=>({width:ce.value,height:Pe.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),Te("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function de(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),ze=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/ze.value;return u.value.width/($.value?2:1)*o}function De(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/k.value)?"":de(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Oe(){return w.value}const q=e.ref(null),U=e.ref(null);function Fe(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},F.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?I.value=d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DgIVCHLv.cjs"),ge=require("./useResponsive-DQmBAoBf.cjs"),Re=require("./Title-Bae0QJu7.cjs"),me=require("./usePrinter-B2xVvtiy.cjs"),qe=require("./Tooltip-CfqYTd5O.cjs"),be=require("./Legend-B9aoKeq3.cjs"),Ue=require("./vue-ui-skeleton-DeEGdJEn.cjs"),He=require("./BaseIcon-DfoJJxST.cjs"),Xe=require("./vue-ui-accordion-DE1isSE9.cjs"),ke=require("./useNestedProp-CCR03NVM.cjs"),je=require("./PackageVersion-C2bjLIu9.cjs"),We=require("./PenAndPaper-CJIFAI78.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./Shape-Cn2RU1NY.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Qe=["onClick"],Ze=["xmlns","viewBox"],et=["width","height"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot={key:1},nt=["x","y","width","height","fill","rx"],rt=["x","y","width","height","fill","rx","stroke","stroke-width"],ut=["x","y","width","height","fill","rx","stroke","stroke-width"],st=["x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","text-anchor","font-size","fill","font-weight"],dt=["x","y","font-size","fill","font-weight"],vt=["x","y","font-size","fill","font-weight"],ht=["x","y","font-size","fill","font-weight"],pt=["y","width","height","fill","onMouseenter"],yt={key:6,class:"vue-data-ui-watermark"},ft=["onClick"],gt={style:"width:100%;padding-top: 36px;position:relative"},mt={class:"vue-ui-data-table"},bt={key:0},kt={style:{width:"100%"}},Ct=["data-cell"],_t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],$t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},St=["data-cell"],Vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Tt=["data-cell"],Bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Et=["data-cell"],Lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt=["data-cell"],zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(_e,{expose:xe,emit:we}){e.useCssVars(a=>({a6ba6a4e:a.tdo}));const{vue_ui_vertical_bar:Ne}=n.useConfig(),$e=e.useSlots(),g=_e,E=e.computed(()=>!!g.dataset&&g.dataset.length),f=e.ref(n.createUid()),Se=e.ref(null),F=e.ref(!1),I=e.ref(""),L=e.ref(0),Ve=e.ref(null),X=e.ref(0),V=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),Te=we,t=e.computed({get:()=>Z(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=Ge.useUserOptionState({config:t.value}),{svgRef:Q}=Ye.useChartAccessibility({config:t.value.style.chart.title});function Z(){const a=ke.useNestedProp({userConfig:g.config,defaultConfig:Ne});return a.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||g.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>g.config,a=>{t.value=Z(),R.value=!t.value.userOptions.showOnChartHover,ue(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>g.dataset,z,{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-vertical-bar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar",options:t.value.userOptions.print}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),re=e.ref(!1),Ee=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(n.objectIsEmpty(g.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=g.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Le(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:V.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ce.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Le(){new ResizeObserver(o=>{o.forEach(l=>{re.value=l.contentRect.width<Ee.value})}).observe(ne.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),se=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(g.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),g.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${f.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>se.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${f.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>se.value?o.value-a.value:a.value-o.value))),ie=e.computed(()=>({cy:"vertical-bar-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":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Pe=e.computed(()=>(s.value+c.value)*L.value),ce=e.ref(512),i=e.computed(()=>({width:ce.value,height:Pe.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),Te("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function de(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),ze=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/ze.value;return u.value.width/($.value?2:1)*o}function De(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/k.value)?"":de(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Oe(){return w.value}const q=e.ref(null),U=e.ref(null);function Fe(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},F.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?I.value=d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
2
2
  <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${$e.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${f.value}_${a.absoluteIndex})"/>`:""}</svg> ${r}</div>
3
3
  ${v?`<div>${v}</div>`:""}
4
4
  </div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),I.value=`<div style="text-align:left">${l}</div>`)}function ve(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),d=`(${de(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${d}`:""}`}const m=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=N.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/k.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/k.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function he(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=m.value.head,l=m.value.body.map(d=>[d.parentName,d.parentValue,d.percentageToTotal,d.childName,d.childValue,d.childPercentageToParent,d.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const S=e.ref(!1);function Ie(a){S.value=a,X.value+=1}function pe(){h.value.showTable=!h.value.showTable}const Me=e.ref({none:0,asc:1,desc:2}),_=e.ref(0),D=e.ref(!1);e.onMounted(()=>{["none","asc","desc"].includes(t.value.style.chart.layout.bars.sort)||n.error({componentName:"VueUiVerticalBar",type:"attributeWrongValue",property:"style.chart.layout.bars.sort",key:t.value.style.chart.layout.bars.sort}),_.value=Me.value[t.value.style.chart.layout.bars.sort],h.value.sortDesc=_.value===2,D.value=_.value===0});function Ae(){_.value+=1,_.value>2&&(_.value=0)}function ye(){Ae(),h.value.sortDesc=_.value===2,D.value=_.value===0,z()}function fe(){h.value.showTooltip=!h.value.showTooltip}const O=e.ref(!1);function H(){O.value=!O.value}return xe({getData:Oe,recalculateHeight:z,generatePdf:le,generateCsv:he,generateImage:ae,toggleTable:pe,toggleSort:ye,toggleTooltip:fe,toggleAnnotator:H}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${S.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:V,id:`vue-ui-vertical-bar_${f.value}`,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%":""}`),onMouseenter:o[5]||(o[5]=()=>e.unref(K)(!0)),onMouseleave:o[6]||(o[6]=()=>e.unref(K)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(We._sfc_main,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:O.value,onClose:H},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,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:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Re._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value&&(e.unref(J)||e.unref(R))?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Se,key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:O.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(le),onGenerateCsv:he,onGenerateImage:e.unref(ae),onToggleTable:pe,onToggleSort:ye,onToggleTooltip:fe,onToggleAnnotator:H,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"7"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"8"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_top_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[0]||(o[0]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Qe)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:Q,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(je._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width<=0?10:i.value.width,height:u.value.fullHeight<=0?10:u.value.fullHeight,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,et)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,at)],8,tt))),256)),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l.absoluteIndex,patternId:`pattern_${f.value}_${l.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,nt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,rt),a.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:0,x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:`url(#pattern_${f.value}_${l.absoluteIndex})`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,ut)):e.createCommentVNode("",!0),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==N.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:1,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,st)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,it)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):De(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!$.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(ve(l.value,l,r,l.sign)),9,ct),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,dt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(B(l,r).name),9,vt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(ve(B(l,r).value),B(l,r),r,l.parentSign||l.sign),9,ht)):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:i.value.width<=0?1e-4:i.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:q.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>Fe(l,r),onMouseleave:o[1]||(o[1]=v=>{Ve.value=null,F.value=!1,q.value=null})},null,40,pt)]))),256)),e.renderSlot(a.$slots,"svg",{svg:i.value},void 0,!0)],14,Ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_bottom_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[2]||(o[2]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,ft)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:x.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(qe._sfc_main,{show:h.value.showTooltip&&F.value&&b.value.length<g.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:V.value,content:I.value,isFullscreen:S.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),E.value?(e.openBlock(),e.createBlock(Xe.default,{key:10,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:ne,class:"vue-ui-vertical-bar-table atom-data-table"},[e.createElementVNode("div",gt,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>h.value.showTable=!1,["enter"]))},[e.createVNode(He.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":re.value})},[e.createElementVNode("table",mt,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",bt,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",kt,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(k.value)?"":k.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":m.value.head[0]??""},[e.createElementVNode("div",_t,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,Ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[1]??""},[e.createElementVNode("div",wt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,xt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[2]??""},[e.createElementVNode("div",$t,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Nt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[3]??""},[e.createElementVNode("div",Vt,e.toDisplayString(l.childName),1)],12,St),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[4]??""},[e.createElementVNode("div",Bt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Tt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[5]??""},[e.createElementVNode("div",Lt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Et),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[6]??""},[e.createElementVNode("div",zt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Pt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Je))}},Ot=Ke._export_sfc(Dt,[["__scopeId","data-v-3535bb6b"]]);exports.default=Ot;
@@ -1,18 +1,18 @@
1
1
  import { useCssVars as ct, useSlots as ht, computed as m, ref as i, watch as Ue, onMounted as Xe, onBeforeUnmount as pt, createElementBlock as r, openBlock as u, unref as d, normalizeStyle as c, normalizeClass as A, createBlock as B, createCommentVNode as p, renderSlot as b, createVNode as Y, createSlots as ce, withCtx as _, normalizeProps as X, guardReactiveProps as E, createElementVNode as n, toDisplayString as h, Fragment as H, renderList as W, mergeProps as yt, withKeys as gt, createTextVNode as ft } from "vue";
2
- import { u as bt, c as mt, t as _t, p as R, a as kt, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-DooXAewR.js";
2
+ import { u as bt, c as mt, t as _t, p as R, a as kt, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-BI6O7K58.js";
3
3
  import { t as St, u as Pt } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as Vt } from "./Title-Bsx1bBKe.js";
5
- import { u as It, U as Ot } from "./usePrinter-rVrVRW1p.js";
6
- import { _ as Ft } from "./Tooltip-C8rHMEUK.js";
7
- import { L as He } from "./Legend-ClChB3yO.js";
8
- import Mt from "./vue-ui-skeleton-BJBwGLvQ.js";
9
- import zt from "./BaseIcon-1opvCDaQ.js";
10
- import At from "./vue-ui-accordion-DLa3SOIQ.js";
11
- import { u as We } from "./useNestedProp-CeA-IFZT.js";
12
- import { _ as Bt } from "./PackageVersion-BVqKnl8d.js";
13
- import { _ as Rt } from "./PenAndPaper-3jmU5GLm.js";
4
+ import { _ as Vt } from "./Title-CDYBDpu3.js";
5
+ import { u as It, U as Ot } from "./usePrinter-Jr3eyr8H.js";
6
+ import { _ as Ft } from "./Tooltip-BzsAOdBd.js";
7
+ import { L as He } from "./Legend-Cx6NYPTA.js";
8
+ import Mt from "./vue-ui-skeleton-Dxm7rqic.js";
9
+ import zt from "./BaseIcon-Br5G8Cdk.js";
10
+ import At from "./vue-ui-accordion-ldF7KsjV.js";
11
+ import { u as We } from "./useNestedProp-Cvz4MkSy.js";
12
+ import { _ as Bt } from "./PackageVersion-BdNfnIm2.js";
13
+ import { _ as Rt } from "./PenAndPaper-wrVNMaG8.js";
14
14
  import { u as Dt } from "./useUserOptionState-BIvW1Kz7.js";
15
- import { _ as Ge } from "./Shape-BOc09O7_.js";
15
+ import { _ as Ge } from "./Shape-vIKj52KP.js";
16
16
  import { u as Ut } from "./useChartAccessibility-BWojgys7.js";
17
17
  import { _ as Xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
18
  const Et = ["id"], Ht = ["onClick"], Wt = ["xmlns", "viewBox"], Gt = ["width", "height"], jt = ["id"], qt = ["stop-color"], Yt = ["stop-color"], Kt = { key: 1 }, Jt = ["x", "y", "width", "height", "fill", "rx"], Qt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Zt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ea = ["x2", "y1", "y2", "stroke", "stroke-width"], ta = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], aa = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], la = ["x", "y", "font-size", "fill", "font-weight"], oa = ["x", "y", "font-size", "fill", "font-weight"], na = ["x", "y", "font-size", "fill", "font-weight"], ua = ["y", "width", "height", "fill", "onMouseenter"], sa = {