vue-data-ui 2.4.49 → 2.4.50

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 (151) hide show
  1. package/dist/{Arrow-Q0cOmO5p.js → Arrow-D1z9KkQN.js} +1 -1
  2. package/dist/{Arrow-CTukks_V.cjs → Arrow-DuuEh1Nr.cjs} +1 -1
  3. package/dist/{BaseIcon-CaYP30Aq.js → BaseIcon-BHwqOTt4.js} +1 -1
  4. package/dist/{BaseIcon-2ZD3jgGz.cjs → BaseIcon-DemqZ_13.cjs} +1 -1
  5. package/dist/{DataTable-CO5C8Cmb.js → DataTable-CQ8fQnex.js} +2 -2
  6. package/dist/{DataTable-kMUhutQ4.cjs → DataTable-CovKV5Yy.cjs} +1 -1
  7. package/dist/{Legend-DPHcmrzd.cjs → Legend-Bbz-hKDf.cjs} +1 -1
  8. package/dist/{Legend-FZN9UHoI.js → Legend-Br7MWNDo.js} +1 -1
  9. package/dist/{PackageVersion-rnWHRWGI.cjs → PackageVersion-BEtuCME5.cjs} +1 -1
  10. package/dist/{PackageVersion-DYk2hOG1.js → PackageVersion-BV3fHO46.js} +1 -1
  11. package/dist/{PenAndPaper-BQl9-uX0.cjs → PenAndPaper-BIcmfBvD.cjs} +1 -1
  12. package/dist/{PenAndPaper-BfgS_5ux.js → PenAndPaper-CCOywdmm.js} +3 -3
  13. package/dist/{Shape-BqkMzXqo.js → Shape-B7Mekpyf.js} +1 -1
  14. package/dist/{Shape-BblkpCyL.cjs → Shape-BD37ZaX9.cjs} +1 -1
  15. package/dist/{Slicer-yEeqKUDF.cjs → Slicer-CWvkt-8k.cjs} +1 -1
  16. package/dist/{Slicer-DlgqsI5C.js → Slicer-ahFReg7h.js} +2 -2
  17. package/dist/{Title-5Vedk01J.cjs → Title-C2siG5N2.cjs} +1 -1
  18. package/dist/{Title-DED-PQ7X.js → Title-CIsKiWgN.js} +1 -1
  19. package/dist/{Tooltip-CHseiJu8.js → Tooltip-B1LgrF9R.js} +1 -1
  20. package/dist/{Tooltip-DjCKBAC4.cjs → Tooltip-CS4C58T7.cjs} +1 -1
  21. package/dist/{index-igxqCP2w.js → index-BtL_cLa8.js} +1 -1
  22. package/dist/{index-BHQZE19X.cjs → index-DoD-GxZR.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-CSVnZVwZ.js → useNestedProp-CEAfm1tu.js} +1 -1
  25. package/dist/{useNestedProp-CwpqC_aE.cjs → useNestedProp-D_feh7A_.cjs} +1 -1
  26. package/dist/{usePrinter-DVgxBO4o.cjs → usePrinter-B4xDG31F.cjs} +1 -1
  27. package/dist/{usePrinter-CnZYDQXB.js → usePrinter-sRt2SKr2.js} +1 -1
  28. package/dist/{vue-data-ui-BrRTkOqu.cjs → vue-data-ui-CuEYAddV.cjs} +1 -1
  29. package/dist/{vue-data-ui-B--WWkUM.js → vue-data-ui-NkhaiK6y.js} +60 -60
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-OzzLYbUl.js → vue-ui-3d-bar-BeXYzdzu.js} +9 -9
  33. package/dist/{vue-ui-3d-bar-BGVLnjCh.cjs → vue-ui-3d-bar-RduHvzwG.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-CRVWlHxs.cjs → vue-ui-accordion-CBxsUoGb.cjs} +1 -1
  35. package/dist/{vue-ui-accordion-lF7yVkiT.js → vue-ui-accordion-Cjc683tN.js} +3 -3
  36. package/dist/{vue-ui-age-pyramid-Cv0Rddsx.cjs → vue-ui-age-pyramid-DVtbyRJw.cjs} +1 -1
  37. package/dist/{vue-ui-age-pyramid-5Vj8AtW1.js → vue-ui-age-pyramid-rnt8M-Qz.js} +10 -10
  38. package/dist/{vue-ui-annotator-BmO78L3H.js → vue-ui-annotator-CFU5Zyfk.js} +1 -1
  39. package/dist/{vue-ui-annotator-D8Hx1BFF.cjs → vue-ui-annotator-Yu-mHS2N.cjs} +1 -1
  40. package/dist/{vue-ui-bullet-C0Q2Vs5p.cjs → vue-ui-bullet-Be5aYhtp.cjs} +1 -1
  41. package/dist/{vue-ui-bullet-DwFD41hN.js → vue-ui-bullet-CRbW1ON6.js} +8 -8
  42. package/dist/{vue-ui-candlestick-C7kRHFF3.cjs → vue-ui-candlestick-B6wSs-JC.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-By609gwn.js → vue-ui-candlestick-D-ERLtI1.js} +11 -11
  44. package/dist/{vue-ui-carousel-table-1_Hy8sGL.cjs → vue-ui-carousel-table-7reErH8M.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-wwMoteEN.js → vue-ui-carousel-table-I1m4HMWf.js} +4 -4
  46. package/dist/{vue-ui-chestnut-hqorA5EW.js → vue-ui-chestnut-CqJRKECX.js} +8 -8
  47. package/dist/{vue-ui-chestnut-D3LGylRp.cjs → vue-ui-chestnut-D-WzX16q.cjs} +1 -1
  48. package/dist/{vue-ui-cursor-BCg5VZUb.cjs → vue-ui-cursor-S83QIsxQ.cjs} +1 -1
  49. package/dist/{vue-ui-cursor-GSkn7N7Z.js → vue-ui-cursor-jrrdh8Lf.js} +2 -2
  50. package/dist/{vue-ui-dashboard-DIoYWyXB.js → vue-ui-dashboard-DR_Bhwa3.js} +2 -2
  51. package/dist/{vue-ui-dashboard-Bkm9bcAc.cjs → vue-ui-dashboard-DW1mIInG.cjs} +1 -1
  52. package/dist/{vue-ui-digits-niqTltAv.js → vue-ui-digits-1jZdiwHJ.js} +2 -2
  53. package/dist/{vue-ui-digits-CpBBTAI9.cjs → vue-ui-digits-s5f9eFtW.cjs} +1 -1
  54. package/dist/{vue-ui-donut-DfufBrkk.js → vue-ui-donut-BAYiPsxp.js} +11 -11
  55. package/dist/{vue-ui-donut-CQEOtlxM.cjs → vue-ui-donut-Ce1SaXNu.cjs} +1 -1
  56. package/dist/{vue-ui-donut-evolution-Dg_XJyX8.cjs → vue-ui-donut-evolution-DI8yeIa4.cjs} +1 -1
  57. package/dist/{vue-ui-donut-evolution-XQp6R0e_.js → vue-ui-donut-evolution-DsHTZ9T2.js} +11 -11
  58. package/dist/{vue-ui-dumbbell-RAkNYRoJ.cjs → vue-ui-dumbbell-CFJkwtM8.cjs} +1 -1
  59. package/dist/{vue-ui-dumbbell-DSS8sHHU.js → vue-ui-dumbbell-DcMmBxLy.js} +10 -10
  60. package/dist/{vue-ui-flow-BUmSGSmR.cjs → vue-ui-flow-B4MtorhO.cjs} +1 -1
  61. package/dist/{vue-ui-flow-BBNuPVgI.js → vue-ui-flow-BTXEmIQG.js} +9 -9
  62. package/dist/{vue-ui-funnel-BDGggRXE.js → vue-ui-funnel-BB_h0FKg.js} +8 -8
  63. package/dist/{vue-ui-funnel-B9HR0owO.cjs → vue-ui-funnel-DNL12vLQ.cjs} +1 -1
  64. package/dist/{vue-ui-galaxy-DmsMWB1a.cjs → vue-ui-galaxy-CmCZGOKz.cjs} +1 -1
  65. package/dist/{vue-ui-galaxy-6Odi2CwM.js → vue-ui-galaxy-DlBk1FUz.js} +11 -11
  66. package/dist/{vue-ui-gauge-DeYvNVnR.js → vue-ui-gauge-1SFhSMfU.js} +7 -7
  67. package/dist/{vue-ui-gauge-Dvv0v56Z.cjs → vue-ui-gauge-B7ieQMud.cjs} +1 -1
  68. package/dist/{vue-ui-gizmo-DXQt_8D0.cjs → vue-ui-gizmo-C8rLR4n5.cjs} +1 -1
  69. package/dist/{vue-ui-gizmo-BcAr2dTN.js → vue-ui-gizmo-CtX6KFN2.js} +3 -3
  70. package/dist/{vue-ui-heatmap-DZ02dS5q.cjs → vue-ui-heatmap-Bfi3KJwS.cjs} +1 -1
  71. package/dist/{vue-ui-heatmap-Btm1mK6D.js → vue-ui-heatmap-BzyvTePn.js} +10 -10
  72. package/dist/{vue-ui-history-plot-DPQWcN0P.cjs → vue-ui-history-plot-5kZ54hgy.cjs} +1 -1
  73. package/dist/{vue-ui-history-plot-OY6N31Ka.js → vue-ui-history-plot-BEoHuZ3N.js} +11 -11
  74. package/dist/{vue-ui-kpi-D5oNUDVm.js → vue-ui-kpi-BYOyJjYg.js} +3 -3
  75. package/dist/{vue-ui-kpi-CQIbWQMk.cjs → vue-ui-kpi-LO4KKRR9.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-BjqV22Co.js → vue-ui-mini-loader-ChHdx5me.js} +2 -2
  77. package/dist/{vue-ui-mini-loader-ByDKGMAp.cjs → vue-ui-mini-loader-wlUD77O6.cjs} +1 -1
  78. package/dist/{vue-ui-molecule-FsLf3YTj.js → vue-ui-molecule-Bo7XYpf-.js} +11 -11
  79. package/dist/{vue-ui-molecule-C8O_ViVy.cjs → vue-ui-molecule-D-4cRS5w.cjs} +1 -1
  80. package/dist/{vue-ui-mood-radar-4u98wGWl.cjs → vue-ui-mood-radar-C3x_LH7Q.cjs} +1 -1
  81. package/dist/{vue-ui-mood-radar-31BX-GNG.js → vue-ui-mood-radar-DXj4Ce6l.js} +11 -11
  82. package/dist/{vue-ui-nested-donuts-BMJW2oHk.js → vue-ui-nested-donuts-BBLpNVwF.js} +11 -11
  83. package/dist/{vue-ui-nested-donuts-BPc_OBoe.cjs → vue-ui-nested-donuts-DrL7-SUd.cjs} +1 -1
  84. package/dist/{vue-ui-onion-IhkIHn1A.cjs → vue-ui-onion-8Vz3lPbn.cjs} +1 -1
  85. package/dist/{vue-ui-onion-BUpGgnWA.js → vue-ui-onion-DC8VIInA.js} +11 -11
  86. package/dist/{vue-ui-parallel-coordinate-plot-9I00rQEM.js → vue-ui-parallel-coordinate-plot-Cl1wiHsK.js} +12 -12
  87. package/dist/{vue-ui-parallel-coordinate-plot-DzjggyLA.cjs → vue-ui-parallel-coordinate-plot-D6q4WQ0B.cjs} +1 -1
  88. package/dist/{vue-ui-quadrant-EZqQ-7Ev.cjs → vue-ui-quadrant-DBZS5jFQ.cjs} +1 -1
  89. package/dist/{vue-ui-quadrant-CEmoMAL7.js → vue-ui-quadrant-b5cuEH9z.js} +12 -12
  90. package/dist/{vue-ui-quick-chart-T_oeRTqY.js → vue-ui-quick-chart-CFBPYw2J.js} +9 -9
  91. package/dist/{vue-ui-quick-chart-BKUUR-A1.cjs → vue-ui-quick-chart-Cno_1mzu.cjs} +1 -1
  92. package/dist/{vue-ui-radar-QBwo6ybW.cjs → vue-ui-radar-ChcBO21S.cjs} +1 -1
  93. package/dist/{vue-ui-radar-DG_Zir8w.js → vue-ui-radar-DP8360kx.js} +12 -12
  94. package/dist/{vue-ui-rating-Juprijdi.cjs → vue-ui-rating-D7b-kfyp.cjs} +1 -1
  95. package/dist/{vue-ui-rating-gswAA28b.js → vue-ui-rating-DIthBSp_.js} +2 -2
  96. package/dist/{vue-ui-relation-circle-BWX8zrfH.cjs → vue-ui-relation-circle-C5pO0iHY.cjs} +1 -1
  97. package/dist/{vue-ui-relation-circle-DtnXrnOP.js → vue-ui-relation-circle-D2iwmChn.js} +7 -7
  98. package/dist/{vue-ui-rings-Damuv7g9.cjs → vue-ui-rings-C_NLJYs8.cjs} +1 -1
  99. package/dist/{vue-ui-rings-D3g-ORch.js → vue-ui-rings-y9Zx-DaI.js} +11 -11
  100. package/dist/{vue-ui-scatter-RUeAe7Sx.cjs → vue-ui-scatter-BNeMGDNk.cjs} +1 -1
  101. package/dist/{vue-ui-scatter-DBO-XViT.js → vue-ui-scatter-Cbu5GDc1.js} +12 -12
  102. package/dist/{vue-ui-screenshot-K0a-DVD6.js → vue-ui-screenshot-BZh_sgjP.js} +1 -1
  103. package/dist/{vue-ui-screenshot-3MDyr6v3.cjs → vue-ui-screenshot-oH-YnZBE.cjs} +1 -1
  104. package/dist/{vue-ui-skeleton-CWjNNx-k.js → vue-ui-skeleton-DjFU2X3P.js} +3 -3
  105. package/dist/{vue-ui-skeleton-DUNkS05l.cjs → vue-ui-skeleton-Nuju6X7l.cjs} +1 -1
  106. package/dist/{vue-ui-smiley-MwX1c6qK.js → vue-ui-smiley-DdnzzEYS.js} +2 -2
  107. package/dist/{vue-ui-smiley-Cbqg-N-L.cjs → vue-ui-smiley-DtQVEc4B.cjs} +1 -1
  108. package/dist/{vue-ui-spark-trend-CN5JUPhn.cjs → vue-ui-spark-trend-B36zW41F.cjs} +1 -1
  109. package/dist/{vue-ui-spark-trend-D9eWTtbE.js → vue-ui-spark-trend-CaIGk_53.js} +5 -5
  110. package/dist/{vue-ui-sparkbar-CPF7YNDd.js → vue-ui-sparkbar-DixeozKp.js} +4 -4
  111. package/dist/{vue-ui-sparkbar-IphZ8jXh.cjs → vue-ui-sparkbar-iQKGtxo8.cjs} +1 -1
  112. package/dist/{vue-ui-sparkgauge-B29V7ZTv.js → vue-ui-sparkgauge-C01VB6KP.js} +4 -4
  113. package/dist/{vue-ui-sparkgauge-BRMGqR9Z.cjs → vue-ui-sparkgauge-DEvgucF7.cjs} +1 -1
  114. package/dist/{vue-ui-sparkhistogram-rvYaVHmw.cjs → vue-ui-sparkhistogram-CTUuxOma.cjs} +1 -1
  115. package/dist/{vue-ui-sparkhistogram-BJTgOWF5.js → vue-ui-sparkhistogram-C_6lHF3O.js} +5 -5
  116. package/dist/{vue-ui-sparkline-DX79otAB.js → vue-ui-sparkline-Btm4HVgi.js} +4 -4
  117. package/dist/{vue-ui-sparkline-BI9jqI0h.cjs → vue-ui-sparkline-DrZWPGOG.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-DuollcwK.cjs → vue-ui-sparkstackbar-7pcfCNMr.cjs} +1 -1
  119. package/dist/{vue-ui-sparkstackbar-vP28A6AT.js → vue-ui-sparkstackbar-D0UGUm-1.js} +5 -5
  120. package/dist/{vue-ui-stackbar-DnJEgIaA.js → vue-ui-stackbar-BPMDmY04.js} +12 -12
  121. package/dist/{vue-ui-stackbar-BumFmZZF.cjs → vue-ui-stackbar-BwRdmPvB.cjs} +1 -1
  122. package/dist/{vue-ui-strip-plot-DqcHBwd_.js → vue-ui-strip-plot-BfWQMGXy.js} +11 -11
  123. package/dist/{vue-ui-strip-plot-DupREfRd.cjs → vue-ui-strip-plot-CLN9LikJ.cjs} +1 -1
  124. package/dist/{vue-ui-table-BMJ0I5nr.cjs → vue-ui-table-Cdo265Yt.cjs} +1 -1
  125. package/dist/{vue-ui-table-D8cgqIJl.js → vue-ui-table-D8GaLhM9.js} +1 -1
  126. package/dist/{vue-ui-table-heatmap-D4qeClXn.js → vue-ui-table-heatmap-C4DRSfsE.js} +4 -4
  127. package/dist/{vue-ui-table-heatmap-D43pTFli.cjs → vue-ui-table-heatmap-CDAf1IIk.cjs} +1 -1
  128. package/dist/vue-ui-table-sparkline-Cw7NOiYx.cjs +1 -0
  129. package/dist/{vue-ui-table-sparkline-B_Po0RuC.js → vue-ui-table-sparkline-DMHf03C9.js} +211 -200
  130. package/dist/{vue-ui-thermometer-CaV3JF3h.cjs → vue-ui-thermometer-7BORZJjd.cjs} +1 -1
  131. package/dist/{vue-ui-thermometer-C6nfW6uY.js → vue-ui-thermometer-BCVqil7E.js} +7 -7
  132. package/dist/{vue-ui-timer-CfwmMRdZ.js → vue-ui-timer-DF5HkeeS.js} +5 -5
  133. package/dist/{vue-ui-timer-ldINTqND.cjs → vue-ui-timer-gxiLCP1n.cjs} +1 -1
  134. package/dist/{vue-ui-tiremarks-BlyxL_IU.cjs → vue-ui-tiremarks-CwGnFx4f.cjs} +1 -1
  135. package/dist/{vue-ui-tiremarks-iNKMnu3P.js → vue-ui-tiremarks-lidhcJsi.js} +7 -7
  136. package/dist/{vue-ui-treemap-YdRDlSHA.cjs → vue-ui-treemap-BZ_LmiBK.cjs} +1 -1
  137. package/dist/{vue-ui-treemap-CwMnkcOi.js → vue-ui-treemap-CIZaPmbi.js} +11 -11
  138. package/dist/{vue-ui-vertical-bar-BZR4YOLh.js → vue-ui-vertical-bar-dQoTddqU.js} +11 -11
  139. package/dist/{vue-ui-vertical-bar-Bji3-X8i.cjs → vue-ui-vertical-bar-venrkqjM.cjs} +1 -1
  140. package/dist/{vue-ui-waffle-D2BccJmB.js → vue-ui-waffle-CnvWOEVU.js} +11 -11
  141. package/dist/{vue-ui-waffle-rO_LJaHR.cjs → vue-ui-waffle-oR54BbIg.cjs} +1 -1
  142. package/dist/{vue-ui-wheel-BTrpdV-C.cjs → vue-ui-wheel-BUHZEzPr.cjs} +1 -1
  143. package/dist/{vue-ui-wheel-GqWFopE1.js → vue-ui-wheel-D3itrMku.js} +7 -7
  144. package/dist/{vue-ui-word-cloud-DD-pKUen.cjs → vue-ui-word-cloud-87gwksmM.cjs} +1 -1
  145. package/dist/{vue-ui-word-cloud-DiG8DHOr.js → vue-ui-word-cloud-o3zU6r0-.js} +10 -10
  146. package/dist/{vue-ui-xy-C32KNdyx.cjs → vue-ui-xy-D56pm4L0.cjs} +1 -1
  147. package/dist/{vue-ui-xy-DicLnkBA.js → vue-ui-xy-GR4PGBDy.js} +14 -14
  148. package/dist/{vue-ui-xy-canvas-D6CYL9A8.js → vue-ui-xy-canvas-BKGOnjut.js} +11 -11
  149. package/dist/{vue-ui-xy-canvas-9e630nJX.cjs → vue-ui-xy-canvas-uikeVe72.cjs} +1 -1
  150. package/package.json +1 -1
  151. package/dist/vue-ui-table-sparkline-B7OPOium.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BHQZE19X.cjs"),Q=require("./Title-5Vedk01J.cjs"),A=require("./usePrinter-DVgxBO4o.cjs"),Z=require("./vue-ui-skeleton-DUNkS05l.cjs"),T=require("./useNestedProp-CwpqC_aE.cjs"),ee=require("./PackageVersion-rnWHRWGI.cjs"),te=require("./PenAndPaper-BQl9-uX0.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ae={key:2,style:"width:100%"},se=["xmlns","viewBox"],ne={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ue=["fill"],ce=["id"],ie=["stop-color"],de=["stop-color"],he=["stop-color"],ve={"clip-path":"url(#vueUiPill)"},me=["x","y","height","width"],pe=["x","y","height","width","fill"],ye=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ke=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],be=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x","y","height","width"],Ne=["y","x","fill","font-size","font-weight"],Be={key:5,class:"vue-data-ui-watermark"},Pe={key:6,ref:"source",dir:"auto"},Ve={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:Y}){const s=m;e.useCssVars(l=>({"000db494":H.value,"2865ccd0":W.value,10843485:G.value}));const{vue_ui_thermometer:M}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),g=e.ref(null),P=e.ref(0),V=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:M});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=E(),B(),V.value+=1},{deep:!0});const{isPrinting:$,isImaging:F,generatePdf:I,generateImage:q}=A.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),z=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),L=e.computed(()=>t.value.style.chart.thermometer.width),i=e.computed(()=>s.dataset.steps||10),c=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 y(l,u,o){const n=[],w=S(l),N=S(u);for(let v=0;v<o;v++){const R=x(w.red,N.red,v,o),X=x(w.green,N.green,v,o),J=x(w.blue,N.blue,v,o),K=`#${b(R)}${b(X)}${b(J)}`;n.push(K)}return n}function S(l){const u=l.slice(1);return{red:parseInt(u.slice(0,2),16),green:parseInt(u.slice(2,4),16),blue:parseInt(u.slice(4,6),16)}}function x(l,u,o,n){return Math.round(l+(u-l)*o/n)}function b(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=L.value+c.value.left+c.value.right,u=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:u-c.value.bottom,height:u}}),U=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),u=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+u:l>u?o=l-u:o=u-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),G=e.computed(()=>`${_.value}px`),W=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),H=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),j=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],i.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],i.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),O=e.computed(()=>{const l=[];let u=0;const o=a.value.height-c.value.top-c.value.bottom;for(let n=0;n<o-1;n+=o/i.value)l.push({x:a.value.left,y:a.value.top+n,qYLess:a.value.top+n+o/i.value/4,halfY:a.value.top+n+o/i.value/2,qYMore:a.value.top+n+o/i.value/4*3,color:j.value[u],height:o/i.value}),u+=1;return l}),h=e.ref(!1);function D(l){h.value=l,P.value+=1}const f=e.ref(!1);function C(){f.value=!f.value}return Y({generatePdf:I,generateImage:q,toggleAnnotator:C}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,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}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",re,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${V.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&&k.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(F),isPrinting:e.unref($),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:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:D,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(q),onToggleAnnotator:C},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createVNode(ee._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",ne,[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,ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${n}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ie),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,he)],8,ce))),256))]),e.createElementVNode("g",ve,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-c.value.top-c.value.bottom,width:a.value.width-c.value.left-c.value.right,fill:"#FFFFFF"},null,8,me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${n}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${n}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,pe),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,ye)):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,fe)):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,ke)):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,ge)):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:a.value.right,x2:a.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,xe)):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:a.value.right,x2:a.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,be)):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:a.value.right,x2:a.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,_e)):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:a.value.right,x2:a.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,Ce)):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:a.value.left,y:a.value.top,height:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,we)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.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(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.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,Ne),e.renderSlot(l.$slots,"svg",{svg:U.value},void 0,!0)],10,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,le))}},Ee=oe._export_sfc(Ve,[["__scopeId","data-v-8a73571f"]]);exports.default=Ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DoD-GxZR.cjs"),Q=require("./Title-C2siG5N2.cjs"),A=require("./usePrinter-B4xDG31F.cjs"),Z=require("./vue-ui-skeleton-Nuju6X7l.cjs"),T=require("./useNestedProp-D_feh7A_.cjs"),ee=require("./PackageVersion-BEtuCME5.cjs"),te=require("./PenAndPaper-BIcmfBvD.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ae={key:2,style:"width:100%"},se=["xmlns","viewBox"],ne={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ue=["fill"],ce=["id"],ie=["stop-color"],de=["stop-color"],he=["stop-color"],ve={"clip-path":"url(#vueUiPill)"},me=["x","y","height","width"],pe=["x","y","height","width","fill"],ye=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ke=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],be=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x","y","height","width"],Ne=["y","x","fill","font-size","font-weight"],Be={key:5,class:"vue-data-ui-watermark"},Pe={key:6,ref:"source",dir:"auto"},Ve={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:Y}){const s=m;e.useCssVars(l=>({"000db494":H.value,"2865ccd0":W.value,10843485:G.value}));const{vue_ui_thermometer:M}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),g=e.ref(null),P=e.ref(0),V=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:M});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=E(),B(),V.value+=1},{deep:!0});const{isPrinting:$,isImaging:F,generatePdf:I,generateImage:q}=A.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),z=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),L=e.computed(()=>t.value.style.chart.thermometer.width),i=e.computed(()=>s.dataset.steps||10),c=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 y(l,u,o){const n=[],w=S(l),N=S(u);for(let v=0;v<o;v++){const R=x(w.red,N.red,v,o),X=x(w.green,N.green,v,o),J=x(w.blue,N.blue,v,o),K=`#${b(R)}${b(X)}${b(J)}`;n.push(K)}return n}function S(l){const u=l.slice(1);return{red:parseInt(u.slice(0,2),16),green:parseInt(u.slice(2,4),16),blue:parseInt(u.slice(4,6),16)}}function x(l,u,o,n){return Math.round(l+(u-l)*o/n)}function b(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=L.value+c.value.left+c.value.right,u=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:u-c.value.bottom,height:u}}),U=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),u=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+u:l>u?o=l-u:o=u-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),G=e.computed(()=>`${_.value}px`),W=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),H=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),j=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],i.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],i.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),O=e.computed(()=>{const l=[];let u=0;const o=a.value.height-c.value.top-c.value.bottom;for(let n=0;n<o-1;n+=o/i.value)l.push({x:a.value.left,y:a.value.top+n,qYLess:a.value.top+n+o/i.value/4,halfY:a.value.top+n+o/i.value/2,qYMore:a.value.top+n+o/i.value/4*3,color:j.value[u],height:o/i.value}),u+=1;return l}),h=e.ref(!1);function D(l){h.value=l,P.value+=1}const f=e.ref(!1);function C(){f.value=!f.value}return Y({generatePdf:I,generateImage:q,toggleAnnotator:C}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,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}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",re,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${V.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&&k.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(F),isPrinting:e.unref($),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:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:D,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(q),onToggleAnnotator:C},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createVNode(ee._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",ne,[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,ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${n}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ie),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,he)],8,ce))),256))]),e.createElementVNode("g",ve,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-c.value.top-c.value.bottom,width:a.value.width-c.value.left-c.value.right,fill:"#FFFFFF"},null,8,me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${n}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${n}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,pe),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,ye)):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,fe)):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,ke)):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,ge)):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:a.value.right,x2:a.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,xe)):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:a.value.right,x2:a.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,be)):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:a.value.right,x2:a.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,_e)):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:a.value.right,x2:a.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,Ce)):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:a.value.left,y:a.value.top,height:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,we)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.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(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.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,Ne),e.renderSlot(l.$slots,"svg",{svg:U.value},void 0,!0)],10,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,le))}},Ee=oe._export_sfc(Ve,[["__scopeId","data-v-8a73571f"]]);exports.default=Ee;
@@ -1,11 +1,11 @@
1
1
  import { useCssVars as ye, computed as h, onMounted as fe, ref as g, watch as ge, openBlock as l, createElementBlock as u, normalizeClass as P, normalizeStyle as me, createBlock as F, createCommentVNode as i, unref as v, createSlots as pe, withCtx as I, renderSlot as m, normalizeProps as G, guardReactiveProps as V, createVNode as ke, createElementVNode as d, Fragment as O, renderList as K, toDisplayString as be } from "vue";
2
- import { u as _e, o as xe, e as Q, g as we, c as Ce, t as $e, a as Pe, p as _, b as Fe, v as f, d as A, X as Ie, s as Oe, i as Ae, f as Ye } from "./index-igxqCP2w.js";
3
- import { _ as Ne } from "./Title-DED-PQ7X.js";
4
- import { u as Me, U as Te } from "./usePrinter-CnZYDQXB.js";
5
- import Se from "./vue-ui-skeleton-CWjNNx-k.js";
6
- import { u as Z } from "./useNestedProp-CSVnZVwZ.js";
7
- import { _ as Ue } from "./PackageVersion-DYk2hOG1.js";
8
- import { P as qe } from "./PenAndPaper-BfgS_5ux.js";
2
+ import { u as _e, o as xe, e as Q, g as we, c as Ce, t as $e, a as Pe, p as _, b as Fe, v as f, d as A, X as Ie, s as Oe, i as Ae, f as Ye } from "./index-BtL_cLa8.js";
3
+ import { _ as Ne } from "./Title-CIsKiWgN.js";
4
+ import { u as Me, U as Te } from "./usePrinter-sRt2SKr2.js";
5
+ import Se from "./vue-ui-skeleton-DjFU2X3P.js";
6
+ import { u as Z } from "./useNestedProp-CEAfm1tu.js";
7
+ import { _ as Ue } from "./PackageVersion-BV3fHO46.js";
8
+ import { P as qe } from "./PenAndPaper-CCOywdmm.js";
9
9
  import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const Ge = ["id"], Ve = {
11
11
  key: 1,
@@ -1,10 +1,10 @@
1
1
  import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as z, watch as Z, openBlock as l, createElementBlock as r, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te, createVNode as M, createElementVNode as C, mergeProps as V, renderSlot as O, normalizeProps as U, guardReactiveProps as E, toDisplayString as ae } from "vue";
2
- import { u as se } from "./useNestedProp-CSVnZVwZ.js";
3
- import { u as le, c as oe, X as re, F as W } from "./index-igxqCP2w.js";
2
+ import { u as se } from "./useNestedProp-CEAfm1tu.js";
3
+ import { u as le, c as oe, X as re, F as W } from "./index-BtL_cLa8.js";
4
4
  import { t as ue, u as ie } from "./useResponsive-CoxXLe23.js";
5
- import P from "./BaseIcon-CaYP30Aq.js";
6
- import { _ as ne } from "./Title-DED-PQ7X.js";
7
- import { _ as ce } from "./PackageVersion-DYk2hOG1.js";
5
+ import P from "./BaseIcon-BHwqOTt4.js";
6
+ import { _ as ne } from "./Title-CIsKiWgN.js";
7
+ import { _ as ce } from "./PackageVersion-BV3fHO46.js";
8
8
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  class he {
10
10
  constructor(A, k, T, H = !0, x = !0) {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-CwpqC_aE.cjs"),g=require("./index-BHQZE19X.cjs"),$=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-2ZD3jgGz.cjs"),j=require("./Title-5Vedk01J.cjs"),q=require("./PackageVersion-rnWHRWGI.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(T,v,y,E=!0,b=!0){this.interval=v,this.elapsed=0,this.isPaused=!1;const S=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-D_feh7A_.cjs"),g=require("./index-DoD-GxZR.cjs"),$=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-DemqZ_13.cjs"),j=require("./Title-C2siG5N2.cjs"),q=require("./PackageVersion-BEtuCME5.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(T,v,y,E=!0,b=!0){this.interval=v,this.elapsed=0,this.isPaused=!1;const S=`
2
2
  let interval;
3
3
  let elapsed = 0;
4
4
  let paused = false;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./useNestedProp-CwpqC_aE.cjs"),c=require("./index-BHQZE19X.cjs"),X=require("./Title-5Vedk01J.cjs"),L=require("./usePrinter-DVgxBO4o.cjs"),Y=require("./vue-ui-skeleton-DUNkS05l.cjs"),J=require("./PackageVersion-rnWHRWGI.cjs"),K=require("./PenAndPaper-BQl9-uX0.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W=["id"],Z={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},ee=["xmlns","viewBox"],te={key:0},ae=["d","stroke-width","stroke"],oe={key:1},le=["x1","y1","x2","y2","stroke-width","stroke"],re=["x","y","font-size","fill","font-weight","text-anchor"],ne={key:5,class:"vue-data-ui-watermark"},se={key:6,ref:"source",dir:"auto"},ue={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(M,{expose:G}){const v=M,{vue_ui_tiremarks:j}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),U=e.ref(null),A=e.ref(0),N=e.ref(0),t=e.computed({get:()=>S(),set:a=>a});function S(){const a=V.useNestedProp({userConfig:v.config,defaultConfig:j});return a.theme?{...V.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=S(),T(),N.value+=1},{deep:!0});const{isPrinting:z,isImaging:I,generatePdf:O,generateImage:F}=L.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?E(a.percentage):n.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{T()});function E(a){let u=t.value.style.chart.animation.speed;const o=Math.abs(a-n.value)/(u*120);function r(){n.value<a?n.value=Math.min(n.value+o,a):n.value>a&&(n.value=Math.max(n.value-o,a)),n.value!==a&&requestAnimationFrame(r)}r()}function T(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),E(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),s=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),b=e.computed(()=>Object.values(s.value).reduce((a,u)=>a+u,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),D=e.ref(100);e.computed(()=>v.dataset.percentage/D.value);const i=e.computed(()=>f.value?{mark:(l.value.height-b.value)/100*.5,space:(l.value.height-b.value)/100*.5}:{mark:(l.value.width-b.value)/100*.5,space:(l.value.width-b.value)/100*.5}),q=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-s.value.left-s.value.right)/100/3:0,d=s.value.left+4+y,h=l.value.width-s.value.right-4-y,p=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,C=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-C}, ${h-k} ${m-C}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-s.value.top-s.value.bottom)/100/3:0,d=s.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=s.value.top+4+y,m=l.value.height-s.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),C=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+C}, ${h+k} ${m-C}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,u,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,u=s.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,u=l.value.height-s.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,u=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-s.value.right+8,u=l.value.height/2+r,o="start"),{x:a,y:u,textAnchor:o,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 R(a){_.value=a,A.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return G({generatePdf:O,generateImage:F,toggleAnnotator:x}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,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:$.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(K.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,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",Z,[(e.openBlock(),e.createBlock(X._sfc_main,{key:`title_${N.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&&P.value?(e.openBlock(),e.createBlock(L.UserOptions,{ref:"details",key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(I),uid:$.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:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:R,onGeneratePdf:e.unref(O),onGenerateImage:e.unref(F),onToggleAnnotator:x},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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(J._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:n.value>=r?o.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<=n.value})},null,10,ae))),256))])):(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,le))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,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,n.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,n.value,e.unref(c.dataLabel)({v:n.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Y.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,W))}},ie=Q._export_sfc(ue,[["__scopeId","data-v-93332410"]]);exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./useNestedProp-D_feh7A_.cjs"),c=require("./index-DoD-GxZR.cjs"),X=require("./Title-C2siG5N2.cjs"),L=require("./usePrinter-B4xDG31F.cjs"),Y=require("./vue-ui-skeleton-Nuju6X7l.cjs"),J=require("./PackageVersion-BEtuCME5.cjs"),K=require("./PenAndPaper-BIcmfBvD.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W=["id"],Z={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},ee=["xmlns","viewBox"],te={key:0},ae=["d","stroke-width","stroke"],oe={key:1},le=["x1","y1","x2","y2","stroke-width","stroke"],re=["x","y","font-size","fill","font-weight","text-anchor"],ne={key:5,class:"vue-data-ui-watermark"},se={key:6,ref:"source",dir:"auto"},ue={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(M,{expose:G}){const v=M,{vue_ui_tiremarks:j}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),U=e.ref(null),A=e.ref(0),N=e.ref(0),t=e.computed({get:()=>S(),set:a=>a});function S(){const a=V.useNestedProp({userConfig:v.config,defaultConfig:j});return a.theme?{...V.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=S(),T(),N.value+=1},{deep:!0});const{isPrinting:z,isImaging:I,generatePdf:O,generateImage:F}=L.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?E(a.percentage):n.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{T()});function E(a){let u=t.value.style.chart.animation.speed;const o=Math.abs(a-n.value)/(u*120);function r(){n.value<a?n.value=Math.min(n.value+o,a):n.value>a&&(n.value=Math.max(n.value-o,a)),n.value!==a&&requestAnimationFrame(r)}r()}function T(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),E(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),s=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),b=e.computed(()=>Object.values(s.value).reduce((a,u)=>a+u,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),D=e.ref(100);e.computed(()=>v.dataset.percentage/D.value);const i=e.computed(()=>f.value?{mark:(l.value.height-b.value)/100*.5,space:(l.value.height-b.value)/100*.5}:{mark:(l.value.width-b.value)/100*.5,space:(l.value.width-b.value)/100*.5}),q=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-s.value.left-s.value.right)/100/3:0,d=s.value.left+4+y,h=l.value.width-s.value.right-4-y,p=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,C=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-C}, ${h-k} ${m-C}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-s.value.top-s.value.bottom)/100/3:0,d=s.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=s.value.top+4+y,m=l.value.height-s.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),C=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+C}, ${h+k} ${m-C}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,u,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,u=s.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,u=l.value.height-s.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,u=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-s.value.right+8,u=l.value.height/2+r,o="start"),{x:a,y:u,textAnchor:o,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 R(a){_.value=a,A.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return G({generatePdf:O,generateImage:F,toggleAnnotator:x}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,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:$.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(K.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,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",Z,[(e.openBlock(),e.createBlock(X._sfc_main,{key:`title_${N.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&&P.value?(e.openBlock(),e.createBlock(L.UserOptions,{ref:"details",key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(I),uid:$.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:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:R,onGeneratePdf:e.unref(O),onGenerateImage:e.unref(F),onToggleAnnotator:x},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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(J._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:n.value>=r?o.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<=n.value})},null,10,ae))),256))])):(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,le))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,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,n.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,n.value,e.unref(c.dataLabel)({v:n.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Y.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,W))}},ie=Q._export_sfc(ue,[["__scopeId","data-v-93332410"]]);exports.default=ie;
@@ -1,11 +1,11 @@
1
1
  import { computed as v, ref as p, watch as J, onMounted as ne, openBlock as r, createElementBlock as u, normalizeClass as G, normalizeStyle as K, createBlock as O, createCommentVNode as g, unref as d, createSlots as ue, withCtx as F, renderSlot as _, normalizeProps as L, guardReactiveProps as M, createVNode as ie, Fragment as Q, renderList as V, toDisplayString as ce } from "vue";
2
- import { u as W } from "./useNestedProp-CSVnZVwZ.js";
3
- import { u as ve, c as he, t as de, v as fe, o as pe, e as ge, w as Z, X as me, i as ye, f as ke } from "./index-igxqCP2w.js";
4
- import { _ as _e } from "./Title-DED-PQ7X.js";
5
- import { u as be, U as Ce } from "./usePrinter-CnZYDQXB.js";
6
- import $e from "./vue-ui-skeleton-CWjNNx-k.js";
7
- import { _ as we } from "./PackageVersion-DYk2hOG1.js";
8
- import { P as xe } from "./PenAndPaper-BfgS_5ux.js";
2
+ import { u as W } from "./useNestedProp-CEAfm1tu.js";
3
+ import { u as ve, c as he, t as de, v as fe, o as pe, e as ge, w as Z, X as me, i as ye, f as ke } from "./index-BtL_cLa8.js";
4
+ import { _ as _e } from "./Title-CIsKiWgN.js";
5
+ import { u as be, U as Ce } from "./usePrinter-sRt2SKr2.js";
6
+ import $e from "./vue-ui-skeleton-DjFU2X3P.js";
7
+ import { _ as we } from "./PackageVersion-BV3fHO46.js";
8
+ import { P as xe } from "./PenAndPaper-CCOywdmm.js";
9
9
  import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const Ae = ["id"], Ie = {
11
11
  key: 2,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BHQZE19X.cjs"),Pe=require("./Title-5Vedk01J.cjs"),pe=require("./usePrinter-DVgxBO4o.cjs"),ze=require("./Tooltip-DjCKBAC4.cjs"),Oe=require("./Legend-DPHcmrzd.cjs"),Ve=require("./vue-ui-skeleton-DUNkS05l.cjs"),Ee=require("./DataTable-kMUhutQ4.cjs"),Le=require("./vue-ui-accordion-CRVWlHxs.cjs"),fe=require("./useResponsive-BJ7DTGpm.cjs"),ge=require("./useNestedProp-CwpqC_aE.cjs"),Re=require("./PackageVersion-rnWHRWGI.cjs"),Ae=require("./PenAndPaper-BQl9-uX0.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function me(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,c=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>c&&(c=p),v+=p}return Math.max(d**2*c/v**2,v**2/(d**2*u))}}function ye(n){const{xOffset:d,yOffset:s,width:u,height:c}=n;return{x0:d,y0:s,x1:d+u,y1:s+c}}function Ie(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),c=me(n,s),v=me(u,s);return c>=v}}function De(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const c=n[u],v=c.length;for(let h=0;h<v;h+=1)d.push(c[h])}return d}function qe(n,d){const s={...d,children:n};return ke(s)}function He(n){return(n.x1-n.x0)*(n.y1-n.y0)}function be(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(d),h=n.length,f=n.map(g=>g.normalizedValue||0).reduce((g,k)=>g+k,0),p=f/u,C=f/s;let b=c,w=v;const m=[];if(s>=u){for(let g=0;g<h;g+=1){const k=n[g],x=w+k.normalizedValue/p,B={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,B);w=x,m.push(T)}return m}else{for(let g=0;g<h;g+=1){const k=n[g],x=b+k.normalizedValue/C,B={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,B);b=x,m.push(T)}return m}}function Me(n){const d=X(n),s=d.width,u=d.height;return Math.min(s,u)}function We(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),c=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(c||0)}),v.push(h);return v}function X(n){const{x0:d,y0:s,x1:u,y1:c}=n;return{xOffset:d,yOffset:s,width:u-d,height:c-s}}function Ue(n,d,s,u){let c=n,v=d,h=s,f=u;for(;;){const p=c.length;if(p===0){const m=be(v,h);return f.concat(m)}const C=Me(h),b=c[0],w=c.slice(1,p);if(Ie(v,b,C)){const m=v.concat(b);c=w,v=m,h=h,f=f}else{const m=v.length;let g=0;for(let T=0;T<m;T+=1)g+=v[T].normalizedValue;const k=Ge(h,g),x=be(v,h),B=f.concat(x);c=c,v=[],h=k,f=B}}}function ke(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=We(n.children,He(n)),s=Ue(d,[],n,[]),u=s.length,c=[];for(let h=0;h<u;h+=1)c.push(ke(s[h]));return De(c)}}function Ge(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:c+h,yOffset:v,width:f,height:u};return ye(p)}else{const h=d/s,f=u-h,p={xOffset:c,yOffset:v+h,width:s,height:f};return ye(p)}}const je=n=>(e.pushScopeId("data-v-69853ca9"),n=n(),e.popScopeId(),n),Xe=["id"],Ye=["xmlns","viewBox"],Ze={key:0},Je=["id"],Ke=["stop-color"],Qe=["stop-color"],et=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],tt=["x","y","height","width"],ot={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},lt=je(()=>e.createElementVNode("br",null,null,-1)),at={key:5,class:"vue-data-ui-watermark"},nt=["onClick"],rt={key:0},ut={key:1},st=["innerHTML"],it={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:c}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),m=e.ref([]),g=e.ref(null),k=e.ref(null),x=e.ref(null),B=e.ref(null),T=e.ref(null),Y=e.ref(0),Z=e.ref(0),J=e.ref(0),t=e.computed({get:()=>K(),set:o=>o});function K(){const o=ge.useNestedProp({userConfig:u.config,defaultConfig:c});return o.theme?{...ge.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=K(),Y.value+=1,Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:ee,generatePdf:te,generateImage:oe}=pe.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),_=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),O=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function le(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),le(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{we()});function we(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),le(V.value),t.value.responsive){const o=fe.throttle(()=>{const{width:a,height:l}=fe.useResponsive({chart:g.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null,source:B.value,noTitle:T.value});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(g.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!m.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!m.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),ae=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ne(o,a){return o.value/a}function xe(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ne(a,l);return r.lightenHexColor(o,i<0?0:i)}function re(o,a,l,i){return o.map((y,z)=>{const M=xe(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,i),_e=ne(y,i);return{...y,color:M,proportion:_e,parentName:l,children:y.children?re(y.children,M,y.name,i):void 0}})}const F=e.computed(()=>qe(ae.value.map((o,a)=>{const l=o.children?o.children.reduce((i,y)=>i+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?re(o.children.sort((i,y)=>y.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:O.value.left*2,y0:O.value.top,x1:O.value.width,y1:O.value.height}));function ue({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function se({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Te(o){b.value=o,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:O.value.vbWidth,height:O.value.vbHeight})),$=e.ref(!1);function U(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=U(o,l.children);if(i)return i}}return null}function $e(o){if($.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!U(o.parentId))return;W.value=[U(o.parentId)]}$.value=!$.value}const S=e.ref(null),ie=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:m.value.includes(o.id)?.5:1}))),Se=e.computed(()=>({cy:"treemap-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":""}));function ce(o){$.value=!1,S.value=null,m.value.includes(o.id)?m.value=m.value.filter(a=>a!==o.id):m.value.length<u.dataset.length-1&&m.value.push(o.id),s("selectLegend",ae.value)}const G=e.ref(null);function Ne({datapoint:o,seriesIndex:a}){S.value=o,G.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<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="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}p.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function de(){e.nextTick(()=>{const o=N.value.head.map((i,y)=>[[i.name],[N.value.body[y]],[isNaN(N.value.body[y]/L.value)?"-":N.value.body[y]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const M=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},M,isNaN(N.value.body[z]/L.value)?"-":r.dataLabel({v:N.value.body[z]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function Be(){return F.value}function ve(){_.value.showTable=!_.value.showTable}function he(){_.value.showTooltip=!_.value.showTooltip}const H=e.ref(!1);function j(){H.value=!H.value}return d({getData:Be,generateCsv:de,generateImage:oe,generatePdf:te,toggleTable:ve,toggleTooltip:he,toggleAnnotator:j}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:g,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(ee),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:_.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(te),onGenerateCsv:de,onGenerateImage:e.unref(oe),onToggleTable:ve,onToggleTooltip:he,onToggleAnnotator:j},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Re._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ze,[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,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Qe)],8,Je)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ue(l),width:se(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>$e(l),onMouseenter:()=>Ne({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,et),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ue(l),width:se(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ot,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),lt,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:E(l),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,tt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:O.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${J.value}`,legendSet:ie.value,config:Se.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ce(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:y=>ce(l),style:e.normalizeStyle(`opacity:${m.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),m.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",ut," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",rt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,nt)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ie.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:B,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:_.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:g.value,content:C.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),v.value?(e.openBlock(),e.createBlock(Le.default,{key:8,hideDetails:"",config:{open:_.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${Z.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>_.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,st)]),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)],14,Xe))}},ct=Fe._export_sfc(it,[["__scopeId","data-v-69853ca9"]]);exports.default=ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DoD-GxZR.cjs"),Pe=require("./Title-C2siG5N2.cjs"),pe=require("./usePrinter-B4xDG31F.cjs"),ze=require("./Tooltip-CS4C58T7.cjs"),Oe=require("./Legend-Bbz-hKDf.cjs"),Ve=require("./vue-ui-skeleton-Nuju6X7l.cjs"),Ee=require("./DataTable-CovKV5Yy.cjs"),Le=require("./vue-ui-accordion-CBxsUoGb.cjs"),fe=require("./useResponsive-BJ7DTGpm.cjs"),ge=require("./useNestedProp-D_feh7A_.cjs"),Re=require("./PackageVersion-BEtuCME5.cjs"),Ae=require("./PenAndPaper-BIcmfBvD.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function me(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,c=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>c&&(c=p),v+=p}return Math.max(d**2*c/v**2,v**2/(d**2*u))}}function ye(n){const{xOffset:d,yOffset:s,width:u,height:c}=n;return{x0:d,y0:s,x1:d+u,y1:s+c}}function Ie(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),c=me(n,s),v=me(u,s);return c>=v}}function De(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const c=n[u],v=c.length;for(let h=0;h<v;h+=1)d.push(c[h])}return d}function qe(n,d){const s={...d,children:n};return ke(s)}function He(n){return(n.x1-n.x0)*(n.y1-n.y0)}function be(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(d),h=n.length,f=n.map(g=>g.normalizedValue||0).reduce((g,k)=>g+k,0),p=f/u,C=f/s;let b=c,w=v;const m=[];if(s>=u){for(let g=0;g<h;g+=1){const k=n[g],x=w+k.normalizedValue/p,B={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,B);w=x,m.push(T)}return m}else{for(let g=0;g<h;g+=1){const k=n[g],x=b+k.normalizedValue/C,B={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,B);b=x,m.push(T)}return m}}function Me(n){const d=X(n),s=d.width,u=d.height;return Math.min(s,u)}function We(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),c=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(c||0)}),v.push(h);return v}function X(n){const{x0:d,y0:s,x1:u,y1:c}=n;return{xOffset:d,yOffset:s,width:u-d,height:c-s}}function Ue(n,d,s,u){let c=n,v=d,h=s,f=u;for(;;){const p=c.length;if(p===0){const m=be(v,h);return f.concat(m)}const C=Me(h),b=c[0],w=c.slice(1,p);if(Ie(v,b,C)){const m=v.concat(b);c=w,v=m,h=h,f=f}else{const m=v.length;let g=0;for(let T=0;T<m;T+=1)g+=v[T].normalizedValue;const k=Ge(h,g),x=be(v,h),B=f.concat(x);c=c,v=[],h=k,f=B}}}function ke(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=We(n.children,He(n)),s=Ue(d,[],n,[]),u=s.length,c=[];for(let h=0;h<u;h+=1)c.push(ke(s[h]));return De(c)}}function Ge(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:c+h,yOffset:v,width:f,height:u};return ye(p)}else{const h=d/s,f=u-h,p={xOffset:c,yOffset:v+h,width:s,height:f};return ye(p)}}const je=n=>(e.pushScopeId("data-v-69853ca9"),n=n(),e.popScopeId(),n),Xe=["id"],Ye=["xmlns","viewBox"],Ze={key:0},Je=["id"],Ke=["stop-color"],Qe=["stop-color"],et=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],tt=["x","y","height","width"],ot={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},lt=je(()=>e.createElementVNode("br",null,null,-1)),at={key:5,class:"vue-data-ui-watermark"},nt=["onClick"],rt={key:0},ut={key:1},st=["innerHTML"],it={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:c}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),m=e.ref([]),g=e.ref(null),k=e.ref(null),x=e.ref(null),B=e.ref(null),T=e.ref(null),Y=e.ref(0),Z=e.ref(0),J=e.ref(0),t=e.computed({get:()=>K(),set:o=>o});function K(){const o=ge.useNestedProp({userConfig:u.config,defaultConfig:c});return o.theme?{...ge.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=K(),Y.value+=1,Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:ee,generatePdf:te,generateImage:oe}=pe.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),_=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),O=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function le(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),le(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{we()});function we(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),le(V.value),t.value.responsive){const o=fe.throttle(()=>{const{width:a,height:l}=fe.useResponsive({chart:g.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null,source:B.value,noTitle:T.value});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(g.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!m.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!m.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),ae=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ne(o,a){return o.value/a}function xe(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ne(a,l);return r.lightenHexColor(o,i<0?0:i)}function re(o,a,l,i){return o.map((y,z)=>{const M=xe(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,i),_e=ne(y,i);return{...y,color:M,proportion:_e,parentName:l,children:y.children?re(y.children,M,y.name,i):void 0}})}const F=e.computed(()=>qe(ae.value.map((o,a)=>{const l=o.children?o.children.reduce((i,y)=>i+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?re(o.children.sort((i,y)=>y.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:O.value.left*2,y0:O.value.top,x1:O.value.width,y1:O.value.height}));function ue({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function se({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Te(o){b.value=o,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:O.value.vbWidth,height:O.value.vbHeight})),$=e.ref(!1);function U(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=U(o,l.children);if(i)return i}}return null}function $e(o){if($.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!U(o.parentId))return;W.value=[U(o.parentId)]}$.value=!$.value}const S=e.ref(null),ie=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:m.value.includes(o.id)?.5:1}))),Se=e.computed(()=>({cy:"treemap-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":""}));function ce(o){$.value=!1,S.value=null,m.value.includes(o.id)?m.value=m.value.filter(a=>a!==o.id):m.value.length<u.dataset.length-1&&m.value.push(o.id),s("selectLegend",ae.value)}const G=e.ref(null);function Ne({datapoint:o,seriesIndex:a}){S.value=o,G.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<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="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}p.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function de(){e.nextTick(()=>{const o=N.value.head.map((i,y)=>[[i.name],[N.value.body[y]],[isNaN(N.value.body[y]/L.value)?"-":N.value.body[y]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const M=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},M,isNaN(N.value.body[z]/L.value)?"-":r.dataLabel({v:N.value.body[z]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function Be(){return F.value}function ve(){_.value.showTable=!_.value.showTable}function he(){_.value.showTooltip=!_.value.showTooltip}const H=e.ref(!1);function j(){H.value=!H.value}return d({getData:Be,generateCsv:de,generateImage:oe,generatePdf:te,toggleTable:ve,toggleTooltip:he,toggleAnnotator:j}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:g,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(ee),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:_.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(te),onGenerateCsv:de,onGenerateImage:e.unref(oe),onToggleTable:ve,onToggleTooltip:he,onToggleAnnotator:j},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Re._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ze,[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,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Qe)],8,Je)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ue(l),width:se(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>$e(l),onMouseenter:()=>Ne({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,et),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ue(l),width:se(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ot,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),lt,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:E(l),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,tt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:O.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${J.value}`,legendSet:ie.value,config:Se.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ce(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:y=>ce(l),style:e.normalizeStyle(`opacity:${m.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),m.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",ut," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",rt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,nt)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ie.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:B,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:_.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:g.value,content:C.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),v.value?(e.openBlock(),e.createBlock(Le.default,{key:8,hideDetails:"",config:{open:_.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${Z.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>_.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,st)]),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)],14,Xe))}},ct=Fe._export_sfc(it,[["__scopeId","data-v-69853ca9"]]);exports.default=ct;
