vue-data-ui 2.4.55 → 2.4.57

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 (156) hide show
  1. package/dist/{Arrow-Lu-rJXGl.cjs → Arrow-BhwhLRcU.cjs} +1 -1
  2. package/dist/{Arrow-D9oPJhO0.js → Arrow-DelnKkT1.js} +1 -1
  3. package/dist/{BaseIcon-mHeKnX4-.js → BaseIcon-9gdEHMWK.js} +1 -1
  4. package/dist/{BaseIcon-DxRKjbz1.cjs → BaseIcon-DujPvdJ_.cjs} +1 -1
  5. package/dist/{DataTable-rMMvio1U.cjs → DataTable-BUflha5V.cjs} +1 -1
  6. package/dist/{DataTable-D8MTezlM.js → DataTable-DgbrnD__.js} +2 -2
  7. package/dist/{Legend-wr5XLSfL.js → Legend-HooNAKB_.js} +1 -1
  8. package/dist/{Legend-Ba34oTdO.cjs → Legend-V3K-4ipN.cjs} +1 -1
  9. package/dist/{PackageVersion-xnKIqody.js → PackageVersion-S3SzpuwC.js} +1 -1
  10. package/dist/{PackageVersion-BJi2ywG9.cjs → PackageVersion-dQYEsTLp.cjs} +1 -1
  11. package/dist/{PenAndPaper-CX6N7FR7.cjs → PenAndPaper-1h87IVla.cjs} +1 -1
  12. package/dist/{PenAndPaper-iek0aH4r.js → PenAndPaper-v846FwcH.js} +3 -3
  13. package/dist/{Shape-B_lWjwmP.js → Shape-D7aacHaz.js} +1 -1
  14. package/dist/{Shape-9v-w5i6N.cjs → Shape-DV5sH0dX.cjs} +1 -1
  15. package/dist/{Slicer--m1nOwbO.cjs → Slicer-BRxR5OYL.cjs} +1 -1
  16. package/dist/{Slicer-Bwg4WzZf.js → Slicer-BXCORSCz.js} +2 -2
  17. package/dist/{Title-BWhYDGb-.cjs → Title-B-EsW0Q2.cjs} +1 -1
  18. package/dist/{Title-BecmraNn.js → Title-DLjHHdyq.js} +1 -1
  19. package/dist/{Tooltip-cPxZzSgr.cjs → Tooltip-B7gYRLGN.cjs} +1 -1
  20. package/dist/{Tooltip-BZYApG0d.js → Tooltip-BDaa-67h.js} +1 -1
  21. package/dist/{index-Dhlyke5j.js → index-CI-N9klv.js} +5 -1
  22. package/dist/index-o6tXRhOr.cjs +9 -0
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +3 -0
  25. package/dist/types/vue-data-ui.d.ts +3 -0
  26. package/dist/{useNestedProp-C9KmUVBy.cjs → useNestedProp-D-zaZbSR.cjs} +1 -1
  27. package/dist/{useNestedProp-D9eTQKze.js → useNestedProp-D1eJ0dvv.js} +1 -1
  28. package/dist/{usePrinter-BnBk8gnl.js → usePrinter-CXc8xCKk.js} +1 -1
  29. package/dist/{usePrinter-DpEuGyLP.cjs → usePrinter-H2UFIe6n.cjs} +1 -1
  30. package/dist/{vue-data-ui-CGGZHtx3.cjs → vue-data-ui-CvfX2D1d.cjs} +1 -1
  31. package/dist/{vue-data-ui-aSR5-7gp.js → vue-data-ui-DuXblXhF.js} +60 -60
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/{vue-ui-3d-bar-D9pXx9fJ.js → vue-ui-3d-bar-fvTVGk8O.js} +9 -9
  35. package/dist/{vue-ui-3d-bar-Dm2wnS6e.cjs → vue-ui-3d-bar-zKUnnMOY.cjs} +1 -1
  36. package/dist/{vue-ui-accordion-CGpOsWNN.js → vue-ui-accordion-CYLks1fW.js} +3 -3
  37. package/dist/{vue-ui-accordion-mtZIFAv9.cjs → vue-ui-accordion-paZXh-GD.cjs} +1 -1
  38. package/dist/{vue-ui-age-pyramid-BcMERmA5.cjs → vue-ui-age-pyramid-Bg8Bexac.cjs} +1 -1
  39. package/dist/{vue-ui-age-pyramid-dbX4WaaY.js → vue-ui-age-pyramid-Ch3nY1Dx.js} +10 -10
  40. package/dist/{vue-ui-annotator-CY-rCEDB.cjs → vue-ui-annotator-BXbLcJ1L.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-DfRkh1D_.js → vue-ui-annotator-DGupSF-o.js} +1 -1
  42. package/dist/{vue-ui-bullet-CUoiQcb5.js → vue-ui-bullet-BSRXabBe.js} +8 -8
  43. package/dist/{vue-ui-bullet-jsXAmYsX.cjs → vue-ui-bullet-DqM9h81O.cjs} +1 -1
  44. package/dist/{vue-ui-candlestick-BD58hsql.cjs → vue-ui-candlestick-C0PkovyK.cjs} +1 -1
  45. package/dist/{vue-ui-candlestick-BLIICgdz.js → vue-ui-candlestick-Dww4XHwQ.js} +11 -11
  46. package/dist/vue-ui-carousel-table-BZs-sxxu.js +396 -0
  47. package/dist/vue-ui-carousel-table-DbXCpYUm.cjs +1 -0
  48. package/dist/{vue-ui-chestnut-vivMozHy.cjs → vue-ui-chestnut-Be4Lagdr.cjs} +1 -1
  49. package/dist/{vue-ui-chestnut-DIPBJ5D2.js → vue-ui-chestnut-CnupXXAM.js} +8 -8
  50. package/dist/{vue-ui-cursor-CzLtzn7N.js → vue-ui-cursor-oqfOA98Q.js} +2 -2
  51. package/dist/{vue-ui-cursor-Cgv_2p2T.cjs → vue-ui-cursor-smlBNiGG.cjs} +1 -1
  52. package/dist/{vue-ui-dashboard-DqZVcLlQ.js → vue-ui-dashboard-BNu7yNYm.js} +2 -2
  53. package/dist/{vue-ui-dashboard-CtlrjFxl.cjs → vue-ui-dashboard-Dw_90R29.cjs} +1 -1
  54. package/dist/{vue-ui-digits-e1HQVXb9.cjs → vue-ui-digits-_8FbgFrI.cjs} +1 -1
  55. package/dist/{vue-ui-digits-CGFznMkY.js → vue-ui-digits-qztPrOEN.js} +2 -2
  56. package/dist/{vue-ui-donut-z2eOcEI5.cjs → vue-ui-donut-B7orj3vV.cjs} +1 -1
  57. package/dist/{vue-ui-donut-DmLq2iWK.js → vue-ui-donut-CK9dINFS.js} +11 -11
  58. package/dist/{vue-ui-donut-evolution-4odFZbUM.cjs → vue-ui-donut-evolution-BmTzjKlH.cjs} +1 -1
  59. package/dist/{vue-ui-donut-evolution-DpollzkH.js → vue-ui-donut-evolution-DpDpYw3f.js} +11 -11
  60. package/dist/{vue-ui-dumbbell-i7E-B6zN.cjs → vue-ui-dumbbell-5yfcA-Of.cjs} +1 -1
  61. package/dist/{vue-ui-dumbbell-DLr4Lh3u.js → vue-ui-dumbbell-Dx1I89N9.js} +10 -10
  62. package/dist/{vue-ui-flow-BuYhmRed.cjs → vue-ui-flow-Bar7LG9t.cjs} +1 -1
  63. package/dist/{vue-ui-flow-CosxAYPJ.js → vue-ui-flow-DJNqydD1.js} +9 -9
  64. package/dist/{vue-ui-funnel-BNPISgC0.cjs → vue-ui-funnel-lxHehCUr.cjs} +1 -1
  65. package/dist/{vue-ui-funnel-C_2YAtFj.js → vue-ui-funnel-mP8ftcS5.js} +8 -8
  66. package/dist/{vue-ui-galaxy-D1cWyHG9.js → vue-ui-galaxy-3cOLS6lh.js} +11 -11
  67. package/dist/{vue-ui-galaxy-DMOx2Le7.cjs → vue-ui-galaxy-B8zbGikp.cjs} +1 -1
  68. package/dist/{vue-ui-gauge-Dw7QvZei.cjs → vue-ui-gauge-Bz1nzveF.cjs} +1 -1
  69. package/dist/{vue-ui-gauge-Dnq0t_eH.js → vue-ui-gauge-CN_zo833.js} +7 -7
  70. package/dist/{vue-ui-gizmo-DcT9tTS-.cjs → vue-ui-gizmo-C9XQ-7Sj.cjs} +1 -1
  71. package/dist/{vue-ui-gizmo-vHQVGdpR.js → vue-ui-gizmo-akkNcCWf.js} +3 -3
  72. package/dist/{vue-ui-heatmap-CtxQI5Mq.js → vue-ui-heatmap-B3ClLioV.js} +10 -10
  73. package/dist/{vue-ui-heatmap-D-r7qdj0.cjs → vue-ui-heatmap-BW6dmp8j.cjs} +1 -1
  74. package/dist/{vue-ui-history-plot-BjcPvcaK.js → vue-ui-history-plot-C-EqVFW-.js} +11 -11
  75. package/dist/{vue-ui-history-plot-B8pP20QN.cjs → vue-ui-history-plot-Mp0zDeR-.cjs} +1 -1
  76. package/dist/{vue-ui-kpi-BjuKXuQM.js → vue-ui-kpi-C-axCKZx.js} +3 -3
  77. package/dist/{vue-ui-kpi-BPwU5pay.cjs → vue-ui-kpi-D8hh3p8f.cjs} +1 -1
  78. package/dist/{vue-ui-mini-loader-DE2NXywp.cjs → vue-ui-mini-loader-Cal5W_q6.cjs} +1 -1
  79. package/dist/{vue-ui-mini-loader-DZYw7bD6.js → vue-ui-mini-loader-CsZ1zxJz.js} +2 -2
  80. package/dist/{vue-ui-molecule-A3yHt8cl.js → vue-ui-molecule-BvNh7REY.js} +11 -11
  81. package/dist/{vue-ui-molecule-B8I4iuBQ.cjs → vue-ui-molecule-RkdIX-iW.cjs} +1 -1
  82. package/dist/{vue-ui-mood-radar-Dh1qbcXz.js → vue-ui-mood-radar-C7v4dBNw.js} +11 -11
  83. package/dist/{vue-ui-mood-radar-BKtVVOZz.cjs → vue-ui-mood-radar-DLpDoq0G.cjs} +1 -1
  84. package/dist/{vue-ui-nested-donuts-B5ixdGsx.cjs → vue-ui-nested-donuts-BO249_PV.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-DPuIU4IX.js → vue-ui-nested-donuts-C08kpvMd.js} +11 -11
  86. package/dist/{vue-ui-onion-BTMaTU2a.cjs → vue-ui-onion-BjNQgHPX.cjs} +1 -1
  87. package/dist/{vue-ui-onion-BgcJBzxI.js → vue-ui-onion-CTLBemDj.js} +11 -11
  88. package/dist/{vue-ui-parallel-coordinate-plot-Cye2V8MQ.cjs → vue-ui-parallel-coordinate-plot-CoeVi-98.cjs} +1 -1
  89. package/dist/{vue-ui-parallel-coordinate-plot-Ksh3Tuvx.js → vue-ui-parallel-coordinate-plot-H1FdP6AE.js} +12 -12
  90. package/dist/{vue-ui-quadrant-DOet5Q47.cjs → vue-ui-quadrant-D701bdNz.cjs} +1 -1
  91. package/dist/{vue-ui-quadrant-DGBXeeOe.js → vue-ui-quadrant-Dd-LDy4T.js} +12 -12
  92. package/dist/{vue-ui-quick-chart-DQcck_x6.js → vue-ui-quick-chart-BeNivWrg.js} +9 -9
  93. package/dist/{vue-ui-quick-chart-DhCA-7B5.cjs → vue-ui-quick-chart-CRNEkxoM.cjs} +1 -1
  94. package/dist/{vue-ui-radar-qk20LKHr.cjs → vue-ui-radar-3W9NRklj.cjs} +1 -1
  95. package/dist/{vue-ui-radar-CI5egNer.js → vue-ui-radar-D9U_vOad.js} +12 -12
  96. package/dist/{vue-ui-rating-Ch2PSMeW.js → vue-ui-rating-B7AlAqCY.js} +2 -2
  97. package/dist/{vue-ui-rating-CYhvKLSi.cjs → vue-ui-rating-DeuaL_cU.cjs} +1 -1
  98. package/dist/{vue-ui-relation-circle-t-WDgqtA.cjs → vue-ui-relation-circle-B8JtK-JM.cjs} +1 -1
  99. package/dist/{vue-ui-relation-circle-G6KC4zs0.js → vue-ui-relation-circle-CT23BNcW.js} +7 -7
  100. package/dist/{vue-ui-rings-NIIfGve4.js → vue-ui-rings-BZ7FYYxr.js} +11 -11
  101. package/dist/{vue-ui-rings-DxpkXXwJ.cjs → vue-ui-rings-CZCTLghE.cjs} +1 -1
  102. package/dist/{vue-ui-scatter-BqxcKjb2.js → vue-ui-scatter-DMr8OrC3.js} +12 -12
  103. package/dist/{vue-ui-scatter-DynxMn7l.cjs → vue-ui-scatter-DlA0xU5U.cjs} +1 -1
  104. package/dist/{vue-ui-screenshot-BUP9G_uK.cjs → vue-ui-screenshot-BFV1qEsF.cjs} +1 -1
  105. package/dist/{vue-ui-screenshot-DreZMmrO.js → vue-ui-screenshot-DHiX35pR.js} +1 -1
  106. package/dist/{vue-ui-skeleton-D_lU-hWK.cjs → vue-ui-skeleton-BIWgLDDf.cjs} +1 -1
  107. package/dist/{vue-ui-skeleton-DQqwDUqP.js → vue-ui-skeleton-owIhXtQF.js} +3 -3
  108. package/dist/{vue-ui-smiley-AGwF1X7u.cjs → vue-ui-smiley-BISneB7t.cjs} +1 -1
  109. package/dist/{vue-ui-smiley-CdmO39JE.js → vue-ui-smiley-CCOQ6zjo.js} +2 -2
  110. package/dist/{vue-ui-spark-trend-BUx5YwEZ.js → vue-ui-spark-trend-B56DI3Mc.js} +5 -5
  111. package/dist/{vue-ui-spark-trend-DD1s6Thz.cjs → vue-ui-spark-trend-lMzod-5S.cjs} +1 -1
  112. package/dist/{vue-ui-sparkbar-KZd6YQwQ.js → vue-ui-sparkbar-CMkozDkx.js} +4 -4
  113. package/dist/{vue-ui-sparkbar-mlrF_QEO.cjs → vue-ui-sparkbar-DcdDLl8l.cjs} +1 -1
  114. package/dist/{vue-ui-sparkgauge-B4J8ZYzs.cjs → vue-ui-sparkgauge-BhwNRzrD.cjs} +1 -1
  115. package/dist/{vue-ui-sparkgauge-Db-d9x9r.js → vue-ui-sparkgauge-De06LRPj.js} +4 -4
  116. package/dist/{vue-ui-sparkhistogram-B61JDza9.js → vue-ui-sparkhistogram-CBDd7jIn.js} +5 -5
  117. package/dist/{vue-ui-sparkhistogram-DzJ5NNi9.cjs → vue-ui-sparkhistogram-D00ahrgs.cjs} +1 -1
  118. package/dist/{vue-ui-sparkline-P6ubVgp0.js → vue-ui-sparkline-BJejWvTN.js} +4 -4
  119. package/dist/{vue-ui-sparkline-S6HehQ0a.cjs → vue-ui-sparkline-CY92qVz0.cjs} +1 -1
  120. package/dist/{vue-ui-sparkstackbar-BDBqoeJQ.cjs → vue-ui-sparkstackbar-BjKL_6dq.cjs} +1 -1
  121. package/dist/{vue-ui-sparkstackbar-DKtOqh-Y.js → vue-ui-sparkstackbar-DlnmPom2.js} +5 -5
  122. package/dist/{vue-ui-stackbar-WShCS9A1.js → vue-ui-stackbar-19XdLQXB.js} +306 -291
  123. package/dist/vue-ui-stackbar-T4VBFpDo.cjs +6 -0
  124. package/dist/{vue-ui-strip-plot-Bq3u8k2l.js → vue-ui-strip-plot-Bly8GoNP.js} +11 -11
  125. package/dist/{vue-ui-strip-plot-DH4LQTfB.cjs → vue-ui-strip-plot-CtjbMamo.cjs} +1 -1
  126. package/dist/{vue-ui-table-sJN2rS51.js → vue-ui-table-BUF6Pyfp.js} +1 -1
  127. package/dist/{vue-ui-table-aV4pHrWD.cjs → vue-ui-table-BisPh85-.cjs} +1 -1
  128. package/dist/{vue-ui-table-heatmap-DsdyE14x.js → vue-ui-table-heatmap-By-MmFiq.js} +4 -4
  129. package/dist/{vue-ui-table-heatmap-CruECEYA.cjs → vue-ui-table-heatmap-CPn-jC0n.cjs} +1 -1
  130. package/dist/{vue-ui-table-sparkline-CcsNg6th.cjs → vue-ui-table-sparkline-CIDuWZZs.cjs} +1 -1
  131. package/dist/{vue-ui-table-sparkline-BlUe2QFV.js → vue-ui-table-sparkline-DG70UNkU.js} +5 -5
  132. package/dist/{vue-ui-thermometer-ButIh820.cjs → vue-ui-thermometer-CMvk1D7J.cjs} +1 -1
  133. package/dist/{vue-ui-thermometer-80aa72_6.js → vue-ui-thermometer-Vr2IP_p0.js} +7 -7
  134. package/dist/{vue-ui-timer-CuUSpISM.js → vue-ui-timer-CD7gFOjN.js} +5 -5
  135. package/dist/{vue-ui-timer-Dk4I7cRn.cjs → vue-ui-timer-CUHgN89f.cjs} +1 -1
  136. package/dist/{vue-ui-tiremarks-CQ98xHZ5.js → vue-ui-tiremarks-44pO3jx1.js} +7 -7
  137. package/dist/{vue-ui-tiremarks-BsYfeNCN.cjs → vue-ui-tiremarks-w_gxHFeB.cjs} +1 -1
  138. package/dist/{vue-ui-treemap-CHXb8mBG.cjs → vue-ui-treemap-CFhTEaxa.cjs} +1 -1
  139. package/dist/{vue-ui-treemap-s1nZAhAS.js → vue-ui-treemap-CyOUM3-P.js} +11 -11
  140. package/dist/{vue-ui-vertical-bar-iZWowEik.cjs → vue-ui-vertical-bar-C51RKLB8.cjs} +1 -1
  141. package/dist/{vue-ui-vertical-bar-Dd306Z10.js → vue-ui-vertical-bar-wngOp0Zc.js} +11 -11
  142. package/dist/{vue-ui-waffle-BJgSuNVY.cjs → vue-ui-waffle-CXZc4t27.cjs} +1 -1
  143. package/dist/{vue-ui-waffle-CQfOCZjf.js → vue-ui-waffle-CuN7i0ci.js} +11 -11
  144. package/dist/{vue-ui-wheel-DB-4Rn84.js → vue-ui-wheel-B_gLugLx.js} +7 -7
  145. package/dist/{vue-ui-wheel-s8UTbo9G.cjs → vue-ui-wheel-u9Vc7ZTZ.cjs} +1 -1
  146. package/dist/{vue-ui-word-cloud-C-l2Z3Dd.js → vue-ui-word-cloud-DKHGS0my.js} +10 -10
  147. package/dist/{vue-ui-word-cloud-DvfOJe4M.cjs → vue-ui-word-cloud-tSXyXvd6.cjs} +1 -1
  148. package/dist/{vue-ui-xy-P_VLOaMg.js → vue-ui-xy-BK9R8MrJ.js} +14 -14
  149. package/dist/{vue-ui-xy-D1Nkk2Gp.cjs → vue-ui-xy-bX3g4COC.cjs} +1 -1
  150. package/dist/{vue-ui-xy-canvas-BwNEs-cY.js → vue-ui-xy-canvas-DaT4HoWD.js} +11 -11
  151. package/dist/{vue-ui-xy-canvas-CIKl9AXf.cjs → vue-ui-xy-canvas-gDaRsnBI.cjs} +1 -1
  152. package/package.json +1 -1
  153. package/dist/index-DGcOW0vL.cjs +0 -9
  154. package/dist/vue-ui-carousel-table-CCmB_BJ7.cjs +0 -1
  155. package/dist/vue-ui-carousel-table-NUliqwxA.js +0 -379
  156. package/dist/vue-ui-stackbar-DCCcEgQZ.cjs +0 -6
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DGcOW0vL.cjs"),W=require("./useResponsive-BJ7DTGpm.cjs"),H=require("./usePrinter-DpEuGyLP.cjs"),ve=require("./vue-ui-skeleton-D_lU-hWK.cjs"),de=require("./Title-BWhYDGb-.cjs"),Z=require("./useNestedProp-C9KmUVBy.cjs"),he=require("./PackageVersion-BJi2ywG9.cjs"),me=require("./PenAndPaper-CX6N7FR7.cjs"),fe=require("./useUserOptionState-BgepsfED.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],ke={key:0},ge=["xmlns","viewBox"],be=["id"],xe=["stop-color"],Se=["stop-color"],_e=["stop-color"],Be=["id"],we=["stdDeviation"],Ce=["d","fill","stroke"],Ne=["id","d"],Fe=["fill","font-size","font-weight"],ze=["href","startOffset"],Pe=["x","y","text-anchor","fill","font-size","font-weight"],Ee=["d","filter"],$e=["stroke","stroke-width"],Oe=["stroke","stroke-width"],Me=["stroke","stroke-width"],Ve=["stroke","stroke-width"],Xe={key:4},Ye=["x","y","text-anchor","font-size","font-weight","fill"],Ie=["x","y","font-size","font-weight","fill"],Ae={key:6},Re=["x1","y1","x2","y2","stroke","stroke-width"],Le=["x1","y1","x2","y2","stroke","stroke-width"],De=["x1","y1","x2","y2","stroke-width","filter"],Ge={key:7},qe=["d","fill","stroke","stroke-width"],Te=["cx","cy","fill","r","stroke-width","stroke"],Ue=["x","y","font-size","fill"],je={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:J}){const c=C,{vue_ui_gauge:K}=n.useConfig(),_=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),y=e.ref(n.createUid()),Q=e.ref(null),P=e.ref(0),g=e.ref(null),E=e.ref(null),$=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>I(),set:o=>o}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:Y}=fe.useUserOptionState({config:t.value});e.watch(()=>c.config,o=>{t.value=I(),N.value=!t.value.showOnChartHover,q(),V.value+=1},{deep:!0});function I(){const o=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return o.theme?{...Z.useNestedProp({userConfig:n.themes.vue_ui_gauge[o.theme]||c.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const{isPrinting:A,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!_.value||n.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const o=[];(c.dataset.series||[]).forEach(a=>{o.push(a.from||1e-7),o.push(a.to||1e-7)});const r=Math.max(...o);return{...c.dataset,series:(c.dataset.series||[]).map((a,s)=>({...a,color:n.convertColorToHex(a.color)||te.value[s]||n.palette[s],value:((a.to||0)-(a.from||0))/r*100}))}}),h=e.ref(512),l=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),x=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:c.dataset.value);e.watch(()=>c.dataset.value,()=>{T(c.dataset.value)});const u=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI;return{x1:o,y1:r,x2:o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),y2:r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a)}}),G=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI,s=o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),m=r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a),f=l.value.pointerRadius,se=o+f*Math.cos(a+Math.PI/2),ue=r+f*Math.sin(a+Math.PI/2),ie=o+f*Math.cos(a-Math.PI/2),ce=r+f*Math.sin(a-Math.PI/2);return isNaN(s)?null:`M ${s},${m} ${se},${ue} ${ie},${ce} Z`}),F=e.computed(()=>{for(let o=0;o<p.value.series.length;o+=1){const{color:r,from:a,to:s}=p.value.series[o];if(v.value>=a&&v.value<=s)return r}return"#2D353C"}),B=e.ref(null);function q(){if(n.objectIsEmpty(c.dataset)?n.error({componentName:"VueUiGauge",type:"dataset"}):(n.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(o=>{n.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(a=>{n.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:a,index:r})})}):n.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const o=W.throttle(()=>{const{width:r,height:a}=W.useResponsive({chart:g.value,title:t.value.style.chart.title.text?E.value:null,legend:$.value,source:O.value,noTitle:M.value});l.value.width=r,l.value.height=a,l.value.centerX=r/2,l.value.centerY=h.value/2/358.4*a,l.value.bottom=a,l.value.labelFontSize=18/h.value*Math.min(a,r)<10?10:18/h.value*Math.min(a,r),l.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(a,r)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(a,r),l.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(a,r),l.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(a,r),l.value.pointerStrokeWidth=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),l.value.markerOffset=n.translateSize({relator:Math.max(r,a),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),l.value.segmentFontSize=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})});B.value=new ResizeObserver(o),B.value.observe(g.value.parentNode)}}e.onMounted(()=>{q()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function T(o){const r=[];(p.value.series||[]).forEach(f=>{r.push(f.from||0),r.push(f.to||0)}),b.value=Math.max(...r),x.value=Math.min(...r);let a=t.value.style.chart.animation.speed;const s=Math.abs(o-v.value)/(a*60);function m(){v.value<o?v.value=Math.min(v.value+s,o):v.value>o&&(v.value=Math.max(v.value-s,o)),v.value!==o&&requestAnimationFrame(m)}m()}const i=e.computed(()=>{const o=t.value.responsive?Math.min(l.value.width,l.value.height):l.value.width,r=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:o/r,gradients:o/(r*1.1),base:t.value.responsive?l.value.height/2:l.value.height*.7,ratingBase:t.value.responsive?l.value.height/2+l.value.height/4:l.value.height*.9,pointerSize:t.value.responsive?Math.min(l.value.width,l.value.height)/3:l.value.width/3.2}}),d=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*l.value.trackSize)),ae=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*l.value.trackSize)),k=e.computed(()=>d.value.map(o=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(o.nameOffsetRatio||1))),U=e.computed(()=>{const{x:o,y:r}=n.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:a,y:s}=n.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:o,y1:r,x2:a,y2:s}}),j=e.computed(()=>d.value.map(o=>{const{x:r,y:a}=n.offsetFromCenterPoint({initX:o.separator.x,initY:o.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:s,y:m}=n.offsetFromCenterPoint({initX:o.endX,initY:o.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:r,y1:a,x2:s,y2:m}}));function oe(o){if(o.reduce((m,f)=>m+f,0)>100)throw new Error("Total % must not exceed 100");const a=50;let s=0;return o.map(m=>(s+=m,`${s/100*a-m/4}%`))}const le=e.computed(()=>oe(d.value.map(o=>o.proportion*100))),re=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*l.value.trackSize)),S=e.ref(!1);function ne(o){S.value=o,P.value+=1}const w=e.ref(!1);function z(){w.value=!w.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:z}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:g,id:`vue-ui-gauge_${y.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:r[0]||(r[0]=()=>e.unref(X)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,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:E,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",ke,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&_.value&&(e.unref(Y)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(A),uid:y.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${y.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,xe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,_e)],8,be)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,we)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Ce))),128)),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${y.value}_${s}`,d:`M ${u.value.x1},${u.value.y1} m -${k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 ${2*k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 -${2*k.value[s]},0`,fill:"transparent"},null,8,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${y.value}_${s}`,startOffset:le.value[s]},e.toDisplayString(a.name||""),9,ze)],8,Fe))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(ae.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:a.center.endX,y:a.center.endY,"text-anchor":e.unref(n.calcMarkerOffsetX)(a,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(a.name||""),9,Pe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(re.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${y.value})`},null,8,Ee))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,$e),e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Oe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).y,"text-anchor":a.center.startX<u.value.x1-5?"end":a.center.startX>u.value.x1+5?"start":"middle","font-size":l.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,a.from,e.unref(n.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:a.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).y,"text-anchor":"start","font-size":l.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ie)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Ae,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":l.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Re)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":l.value.pointerStrokeWidth*.7},null,8,Le)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":l.value.pointerStrokeWidth*.3,filter:`url(#blur_${y.value})`},null,8,De)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ge,[G.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:G.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,qe)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:l.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:l.value.pointerRadius<=0?1e-4:l.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Te),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:8,x:l.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":l.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Ue)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:p.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,pe))}},He=ye._export_sfc(We,[["__scopeId","data-v-8de26327"]]);exports.default=He;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-o6tXRhOr.cjs"),W=require("./useResponsive-BJ7DTGpm.cjs"),H=require("./usePrinter-H2UFIe6n.cjs"),ve=require("./vue-ui-skeleton-BIWgLDDf.cjs"),de=require("./Title-B-EsW0Q2.cjs"),Z=require("./useNestedProp-D-zaZbSR.cjs"),he=require("./PackageVersion-dQYEsTLp.cjs"),me=require("./PenAndPaper-1h87IVla.cjs"),fe=require("./useUserOptionState-BgepsfED.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],ke={key:0},ge=["xmlns","viewBox"],be=["id"],xe=["stop-color"],Se=["stop-color"],_e=["stop-color"],Be=["id"],we=["stdDeviation"],Ce=["d","fill","stroke"],Ne=["id","d"],Fe=["fill","font-size","font-weight"],ze=["href","startOffset"],Pe=["x","y","text-anchor","fill","font-size","font-weight"],Ee=["d","filter"],$e=["stroke","stroke-width"],Oe=["stroke","stroke-width"],Me=["stroke","stroke-width"],Ve=["stroke","stroke-width"],Xe={key:4},Ye=["x","y","text-anchor","font-size","font-weight","fill"],Ie=["x","y","font-size","font-weight","fill"],Ae={key:6},Re=["x1","y1","x2","y2","stroke","stroke-width"],Le=["x1","y1","x2","y2","stroke","stroke-width"],De=["x1","y1","x2","y2","stroke-width","filter"],Ge={key:7},qe=["d","fill","stroke","stroke-width"],Te=["cx","cy","fill","r","stroke-width","stroke"],Ue=["x","y","font-size","fill"],je={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:J}){const c=C,{vue_ui_gauge:K}=n.useConfig(),_=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),y=e.ref(n.createUid()),Q=e.ref(null),P=e.ref(0),g=e.ref(null),E=e.ref(null),$=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>I(),set:o=>o}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:Y}=fe.useUserOptionState({config:t.value});e.watch(()=>c.config,o=>{t.value=I(),N.value=!t.value.showOnChartHover,q(),V.value+=1},{deep:!0});function I(){const o=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return o.theme?{...Z.useNestedProp({userConfig:n.themes.vue_ui_gauge[o.theme]||c.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const{isPrinting:A,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!_.value||n.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const o=[];(c.dataset.series||[]).forEach(a=>{o.push(a.from||1e-7),o.push(a.to||1e-7)});const r=Math.max(...o);return{...c.dataset,series:(c.dataset.series||[]).map((a,s)=>({...a,color:n.convertColorToHex(a.color)||te.value[s]||n.palette[s],value:((a.to||0)-(a.from||0))/r*100}))}}),h=e.ref(512),l=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),x=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:c.dataset.value);e.watch(()=>c.dataset.value,()=>{T(c.dataset.value)});const u=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI;return{x1:o,y1:r,x2:o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),y2:r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a)}}),G=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI,s=o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),m=r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a),f=l.value.pointerRadius,se=o+f*Math.cos(a+Math.PI/2),ue=r+f*Math.sin(a+Math.PI/2),ie=o+f*Math.cos(a-Math.PI/2),ce=r+f*Math.sin(a-Math.PI/2);return isNaN(s)?null:`M ${s},${m} ${se},${ue} ${ie},${ce} Z`}),F=e.computed(()=>{for(let o=0;o<p.value.series.length;o+=1){const{color:r,from:a,to:s}=p.value.series[o];if(v.value>=a&&v.value<=s)return r}return"#2D353C"}),B=e.ref(null);function q(){if(n.objectIsEmpty(c.dataset)?n.error({componentName:"VueUiGauge",type:"dataset"}):(n.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(o=>{n.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(a=>{n.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:a,index:r})})}):n.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const o=W.throttle(()=>{const{width:r,height:a}=W.useResponsive({chart:g.value,title:t.value.style.chart.title.text?E.value:null,legend:$.value,source:O.value,noTitle:M.value});l.value.width=r,l.value.height=a,l.value.centerX=r/2,l.value.centerY=h.value/2/358.4*a,l.value.bottom=a,l.value.labelFontSize=18/h.value*Math.min(a,r)<10?10:18/h.value*Math.min(a,r),l.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(a,r)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(a,r),l.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(a,r),l.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(a,r),l.value.pointerStrokeWidth=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),l.value.markerOffset=n.translateSize({relator:Math.max(r,a),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),l.value.segmentFontSize=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})});B.value=new ResizeObserver(o),B.value.observe(g.value.parentNode)}}e.onMounted(()=>{q()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function T(o){const r=[];(p.value.series||[]).forEach(f=>{r.push(f.from||0),r.push(f.to||0)}),b.value=Math.max(...r),x.value=Math.min(...r);let a=t.value.style.chart.animation.speed;const s=Math.abs(o-v.value)/(a*60);function m(){v.value<o?v.value=Math.min(v.value+s,o):v.value>o&&(v.value=Math.max(v.value-s,o)),v.value!==o&&requestAnimationFrame(m)}m()}const i=e.computed(()=>{const o=t.value.responsive?Math.min(l.value.width,l.value.height):l.value.width,r=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:o/r,gradients:o/(r*1.1),base:t.value.responsive?l.value.height/2:l.value.height*.7,ratingBase:t.value.responsive?l.value.height/2+l.value.height/4:l.value.height*.9,pointerSize:t.value.responsive?Math.min(l.value.width,l.value.height)/3:l.value.width/3.2}}),d=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*l.value.trackSize)),ae=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*l.value.trackSize)),k=e.computed(()=>d.value.map(o=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(o.nameOffsetRatio||1))),U=e.computed(()=>{const{x:o,y:r}=n.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:a,y:s}=n.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:o,y1:r,x2:a,y2:s}}),j=e.computed(()=>d.value.map(o=>{const{x:r,y:a}=n.offsetFromCenterPoint({initX:o.separator.x,initY:o.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:s,y:m}=n.offsetFromCenterPoint({initX:o.endX,initY:o.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:r,y1:a,x2:s,y2:m}}));function oe(o){if(o.reduce((m,f)=>m+f,0)>100)throw new Error("Total % must not exceed 100");const a=50;let s=0;return o.map(m=>(s+=m,`${s/100*a-m/4}%`))}const le=e.computed(()=>oe(d.value.map(o=>o.proportion*100))),re=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*l.value.trackSize)),S=e.ref(!1);function ne(o){S.value=o,P.value+=1}const w=e.ref(!1);function z(){w.value=!w.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:z}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:g,id:`vue-ui-gauge_${y.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:r[0]||(r[0]=()=>e.unref(X)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,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:E,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",ke,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&_.value&&(e.unref(Y)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(A),uid:y.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${y.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,xe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,_e)],8,be)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,we)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Ce))),128)),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${y.value}_${s}`,d:`M ${u.value.x1},${u.value.y1} m -${k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 ${2*k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 -${2*k.value[s]},0`,fill:"transparent"},null,8,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${y.value}_${s}`,startOffset:le.value[s]},e.toDisplayString(a.name||""),9,ze)],8,Fe))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(ae.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:a.center.endX,y:a.center.endY,"text-anchor":e.unref(n.calcMarkerOffsetX)(a,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(a.name||""),9,Pe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(re.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${y.value})`},null,8,Ee))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,$e),e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Oe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).y,"text-anchor":a.center.startX<u.value.x1-5?"end":a.center.startX>u.value.x1+5?"start":"middle","font-size":l.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,a.from,e.unref(n.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:a.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).y,"text-anchor":"start","font-size":l.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ie)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Ae,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":l.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Re)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":l.value.pointerStrokeWidth*.7},null,8,Le)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":l.value.pointerStrokeWidth*.3,filter:`url(#blur_${y.value})`},null,8,De)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ge,[G.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:G.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,qe)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:l.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:l.value.pointerRadius<=0?1e-4:l.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Te),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:8,x:l.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":l.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Ue)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:p.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,pe))}},He=ye._export_sfc(We,[["__scopeId","data-v-8de26327"]]);exports.default=He;
@@ -1,12 +1,12 @@
1
1
  import { computed as y, ref as d, watch as me, onMounted as Ae, onBeforeUnmount as Re, openBlock as o, createElementBlock as u, normalizeClass as pe, normalizeStyle as L, unref as i, createBlock as R, createCommentVNode as h, withCtx as X, toDisplayString as C, createSlots as Ge, renderSlot as w, normalizeProps as D, guardReactiveProps as B, createVNode as Ee, createElementVNode as p, Fragment as x, renderList as S, mergeProps as G } from "vue";
