vue-data-ui 2.3.82 → 2.3.83

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 (143) hide show
  1. package/dist/{Arrow-BTO6BS7p.cjs → Arrow-CcR4ZIEI.cjs} +1 -1
  2. package/dist/{Arrow-D-Ef1hLL.js → Arrow-M7fNgsWN.js} +1 -1
  3. package/dist/{BaseIcon-DS9Fpauh.cjs → BaseIcon-BHuHlqT8.cjs} +1 -1
  4. package/dist/{BaseIcon-CVe5ECp8.js → BaseIcon-DY4dOkkj.js} +1 -1
  5. package/dist/{DataTable-BfvpbyB5.cjs → DataTable-BYpARrqG.cjs} +1 -1
  6. package/dist/{DataTable-OKHTStDc.js → DataTable-NaCUmiJt.js} +2 -2
  7. package/dist/{Legend-Bt4nNAHo.js → Legend-CK7IfQW2.js} +1 -1
  8. package/dist/{Legend-B3B4K_lr.cjs → Legend-D8icDk38.cjs} +1 -1
  9. package/dist/{Shape-C0HIiqHY.js → Shape-BBQ0BAq6.js} +1 -1
  10. package/dist/{Shape-Dg4DHNlU.cjs → Shape-BSA-6ATj.cjs} +1 -1
  11. package/dist/{Slicer-BPvgOo6Z.cjs → Slicer-BEiXplka.cjs} +1 -1
  12. package/dist/{Slicer-CB-YgfIM.js → Slicer-BSNY_ZDL.js} +2 -2
  13. package/dist/{Title-B238VbIb.cjs → Title-1LPI4Pd7.cjs} +1 -1
  14. package/dist/{Title-CXeDgAE7.js → Title-I5LLf5MT.js} +1 -1
  15. package/dist/{Tooltip-hihJcWT0.cjs → Tooltip-BbUUQjWg.cjs} +1 -1
  16. package/dist/{Tooltip-_e0VoMC-.js → Tooltip-UuN-HISf.js} +1 -1
  17. package/dist/{index-B6m-GhsP.js → index-B6bGaBzE.js} +1 -1
  18. package/dist/{index-CeMgFh6-.cjs → index-CuTsdJDI.cjs} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +2 -0
  21. package/dist/types/vue-data-ui.d.ts +2 -0
  22. package/dist/{useNestedProp-BrcBWysp.js → useNestedProp-BS8PvQ5U.js} +1 -1
  23. package/dist/{useNestedProp-CD3RA8XO.cjs → useNestedProp-CAjEiadB.cjs} +1 -1
  24. package/dist/{usePrinter-_rbdfvVi.cjs → usePrinter-D47Cl-_I.cjs} +1 -1
  25. package/dist/{usePrinter-BkKBQlCO.js → usePrinter-DthbDD1O.js} +1 -1
  26. package/dist/{vue-data-ui-wvh5ZEeD.js → vue-data-ui-BesfxeQR.js} +57 -57
  27. package/dist/{vue-data-ui-BgHHdUNr.cjs → vue-data-ui-ZBy4ZyPH.cjs} +1 -1
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/{vue-ui-3d-bar-DNHZheVL.js → vue-ui-3d-bar-BmCupY_F.js} +7 -7
  31. package/dist/{vue-ui-3d-bar-ia_wUTc1.cjs → vue-ui-3d-bar-ndPdPajx.cjs} +1 -1
  32. package/dist/{vue-ui-accordion-BygOGjRr.js → vue-ui-accordion-BblXoBgi.js} +3 -3
  33. package/dist/{vue-ui-accordion-CH_rY04P.cjs → vue-ui-accordion-DVK9JwAM.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-BZrN9gk2.js → vue-ui-age-pyramid-CzgKgRqy.js} +8 -8
  35. package/dist/{vue-ui-age-pyramid-DftioDeW.cjs → vue-ui-age-pyramid-ua3MdmCq.cjs} +1 -1
  36. package/dist/{vue-ui-annotator-DRpBiqTN.js → vue-ui-annotator-CQryTk_7.js} +1 -1
  37. package/dist/{vue-ui-annotator-BGYJrkr0.cjs → vue-ui-annotator-dTbuigK7.cjs} +1 -1
  38. package/dist/{vue-ui-candlestick-CVgaOkTY.cjs → vue-ui-candlestick-BSDnT9kJ.cjs} +1 -1
  39. package/dist/{vue-ui-candlestick-BP5nrvrA.js → vue-ui-candlestick-DH3-JcNQ.js} +9 -9
  40. package/dist/{vue-ui-carousel-table-Dtkm1_OH.js → vue-ui-carousel-table-BoLJlPIf.js} +4 -4
  41. package/dist/{vue-ui-carousel-table-Cd93n0fJ.cjs → vue-ui-carousel-table-DxDDpzyO.cjs} +1 -1
  42. package/dist/{vue-ui-chestnut-B6_rC31R.cjs → vue-ui-chestnut-BHo_m_eO.cjs} +1 -1
  43. package/dist/{vue-ui-chestnut-CKviQSxK.js → vue-ui-chestnut-DFCI0g97.js} +6 -6
  44. package/dist/{vue-ui-cursor-_egqr6DD.js → vue-ui-cursor-DjVXzBDJ.js} +2 -2
  45. package/dist/{vue-ui-cursor-C4FRP_Nc.cjs → vue-ui-cursor-WpptD__s.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-DUgt8PIq.js → vue-ui-dashboard-Cms5XJQ9.js} +2 -2
  47. package/dist/{vue-ui-dashboard-iPdvuNQ9.cjs → vue-ui-dashboard-DewqEIU8.cjs} +1 -1
  48. package/dist/{vue-ui-digits-CcrjtXtk.js → vue-ui-digits-C0YWch_M.js} +2 -2
  49. package/dist/{vue-ui-digits-OWEvFsfq.cjs → vue-ui-digits-ChM4kqZY.cjs} +1 -1
  50. package/dist/{vue-ui-donut-evolution-PtyzK7G6.cjs → vue-ui-donut-evolution-ConFJEQl.cjs} +1 -1
  51. package/dist/{vue-ui-donut-evolution-D1LXnQfC.js → vue-ui-donut-evolution-bM3kCJUD.js} +9 -9
  52. package/dist/{vue-ui-donut-Dmr11NmB.js → vue-ui-donut-jnS5SfdU.js} +9 -9
  53. package/dist/{vue-ui-donut-D2SQezST.cjs → vue-ui-donut-wewLho92.cjs} +1 -1
  54. package/dist/{vue-ui-dumbbell-CNX0gxiM.js → vue-ui-dumbbell-CJr-rur-.js} +8 -8
  55. package/dist/{vue-ui-dumbbell-Bbv_WYY2.cjs → vue-ui-dumbbell-DhZL7zEK.cjs} +1 -1
  56. package/dist/{vue-ui-flow-FsawfZQj.js → vue-ui-flow-C0vcVRWr.js} +7 -7
  57. package/dist/{vue-ui-flow-DRjha-Xx.cjs → vue-ui-flow-Cpwccu5D.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-Eev5Q8w4.js → vue-ui-galaxy-B3FMALkv.js} +9 -9
  59. package/dist/{vue-ui-galaxy-BCMTqPX1.cjs → vue-ui-galaxy-BfcyfvBH.cjs} +1 -1
  60. package/dist/{vue-ui-gauge-DBxTCkge.js → vue-ui-gauge-BwDm2zQl.js} +5 -5
  61. package/dist/{vue-ui-gauge-CPMlQvxU.cjs → vue-ui-gauge-CzhpktL0.cjs} +1 -1
  62. package/dist/{vue-ui-gizmo-BAiNxz8X.js → vue-ui-gizmo-D9EQ3r0O.js} +2 -2
  63. package/dist/{vue-ui-gizmo-CxnoYWwd.cjs → vue-ui-gizmo-DA_RRisA.cjs} +1 -1
  64. package/dist/{vue-ui-heatmap-BpHByyVR.js → vue-ui-heatmap-DAOrAKZ7.js} +8 -8
  65. package/dist/{vue-ui-heatmap-DvsH2Au0.cjs → vue-ui-heatmap-DgeFeTzQ.cjs} +1 -1
  66. package/dist/{vue-ui-kpi-DFquN6Ls.cjs → vue-ui-kpi-DP430jb8.cjs} +1 -1
  67. package/dist/{vue-ui-kpi-CyvW8X1f.js → vue-ui-kpi-_-b-280h.js} +3 -3
  68. package/dist/{vue-ui-mini-loader--6qogu7d.js → vue-ui-mini-loader-BHLoiHsr.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-DIa_OVyM.cjs → vue-ui-mini-loader-CPtiWFfd.cjs} +1 -1
  70. package/dist/{vue-ui-molecule-YJ0bXwbB.js → vue-ui-molecule-BeBh4FNr.js} +9 -9
  71. package/dist/{vue-ui-molecule-CbLmk-Fv.cjs → vue-ui-molecule-Bo_vv3KE.cjs} +1 -1
  72. package/dist/{vue-ui-mood-radar-B8QHrApG.js → vue-ui-mood-radar-BD9bJ50Z.js} +9 -9
  73. package/dist/{vue-ui-mood-radar-BV5RnpiH.cjs → vue-ui-mood-radar-BgM0X3vV.cjs} +1 -1
  74. package/dist/{vue-ui-nested-donuts-CLhrY6y1.js → vue-ui-nested-donuts-Cgto3tF8.js} +9 -9
  75. package/dist/{vue-ui-nested-donuts-DKAkxEPd.cjs → vue-ui-nested-donuts-eCox9YV-.cjs} +1 -1
  76. package/dist/{vue-ui-onion-CkknGnDm.cjs → vue-ui-onion-Bg4bO8zm.cjs} +1 -1
  77. package/dist/{vue-ui-onion-BXdEzlmA.js → vue-ui-onion-CuNbMdeS.js} +9 -9
  78. package/dist/{vue-ui-parallel-coordinate-plot-CE31yJK_.cjs → vue-ui-parallel-coordinate-plot-Cn_H0TAS.cjs} +1 -1
  79. package/dist/{vue-ui-parallel-coordinate-plot-4XBOTcO8.js → vue-ui-parallel-coordinate-plot-VJfABpcX.js} +10 -10
  80. package/dist/{vue-ui-quadrant-D9_7g38o.cjs → vue-ui-quadrant-CsBneYsu.cjs} +1 -1
  81. package/dist/{vue-ui-quadrant-CgMsyw3Q.js → vue-ui-quadrant-vM1usRVi.js} +10 -10
  82. package/dist/{vue-ui-quick-chart-Cgbq5tLg.js → vue-ui-quick-chart-BGVhBISR.js} +7 -7
  83. package/dist/{vue-ui-quick-chart-sMi9mLRt.cjs → vue-ui-quick-chart-Be96p8ex.cjs} +1 -1
  84. package/dist/{vue-ui-radar-BvN2WTtC.js → vue-ui-radar-B_GDv1OM.js} +10 -10
  85. package/dist/{vue-ui-radar-CkcPJX_6.cjs → vue-ui-radar-CkX69xOF.cjs} +1 -1
  86. package/dist/{vue-ui-rating-DfKMxLTK.js → vue-ui-rating-ANVaulU4.js} +2 -2
  87. package/dist/{vue-ui-rating-Cl-ncmAS.cjs → vue-ui-rating-C2XpUtCE.cjs} +1 -1
  88. package/dist/{vue-ui-relation-circle-CJP9zuqV.cjs → vue-ui-relation-circle-4JRcycOA.cjs} +1 -1
  89. package/dist/{vue-ui-relation-circle-DV5lMEvZ.js → vue-ui-relation-circle-CeHXshK7.js} +5 -5
  90. package/dist/{vue-ui-rings-C8u__5v-.cjs → vue-ui-rings-BFDBWLpB.cjs} +1 -1
  91. package/dist/{vue-ui-rings-Bu-zVpHc.js → vue-ui-rings-BbmSC-kG.js} +9 -9
  92. package/dist/{vue-ui-scatter-D3FTfnsR.cjs → vue-ui-scatter-DXC7BLyb.cjs} +1 -1
  93. package/dist/{vue-ui-scatter-WeSsnz6H.js → vue-ui-scatter-dWaDeP28.js} +10 -10
  94. package/dist/{vue-ui-screenshot-BFL-8cPa.cjs → vue-ui-screenshot-CDkexSfB.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-B9Mbp_0-.js → vue-ui-screenshot-LFcpEMW-.js} +1 -1
  96. package/dist/{vue-ui-skeleton-dfikkXQa.cjs → vue-ui-skeleton-BR_pp7QN.cjs} +1 -1
  97. package/dist/{vue-ui-skeleton-BOhyMEA5.js → vue-ui-skeleton-DyodIkl3.js} +2 -2
  98. package/dist/{vue-ui-smiley-CwYjTYN8.js → vue-ui-smiley-BW1y5hnG.js} +2 -2
  99. package/dist/{vue-ui-smiley-BVd6D7fu.cjs → vue-ui-smiley-vzDOQmfu.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DuIEXk8W.cjs → vue-ui-spark-trend-B6bGMK7B.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-D6IwslA-.js → vue-ui-spark-trend-DANt3xrm.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-woU3TqMe.cjs → vue-ui-sparkbar-D9lC7k4l.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-1v_BypP0.js → vue-ui-sparkbar-Ds2HHojQ.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-B4wnbfIi.cjs → vue-ui-sparkgauge-B1xubatN.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-Cwu4aQUR.js → vue-ui-sparkgauge-BtJZFN2Q.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-BTdWXIO8.js → vue-ui-sparkhistogram-BK5q9yzw.js} +4 -4
  107. package/dist/{vue-ui-sparkhistogram-wRqt6OJx.cjs → vue-ui-sparkhistogram-Czii-6F7.cjs} +1 -1
  108. package/dist/{vue-ui-sparkline-DE3oMNsY.cjs → vue-ui-sparkline-BH7TjDt8.cjs} +1 -1
  109. package/dist/{vue-ui-sparkline-B2v0wJH3.js → vue-ui-sparkline-hX4509iJ.js} +3 -3
  110. package/dist/{vue-ui-sparkstackbar-B4lRHLJK.js → vue-ui-sparkstackbar-D5GszwYa.js} +3 -3
  111. package/dist/{vue-ui-sparkstackbar-DIk48oMu.cjs → vue-ui-sparkstackbar-K6WpH3Yp.cjs} +1 -1
  112. package/dist/{vue-ui-stackbar-DSc8j8LH.js → vue-ui-stackbar-B_hMyMvl.js} +10 -10
  113. package/dist/{vue-ui-stackbar-DVdBUu5U.cjs → vue-ui-stackbar-D7LVOSv5.cjs} +1 -1
  114. package/dist/{vue-ui-strip-plot-Cjays3PT.cjs → vue-ui-strip-plot-CVT5B7TW.cjs} +1 -1
  115. package/dist/{vue-ui-strip-plot-6hhRMLCq.js → vue-ui-strip-plot-de9Eymtb.js} +9 -9
  116. package/dist/{vue-ui-table-DQkiNDaZ.js → vue-ui-table-BLHo9-_6.js} +1 -1
  117. package/dist/{vue-ui-table-D-_a1UzS.cjs → vue-ui-table-DCdfSuVG.cjs} +1 -1
  118. package/dist/{vue-ui-table-heatmap-BRvVWrf1.cjs → vue-ui-table-heatmap-BszD4e0_.cjs} +1 -1
  119. package/dist/{vue-ui-table-heatmap-_KVKSH7q.js → vue-ui-table-heatmap-Dr5Qk35G.js} +4 -4
  120. package/dist/{vue-ui-table-sparkline-C_0i15kC.js → vue-ui-table-sparkline-B6IhXLL_.js} +5 -5
  121. package/dist/{vue-ui-table-sparkline-kyYy6tk8.cjs → vue-ui-table-sparkline-BWXuJi0-.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-BjU-T5A0.cjs → vue-ui-thermometer-C1zl2BIB.cjs} +1 -1
  123. package/dist/{vue-ui-thermometer-y3Hm1mwz.js → vue-ui-thermometer-DXv1JPZX.js} +5 -5
  124. package/dist/{vue-ui-timer-CVHz7dT6.cjs → vue-ui-timer-Db-uYQDe.cjs} +1 -1
  125. package/dist/{vue-ui-timer-7ouUkgHq.js → vue-ui-timer-DtWdRECG.js} +4 -4
  126. package/dist/{vue-ui-tiremarks-8-riUzAT.js → vue-ui-tiremarks-Cda6cwHT.js} +5 -5
  127. package/dist/{vue-ui-tiremarks-Dr9qSWVo.cjs → vue-ui-tiremarks-CjBnqmbt.cjs} +1 -1
  128. package/dist/{vue-ui-treemap-CmoQK2_G.cjs → vue-ui-treemap-HzIfevi0.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-ChYWvnSf.js → vue-ui-treemap-nX8RJJ0M.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-Doj3k8dI.cjs → vue-ui-vertical-bar-CemDj3SW.cjs} +1 -1
  131. package/dist/{vue-ui-vertical-bar-Ecx25LWQ.js → vue-ui-vertical-bar-Cq9OrF-E.js} +9 -9
  132. package/dist/{vue-ui-waffle-BgoDu9wa.cjs → vue-ui-waffle-Cb6ILDHZ.cjs} +1 -1
  133. package/dist/{vue-ui-waffle-BlqBRA5E.js → vue-ui-waffle-CdfiQX7W.js} +9 -9
  134. package/dist/{vue-ui-wheel-BlVmj1yz.cjs → vue-ui-wheel-DJ6FlnRI.cjs} +1 -1
  135. package/dist/{vue-ui-wheel-DNndo4fU.js → vue-ui-wheel-pj51puV8.js} +5 -5
  136. package/dist/{vue-ui-word-cloud-C9XDZjPt.js → vue-ui-word-cloud-D04mc7xB.js} +7 -7
  137. package/dist/{vue-ui-word-cloud-Cvyev8yY.cjs → vue-ui-word-cloud-DbFRSx5H.cjs} +1 -1
  138. package/dist/{vue-ui-xy-DkNi0ZJ4.js → vue-ui-xy-CTSQiIh0.js} +304 -283
  139. package/dist/vue-ui-xy-CUgcj9k1.cjs +3 -0
  140. package/dist/{vue-ui-xy-canvas-DIFlyxki.js → vue-ui-xy-canvas-6lqDLyxU.js} +10 -10
  141. package/dist/{vue-ui-xy-canvas-a3pNJKYd.cjs → vue-ui-xy-canvas-D78-vkpW.cjs} +1 -1
  142. package/package.json +1 -1
  143. package/dist/vue-ui-xy-x5TSd-hr.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CeMgFh6-.cjs"),ne=require("./Title-B238VbIb.cjs"),J=require("./usePrinter-_rbdfvVi.cjs"),re=require("./Tooltip-hihJcWT0.cjs"),ie=require("./vue-ui-skeleton-dfikkXQa.cjs"),de=require("./BaseIcon-DS9Fpauh.cjs"),ce=require("./vue-ui-accordion-CH_rY04P.cjs"),Q=require("./useNestedProp-CD3RA8XO.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],pe=["x","y","width","height","fill","stroke","stroke-width"],ge=["x","y","width","height","fill","stroke","stroke-width"],fe=["font-size","font-weight","fill","x","y"],me=["x","y","width","height","onMouseover"],be={key:0},xe=["font-size","fill","x","y","font-weight"],ke={key:0},we=["text-anchor","font-size","fill","font-weight","transform"],_e={key:1},Ce=["x","y","width","height","stroke","stroke-width"],Ne={key:2},Le=["id"],Be=["stop-color"],$e=["stop-color"],Ve=["x","y","font-size","fill"],Ee=["x","y","height","rx","fill"],Se=["x","y","font-size","fill"],ze=["stroke","x1","x2","y1","y2"],Ae=["fill","d"],Te={key:3},Me={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Fe=["stop-color"],Pe=["stop-color"],Oe=["x","y","width","height","rx"],De=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Re=["stroke","x1","x2","y1","y2"],qe=["fill","d"],He={key:3,class:"vue-data-ui-watermark"},Ue={class:"vue-ui-data-table"},Ge={key:0},Xe=["data-cell"],je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"53660b06":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),$=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),h=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),V=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:h.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:h.value.height-t.value.style.layout.padding.bottom,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:h.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let F="";const P=t.value.style.tooltip.customFormat;o.isFunction(P)&&o.functionReturnsString(()=>P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(F+=`<div>${c} ${f?`${f}`:""}</div>`,F+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${F}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(h.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<p.value.xLabels.length;d+=1){const c=[p.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${h.value.width} ${h.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,pe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ge),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,fe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,me)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",be,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[r]),9,xe)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/p.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,we)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",_e,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Ce)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,$e)],8,Le)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ve),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,Ee),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,ze)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Ae)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Me,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Pe)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:h.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Oe),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,De),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Re)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),$.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left: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:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Ue,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Ge,e.toDisplayString(t.value.style.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.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",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",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",je,e.toDisplayString(u),1)],12,Xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ye))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Je=ve._export_sfc(Ke,[["__scopeId","data-v-bbdd6ca7"]]);exports.default=Je;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CuTsdJDI.cjs"),ne=require("./Title-1LPI4Pd7.cjs"),J=require("./usePrinter-D47Cl-_I.cjs"),re=require("./Tooltip-BbUUQjWg.cjs"),ie=require("./vue-ui-skeleton-BR_pp7QN.cjs"),de=require("./BaseIcon-BHuHlqT8.cjs"),ce=require("./vue-ui-accordion-DVK9JwAM.cjs"),Q=require("./useNestedProp-CAjEiadB.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],pe=["x","y","width","height","fill","stroke","stroke-width"],ge=["x","y","width","height","fill","stroke","stroke-width"],fe=["font-size","font-weight","fill","x","y"],me=["x","y","width","height","onMouseover"],be={key:0},xe=["font-size","fill","x","y","font-weight"],ke={key:0},we=["text-anchor","font-size","fill","font-weight","transform"],_e={key:1},Ce=["x","y","width","height","stroke","stroke-width"],Ne={key:2},Le=["id"],Be=["stop-color"],$e=["stop-color"],Ve=["x","y","font-size","fill"],Ee=["x","y","height","rx","fill"],Se=["x","y","font-size","fill"],ze=["stroke","x1","x2","y1","y2"],Ae=["fill","d"],Te={key:3},Me={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Fe=["stop-color"],Pe=["stop-color"],Oe=["x","y","width","height","rx"],De=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Re=["stroke","x1","x2","y1","y2"],qe=["fill","d"],He={key:3,class:"vue-data-ui-watermark"},Ue={class:"vue-ui-data-table"},Ge={key:0},Xe=["data-cell"],je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"53660b06":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),$=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),h=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),V=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:h.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:h.value.height-t.value.style.layout.padding.bottom,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:h.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let F="";const P=t.value.style.tooltip.customFormat;o.isFunction(P)&&o.functionReturnsString(()=>P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(F+=`<div>${c} ${f?`${f}`:""}</div>`,F+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${F}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(h.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<p.value.xLabels.length;d+=1){const c=[p.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${h.value.width} ${h.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,pe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ge),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,fe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,me)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",be,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[r]),9,xe)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/p.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,we)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",_e,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Ce)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,$e)],8,Le)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ve),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,Ee),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,ze)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Ae)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Me,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Pe)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:h.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Oe),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,De),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Re)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),$.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left: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:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Ue,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Ge,e.toDisplayString(t.value.style.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.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",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",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",je,e.toDisplayString(u),1)],12,Xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ye))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Je=ve._export_sfc(Ke,[["__scopeId","data-v-bbdd6ca7"]]);exports.default=Je;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-CD3RA8XO.cjs"),u=require("./index-CeMgFh6-.cjs"),p=require("./vue-ui-digits-OWEvFsfq.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-CAjEiadB.cjs"),u=require("./index-CuTsdJDI.cjs"),p=require("./vue-ui-digits-ChM4kqZY.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