@@ -1,16 +1,16 @@
1
1
  import { computed as w, ref as f, watch as Qe, onMounted as et, onBeforeUnmount as tt, openBlock as g, createElementBlock as k, normalizeClass as ze, normalizeStyle as B, createBlock as G, createCommentVNode as O, unref as C, createSlots as ot, withCtx as x, renderSlot as $, normalizeProps as U, guardReactiveProps as X, createVNode as Pe, Fragment as Ae, renderList as Fe, createElementVNode as S, toDisplayString as Y, createTextVNode as Ie, nextTick as lt, pushScopeId as at, popScopeId as nt } from "vue";
2
- import { u as st, c as Le, t as rt, a as ut, p as T, b as it, o as ct, e as dt, d as ae, i as ne, f as K, X as vt, l as Re, G as De, x as Me, y as ht, q as ft, r as pt } from "./index-igxqCP2w.js";
3
- import { _ as gt } from "./Title-DED-PQ7X.js";
4
- import { u as yt, U as mt } from "./usePrinter-CnZYDQXB.js";
5
- import { _ as bt } from "./Tooltip-CHseiJu8.js";
6
- import { L as wt } from "./Legend-FZN9UHoI.js";
7
- import kt from "./vue-ui-skeleton-CWjNNx-k.js";
8
- import { D as Ct } from "./DataTable-CO5C8Cmb.js";
9
- import $t from "./vue-ui-accordion-lF7yVkiT.js";
2
+ import { u as st, c as Le, t as rt, a as ut, p as T, b as it, o as ct, e as dt, d as ae, i as ne, f as K, X as vt, l as Re, G as De, x as Me, y as ht, q as ft, r as pt } from "./index-BtL_cLa8.js";
3
+ import { _ as gt } from "./Title-CIsKiWgN.js";
4
+ import { u as yt, U as mt } from "./usePrinter-sRt2SKr2.js";
5
+ import { _ as bt } from "./Tooltip-B1LgrF9R.js";
6
+ import { L as wt } from "./Legend-Br7MWNDo.js";
7
+ import kt from "./vue-ui-skeleton-DjFU2X3P.js";
8
+ import { D as Ct } from "./DataTable-CQ8fQnex.js";
9
+ import $t from "./vue-ui-accordion-Cjc683tN.js";
10
10
  import { t as xt, u as Tt } from "./useResponsive-CoxXLe23.js";
