vue-data-ui 2.4.21 → 2.4.22

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 (147) hide show
  1. package/dist/{Arrow-BuVX2WoN.js → Arrow-BW_I0Vmx.js} +1 -1
  2. package/dist/{Arrow-DDe-g8rw.cjs → Arrow-D2zjDsxe.cjs} +1 -1
  3. package/dist/{BaseIcon-BdKOa64A.cjs → BaseIcon-BCC16NCl.cjs} +1 -1
  4. package/dist/{BaseIcon-BRSPQaGQ.js → BaseIcon-BbbAnrZI.js} +1 -1
  5. package/dist/{DataTable-BpVz3DBX.js → DataTable-Ce4R8v-3.js} +2 -2
  6. package/dist/{DataTable-H-KTkjfv.cjs → DataTable-DeevzR8O.cjs} +1 -1
  7. package/dist/{Legend-G5Zc4QaZ.cjs → Legend-BksImVUi.cjs} +1 -1
  8. package/dist/{Legend-hnLfwhmm.js → Legend-C6q2bLVV.js} +1 -1
  9. package/dist/{PackageVersion-BbQFSVXm.cjs → PackageVersion-AftniVVo.cjs} +1 -1
  10. package/dist/{PackageVersion-wqab02xF.js → PackageVersion-g2UOsY7H.js} +1 -1
  11. package/dist/{PenAndPaper-C_laA5mt.js → PenAndPaper-DRFeGfqV.js} +3 -3
  12. package/dist/{PenAndPaper-BX8pR5oV.cjs → PenAndPaper-j5noaKJZ.cjs} +1 -1
  13. package/dist/{Shape-QdnXSUyn.js → Shape-CBu7ails.js} +1 -1
  14. package/dist/{Shape-CJbFv4bs.cjs → Shape-Cf2Cj3g6.cjs} +1 -1
  15. package/dist/{Slicer-DV1kBscZ.js → Slicer-C0bRksfh.js} +2 -2
  16. package/dist/{Slicer-C1blYfez.cjs → Slicer-IneBjcpY.cjs} +1 -1
  17. package/dist/{Title-DBozX6nP.js → Title-B2orjUIW.js} +1 -1
  18. package/dist/{Title-BRqTk-nT.cjs → Title-BxrsVY3-.cjs} +1 -1
  19. package/dist/{Tooltip-DvGSIp31.cjs → Tooltip-BXc56Oxr.cjs} +1 -1
  20. package/dist/{Tooltip-Com_T8vc.js → Tooltip-CXjc5vb3.js} +1 -1
  21. package/dist/{index-CsQwCVqU.cjs → index-3oZdQf6G.cjs} +1 -1
  22. package/dist/{index-hV0hU1iE.js → index-D020Kb3z.js} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-CRAUOmT5.js → useNestedProp-CZkNAGQh.js} +1 -1
  25. package/dist/{useNestedProp-DSYpaLxP.cjs → useNestedProp-vPTP0Wem.cjs} +1 -1
  26. package/dist/{usePrinter-O2fMMTMe.cjs → usePrinter-BKzxQK4e.cjs} +1 -1
  27. package/dist/{usePrinter-y3d31M4g.js → usePrinter-CN0J0NFL.js} +1 -1
  28. package/dist/{vue-data-ui-qBad3a6z.cjs → vue-data-ui-CWDZLUkp.cjs} +1 -1
  29. package/dist/{vue-data-ui-bEKZH8jG.js → vue-data-ui-e2cclW_4.js} +58 -58
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-CkqKnqQt.cjs → vue-ui-3d-bar-DCeFCwb0.cjs} +1 -1
  33. package/dist/{vue-ui-3d-bar-f7YaBbrh.js → vue-ui-3d-bar-DggyGAlC.js} +9 -9
  34. package/dist/{vue-ui-accordion-m-s-7akB.js → vue-ui-accordion-B0fEWLwn.js} +3 -3
  35. package/dist/{vue-ui-accordion-CaktYQoo.cjs → vue-ui-accordion-QoJofzqF.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-EKKYQu3N.cjs → vue-ui-age-pyramid-CXtRGpVa.cjs} +1 -1
  37. package/dist/{vue-ui-age-pyramid-DkfNZR86.js → vue-ui-age-pyramid-DGDvfcvP.js} +10 -10
  38. package/dist/{vue-ui-annotator-DrVu5Pu0.js → vue-ui-annotator-BETCQ-pV.js} +1 -1
  39. package/dist/{vue-ui-annotator-v07J6oQG.cjs → vue-ui-annotator-BEZ0D_12.cjs} +1 -1
  40. package/dist/{vue-ui-bullet-CYDMehDZ.js → vue-ui-bullet-BK3d_nhc.js} +8 -8
  41. package/dist/{vue-ui-bullet-CdG92x7A.cjs → vue-ui-bullet-qAGQkwN4.cjs} +1 -1
  42. package/dist/{vue-ui-candlestick-Bw1O3QmK.js → vue-ui-candlestick-DQR8cYLr.js} +11 -11
  43. package/dist/{vue-ui-candlestick-D9yN-yRo.cjs → vue-ui-candlestick-DwfFHSRG.cjs} +1 -1
  44. package/dist/{vue-ui-carousel-table-kcQa0FHw.js → vue-ui-carousel-table-B6TSxUwp.js} +4 -4
  45. package/dist/{vue-ui-carousel-table-Cg6hAEVv.cjs → vue-ui-carousel-table-BrIXFgJp.cjs} +1 -1
  46. package/dist/{vue-ui-chestnut-Qu8c3_vB.cjs → vue-ui-chestnut-CWtw_edx.cjs} +1 -1
  47. package/dist/{vue-ui-chestnut-DE1AMXeX.js → vue-ui-chestnut-CpINqXRz.js} +8 -8
  48. package/dist/{vue-ui-cursor-DG8oufeh.cjs → vue-ui-cursor-DvX6FbhZ.cjs} +1 -1
  49. package/dist/{vue-ui-cursor-DbfjKtpf.js → vue-ui-cursor-yI58QC1O.js} +2 -2
  50. package/dist/{vue-ui-dashboard-BbwgfxLx.cjs → vue-ui-dashboard-BCic2CfN.cjs} +1 -1
  51. package/dist/{vue-ui-dashboard-CAkCNUBh.js → vue-ui-dashboard-Bb7vJ0Nx.js} +2 -2
  52. package/dist/{vue-ui-digits-DgQkxULm.cjs → vue-ui-digits-C4dI1v6b.cjs} +1 -1
  53. package/dist/{vue-ui-digits-BaXAiH4u.js → vue-ui-digits-D4uy7_hL.js} +2 -2
  54. package/dist/{vue-ui-donut-7GM_Wd1Y.js → vue-ui-donut-CRiEc5mP.js} +11 -11
  55. package/dist/{vue-ui-donut-BHzCOBu6.cjs → vue-ui-donut-ClvjMOxC.cjs} +1 -1
  56. package/dist/{vue-ui-donut-evolution-C-TkUOr6.cjs → vue-ui-donut-evolution-DFkGtmhv.cjs} +1 -1
  57. package/dist/{vue-ui-donut-evolution-DbU4RlP6.js → vue-ui-donut-evolution-DgrQVEh2.js} +11 -11
  58. package/dist/{vue-ui-dumbbell-DacMeiTU.cjs → vue-ui-dumbbell-BdkARfxX.cjs} +1 -1
  59. package/dist/{vue-ui-dumbbell-BacTx3zB.js → vue-ui-dumbbell-QCB4jZm4.js} +10 -10
  60. package/dist/{vue-ui-flow-D2G0YWL9.js → vue-ui-flow-CRnCk5Is.js} +9 -9
  61. package/dist/{vue-ui-flow-BUAvjG7i.cjs → vue-ui-flow-CYfdTIad.cjs} +1 -1
  62. package/dist/{vue-ui-galaxy-CxfV3BIw.cjs → vue-ui-galaxy-Cn9t3BG5.cjs} +1 -1
  63. package/dist/{vue-ui-galaxy-D6RFyIbQ.js → vue-ui-galaxy-WhRsA1Is.js} +11 -11
  64. package/dist/{vue-ui-gauge-DNJXnyLw.js → vue-ui-gauge-DwmCZiTj.js} +7 -7
  65. package/dist/{vue-ui-gauge-CJ5TKJpb.cjs → vue-ui-gauge-jYskVFUy.cjs} +1 -1
  66. package/dist/{vue-ui-gizmo-BBA51j_0.cjs → vue-ui-gizmo-C2P2qQYU.cjs} +1 -1
  67. package/dist/{vue-ui-gizmo-Db7-gRmB.js → vue-ui-gizmo-DpEZm4Uk.js} +3 -3
  68. package/dist/{vue-ui-heatmap-KQj8Jbpt.cjs → vue-ui-heatmap-D7TGNxC-.cjs} +1 -1
  69. package/dist/{vue-ui-heatmap-Ba6RMSTk.js → vue-ui-heatmap-u3SOjwts.js} +10 -10
  70. package/dist/{vue-ui-kpi-1srKxA1L.cjs → vue-ui-kpi-CCr0pHjp.cjs} +1 -1
  71. package/dist/{vue-ui-kpi-C8wyHy1H.js → vue-ui-kpi-Cdz5RM6j.js} +3 -3
  72. package/dist/{vue-ui-mini-loader-DutVmCuC.js → vue-ui-mini-loader-B2Xh0j5H.js} +2 -2
  73. package/dist/{vue-ui-mini-loader-BgKTecng.cjs → vue-ui-mini-loader-BuCeYPNP.cjs} +1 -1
  74. package/dist/{vue-ui-molecule-BOkIojio.js → vue-ui-molecule-GPDqR2rp.js} +11 -11
  75. package/dist/{vue-ui-molecule-CSezTn3m.cjs → vue-ui-molecule-z1A47zG1.cjs} +1 -1
  76. package/dist/{vue-ui-mood-radar-C8U8PHaq.js → vue-ui-mood-radar-DdQC5bH5.js} +11 -11
  77. package/dist/{vue-ui-mood-radar-CNTDrRs6.cjs → vue-ui-mood-radar-YZfCADah.cjs} +1 -1
  78. package/dist/{vue-ui-nested-donuts-DRWWnsdR.cjs → vue-ui-nested-donuts-CDSRcEX0.cjs} +1 -1
  79. package/dist/{vue-ui-nested-donuts-Bv2D1uFd.js → vue-ui-nested-donuts-Cf_KfoeP.js} +11 -11
  80. package/dist/{vue-ui-onion-CsnwbXED.cjs → vue-ui-onion-CmGZo3Sf.cjs} +1 -1
  81. package/dist/{vue-ui-onion-CT9YjU8v.js → vue-ui-onion-Lw3ohFAX.js} +11 -11
  82. package/dist/{vue-ui-parallel-coordinate-plot-C8KCRAX1.cjs → vue-ui-parallel-coordinate-plot-AHpf7ejC.cjs} +1 -1
  83. package/dist/{vue-ui-parallel-coordinate-plot-in5qpfXf.js → vue-ui-parallel-coordinate-plot-BsT0r0hr.js} +12 -12
  84. package/dist/{vue-ui-quadrant-Bw-0aW4F.cjs → vue-ui-quadrant-BPUIyB4-.cjs} +1 -1
  85. package/dist/{vue-ui-quadrant-C_9VNAXg.js → vue-ui-quadrant-BTmoe6UT.js} +12 -12
  86. package/dist/{vue-ui-quick-chart-C0YqMjyE.cjs → vue-ui-quick-chart-BYyXa06h.cjs} +1 -1
  87. package/dist/{vue-ui-quick-chart-BDBlm9uu.js → vue-ui-quick-chart-CRtE0pcc.js} +9 -9
  88. package/dist/{vue-ui-radar-C2QM_ee9.js → vue-ui-radar-BpkjOSOI.js} +12 -12
  89. package/dist/{vue-ui-radar-DXKMbeyW.cjs → vue-ui-radar-krdMX_hl.cjs} +1 -1
  90. package/dist/{vue-ui-rating-CsOknvaV.cjs → vue-ui-rating-9kj9GE7P.cjs} +1 -1
  91. package/dist/{vue-ui-rating-DVpgv2AY.js → vue-ui-rating-D1RlkwK9.js} +2 -2
  92. package/dist/{vue-ui-relation-circle-OXfdAyky.js → vue-ui-relation-circle-B7WGb08k.js} +7 -7
  93. package/dist/{vue-ui-relation-circle-ZA-M7aSc.cjs → vue-ui-relation-circle-Kv3G0P5k.cjs} +1 -1
  94. package/dist/{vue-ui-rings-qLQ-gl21.js → vue-ui-rings-DjXcLsY1.js} +11 -11
  95. package/dist/{vue-ui-rings-rftqDu-q.cjs → vue-ui-rings-DsZPnoqm.cjs} +1 -1
  96. package/dist/{vue-ui-scatter-Cv2IcrVH.cjs → vue-ui-scatter-D3ntjnfT.cjs} +1 -1
  97. package/dist/{vue-ui-scatter-4LbMvEAD.js → vue-ui-scatter-DEkTyyG8.js} +12 -12
  98. package/dist/{vue-ui-screenshot-BgjnQNxG.cjs → vue-ui-screenshot-BEbUxjNl.cjs} +1 -1
  99. package/dist/{vue-ui-screenshot-BV6ZYQRk.js → vue-ui-screenshot-kiJVXAGt.js} +1 -1
  100. package/dist/{vue-ui-skeleton-DsRTbz6d.cjs → vue-ui-skeleton-CI8sxaqr.cjs} +1 -1
  101. package/dist/{vue-ui-skeleton-BY8Jg9a_.js → vue-ui-skeleton-E1-7diF5.js} +3 -3
  102. package/dist/{vue-ui-smiley-BQ_3uicm.js → vue-ui-smiley-Cjbqlfre.js} +2 -2
  103. package/dist/{vue-ui-smiley-DB3y8CIb.cjs → vue-ui-smiley-CmkUQtfb.cjs} +1 -1
  104. package/dist/{vue-ui-spark-trend-Cgn7ONtS.cjs → vue-ui-spark-trend-C60Ypeev.cjs} +1 -1
  105. package/dist/{vue-ui-spark-trend-BhCJfY_p.js → vue-ui-spark-trend-DfpFe1UQ.js} +5 -5
  106. package/dist/{vue-ui-sparkbar-DxXt-GHr.js → vue-ui-sparkbar-B5oV2RUs.js} +4 -4
  107. package/dist/{vue-ui-sparkbar-D4GIhUXT.cjs → vue-ui-sparkbar-BAa71eZp.cjs} +1 -1
  108. package/dist/{vue-ui-sparkgauge-BbltbIrq.cjs → vue-ui-sparkgauge-UejPQm4b.cjs} +1 -1
  109. package/dist/{vue-ui-sparkgauge-BCPkJveV.js → vue-ui-sparkgauge-xlERw-g0.js} +4 -4
  110. package/dist/{vue-ui-sparkhistogram-DzX6lkk8.cjs → vue-ui-sparkhistogram-DC4jzkI0.cjs} +1 -1
  111. package/dist/{vue-ui-sparkhistogram-BKcr2mFc.js → vue-ui-sparkhistogram-nzFRlmgx.js} +5 -5
  112. package/dist/{vue-ui-sparkline-C-svTmFU.cjs → vue-ui-sparkline-BT4hxfBE.cjs} +1 -1
  113. package/dist/{vue-ui-sparkline-DYHUFUOp.js → vue-ui-sparkline-Duu0VrnG.js} +4 -4
  114. package/dist/{vue-ui-sparkstackbar-CL0uL_Te.cjs → vue-ui-sparkstackbar-K_vPau1u.cjs} +1 -1
  115. package/dist/{vue-ui-sparkstackbar-Btag2osm.js → vue-ui-sparkstackbar-tyoFIhva.js} +5 -5
  116. package/dist/{vue-ui-stackbar-CML7v_yU.cjs → vue-ui-stackbar-DRlvF164.cjs} +1 -1
  117. package/dist/{vue-ui-stackbar-C2mRU7ya.js → vue-ui-stackbar-e8BUjttp.js} +12 -12
  118. package/dist/{vue-ui-strip-plot-Vn5sEcME.cjs → vue-ui-strip-plot-8MOhIicL.cjs} +1 -1
  119. package/dist/{vue-ui-strip-plot-BIXF3VxN.js → vue-ui-strip-plot-Ef8oKjNV.js} +11 -11
  120. package/dist/{vue-ui-table-CyuRalnp.js → vue-ui-table-BOV6jtcL.js} +1 -1
  121. package/dist/{vue-ui-table-BbVpmm0B.cjs → vue-ui-table-DfevkNnK.cjs} +1 -1
  122. package/dist/{vue-ui-table-heatmap-DrQXQd41.cjs → vue-ui-table-heatmap-BMyRP1ol.cjs} +1 -1
  123. package/dist/{vue-ui-table-heatmap-DlGeS3l9.js → vue-ui-table-heatmap-CL-MybKI.js} +4 -4
  124. package/dist/{vue-ui-table-sparkline-DauDTktD.cjs → vue-ui-table-sparkline-CsqcT3ff.cjs} +1 -1
  125. package/dist/{vue-ui-table-sparkline-Yg2I33yZ.js → vue-ui-table-sparkline-DXvxiDJJ.js} +5 -5
  126. package/dist/{vue-ui-thermometer-Bglz0dOQ.cjs → vue-ui-thermometer-DyYqfAOW.cjs} +1 -1
  127. package/dist/{vue-ui-thermometer-DXwbqNrn.js → vue-ui-thermometer-WKzTNOOX.js} +7 -7
  128. package/dist/{vue-ui-timer-Brr7buaM.js → vue-ui-timer-CFDkyaxV.js} +5 -5
  129. package/dist/{vue-ui-timer-CpSEl8UD.cjs → vue-ui-timer-DQQGe1jt.cjs} +1 -1
  130. package/dist/{vue-ui-tiremarks-zdGmZNjo.cjs → vue-ui-tiremarks-C8iAWe-u.cjs} +1 -1
  131. package/dist/{vue-ui-tiremarks-DJowPFwY.js → vue-ui-tiremarks-aiUC8-YL.js} +7 -7
  132. package/dist/{vue-ui-treemap-a7NSP656.cjs → vue-ui-treemap-BORZ3g1I.cjs} +1 -1
  133. package/dist/{vue-ui-treemap-Bn5JU5BI.js → vue-ui-treemap-Bw-bWkza.js} +11 -11
  134. package/dist/{vue-ui-vertical-bar-CZxN7L9z.js → vue-ui-vertical-bar--mYbTcpi.js} +11 -11
  135. package/dist/{vue-ui-vertical-bar-BYG1vGlT.cjs → vue-ui-vertical-bar-B3ypOHUB.cjs} +1 -1
  136. package/dist/{vue-ui-waffle-CzUpKfkZ.js → vue-ui-waffle-Bj-tJs4n.js} +11 -11
  137. package/dist/{vue-ui-waffle-BbDBOivH.cjs → vue-ui-waffle-_84Hvek7.cjs} +1 -1
  138. package/dist/{vue-ui-wheel-CCje_ZSc.js → vue-ui-wheel-BywwqvY2.js} +7 -7
  139. package/dist/{vue-ui-wheel-lN3uYCr4.cjs → vue-ui-wheel-C-v9TgG1.cjs} +1 -1
  140. package/dist/{vue-ui-word-cloud-BjvG3n7x.cjs → vue-ui-word-cloud-CaQ4jLed.cjs} +1 -1
  141. package/dist/{vue-ui-word-cloud-D_5y92zN.js → vue-ui-word-cloud-CwExwCYc.js} +10 -10
  142. package/dist/{vue-ui-xy-Drm1aAb-.js → vue-ui-xy-CAYxRDzC.js} +14 -14
  143. package/dist/{vue-ui-xy-B-WlwJXZ.cjs → vue-ui-xy-CT3-xPpa.cjs} +1 -1
  144. package/dist/{vue-ui-xy-canvas-jieVsnBN.js → vue-ui-xy-canvas-BOElCo0f.js} +133 -131
  145. package/dist/vue-ui-xy-canvas-CdrfnVuI.cjs +9 -0
  146. package/package.json +1 -1
  147. package/dist/vue-ui-xy-canvas-BHrq_CYD.cjs +0 -9
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CsQwCVqU.cjs"),fe=require("./useResponsive-BJ7DTGpm.cjs"),Ve=require("./Title-BRqTk-nT.cjs"),me=require("./usePrinter-O2fMMTMe.cjs"),Ee=require("./Tooltip-DvGSIp31.cjs"),ge=require("./Shape-CJbFv4bs.cjs"),Te=require("./Legend-G5Zc4QaZ.cjs"),We=require("./DataTable-H-KTkjfv.cjs"),Xe=require("./vue-ui-skeleton-DsRTbz6d.cjs"),Ye=require("./vue-ui-accordion-CaktYQoo.cjs"),ke=require("./useNestedProp-DSYpaLxP.cjs"),Ae=require("./PackageVersion-BbQFSVXm.cjs"),Pe=require("./PenAndPaper-BX8pR5oV.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],De=["xmlns","viewBox","id"],Oe=["id"],Re=["stop-color"],He=["stop-color"],Ie={key:0},Ue=["fill","x","y","height","width","stroke-width","stroke","rx"],Ge=["x1","y1","x2","y2","stroke","stroke-width"],Qe=["x1","y1","x2","y2","stroke","stroke-width"],Je={key:1},je=["points","fill"],Ze=["points","fill"],Ke=["points","fill"],et=["points","fill"],tt={key:2},lt=["y","fill","font-size"],at=["x","y","fill","font-size"],ot=["x","y","fill","font-size"],ut=["y","fill","font-size"],rt={key:3},nt=["x","y","font-size","fill"],st=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","font-size","transform","fill"],vt=["id","font-size","transform","fill"],dt=["id","font-size","transform","fill"],ht={key:4},yt=["fill","points"],bt=["x","y","width","height"],pt=["x","y","width","height"],ft=["x","y","width","height"],mt=["x","y","width","height"],gt={key:0,style:{"pointer-events":"none"}},kt=["x","y","font-size","fill"],xt={key:0},$t=["x","y","onMouseover","onClick"],Lt={key:7,class:"vue-ui-dna"},Ct=["points","fill"],wt=["points","fill"],Bt=["points","fill"],St=["points","fill"],qt={key:8},_t=["x","y","font-size","fill","font-weight"],zt={key:9},Nt=["x","y","fill"],Vt=["x","y","fill"],Et=["x","y","fill"],Tt=["x","y","fill"],Wt=["stroke","d"],Xt=["stroke","d"],Yt={key:5,class:"vue-data-ui-watermark"},At=["onClick"],Pt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Mt=["innerHTML"],Ft={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(xe,{expose:$e,emit:P}){const k=xe,{vue_ui_quadrant:Le}=s.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),Ce=e.ref(null),E=e.ref(!1),M=e.ref(""),R=e.ref(0),h=e.ref(!1),w=e.ref(null),H=e.ref(null),I=e.ref(null),U=e.ref(null),G=e.ref(null),Q=e.ref(0),J=e.ref(0),j=e.ref(0),l=e.computed({get:()=>Z(),set:a=>a});function Z(){const a=ke.useNestedProp({userConfig:k.config,defaultConfig:Le});return a.theme?{...ke.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=Z(),K(),Q.value+=1,J.value+=1,j.value+=1},{deep:!0});const T=e.ref(null);function K(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=fe.throttle(()=>{const{width:u,height:o}=fe.useResponsive({chart:w.value,title:l.value.style.chart.title.text?H.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:U.value,noTitle:G.value});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(w.value.parentNode)}}e.onMounted(()=>{K()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),we=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),oe=e.computed(()=>s.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}}}),Be=e.ref(null),W=e.ref(!1);function S({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){i.value&&z(n);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 x=0;function pe(){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,x+=1,x<d?Be.value=requestAnimationFrame(pe):W.value=!1}pe()}function $(a){if(!W.value)if(h.value&&i.value===a)S({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":S({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":S({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":S({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":S({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 Se=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 n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+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(...B.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...B.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),B=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||oe.value[u]||s.palette[u]}))),qe=e.computed(()=>B.value.filter(a=>!L.value.includes(a.id))),_e=e.computed(()=>B.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),qe.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||oe.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function ue(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 re(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(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.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],n=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:n,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,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.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=ve();P("selectLegend",u)}const ne=e.computed(()=>_e.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)}))),ze=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 se(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 ie(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(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))M.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<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>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,M.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function ce(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};P("selectPlot",o)}function z(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};P("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 ve(){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 de(){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),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const N=e.ref(!1);function Ne(a){N.value=a,R.value+=1}function he(){p.value.showTable=!p.value.showTable}function ye(){p.value.plotLabels.show=!p.value.plotLabels.show}function be(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return $e({getData:ve,generatePdf:le,generateCsv:de,generateImage:ae,toggleTable:he,toggleLabels:ye,toggleTooltip:be,toggleAnnotator:O}),(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:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ve._sfc_main,{key:`table_${Q.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(me.UserOptions,{ref_key:"details",ref:Ce,key:`user_options_${R.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),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:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(le),onGenerateCsv:de,onGenerateImage:e.unref(ae),onToggleTable:he,onToggleLabels:ye,onToggleTooltip:be,onToggleAnnotator:O},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,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.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.createVNode(Ae._sfc_main),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(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,He)],8,Oe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.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,Ue))),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,Ge),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,Qe),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Je,[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,je),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,Ze),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,Ke),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,et)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",tt,[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,lt)):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,at)):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,ot)):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,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",rt,[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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,nt),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,st),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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,it),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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ct),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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,vt),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,dt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",ht,[(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(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,yt)):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,bt),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,pt),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,ft),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,mt)]),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",xt,[(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,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>ie(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>ce(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.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(n.name),5)],40,$t))),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,n=>(e.openBlock(),e.createBlock(ge._sfc_main,{color:o.color,isSelected:q.value&&n.uid===q.value,plot:n,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=>ie(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>ce(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",gt,[(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,kt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",Lt,[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,Ct)):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,wt)):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,Bt)):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,St)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",qt,[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",zt,[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,Nt),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,Vt),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,Et),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,Tt),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,Wt),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,Xt)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,De)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Xe.default,{key:6,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:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${j.value}`,legendSet:ne.value,config:ze.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,At)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ne.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:U,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ee._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:w.value,content:M.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",Pt,[e.createVNode(ge._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(Ye.default,{key:8,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(We.DataTable,{key:`table_${J.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,Mt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Fe))}},Dt=Me._export_sfc(Ft,[["__scopeId","data-v-557eff8e"]]);exports.default=Dt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-3oZdQf6G.cjs"),fe=require("./useResponsive-BJ7DTGpm.cjs"),Ve=require("./Title-BxrsVY3-.cjs"),me=require("./usePrinter-BKzxQK4e.cjs"),Ee=require("./Tooltip-BXc56Oxr.cjs"),ge=require("./Shape-Cf2Cj3g6.cjs"),Te=require("./Legend-BksImVUi.cjs"),We=require("./DataTable-DeevzR8O.cjs"),Xe=require("./vue-ui-skeleton-CI8sxaqr.cjs"),Ye=require("./vue-ui-accordion-QoJofzqF.cjs"),ke=require("./useNestedProp-vPTP0Wem.cjs"),Ae=require("./PackageVersion-AftniVVo.cjs"),Pe=require("./PenAndPaper-j5noaKJZ.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],De=["xmlns","viewBox","id"],Oe=["id"],Re=["stop-color"],He=["stop-color"],Ie={key:0},Ue=["fill","x","y","height","width","stroke-width","stroke","rx"],Ge=["x1","y1","x2","y2","stroke","stroke-width"],Qe=["x1","y1","x2","y2","stroke","stroke-width"],Je={key:1},je=["points","fill"],Ze=["points","fill"],Ke=["points","fill"],et=["points","fill"],tt={key:2},lt=["y","fill","font-size"],at=["x","y","fill","font-size"],ot=["x","y","fill","font-size"],ut=["y","fill","font-size"],rt={key:3},nt=["x","y","font-size","fill"],st=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","font-size","transform","fill"],vt=["id","font-size","transform","fill"],dt=["id","font-size","transform","fill"],ht={key:4},yt=["fill","points"],bt=["x","y","width","height"],pt=["x","y","width","height"],ft=["x","y","width","height"],mt=["x","y","width","height"],gt={key:0,style:{"pointer-events":"none"}},kt=["x","y","font-size","fill"],xt={key:0},$t=["x","y","onMouseover","onClick"],Lt={key:7,class:"vue-ui-dna"},Ct=["points","fill"],wt=["points","fill"],Bt=["points","fill"],St=["points","fill"],qt={key:8},_t=["x","y","font-size","fill","font-weight"],zt={key:9},Nt=["x","y","fill"],Vt=["x","y","fill"],Et=["x","y","fill"],Tt=["x","y","fill"],Wt=["stroke","d"],Xt=["stroke","d"],Yt={key:5,class:"vue-data-ui-watermark"},At=["onClick"],Pt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Mt=["innerHTML"],Ft={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(xe,{expose:$e,emit:P}){const k=xe,{vue_ui_quadrant:Le}=s.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),Ce=e.ref(null),E=e.ref(!1),M=e.ref(""),R=e.ref(0),h=e.ref(!1),w=e.ref(null),H=e.ref(null),I=e.ref(null),U=e.ref(null),G=e.ref(null),Q=e.ref(0),J=e.ref(0),j=e.ref(0),l=e.computed({get:()=>Z(),set:a=>a});function Z(){const a=ke.useNestedProp({userConfig:k.config,defaultConfig:Le});return a.theme?{...ke.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=Z(),K(),Q.value+=1,J.value+=1,j.value+=1},{deep:!0});const T=e.ref(null);function K(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=fe.throttle(()=>{const{width:u,height:o}=fe.useResponsive({chart:w.value,title:l.value.style.chart.title.text?H.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:U.value,noTitle:G.value});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(w.value.parentNode)}}e.onMounted(()=>{K()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),we=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),oe=e.computed(()=>s.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}}}),Be=e.ref(null),W=e.ref(!1);function S({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){i.value&&z(n);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 x=0;function pe(){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,x+=1,x<d?Be.value=requestAnimationFrame(pe):W.value=!1}pe()}function $(a){if(!W.value)if(h.value&&i.value===a)S({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":S({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":S({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":S({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":S({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 Se=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 n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+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(...B.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...B.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),B=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||oe.value[u]||s.palette[u]}))),qe=e.computed(()=>B.value.filter(a=>!L.value.includes(a.id))),_e=e.computed(()=>B.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),qe.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||oe.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function ue(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 re(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(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.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],n=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:n,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,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.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=ve();P("selectLegend",u)}const ne=e.computed(()=>_e.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)}))),ze=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 se(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 ie(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(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))M.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<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>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,M.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function ce(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};P("selectPlot",o)}function z(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};P("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 ve(){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 de(){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),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const N=e.ref(!1);function Ne(a){N.value=a,R.value+=1}function he(){p.value.showTable=!p.value.showTable}function ye(){p.value.plotLabels.show=!p.value.plotLabels.show}function be(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return $e({getData:ve,generatePdf:le,generateCsv:de,generateImage:ae,toggleTable:he,toggleLabels:ye,toggleTooltip:be,toggleAnnotator:O}),(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:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ve._sfc_main,{key:`table_${Q.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(me.UserOptions,{ref_key:"details",ref:Ce,key:`user_options_${R.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),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:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(le),onGenerateCsv:de,onGenerateImage:e.unref(ae),onToggleTable:he,onToggleLabels:ye,onToggleTooltip:be,onToggleAnnotator:O},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,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.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.createVNode(Ae._sfc_main),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(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,He)],8,Oe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.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,Ue))),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,Ge),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,Qe),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Je,[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,je),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,Ze),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,Ke),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,et)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",tt,[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,lt)):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,at)):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,ot)):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,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",rt,[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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,nt),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,st),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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,it),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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ct),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(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,vt),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,dt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",ht,[(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(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,yt)):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,bt),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,pt),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,ft),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,mt)]),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",xt,[(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,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>ie(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>ce(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.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(n.name),5)],40,$t))),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,n=>(e.openBlock(),e.createBlock(ge._sfc_main,{color:o.color,isSelected:q.value&&n.uid===q.value,plot:n,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=>ie(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>ce(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",gt,[(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,kt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",Lt,[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,Ct)):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,wt)):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,Bt)):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,St)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",qt,[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",zt,[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,Nt),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,Vt),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,Et),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,Tt),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,Wt),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,Xt)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,De)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Xe.default,{key:6,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:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${j.value}`,legendSet:ne.value,config:ze.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,At)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ne.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:U,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ee._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:w.value,content:M.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",Pt,[e.createVNode(ge._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(Ye.default,{key:8,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(We.DataTable,{key:`table_${J.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,Mt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Fe))}},Dt=Me._export_sfc(Ft,[["__scopeId","data-v-557eff8e"]]);exports.default=Dt;
@@ -1,17 +1,17 @@
1
1
  import { computed as g, ref as h, watch as Oe, onMounted as Ke, onBeforeUnmount as et, openBlock as o, createElementBlock as n, normalizeClass as T, normalizeStyle as q, createBlock as N, createCommentVNode as c, unref as y, createSlots as tt, withCtx as x, renderSlot as L, normalizeProps as G, guardReactiveProps as Q, createVNode as ie, createElementVNode as v, Fragment as C, renderList as Y, toDisplayString as $, createTextVNode as lt, nextTick as at } from "vue";
