vue-data-ui 2.3.85 → 2.3.87

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 (171) hide show
  1. package/dist/{Arrow-CLOh6oi7.cjs → Arrow-eu15g0Zt.cjs} +1 -1
  2. package/dist/{Arrow-JwDgP3de.js → Arrow-tDycrMHk.js} +1 -1
  3. package/dist/{BaseIcon-BBQHz_Sf.cjs → BaseIcon-CgLB-iUq.cjs} +1 -1
  4. package/dist/{BaseIcon-BysUnfCR.js → BaseIcon-D2n64yMC.js} +1 -1
  5. package/dist/{DataTable-MkG5Dqrn.js → DataTable-CrbRO0dh.js} +2 -2
  6. package/dist/{DataTable-pVXaNplZ.cjs → DataTable-DnOI5Ivh.cjs} +1 -1
  7. package/dist/{Legend-KW7sTwN3.js → Legend-BXctzvx2.js} +1 -1
  8. package/dist/{Legend-k2mcTp7z.cjs → Legend-sAjd_vcA.cjs} +1 -1
  9. package/dist/{Shape-COoEWeGM.cjs → Shape-BGa7uWId.cjs} +1 -1
  10. package/dist/{Shape-BFiZBf3X.js → Shape-BUBQ5omG.js} +1 -1
  11. package/dist/{Slicer-CALc-Q4W.js → Slicer-CXK3XM-z.js} +79 -87
  12. package/dist/Slicer-CoyHeBxs.cjs +1 -0
  13. package/dist/{Title-ISDbzCH8.js → Title-BITuZ5CT.js} +1 -1
  14. package/dist/{Title-BaKZYHEx.cjs → Title-DbAaPd9q.cjs} +1 -1
  15. package/dist/{Tooltip-BHmMXOej.js → Tooltip-DDBocDY4.js} +1 -1
  16. package/dist/{Tooltip-okAYzo5Y.cjs → Tooltip-LE8exuMN.cjs} +1 -1
  17. package/dist/{index-BiuHBtkZ.js → index-CP7GYbDW.js} +173 -162
  18. package/dist/index-U4mCr8P0.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +13 -0
  21. package/dist/types/vue-data-ui.d.ts +13 -0
  22. package/dist/{useNestedProp-B9yDavuy.cjs → useNestedProp-CgUQgTyB.cjs} +1 -1
  23. package/dist/{useNestedProp-Ck5_RzLu.js → useNestedProp-Dfz8QNDn.js} +1 -1
  24. package/dist/usePrinter-BfETb5Ie.js +527 -0
  25. package/dist/usePrinter-DQLl_Row.cjs +1 -0
  26. package/dist/{vue-data-ui-CAl2KJv9.js → vue-data-ui-BiTJ4KBF.js} +57 -57
  27. package/dist/{vue-data-ui-CVYCyzY-.cjs → vue-data-ui-CgTf8Gw2.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-CKCcmMbS.cjs +19 -0
  31. package/dist/{vue-ui-3d-bar-CploAEkY.js → vue-ui-3d-bar-CKDV9VVB.js} +11 -10
  32. package/dist/{vue-ui-accordion-btKAUUTu.cjs → vue-ui-accordion-AcWCsB0f.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-D2fhyKpk.js → vue-ui-accordion-DZSSaEp4.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-DkaM5MrK.js → vue-ui-age-pyramid-Cy-J_3gK.js} +25 -24
  35. package/dist/vue-ui-age-pyramid-DQ-h0bbz.cjs +1 -0
  36. package/dist/{vue-ui-annotator-38FBI0Pn.js → vue-ui-annotator-Dn_5RY5_.js} +1 -1
  37. package/dist/{vue-ui-annotator-BMYk78DR.cjs → vue-ui-annotator-GBAeaQUB.cjs} +1 -1
  38. package/dist/{vue-ui-candlestick-CKsjq0Uw.js → vue-ui-candlestick-CAdWy5Y1.js} +12 -11
  39. package/dist/vue-ui-candlestick-guSNt_H0.cjs +2 -0
  40. package/dist/{vue-ui-carousel-table-Cx72LlTd.cjs → vue-ui-carousel-table-CuFG5v2i.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-DjGaEuM7.js → vue-ui-carousel-table-DmmKDp7-.js} +7 -7
  42. package/dist/{vue-ui-chestnut-TLyh4dIZ.js → vue-ui-chestnut-BmzjUDjK.js} +10 -9
  43. package/dist/{vue-ui-chestnut-DAiBfoPN.cjs → vue-ui-chestnut-bAWBqCf3.cjs} +2 -2
  44. package/dist/{vue-ui-cursor-BunDuWpK.cjs → vue-ui-cursor-CfkNSO9o.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-B1xa5yua.js → vue-ui-cursor-DDViNH81.js} +2 -2
  46. package/dist/{vue-ui-dashboard-DdcubzWu.js → vue-ui-dashboard-BGwxII0l.js} +2 -2
  47. package/dist/{vue-ui-dashboard-CMZ736DL.cjs → vue-ui-dashboard-CT09iVhX.cjs} +1 -1
  48. package/dist/{vue-ui-digits-BUpjWWnD.js → vue-ui-digits-BYO9w7xM.js} +2 -2
  49. package/dist/{vue-ui-digits-z5g__gqs.cjs → vue-ui-digits-DObHCYJe.cjs} +1 -1
  50. package/dist/vue-ui-donut-B-YGaPcq.cjs +1 -0
  51. package/dist/{vue-ui-donut-ZLpfm-XT.js → vue-ui-donut-DqOvTGAK.js} +34 -33
  52. package/dist/{vue-ui-donut-evolution-Bn4asQO3.js → vue-ui-donut-evolution-ByIcsVPF.js} +12 -11
  53. package/dist/vue-ui-donut-evolution-DAzxGbsO.cjs +1 -0
  54. package/dist/{vue-ui-dumbbell-CY6X8J1K.cjs → vue-ui-dumbbell-Ch6sj_EW.cjs} +2 -2
  55. package/dist/{vue-ui-dumbbell-D2R9tJ99.js → vue-ui-dumbbell-JpJFPxM2.js} +11 -10
  56. package/dist/{vue-ui-flow-Dd5uPNTQ.js → vue-ui-flow-BhtIMcan.js} +10 -9
  57. package/dist/vue-ui-flow-C5N8YgfJ.cjs +1 -0
  58. package/dist/{vue-ui-galaxy-B7CoWLhj.js → vue-ui-galaxy-BZT14d6d.js} +12 -11
  59. package/dist/vue-ui-galaxy-Cv38ZzWi.cjs +1 -0
  60. package/dist/vue-ui-gauge-BrwCmfGP.cjs +1 -0
  61. package/dist/{vue-ui-gauge-CGh_m922.js → vue-ui-gauge-Dj2gBTkq.js} +29 -28
  62. package/dist/{vue-ui-gizmo-D5Kn7w7L.cjs → vue-ui-gizmo-BhCZEfOE.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-BY3hnKSH.js → vue-ui-gizmo-Dx0mO1Zf.js} +2 -2
  64. package/dist/{vue-ui-heatmap-yYN0u0I6.js → vue-ui-heatmap-DdSGFMo1.js} +41 -40
  65. package/dist/vue-ui-heatmap-azP3H0Be.cjs +1 -0
  66. package/dist/{vue-ui-kpi-B4zr_geL.js → vue-ui-kpi-C0fjrvpC.js} +3 -3
  67. package/dist/{vue-ui-kpi-Q20yM3IP.cjs → vue-ui-kpi-TKkErBy-.cjs} +1 -1
  68. package/dist/{vue-ui-mini-loader-GImbaGsN.js → vue-ui-mini-loader-CVflLGuB.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-GFSZofpE.cjs → vue-ui-mini-loader-DAos2pVd.cjs} +1 -1
  70. package/dist/vue-ui-molecule-CW1523wC.cjs +1 -0
  71. package/dist/{vue-ui-molecule-DmrB3kgA.js → vue-ui-molecule-D9OfBp53.js} +290 -286
  72. package/dist/{vue-ui-mood-radar-sEkQtzI2.js → vue-ui-mood-radar-PMARjoQW.js} +79 -78
  73. package/dist/vue-ui-mood-radar-vvG5BlGa.cjs +1 -0
  74. package/dist/{vue-ui-nested-donuts-DvpZLcYd.js → vue-ui-nested-donuts-Bt8ZHG4b.js} +35 -34
  75. package/dist/vue-ui-nested-donuts-wVELVgGD.cjs +17 -0
  76. package/dist/{vue-ui-onion-DQMLPe3M.js → vue-ui-onion-B-4djV2X.js} +12 -11
  77. package/dist/vue-ui-onion-j8P027dX.cjs +5 -0
  78. package/dist/{vue-ui-parallel-coordinate-plot-DN2LPNyS.js → vue-ui-parallel-coordinate-plot-B2N249AX.js} +14 -13
  79. package/dist/vue-ui-parallel-coordinate-plot-BRNG5VwG.cjs +8 -0
  80. package/dist/vue-ui-quadrant-BaDei-7C.cjs +1 -0
  81. package/dist/{vue-ui-quadrant-D2GpeXI6.js → vue-ui-quadrant-Bvv3ZZI7.js} +13 -12
  82. package/dist/{vue-ui-quick-chart-C5K9DfUV.js → vue-ui-quick-chart-BzFITYDP.js} +60 -59
  83. package/dist/vue-ui-quick-chart-OUDWfDwC.cjs +15 -0
  84. package/dist/vue-ui-radar-Bpz3hyr9.cjs +1 -0
  85. package/dist/{vue-ui-radar-B9TZPujK.js → vue-ui-radar-CXH5XhDS.js} +13 -12
  86. package/dist/{vue-ui-rating-DpxzUDQq.cjs → vue-ui-rating-BEtR56Zg.cjs} +1 -1
  87. package/dist/{vue-ui-rating-B0pNsmGB.js → vue-ui-rating-BcngasYQ.js} +2 -2
  88. package/dist/{vue-ui-relation-circle-DSnlpLHt.js → vue-ui-relation-circle-BmWv5Kwu.js} +46 -45
  89. package/dist/{vue-ui-relation-circle-D3B-lpdM.cjs → vue-ui-relation-circle-Cn4xYFeJ.cjs} +1 -1
  90. package/dist/{vue-ui-rings-cmeFVitd.cjs → vue-ui-rings-BbrUn18Q.cjs} +2 -2
  91. package/dist/{vue-ui-rings-BuvFDBXg.js → vue-ui-rings-DDvVuJvv.js} +12 -11
  92. package/dist/vue-ui-scatter-C9B6pkLG.cjs +1 -0
  93. package/dist/{vue-ui-scatter-D_chvOSJ.js → vue-ui-scatter-CfgLA10v.js} +13 -12
  94. package/dist/{vue-ui-screenshot-CwrXLMru.cjs → vue-ui-screenshot-BDjgeoQi.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-DSHeHshf.js → vue-ui-screenshot-W6aedcDN.js} +1 -1
  96. package/dist/{vue-ui-skeleton-Du4zw-c1.js → vue-ui-skeleton-BAQjFiop.js} +2 -2
  97. package/dist/{vue-ui-skeleton-DJhwv2oY.cjs → vue-ui-skeleton-BhG4niml.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-BtQLJ7rA.js → vue-ui-smiley-CQNAPd4d.js} +2 -2
  99. package/dist/{vue-ui-smiley-BNkk6suC.cjs → vue-ui-smiley-J1L8V6KG.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DFIjxBTY.cjs → vue-ui-spark-trend-BTdNsDFX.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-BgA79g7a.js → vue-ui-spark-trend-CBc-tBLR.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-BlwQfhlY.cjs → vue-ui-sparkbar-D0189X8M.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-DQAWZReF.js → vue-ui-sparkbar-DCLpbzSR.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-BCRSQDpt.cjs → vue-ui-sparkgauge-ButS3IF8.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-CCApU38s.js → vue-ui-sparkgauge-C-12vLRd.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-PKTt4EmH.js → vue-ui-sparkhistogram-CqHEh_4P.js} +4 -4
  107. package/dist/{vue-ui-sparkhistogram-CTxG1Vtn.cjs → vue-ui-sparkhistogram-NLFMPPXv.cjs} +1 -1
  108. package/dist/{vue-ui-sparkline-EESAiZyt.js → vue-ui-sparkline-BaHeaRVl.js} +3 -3
  109. package/dist/{vue-ui-sparkline-BUaixngQ.cjs → vue-ui-sparkline-Cy8fuCDw.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-iQnc0zcO.cjs → vue-ui-sparkstackbar-B64XK1yu.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-TnLNixdf.js → vue-ui-sparkstackbar-BLvXeEbr.js} +3 -3
  112. package/dist/{vue-ui-stackbar-Ci04sup3.js → vue-ui-stackbar-B-ZE7Ksh.js} +13 -12
  113. package/dist/vue-ui-stackbar-CLmcckvD.cjs +6 -0
  114. package/dist/vue-ui-strip-plot-DTJeRXEM.cjs +1 -0
  115. package/dist/{vue-ui-strip-plot-DbvW0BuF.js → vue-ui-strip-plot-DbmLZ03_.js} +12 -11
  116. package/dist/{vue-ui-table-CamkBCdL.js → vue-ui-table-CpUWJGi_.js} +1 -1
  117. package/dist/{vue-ui-table-328De4vk.cjs → vue-ui-table-DdroDYB6.cjs} +1 -1
  118. package/dist/vue-ui-table-heatmap-CSHkuLE3.cjs +1 -0
  119. package/dist/{vue-ui-table-heatmap-D-YdrvGV.js → vue-ui-table-heatmap-XJj-iDhJ.js} +27 -26
  120. package/dist/{vue-ui-table-sparkline-Dg2RKv6f.js → vue-ui-table-sparkline-DEhCOiH8.js} +25 -24
  121. package/dist/{vue-ui-table-sparkline-Cmg7wnQ0.cjs → vue-ui-table-sparkline-GgMGhbwH.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-jWHbZTc2.js → vue-ui-thermometer-CF9_Jiig.js} +51 -50
  123. package/dist/vue-ui-thermometer-LM5LB1fZ.cjs +1 -0
  124. package/dist/{vue-ui-timer-BPepr5eV.js → vue-ui-timer-BN3oSs18.js} +4 -4
  125. package/dist/{vue-ui-timer-B_FyRAU7.cjs → vue-ui-timer-Kw8zfnyl.cjs} +1 -1
  126. package/dist/{vue-ui-tiremarks-CaJWlyz8.cjs → vue-ui-tiremarks-B5Ieo2VI.cjs} +1 -1
  127. package/dist/{vue-ui-tiremarks-DW8Q2IBl.js → vue-ui-tiremarks-CTiztDdT.js} +48 -47
  128. package/dist/{vue-ui-treemap-B9GpvA0k.cjs → vue-ui-treemap-CHngTUd0.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-CWu43qLo.js → vue-ui-treemap-DEDT65NP.js} +13 -12
  130. package/dist/vue-ui-vertical-bar-C8XQwe6S.cjs +4 -0
  131. package/dist/{vue-ui-vertical-bar-CndASePh.js → vue-ui-vertical-bar-hFeIrO6z.js} +13 -12
  132. package/dist/{vue-ui-waffle-CdyqwJwN.js → vue-ui-waffle-CLbMVN8j.js} +46 -45
  133. package/dist/{vue-ui-waffle-c9ycdoKz.cjs → vue-ui-waffle-tFQq8-qt.cjs} +1 -1
  134. package/dist/vue-ui-wheel-CMRCYfem.cjs +1 -0
  135. package/dist/{vue-ui-wheel-Byq_BLhl.js → vue-ui-wheel-DpPdEqHh.js} +34 -33
  136. package/dist/{vue-ui-word-cloud-BVOcsuMP.cjs → vue-ui-word-cloud-C18oOvC0.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-BRxN5uFD.js → vue-ui-word-cloud-DTXq9aIY.js} +10 -9
  138. package/dist/vue-ui-xy-Bw1GQuGo.cjs +3 -0
  139. package/dist/{vue-ui-xy-DgEdZz0O.js → vue-ui-xy-DN8TqWYI.js} +342 -339
  140. package/dist/{vue-ui-xy-canvas-BI7jUOTn.js → vue-ui-xy-canvas-BoH-Grae.js} +54 -53
  141. package/dist/{vue-ui-xy-canvas-Td0WNYN0.cjs → vue-ui-xy-canvas-Dg9jorcV.cjs} +2 -2
  142. package/package.json +1 -1
  143. package/dist/Slicer-DCyxUSsn.cjs +0 -1
  144. package/dist/index-D-vy9N1v.cjs +0 -4
  145. package/dist/usePrinter-Do8KiK5h.js +0 -513
  146. package/dist/usePrinter-P4nLcXX-.cjs +0 -1
  147. package/dist/vue-ui-3d-bar-DlUqKETN.cjs +0 -19
  148. package/dist/vue-ui-age-pyramid-CvSoQ1op.cjs +0 -1
  149. package/dist/vue-ui-candlestick-BJulnyV3.cjs +0 -2
  150. package/dist/vue-ui-donut-TY2Z9Ljx.cjs +0 -1
  151. package/dist/vue-ui-donut-evolution-BEm2dOxe.cjs +0 -1
  152. package/dist/vue-ui-flow-DswsuPwy.cjs +0 -1
  153. package/dist/vue-ui-galaxy-Dxy6jzus.cjs +0 -1
  154. package/dist/vue-ui-gauge-CWd_ol6u.cjs +0 -1
  155. package/dist/vue-ui-heatmap-AUm42a1v.cjs +0 -1
  156. package/dist/vue-ui-molecule-C9FcDH4x.cjs +0 -1
  157. package/dist/vue-ui-mood-radar-CRwStVTV.cjs +0 -1
  158. package/dist/vue-ui-nested-donuts-BcOgxtZV.cjs +0 -17
  159. package/dist/vue-ui-onion-C9v9YjdJ.cjs +0 -5
  160. package/dist/vue-ui-parallel-coordinate-plot-BBuPdl2K.cjs +0 -8
  161. package/dist/vue-ui-quadrant-ulY-rCMI.cjs +0 -1
  162. package/dist/vue-ui-quick-chart-DFj17h6h.cjs +0 -15
  163. package/dist/vue-ui-radar-KA287Tp-.cjs +0 -1
  164. package/dist/vue-ui-scatter-BWPqoSUN.cjs +0 -1
  165. package/dist/vue-ui-stackbar-Rrcyg4CC.cjs +0 -6
  166. package/dist/vue-ui-strip-plot-CowHumiU.cjs +0 -1
  167. package/dist/vue-ui-table-heatmap-CCHre3Gt.cjs +0 -1
  168. package/dist/vue-ui-thermometer-BDeKErC9.cjs +0 -1
  169. package/dist/vue-ui-vertical-bar-a_41JdIn.cjs +0 -4
  170. package/dist/vue-ui-wheel-B3BMfKmd.cjs +0 -1
  171. package/dist/vue-ui-xy-CsS5ny0q.cjs +0 -3
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D-vy9N1v.cjs"),ne=require("./Title-BaKZYHEx.cjs"),J=require("./usePrinter-P4nLcXX-.cjs"),re=require("./Tooltip-okAYzo5Y.cjs"),ie=require("./vue-ui-skeleton-DJhwv2oY.cjs"),de=require("./BaseIcon-BBQHz_Sf.cjs"),ce=require("./vue-ui-accordion-btKAUUTu.cjs"),Q=require("./useNestedProp-B9yDavuy.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he={key:0,style:"width:100%;background:transparent"},pe=["xmlns","viewBox"],fe=["x","y","width","height","fill","stroke","stroke-width"],ge=["x","y","width","height","fill","stroke","stroke-width"],me=["font-size","font-weight","fill","x","y"],be=["x","y","width","height","onMouseover"],xe={key:0},ke=["font-size","fill","x","y","font-weight"],we={key:0},_e=["text-anchor","font-size","fill","font-weight","transform"],Ce={key:1},Ne=["x","y","width","height","stroke","stroke-width"],Le={key:2},Be=["id"],$e=["stop-color"],Ve=["stop-color"],Ee=["x","y","font-size","fill"],Se=["x","y","height","rx","fill"],ze=["x","y","font-size","fill"],Ae=["stroke","x1","x2","y1","y2"],Te=["fill","d"],Me={key:3},Fe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Pe=["stop-color"],Oe=["stop-color"],De=["x","y","width","height","rx"],Ie=["x","y","font-size","fill"],Re=["x","y","font-size","fill"],qe=["stroke","x1","x2","y1","y2"],He=["fill","d"],Ue={key:3,class:"vue-data-ui-watermark"},Ge={class:"vue-ui-data-table"},Xe={key:0},je=["data-cell"],Ye={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},We=["data-cell"],Ke={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Je={__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=>({"512ee76b":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()}`})})))),f=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:ue}=l;O.value=ue,f.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} ${g?`${g}`:""}</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-f.value/v.value)),N=e.computed(()=>a.value.left+(h.value.width-a.value.left-t.value.style.layout.padding.right)*(f.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 g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].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",he,[(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"]))])):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:transparent;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,fe),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,me)):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:g=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=g=>{z.value=!1,O.value=void 0,f.value=null,w.value=null})},null,40,be)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",xe,[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,ke)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",we,[(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,_e)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",Ce,[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,Ne)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",Le,[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,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ve)],8,Be)]),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,Ee),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,Se),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,ze),f.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,Ae)):e.createCommentVNode("",!0),f.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,Te)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Me,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Fe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Oe)])]),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,De),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,Ie),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,Re),f.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,qe)):e.createCommentVNode("",!0),f.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,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[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",Ge,[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",Xe,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",Ye,e.toDisplayString(u),1)],12,je),(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",Ke,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,We))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Qe=ve._export_sfc(Je,[["__scopeId","data-v-f6c2deec"]]);exports.default=Qe;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-D-vy9N1v.cjs"),Pe=require("./Title-BaKZYHEx.cjs"),se=require("./usePrinter-P4nLcXX-.cjs"),Ne=require("./DataTable-pVXaNplZ.cjs"),Ee=require("./Tooltip-okAYzo5Y.cjs"),z=require("./BaseIcon-BBQHz_Sf.cjs"),Te=require("./vue-ui-skeleton-DJhwv2oY.cjs"),Se=require("./vue-ui-accordion-btKAUUTu.cjs"),ie=require("./useNestedProp-B9yDavuy.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={key:0,style:"width:100%;background:transparent;"},je=["xmlns","viewBox"],Ge=["id"],Xe=["stop-color"],Ye=["stop-color"],We={key:4,class:"vue-data-ui-watermark"},Ze=["innerHTML"],Je={__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}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(m.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:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.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(()=>m.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=m.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((p,$)=>{const R=A.coordinates[$];let w;if(p.ancestor?p.ancestor.ancestor?w=p.ancestor.color||V:(w=ue.value[f]||m.palette[f]||V,f+=1):w=V,p.polygonPath={coordinates:[R]},p.circleRadius=d,p.color=w,p.uid=m.createUid(),p.nodes&&p.nodes.length>0){const j=!p.ancestor||!p.ancestor.ancestor?f:0;p.nodes=ee(p.nodes,R,r/2.9,d/2.2,s+Math.PI*$/p.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:p}=t,$=8.34,R=V-p*$,w=A-p*$,j=p*$*2,Ce=p*$*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 pe(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function me(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.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,me(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=m.createCsvContent(l);m.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",Ae,[(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"]))])):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(m.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:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>pe(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(m.lightenHexColor)(r,.5)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Ye)],8,Ge))),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,je)):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",We,[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,Ze)]),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))}},Ke=Ve._export_sfc(Je,[["__scopeId","data-v-27c4b368"]]);exports.default=Ke;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D-vy9N1v.cjs"),X=require("./Title-BaKZYHEx.cjs"),S=require("./usePrinter-P4nLcXX-.cjs"),K=require("./Legend-k2mcTp7z.cjs"),p=require("./BaseIcon-BBQHz_Sf.cjs"),Y=require("./DataTable-pVXaNplZ.cjs"),J=require("./vue-ui-skeleton-DJhwv2oY.cjs"),Q=require("./vue-ui-accordion-btKAUUTu.cjs"),T=require("./useNestedProp-B9yDavuy.cjs"),Z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=["id"],te={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],oe=["id"],ae=["stop-color"],re=["stop-color"],ne=["x1","y1","x2","y2","stroke","stroke-width"],se=["d","stroke","stroke-width"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["stroke"],ve=["fill"],me=["stroke"],he=["fill"],fe=["stroke"],pe=["fill"],ke=["d","stroke","stroke-width","fill"],ge=["x1","y1","stroke"],be=["cx","cy","fill","stroke"],Ce=["fill","stroke"],Ne=["y","fill","font-weight"],xe=["y","fill"],we={key:3,class:"vue-data-ui-watermark"},_e=["onClick"],Ve={style:{"font-weight":"bold"}},Me=["innerHTML"],Pe={__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:M,generatePdf:P,generateImage:$}=S.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 L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(o){b.value=o}return A({getData:U,generatePdf:P,generateCsv:E,generateImage:$,toggleTable:L}),(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",te,[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"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(S.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(M),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(P),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},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:transparent;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,ae),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,re)],8,oe)]),(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,ne))),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,se),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,ue),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,ie),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,ce),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,de),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,ye),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,ve),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,me),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,he),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,fe),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,pe),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,ke),(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,ge),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,be),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,Ce),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,Ne),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,xe)],4))),256)),e.renderSlot(o.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(M)})),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",Ve,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,_e)]),_: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,Me)]),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))}},$e=Z._export_sfc(Pe,[["__scopeId","data-v-ebcde453"]]);exports.default=$e;
@@ -1,17 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D-vy9N1v.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-BaKZYHEx.cjs"),de=require("./usePrinter-P4nLcXX-.cjs"),xe=require("./DataTable-pVXaNplZ.cjs"),Be=require("./Tooltip-okAYzo5Y.cjs"),_e=require("./Legend-k2mcTp7z.cjs"),$e=require("./vue-ui-skeleton-DJhwv2oY.cjs"),Ne=require("./vue-ui-accordion-btKAUUTu.cjs"),ve=require("./useNestedProp-B9yDavuy.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-fe5209b5"),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
- <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
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
- <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
5
- <circle cx="10" cy="10" r="10" fill="${f.color}"/>
6
- </svg>
7
- <span>
8
- ${f.arcOf??""} - ${f.name}
9
- </span>
10
- </div>
11
- <span>
12
- ${t.value.style.chart.tooltip.showValue?`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}
13
- </b>`:""}
14
- ${t.value.style.chart.tooltip.showPercentage?`(${r.dataLabel({v:f.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
15
- </span>
16
- </div>
17
- `})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}V.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ne(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0)return[null,void 0].includes(E.value)||E.value===s?"":`url(#blur_${p.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||v.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${p.value})`}const A=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:v.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:v.value.includes(o.id)})))),Ce=e.computed(()=>({cy:"nested-donuts-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":""})),C=e.computed(()=>{const l=c.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=c.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function re(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const F=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const f=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},f,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function Le(){return m.value}function se(){h.value.showTable=!h.value.showTable}function ue(){h.value.dataLabels.show=!h.value.dataLabels.show}function ie(){h.value.showTooltip=!h.value.showTooltip}return fe({getData:Le,generatePdf:Q,generateCsv:re,generateImage:Z,toggleTable:se,toggleLabels:ue,toggleTooltip:ie}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:x,class:e.normalizeClass(`vue-ui-nested-donuts ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${!t.value.style.chart.title.text&&t.value.userOptions.show?"padding-top:36px":""};background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${p.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:q},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&_.value?(e.openBlock(),e.createBlock(de.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:p.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(Q),onGenerateCsv:re,onGenerateImage:e.unref(Z),onToggleTable:se,onToggleLabels:ue,onToggleTooltip:ie},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${d.value.width<=0?.001:d.value.width} ${d.value.height<0?.001:d.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${p.value}_${n}`},[Te,e.createElementVNode("stop",{offset:`${(1-P.value/le.value[n])*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,De),e.createElementVNode("stop",{offset:`${(1-P.value/le.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,ze),Pe],8,Ve))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${p.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${p.value}`},null,8,Ie),Ae],8,Oe),e.createElementVNode("filter",{id:`shadow_${p.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Re)],8,Me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ne(a,u)},null,8,Ue)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${p.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,Ye)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&d.value.width&&d.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:d.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,Ge)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ne(a,u)},[I(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,Je)):e.createCommentVNode("",!0),I(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,Ke)):e.createCommentVNode("",!0),I(a)&&h.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,Qe)):e.createCommentVNode("",!0)],8,We))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-donut-trap":"",d:a.arcSlice,fill:he.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:f=>ke({datapoint:a,relativeIndex:n,seriesIndex:a.seriesIndex}),onClick:f=>be({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=f=>{V.value=!1,oe.value=null,S.value=null,E.value=null})},null,40,Ze)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Be._sfc_main,{show:h.value.showTooltip&&V.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:T.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartLegend",ref:D,class:e.normalizeClass({"vue-ui-nested-donuts-legend":A.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(o,n)=>(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${n}_${G.value}`,legendSet:o,config:Ce.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",et,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:f=>z(a),style:e.normalizeStyle(`opacity:${v.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),v.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,tt)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartLegend",ref:D},[e.renderSlot(l.$slots,"legend",{legend:A.value},void 0,!0)],512)),_.value?(e.openBlock(),e.createBlock(Ne.default,{key:7,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(xe.DataTable,{key:`table_${X.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,lt)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ee))}},ot=Se._export_sfc(at,[["__scopeId","data-v-fe5209b5"]]);exports.default=ot;
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-D-vy9N1v.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),he=require("./Title-BaKZYHEx.cjs"),J=require("./usePrinter-P4nLcXX-.cjs"),pe=require("./Legend-k2mcTp7z.cjs"),fe=require("./DataTable-pVXaNplZ.cjs"),ge=require("./Tooltip-okAYzo5Y.cjs"),me=require("./vue-ui-skeleton-DJhwv2oY.cjs"),ye=require("./vue-ui-accordion-btKAUUTu.cjs"),K=require("./useNestedProp-B9yDavuy.cjs"),be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],we=["xmlns","viewBox"],Ce=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],$e=["id"],Be=["stdDeviation"],Te=["filter"],Se=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],_e=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Pe={key:1},Ne=["onMouseenter"],Oe=["x","y","font-size","fill","font-weight"],Fe={key:3,class:"vue-data-ui-watermark"},Ie=["onClick"],Ee=["innerHTML"],Le={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Q,{expose:Z,emit:ee}){const p=Q,{vue_ui_onion:te}=u.useConfig(),C=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),le=e.ref(null),F=e.ref(0),x=e.ref(!1),T=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),E=e.ref(null),L=e.ref(0),M=e.ref(0),V=e.ref(0),t=e.computed({get:()=>D(),set:a=>a});function D(){const a=K.useNestedProp({userConfig:p.config,defaultConfig:te});return a.theme?{...K.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>p.config,a=>{t.value=D(),q(),L.value+=1,M.value+=1,V.value+=1},{deep:!0});const{isPrinting:R,isImaging:z,generatePdf:A,generateImage:Y}=J.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ae=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),$=e.ref(null);e.onMounted(()=>{q()});function q(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=j.throttle(()=>{const{width:l,height:o}=j.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?E.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});$.value=new ResizeObserver(r),$.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(p.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),p.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||ae.value[r]||u.palette[r],id:l,shape:"circle",opacity:d.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>X(l),isSegregated:d.value.includes(l)}}))),b=e.ref(i.value),oe=e.computed(()=>t.value.useStartAnimation),re=e.ref(null),ne=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),S=e.ref(!1);e.watch(()=>i.value,ue,{immediate:!0});function ue(){if(oe.value&&!S.value){let r=function(){a>=ne.value?(cancelAnimationFrame(re.value),b.value=i.value,S.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),S.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const se=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ie=e.computed(()=>i.value.filter(a=>!d.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),v=e.computed(()=>b.value.filter(a=>!d.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/ie.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:ce(l,a.percentage||0)}}));function ce(a,r){const l=2*Math.PI*a,o=l*.75,c=`${o} ${l}`,w=o*(1-r/100);return{bgDashArray:`${o} ${l}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
2
- M ${s.value.centerX},${s.value.centerY-a}
3
- A ${a},${a} 0 1 1
4
- ${s.value.centerX+a*Math.cos(Math.PI*3/4)},${s.value.centerY+a*Math.sin(Math.PI*3/4)}
5
- `.trim()}}function X(a){d.value.includes(a)?d.value=d.value.filter(r=>r!==a):d.value.push(a),ee("selectLegend",v.value)}function de(){return v.value}const _=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=v.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),B=e.computed(()=>{const a=_.value.head,r=v.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:a,body:r,config:l,colNames:a}});function U(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=_.value.head,l=_.value.body,o=a.concat([r]).concat(l),c=u.createCsvContent(o);u.downloadCsv({csvContent:c,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const h=e.ref(void 0),k=e.ref(!1);function ve(a){k.value=a,F.value+=1}const P=e.ref(null);function G({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;h.value=r,P.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},x.value=l;let c="";const w=t.value.style.chart.tooltip.customFormat;if(u.isFunction(w)&&u.functionReturnsString(()=>w({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))T.value=w({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const N=t.value.style.chart.tooltip.showPercentage,O=t.value.style.chart.tooltip.showValue;c+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg><span></span>${a.name}</span></div>`,c+=`<div style="width:100%;text-align:left;"><b>${N?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${N&&O?"(":""}${O?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${N&&O?")":""}</div>`,T.value=`<div>${c}</div>`}}function H(){f.value.showTable=!f.value.showTable}function W(){f.value.showTooltip=!f.value.showTooltip}return Z({getData:de,generatePdf:A,generateCsv:U,generateImage:Y,toggleTable:H,toggleTooltip:W}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${L.value}`,config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:le,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(z),isPrinting:e.unref(R),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(A),onGenerateCsv:U,onGenerateImage:e.unref(Y),onToggleTable:H,onToggleTooltip:W},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(h.value)&&h.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Ce))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(h.value)&&h.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,xe))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,Be)],8,$e)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Se))),256))],8,Te)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:c=>G({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=c=>{h.value=void 0,x.value=!1})},null,40,_e))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:c=>G({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=c=>{h.value=void 0,x.value=!1})},[d.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(h.value)&&h.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Oe))],40,Ne))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,we)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:4,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:E},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(pe.Legend,{key:`legend_${V.value}`,legendSet:i.value,config:se.value,onClickMarker:r[2]||(r[2]=({legend:l})=>X(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${d.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Ie)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:f.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:T.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.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(ye.default,{key:5,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(fe.DataTable,{key:`table_${M.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>f.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Ee)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ke))}},Me=be._export_sfc(Le,[["__scopeId","data-v-45ea05bd"]]);exports.default=Me;
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-D-vy9N1v.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-BaKZYHEx.cjs"),fe=require("./Legend-k2mcTp7z.cjs"),ge=require("./Tooltip-okAYzo5Y.cjs"),be=require("./Shape-COoEWeGM.cjs"),ae=require("./usePrinter-P4nLcXX-.cjs"),ke=require("./DataTable-pVXaNplZ.cjs"),xe=require("./vue-ui-accordion-btKAUUTu.cjs"),Ce=require("./vue-ui-skeleton-DJhwv2oY.cjs"),oe=require("./useNestedProp-B9yDavuy.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Se=["xmlns","viewBox"],$e={style:{"pointer-events":"none"}},ze=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x","y","fill","font-size","font-weight"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","fill","font-size","font-weight"],Fe={key:0},Pe=["x","y","font-size","fill"],Ae=["width","x","y"],Me={style:{width:"100%"}},Le=["x","y","fill","font-weight","font-size","onMouseenter"],Ee=["d","stroke","stroke-width","onMouseenter"],Ie={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],De=["innerHTML"],Oe={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ne,{expose:se,emit:M}){const b=ne,{vue_ui_parallel_coordinate_plot:re}=i.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),V=e.ref(0),D=e.ref(0),O=e.ref(0),N=e.ref(i.createUid()),B=e.ref(!1);function ie(l){B.value=l,L.value+=1}const t=e.computed({get:()=>q(),set:l=>l});function q(){const l=oe.useNestedProp({userConfig:b.config,defaultConfig:re});return l.theme?{...oe.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=q(),R(),V.value+=1,O.value+=1,D.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{R()});function R(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=le.throttle(()=>{const{width:o,height:a}=le.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=a,c.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:U,isImaging:W,generatePdf:j,generateImage:H}=ae.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),ue=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function G(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||ue.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),ce=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>G(l.id),isSegregated:f.value.includes(l.id)}))),de=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),Y=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/Y.value),_=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),h=e.computed(()=>{let l=[];for(let o=0;o<Y.value;o+=1){const a=Math.min(..._.value.flatMap(v=>v.series.map(z=>z.values[o]||0)||0)),n=Math.max(..._.value.flatMap(v=>v.series.map(z=>z.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,z)=>{const he=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),me=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(he/me),x:d.value.left+y.value*o+y.value/2,value:v}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),T=e.computed(()=>_.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=h.value[s].scale.min<0?(r||0)+Math.abs(h.value[s].scale.min):(r||0)-Math.abs(h.value[s].scale.min),g=h.value[s].scale.min<0?h.value[s].scale.max+Math.abs(h.value[s].scale.min):h.value[s].scale.max-Math.abs(h.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints,.12),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function X({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const p=e.ref(null),F=e.ref(null),S=e.ref(!1),P=e.ref("");function A({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){F.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:h.value},S.value=!0,p.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:h.value}))?P.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:h.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,h.value.map(g=>g.name).forEach((g,v)=>{s+=`
2
- <div class="vue-ui-tooltip-item" style="text-align:left">
3
- <span>${g}: </span>
4
- <span>
5
- ${i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[v]||null,a.datapoints[v].value,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[v]||"",v:a.datapoints[v].value,s:t.value.style.chart.yAxis.labels.suffixes[v]||"",r:t.value.style.chart.yAxis.labels.roundings[v]||""}),{datapoint:a.datapoints[v],seriesIndex:v})}
6
- </span>
7
- </div>
8
- `,t.value.style.chart.comments.showInTooltip&&a.datapoints[v].comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.datapoints[v].comment}</div>`)}),P.value=`<div>${s}</div>`)}function ve(){return k.value}const C=e.computed(()=>{const l=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(h.value.map(r=>r.name)),o=T.value.flatMap((r,s)=>r.series.map(u=>[r.name].concat([u.name]).concat(u.values))),a={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},n=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(h.value.map(r=>r.name));return{body:o,head:l,config:a,colNames:n}}),J=e.computed(()=>T.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:C.value.head,body:C.value.body});function K(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=J.value.head,a=J.value.body,n=l.concat([o]).concat(a),r=i.createCsvContent(n);i.downloadCsv({csvContent:r,title:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"})}function pe(l){M("selectDatapoint",l)}function Q(l){M("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function Z(){m.value.showTable=!m.value.showTable}function ee(){m.value.dataLabels.show=!m.value.dataLabels.show}function te(){m.value.showTooltip=!m.value.showTooltip}return se({getData:ve,generateCsv:K,generatePdf:j,generateImage:H,toggleTable:Z,toggleLabels:ee,toggleTooltip:te}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pcpChart",ref:w,class:e.normalizeClass(`vue-ui-pcp ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`pcp_${N.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ye._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"pcp-div-title",...t.value.style.chart.title},subtitle:{cy:"pcp-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(W),uid:N.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(j),onGenerateCsv:K,onGenerateImage:e.unref(H),onToggleTable:Z,onToggleLabels:ee,onToggleTooltip:te},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${d.value.chartWidth<=0?10:d.value.chartWidth} ${d.value.chartHeight<=0?10:d.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:d.value.left+y.value*n+y.value/2,x2:d.value.left+y.value*n+y.value/2,y1:d.value.top,y2:d.value.bottom,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth},null,8,ze),e.createElementVNode("text",{x:d.value.left+y.value*n+y.value/2,y:d.value.top-24,fill:t.value.style.chart.yAxis.labels.axisNamesColor,"font-size":c.value.axisNameFontSize,"font-weight":t.value.style.chart.yAxis.labels.axisNamesBold?"bold":"","text-anchor":"middle"},e.toDisplayString(a.name),9,Ne),t.value.style.chart.yAxis.labels.ticks.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.ticks,r=>(e.openBlock(),e.createElementBlock("line",{x1:r.x,x2:r.x-10,y1:r.y,y2:r.y,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth,style:e.normalizeStyle(`opacity:${p.value&&!m.value.showTooltip?.2:1}`)},null,12,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.ticks,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x-12+t.value.style.chart.yAxis.labels.ticks.offsetX,y:r.y+t.value.style.chart.yAxis.labels.ticks.offsetY+c.value.ticksFontSize/3,fill:t.value.style.chart.yAxis.labels.ticks.color,"text-anchor":"end","font-size":c.value.ticksFontSize,"font-weight":t.value.style.chart.yAxis.labels.ticks.bold?"bold":"normal",style:e.normalizeStyle(`opacity:${p.value&&!m.value.showTooltip?.2:1}`)},e.toDisplayString(X({value:r.value,index:n,datapoint:r})),13,Te))),256))],64)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.series,(n,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.plots.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.datapoints,s=>(e.openBlock(),e.createBlock(be._sfc_main,{plot:{x:s.x,y:s.y},color:a.color,shape:a.shape,radius:a.shape==="triangle"?c.value.plotSize*1.2:c.value.plotSize,stroke:t.value.style.chart.backgroundColor,strokeWidth:.5,onMouseenter:u=>A({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[0]||(o[0]=u=>{p.value=null,S.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.plots.opacity:.2:t.value.style.chart.plots.opacity}`),onClick:()=>pe(s)},null,8,["plot","color","shape","radius","stroke","onMouseenter","style","onClick"]))),256)),m.value.showTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.value&&p.value===n.id&&n.datapoints.length?(e.openBlock(),e.createElementBlock("text",{key:0,x:n.datapoints[0].x-c.value.ticksFontSize,y:n.datapoints[0].y+c.value.ticksFontSize/3,"text-anchor":"end","font-size":c.value.ticksFontSize,fill:a.color,"font-weight":"bold"},e.toDisplayString(n.name),9,Pe)):e.createCommentVNode("",!0)],64)),t.value.style.chart.comments.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,s=>(e.openBlock(),e.createElementBlock("g",null,[s.comment?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,style:{overflow:"visible"},height:"12",width:t.value.style.chart.comments.width,x:s.x-t.value.style.chart.comments.width/2+t.value.style.chart.comments.offsetX,y:s.y+t.value.style.chart.comments.offsetY+6},[e.createElementVNode("div",Me,[e.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color}},void 0,!0)])],8,Ae)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),m.value.dataLabels.show||p.value&&p.value===n.id?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,(s,u)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+12+t.value.style.chart.yAxis.labels.datapoints.offsetX,y:s.y+t.value.style.chart.yAxis.labels.datapoints.offsetY+c.value.datapointFontSize/3,fill:t.value.style.chart.yAxis.labels.datapoints.useSerieColor?a.color:t.value.style.chart.yAxis.labels.datapoints.color,"text-anchor":"start","font-weight":t.value.style.chart.yAxis.labels.datapoints.bold?"bold":"normal",class:e.normalizeClass({"vue-ui-pcp-animated":!1,"vue-ui-pcp-transition":!0}),"font-size":c.value.datapointFontSize,onMouseenter:g=>A({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[1]||(o[1]=g=>{p.value=null,S.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?1:.2:1}`)},e.toDisplayString(X({value:s.value,index:u,datapoint:s})),45,Le))),256)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:a.color,"stroke-width":t.value.style.chart.lines.strokeWidth,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>A({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[2]||(o[2]=s=>{p.value=null,S.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.lines.opacity:.2:t.value.style.chart.lines.opacity}; stroke-dasharray:${n.pathLength}; stroke-dashoffset: ${t.value.useCssAnimation?n.pathLength:0}`)},null,46,Ee)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(W)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"parallelCoordinatePlot",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show&&x.value?(e.openBlock(),e.createBlock(fe.Legend,{key:`legend_${D.value}`,legendSet:ce.value,config:de.value,onClickMarker:o[3]||(o[3]=({legend:a})=>{G(a.id),Q(a)})},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{onClick:r=>{a.segregate(),Q(a)},style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Ve)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:m.value.showTooltip&&S.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:w.value,content:P.value,isCustom:e.unref(i.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(xe.default,{key:5,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ke.DataTable,{key:`table_${O.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,De)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},qe=we._export_sfc(Oe,[["__scopeId","data-v-c6286cd2"]]);exports.default=qe;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D-vy9N1v.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./Title-BaKZYHEx.cjs"),ye=require("./usePrinter-P4nLcXX-.cjs"),qe=require("./Tooltip-okAYzo5Y.cjs"),be=require("./Shape-COoEWeGM.cjs"),_e=require("./Legend-k2mcTp7z.cjs"),ze=require("./DataTable-pVXaNplZ.cjs"),Ne=require("./vue-ui-skeleton-DJhwv2oY.cjs"),Ve=require("./vue-ui-accordion-btKAUUTu.cjs"),pe=require("./useNestedProp-B9yDavuy.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],We=["xmlns","viewBox","id"],Xe=["id"],Ye=["stop-color"],Me=["stop-color"],Pe={key:0},Fe=["fill","x","y","height","width","stroke-width","stroke","rx"],De=["x1","y1","x2","y2","stroke","stroke-width"],Ae=["x1","y1","x2","y2","stroke","stroke-width"],Re={key:1},Oe=["points","fill"],He=["points","fill"],Ie=["points","fill"],Ue=["points","fill"],Ge={key:2},Qe=["y","fill","font-size"],Je=["x","y","fill","font-size"],je=["x","y","fill","font-size"],Ze=["y","fill","font-size"],Ke={key:3},et=["x","y","font-size","fill"],tt=["x","y","font-size","fill"],lt=["x","y","font-size","fill"],at=["id","font-size","transform","fill"],ot=["id","font-size","transform","fill"],ut=["id","font-size","transform","fill"],rt={key:4},st=["fill","points"],nt=["x","y","width","height"],it=["x","y","width","height"],ct=["x","y","width","height"],vt=["x","y","width","height"],dt={key:0},ht=["x","y","font-size","fill"],yt={key:0},bt=["x","y","onMouseover","onClick"],pt={key:7,class:"vue-ui-dna"},ft=["points","fill"],mt=["points","fill"],gt=["points","fill"],xt=["points","fill"],kt={key:8},$t=["x","y","font-size","fill","font-weight"],Lt={key:9},Ct=["x","y","fill"],wt=["x","y","fill"],St=["x","y","fill"],Bt=["x","y","fill"],qt=["stroke","d"],_t=["stroke","d"],zt={key:3,class:"vue-data-ui-watermark"},Nt=["onClick"],Vt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Et=["innerHTML"],Tt={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(fe,{expose:me,emit:M}){const x=fe,{vue_ui_quadrant:ge}=n.useConfig(),V=e.computed(()=>!!x.dataset&&x.dataset.length),g=e.ref(n.createUid()),xe=e.ref(null),E=e.ref(!1),P=e.ref(""),A=e.ref(0),h=e.ref(!1),S=e.ref(null),R=e.ref(null),O=e.ref(null),H=e.ref(0),I=e.ref(0),U=e.ref(0),l=e.computed({get:()=>G(),set:a=>a});function G(){const a=pe.useNestedProp({userConfig:x.config,defaultConfig:ge});return a.theme?{...pe.useNestedProp({userConfig:n.themes.vue_ui_quadrant[a.theme]||x.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>x.config,a=>{l.value=G(),Q(),H.value+=1,I.value+=1,U.value+=1},{deep:!0});const T=e.ref(null);function Q(){if(n.objectIsEmpty(x.dataset)?n.error({componentName:"VueUiQuadrant",type:"dataset"}):x.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=he.throttle(()=>{const{width:u,height:o}=he.useResponsive({chart:S.value,title:l.value.style.chart.title.text?R.value:null,legend:l.value.style.chart.legend.show?O.value:null});y.value=48,t.value.height=o,t.value.usableHeight=o-y.value*2,t.value.width=u,t.value.usableWidth=u-y.value*2,t.value.top=y.value,t.value.left=y.value,t.value.right=u-y.value,t.value.bottom=o-y.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=y.value});T.value=new ResizeObserver(a),T.value.observe(S.value.parentNode)}}e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:J,isImaging:j,generatePdf:Z,generateImage:K}=ye.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),ee=e.computed(()=>n.convertCustomPalette(l.value.customPalette)),p=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),y=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-y.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-y.value*2,top:y.value,left:y.value,right:l.value.style.chart.width-y.value,bottom:l.value.style.chart.height-y.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:y.value}),c=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(c.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const i=e.ref(null),C=e.computed(()=>{switch(i.value){case"TL":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),ke=e.ref(null),W=e.ref(!1);function B({targetX:a,targetY:u,targetW:o,targetH:r,side:s}){i.value&&z(s);const v={x:a-c.value.startX,y:u-c.value.startY,w:o-c.value.width,h:r-c.value.height},d=l.value.zoomAnimationFrames;let k=0;function de(){W.value=!0,c.value.startX+=v.x/d,c.value.startY+=v.y/d,c.value.width+=v.w/d,c.value.height+=v.h/d,k+=1,k<d?ke.value=requestAnimationFrame(de):W.value=!1}de()}function $(a){if(!W.value)if(h.value&&i.value===a)B({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),i.value=null,h.value=!1;else{switch(i.value=a,a){case"TL":B({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":B({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":B({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":B({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:c.value.startX=0,c.value.startY=0,c.value.width=t.value.width,c.value.height=t.value.height;break}h.value=!0}}const $e=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let s=0;s<a;s+=1)r.push({x:t.value.padding+u*s,y:o+t.value.usableHeight*(s/a/2),height:t.value.usableHeight*(1-s/a),width:t.value.usableWidth*(1-s/a),opacity:Math.round((s+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...w.value.flatMap(s=>s.series.map(v=>v.x))),u=Math.min(...w.value.flatMap(s=>s.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...w.value.flatMap(s=>s.series.map(v=>v.y))),r=Math.min(...w.value.flatMap(s=>s.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),w=e.computed(()=>x.dataset.map((a,u)=>({...a,id:`cat_${u}_${g.value}`,color:n.convertColorToHex(a.color)||ee.value[u]||n.palette[u]}))),Le=e.computed(()=>w.value.filter(a=>!L.value.includes(a.id))),Ce=e.computed(()=>w.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:te(o.x),y:le(o.y),xValue:o.x,yValue:o.y,quadrantSide:oe({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(x.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),Le.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||ee.value[u]||n.palette[u],series:a.series.map(o=>({...o,x:te(o.x),y:le(o.y),xValue:o.x,yValue:o.y,quadrantSide:oe({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:n.createUid()}))}))));function te(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function le(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(k=>({x:k.xValue,y:k.yValue,name:k.name,category:k.categoryName,quadrantSide:k.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[k.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],s=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:s,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,n.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,n.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=se();M("selectLegend",u)}const ae=e.computed(()=>Ce.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),we=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function oe(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const q=e.ref(null),_=e.ref(null),D=e.ref(null);function ue(a,u,o){q.value=u.uid,_.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))P.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let s="";u.quadrantSide&&(s+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),s+=`<div>${a.name}</div>`,s+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,s+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,n.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,s+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,n.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,P.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${s}</div>`}}function re(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};M("selectPlot",o)}function z(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(s=>s.quadrantSide===a).map(s=>({category:s.categoryName,itemName:s.name,x:s.xValue,y:s.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};M("selectSide",o)}const b=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function se(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function ne(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const N=e.ref(!1);function Se(a){N.value=a,A.value+=1}function ie(){p.value.showTable=!p.value.showTable}function ce(){p.value.plotLabels.show=!p.value.plotLabels.show}function ve(){p.value.showTooltip=!p.value.showTooltip}return me({getData:se,generatePdf:Z,generateCsv:ne,generateImage:K,toggleTable:ie,toggleLabels:ce,toggleTooltip:ve}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${N.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:S,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;${l.value.style.chart.title.text?"":"padding-top: 36px"};background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`table_${H.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:xe,key:`user_options_${A.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(j),isPrinting:e.unref(J),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:S.value,onToggleFullscreen:Se,onGeneratePdf:e.unref(Z),onGenerateCsv:ne,onGenerateImage:e.unref(K),onToggleTable:ie,onToggleLabels:ce,onToggleTooltip:ve},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`${c.value.startX} ${c.value.startY} ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,Me)],8,Xe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($e.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(n.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Fe))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,De),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ae),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Oe),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,He),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ie),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ue)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",Ge,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>z("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,Qe)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>z("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,Je)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>z("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,je)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>z("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,Ze)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(n.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,et),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,tt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(n.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,lt),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(n.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,at),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(n.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ot),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,ut)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(n.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(n.giftWrap)(o)},null,8,st)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,nt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,it),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,ct),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,vt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,s=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:s.x-50,y:s.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>ue(o,s,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>re(o,s)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(n.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(s.name),5)],40,bt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,s=>(e.openBlock(),e.createBlock(be._sfc_main,{color:o.color,isSelected:q.value&&s.uid===q.value,plot:s,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>ue(o,s,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>re(o,s)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,ht))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",pt,[i.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,ft)):e.createCommentVNode("",!0),i.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,mt)):e.createCommentVNode("",!0),i.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,gt)):e.createCommentVNode("",!0),i.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,xt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",kt,[e.createElementVNode("text",{x:C.value.x,y:C.value.y-C.value.fontSize/1.5,"font-size":C.value.fontSize/1.5,fill:C.value.fill,"text-anchor":"middle","font-weight":C.value.bold?"bold":"normal"},e.toDisplayString(C.value.text),9,$t)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",Lt,[e.createElementVNode("rect",{x:b.value[i.value].tl.x,y:b.value[i.value].tl.y,height:"20",width:"20",fill:b.value[i.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TL"})},null,14,Ct),e.createElementVNode("rect",{x:b.value[i.value].tr.x,y:b.value[i.value].tr.y,height:"20",width:"20",fill:b.value[i.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TR"})},null,14,wt),e.createElementVNode("rect",{x:b.value[i.value].br.x,y:b.value[i.value].br.y,height:"20",width:"20",fill:b.value[i.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BR"})},null,14,St),e.createElementVNode("rect",{x:b.value[i.value].bl.x,y:b.value[i.value].bl.y,height:"20",width:"20",fill:b.value[i.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BL"})},null,14,Bt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.horizontal},null,8,qt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.vertical},null,8,_t)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,We)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",zt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:4,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${U.value}`,legendSet:ae.value,config:we.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,Nt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ae.value},void 0,!0)],512),e.createVNode(qe._sfc_main,{show:p.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:S.value,content:P.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Vt,[e.createVNode(be._sfc_main,{plot:{x:10,y:10},shape:_.value.shape,color:_.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(Ve.default,{key:5,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ze.DataTable,{key:`table_${I.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Et)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Wt=Ee._export_sfc(Tt,[["__scopeId","data-v-6d7c6ce0"]]);exports.default=Wt;