2
- import { u as Ue, c as We, t as Te, a as je, p as ge, b as Le, o as ke, d as De, e as E, g as be, m as V, I as z, X as Be, s as q, k as Ve, i as H, f as Z, F as J } from "./index-Dhlyke5j.js";
2
+ import { u as Ue, c as We, t as Te, a as je, p as ge, b as Le, o as ke, d as De, e as E, g as be, m as V, I as z, X as Be, s as q, k as Ve, i as H, f as Z, F as J } from "./index-CI-N9klv.js";
3
3
  import { t as qe, u as He } from "./useResponsive-CoxXLe23.js";
4
- import { u as Ze, U as Je } from "./usePrinter-BnBk8gnl.js";
5
- import Ke from "./vue-ui-skeleton-DQqwDUqP.js";
6
- import { _ as Qe } from "./Title-BecmraNn.js";
7
- import { u as xe } from "./useNestedProp-D9eTQKze.js";
8
- import { _ as et } from "./PackageVersion-xnKIqody.js";
9
- import { P as tt } from "./PenAndPaper-iek0aH4r.js";
4
+ import { u as Ze, U as Je } from "./usePrinter-CXc8xCKk.js";
5
+ import Ke from "./vue-ui-skeleton-owIhXtQF.js";
6
+ import { _ as Qe } from "./Title-DLjHHdyq.js";
7
+ import { u as xe } from "./useNestedProp-D1eJ0dvv.js";
8
+ import { _ as et } from "./PackageVersion-S3SzpuwC.js";
9
+ import { P as tt } from "./PenAndPaper-v846FwcH.js";
10
10
  import { u as at } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const st = ["id"], rt = { key: 0 }, ot = ["xmlns", "viewBox"], ut = ["id"], nt = ["stop-color"], it = ["stop-color"], ct = ["stop-color"], vt = ["id"], ht = ["stdDeviation"], dt = ["d", "fill", "stroke"], yt = ["id", "d"], ft = ["fill", "font-size", "font-weight"], mt = ["href", "startOffset"], pt = ["x", "y", "text-anchor", "fill", "font-size", "font-weight"], gt = ["d", "filter"], kt = ["stroke", "stroke-width"], bt = ["stroke", "stroke-width"], xt = ["stroke", "stroke-width"], _t = ["stroke", "stroke-width"], wt = { key: 4 }, St = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], zt = ["x", "y", "font-size", "font-weight", "fill"], $t = { key: 6 }, Ft = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ct = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ot = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], Mt = { key: 7 }, Pt = ["d", "fill", "stroke", "stroke-width"], Nt = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], Xt = ["x", "y", "font-size", "fill"], Yt = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DGcOW0vL.cjs"),m=require("./useNestedProp-C9KmUVBy.cjs"),_=require("./PackageVersion-BJi2ywG9.cjs"),k=["viewBox","width"],p={key:0},g=["id"],v=["stop-color"],y=["stop-color"],N=["stroke"],C=["stroke"],V=["width","fill"],w=["fill"],x={key:0},B=["id"],E=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),b=[E],L=["stroke"],z=["stroke","stroke-dasharray","stroke-dashoffset"],G=["filter"],F=["stroke","stroke-dasharray","stroke-dashoffset"],P=["fill"],$={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const o=i,{vue_ui_gizmo:f}=a.useConfig(),n=e.ref(a.createUid());e.onMounted(()=>{c()});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:r=>r});function d(){return m.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,r=>{t.value=d(),c()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const s=2*Math.PI*35,h=s-o.dataset/100*s;return{dasharray:`${s} ${s}`,dashoffset:h}});return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(_._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",p,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,v),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,y)],8,g)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,N),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,C),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(i.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,V),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,w)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",x,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},b,8,B)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,L),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,z),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,F)],8,G)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,P)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,k))}};exports.default=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-o6tXRhOr.cjs"),m=require("./useNestedProp-D-zaZbSR.cjs"),_=require("./PackageVersion-dQYEsTLp.cjs"),k=["viewBox","width"],p={key:0},g=["id"],v=["stop-color"],y=["stop-color"],N=["stroke"],C=["stroke"],V=["width","fill"],w=["fill"],x={key:0},B=["id"],E=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),b=[E],L=["stroke"],z=["stroke","stroke-dasharray","stroke-dashoffset"],G=["filter"],F=["stroke","stroke-dasharray","stroke-dashoffset"],P=["fill"],$={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const o=i,{vue_ui_gizmo:f}=a.useConfig(),n=e.ref(a.createUid());e.onMounted(()=>{c()});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:r=>r});function d(){return m.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,r=>{t.value=d(),c()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const s=2*Math.PI*35,h=s-o.dataset/100*s;return{dasharray:`${s} ${s}`,dashoffset:h}});return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(_._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",p,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,v),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,y)],8,g)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,N),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,C),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(i.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,V),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,w)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",x,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},b,8,B)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,L),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,z),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,F)],8,G)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,P)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,k))}};exports.default=$;