2
- import { u as ut, c as Be, t as ot, a as st, p as ve, o as rt, e as F, b as nt, T as it, d as vt, i as P, f as O, X as dt, s as ae, w as ct, U as ht, F as yt, x as bt, y as ft, q as pt, r as gt } from "./index-hV0hU1iE.js";
2
+ import { u as ut, c as Be, t as ot, a as st, p as ve, o as rt, e as F, b as nt, T as it, d as vt, i as P, f as O, X as dt, s as ae, w as ct, U as ht, F as yt, x as bt, y as ft, q as pt, r as gt } from "./index-D020Kb3z.js";
3
3
  import { t as mt, u as xt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as $t } from "./Title-DBozX6nP.js";
5
- import { u as kt, U as Lt } from "./usePrinter-y3d31M4g.js";
6
- import { _ as wt } from "./Tooltip-Com_T8vc.js";
7
- import { _ as Ve } from "./Shape-QdnXSUyn.js";
8
- import { L as _t } from "./Legend-hnLfwhmm.js";
9
- import { D as qt } from "./DataTable-BpVz3DBX.js";
10
- import Ct from "./vue-ui-skeleton-BY8Jg9a_.js";
11
- import St from "./vue-ui-accordion-m-s-7akB.js";
12
- import { u as Re } from "./useNestedProp-CRAUOmT5.js";
13
- import { _ as zt } from "./PackageVersion-wqab02xF.js";
14
- import { P as Tt } from "./PenAndPaper-C_laA5mt.js";
4
+ import { _ as $t } from "./Title-B2orjUIW.js";
5
+ import { u as kt, U as Lt } from "./usePrinter-CN0J0NFL.js";
6
+ import { _ as wt } from "./Tooltip-CXjc5vb3.js";
7
+ import { _ as Ve } from "./Shape-CBu7ails.js";
8
+ import { L as _t } from "./Legend-C6q2bLVV.js";
9
+ import { D as qt } from "./DataTable-Ce4R8v-3.js";
10
+ import Ct from "./vue-ui-skeleton-E1-7diF5.js";
11
+ import St from "./vue-ui-accordion-B0fEWLwn.js";
12
+ import { u as Re } from "./useNestedProp-CZkNAGQh.js";
13
+ import { _ as zt } from "./PackageVersion-g2UOsY7H.js";
14
+ import { P as Tt } from "./PenAndPaper-DRFeGfqV.js";
15
15
  import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const Xt = ["id"], Yt = ["xmlns", "viewBox", "id"], At = ["id"], Mt = ["stop-color"], Nt = ["stop-color"], Pt = { key: 0 }, Ot = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], Bt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Vt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Rt = { key: 1 }, Ft = ["points", "fill"], Ht = ["points", "fill"], It = ["points", "fill"], Dt = ["points", "fill"], Ut = { key: 2 }, Et = ["y", "fill", "font-size"], Gt = ["x", "y", "fill", "font-size"], Qt = ["x", "y", "fill", "font-size"], Jt = ["y", "fill", "font-size"], jt = { key: 3 }, Zt = ["x", "y", "font-size", "fill"], Kt = ["x", "y", "font-size", "fill"], el = ["x", "y", "font-size", "fill"], tl = ["id", "font-size", "transform", "fill"], ll = ["id", "font-size", "transform", "fill"], al = ["id", "font-size", "transform", "fill"], ul = { key: 4 }, ol = ["fill", "points"], sl = ["x", "y", "width", "height"], rl = ["x", "y", "width", "height"], nl = ["x", "y", "width", "height"], il = ["x", "y", "width", "height"], vl = {
17
17
  key: 0,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CsQwCVqU.cjs"),we=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./BaseIcon-BdKOa64A.cjs"),De=require("./Tooltip-DvGSIp31.cjs"),Ee=require("./usePrinter-O2fMMTMe.cjs"),Me=require("./Slicer-C1blYfez.cjs"),Ue=require("./vue-ui-skeleton-DsRTbz6d.cjs"),Ae=require("./useNestedProp-DSYpaLxP.cjs"),qe=require("./PackageVersion-BbQFSVXm.cjs"),We=require("./PenAndPaper-BX8pR5oV.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ge=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function He({dataset:s,barLineSwitch:B=6}){let h=null,L=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),Q(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,L=s,z=s.length),ie(s))){if(!Ye(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>Ze(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Le(j,E=>typeof E=="number")&&(h=S.DONUT,L=s),Le(j,E=>Array.isArray(E)&&P(E))&&(_e(s)>B?h=S.LINE:h=S.BAR,z=_e(s),L=s.map(E=>({...E,data:Je(E,$=>P($))}))),s=s.map(E=>Ce(E)),L=L.map(E=>Ce(E))}return Q(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:L,maxSeriesLength:z}}function Ne(s){return!s||Q(s)&&!s.length}function Q(s){return Array.isArray(s)}function P(s){if(!Q(s)||Ne(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ie(s){return!Q(s)||Ne(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Xe(s,B){const h=Object.keys(s).sort(),L=Object.keys(B).sort();if(h.length!==L.length)return!1;for(let z=0;z<h.length;z+=1){const V=h[z],M=L[z];if(V!==M||typeof s[V]!=typeof B[M])return!1}return!0}function Ye(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Xe(s[B],s[h]))return!1;return!0}function Ze(s){return Ge.includes(s.toUpperCase())}function Le(s,B){let h=[];for(let L=0;L<s.length;L+=1)h.push(B(s[L]));return h.includes(!0)}function _e(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function Je(s,B){return Object.values(s).filter(h=>B(h))[0]}function Ce(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const ze=s=>(e.pushScopeId("data-v-7397d9b6"),s=s(),e.popScopeId(),s),Qe=["id"],Ke=["xmlns","viewBox"],et=["id"],tt=["id"],lt=ze(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),at=["id"],ot=["flood-color"],nt={key:0,class:"donut-label-connectors"},rt=["d","stroke","stroke-width","filter"],it=["cx","cy","r","fill","filter"],ut={class:"donut"},st=["d","fill","stroke","stroke-width","filter"],ct=["d","onMouseenter","onClick"],dt={key:1,class:"donut-labels quick-animation"},vt=["cx","cy","fill","stroke","filter"],mt=["text-anchor","x","y","fill","font-size","filter"],ht=["text-anchor","x","y","fill","font-size","filter"],pt={key:2,class:"donut-hollow quick-animation"},ft=["x","y","font-size","fill"],kt=["x","y","font-size","fill"],gt={key:0,class:"line-grid"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["x1","x2","y1","y2","stroke","stroke-width"],St={key:1,class:"line-axis"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["x1","x2","y1","y2","stroke","stroke-width"],wt={key:2,class:"yLabels"},Et=["x1","x2","y1","y2","stroke","stroke-width"],At=["x","y","font-size","fill"],Lt={key:3,class:"periodLabels"},_t=["x1","x2","y1","y2","stroke","stroke-width"],Ct=["font-size","text-anchor","fill","transform"],Nt={class:"plots"},zt={class:"line-plot-series"},Vt=["d","stroke","stroke-width"],Ft=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],Pt=["d","stroke","stroke-width"],Tt=["cx","cy","fill","stroke"],Rt={key:4,class:"dataLabels"},It=["font-size","fill","x","y"],Ot={class:"tooltip-traps"},Dt=["x","y","height","width","fill","onMouseenter","onClick"],Mt={key:0,class:"line-grid"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x1","x2","y1","y2","stroke","stroke-width"],Wt={key:1,class:"line-axis"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["x1","x2","y1","y2","stroke","stroke-width"],Ht={key:2,class:"yLabels"},Xt=["x1","x2","y1","y2","stroke","stroke-width"],Yt=["x","y","font-size","fill"],Zt={key:3,class:"periodLabels"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["font-size","text-anchor","transform","fill"],Kt={class:"plots"},el=["x","width","height","y","fill","stroke","stroke-width"],tl=["to"],ll=["from","to"],al={key:4,class:"dataLabels"},ol=["x","y","font-size","fill"],nl={class:"tooltip-traps"},rl=["x","y","height","width","fill","onMouseenter","onClick"],il={key:3,class:"axis-labels"},ul={key:0},sl=["font-size","fill","x","y"],cl={key:1},dl=["font-size","fill","x","y"],vl={key:2},ml=["font-size","fill","transform"],hl={key:3},pl=["font-size","fill","transform"],fl={key:6,class:"vue-data-ui-watermark"},kl=["onClick"],gl=["onClick"],yl=["onClick"],xl={key:1,class:"vue-ui-quick-chart-not-processable"},Sl=ze(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),bl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const L=s,{vue_ui_quick_chart:z}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),F=e.ref(null),de=e.ref(null),ve=e.ref(null),x=e.ref([]),me=e.ref(0),K=e.ref(0),t=e.computed({get:()=>he(),set:n=>n});function he(){const n=Ae.useNestedProp({userConfig:L.config,defaultConfig:z});return n.theme?{...Ae.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||L.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:n}e.watch(()=>L.config,n=>{t.value=he(),y.value.width=t.value.width,y.value.height=t.value.height,ke()},{deep:!0}),e.watch(()=>L.dataset,n=>{f.value=X.value,k.value.start=0,k.value.end=f.value.maxSeriesLength,K.value+=1},{deep:!0});const H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.computed(()=>{const n=He({dataset:u.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),f=e.ref(X.value),Ve=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:ee,isImaging:te,generatePdf:pe,generateImage:fe}=Ee.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),Fe=e.computed(()=>t.value.showUserOptions&&!t.value.title),y=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{ke()});function ke(){if(t.value.responsive){const n=we.throttle(()=>{const{width:v,height:l}=we.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?j.value:null,source:de.value,noTitle:ve.value});y.value.width=v,y.value.height=l});ae.value=new ResizeObserver(n),ae.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const $e=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function ge(n){return[...n].map(v=>v.value).reduce((v,l)=>v+l,0)}function Y(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${E.value})`:""}function ye(n,v){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<v&&x.value.push(n)}const xe=e.ref(null),Se=e.ref(null),oe=e.ref(!1);function Pe(n,v){oe.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(oe.value=!1,cancelAnimationFrame(Se.value),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},Se.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=X.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(v.length>1){let r=function(){l<.1?(oe.value=!1,cancelAnimationFrame(xe.value),x.value.push(n.id),f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},xe.value=requestAnimationFrame(r))};r()}}const T=e.ref(null);function Te(n){T.value=n}const be=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const n=f.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/ge(o))?0:a.value/ge(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=X.value.dataset.find((A,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))R.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,p+=`<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="${a.color}"/></svg>`,p+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,p+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${p}</div>`}$.value=!0}function m(){$.value=!1,F.value=null,T.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},N=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=n.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:X.value.dataset.find((g,p)=>`donut_${p}`===a.id).VALUE})),I=y.value.width/2,W=y.value.height/2,O=y.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:_,displayArcPercentage:v,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:N,cx:I,cy:W,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},I,W,O,O,1.99999,2,1,360,105.25,y.value.height*be.value)}}),k=e.ref({start:0,end:f.value.maxSeriesLength});function Re(){k.value={start:0,end:f.value.maxSeriesLength},K.value+=1}const Ie=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let n=[];P(f.value.dataset)&&(n=f.value.dataset),ie(f.value.dataset)&&(n=f.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const v=P(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if(P(n))l=n;else for(let i=0;i<v;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:f.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ie(f.value.dataset)&&(l=f.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,p)=>p).slice(k.value.start,k.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?v.top:v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(i.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((g,p)=>({x:v.left+N*(p+1)-N/2,y:v.bottom-(g+m)/(i.max+m)*v.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function W(a){F.value=a,T.value=a;const o=l.map(p=>({...p,value:p.values[a],absoluteIndex:p.absoluteIndices[a]})).filter(p=>!x.value.includes(p.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let p="";t.value.xyPeriods[o[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((A,C)=>{p+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-3oZdQf6G.cjs"),we=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./BaseIcon-BCC16NCl.cjs"),De=require("./Tooltip-BXc56Oxr.cjs"),Ee=require("./usePrinter-BKzxQK4e.cjs"),Me=require("./Slicer-IneBjcpY.cjs"),Ue=require("./vue-ui-skeleton-CI8sxaqr.cjs"),Ae=require("./useNestedProp-vPTP0Wem.cjs"),qe=require("./PackageVersion-AftniVVo.cjs"),We=require("./PenAndPaper-j5noaKJZ.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ge=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function He({dataset:s,barLineSwitch:B=6}){let h=null,L=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),Q(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,L=s,z=s.length),ie(s))){if(!Ye(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>Ze(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Le(j,E=>typeof E=="number")&&(h=S.DONUT,L=s),Le(j,E=>Array.isArray(E)&&P(E))&&(_e(s)>B?h=S.LINE:h=S.BAR,z=_e(s),L=s.map(E=>({...E,data:Je(E,$=>P($))}))),s=s.map(E=>Ce(E)),L=L.map(E=>Ce(E))}return Q(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:L,maxSeriesLength:z}}function Ne(s){return!s||Q(s)&&!s.length}function Q(s){return Array.isArray(s)}function P(s){if(!Q(s)||Ne(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ie(s){return!Q(s)||Ne(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Xe(s,B){const h=Object.keys(s).sort(),L=Object.keys(B).sort();if(h.length!==L.length)return!1;for(let z=0;z<h.length;z+=1){const V=h[z],M=L[z];if(V!==M||typeof s[V]!=typeof B[M])return!1}return!0}function Ye(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Xe(s[B],s[h]))return!1;return!0}function Ze(s){return Ge.includes(s.toUpperCase())}function Le(s,B){let h=[];for(let L=0;L<s.length;L+=1)h.push(B(s[L]));return h.includes(!0)}function _e(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function Je(s,B){return Object.values(s).filter(h=>B(h))[0]}function Ce(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const ze=s=>(e.pushScopeId("data-v-7397d9b6"),s=s(),e.popScopeId(),s),Qe=["id"],Ke=["xmlns","viewBox"],et=["id"],tt=["id"],lt=ze(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),at=["id"],ot=["flood-color"],nt={key:0,class:"donut-label-connectors"},rt=["d","stroke","stroke-width","filter"],it=["cx","cy","r","fill","filter"],ut={class:"donut"},st=["d","fill","stroke","stroke-width","filter"],ct=["d","onMouseenter","onClick"],dt={key:1,class:"donut-labels quick-animation"},vt=["cx","cy","fill","stroke","filter"],mt=["text-anchor","x","y","fill","font-size","filter"],ht=["text-anchor","x","y","fill","font-size","filter"],pt={key:2,class:"donut-hollow quick-animation"},ft=["x","y","font-size","fill"],kt=["x","y","font-size","fill"],gt={key:0,class:"line-grid"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["x1","x2","y1","y2","stroke","stroke-width"],St={key:1,class:"line-axis"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["x1","x2","y1","y2","stroke","stroke-width"],wt={key:2,class:"yLabels"},Et=["x1","x2","y1","y2","stroke","stroke-width"],At=["x","y","font-size","fill"],Lt={key:3,class:"periodLabels"},_t=["x1","x2","y1","y2","stroke","stroke-width"],Ct=["font-size","text-anchor","fill","transform"],Nt={class:"plots"},zt={class:"line-plot-series"},Vt=["d","stroke","stroke-width"],Ft=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],Pt=["d","stroke","stroke-width"],Tt=["cx","cy","fill","stroke"],Rt={key:4,class:"dataLabels"},It=["font-size","fill","x","y"],Ot={class:"tooltip-traps"},Dt=["x","y","height","width","fill","onMouseenter","onClick"],Mt={key:0,class:"line-grid"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x1","x2","y1","y2","stroke","stroke-width"],Wt={key:1,class:"line-axis"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["x1","x2","y1","y2","stroke","stroke-width"],Ht={key:2,class:"yLabels"},Xt=["x1","x2","y1","y2","stroke","stroke-width"],Yt=["x","y","font-size","fill"],Zt={key:3,class:"periodLabels"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["font-size","text-anchor","transform","fill"],Kt={class:"plots"},el=["x","width","height","y","fill","stroke","stroke-width"],tl=["to"],ll=["from","to"],al={key:4,class:"dataLabels"},ol=["x","y","font-size","fill"],nl={class:"tooltip-traps"},rl=["x","y","height","width","fill","onMouseenter","onClick"],il={key:3,class:"axis-labels"},ul={key:0},sl=["font-size","fill","x","y"],cl={key:1},dl=["font-size","fill","x","y"],vl={key:2},ml=["font-size","fill","transform"],hl={key:3},pl=["font-size","fill","transform"],fl={key:6,class:"vue-data-ui-watermark"},kl=["onClick"],gl=["onClick"],yl=["onClick"],xl={key:1,class:"vue-ui-quick-chart-not-processable"},Sl=ze(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),bl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const L=s,{vue_ui_quick_chart:z}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),F=e.ref(null),de=e.ref(null),ve=e.ref(null),x=e.ref([]),me=e.ref(0),K=e.ref(0),t=e.computed({get:()=>he(),set:n=>n});function he(){const n=Ae.useNestedProp({userConfig:L.config,defaultConfig:z});return n.theme?{...Ae.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||L.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:n}e.watch(()=>L.config,n=>{t.value=he(),y.value.width=t.value.width,y.value.height=t.value.height,ke()},{deep:!0}),e.watch(()=>L.dataset,n=>{f.value=X.value,k.value.start=0,k.value.end=f.value.maxSeriesLength,K.value+=1},{deep:!0});const H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.computed(()=>{const n=He({dataset:u.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),f=e.ref(X.value),Ve=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:ee,isImaging:te,generatePdf:pe,generateImage:fe}=Ee.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),Fe=e.computed(()=>t.value.showUserOptions&&!t.value.title),y=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{ke()});function ke(){if(t.value.responsive){const n=we.throttle(()=>{const{width:v,height:l}=we.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?j.value:null,source:de.value,noTitle:ve.value});y.value.width=v,y.value.height=l});ae.value=new ResizeObserver(n),ae.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const $e=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function ge(n){return[...n].map(v=>v.value).reduce((v,l)=>v+l,0)}function Y(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${E.value})`:""}function ye(n,v){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<v&&x.value.push(n)}const xe=e.ref(null),Se=e.ref(null),oe=e.ref(!1);function Pe(n,v){oe.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(oe.value=!1,cancelAnimationFrame(Se.value),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},Se.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=X.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(v.length>1){let r=function(){l<.1?(oe.value=!1,cancelAnimationFrame(xe.value),x.value.push(n.id),f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},xe.value=requestAnimationFrame(r))};r()}}const T=e.ref(null);function Te(n){T.value=n}const be=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const n=f.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/ge(o))?0:a.value/ge(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=X.value.dataset.find((A,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))R.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,p+=`<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="${a.color}"/></svg>`,p+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,p+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${p}</div>`}$.value=!0}function m(){$.value=!1,F.value=null,T.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},N=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=n.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:X.value.dataset.find((g,p)=>`donut_${p}`===a.id).VALUE})),I=y.value.width/2,W=y.value.height/2,O=y.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:_,displayArcPercentage:v,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:N,cx:I,cy:W,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},I,W,O,O,1.99999,2,1,360,105.25,y.value.height*be.value)}}),k=e.ref({start:0,end:f.value.maxSeriesLength});function Re(){k.value={start:0,end:f.value.maxSeriesLength},K.value+=1}const Ie=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let n=[];P(f.value.dataset)&&(n=f.value.dataset),ie(f.value.dataset)&&(n=f.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const v=P(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if(P(n))l=n;else for(let i=0;i<v;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:f.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ie(f.value.dataset)&&(l=f.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,p)=>p).slice(k.value.start,k.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?v.top:v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(i.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((g,p)=>({x:v.left+N*(p+1)-N/2,y:v.bottom-(g+m)/(i.max+m)*v.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function W(a){F.value=a,T.value=a;const o=l.map(p=>({...p,value:p.values[a],absoluteIndex:p.absoluteIndices[a]})).filter(p=>!x.value.includes(p.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let p="";t.value.xyPeriods[o[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((A,C)=>{p+=`
2
2
  <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
3
  <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${A.color}"/></svg>
4
4
  <span>${A.name}:</span>
@@ -1,14 +1,14 @@
1
1
  import { ref as $, computed as D, watch as Ee, onMounted as ht, onBeforeUnmount as ft, openBlock as a, createElementBlock as l, normalizeClass as ne, normalizeStyle as N, createBlock as Le, createCommentVNode as f, unref as g, createSlots as gt, withCtx as Q, renderSlot as M, normalizeProps as H, guardReactiveProps as re, toDisplayString as E, createVNode as se, createElementVNode as A, Fragment as m, renderList as L, mergeProps as Re, pushScopeId as pt, popScopeId as mt } from "vue";
2
- import { u as yt, c as xt, t as kt, a as bt, p as V, b as St, I as wt, e as At, d as Oe, m as _t, C as Je, X as Lt, j as zt, k as me, n as Ne, i as X, f as B, R as Qe, v as Z, x as ze, y as Fe } from "./index-hV0hU1iE.js";
2
+ import { u as yt, c as xt, t as kt, a as bt, p as V, b as St, I as wt, e as At, d as Oe, m as _t, C as Je, X as Lt, j as zt, k as me, n as Ne, i as X, f as B, R as Qe, v as Z, x as ze, y as Fe } from "./index-D020Kb3z.js";
3
3
  import { t as $t, u as Ct } from "./useResponsive-CoxXLe23.js";
4
- import $e from "./BaseIcon-BRSPQaGQ.js";
5
- import { _ as Tt } from "./Tooltip-Com_T8vc.js";
6
- import { u as Pt, U as It } from "./usePrinter-y3d31M4g.js";
7
- import { S as Et } from "./Slicer-DV1kBscZ.js";
8
- import Rt from "./vue-ui-skeleton-BY8Jg9a_.js";
9
- import { u as Ke } from "./useNestedProp-CRAUOmT5.js";
10
- import { _ as Ot } from "./PackageVersion-wqab02xF.js";
11
- import { P as Nt } from "./PenAndPaper-C_laA5mt.js";
4
+ import $e from "./BaseIcon-BbbAnrZI.js";
5
+ import { _ as Tt } from "./Tooltip-CXjc5vb3.js";
6
+ import { u as Pt, U as It } from "./usePrinter-CN0J0NFL.js";
7
+ import { S as Et } from "./Slicer-C0bRksfh.js";
8
+ import Rt from "./vue-ui-skeleton-E1-7diF5.js";
9
+ import { u as Ke } from "./useNestedProp-CZkNAGQh.js";
10
+ import { _ as Ot } from "./PackageVersion-g2UOsY7H.js";
11
+ import { P as Nt } from "./PenAndPaper-DRFeGfqV.js";
12
12
  import { _ as Ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const _ = {
14
14
  LINE: "LINE",
@@ -1,17 +1,17 @@
1
1
  import { computed as v, ref as u, watch as Ge, onMounted as We, onBeforeUnmount as Xe, openBlock as r, createElementBlock as s, normalizeClass as z, normalizeStyle as Q, createBlock as w, createCommentVNode as p, unref as g, createSlots as Ye, withCtx as y, renderSlot as m, normalizeProps as R, guardReactiveProps as M, createVNode as Z, createElementVNode as $, Fragment as P, renderList as T, toDisplayString as V, createTextVNode as we, nextTick as je } from "vue";
2
- import { u as qe, c as He, t as Je, a as Ke, p as x, o as Qe, e as S, b as Ze, g as $e, d as Pe, O as Te, v as et, i as xe, f as U, X as tt, s as ee, w as at, P as Ae, x as ot, y as lt, q as rt, r as nt } from "./index-hV0hU1iE.js";
2
+ import { u as qe, c as He, t as Je, a as Ke, p as x, o as Qe, e as S, b as Ze, g as $e, d as Pe, O as Te, v as et, i as xe, f as U, X as tt, s as ee, w as at, P as Ae, x as ot, y as lt, q as rt, r as nt } from "./index-D020Kb3z.js";
3
3
  import { t as st, u as ut } from "./useResponsive-CoxXLe23.js";
4
- import { _ as it } from "./Title-DBozX6nP.js";
5
- import { u as ct, U as dt } from "./usePrinter-y3d31M4g.js";
6
- import { _ as vt } from "./Tooltip-Com_T8vc.js";
7
- import pt from "./vue-ui-sparkbar-DxXt-GHr.js";
8
- import { L as ht } from "./Legend-hnLfwhmm.js";
9
- import { D as gt } from "./DataTable-BpVz3DBX.js";
10
- import ft from "./vue-ui-skeleton-BY8Jg9a_.js";
11
- import yt from "./vue-ui-accordion-m-s-7akB.js";
12
- import { u as Oe } from "./useNestedProp-CRAUOmT5.js";
13
- import { _ as mt } from "./PackageVersion-wqab02xF.js";
14
- import { P as bt } from "./PenAndPaper-C_laA5mt.js";
4
+ import { _ as it } from "./Title-B2orjUIW.js";
5
+ import { u as ct, U as dt } from "./usePrinter-CN0J0NFL.js";
6
+ import { _ as vt } from "./Tooltip-CXjc5vb3.js";
7
+ import pt from "./vue-ui-sparkbar-B5oV2RUs.js";
8
+ import { L as ht } from "./Legend-C6q2bLVV.js";
9
+ import { D as gt } from "./DataTable-Ce4R8v-3.js";
10
+ import ft from "./vue-ui-skeleton-E1-7diF5.js";
11
+ import yt from "./vue-ui-accordion-B0fEWLwn.js";
12
+ import { u as Oe } from "./useNestedProp-CZkNAGQh.js";
13
+ import { _ as mt } from "./PackageVersion-g2UOsY7H.js";
14
+ import { P as bt } from "./PenAndPaper-DRFeGfqV.js";
15
15
  import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const Ct = ["id"], _t = ["xmlns", "viewBox"], wt = ["id"], $t = ["stop-color"], Pt = ["stop-color"], Tt = { key: 0 }, xt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], At = { key: 0 }, Ot = ["d", "stroke", "stroke-width"], Nt = ["d", "stroke", "stroke-width"], St = { key: 1 }, Ft = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], It = ["points", "stroke", "stroke-width"], Lt = ["points", "stroke", "stroke-width", "fill"], zt = { key: 2 }, Rt = ["cx", "cy", "fill", "r", "stroke"], Mt = {
17
17
  key: 5,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CsQwCVqU.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./Title-BRqTk-nT.cjs"),le=require("./usePrinter-O2fMMTMe.cjs"),be=require("./Tooltip-DvGSIp31.cjs"),Ce=require("./vue-ui-sparkbar-D4GIhUXT.cjs"),we=require("./Legend-G5Zc4QaZ.cjs"),Be=require("./DataTable-H-KTkjfv.cjs"),_e=require("./vue-ui-skeleton-DsRTbz6d.cjs"),Pe=require("./vue-ui-accordion-CaktYQoo.cjs"),re=require("./useNestedProp-DSYpaLxP.cjs"),$e=require("./PackageVersion-BbQFSVXm.cjs"),xe=require("./PenAndPaper-BX8pR5oV.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Se=["xmlns","viewBox"],Ee=["id"],Ve=["stop-color"],Ae=["stop-color"],Oe={key:0},Fe=["x1","y1","x2","y2","stroke","stroke-width"],Le={key:0},ze=["d","stroke","stroke-width"],Ie=["d","stroke","stroke-width"],Re={key:1},qe=["x","y","text-anchor","font-size","fill","onMouseenter"],De=["points","stroke","stroke-width"],Me=["points","stroke","stroke-width","fill"],Ue={key:2},Ge=["cx","cy","fill","r","stroke"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Xe={key:0,style:{"max-width":"200px",margin:"0 auto"}},je={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const d=ne,{vue_ui_radar:ie}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(0),D=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:o=>o});function U(){const o=re.useNestedProp({userConfig:d.config,defaultConfig:ie});return o.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=U(),G(),q.value+=1,D.value+=1,M.value+=1},{deep:!0});const B=e.ref(null);function G(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ae.throttle(()=>{const{width:a,height:l}=ae.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value,noTitle:R.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:W,isImaging:H,generatePdf:X,generateImage:j}=le.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ve=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),y=e.ref(!1);function J(o){y.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),se("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function pe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),K=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),Q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Z=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:Q.value,rotation:0})),ge=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Z.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>he({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||K.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function he({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||K.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>J(l),isSegregated:i.value.includes(l)}))}),me=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function fe(o,a){E.value=[],P.value=a,x.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ee(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Je)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function ye(o){w.value=o,F.value+=1}function te(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ue({getData:pe,generatePdf:X,generateCsv:ee,generateImage:j,toggleTable:te,toggleTooltip:oe,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(H),isPrinting:e.unref(W),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:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(X),onGenerateCsv:ee,onGenerateImage:e.unref(j),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ae)],8,Ee))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.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,Fe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:Q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ze))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Z.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,Ie),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>fe(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,qe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,De)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Me)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ge))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:k.value,config:me.value,onClickMarker:a[1]||(a[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:g.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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(Ce.default,{dataset:E.value,config:ve.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:g.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(Be.DataTable,{key:`table_${D.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Ye=Ne._export_sfc(je,[["__scopeId","data-v-e797ea4b"]]);exports.default=Ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-3oZdQf6G.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./Title-BxrsVY3-.cjs"),le=require("./usePrinter-BKzxQK4e.cjs"),be=require("./Tooltip-BXc56Oxr.cjs"),Ce=require("./vue-ui-sparkbar-BAa71eZp.cjs"),we=require("./Legend-BksImVUi.cjs"),Be=require("./DataTable-DeevzR8O.cjs"),_e=require("./vue-ui-skeleton-CI8sxaqr.cjs"),Pe=require("./vue-ui-accordion-QoJofzqF.cjs"),re=require("./useNestedProp-vPTP0Wem.cjs"),$e=require("./PackageVersion-AftniVVo.cjs"),xe=require("./PenAndPaper-j5noaKJZ.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Se=["xmlns","viewBox"],Ee=["id"],Ve=["stop-color"],Ae=["stop-color"],Oe={key:0},Fe=["x1","y1","x2","y2","stroke","stroke-width"],Le={key:0},ze=["d","stroke","stroke-width"],Ie=["d","stroke","stroke-width"],Re={key:1},qe=["x","y","text-anchor","font-size","fill","onMouseenter"],De=["points","stroke","stroke-width"],Me=["points","stroke","stroke-width","fill"],Ue={key:2},Ge=["cx","cy","fill","r","stroke"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Xe={key:0,style:{"max-width":"200px",margin:"0 auto"}},je={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const d=ne,{vue_ui_radar:ie}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(0),D=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:o=>o});function U(){const o=re.useNestedProp({userConfig:d.config,defaultConfig:ie});return o.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=U(),G(),q.value+=1,D.value+=1,M.value+=1},{deep:!0});const B=e.ref(null);function G(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ae.throttle(()=>{const{width:a,height:l}=ae.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value,noTitle:R.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:W,isImaging:H,generatePdf:X,generateImage:j}=le.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ve=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),y=e.ref(!1);function J(o){y.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),se("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function pe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),K=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),Q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Z=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:Q.value,rotation:0})),ge=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Z.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>he({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||K.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function he({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||K.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>J(l),isSegregated:i.value.includes(l)}))}),me=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function fe(o,a){E.value=[],P.value=a,x.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ee(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Je)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function ye(o){w.value=o,F.value+=1}function te(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ue({getData:pe,generatePdf:X,generateCsv:ee,generateImage:j,toggleTable:te,toggleTooltip:oe,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(H),isPrinting:e.unref(W),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:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(X),onGenerateCsv:ee,onGenerateImage:e.unref(j),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ae)],8,Ee))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.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,Fe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:Q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ze))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Z.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,Ie),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>fe(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,qe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,De)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Me)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ge))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:k.value,config:me.value,onClickMarker:a[1]||(a[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:g.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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(Ce.default,{dataset:E.value,config:ve.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:g.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(Be.DataTable,{key:`table_${D.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Ye=Ne._export_sfc(je,[["__scopeId","data-v-e797ea4b"]]);exports.default=Ye;