@@ -1,7 +1,7 @@
1
1
  import { computed as N, watch as p, ref as C, onMounted as D, openBlock as i, createElementBlock as s, normalizeClass as v, normalizeStyle as u, createElementVNode as $, renderSlot as n, createTextVNode as y, toDisplayString as k, createVNode as S, Fragment as x, unref as h } from "vue";
2
- import { u as z } from "./useNestedProp-BrcBWysp.js";
3
- import { u as A, i as w, f as B } from "./index-B6m-GhsP.js";
4
- import L from "./vue-ui-digits-CcrjtXtk.js";
2
+ import { u as z } from "./useNestedProp-BS8PvQ5U.js";
3
+ import { u as A, i as w, f as B } from "./index-B6bGaBzE.js";
4
+ import L from "./vue-ui-digits-C0YWch_M.js";
5
5
  const T = {
6
6
  __name: "vue-ui-kpi",
7
7
  props: {
@@ -1,6 +1,6 @@
1
1
  import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
2
- import { u as m } from "./useNestedProp-BrcBWysp.js";
3
- import { u as y, X as L } from "./index-B6m-GhsP.js";
2
+ import { u as m } from "./useNestedProp-BS8PvQ5U.js";
3
+ import { u as y, X as L } from "./index-B6bGaBzE.js";
4
4
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
6
6
  __name: "vue-ui-mini-loader",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-CD3RA8XO.cjs"),n=require("./index-CeMgFh6-.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-CAjEiadB.cjs"),n=require("./index-CuTsdJDI.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
@@ -1,13 +1,13 @@
1
1
  import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as U, withModifiers as M, createBlock as R, createCommentVNode as m, createElementVNode as x, toDisplayString as Se, normalizeStyle as K, createVNode as N, computed as B, onMounted as qe, ref as f, watch as Ze, normalizeClass as we, unref as I, createSlots as Je, withCtx as $, renderSlot as P, normalizeProps as Z, guardReactiveProps as J, createTextVNode as Ke, nextTick as Pe } from "vue";
2
- import { u as Qe, o as _e, e as et, c as Te, t as tt, a as ot, p as Fe, b as lt, X as at, l as st, N as nt, q as rt, r as it, x as ut, y as ct } from "./index-B6m-GhsP.js";
3
- import { _ as dt } from "./Title-CXeDgAE7.js";
4
- import { u as vt, U as ft } from "./usePrinter-BkKBQlCO.js";
5
- import { D as ht } from "./DataTable-OKHTStDc.js";
6
- import { _ as pt } from "./Tooltip-_e0VoMC-.js";
7
- import W from "./BaseIcon-CVe5ECp8.js";
8
- import gt from "./vue-ui-skeleton-BOhyMEA5.js";
9
- import yt from "./vue-ui-accordion-BygOGjRr.js";
10
- import { u as Re } from "./useNestedProp-BrcBWysp.js";
2
+ import { u as Qe, o as _e, e as et, c as Te, t as tt, a as ot, p as Fe, b as lt, X as at, l as st, N as nt, q as rt, r as it, x as ut, y as ct } from "./index-B6bGaBzE.js";
3
+ import { _ as dt } from "./Title-I5LLf5MT.js";
4
+ import { u as vt, U as ft } from "./usePrinter-DthbDD1O.js";
5
+ import { D as ht } from "./DataTable-NaCUmiJt.js";
6
+ import { _ as pt } from "./Tooltip-UuN-HISf.js";
7
+ import W from "./BaseIcon-DY4dOkkj.js";
8
+ import gt from "./vue-ui-skeleton-DyodIkl3.js";
9
+ import yt from "./vue-ui-accordion-BblXoBgi.js";
10
+ import { u as Re } from "./useNestedProp-BS8PvQ5U.js";
11
11
  import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], kt = {
13
13
  __name: "RecursiveCircles",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-CeMgFh6-.cjs"),Pe=require("./Title-B238VbIb.cjs"),se=require("./usePrinter-_rbdfvVi.cjs"),Ne=require("./DataTable-BfvpbyB5.cjs"),Ee=require("./Tooltip-hihJcWT0.cjs"),z=require("./BaseIcon-DS9Fpauh.cjs"),Te=require("./vue-ui-skeleton-dfikkXQa.cjs"),Se=require("./vue-ui-accordion-CH_rY04P.cjs"),ie=require("./useNestedProp-CD3RA8XO.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;function u(a){y("zoom",a)}function c(a){y("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>u(v),["stop"]),onMouseover:g=>c(v),onMouseleave:i[0]||(i[0]=g=>c(null))},null,40,Re))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},ze=["x1","y1","x2","y2","stroke","stroke-width"],Me=["x1","y1","x2","y2","stroke","stroke-width"],De={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const y=n;return e.toRef(y,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,ze),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Me)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Ue=["x","y","fill","font-size"],Ie={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,Ue))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe={style:{position:"relative",height:"100%",width:"100%"}},He={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:y}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Oe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>y("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>y("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>y("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>y("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>y("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},qe=["id"],Ae=["xmlns","viewBox"],je=["id"],Ge=["stop-color"],Xe=["stop-color"],Ye={key:4,class:"vue-data-ui-watermark"},We=["innerHTML"],Ze={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:y}){const h=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{p.objectIsEmpty(h.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),g=e.ref(null),G=e.ref(null),D=e.ref(0),X=e.ref(0),Y=e.ref(0),o=e.computed({get:()=>W(),set:t=>t});function W(){const t=ie.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...ie.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}e.watch(()=>h.config,t=>{o.value=W(),prepareChart(),X.value+=1,Y.value+=1},{deep:!0});const{isPrinting:Z,isImaging:J,generatePdf:K,generateImage:Q}=se.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ue=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function _(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?_(t[0].nodes,l+1):l}function ce(){const t=_(h.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(ce()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function ee(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ue.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=ee(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function de(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ve=e.computed(()=>de(C.value)),C=e.computed(()=>ee(h.dataset));function I(){P.value=!1,F.value=null,G.value=null,g.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,Ce=m*$*2,Be=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(Be/10))),xe=(R-r)/L,we=(w-d)/L,$e=(j-s)/L,Fe=(Ce-f)/L;let E=0;function ae(){U.value=`${r+xe*E} ${d+we*E} ${s+$e*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(ae))}ae()})}function fe(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function pe(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const te=e.ref(null),T=e.ref(null);function he(t){te.value=t,t?(i.value=!0,pe(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),H(g.value)}function ge(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const ye=e.computed(()=>ge(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ye.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function oe(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function ke(){return C.value}const S=e.ref(!1);function be(t){S.value=t,D.value+=1}function le(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ne(){k.value.showTooltip=!k.value.showTooltip}return y({getData:ke,generatePdf:K,generateCsv:oe,generateImage:Q,toggleTable:le,toggleLabels:re,toggleTooltip:ne}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{te.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(J),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:be,onGeneratePdf:e.unref(K),onGenerateCsv:oe,onGenerateImage:e.unref(Q),onToggleTable:le,onToggleLabels:re,onToggleTooltip:ne},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>me(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Xe)],8,je))),256))]),e.createVNode(De,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Le,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:fe,onHover:he},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ie,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(He,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Ee._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Se.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${Y.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,qe))}},Je=Ve._export_sfc(Ze,[["__scopeId","data-v-2555e7ea"]]);exports.default=Je;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-CuTsdJDI.cjs"),Pe=require("./Title-1LPI4Pd7.cjs"),se=require("./usePrinter-D47Cl-_I.cjs"),Ne=require("./DataTable-BYpARrqG.cjs"),Ee=require("./Tooltip-BbUUQjWg.cjs"),z=require("./BaseIcon-BHuHlqT8.cjs"),Te=require("./vue-ui-skeleton-BR_pp7QN.cjs"),Se=require("./vue-ui-accordion-DVK9JwAM.cjs"),ie=require("./useNestedProp-CAjEiadB.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;function u(a){y("zoom",a)}function c(a){y("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>u(v),["stop"]),onMouseover:g=>c(v),onMouseleave:i[0]||(i[0]=g=>c(null))},null,40,Re))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},ze=["x1","y1","x2","y2","stroke","stroke-width"],Me=["x1","y1","x2","y2","stroke","stroke-width"],De={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const y=n;return e.toRef(y,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,ze),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Me)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Ue=["x","y","fill","font-size"],Ie={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,Ue))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe={style:{position:"relative",height:"100%",width:"100%"}},He={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:y}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Oe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>y("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>y("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>y("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>y("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>y("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},qe=["id"],Ae=["xmlns","viewBox"],je=["id"],Ge=["stop-color"],Xe=["stop-color"],Ye={key:4,class:"vue-data-ui-watermark"},We=["innerHTML"],Ze={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:y}){const h=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{p.objectIsEmpty(h.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),g=e.ref(null),G=e.ref(null),D=e.ref(0),X=e.ref(0),Y=e.ref(0),o=e.computed({get:()=>W(),set:t=>t});function W(){const t=ie.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...ie.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}e.watch(()=>h.config,t=>{o.value=W(),prepareChart(),X.value+=1,Y.value+=1},{deep:!0});const{isPrinting:Z,isImaging:J,generatePdf:K,generateImage:Q}=se.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ue=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function _(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?_(t[0].nodes,l+1):l}function ce(){const t=_(h.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(ce()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function ee(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ue.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=ee(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function de(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ve=e.computed(()=>de(C.value)),C=e.computed(()=>ee(h.dataset));function I(){P.value=!1,F.value=null,G.value=null,g.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,Ce=m*$*2,Be=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(Be/10))),xe=(R-r)/L,we=(w-d)/L,$e=(j-s)/L,Fe=(Ce-f)/L;let E=0;function ae(){U.value=`${r+xe*E} ${d+we*E} ${s+$e*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(ae))}ae()})}function fe(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function pe(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const te=e.ref(null),T=e.ref(null);function he(t){te.value=t,t?(i.value=!0,pe(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),H(g.value)}function ge(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const ye=e.computed(()=>ge(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ye.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function oe(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function ke(){return C.value}const S=e.ref(!1);function be(t){S.value=t,D.value+=1}function le(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ne(){k.value.showTooltip=!k.value.showTooltip}return y({getData:ke,generatePdf:K,generateCsv:oe,generateImage:Q,toggleTable:le,toggleLabels:re,toggleTooltip:ne}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{te.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(J),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:be,onGeneratePdf:e.unref(K),onGenerateCsv:oe,onGenerateImage:e.unref(Q),onToggleTable:le,onToggleLabels:re,onToggleTooltip:ne},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>me(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Xe)],8,je))),256))]),e.createVNode(De,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Le,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:fe,onHover:he},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ie,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(He,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Ee._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Se.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${Y.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,qe))}},Je=Ve._export_sfc(Ze,[["__scopeId","data-v-2555e7ea"]]);exports.default=Je;
@@ -1,13 +1,13 @@
1
1
  import { computed as c, onMounted as he, ref as h, watch as fe, openBlock as n, createElementBlock as k, normalizeClass as H, normalizeStyle as A, createVNode as R, createCommentVNode as i, createBlock as f, unref as r, createSlots as me, withCtx as m, renderSlot as b, normalizeProps as X, guardReactiveProps as K, createElementVNode as o, Fragment as q, renderList as Y, toDisplayString as M, createTextVNode as J, nextTick as ge } from "vue";
2
- import { u as pe, o as ke, e as Q, c as be, t as Ce, N as xe, X as _e, s as C, w as we, O as $e, i as Z, f as I, q as Me, r as Ne } from "./index-B6m-GhsP.js";
3
- import { _ as Pe } from "./Title-CXeDgAE7.js";
4
- import { u as Le, U as Te } from "./usePrinter-BkKBQlCO.js";
5
- import { L as Ae } from "./Legend-Bt4nNAHo.js";
6
- import N from "./BaseIcon-CVe5ECp8.js";
7
- import { D as Ie } from "./DataTable-OKHTStDc.js";
8
- import Fe from "./vue-ui-skeleton-BOhyMEA5.js";
9
- import Oe from "./vue-ui-accordion-BygOGjRr.js";
10
- import { u as ee } from "./useNestedProp-BrcBWysp.js";
2
+ import { u as pe, o as ke, e as Q, c as be, t as Ce, N as xe, X as _e, s as C, w as we, O as $e, i as Z, f as I, q as Me, r as Ne } from "./index-B6bGaBzE.js";
3
+ import { _ as Pe } from "./Title-I5LLf5MT.js";
4
+ import { u as Le, U as Te } from "./usePrinter-DthbDD1O.js";
5
+ import { L as Ae } from "./Legend-CK7IfQW2.js";
6
+ import N from "./BaseIcon-DY4dOkkj.js";
7
+ import { D as Ie } from "./DataTable-NaCUmiJt.js";
8
+ import Fe from "./vue-ui-skeleton-DyodIkl3.js";
9
+ import Oe from "./vue-ui-accordion-BblXoBgi.js";
10
+ import { u as ee } from "./useNestedProp-BS8PvQ5U.js";
11
11
  import { _ as Se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Ve = ["id"], je = ["xmlns", "viewBox"], Be = ["id"], De = ["stop-color"], We = ["stop-color"], ze = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ge = ["d", "stroke", "stroke-width"], Ee = ["stroke"], Ue = ["fill"], He = ["stroke"], Re = ["fill"], Xe = ["stroke"], Ke = ["fill"], qe = ["stroke"], Ye = ["fill"], Je = ["stroke"], Qe = ["fill"], Ze = ["d", "stroke", "stroke-width", "fill"], et = ["x1", "y1", "stroke"], tt = ["cx", "cy", "fill", "stroke"], lt = ["fill", "stroke"], at = ["y", "fill", "font-weight"], ot = ["y", "fill"], rt = {
13
13
  key: 3,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CeMgFh6-.cjs"),X=require("./Title-B238VbIb.cjs"),L=require("./usePrinter-_rbdfvVi.cjs"),K=require("./Legend-B3B4K_lr.cjs"),p=require("./BaseIcon-DS9Fpauh.cjs"),Y=require("./DataTable-BfvpbyB5.cjs"),J=require("./vue-ui-skeleton-dfikkXQa.cjs"),Q=require("./vue-ui-accordion-CH_rY04P.cjs"),T=require("./useNestedProp-CD3RA8XO.cjs"),Z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=["id"],te=["xmlns","viewBox"],le=["id"],oe=["stop-color"],ae=["stop-color"],re=["x1","y1","x2","y2","stroke","stroke-width"],ne=["d","stroke","stroke-width"],se=["stroke"],ue=["fill"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["d","stroke","stroke-width","fill"],ke=["x1","y1","stroke"],ge=["cx","cy","fill","stroke"],be=["fill","stroke"],Ce=["y","fill","font-weight"],Ne=["y","fill"],xe={key:3,class:"vue-data-ui-watermark"},we=["onClick"],_e={style:{"font-weight":"bold"}},Ve=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),z=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:o=>o});function _(){const o=T.useNestedProp({userConfig:s.config,defaultConfig:I});return o.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[o.theme]||s.config,defaultConfig:o})}:o}e.watch(()=>s.config,o=>{t.value=_(),N(),D.value+=1,z.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:$,generatePdf:M,generateImage:P}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function j({centerX:o,centerY:a,apexX:l,apexY:u,proportion:c,key:f,value:R}){return{x:o+(l-o)*c,y:a+(u-a)*c,key:f,value:R}}const q=e.computed(()=>Math.max(...Object.values(s.dataset).map(o=>isNaN(o)?0:o))),v=e.computed(()=>Object.values(s.dataset).reduce((o,a)=>(isNaN(o)?0:o)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((o,a)=>{const l=typeof s.dataset[o]!="number"||isNaN(s.dataset[o])?0:s.dataset[o];return{index:a,key:o,value:l,proportion:l/v.value,color:t.value.style.chart.layout.smileys.colors[o]}}).sort((o,a)=>a.key-o.key)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(o=>{[null,void 0].includes(s.dataset[o])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:o})}),C.value.coordinates.map((o,a)=>{const l=j({centerX:d.value.width/2,centerY:d.value.height/2,apexX:o.x,apexY:o.y,proportion:i.value[a].value/q.value,key:i.value[a].key,value:i.value[a].value});return{...o,plots:l,key:i.value[a].key}})):[]),W=e.computed(()=>({cy:"mood-radar-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 G(o){o===n.value?n.value=null:n.value=o}const y=e.computed(()=>{const o=i.value.map(l=>({name:l.key,color:l.color})),a=i.value.map(l=>isNaN(l.value)?0:l.value);return{head:o,body:a}});function E(){e.nextTick(()=>{const o=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.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-mood-radar"})})}const g=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:u}});function U(){return i.value}function S(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(o){b.value=o}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:P,toggleTable:S}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:x,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(X._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref($),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref(P),onToggleTable:S},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ae)],8,le)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,l=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,re))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,se),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=l=>n.value=5),onMouseleave:a[1]||(a[1]=l=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ue),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ie),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=l=>n.value=4),onMouseleave:a[3]||(a[3]=l=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,ce),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,de),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=l=>n.value=3),onMouseleave:a[5]||(a[5]=l=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ye),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=l=>n.value=2),onMouseleave:a[7]||(a[7]=l=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,me),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,he),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=l=>n.value=1),onMouseleave:a[9]||(a[9]=l=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,fe),e.createElementVNode("path",{d:e.unref(r.makePath)(B.value.map(l=>l.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(l=>l.plots),(l,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==l.key?"1":"0"}`)},[e.createElementVNode("line",{x1:l.x,y1:l.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,ke),e.createElementVNode("circle",{cx:l.x,cy:l.y,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,ge),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,be),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),9,Ce),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Ne)],4))),256)),e.renderSlot(o.$slots,"svg",{svg:d.value},void 0,!0)],14,te)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:()=>G(l.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[l.key==1?(e.openBlock(),e.createBlock(p.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==2?(e.openBlock(),e.createBlock(p.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==3?(e.openBlock(),e.createBlock(p.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==4?(e.openBlock(),e.createBlock(p.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==5?(e.openBlock(),e.createBlock(p.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",_e,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,we)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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[10]||(a[10]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),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,ee))}},Me=Z._export_sfc($e,[["__scopeId","data-v-32423072"]]);exports.default=Me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CuTsdJDI.cjs"),X=require("./Title-1LPI4Pd7.cjs"),L=require("./usePrinter-D47Cl-_I.cjs"),K=require("./Legend-D8icDk38.cjs"),p=require("./BaseIcon-BHuHlqT8.cjs"),Y=require("./DataTable-BYpARrqG.cjs"),J=require("./vue-ui-skeleton-BR_pp7QN.cjs"),Q=require("./vue-ui-accordion-DVK9JwAM.cjs"),T=require("./useNestedProp-CAjEiadB.cjs"),Z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=["id"],te=["xmlns","viewBox"],le=["id"],oe=["stop-color"],ae=["stop-color"],re=["x1","y1","x2","y2","stroke","stroke-width"],ne=["d","stroke","stroke-width"],se=["stroke"],ue=["fill"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["d","stroke","stroke-width","fill"],ke=["x1","y1","stroke"],ge=["cx","cy","fill","stroke"],be=["fill","stroke"],Ce=["y","fill","font-weight"],Ne=["y","fill"],xe={key:3,class:"vue-data-ui-watermark"},we=["onClick"],_e={style:{"font-weight":"bold"}},Ve=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),z=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:o=>o});function _(){const o=T.useNestedProp({userConfig:s.config,defaultConfig:I});return o.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[o.theme]||s.config,defaultConfig:o})}:o}e.watch(()=>s.config,o=>{t.value=_(),N(),D.value+=1,z.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:$,generatePdf:M,generateImage:P}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function j({centerX:o,centerY:a,apexX:l,apexY:u,proportion:c,key:f,value:R}){return{x:o+(l-o)*c,y:a+(u-a)*c,key:f,value:R}}const q=e.computed(()=>Math.max(...Object.values(s.dataset).map(o=>isNaN(o)?0:o))),v=e.computed(()=>Object.values(s.dataset).reduce((o,a)=>(isNaN(o)?0:o)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((o,a)=>{const l=typeof s.dataset[o]!="number"||isNaN(s.dataset[o])?0:s.dataset[o];return{index:a,key:o,value:l,proportion:l/v.value,color:t.value.style.chart.layout.smileys.colors[o]}}).sort((o,a)=>a.key-o.key)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(o=>{[null,void 0].includes(s.dataset[o])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:o})}),C.value.coordinates.map((o,a)=>{const l=j({centerX:d.value.width/2,centerY:d.value.height/2,apexX:o.x,apexY:o.y,proportion:i.value[a].value/q.value,key:i.value[a].key,value:i.value[a].value});return{...o,plots:l,key:i.value[a].key}})):[]),W=e.computed(()=>({cy:"mood-radar-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 G(o){o===n.value?n.value=null:n.value=o}const y=e.computed(()=>{const o=i.value.map(l=>({name:l.key,color:l.color})),a=i.value.map(l=>isNaN(l.value)?0:l.value);return{head:o,body:a}});function E(){e.nextTick(()=>{const o=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.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-mood-radar"})})}const g=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:u}});function U(){return i.value}function S(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(o){b.value=o}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:P,toggleTable:S}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:x,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(X._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref($),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref(P),onToggleTable:S},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ae)],8,le)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,l=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,re))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,se),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=l=>n.value=5),onMouseleave:a[1]||(a[1]=l=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ue),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ie),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=l=>n.value=4),onMouseleave:a[3]||(a[3]=l=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,ce),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,de),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=l=>n.value=3),onMouseleave:a[5]||(a[5]=l=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ye),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=l=>n.value=2),onMouseleave:a[7]||(a[7]=l=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,me),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,he),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=l=>n.value=1),onMouseleave:a[9]||(a[9]=l=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,fe),e.createElementVNode("path",{d:e.unref(r.makePath)(B.value.map(l=>l.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(l=>l.plots),(l,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==l.key?"1":"0"}`)},[e.createElementVNode("line",{x1:l.x,y1:l.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,ke),e.createElementVNode("circle",{cx:l.x,cy:l.y,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,ge),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,be),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),9,Ce),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Ne)],4))),256)),e.renderSlot(o.$slots,"svg",{svg:d.value},void 0,!0)],14,te)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:()=>G(l.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[l.key==1?(e.openBlock(),e.createBlock(p.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==2?(e.openBlock(),e.createBlock(p.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==3?(e.openBlock(),e.createBlock(p.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==4?(e.openBlock(),e.createBlock(p.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==5?(e.openBlock(),e.createBlock(p.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",_e,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,we)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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[10]||(a[10]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),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,ee))}},Me=Z._export_sfc($e,[["__scopeId","data-v-32423072"]]);exports.default=Me;
@@ -1,14 +1,14 @@
1
1
  import { computed as g, ref as d, watch as De, onMounted as qe, onBeforeUnmount as Je, openBlock as u, createElementBlock as n, normalizeClass as O, normalizeStyle as ue, createBlock as P, createCommentVNode as y, unref as r, createSlots as Ke, withCtx as m, renderSlot as $, normalizeProps as q, guardReactiveProps as J, createElementVNode as p, Fragment as x, renderList as S, toDisplayString as T, createVNode as Qe, createTextVNode as K, nextTick as Ze, pushScopeId as je, popScopeId as et } from "vue";
2
- import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, G as ze, d as nt, m as Oe, f as L, X as rt, s as Pe, I as it, k as V, n as ne, i as G, x as Ae, y as dt, q as ct, r as vt } from "./index-B6m-GhsP.js";
2
+ import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, G as ze, d as nt, m as Oe, f as L, X as rt, s as Pe, I as it, k as V, n as ne, i as G, x as Ae, y as dt, q as ct, r as vt } from "./index-B6bGaBzE.js";
3
3
  import { t as ft, u as ht } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as yt } from "./Title-CXeDgAE7.js";
5
- import { u as pt, U as bt } from "./usePrinter-BkKBQlCO.js";
6
- import { D as gt } from "./DataTable-OKHTStDc.js";
7
- import { _ as mt } from "./Tooltip-_e0VoMC-.js";
8
- import { L as wt } from "./Legend-Bt4nNAHo.js";
9
- import kt from "./vue-ui-skeleton-BOhyMEA5.js";
10
- import _t from "./vue-ui-accordion-BygOGjRr.js";
11
- import { u as Ve } from "./useNestedProp-BrcBWysp.js";
4
+ import { _ as yt } from "./Title-I5LLf5MT.js";
5
+ import { u as pt, U as bt } from "./usePrinter-DthbDD1O.js";
6
+ import { D as gt } from "./DataTable-NaCUmiJt.js";
7
+ import { _ as mt } from "./Tooltip-UuN-HISf.js";
8
+ import { L as wt } from "./Legend-CK7IfQW2.js";
9
+ import kt from "./vue-ui-skeleton-DyodIkl3.js";
10
+ import _t from "./vue-ui-accordion-BblXoBgi.js";
11
+ import { u as Ve } from "./useNestedProp-BS8PvQ5U.js";
12
12
  import { _ as xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const re = (M) => (je("data-v-e6e70e76"), M = M(), et(), M), $t = ["id"], Lt = ["xmlns", "viewBox"], Ct = ["id"], Ft = /* @__PURE__ */ re(() => /* @__PURE__ */ p("stop", {
14
14
  offset: "0%",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CeMgFh6-.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-B238VbIb.cjs"),de=require("./usePrinter-_rbdfvVi.cjs"),xe=require("./DataTable-BfvpbyB5.cjs"),Be=require("./Tooltip-hihJcWT0.cjs"),_e=require("./Legend-B3B4K_lr.cjs"),$e=require("./vue-ui-skeleton-dfikkXQa.cjs"),Ne=require("./vue-ui-accordion-CH_rY04P.cjs"),ve=require("./useNestedProp-CD3RA8XO.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-e6e70e76"),w=w(),e.popScopeId(),w),Ee=["id"],Fe=["xmlns","viewBox"],Ve=["id"],Te=M(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),De=["offset","stop-color"],ze=["offset","stop-opacity"],Pe=M(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Oe=["id"],Ie=["id"],Ae=M(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Me=["id"],Re=["flood-color"],Ue=["d","fill","stroke","stroke-width","filter"],qe={key:0},Ye=["d","fill"],Xe={key:1},Ge=["x","y","font-size","font-weight","fill"],He={key:2},We=["filter"],Je=["text-anchor","x","y","fill","font-size","font-weight"],Ke=["text-anchor","x","y","fill","font-size","font-weight"],Qe=["text-anchor","x","y","fill","font-size","font-weight"],Ze=["d","fill","onMouseenter","onClick"],je={key:3,class:"vue-data-ui-watermark"},et={key:0,class:"vue-ui-nested-donuts-legend-title"},tt=["onClick"],lt=["innerHTML"],at={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:fe,emit:R}){const k=w,{vue_ui_nested_donuts:pe}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),he=e.ref(null),U=e.ref(0),x=e.ref(null),q=e.ref(null),D=e.ref(null),Y=e.ref(0),X=e.ref(0),G=e.ref(0),B=e.ref(!1);function ye(l){B.value=l,U.value+=1}const t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:k.config,defaultConfig:pe});return l.theme?{...ve.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=H(),W(),Y.value+=1,X.value+=1,G.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ce.throttle(()=>{const{width:s,height:o}=ce.useResponsive({chart:x.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?D.value:null});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function be({datapoint:l,index:s}){R("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||me.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),j=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function ge(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(j.value);e.watch(()=>j.value,l=>c.value=l);const ee=e.ref(null),te=e.ref(null);function z(l){R("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=ge(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ee.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ee.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(te.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),te.value=requestAnimationFrame(i))};i()}}const P=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),le=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,P.value)}})),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),oe=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function ke({datapoint:l,_relativeIndex:s,seriesIndex:o}){oe.value=l.arcOfId,S.value=l.id,E.value=o,O.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CuTsdJDI.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-1LPI4Pd7.cjs"),de=require("./usePrinter-D47Cl-_I.cjs"),xe=require("./DataTable-BYpARrqG.cjs"),Be=require("./Tooltip-BbUUQjWg.cjs"),_e=require("./Legend-D8icDk38.cjs"),$e=require("./vue-ui-skeleton-BR_pp7QN.cjs"),Ne=require("./vue-ui-accordion-DVK9JwAM.cjs"),ve=require("./useNestedProp-CAjEiadB.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-e6e70e76"),w=w(),e.popScopeId(),w),Ee=["id"],Fe=["xmlns","viewBox"],Ve=["id"],Te=M(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),De=["offset","stop-color"],ze=["offset","stop-opacity"],Pe=M(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Oe=["id"],Ie=["id"],Ae=M(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Me=["id"],Re=["flood-color"],Ue=["d","fill","stroke","stroke-width","filter"],qe={key:0},Ye=["d","fill"],Xe={key:1},Ge=["x","y","font-size","font-weight","fill"],He={key:2},We=["filter"],Je=["text-anchor","x","y","fill","font-size","font-weight"],Ke=["text-anchor","x","y","fill","font-size","font-weight"],Qe=["text-anchor","x","y","fill","font-size","font-weight"],Ze=["d","fill","onMouseenter","onClick"],je={key:3,class:"vue-data-ui-watermark"},et={key:0,class:"vue-ui-nested-donuts-legend-title"},tt=["onClick"],lt=["innerHTML"],at={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:fe,emit:R}){const k=w,{vue_ui_nested_donuts:pe}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),he=e.ref(null),U=e.ref(0),x=e.ref(null),q=e.ref(null),D=e.ref(null),Y=e.ref(0),X=e.ref(0),G=e.ref(0),B=e.ref(!1);function ye(l){B.value=l,U.value+=1}const t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:k.config,defaultConfig:pe});return l.theme?{...ve.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=H(),W(),Y.value+=1,X.value+=1,G.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ce.throttle(()=>{const{width:s,height:o}=ce.useResponsive({chart:x.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?D.value:null});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function be({datapoint:l,index:s}){R("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||me.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),j=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function ge(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(j.value);e.watch(()=>j.value,l=>c.value=l);const ee=e.ref(null),te=e.ref(null);function z(l){R("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=ge(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ee.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ee.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(te.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),te.value=requestAnimationFrame(i))};i()}}const P=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),le=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,P.value)}})),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),oe=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function ke({datapoint:l,_relativeIndex:s,seriesIndex:o}){oe.value=l.arcOfId,S.value=l.id,E.value=o,O.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
2
2
  <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
3
  <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
4
  <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">