@@ -1,7 +1,7 @@
1
1
  import { ref as x, onMounted as C, computed as c, watch as z, openBlock as a, createElementBlock as s, normalizeStyle as G, createVNode as L, createElementVNode as t, createCommentVNode as r, Fragment as g, toDisplayString as y, unref as d } from "vue";
2
- import { u as b, c as N, e as $, i as p, f as m } from "./index-Dhlyke5j.js";
3
- import { u as F } from "./useNestedProp-D9eTQKze.js";
4
- import { _ as B } from "./PackageVersion-xnKIqody.js";
2
+ import { u as b, c as N, e as $, i as p, f as m } from "./index-CI-N9klv.js";
3
+ import { u as F } from "./useNestedProp-D1eJ0dvv.js";
4
+ import { _ as B } from "./PackageVersion-S3SzpuwC.js";
5
5
  const P = ["viewBox", "width"], V = { key: 0 }, D = ["id"], I = ["stop-color"], M = ["stop-color"], U = ["stroke"], E = ["stroke"], O = ["width", "fill"], S = ["fill"], A = { key: 0 }, j = ["id"], T = /* @__PURE__ */ t("feGaussianBlur", {
6
6
  in: "SourceGraphic",
7
7
  stdDeviation: 1
@@ -1,14 +1,14 @@
1
1
  import { useCssVars as Ie, computed as h, ref as p, watch as $e, onMounted as Be, openBlock as o, createElementBlock as n, normalizeClass as K, normalizeStyle as x, unref as u, createBlock as U, createCommentVNode as c, createSlots as Re, withCtx as w, renderSlot as f, normalizeProps as E, guardReactiveProps as H, createVNode as se, Fragment as A, renderList as O, createElementVNode as i, toDisplayString as b, withKeys as Ge, createTextVNode as Ue, nextTick as Ee } from "vue";
2
- import { u as He, o as Xe, e as Ce, c as ue, t as De, C as Ye, g as je, N as ne, X as We, G as ie, i as V, f as S, v as T, x as qe, y as Ke, q as Je, r as Qe } from "./index-Dhlyke5j.js";
3
- import { _ as Ze } from "./Title-BecmraNn.js";
4
- import { u as et, U as tt } from "./usePrinter-BnBk8gnl.js";
5
- import { _ as lt } from "./Tooltip-BZYApG0d.js";
6
- import at from "./vue-ui-skeleton-DQqwDUqP.js";
7
- import ot from "./BaseIcon-mHeKnX4-.js";
8
- import st from "./vue-ui-accordion-CGpOsWNN.js";
9
- import { u as Le } from "./useNestedProp-D9eTQKze.js";
10
- import { _ as ut } from "./PackageVersion-xnKIqody.js";
11
- import { P as nt } from "./PenAndPaper-iek0aH4r.js";
2
+ import { u as He, o as Xe, e as Ce, c as ue, t as De, C as Ye, g as je, N as ne, X as We, G as ie, i as V, f as S, v as T, x as qe, y as Ke, q as Je, r as Qe } from "./index-CI-N9klv.js";
3
+ import { _ as Ze } from "./Title-DLjHHdyq.js";
4
+ import { u as et, U as tt } from "./usePrinter-CXc8xCKk.js";
5
+ import { _ as lt } from "./Tooltip-BDaa-67h.js";
6
+ import at from "./vue-ui-skeleton-owIhXtQF.js";
7
+ import ot from "./BaseIcon-9gdEHMWK.js";
8
+ import st from "./vue-ui-accordion-CYLks1fW.js";
9
+ import { u as Le } from "./useNestedProp-D1eJ0dvv.js";
10
+ import { _ as ut } from "./PackageVersion-S3SzpuwC.js";
11
+ import { P as nt } from "./PenAndPaper-v846FwcH.js";
12
12
  import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
13
13
  import { _ as rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const vt = ["id"], dt = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DGcOW0vL.cjs"),pe=require("./Title-BWhYDGb-.cjs"),le=require("./usePrinter-DpEuGyLP.cjs"),he=require("./Tooltip-cPxZzSgr.cjs"),fe=require("./vue-ui-skeleton-D_lU-hWK.cjs"),ge=require("./BaseIcon-DxRKjbz1.cjs"),me=require("./vue-ui-accordion-mtZIFAv9.cjs"),ae=require("./useNestedProp-C9KmUVBy.cjs"),be=require("./PackageVersion-BJi2ywG9.cjs"),ke=require("./PenAndPaper-CX6N7FR7.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],_e={key:2,style:"width:100%;background:transparent"},Ne=["xmlns","viewBox"],Be=["x","y","width","height","fill","stroke","stroke-width"],Le=["x","y","width","height","fill","stroke","stroke-width"],Ve=["font-size","font-weight","fill","x","y"],$e=["x","y","width","height","onMouseover"],Ee={key:0},Se=["font-size","fill","x","y","font-weight"],Ae={key:0},ze=["text-anchor","font-size","fill","font-weight","transform"],Te={key:1},Me=["x","y","width","height","stroke","stroke-width"],Oe={key:2},Pe=["id"],Fe=["stop-color"],De=["stop-color"],Ie=["x","y","font-size","fill"],Re=["x","y","height","rx","fill"],qe=["x","y","font-size","fill"],Ue=["stroke","x1","x2","y1","y2"],He=["fill","d"],Ge={key:3},Xe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},je=["stop-color"],Ye=["stop-color"],We=["x","y","width","height","rx"],Ke=["x","y","font-size","fill"],Je=["x","y","font-size","fill"],Qe=["stroke","x1","x2","y1","y2"],Ze=["fill","d"],et={key:5,class:"vue-data-ui-watermark"},tt={key:6,ref:"source",dir:"auto"},lt={class:"vue-ui-data-table"},at={key:0},ot=["data-cell"],st={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ut=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:oe}){const n=L;e.useCssVars(l=>({"144dc876":l.tdo}));const{vue_ui_heatmap:se}=s.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),$=e.ref(null),ue=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),ne=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:M,setUserOptionsVisibility:X,keepUserOptionState:j}=xe.useUserOptionState({config:t.value});function Y(){const l=ae.useNestedProp({userConfig:n.config,defaultConfig:se});let a={};return l.theme?a={...ae.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:a=l,n.config&&s.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>n.config,l=>{t.value=Y(),M.value=!t.value.showOnChartHover,O(),G.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{O()},{deep:!0});const{isPrinting:W,isImaging:K,generatePdf:J,generateImage:Q}=le.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ie=e.computed(()=>t.value.table.responsiveBreakpoint);function de(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<ie.value})}).observe(U.value)}e.onMounted(O);function O(){de()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:a}}),E=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ce(l,a,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:ye}=l;R.value=ye,f.value=d,_.value={datapoint:l,seriesIndex:a,series:S.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/v.value)),B=e.computed(()=>o.value.left+(p.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),a=n.dataset.map(u=>u.values);return{head:l,body:a}});function Z(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),r=s.createCsvContent(u);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ve(l){x.value=l,q.value+=1}function ee(){y.value.showTable=!y.value.showTable}function te(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return oe({generatePdf:J,generateCsv:Z,generateImage:Q,toggleTable:ee,toggleTooltip:te,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ne,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",_e,[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(j)||e.unref(M))?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(W),uid:w.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(Q),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,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","style"])):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":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(be._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Be),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Le),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,Ve)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c,y:o.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ce(d,r,o.value.left+i.value.width*c,o.value.top+i.value.height*r),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,$e)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ee,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Se)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Me)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,De)],8,Pe)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,Re),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,Ue)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Xe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ye)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:p.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,We),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ke),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,Qe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ze)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(he._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:$.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(me.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=u=>y.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(ge.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",lt,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",at,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",st,e.toDisplayString(u),1)],12,ot),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",nt,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,ut))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},it=we._export_sfc(rt,[["__scopeId","data-v-e8a5fa5f"]]);exports.default=it;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-o6tXRhOr.cjs"),pe=require("./Title-B-EsW0Q2.cjs"),le=require("./usePrinter-H2UFIe6n.cjs"),he=require("./Tooltip-B7gYRLGN.cjs"),fe=require("./vue-ui-skeleton-BIWgLDDf.cjs"),ge=require("./BaseIcon-DujPvdJ_.cjs"),me=require("./vue-ui-accordion-paZXh-GD.cjs"),ae=require("./useNestedProp-D-zaZbSR.cjs"),be=require("./PackageVersion-dQYEsTLp.cjs"),ke=require("./PenAndPaper-1h87IVla.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],_e={key:2,style:"width:100%;background:transparent"},Ne=["xmlns","viewBox"],Be=["x","y","width","height","fill","stroke","stroke-width"],Le=["x","y","width","height","fill","stroke","stroke-width"],Ve=["font-size","font-weight","fill","x","y"],$e=["x","y","width","height","onMouseover"],Ee={key:0},Se=["font-size","fill","x","y","font-weight"],Ae={key:0},ze=["text-anchor","font-size","fill","font-weight","transform"],Te={key:1},Me=["x","y","width","height","stroke","stroke-width"],Oe={key:2},Pe=["id"],Fe=["stop-color"],De=["stop-color"],Ie=["x","y","font-size","fill"],Re=["x","y","height","rx","fill"],qe=["x","y","font-size","fill"],Ue=["stroke","x1","x2","y1","y2"],He=["fill","d"],Ge={key:3},Xe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},je=["stop-color"],Ye=["stop-color"],We=["x","y","width","height","rx"],Ke=["x","y","font-size","fill"],Je=["x","y","font-size","fill"],Qe=["stroke","x1","x2","y1","y2"],Ze=["fill","d"],et={key:5,class:"vue-data-ui-watermark"},tt={key:6,ref:"source",dir:"auto"},lt={class:"vue-ui-data-table"},at={key:0},ot=["data-cell"],st={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ut=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:oe}){const n=L;e.useCssVars(l=>({"144dc876":l.tdo}));const{vue_ui_heatmap:se}=s.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),$=e.ref(null),ue=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),ne=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:M,setUserOptionsVisibility:X,keepUserOptionState:j}=xe.useUserOptionState({config:t.value});function Y(){const l=ae.useNestedProp({userConfig:n.config,defaultConfig:se});let a={};return l.theme?a={...ae.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:a=l,n.config&&s.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>n.config,l=>{t.value=Y(),M.value=!t.value.showOnChartHover,O(),G.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{O()},{deep:!0});const{isPrinting:W,isImaging:K,generatePdf:J,generateImage:Q}=le.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ie=e.computed(()=>t.value.table.responsiveBreakpoint);function de(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<ie.value})}).observe(U.value)}e.onMounted(O);function O(){de()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:a}}),E=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ce(l,a,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:ye}=l;R.value=ye,f.value=d,_.value={datapoint:l,seriesIndex:a,series:S.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/v.value)),B=e.computed(()=>o.value.left+(p.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),a=n.dataset.map(u=>u.values);return{head:l,body:a}});function Z(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),r=s.createCsvContent(u);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ve(l){x.value=l,q.value+=1}function ee(){y.value.showTable=!y.value.showTable}function te(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return oe({generatePdf:J,generateCsv:Z,generateImage:Q,toggleTable:ee,toggleTooltip:te,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ne,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",_e,[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(j)||e.unref(M))?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(W),uid:w.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(Q),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,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","style"])):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":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(be._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Be),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Le),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,Ve)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c,y:o.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ce(d,r,o.value.left+i.value.width*c,o.value.top+i.value.height*r),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,$e)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ee,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Se)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Me)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,De)],8,Pe)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,Re),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,Ue)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Xe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ye)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:p.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,We),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ke),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,Qe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ze)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(he._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:$.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(me.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=u=>y.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(ge.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",lt,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",at,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",st,e.toDisplayString(u),1)],12,ot),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",nt,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,ut))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},it=we._export_sfc(rt,[["__scopeId","data-v-e8a5fa5f"]]);exports.default=it;