11
- import { u as Ve } from "./useNestedProp-CSVnZVwZ.js";
12
- import { _ as _t } from "./PackageVersion-DYk2hOG1.js";
13
- import { P as Ot } from "./PenAndPaper-BfgS_5ux.js";
11
+ import { u as Ve } from "./useNestedProp-CEAfm1tu.js";
12
+ import { _ as _t } from "./PackageVersion-BV3fHO46.js";
13
+ import { P as Ot } from "./PenAndPaper-CCOywdmm.js";
14
14
  import { _ as St } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  function Be(a, i) {
16
16
  const s = a.length;
@@ -1,16 +1,16 @@
1
1
  import { useCssVars as Ze, computed as b, ref as r, watch as Me, onMounted as et, onBeforeUnmount as tt, openBlock as u, createElementBlock as i, normalizeClass as X, normalizeStyle as c, createBlock as M, createCommentVNode as g, unref as h, createSlots as at, withCtx as k, renderSlot as _, normalizeProps as U, guardReactiveProps as H, createElementVNode as n, toDisplayString as d, createVNode as re, Fragment as W, renderList as j, withKeys as lt, createTextVNode as ot } from "vue";
2
- import { u as nt, c as ut, t as st, a as rt, p as O, b as it, o as Oe, e as Z, v as S, d as ie, i as ee, f as I, X as dt, s as de, w as ct, x as vt, y as ht, q as pt, r as gt } from "./index-igxqCP2w.js";
2
+ import { u as nt, c as ut, t as st, a as rt, p as O, b as it, o as Oe, e as Z, v as S, d as ie, i as ee, f as I, X as dt, s as de, w as ct, x as vt, y as ht, q as pt, r as gt } from "./index-BtL_cLa8.js";
3
3
  import { t as yt, u as ft } from "./useResponsive-CoxXLe23.js";
4
- import { _ as bt } from "./Title-DED-PQ7X.js";
5
- import { u as mt, U as _t } from "./usePrinter-CnZYDQXB.js";
6
- import { _ as kt } from "./Tooltip-CHseiJu8.js";
7
- import { L as Ie } from "./Legend-FZN9UHoI.js";
8
- import xt from "./vue-ui-skeleton-CWjNNx-k.js";
9
- import $t from "./BaseIcon-CaYP30Aq.js";
10
- import Ct from "./vue-ui-accordion-lF7yVkiT.js";
11
- import { u as Ae } from "./useNestedProp-CSVnZVwZ.js";
12
- import { _ as wt } from "./PackageVersion-DYk2hOG1.js";
13
- import { P as Tt } from "./PenAndPaper-BfgS_5ux.js";
4
+ import { _ as bt } from "./Title-CIsKiWgN.js";
5
+ import { u as mt, U as _t } from "./usePrinter-sRt2SKr2.js";
6
+ import { _ as kt } from "./Tooltip-B1LgrF9R.js";
7
+ import { L as Ie } from "./Legend-Br7MWNDo.js";
8
+ import xt from "./vue-ui-skeleton-DjFU2X3P.js";
9
+ import $t from "./BaseIcon-BHwqOTt4.js";
10
+ import Ct from "./vue-ui-accordion-Cjc683tN.js";
11
+ import { u as Ae } from "./useNestedProp-CEAfm1tu.js";
12
+ import { _ as wt } from "./PackageVersion-BV3fHO46.js";
13
+ import { P as Tt } from "./PenAndPaper-CCOywdmm.js";
14
14
  import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const Nt = ["id"], Pt = ["onClick"], St = ["xmlns", "viewBox"], Vt = ["id"], Ft = ["stop-color"], zt = ["stop-color"], Mt = ["x", "y", "width", "height", "fill", "rx"], Ot = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], It = ["x2", "y1", "y2", "stroke", "stroke-width"], At = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bt = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], Dt = ["x", "y", "font-size", "fill", "font-weight"], Rt = ["x", "y", "font-size", "fill", "font-weight"], Xt = ["x", "y", "font-size", "fill", "font-weight"], Et = ["y", "width", "height", "fill", "onMouseenter"], Gt = {
16
16
  key: 6,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BHQZE19X.cjs"),de=require("./useResponsive-BJ7DTGpm.cjs"),Be=require("./Title-5Vedk01J.cjs"),ve=require("./usePrinter-DVgxBO4o.cjs"),Ee=require("./Tooltip-DjCKBAC4.cjs"),he=require("./Legend-DPHcmrzd.cjs"),Le=require("./vue-ui-skeleton-DUNkS05l.cjs"),Pe=require("./BaseIcon-2ZD3jgGz.cjs"),ze=require("./vue-ui-accordion-CRVWlHxs.cjs"),pe=require("./useNestedProp-CwpqC_aE.cjs"),De=require("./PackageVersion-rnWHRWGI.cjs"),Fe=require("./PenAndPaper-BQl9-uX0.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ie=["onClick"],Ae=["xmlns","viewBox"],Re=["id"],qe=["stop-color"],He=["stop-color"],Xe=["x","y","width","height","fill","rx"],Ue=["x","y","width","height","fill","rx","stroke","stroke-width"],je=["x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],We=["x","y","text-anchor","font-size","fill","font-weight"],Ye=["x","y","font-size","fill","font-weight"],Ke=["x","y","font-size","fill","font-weight"],Je=["x","y","font-size","fill","font-weight"],Qe=["y","width","height","fill","onMouseenter"],Ze={key:6,class:"vue-data-ui-watermark"},et=["onClick"],tt={style:"width:100%;padding-top: 36px;position:relative"},lt={class:"vue-ui-data-table"},at={key:0},ot={style:{width:"100%"}},nt=["data-cell"],rt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ut=["data-cell"],st={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it=["data-cell"],ct={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},dt=["data-cell"],vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ht=["data-cell"],pt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},yt=["data-cell"],gt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ft=["data-cell"],mt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ye,{expose:ge,emit:fe}){const y=ye;e.useCssVars(l=>({"56cbc011":l.tdo}));const{vue_ui_vertical_bar:me}=n.useConfig(),B=e.computed(()=>!!y.dataset&&y.dataset.length),C=e.ref(n.createUid()),be=e.ref(null),D=e.ref(!1),F=e.ref(""),E=e.ref(0),ke=e.ref(null),q=e.ref(0),N=e.ref(null),H=e.ref(null),M=e.ref(null),X=e.ref(null),U=e.ref(null),j=e.ref(0),O=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=pe.useNestedProp({userConfig:y.config,defaultConfig:me});return l.theme?{...pe.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[l.theme]||y.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>y.config,l=>{t.value=G(),te(),j.value+=1,O.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap},{deep:!0}),e.watch(()=>y.dataset,P,{deep:!0});const{isPrinting:W,isImaging:Y,generatePdf:K,generateImage:J}=ve.usePrinter({elementId:`vue-ui-vertical-bar_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),Z=e.ref(null),ee=e.ref(!1),_e=e.computed(()=>t.value.table.responsiveBreakpoint),L=e.ref(null);e.onMounted(()=>{te()});function te(){if(n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),E.value=y.dataset.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0),xe(),t.value.responsive){const l=de.throttle(()=>{const{width:o,height:a}=de.useResponsive({chart:N.value,title:t.value.style.chart.title.text?H.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:X.value,noTitle:U.value});oe.value=o,s.value=a/E.value-c.value*2});L.value=new ResizeObserver(l),L.value.observe(N.value.parentNode)}}e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});function xe(){new ResizeObserver(o=>{o.forEach(a=>{ee.value=a.contentRect.width<_e.value})}).observe(Z.value)}const p=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),le=e.computed(()=>p.value.sortDesc),_=e.computed(()=>(y.dataset.forEach((l,o)=>{!l.value&&!l.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),l.children&&(n.objectIsEmpty(l.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):l.children.forEach((a,r)=>{[null,void 0].includes(a.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),y.dataset.map((l,o)=>{const a=`vertical_parent_${o}_${C.value}`,r=l.children&&l.children.length>0,v=n.checkNaN(l.value?l.value:r?l.children.map(h=>h.value||0).reduce((h,b)=>h+b,0):0),i=v>=0?1:-1;return{...l,id:a,shape:"square",opacity:f.value.includes(a)?.5:1,value:Math.abs(v),sign:i,hasChildren:r,isChild:!1,segregate:()=>V(a),isSegregated:f.value.includes(a),color:n.convertColorToHex(l.color)||Q.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!l.children||!l.children.length?[]:l.children.toSorted((h,b)=>le.value?b.value-h.value:h.value-b.value).map((h,b)=>({...h,value:n.checkNaN(Math.abs(h.value)),sign:h.value>=0?1:-1,isChild:!0,parentId:a,parentName:l.name,parentValue:v,parentSign:i,id:`vertical_child_${o}_${b}_${C.value}`,childIndex:b,color:n.convertColorToHex(h.color)||n.convertColorToHex(l.color)||Q.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((h,b)=>({...h,isFirstChild:b===0,isLastChild:b===l.children.length-1}))}}).toSorted((l,o)=>le.value?o.value-l.value:l.value-o.value))),ae=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),Ne=e.computed(()=>(s.value+c.value)*E.value),oe=e.ref(512),d=e.computed(()=>({width:oe.value,height:Ne.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:d.value.padding.top+d.value.padding.bottom+d.value.height,top:d.value.padding.top,left:d.value.padding.left,right:d.value.width-d.value.padding.right,bottom:d.value.padding.top+d.value.height,width:d.value.width-(d.value.padding.left+d.value.padding.right)}));function P(){E.value=x.value.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0)}const f=e.ref([]);function V(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l),P(),fe("selectLegend",x.value)}const x=e.computed(()=>_.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>x.value.map(l=>Math.abs(l.value)).reduce((l,o)=>l+o,0));function ne(l,o=!1,a=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(l)/m.value*100),s:"%",r:a}):Math.abs(l)/m.value}const w=e.computed(()=>x.value.flatMap(l=>l.hasChildren?l.children:l)),$=e.computed(()=>w.value.map(l=>l.sign).includes(-1)),we=e.computed(()=>Math.max(...x.value.flatMap(l=>l.children&&l.children.length?Math.max(...l.children.map(o=>o.value)):l.value)));function k(l){const o=l/we.value;return u.value.width/($.value?2:1)*o}function $e(l){return k(l)+u.value.left}function T(l,o){const a=x.value.find(i=>i.id===l.parentId),r=u.value.top+(c.value+s.value)*o,v=a.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:a.name,value:[void 0,NaN,null].includes(a.value)?"":a.sign===1?a.value:-a.value,percentageToTotal:isNaN(a.value/m.value)?"":ne(a.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:a.sign}}function Se(){return x.value}const I=e.ref(null),A=e.ref(null);function Ve(l,o){A.value={datapoint:l,seriesIndex:o,series:_.value,config:t.value},D.value=!0,I.value=l.id;let a="";const r=l.isChild?l.parentName:l.name,v=l.isChild?l.name:"",i=t.value.style.chart.tooltip.customFormat;n.isFunction(i)&&n.functionReturnsString(()=>i({datapoint:l,series:_.value,config:t.value,seriesIndex:o}))?F.value=i({datapoint:l,series:_.value,config:t.value,seriesIndex:o}):(a+=`<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-DoD-GxZR.cjs"),de=require("./useResponsive-BJ7DTGpm.cjs"),Be=require("./Title-C2siG5N2.cjs"),ve=require("./usePrinter-B4xDG31F.cjs"),Ee=require("./Tooltip-CS4C58T7.cjs"),he=require("./Legend-Bbz-hKDf.cjs"),Le=require("./vue-ui-skeleton-Nuju6X7l.cjs"),Pe=require("./BaseIcon-DemqZ_13.cjs"),ze=require("./vue-ui-accordion-CBxsUoGb.cjs"),pe=require("./useNestedProp-D_feh7A_.cjs"),De=require("./PackageVersion-BEtuCME5.cjs"),Fe=require("./PenAndPaper-BIcmfBvD.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ie=["onClick"],Ae=["xmlns","viewBox"],Re=["id"],qe=["stop-color"],He=["stop-color"],Xe=["x","y","width","height","fill","rx"],Ue=["x","y","width","height","fill","rx","stroke","stroke-width"],je=["x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],We=["x","y","text-anchor","font-size","fill","font-weight"],Ye=["x","y","font-size","fill","font-weight"],Ke=["x","y","font-size","fill","font-weight"],Je=["x","y","font-size","fill","font-weight"],Qe=["y","width","height","fill","onMouseenter"],Ze={key:6,class:"vue-data-ui-watermark"},et=["onClick"],tt={style:"width:100%;padding-top: 36px;position:relative"},lt={class:"vue-ui-data-table"},at={key:0},ot={style:{width:"100%"}},nt=["data-cell"],rt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ut=["data-cell"],st={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it=["data-cell"],ct={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},dt=["data-cell"],vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ht=["data-cell"],pt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},yt=["data-cell"],gt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ft=["data-cell"],mt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ye,{expose:ge,emit:fe}){const y=ye;e.useCssVars(l=>({"56cbc011":l.tdo}));const{vue_ui_vertical_bar:me}=n.useConfig(),B=e.computed(()=>!!y.dataset&&y.dataset.length),C=e.ref(n.createUid()),be=e.ref(null),D=e.ref(!1),F=e.ref(""),E=e.ref(0),ke=e.ref(null),q=e.ref(0),N=e.ref(null),H=e.ref(null),M=e.ref(null),X=e.ref(null),U=e.ref(null),j=e.ref(0),O=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=pe.useNestedProp({userConfig:y.config,defaultConfig:me});return l.theme?{...pe.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[l.theme]||y.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>y.config,l=>{t.value=G(),te(),j.value+=1,O.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap},{deep:!0}),e.watch(()=>y.dataset,P,{deep:!0});const{isPrinting:W,isImaging:Y,generatePdf:K,generateImage:J}=ve.usePrinter({elementId:`vue-ui-vertical-bar_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),Z=e.ref(null),ee=e.ref(!1),_e=e.computed(()=>t.value.table.responsiveBreakpoint),L=e.ref(null);e.onMounted(()=>{te()});function te(){if(n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),E.value=y.dataset.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0),xe(),t.value.responsive){const l=de.throttle(()=>{const{width:o,height:a}=de.useResponsive({chart:N.value,title:t.value.style.chart.title.text?H.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:X.value,noTitle:U.value});oe.value=o,s.value=a/E.value-c.value*2});L.value=new ResizeObserver(l),L.value.observe(N.value.parentNode)}}e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});function xe(){new ResizeObserver(o=>{o.forEach(a=>{ee.value=a.contentRect.width<_e.value})}).observe(Z.value)}const p=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),le=e.computed(()=>p.value.sortDesc),_=e.computed(()=>(y.dataset.forEach((l,o)=>{!l.value&&!l.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),l.children&&(n.objectIsEmpty(l.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):l.children.forEach((a,r)=>{[null,void 0].includes(a.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),y.dataset.map((l,o)=>{const a=`vertical_parent_${o}_${C.value}`,r=l.children&&l.children.length>0,v=n.checkNaN(l.value?l.value:r?l.children.map(h=>h.value||0).reduce((h,b)=>h+b,0):0),i=v>=0?1:-1;return{...l,id:a,shape:"square",opacity:f.value.includes(a)?.5:1,value:Math.abs(v),sign:i,hasChildren:r,isChild:!1,segregate:()=>V(a),isSegregated:f.value.includes(a),color:n.convertColorToHex(l.color)||Q.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!l.children||!l.children.length?[]:l.children.toSorted((h,b)=>le.value?b.value-h.value:h.value-b.value).map((h,b)=>({...h,value:n.checkNaN(Math.abs(h.value)),sign:h.value>=0?1:-1,isChild:!0,parentId:a,parentName:l.name,parentValue:v,parentSign:i,id:`vertical_child_${o}_${b}_${C.value}`,childIndex:b,color:n.convertColorToHex(h.color)||n.convertColorToHex(l.color)||Q.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((h,b)=>({...h,isFirstChild:b===0,isLastChild:b===l.children.length-1}))}}).toSorted((l,o)=>le.value?o.value-l.value:l.value-o.value))),ae=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),Ne=e.computed(()=>(s.value+c.value)*E.value),oe=e.ref(512),d=e.computed(()=>({width:oe.value,height:Ne.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:d.value.padding.top+d.value.padding.bottom+d.value.height,top:d.value.padding.top,left:d.value.padding.left,right:d.value.width-d.value.padding.right,bottom:d.value.padding.top+d.value.height,width:d.value.width-(d.value.padding.left+d.value.padding.right)}));function P(){E.value=x.value.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0)}const f=e.ref([]);function V(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l),P(),fe("selectLegend",x.value)}const x=e.computed(()=>_.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>x.value.map(l=>Math.abs(l.value)).reduce((l,o)=>l+o,0));function ne(l,o=!1,a=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(l)/m.value*100),s:"%",r:a}):Math.abs(l)/m.value}const w=e.computed(()=>x.value.flatMap(l=>l.hasChildren?l.children:l)),$=e.computed(()=>w.value.map(l=>l.sign).includes(-1)),we=e.computed(()=>Math.max(...x.value.flatMap(l=>l.children&&l.children.length?Math.max(...l.children.map(o=>o.value)):l.value)));function k(l){const o=l/we.value;return u.value.width/($.value?2:1)*o}function $e(l){return k(l)+u.value.left}function T(l,o){const a=x.value.find(i=>i.id===l.parentId),r=u.value.top+(c.value+s.value)*o,v=a.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:a.name,value:[void 0,NaN,null].includes(a.value)?"":a.sign===1?a.value:-a.value,percentageToTotal:isNaN(a.value/m.value)?"":ne(a.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:a.sign}}function Se(){return x.value}const I=e.ref(null),A=e.ref(null);function Ve(l,o){A.value={datapoint:l,seriesIndex:o,series:_.value,config:t.value},D.value=!0,I.value=l.id;let a="";const r=l.isChild?l.parentName:l.name,v=l.isChild?l.name:"",i=t.value.style.chart.tooltip.customFormat;n.isFunction(i)&&n.functionReturnsString(()=>i({datapoint:l,series:_.value,config:t.value,seriesIndex:o}))?F.value=i({datapoint:l,series:_.value,config:t.value,seriesIndex:o}):(a+=`<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 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${l.color}"/></svg> ${r}</div>
3
3
  ${v?`<div>${v}</div>`:""}
4
4
  </div>`,t.value.style.chart.tooltip.showValue&&(a+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.sign===1?l.value:-l.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:l.sign===1?l.value:-l.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(a+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(l.value)/m.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,l.isChild&&(a+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(l.value)/Math.abs(l.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),F.value=`<div style="text-align:left">${a}</div>`)}function re(l,o,a,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&&l>=0?-l:l),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&l>=0?-l:l),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:a}),i=`(${ne(l,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${i}`:""}`}const g=e.computed(()=>{const l=[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=w.value.map(a=>a.isChild?a.isFirstChild?{color:a.color,parentName:a.parentName,parentValue:a.parentValue,percentageToTotal:a.parentValue/m.value,childName:a.name,childValue:a.sign===1?a.value:-a.value,childPercentageToParent:Math.abs(a.value)/Math.abs(a.parentValue),childPercentageToTotal:Math.abs(a.value)/m.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:a.name,childValue:a.sign===1?a.value:-a.value,childPercentageToParent:Math.abs(a.value)/Math.abs(a.parentValue),childPercentageToTotal:Math.abs(a.value)/m.value}:{color:a.color,parentName:a.name,parentValue:a.sign===1?a.value:-a.value,percentageToTotal:Math.abs(a.value)/m.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:l,body:o}});function ue(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=g.value.head,a=g.value.body.map(i=>[i.parentName,i.parentValue,i.percentageToTotal,i.childName,i.childValue,i.childPercentageToParent,i.childPercentageToTotal]),r=l.concat([o]).concat(a),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 Te(l){S.value=l,q.value+=1}function se(){p.value.showTable=!p.value.showTable}function ie(){p.value.sortDesc=!p.value.sortDesc,P()}function ce(){p.value.showTooltip=!p.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return ge({getData:Se,recalculateHeight:P,generatePdf:K,generateCsv:ue,generateImage:J,toggleTable:se,toggleSort:ie,toggleTooltip:ce,toggleAnnotator:R}),(l,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:N,id:`vue-ui-vertical-bar_${C.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%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,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:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${j.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&&B.value?(e.openBlock(),e.createBlock(ve.UserOptions,{ref_key:"details",ref:be,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(W),uid:C.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:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(K),onGenerateCsv:ue,onGenerateImage:e.unref(J),onToggleTable:se,onToggleSort:ie,onToggleTooltip:ce,onToggleAnnotator:R},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):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(he.Legend,{key:`legend_top_${O.value}`,legendSet:_.value,config:ae.value,onClickMarker:o[0]||(o[0]=({legend:a})=>V(a.id))},{item:e.withCtx(({legend:a,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:v=>V(a.id),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:a.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:r})),13,Ie)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createElementBlock("svg",{key:5,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 ${d.value.width<=0?10:d.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(De._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${C.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(a.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,He)],8,Re))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(a.sign===1?0:k(a.value)<=0?1e-4:k(a.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(a.value)<=0?1e-4:k(a.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,Xe)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(a.sign===1?0:k(a.value)<=0?1e-4:k(a.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(a.value)<=0?1e-4:k(a.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${C.value}_${r})`:e.unref(n.setOpacity)(a.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?a.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,Ue),(!a.isChild||a.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==w.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,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,je)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:1,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,Ge)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(a.sign===1?-12:12)+(a.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):$e(a.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||a.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(re(a.value,a,r,a.sign)),9,We),(a.isChild||!a.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"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(a.name),9,Ye)):e.createCommentVNode("",!0),a.isChild&&a.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:T(a,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(T(a,r).name),9,Ke)):e.createCommentVNode("",!0),a.isChild&&a.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:T(a,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(re(T(a,r).value),T(a,r),r,a.parentSign||a.sign),9,Je)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:d.value.width<=0?1e-4:d.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:I.value===a.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>Ve(a,r),onMouseleave:o[1]||(o[1]=v=>{ke.value=null,D.value=!1,I.value=null})},null,40,Qe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.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(he.Legend,{key:`legend_bottom_${O.value}`,legendSet:_.value,config:ae.value,onClickMarker:o[2]||(o[2]=({legend:a})=>V(a.id))},{item:e.withCtx(({legend:a,index:r})=>[e.createElementVNode("div",{onClick:v=>V(a.id),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:a.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:r})),13,et)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:_.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:X,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ee._sfc_main,{show:p.value.showTooltip&&D.value&&f.value.length<y.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:N.value,content:F.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(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),B.value?(e.openBlock(),e.createBlock(ze.default,{key:10,hideDetails:"",config:{open:p.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:Z,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",tt,[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]=a=>p.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(a=>p.value.showTable=!1,["enter"]))},[e.createVNode(Pe.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":ee.value})},[e.createElementVNode("table",lt,[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",at,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(g.value.head,a=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",ot,e.toDisplayString(a),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(m.value)?"":m.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(g.value.body,(a,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":g.value.head[0]??""},[e.createElementVNode("div",rt,[a.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${a.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.parentName),1)])],12,nt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[1]??""},[e.createElementVNode("div",st,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.parentValue)?"":a.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ut),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[2]??""},[e.createElementVNode("div",ct,e.toDisplayString(["",NaN,void 0].includes(a.percentageToTotal)?"":`${(a.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,it),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[3]??""},[e.createElementVNode("div",vt,e.toDisplayString(a.childName),1)],12,dt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[4]??""},[e.createElementVNode("div",pt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.childValue)?"":a.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ht),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[5]??""},[e.createElementVNode("div",gt,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToParent)?"":`${(a.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,yt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[6]??""},[e.createElementVNode("div",mt,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToTotal)?"":`${(a.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,ft)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Oe))}},kt=Me._export_sfc(bt,[["__scopeId","data-v-8427a305"]]);exports.default=kt;
@@ -1,16 +1,16 @@
1
1
  import { computed as v, ref as c, watch as Ae, onMounted as Je, onBeforeUnmount as Ke, openBlock as s, createElementBlock as n, normalizeClass as Fe, normalizeStyle as Z, createBlock as N, createCommentVNode as f, unref as h, createSlots as Qe, withCtx as m, renderSlot as g, normalizeProps as G, guardReactiveProps as R, createVNode as ze, createElementVNode as k, Fragment as I, renderList as U, toDisplayString as S, createTextVNode as Ne, nextTick as Ze, pushScopeId as et, popScopeId as tt } from "vue";
2
- import { u as at, c as lt, t as ot, a as ut, p as O, o as st, e as se, g as rt, b as nt, i as j, f as x, X as it, s as ct, w as vt, G as dt, L as ht, d as pt, x as yt, y as ft, q as gt, r as mt } from "./index-igxqCP2w.js";
2
+ import { u as at, c as lt, t as ot, a as ut, p as O, o as st, e as se, g as rt, b as nt, i as j, f as x, X as it, s as ct, w as vt, G as dt, L as ht, d as pt, x as yt, y as ft, q as gt, r as mt } from "./index-BtL_cLa8.js";
3
3
  import { t as bt, u as wt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as kt } from "./Title-DED-PQ7X.js";
5
- import { u as xt, U as Ct } from "./usePrinter-CnZYDQXB.js";
6
- import { _ as _t } from "./Tooltip-CHseiJu8.js";
7
- import { D as $t } from "./DataTable-CO5C8Cmb.js";
8
- import { L as Tt } from "./Legend-FZN9UHoI.js";
9
- import It from "./vue-ui-skeleton-CWjNNx-k.js";
10
- import St from "./vue-ui-accordion-lF7yVkiT.js";
11
- import { u as Oe } from "./useNestedProp-CSVnZVwZ.js";
12
- import { _ as Pt } from "./PackageVersion-DYk2hOG1.js";
13
- import { P as Lt } from "./PenAndPaper-BfgS_5ux.js";
4
+ import { _ as kt } from "./Title-CIsKiWgN.js";
5
+ import { u as xt, U as Ct } from "./usePrinter-sRt2SKr2.js";
6
+ import { _ as _t } from "./Tooltip-B1LgrF9R.js";
7
+ import { D as $t } from "./DataTable-CQ8fQnex.js";
8
+ import { L as Tt } from "./Legend-Br7MWNDo.js";
9
+ import It from "./vue-ui-skeleton-DjFU2X3P.js";
10
+ import St from "./vue-ui-accordion-Cjc683tN.js";
11
+ import { u as Oe } from "./useNestedProp-CEAfm1tu.js";
12
+ import { _ as Pt } from "./PackageVersion-BV3fHO46.js";
13
+ import { P as Lt } from "./PenAndPaper-CCOywdmm.js";
14
14
  import { _ as At } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const Be = (E) => (et("data-v-6c74341a"), E = E(), tt(), E), Ft = ["id"], zt = ["xmlns", "viewBox"], Nt = ["id"], Ot = ["stop-color"], Bt = ["stop-color"], Vt = ["id"], Mt = /* @__PURE__ */ Be(() => /* @__PURE__ */ k("feGaussianBlur", {
16
16
  in: "SourceGraphic",