@@ -1,15 +1,15 @@
1
1
  import { ref as c, computed as f, onMounted as Ue, onBeforeUnmount as We, watch as He, openBlock as s, createElementBlock as r, normalizeClass as O, normalizeStyle as $, unref as y, renderSlot as p, createBlock as z, createCommentVNode as v, createSlots as Ge, withCtx as m, normalizeProps as Y, guardReactiveProps as j, createVNode as ke, Fragment as b, renderList as k, createElementVNode as T, toDisplayString as L, createTextVNode as Ee, nextTick as Ve } from "vue";
2
- import { u as Re, c as we, o as qe, e as Ce, g as Ze, b as Je, d as Ke, p as G, D as _e, i as I, f as F, X as Qe, l as et, h as tt, G as lt, t as at, a as st, C as E, x as ot, q as rt, r as nt, F as N } from "./index-Dhlyke5j.js";
3
- import { u as $e } from "./useNestedProp-D9eTQKze.js";
4
- import { u as ut, U as it } from "./usePrinter-BnBk8gnl.js";
5
- import { _ as ct } from "./PackageVersion-xnKIqody.js";
6
- import { L as vt } from "./Legend-wr5XLSfL.js";
7
- import { _ as ht } from "./Title-BecmraNn.js";
8
- import { _ as yt } from "./Tooltip-BZYApG0d.js";
9
- import { D as dt } from "./DataTable-D8MTezlM.js";
10
- import ft from "./vue-ui-accordion-CGpOsWNN.js";
11
- import { P as xt } from "./PenAndPaper-iek0aH4r.js";
12
- import pt from "./vue-ui-skeleton-DQqwDUqP.js";
2
+ import { u as Re, c as we, o as qe, e as Ce, g as Ze, b as Je, d as Ke, p as G, D as _e, i as I, f as F, X as Qe, l as et, h as tt, G as lt, t as at, a as st, C as E, x as ot, q as rt, r as nt, F as N } from "./index-CI-N9klv.js";
3
+ import { u as $e } from "./useNestedProp-D1eJ0dvv.js";
4
+ import { u as ut, U as it } from "./usePrinter-CXc8xCKk.js";
5
+ import { _ as ct } from "./PackageVersion-S3SzpuwC.js";
6
+ import { L as vt } from "./Legend-HooNAKB_.js";
7
+ import { _ as ht } from "./Title-DLjHHdyq.js";
8
+ import { _ as yt } from "./Tooltip-BDaa-67h.js";
9
+ import { D as dt } from "./DataTable-DgbrnD__.js";
10
+ import ft from "./vue-ui-accordion-CYLks1fW.js";
11
+ import { P as xt } from "./PenAndPaper-v846FwcH.js";
12
+ import pt from "./vue-ui-skeleton-owIhXtQF.js";
13
13
  import { t as mt, u as gt } from "./useResponsive-CoxXLe23.js";
14
14
  import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DGcOW0vL.cjs"),te=require("./useNestedProp-C9KmUVBy.cjs"),le=require("./usePrinter-DpEuGyLP.cjs"),ke=require("./PackageVersion-BJi2ywG9.cjs"),be=require("./Legend-Ba34oTdO.cjs"),Ce=require("./Title-BWhYDGb-.cjs"),Be=require("./Tooltip-cPxZzSgr.cjs"),we=require("./DataTable-rMMvio1U.cjs"),Se=require("./vue-ui-accordion-mtZIFAv9.cjs"),_e=require("./PenAndPaper-CX6N7FR7.cjs"),Ne=require("./vue-ui-skeleton-D_lU-hWK.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ee=["xmlns","viewBox"],Me={key:0},Te=["id"],Ae=["stop-color"],Pe=["stop-color"],Ve=["stop-color"],Fe={key:1},De=["x1","x2","y1","y2","stroke","stroke-width"],Oe={key:2},Ie=["x","y","fill","font-size"],Xe=["transform","font-size","fill","font-weight"],Ye={key:4},qe=["x1","x2","y1","y2","stroke","stroke-width"],je={key:5},Ue=["transform","fill","font-size","text-anchor"],Re=["x","y","font-size","fill","font-weight"],He=["x1","x2","y1","y2","stroke","stroke-width"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["d","stroke","stroke-width"],Ze=["d","stroke","stroke-width"],Je=["cx","cy","fill","r"],Ke=["cx","cy","fill","r","stroke","stroke-width"],Qe={key:1},et=["x","y","font-size","fill","font-weight"],tt={key:2},lt=["x","y","font-size","font-weight","fill"],at=["cx","cy","r","onMouseenter","onClick"],ot={key:5,class:"vue-data-ui-watermark"},st=["onClick"],rt=["innerHTML"],nt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:M}){const c=oe,{vue_ui_history_plot:re}=r.useConfig(),k=e.ref(null),T=e.ref(null),A=e.ref(0),P=e.ref(null),V=e.ref(0),F=e.ref(0),D=e.ref(0),B=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),w=e.ref(!1),f=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(X),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?T.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?P.value:null,source:I.value});v.value.width=o,v.value.height=a,n.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),n.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),n.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),n.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),n.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})});B.value=new ResizeObserver(l),B.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:re});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=ze.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.showOnChartHover,X(),A.value+=1,F.value+=1,V.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,n.value.plots=t.value.style.chart.plots.radius,n.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,n.value.labels=t.value.style.chart.plots.labels.fontSize,n.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,n.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,n.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,n.value.yAxisName=t.value.style.chart.axes.y.name.fontSize},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ie=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),i=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),n=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ie.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ue=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ce=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ce.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ue.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?de.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ve.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:i.value.left+(a-l.min)/(l.max-l.min)*i.value.width,y1:i.value.top,y2:i.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:i.value.bottom-(a-o.min)/(o.max-o.min)*i.value.height,x1:i.value.left,x2:i.value.right,value:a}))}});function he(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return i.value.left+((l||0)+o)/(d.value.x.max+o)*i.value.width}function ye(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return i.value.bottom-((l||0)+o)/(d.value.y.max+o)*i.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,p)=>({valueX:s.x,valueY:s.y,label:s.label,x:he(s.x),y:ye(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function fe(l){M("selectDatapoint",l)}function J(l){M("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function me(l){w.value=l,D.value+=1}const $=e.ref(null);function xe({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(p=>[[p.seriesName],[p.label],[p.valueX],[p.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){m.value.showTable=!m.value.showTable}function ee(){m.value.showTooltip=!m.value.showTooltip}function ge(){return g.value}return se({getData:ge,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":w.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,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:T,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${D.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:me,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ve)],8,Te))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:i.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+n.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":n.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:3,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+n.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":n.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,Xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${i.value.bottom+t.value.style.chart.axes.x.labels.offsetY+n.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":n.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Ue))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:6,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":n.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,Re)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:7,x1:i.value.left,x2:i.value.left+i.value.width,y1:i.value.bottom,y2:i.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,He)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,We)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ge),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ze)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:n.value.plots,stroke:"none"},null,8,Je))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:n.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Ke))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+n.value.plots+n.value.labels,"font-size":n.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,et))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,p)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+n.value.indexLabels/3,"font-size":n.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?p:p+1),15,lt))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:n.value.plots,stroke:"none",onMouseenter:p=>xe({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=p=>{N.value=!1,f.value=null}),onClick:()=>fe(u)},null,40,at))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(be.Legend,{key:`legend_${V.value}`,legendSet:Z.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,st)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:m.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:w.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(we.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,rt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},it=Le._export_sfc(nt,[["__scopeId","data-v-d26cf9ea"]]);exports.default=it;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-o6tXRhOr.cjs"),te=require("./useNestedProp-D-zaZbSR.cjs"),le=require("./usePrinter-H2UFIe6n.cjs"),ke=require("./PackageVersion-dQYEsTLp.cjs"),be=require("./Legend-V3K-4ipN.cjs"),Ce=require("./Title-B-EsW0Q2.cjs"),Be=require("./Tooltip-B7gYRLGN.cjs"),we=require("./DataTable-BUflha5V.cjs"),Se=require("./vue-ui-accordion-paZXh-GD.cjs"),_e=require("./PenAndPaper-1h87IVla.cjs"),Ne=require("./vue-ui-skeleton-BIWgLDDf.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ee=["xmlns","viewBox"],Me={key:0},Te=["id"],Ae=["stop-color"],Pe=["stop-color"],Ve=["stop-color"],Fe={key:1},De=["x1","x2","y1","y2","stroke","stroke-width"],Oe={key:2},Ie=["x","y","fill","font-size"],Xe=["transform","font-size","fill","font-weight"],Ye={key:4},qe=["x1","x2","y1","y2","stroke","stroke-width"],je={key:5},Ue=["transform","fill","font-size","text-anchor"],Re=["x","y","font-size","fill","font-weight"],He=["x1","x2","y1","y2","stroke","stroke-width"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["d","stroke","stroke-width"],Ze=["d","stroke","stroke-width"],Je=["cx","cy","fill","r"],Ke=["cx","cy","fill","r","stroke","stroke-width"],Qe={key:1},et=["x","y","font-size","fill","font-weight"],tt={key:2},lt=["x","y","font-size","font-weight","fill"],at=["cx","cy","r","onMouseenter","onClick"],ot={key:5,class:"vue-data-ui-watermark"},st=["onClick"],rt=["innerHTML"],nt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:M}){const c=oe,{vue_ui_history_plot:re}=r.useConfig(),k=e.ref(null),T=e.ref(null),A=e.ref(0),P=e.ref(null),V=e.ref(0),F=e.ref(0),D=e.ref(0),B=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),w=e.ref(!1),f=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(X),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?T.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?P.value:null,source:I.value});v.value.width=o,v.value.height=a,n.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),n.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),n.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),n.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),n.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})});B.value=new ResizeObserver(l),B.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:re});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=ze.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.showOnChartHover,X(),A.value+=1,F.value+=1,V.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,n.value.plots=t.value.style.chart.plots.radius,n.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,n.value.labels=t.value.style.chart.plots.labels.fontSize,n.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,n.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,n.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,n.value.yAxisName=t.value.style.chart.axes.y.name.fontSize},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ie=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),i=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),n=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ie.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ue=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ce=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ce.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ue.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?de.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ve.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:i.value.left+(a-l.min)/(l.max-l.min)*i.value.width,y1:i.value.top,y2:i.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:i.value.bottom-(a-o.min)/(o.max-o.min)*i.value.height,x1:i.value.left,x2:i.value.right,value:a}))}});function he(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return i.value.left+((l||0)+o)/(d.value.x.max+o)*i.value.width}function ye(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return i.value.bottom-((l||0)+o)/(d.value.y.max+o)*i.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,p)=>({valueX:s.x,valueY:s.y,label:s.label,x:he(s.x),y:ye(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function fe(l){M("selectDatapoint",l)}function J(l){M("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function me(l){w.value=l,D.value+=1}const $=e.ref(null);function xe({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(p=>[[p.seriesName],[p.label],[p.valueX],[p.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){m.value.showTable=!m.value.showTable}function ee(){m.value.showTooltip=!m.value.showTooltip}function ge(){return g.value}return se({getData:ge,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":w.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,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:T,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${D.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:me,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ve)],8,Te))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:i.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+n.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":n.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:3,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+n.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":n.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,Xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${i.value.bottom+t.value.style.chart.axes.x.labels.offsetY+n.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":n.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Ue))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:6,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":n.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,Re)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:7,x1:i.value.left,x2:i.value.left+i.value.width,y1:i.value.bottom,y2:i.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,He)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,We)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ge),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ze)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:n.value.plots,stroke:"none"},null,8,Je))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:n.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Ke))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+n.value.plots+n.value.labels,"font-size":n.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,et))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,p)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+n.value.indexLabels/3,"font-size":n.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?p:p+1),15,lt))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:n.value.plots,stroke:"none",onMouseenter:p=>xe({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=p=>{N.value=!1,f.value=null}),onClick:()=>fe(u)},null,40,at))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(be.Legend,{key:`legend_${V.value}`,legendSet:Z.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,st)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:m.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:w.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(we.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,rt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},it=Le._export_sfc(nt,[["__scopeId","data-v-d26cf9ea"]]);exports.default=it;
@@ -1,7 +1,7 @@
1
1
  import { computed as N, watch as p, ref as C, onMounted as D, openBlock as i, createElementBlock as s, normalizeClass as v, normalizeStyle as u, createElementVNode as $, renderSlot as n, createTextVNode as y, toDisplayString as k, createVNode as S, Fragment as x, unref as h } from "vue";
2
- import { u as z } from "./useNestedProp-D9eTQKze.js";
3
- import { u as A, i as w, f as B } from "./index-Dhlyke5j.js";
4
- import L from "./vue-ui-digits-CGFznMkY.js";
2
+ import { u as z } from "./useNestedProp-D1eJ0dvv.js";
3
+ import { u as A, i as w, f as B } from "./index-CI-N9klv.js";
4
+ import L from "./vue-ui-digits-qztPrOEN.js";
5
5
  const T = {
6
6
  __name: "vue-ui-kpi",
7
7
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-C9KmUVBy.cjs"),u=require("./index-DGcOW0vL.cjs"),p=require("./vue-ui-digits-e1HQVXb9.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-D-zaZbSR.cjs"),u=require("./index-o6tXRhOr.cjs"),p=require("./vue-ui-digits-_8FbgFrI.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;