vue-data-ui 2.11.0 → 2.11.2

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 (165) hide show
  1. package/dist/{Arrow-BfdnOsct.cjs → Arrow-CogAJvGp.cjs} +1 -1
  2. package/dist/{Arrow-BSsIs5Aj.js → Arrow-OttzfahM.js} +1 -1
  3. package/dist/{BaseIcon-BPehVcsN.js → BaseIcon-CpIcYACc.js} +1 -1
  4. package/dist/{BaseIcon-dtfVrHa7.cjs → BaseIcon-DY-33nfj.cjs} +1 -1
  5. package/dist/{ColorPicker-ByaQGf5i.js → ColorPicker-BnsG9Qeu.js} +3 -3
  6. package/dist/{ColorPicker-C-nhrZ-J.cjs → ColorPicker-CrMLe8x_.cjs} +1 -1
  7. package/dist/{DataTable-BdekL1Hc.js → DataTable-CJOtzfgn.js} +2 -2
  8. package/dist/{DataTable-pT39kn0W.cjs → DataTable-CNCnRrD-.cjs} +1 -1
  9. package/dist/{Legend-HckkoJBL.js → Legend-DKQ4psNY.js} +2 -2
  10. package/dist/{Legend-C8PTNFsH.cjs → Legend-ieOu_fKK.cjs} +1 -1
  11. package/dist/{PackageVersion-B6nxekEz.cjs → PackageVersion-BxSGdh6L.cjs} +1 -1
  12. package/dist/{PackageVersion-BPCzY_N5.js → PackageVersion-D-aPPO0L.js} +1 -1
  13. package/dist/{PenAndPaper-BC1d2zL5.cjs → PenAndPaper-ByAFuR-l.cjs} +1 -1
  14. package/dist/{PenAndPaper-B3KDT2of.js → PenAndPaper-D9g_r8-6.js} +3 -3
  15. package/dist/{Shape-Cr-Qt6IO.cjs → Shape-BQIcurpe.cjs} +1 -1
  16. package/dist/{Shape-B0OqBXWl.js → Shape-DLjaeo5U.js} +1 -1
  17. package/dist/{Slicer-BXBqgQau.js → Slicer-DuqI_UVS.js} +2 -2
  18. package/dist/{Slicer-BWr1nt8v.cjs → Slicer-FXxFjXOP.cjs} +1 -1
  19. package/dist/{Title-GpO-QNhg.cjs → Title-D62pPwLz.cjs} +1 -1
  20. package/dist/{Title-Cq5kGGhS.js → Title-DIYoufYR.js} +1 -1
  21. package/dist/{Tooltip-CxzDtoXn.js → Tooltip-BFz2yelJ.js} +1 -1
  22. package/dist/{Tooltip-eL97y6Ym.cjs → Tooltip-C_H6-uAa.cjs} +1 -1
  23. package/dist/{dom-to-png-BeN7LHfC.cjs → dom-to-png-B3SeX1JP.cjs} +1 -1
  24. package/dist/{dom-to-png-G_nLlvER.js → dom-to-png-BB-m1MuD.js} +1 -1
  25. package/dist/{img-08K-Su3g.cjs → img-Bl4Pt1QH.cjs} +1 -1
  26. package/dist/{img-BzMFujbd.js → img-Cyr1eIO7.js} +1 -1
  27. package/dist/{index-CG-euAJp.cjs → index-Cn2tUOoX.cjs} +1 -1
  28. package/dist/{index-BMcwUsiG.js → index-d3erwTWB.js} +1 -1
  29. package/dist/{pdf-achyloML.cjs → pdf-BQABl7QG.cjs} +1 -1
  30. package/dist/{pdf-BJNBeUWV.js → pdf-BQRTRQlZ.js} +1 -1
  31. package/dist/{useNestedProp-DwQWwt5e.js → useNestedProp-BqKuhIvF.js} +1 -1
  32. package/dist/{useNestedProp-DYDoE86w.cjs → useNestedProp-C8955nsn.cjs} +1 -1
  33. package/dist/{usePrinter-BBqldIVF.cjs → usePrinter-BrH80VBz.cjs} +1 -1
  34. package/dist/{usePrinter-BpCNa5RW.js → usePrinter-CHrKIDM7.js} +3 -3
  35. package/dist/{vue-data-ui-DXciuF6V.js → vue-data-ui-BRKcN5_z.js} +63 -63
  36. package/dist/{vue-data-ui-BTz28Upr.cjs → vue-data-ui-BbzW2_-6.cjs} +1 -1
  37. package/dist/vue-data-ui.cjs +1 -1
  38. package/dist/vue-data-ui.js +1 -1
  39. package/dist/{vue-ui-3d-bar-D-x0k_IG.js → vue-ui-3d-bar-BIw7nTYA.js} +9 -9
  40. package/dist/{vue-ui-3d-bar-Cv0XQSLU.cjs → vue-ui-3d-bar-WFymJ4EL.cjs} +1 -1
  41. package/dist/{vue-ui-accordion-dJGHfrMl.cjs → vue-ui-accordion-7GoAZx3k.cjs} +1 -1
  42. package/dist/{vue-ui-accordion-DKw3ZQgh.js → vue-ui-accordion-BJyaBDyF.js} +3 -3
  43. package/dist/{vue-ui-age-pyramid-DzQ9EYPB.cjs → vue-ui-age-pyramid-DGpLdvsL.cjs} +1 -1
  44. package/dist/{vue-ui-age-pyramid-BKOh2L3c.js → vue-ui-age-pyramid-Dn_061NF.js} +10 -10
  45. package/dist/{vue-ui-annotator-BSGf2Uh1.js → vue-ui-annotator-Y65oZVga.js} +2 -2
  46. package/dist/{vue-ui-annotator-DJDY5xOf.cjs → vue-ui-annotator-ypStRKCB.cjs} +1 -1
  47. package/dist/{vue-ui-bullet-CJLZA5Lf.js → vue-ui-bullet-B5mjXy0q.js} +8 -8
  48. package/dist/{vue-ui-bullet-BHaeMobd.cjs → vue-ui-bullet-C_Ppz5nn.cjs} +1 -1
  49. package/dist/{vue-ui-candlestick-BLqrtK2S.js → vue-ui-candlestick-BIC2-GAV.js} +11 -11
  50. package/dist/{vue-ui-candlestick-D5aSctEq.cjs → vue-ui-candlestick-BrDk_pc_.cjs} +1 -1
  51. package/dist/{vue-ui-carousel-table-DoQSiBlh.cjs → vue-ui-carousel-table-BTxtBHvb.cjs} +1 -1
  52. package/dist/{vue-ui-carousel-table-CvDic9rq.js → vue-ui-carousel-table-CnvQ0CeQ.js} +4 -4
  53. package/dist/{vue-ui-chestnut-BW9_1uRo.cjs → vue-ui-chestnut-D_NZDyDN.cjs} +1 -1
  54. package/dist/{vue-ui-chestnut-Co3ZtHYQ.js → vue-ui-chestnut-IsRTDol2.js} +8 -8
  55. package/dist/{vue-ui-chord-CUREQYhU.cjs → vue-ui-chord-CZ66gJ7w.cjs} +1 -1
  56. package/dist/{vue-ui-chord-XU2pSfEx.js → vue-ui-chord-iSsr3a59.js} +12 -12
  57. package/dist/{vue-ui-circle-pack-DpbWAZFC.js → vue-ui-circle-pack-CS2l9IXg.js} +9 -9
  58. package/dist/{vue-ui-circle-pack-Bdtr6z4Z.cjs → vue-ui-circle-pack-lGkj98rL.cjs} +1 -1
  59. package/dist/{vue-ui-cursor-CuvyoiLa.js → vue-ui-cursor-Cq9lPDB7.js} +2 -2
  60. package/dist/{vue-ui-cursor-BAMt5dcz.cjs → vue-ui-cursor-YZyc0ARl.cjs} +1 -1
  61. package/dist/{vue-ui-dashboard-_LJuvqRE.js → vue-ui-dashboard-7Cm-15oc.js} +62 -62
  62. package/dist/{vue-ui-dashboard-Bvrpw4EQ.cjs → vue-ui-dashboard-jP2U4qtK.cjs} +1 -1
  63. package/dist/{vue-ui-digits-CeLZoNoA.js → vue-ui-digits-BecNI-j7.js} +2 -2
  64. package/dist/{vue-ui-digits-CGzSArOS.cjs → vue-ui-digits-C5PfeED6.cjs} +1 -1
  65. package/dist/{vue-ui-donut-BV_QLVp2.cjs → vue-ui-donut-BM9i2XHJ.cjs} +1 -1
  66. package/dist/{vue-ui-donut-BegwljuG.js → vue-ui-donut-D_bFxovZ.js} +12 -12
  67. package/dist/{vue-ui-donut-evolution-CQ-1_Xak.js → vue-ui-donut-evolution-C8dlmVur.js} +11 -11
  68. package/dist/{vue-ui-donut-evolution-euIDGiH3.cjs → vue-ui-donut-evolution-Oga32kTV.cjs} +1 -1
  69. package/dist/{vue-ui-dumbbell-BO0h5wGp.cjs → vue-ui-dumbbell-ClzXgan7.cjs} +1 -1
  70. package/dist/{vue-ui-dumbbell-CPylAaR8.js → vue-ui-dumbbell-Ds41wAQh.js} +10 -10
  71. package/dist/{vue-ui-flow-DWiA9yFS.cjs → vue-ui-flow-Bp1oqzTj.cjs} +1 -1
  72. package/dist/{vue-ui-flow-B8fyDK8A.js → vue-ui-flow-CqdSvk4_.js} +11 -11
  73. package/dist/{vue-ui-funnel-BAa1OwMy.js → vue-ui-funnel-CNDgAWjp.js} +9 -9
  74. package/dist/{vue-ui-funnel-yRS_OJcF.cjs → vue-ui-funnel-y3hN7BGU.cjs} +1 -1
  75. package/dist/{vue-ui-galaxy-DF41DbY7.cjs → vue-ui-galaxy-D5vKPiFH.cjs} +1 -1
  76. package/dist/{vue-ui-galaxy-DEZ-rfXE.js → vue-ui-galaxy-DzUAHZ4G.js} +11 -11
  77. package/dist/{vue-ui-gauge-CCGMpnvM.cjs → vue-ui-gauge-57ahTSbZ.cjs} +1 -1
  78. package/dist/{vue-ui-gauge-k3ejBVZj.js → vue-ui-gauge-Cj-4ZhyL.js} +7 -7
  79. package/dist/{vue-ui-gizmo-uSaL0tgk.js → vue-ui-gizmo-CCS3u0qr.js} +3 -3
  80. package/dist/{vue-ui-gizmo-DGRDcoNW.cjs → vue-ui-gizmo-D5_kCO9e.cjs} +1 -1
  81. package/dist/{vue-ui-heatmap-dKn60iwF.cjs → vue-ui-heatmap-B8sfOhVF.cjs} +1 -1
  82. package/dist/{vue-ui-heatmap-WgeuA6rb.js → vue-ui-heatmap-CBRd8kvj.js} +10 -10
  83. package/dist/{vue-ui-history-plot-jBlXPR4I.js → vue-ui-history-plot-4XT22zB_.js} +11 -11
  84. package/dist/{vue-ui-history-plot-Dnb4txKX.cjs → vue-ui-history-plot-DQVpKlp1.cjs} +1 -1
  85. package/dist/{vue-ui-kpi-N3ugHMNs.js → vue-ui-kpi-B-lBgRvZ.js} +3 -3
  86. package/dist/{vue-ui-kpi-C13Zgi4k.cjs → vue-ui-kpi-DjI1yXtc.cjs} +1 -1
  87. package/dist/{vue-ui-mini-loader-BnblpH8s.cjs → vue-ui-mini-loader-BpAnNEHG.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-BukHpIuC.js → vue-ui-mini-loader-_ksyazrb.js} +2 -2
  89. package/dist/{vue-ui-molecule-zkjb68lX.cjs → vue-ui-molecule-BqpYPmrd.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-DQADG59C.js → vue-ui-molecule-Db_QmLY6.js} +11 -11
  91. package/dist/{vue-ui-mood-radar-oO1NjJsj.cjs → vue-ui-mood-radar-DI_FioVr.cjs} +1 -1
  92. package/dist/{vue-ui-mood-radar-BdpZWnM1.js → vue-ui-mood-radar-Y_CGEC1L.js} +11 -11
  93. package/dist/{vue-ui-nested-donuts-8PBCRUKI.cjs → vue-ui-nested-donuts-B0rJlEH0.cjs} +1 -1
  94. package/dist/{vue-ui-nested-donuts-6EYydl-l.js → vue-ui-nested-donuts-DosW9Sfg.js} +11 -11
  95. package/dist/{vue-ui-onion-D0Y-pJox.cjs → vue-ui-onion-CEHc9oKt.cjs} +1 -1
  96. package/dist/{vue-ui-onion-Dqfii-y3.js → vue-ui-onion-CQwIVcfN.js} +11 -11
  97. package/dist/{vue-ui-parallel-coordinate-plot-cETB0SSp.cjs → vue-ui-parallel-coordinate-plot-C1sxm3Nr.cjs} +1 -1
  98. package/dist/{vue-ui-parallel-coordinate-plot-yUVuNHbG.js → vue-ui-parallel-coordinate-plot-Cdu0SvMZ.js} +12 -12
  99. package/dist/{vue-ui-quadrant-Bk24QzXW.js → vue-ui-quadrant-B8H5sBMi.js} +12 -12
  100. package/dist/{vue-ui-quadrant-C2Z9igq-.cjs → vue-ui-quadrant-DM3Afg_i.cjs} +1 -1
  101. package/dist/{vue-ui-quick-chart-BTBzFVVt.js → vue-ui-quick-chart-ClB6jwSV.js} +9 -9
  102. package/dist/{vue-ui-quick-chart-BNYO7nMz.cjs → vue-ui-quick-chart-ClJi48bc.cjs} +1 -1
  103. package/dist/{vue-ui-radar-d5WGxBWb.js → vue-ui-radar-BTluZs04.js} +12 -12
  104. package/dist/{vue-ui-radar-DpJ6BjWE.cjs → vue-ui-radar-f0QY_Mal.cjs} +1 -1
  105. package/dist/{vue-ui-rating-DlpuX8_4.cjs → vue-ui-rating-B71_TxmN.cjs} +1 -1
  106. package/dist/{vue-ui-rating-DHP9cn7v.js → vue-ui-rating-CTNYeoXO.js} +2 -2
  107. package/dist/{vue-ui-relation-circle-DFFnj0G-.js → vue-ui-relation-circle-CdHhoGcO.js} +7 -7
  108. package/dist/{vue-ui-relation-circle-C9r2L_By.cjs → vue-ui-relation-circle-DHOG2jKh.cjs} +1 -1
  109. package/dist/{vue-ui-ridgeline-CWcW0CKH.cjs → vue-ui-ridgeline-CxhklaLX.cjs} +1 -1
  110. package/dist/{vue-ui-ridgeline-B6SmiN8e.js → vue-ui-ridgeline-Dr6UOfwb.js} +12 -12
  111. package/dist/{vue-ui-rings-BZ6huPcE.cjs → vue-ui-rings-DoGxh2qe.cjs} +1 -1
  112. package/dist/{vue-ui-rings-07YzKS3V.js → vue-ui-rings-N2mHKtLh.js} +12 -12
  113. package/dist/{vue-ui-scatter-DZZtUBuf.js → vue-ui-scatter-BcJRyqbE.js} +12 -12
  114. package/dist/{vue-ui-scatter-DYRw6p9i.cjs → vue-ui-scatter-BnRkkP5Z.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-BoZyBfQF.js → vue-ui-skeleton-BOtCpAcY.js} +3 -3
  116. package/dist/{vue-ui-skeleton-LYOlEoA_.cjs → vue-ui-skeleton-Mcoev-5q.cjs} +1 -1
  117. package/dist/{vue-ui-smiley-D3A8OqM8.js → vue-ui-smiley-BPqpTUTh.js} +2 -2
  118. package/dist/{vue-ui-smiley-C9Au0iXl.cjs → vue-ui-smiley-Ch9trBZA.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-BfR_RtZy.js → vue-ui-spark-trend-BXo8mbxJ.js} +5 -5
  120. package/dist/{vue-ui-spark-trend-DnoxMeF3.cjs → vue-ui-spark-trend-PqEN-rL8.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-CJUkmhnj.js → vue-ui-sparkbar-DEsL52nJ.js} +4 -4
  122. package/dist/{vue-ui-sparkbar-CAHDM61K.cjs → vue-ui-sparkbar-DnRQFo63.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-DngkG6ub.cjs → vue-ui-sparkgauge-C0E5Sojk.cjs} +1 -1
  124. package/dist/{vue-ui-sparkgauge-CXt_UXa0.js → vue-ui-sparkgauge-DkawMq8d.js} +4 -4
  125. package/dist/{vue-ui-sparkhistogram-BGSXZdYJ.cjs → vue-ui-sparkhistogram-Bqtsbb3w.cjs} +1 -1
  126. package/dist/{vue-ui-sparkhistogram-e1KLP3lx.js → vue-ui-sparkhistogram-D8ZCXl7m.js} +5 -5
  127. package/dist/{vue-ui-sparkline-4HHF_g27.cjs → vue-ui-sparkline-BTruGe7A.cjs} +1 -1
  128. package/dist/{vue-ui-sparkline-C1c0gnoE.js → vue-ui-sparkline-D8LYPXpr.js} +4 -4
  129. package/dist/{vue-ui-sparkstackbar-CYI8Q-A7.cjs → vue-ui-sparkstackbar-DeXUgBIH.cjs} +1 -1
  130. package/dist/{vue-ui-sparkstackbar-WWHBMDoc.js → vue-ui-sparkstackbar-DzeVCG0H.js} +5 -5
  131. package/dist/{vue-ui-stackbar-LROMB081.cjs → vue-ui-stackbar-CaFp42Tn.cjs} +1 -1
  132. package/dist/{vue-ui-stackbar-Dswh_YhD.js → vue-ui-stackbar-DQ9CcKUd.js} +13 -13
  133. package/dist/{vue-ui-strip-plot-CkTMHioN.js → vue-ui-strip-plot-C6gcQLMI.js} +11 -11
  134. package/dist/{vue-ui-strip-plot-BHLCEMtE.cjs → vue-ui-strip-plot-DzNU6VRW.cjs} +1 -1
  135. package/dist/{vue-ui-table-BQLFbWJu.js → vue-ui-table-D7azsjo3.js} +3 -3
  136. package/dist/{vue-ui-table-ClPvrWk1.cjs → vue-ui-table-DP2ZaGWa.cjs} +1 -1
  137. package/dist/{vue-ui-table-heatmap-CzXQ_Jyj.cjs → vue-ui-table-heatmap-B2gZkAqm.cjs} +1 -1
  138. package/dist/{vue-ui-table-heatmap-Cq0Ayqw9.js → vue-ui-table-heatmap-DINNMAyX.js} +4 -4
  139. package/dist/{vue-ui-table-sparkline-kApN7-VK.js → vue-ui-table-sparkline-BrYh6fVq.js} +5 -5
  140. package/dist/{vue-ui-table-sparkline-CrWRDJhv.cjs → vue-ui-table-sparkline-CgN2nMYT.cjs} +1 -1
  141. package/dist/{vue-ui-thermometer-DYo8ZTAM.cjs → vue-ui-thermometer-DgZfQbR2.cjs} +1 -1
  142. package/dist/{vue-ui-thermometer-BqtB3WF_.js → vue-ui-thermometer-J0A6MZy_.js} +7 -7
  143. package/dist/{vue-ui-timer-DcHNiJK0.js → vue-ui-timer-CI8zPXh3.js} +5 -5
  144. package/dist/{vue-ui-timer-DprIzsAY.cjs → vue-ui-timer-ClM5FpoU.cjs} +1 -1
  145. package/dist/{vue-ui-tiremarks-Dpn0SavO.cjs → vue-ui-tiremarks-19Krsd1f.cjs} +1 -1
  146. package/dist/{vue-ui-tiremarks-fEn67LmT.js → vue-ui-tiremarks-BuNik_Pf.js} +7 -7
  147. package/dist/{vue-ui-treemap-C8uX5Ilw.cjs → vue-ui-treemap-DvmJ1MOU.cjs} +1 -1
  148. package/dist/{vue-ui-treemap-Cq5QKrAX.js → vue-ui-treemap-oUtdOGWu.js} +12 -12
  149. package/dist/{vue-ui-vertical-bar-BctpxL75.js → vue-ui-vertical-bar-2bHPN2lr.js} +12 -12
  150. package/dist/{vue-ui-vertical-bar-Bj-tNmvd.cjs → vue-ui-vertical-bar-RT-SM-us.cjs} +1 -1
  151. package/dist/{vue-ui-waffle-B3XGM76l.cjs → vue-ui-waffle-BSKRUJbJ.cjs} +1 -1
  152. package/dist/{vue-ui-waffle-inmP6xJa.js → vue-ui-waffle-BuISvHw-.js} +12 -12
  153. package/dist/{vue-ui-wheel-BExyiteC.js → vue-ui-wheel-CSy7_x22.js} +7 -7
  154. package/dist/{vue-ui-wheel-D4quM69U.cjs → vue-ui-wheel-DfBVkT9x.cjs} +1 -1
  155. package/dist/{vue-ui-word-cloud-D3O3LDR0.cjs → vue-ui-word-cloud-BlfCmzD-.cjs} +1 -1
  156. package/dist/{vue-ui-word-cloud-CO6OX7uL.js → vue-ui-word-cloud-DEpoSRMP.js} +10 -10
  157. package/dist/vue-ui-world-Cy1VBlK3.js +931 -0
  158. package/dist/vue-ui-world-EgFhVXSY.cjs +19 -0
  159. package/dist/{vue-ui-xy-BLnXnpd-.js → vue-ui-xy-PaM6vcjk.js} +16 -16
  160. package/dist/{vue-ui-xy-CnLejNy1.cjs → vue-ui-xy-aQEDcKbT.cjs} +2 -2
  161. package/dist/{vue-ui-xy-canvas-t3XI0Z_d.cjs → vue-ui-xy-canvas-C6-sYgU_.cjs} +1 -1
  162. package/dist/{vue-ui-xy-canvas-2hhjtxZN.js → vue-ui-xy-canvas-CSyX_xLO.js} +12 -12
  163. package/package.json +1 -1
  164. package/dist/vue-ui-world-BWv7KvDY.cjs +0 -19
  165. package/dist/vue-ui-world-j_aAVyB8.js +0 -1112
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CG-euAJp.cjs"),B=require("./useNestedProp-DYDoE86w.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["xmlns","stroke"],L={id:"vueUiSmiley0"},H=["stop-color"],X=["stop-color"],j=["fill"],D=["stroke"],U=["xmlns","viewBox","stroke"],G={id:"vueUiSmiley0"},A=["stop-color"],Y=["stop-color"],K=["fill"],T=["viewBox","stroke"],O=["xmlns","stroke"],F={id:"vueUiSmiley1"},I=["stop-color"],q=["stop-color"],P=["fill"],J=["xmlns","stroke"],Q=["xmlns","viewBox","stroke"],W={id:"vueUiSmiley1"},Z=["stop-color"],ee=["stop-color"],te=["fill"],le=["viewBox","stroke"],oe=["xmlns","stroke"],ae={id:"vueUiSmiley2"},ne=["stop-color"],ie=["stop-color"],se=["fill"],re=["xmlns","stroke"],de=["xmlns","viewBox","stroke"],ue={id:"vueUiSmiley2"},pe=["stop-color"],ve=["stop-color"],ye=["fill"],ce=["xmlns","viewBox","stroke"],fe=["xmlns","stroke"],me={id:"vueUiSmiley3"},he=["stop-color"],ke=["stop-color"],ge=["fill"],be=["xmlns","stroke"],xe=["xmlns","viewBox","stroke"],Ne={id:"vueUiSmiley3"},Ve=["stop-color"],ze=["stop-color"],Ee=["fill"],$e=["xmlns","viewBox","stroke"],Se=["xmlns","stroke"],we={id:"vueUiSmiley4"},Me=["stop-color"],Be=["stop-color"],Ce=["fill"],_e=["xmlns","stroke"],Re=["xmlns","viewBox","stroke"],Le={id:"vueUiSmiley4"},He=["stop-color"],Xe=["stop-color"],je=["fill"],De=["xmlns","viewBox","stroke"],Ue={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(g,{expose:b,emit:x}){const{vue_ui_smiley:N}=o.useConfig(),i=g,V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiSmiley does not support the #chart-background slot.")}),e.onMounted(()=>{c()});function c(){(!Object.hasOwn(i.dataset,"rating")||o.objectIsEmpty(i.dataset))&&o.error({componentName:"VueUiSmiley",type:"datasetAttribute",property:"rating"})}const f=e.ref(!1),s=e.ref(void 0),z=x,t=e.computed({get:()=>m(),set:n=>n});function m(){return B.useNestedProp({userConfig:i.config,defaultConfig:N})}e.watch(()=>i.config,n=>{t.value=m(),c()},{deep:!0});const E=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?$(i.dataset.rating):i.dataset.rating||null),y=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(E.value),d=e.computed(()=>t.value.readonly);function $(n){if(n===null)return null;let l=0,a=0;for(const h in n){const M=parseInt(h),k=n[h];l+=M*k,a+=k}return a===0?0:l/a}function p(n){const l=r.value-n,a=24;switch(!0){case l<0:return 0;case l>1:return 1*a;default:return l*a}}function v(n){d.value||(r.value=n,z("rate",n))}function S(){return r.value}function w(n=!0){d.value=n}b({getData:S,toggleReadonly:w});function u(n){return t.value.readonly?t.value.style.colors.inactive[n]:r.value===n+1?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:s.value!==void 0&&s.value===n?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:t.value.style.colors.inactive[n]}return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-smiley",style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:l[20]||(l[20]=a=>f.value=!0),onMouseleave:l[21]||(l[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-smiley-wrapper",style:e.normalizeStyle(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===1}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Cn2tUOoX.cjs"),B=require("./useNestedProp-C8955nsn.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["xmlns","stroke"],L={id:"vueUiSmiley0"},H=["stop-color"],X=["stop-color"],j=["fill"],D=["stroke"],U=["xmlns","viewBox","stroke"],G={id:"vueUiSmiley0"},A=["stop-color"],Y=["stop-color"],K=["fill"],T=["viewBox","stroke"],O=["xmlns","stroke"],F={id:"vueUiSmiley1"},I=["stop-color"],q=["stop-color"],P=["fill"],J=["xmlns","stroke"],Q=["xmlns","viewBox","stroke"],W={id:"vueUiSmiley1"},Z=["stop-color"],ee=["stop-color"],te=["fill"],le=["viewBox","stroke"],oe=["xmlns","stroke"],ae={id:"vueUiSmiley2"},ne=["stop-color"],ie=["stop-color"],se=["fill"],re=["xmlns","stroke"],de=["xmlns","viewBox","stroke"],ue={id:"vueUiSmiley2"},pe=["stop-color"],ve=["stop-color"],ye=["fill"],ce=["xmlns","viewBox","stroke"],fe=["xmlns","stroke"],me={id:"vueUiSmiley3"},he=["stop-color"],ke=["stop-color"],ge=["fill"],be=["xmlns","stroke"],xe=["xmlns","viewBox","stroke"],Ne={id:"vueUiSmiley3"},Ve=["stop-color"],ze=["stop-color"],Ee=["fill"],$e=["xmlns","viewBox","stroke"],Se=["xmlns","stroke"],we={id:"vueUiSmiley4"},Me=["stop-color"],Be=["stop-color"],Ce=["fill"],_e=["xmlns","stroke"],Re=["xmlns","viewBox","stroke"],Le={id:"vueUiSmiley4"},He=["stop-color"],Xe=["stop-color"],je=["fill"],De=["xmlns","viewBox","stroke"],Ue={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(g,{expose:b,emit:x}){const{vue_ui_smiley:N}=o.useConfig(),i=g,V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiSmiley does not support the #chart-background slot.")}),e.onMounted(()=>{c()});function c(){(!Object.hasOwn(i.dataset,"rating")||o.objectIsEmpty(i.dataset))&&o.error({componentName:"VueUiSmiley",type:"datasetAttribute",property:"rating"})}const f=e.ref(!1),s=e.ref(void 0),z=x,t=e.computed({get:()=>m(),set:n=>n});function m(){return B.useNestedProp({userConfig:i.config,defaultConfig:N})}e.watch(()=>i.config,n=>{t.value=m(),c()},{deep:!0});const E=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?$(i.dataset.rating):i.dataset.rating||null),y=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(E.value),d=e.computed(()=>t.value.readonly);function $(n){if(n===null)return null;let l=0,a=0;for(const h in n){const M=parseInt(h),k=n[h];l+=M*k,a+=k}return a===0?0:l/a}function p(n){const l=r.value-n,a=24;switch(!0){case l<0:return 0;case l>1:return 1*a;default:return l*a}}function v(n){d.value||(r.value=n,z("rate",n))}function S(){return r.value}function w(n=!0){d.value=n}b({getData:S,toggleReadonly:w});function u(n){return t.value.readonly?t.value.style.colors.inactive[n]:r.value===n+1?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:s.value!==void 0&&s.value===n?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:t.value.style.colors.inactive[n]}return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-smiley",style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:l[20]||(l[20]=a=>f.value=!0),onMouseleave:l[21]||(l[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-smiley-wrapper",style:e.normalizeStyle(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===1}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
2
2
  position:relative`),onMouseenter:l[0]||(l[0]=a=>s.value=0),onMouseleave:l[1]||(l[1]=a=>s.value=void 0),onClick:l[2]||(l[2]=a=>v(1)),onKeyup:l[3]||(l[3]=e.withKeys(a=>v(1),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===0?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"1:",4),l[22]||(l[22]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[1],e.unref(o.dataLabel)({v:i.dataset.rating[1],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{transition:"all 0.1s ease-in-out",position:"absolute",top:"0",left:"0"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",L,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.active[0],.05)},null,8,H),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[0]},null,8,X)])]),l[23]||(l[23]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(0)},null,8,j)],8,R)):(e.openBlock(),e.createElementBlock("svg",{key:2,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[24]||(l[24]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-dabd0325></path>',5)]),8,D)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{transition:"all 0.1s ease-in-out",position:"absolute",top:"0",left:"0"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",G,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[0],.05)},null,8,A),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[0]},null,8,Y)])]),l[25]||(l[25]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley0)":t.value.style.colors.activeReadonly[0]},null,8,K)],8,U)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[26]||(l[26]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-dabd0325></path>',5)]),8,T)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===2}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[4]||(l[4]=a=>s.value=1),onMouseleave:l[5]||(l[5]=a=>s.value=void 0),onClick:l[6]||(l[6]=a=>v(2)),onKeyup:l[7]||(l[7]=e.withKeys(a=>v(2),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===1?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"2:",4),l[27]||(l[27]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[2],e.unref(o.dataLabel)({v:i.dataset.rating[2],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",F,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.active[1],.05)},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[1]},null,8,q)])]),l[28]||(l[28]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(1)},null,8,P)],8,O)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[29]||(l[29]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9 15l6 0" data-v-dabd0325></path>',5)]),8,J)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",W,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[1],.05)},null,8,Z),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[1]},null,8,ee)])]),l[30]||(l[30]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley1)":t.value.style.colors.activeReadonly[1]},null,8,te)],8,Q)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[31]||(l[31]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9 15l6 0" data-v-dabd0325></path>',5)]),8,le)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===3}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[8]||(l[8]=a=>s.value=2),onMouseleave:l[9]||(l[9]=a=>s.value=void 0),onClick:l[10]||(l[10]=a=>v(3)),onKeyup:l[11]||(l[11]=e.withKeys(a=>v(3),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===2?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"3:",4),l[32]||(l[32]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[3],e.unref(o.dataLabel)({v:i.dataset.rating[3],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ae,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,ie)])]),l[33]||(l[33]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(2)},null,8,se)],8,oe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[34]||(l[34]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1),e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1),e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)]),8,re)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[l[35]||(l[35]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ue,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,ve)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley2)":t.value.style.colors.activeReadonly[2]},null,8,ye)],8,de)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[36]||(l[36]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1),e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1),e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)]),8,ce)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===4}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[12]||(l[12]=a=>s.value=3),onMouseleave:l[13]||(l[13]=a=>s.value=void 0),onClick:l[14]||(l[14]=a=>v(4)),onKeyup:l[15]||(l[15]=e.withKeys(a=>v(4),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===3?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"4:",4),l[37]||(l[37]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[4],e.unref(o.dataLabel)({v:i.dataset.rating[4],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",me,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,he),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,ke)])]),l[38]||(l[38]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:u(3)},null,8,ge)],8,fe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[39]||(l[39]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-dabd0325></path>',5)]),8,be)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[l[40]||(l[40]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Ne,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,ze)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley3)":t.value.style.colors.activeReadonly[3]},null,8,Ee)],8,xe)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[41]||(l[41]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-dabd0325></path>',5)]),8,$e)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===5}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[16]||(l[16]=a=>s.value=4),onMouseleave:l[17]||(l[17]=a=>s.value=void 0),onClick:l[18]||(l[18]=a=>v(5)),onKeyup:l[19]||(l[19]=e.withKeys(a=>v(5),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===4?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"5:",4),l[42]||(l[42]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[5],e.unref(o.dataLabel)({v:i.dataset.rating[5],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",we,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,Be)])]),l[43]||(l[43]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:u(4)},null,8,Ce)],8,Se)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[44]||(l[44]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 9l.01 0" data-v-dabd0325></path><path d="M15 9l.01 0" data-v-dabd0325></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-dabd0325></path>',5)]),8,_e)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[l[45]||(l[45]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,Xe)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley4)":t.value.style.colors.activeReadonly[4]},null,8,je)],8,Re)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[46]||(l[46]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 9l.01 0" data-v-dabd0325></path><path d="M15 9l.01 0" data-v-dabd0325></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-dabd0325></path>',5)]),8,De)):e.createCommentVNode("",!0)],38),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Ge=C._export_sfc(Ue,[["__scopeId","data-v-dabd0325"]]);exports.default=Ge;
@@ -1,9 +1,9 @@
1
1
  import { computed as s, ref as k, watch as E, onMounted as K, createElementBlock as u, openBlock as o, normalizeStyle as Q, createBlock as L, createCommentVNode as r, unref as h, createVNode as Y, createElementVNode as _, renderSlot as D, toDisplayString as O } from "vue";
2
- import { u as ee, c as te, a as ae, a0 as S, o as le, e as ne, v as c, a1 as oe, X as se, s as M, T as G, f as U, i as ue } from "./index-BMcwUsiG.js";
3
- import { u as q } from "./useNestedProp-DwQWwt5e.js";
4
- import I from "./BaseIcon-BPehVcsN.js";
5
- import re from "./vue-ui-skeleton-BoZyBfQF.js";
6
- import { _ as ie } from "./PackageVersion-BPCzY_N5.js";
2
+ import { u as ee, c as te, a as ae, a0 as S, o as le, e as ne, v as c, a1 as oe, X as se, s as M, T as G, f as U, i as ue } from "./index-d3erwTWB.js";
3
+ import { u as q } from "./useNestedProp-BqKuhIvF.js";
4
+ import I from "./BaseIcon-CpIcYACc.js";
5
+ import re from "./vue-ui-skeleton-BOtCpAcY.js";
6
+ import { _ as ie } from "./PackageVersion-D-aPPO0L.js";
7
7
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const ve = ["id"], he = ["xmlns", "viewBox"], ce = ["width", "height"], ye = ["id"], fe = ["stop-color"], pe = ["stop-color"], ge = { key: 1 }, me = ["d", "fill"], ke = ["d", "fill"], _e = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], be = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], we = ["height", "width", "x"], xe = { style: { width: "100%" } }, Ce = ["x", "y", "fill", "font-size", "font-weight"], Le = ["stroke", "cx", "cy", "fill"], $e = ["x", "y", "font-size", "fill", "font-weight"], Ne = {
9
9
  key: 2,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CG-euAJp.cjs"),T=require("./useNestedProp-DYDoE86w.cjs"),w=require("./BaseIcon-dtfVrHa7.cjs"),A=require("./vue-ui-skeleton-LYOlEoA_.cjs"),F=require("./PackageVersion-B6nxekEz.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],D=["xmlns","viewBox"],P=["width","height"],G=["id"],U=["stop-color"],W=["stop-color"],Z={key:1},H=["d","fill"],R=["d","fill"],X=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],J=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],K=["height","width","x"],Q={style:{width:"100%"}},Y=["x","y","fill","font-size","font-weight"],ee=["stroke","cx","cy","fill"],te=["x","y","font-size","fill","font-weight"],le={key:2,ref:"source",dir:"auto"},ae={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const{vue_ui_spark_trend:$}=a.useConfig(),u=E,S=e.computed(()=>!!u.dataset&&u.dataset.length),y=e.ref(a.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=T.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...T.useNestedProp({userConfig:a.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}const c=e.computed(()=>a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{h.value=a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(r=>[void 0,1/0,-1/0,null,NaN].includes(r)?null:r)},{deep:!0});function g(l){return l.map(r=>a.checkNaN(r))}const h=e.ref(a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),p=e.ref(!1),_=e.ref(null);e.onMounted(()=>{C();let r=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&u.dataset.length>1){let N=function(){p.value=!0;let L=performance.now(),V=L-i;V>r?(i=L-V%r,v<c.value.length?(h.value.push(c.value[v]),v+=1,_.value=requestAnimationFrame(N)):(cancelAnimationFrame(_.value),h.value=g(c.value),p.value=!1)):_.value=requestAnimationFrame(N)};h.value=[];let v=0;N()}});function C(){a.objectIsEmpty(u.dataset)&&a.error({componentName:"VueUiSparkTrend",type:"dataset"})}const n=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:n.value.width-t.value.style.padding.right,bottom:n.value.height-t.value.style.padding.bottom,height:n.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:n.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),b=e.computed(()=>{const l=g(c.value);return{max:Math.max(...l.map(r=>a.checkNaN(r))),min:Math.min(...l.map(r=>a.checkNaN(r)))}}),m=e.computed(()=>{const l=b.value.min>=0?0:b.value.min;return Math.abs(l)}),z=e.computed(()=>b.value.max+m.value);function B(l){return l/z.value}const M=e.computed(()=>c.value.length),o=e.computed(()=>h.value.map((l,r)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:a.checkNaN(l),absoluteValue:a.checkNaN(i),plotValue:a.checkNaN(i+m.value),toMax:B(i+m.value),x:d.value.left+a.checkNaN(r*(d.value.width/(M.value-1)))-t.value.style.padding.right,y:d.value.bottom-a.checkNaN(d.value.height*B(i+m.value))}})),f=e.computed(()=>{const l=g(c.value);return t.value.style.trendLabel.trendType==="global"?a.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),k=e.computed(()=>p.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[k.value]),I=e.computed(()=>{const l={x:o.value[0].x,y:n.value.height-6},r={x:o.value[o.value.length-1].x,y:n.value.height-6},i=[];return o.value.forEach(v=>{i.push(`${v.x},${v.y} `)}),[l.x,l.y,...i,r.x,r.y].toString()}),j=e.computed(()=>{let l=[];return o.value.forEach(r=>{l.push(`${r.x},${r.y} `)}),`M ${l.toString()}`});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[S.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createVNode(F._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,W)],8,G)]),t.value.style.area.show&&o.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${o.value[0].x},${d.value.bottom} ${e.unref(a.createSmoothPath)(o.value)} L ${o.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,H)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${I.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,R))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(a.createSmoothPath)(o.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,X)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:3,d:j.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,J)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:4,height:n.value.height/2,width:n.value.height/2,x:n.value.height/5,y:8},[e.createElementVNode("div",Q,[k.value==="positive"?(e.openBlock(),e.createBlock(w.default,{key:0,stroke:s.value,name:"arrowTop",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="negative"?(e.openBlock(),e.createBlock(w.default,{key:1,stroke:s.value,name:"arrowBottom",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="neutral"?(e.openBlock(),e.createBlock(w.default,{key:2,stroke:s.value,name:"arrowRight",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,K)),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:5,x:n.value.height/2-n.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,Y)),o.value.length&&o.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:6,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:o.value.at(-1).x,cy:o.value.at(-1).y,r:4,fill:s.value},null,8,ee)):e.createCommentVNode("",!0),o.value.length&&o.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:7,"text-anchor":"middle",x:o.value.at(-1).x,y:o.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.dataLabel.formatter,o.value.at(-1).value,e.unref(a.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value.at(-1)})),9,te)):e.createCommentVNode("",!0)],8,D)):(e.openBlock(),e.createBlock(A.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"])),l.$slots.source?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],12,O))}},oe=q._export_sfc(ae,[["__scopeId","data-v-38d02804"]]);exports.default=oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cn2tUOoX.cjs"),T=require("./useNestedProp-C8955nsn.cjs"),w=require("./BaseIcon-DY-33nfj.cjs"),A=require("./vue-ui-skeleton-Mcoev-5q.cjs"),F=require("./PackageVersion-BxSGdh6L.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],D=["xmlns","viewBox"],P=["width","height"],G=["id"],U=["stop-color"],W=["stop-color"],Z={key:1},H=["d","fill"],R=["d","fill"],X=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],J=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],K=["height","width","x"],Q={style:{width:"100%"}},Y=["x","y","fill","font-size","font-weight"],ee=["stroke","cx","cy","fill"],te=["x","y","font-size","fill","font-weight"],le={key:2,ref:"source",dir:"auto"},ae={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const{vue_ui_spark_trend:$}=a.useConfig(),u=E,S=e.computed(()=>!!u.dataset&&u.dataset.length),y=e.ref(a.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=T.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...T.useNestedProp({userConfig:a.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}const c=e.computed(()=>a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{h.value=a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(r=>[void 0,1/0,-1/0,null,NaN].includes(r)?null:r)},{deep:!0});function g(l){return l.map(r=>a.checkNaN(r))}const h=e.ref(a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),p=e.ref(!1),_=e.ref(null);e.onMounted(()=>{C();let r=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&u.dataset.length>1){let N=function(){p.value=!0;let L=performance.now(),V=L-i;V>r?(i=L-V%r,v<c.value.length?(h.value.push(c.value[v]),v+=1,_.value=requestAnimationFrame(N)):(cancelAnimationFrame(_.value),h.value=g(c.value),p.value=!1)):_.value=requestAnimationFrame(N)};h.value=[];let v=0;N()}});function C(){a.objectIsEmpty(u.dataset)&&a.error({componentName:"VueUiSparkTrend",type:"dataset"})}const n=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:n.value.width-t.value.style.padding.right,bottom:n.value.height-t.value.style.padding.bottom,height:n.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:n.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),b=e.computed(()=>{const l=g(c.value);return{max:Math.max(...l.map(r=>a.checkNaN(r))),min:Math.min(...l.map(r=>a.checkNaN(r)))}}),m=e.computed(()=>{const l=b.value.min>=0?0:b.value.min;return Math.abs(l)}),z=e.computed(()=>b.value.max+m.value);function B(l){return l/z.value}const M=e.computed(()=>c.value.length),o=e.computed(()=>h.value.map((l,r)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:a.checkNaN(l),absoluteValue:a.checkNaN(i),plotValue:a.checkNaN(i+m.value),toMax:B(i+m.value),x:d.value.left+a.checkNaN(r*(d.value.width/(M.value-1)))-t.value.style.padding.right,y:d.value.bottom-a.checkNaN(d.value.height*B(i+m.value))}})),f=e.computed(()=>{const l=g(c.value);return t.value.style.trendLabel.trendType==="global"?a.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),k=e.computed(()=>p.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[k.value]),I=e.computed(()=>{const l={x:o.value[0].x,y:n.value.height-6},r={x:o.value[o.value.length-1].x,y:n.value.height-6},i=[];return o.value.forEach(v=>{i.push(`${v.x},${v.y} `)}),[l.x,l.y,...i,r.x,r.y].toString()}),j=e.computed(()=>{let l=[];return o.value.forEach(r=>{l.push(`${r.x},${r.y} `)}),`M ${l.toString()}`});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[S.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createVNode(F._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,W)],8,G)]),t.value.style.area.show&&o.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${o.value[0].x},${d.value.bottom} ${e.unref(a.createSmoothPath)(o.value)} L ${o.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,H)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${I.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,R))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(a.createSmoothPath)(o.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,X)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:3,d:j.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,J)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:4,height:n.value.height/2,width:n.value.height/2,x:n.value.height/5,y:8},[e.createElementVNode("div",Q,[k.value==="positive"?(e.openBlock(),e.createBlock(w.default,{key:0,stroke:s.value,name:"arrowTop",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="negative"?(e.openBlock(),e.createBlock(w.default,{key:1,stroke:s.value,name:"arrowBottom",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="neutral"?(e.openBlock(),e.createBlock(w.default,{key:2,stroke:s.value,name:"arrowRight",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,K)),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:5,x:n.value.height/2-n.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,Y)),o.value.length&&o.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:6,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:o.value.at(-1).x,cy:o.value.at(-1).y,r:4,fill:s.value},null,8,ee)):e.createCommentVNode("",!0),o.value.length&&o.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:7,"text-anchor":"middle",x:o.value.at(-1).x,y:o.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.dataLabel.formatter,o.value.at(-1).value,e.unref(a.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value.at(-1)})),9,te)):e.createCommentVNode("",!0)],8,D)):(e.openBlock(),e.createBlock(A.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"])),l.$slots.source?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],12,O))}},oe=q._export_sfc(ae,[["__scopeId","data-v-38d02804"]]);exports.default=oe;
@@ -1,8 +1,8 @@
1
1
  import { useSlots as J, onMounted as L, computed as g, ref as k, watch as O, nextTick as K, createElementBlock as c, openBlock as r, normalizeStyle as f, unref as s, renderSlot as C, createCommentVNode as v, createBlock as Q, normalizeProps as R, mergeProps as P, createElementVNode as d, toDisplayString as p, Fragment as T, renderList as Y, createVNode as Z } from "vue";
2
- import { u as ee, c as te, t as le, p as x, a as ae, b as oe, o as se, e as V, g as ue, d as re, s as $, i as b, f as w, X as ne, w as ie } from "./index-BMcwUsiG.js";
3
- import { u as E } from "./useNestedProp-DwQWwt5e.js";
4
- import ce from "./vue-ui-skeleton-BoZyBfQF.js";
5
- import { _ as ve } from "./PackageVersion-BPCzY_N5.js";
2
+ import { u as ee, c as te, t as le, p as x, a as ae, b as oe, o as se, e as V, g as ue, d as re, s as $, i as b, f as w, X as ne, w as ie } from "./index-d3erwTWB.js";
3
+ import { u as E } from "./useNestedProp-BqKuhIvF.js";
4
+ import ce from "./vue-ui-skeleton-BOtCpAcY.js";
5
+ import { _ as ve } from "./PackageVersion-D-aPPO0L.js";
6
6
  const de = ["onClick"], fe = { key: 1 }, pe = ["xmlns", "viewBox"], ye = ["id"], me = ["stop-color"], ge = ["stop-color"], he = ["height", "width", "fill", "rx"], ke = ["height", "width", "fill", "rx"], xe = ["height", "width", "fill", "rx"], be = {
7
7
  key: 2,
8
8
  ref: "source",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CG-euAJp.cjs"),b=require("./useNestedProp-DYDoE86w.cjs"),$=require("./vue-ui-skeleton-LYOlEoA_.cjs"),z=require("./PackageVersion-B6nxekEz.cjs"),L=["onClick"],P={key:1},A=["xmlns","viewBox"],F=["id"],O=["stop-color"],I=["stop-color"],T=["height","width","fill","rx"],q=["height","width","fill","rx"],M=["height","width","fill","rx"],U={key:2,ref:"source",dir:"auto"},j={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:C}){const{vue_ui_sparkbar:S}=o.useConfig(),n=p,w=e.useSlots();e.onMounted(()=>{w["chart-background"]&&console.warn("VueUiSparkbar does not support the #chart-background slot.")});const v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=b.useNestedProp({userConfig:n.config,defaultConfig:S});return l.theme?{...b.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const _=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){i+=a/l,i<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let i=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const s=e.ref({width:500,height:16}),N=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),B=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||_.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function V(l){return l/N.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:V(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}const E=C;function D(l,r){E("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkbar",style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&i!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>D(a,i)},[e.renderSlot(l.$slots,"data-label",e.mergeProps({ref_for:!0},{bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})}})),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${s.value.width} ${s.value.height}`,width:"100%"},[e.createVNode(z._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${i}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,I)],8,F)]),e.createElementVNode("rect",{height:s.value.height,width:s.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:s.value.height/2},null,8,T),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:s.value.height/2},null,8,q),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${i}_${y.value})`:a.color,rx:s.value.height/2},null,8,M)],8,A))],12,L)):e.createCommentVNode("",!0)],64))),256)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",U,[e.renderSlot(l.$slots,"source")],512)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($.default,{key:3,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Cn2tUOoX.cjs"),b=require("./useNestedProp-C8955nsn.cjs"),$=require("./vue-ui-skeleton-Mcoev-5q.cjs"),z=require("./PackageVersion-BxSGdh6L.cjs"),L=["onClick"],P={key:1},A=["xmlns","viewBox"],F=["id"],O=["stop-color"],I=["stop-color"],T=["height","width","fill","rx"],q=["height","width","fill","rx"],M=["height","width","fill","rx"],U={key:2,ref:"source",dir:"auto"},j={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:C}){const{vue_ui_sparkbar:S}=o.useConfig(),n=p,w=e.useSlots();e.onMounted(()=>{w["chart-background"]&&console.warn("VueUiSparkbar does not support the #chart-background slot.")});const v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=b.useNestedProp({userConfig:n.config,defaultConfig:S});return l.theme?{...b.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const _=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){i+=a/l,i<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let i=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const s=e.ref({width:500,height:16}),N=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),B=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||_.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function V(l){return l/N.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:V(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}const E=C;function D(l,r){E("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkbar",style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&i!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>D(a,i)},[e.renderSlot(l.$slots,"data-label",e.mergeProps({ref_for:!0},{bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})}})),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${s.value.width} ${s.value.height}`,width:"100%"},[e.createVNode(z._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${i}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,I)],8,F)]),e.createElementVNode("rect",{height:s.value.height,width:s.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:s.value.height/2},null,8,T),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:s.value.height/2},null,8,q),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${i}_${y.value})`:a.color,rx:s.value.height/2},null,8,M)],8,A))],12,L)):e.createCommentVNode("",!0)],64))),256)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",U,[e.renderSlot(l.$slots,"source")],512)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($.default,{key:3,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=j;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CG-euAJp.cjs"),b=require("./useNestedProp-DYDoE86w.cjs"),w=require("./vue-ui-skeleton-LYOlEoA_.cjs"),S=require("./PackageVersion-B6nxekEz.cjs"),B=require("./useChartAccessibility-Cm7nkzTG.cjs"),E=["xmlns","viewBox"],L=["width","height"],A=["id"],M=["stop-color"],V=["stop-color"],z=["d","stroke","stroke-linecap"],q=["d","stroke","stroke-linecap","stroke-dashoffset"],O=["x","y","font-size","fill","font-weight"],j={key:4,ref:"source",dir:"auto"},D={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C){const{vue_ui_sparkgauge:_}=s.useConfig(),l=C,c=e.computed(()=>!!l.dataset&&Object.keys(l.dataset).length);e.onMounted(()=>{d()});function d(){s.objectIsEmpty(l.dataset)?s.error({componentName:"VueUiSparkgauge",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:l.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{s.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(s.createUid()),t=e.computed({get:()=>m(),set:a=>a}),{svgRef:N}=B.useChartAccessibility({config:{text:l.dataset.title}});function m(){const a=b.useNestedProp({userConfig:l.config,defaultConfig:_});return a.theme?{...b.useNestedProp({userConfig:s.themes.vue_ui_sparkgauge[a.theme]||l.config,defaultConfig:a})}:a}e.watch(()=>l.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),n=e.computed(()=>{const a=l.dataset.min??0,r=l.dataset.max??0,$=r-a;return{min:a,max:r,diff:$}}),o=e.ref(t.value.style.animation.show?n.value.min:l.dataset.value);e.watch(()=>l.dataset.value,()=>{y(l.dataset.value||0)});const f=e.computed(()=>o.value>n.value.max?n.value.max:o.value<n.value.min?n.value.min:o.value),p=e.computed(()=>n.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(l.dataset.value||0)});function y(a){function r(){o.value<a?o.value=Math.min(o.value+p.value,a):o.value>a&&(o.value=Math.max(o.value-p.value,a)),o.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>l.dataset.title??""),g=e.computed(()=>o.value>=0?(f.value-n.value.min)/n.value.diff:(Math.abs(n.value.min)-Math.abs(f.value))/n.value.diff),h=e.computed(()=>s.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,n.value.min,n.value.max,o.value)),k=e.computed(()=>t.value.style.dataLabel.autoColor?h.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?h.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkgauge",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:N,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode(S._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background")],8,L)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,M),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,V)],8,A)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,z),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,q)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:k.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(s.checkNaN)(o.value),e.unref(s.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(s.checkNaN)(o.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(s.checkNaN)(o.value),color:k.value})),9,O)],8,E)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(a.$slots,"source")],512)):e.createCommentVNode("",!0)],4))}};exports.default=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cn2tUOoX.cjs"),b=require("./useNestedProp-C8955nsn.cjs"),w=require("./vue-ui-skeleton-Mcoev-5q.cjs"),S=require("./PackageVersion-BxSGdh6L.cjs"),B=require("./useChartAccessibility-Cm7nkzTG.cjs"),E=["xmlns","viewBox"],L=["width","height"],A=["id"],M=["stop-color"],V=["stop-color"],z=["d","stroke","stroke-linecap"],q=["d","stroke","stroke-linecap","stroke-dashoffset"],O=["x","y","font-size","fill","font-weight"],j={key:4,ref:"source",dir:"auto"},D={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C){const{vue_ui_sparkgauge:_}=s.useConfig(),l=C,c=e.computed(()=>!!l.dataset&&Object.keys(l.dataset).length);e.onMounted(()=>{d()});function d(){s.objectIsEmpty(l.dataset)?s.error({componentName:"VueUiSparkgauge",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:l.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{s.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(s.createUid()),t=e.computed({get:()=>m(),set:a=>a}),{svgRef:N}=B.useChartAccessibility({config:{text:l.dataset.title}});function m(){const a=b.useNestedProp({userConfig:l.config,defaultConfig:_});return a.theme?{...b.useNestedProp({userConfig:s.themes.vue_ui_sparkgauge[a.theme]||l.config,defaultConfig:a})}:a}e.watch(()=>l.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),n=e.computed(()=>{const a=l.dataset.min??0,r=l.dataset.max??0,$=r-a;return{min:a,max:r,diff:$}}),o=e.ref(t.value.style.animation.show?n.value.min:l.dataset.value);e.watch(()=>l.dataset.value,()=>{y(l.dataset.value||0)});const f=e.computed(()=>o.value>n.value.max?n.value.max:o.value<n.value.min?n.value.min:o.value),p=e.computed(()=>n.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(l.dataset.value||0)});function y(a){function r(){o.value<a?o.value=Math.min(o.value+p.value,a):o.value>a&&(o.value=Math.max(o.value-p.value,a)),o.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>l.dataset.title??""),g=e.computed(()=>o.value>=0?(f.value-n.value.min)/n.value.diff:(Math.abs(n.value.min)-Math.abs(f.value))/n.value.diff),h=e.computed(()=>s.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,n.value.min,n.value.max,o.value)),k=e.computed(()=>t.value.style.dataLabel.autoColor?h.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?h.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkgauge",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:N,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode(S._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background")],8,L)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,M),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,V)],8,A)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,z),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,q)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:k.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(s.checkNaN)(o.value),e.unref(s.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(s.checkNaN)(o.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(s.checkNaN)(o.value),color:k.value})),9,O)],8,E)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(a.$slots,"source")],512)):e.createCommentVNode("",!0)],4))}};exports.default=D;
@@ -1,8 +1,8 @@
1
1
  import { computed as s, onMounted as N, ref as A, watch as M, createElementBlock as n, openBlock as i, normalizeStyle as m, createCommentVNode as r, createBlock as G, toDisplayString as y, unref as c, createVNode as I, createElementVNode as d, renderSlot as S, normalizeClass as R } from "vue";
2
- import { u as U, o as q, e as z, g as P, c as T, a as X, N as H, X as V, i as Y, v as g, f as J } from "./index-BMcwUsiG.js";
3
- import { u as O } from "./useNestedProp-DwQWwt5e.js";
4
- import K from "./vue-ui-skeleton-BoZyBfQF.js";
5
- import { _ as Q } from "./PackageVersion-BPCzY_N5.js";
2
+ import { u as U, o as q, e as z, g as P, c as T, a as X, N as H, X as V, i as Y, v as g, f as J } from "./index-d3erwTWB.js";
3
+ import { u as O } from "./useNestedProp-BqKuhIvF.js";
4
+ import K from "./vue-ui-skeleton-BOtCpAcY.js";
5
+ import { _ as Q } from "./PackageVersion-D-aPPO0L.js";
6
6
  import { u as W } from "./useChartAccessibility-BWojgys7.js";
7
7
  const Z = ["xmlns", "viewBox"], ee = ["width", "height"], te = ["id"], ae = ["stop-color"], le = ["stop-color"], oe = ["d", "stroke", "stroke-linecap"], se = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], ue = ["x", "y", "font-size", "fill", "font-weight"], ie = {
8
8
  key: 4,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CG-euAJp.cjs"),_=require("./useNestedProp-DYDoE86w.cjs"),M=require("./Shape-Cr-Qt6IO.cjs"),O=require("./vue-ui-skeleton-LYOlEoA_.cjs"),q=require("./PackageVersion-B6nxekEz.cjs"),H=require("./useChartAccessibility-Cm7nkzTG.cjs"),I=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U={key:0},W={key:1},j=["xmlns","viewBox"],P=["width","height"],R=["id"],G=["stop-color"],T=["stop-color"],X=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],Z=["stop-color"],ee={key:1},te=["x","y","height","width","fill","stroke","stroke-width","rx"],le={key:2},oe=["x","y","font-size","font-weight","fill"],ae=["x","y","font-size","fill"],se=["x","y","font-size","fill"],ne=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],re={key:2,ref:"source",dir:"auto"},ie={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:x}){e.useCssVars(o=>({"40b52890":L.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),c=B,f=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(c.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):c.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o}),{svgRef:w}=H.useChartAccessibility({config:t.value.style.title});function b(){const o=_.useNestedProp({userConfig:c.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||c.config,defaultConfig:o})}:o}e.watch(()=>c.config,o=>{t.value=b(),k()},{deep:!0});const u=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),C=e.computed(()=>Math.max(...c.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/C.value}const i=e.computed(()=>c.dataset.map((o,r)=>{const l=$(o.value||0),s=u.value.drawingHeight*l,d=u.value.drawingWidth/c.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=u.value.centerY-s/2,m=u.value.left+(y/2+r*d),V=u.value.left+r*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),z=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,h):a.setOpacity(t.value.style.bars.colors.negative,h),D=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,A=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,F=m+p/2;return{...o,color:z,gradient:A,height:s,intensity:h,proportion:l,stroke:D,textAnchor:F,trapX:V,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null),S=x;function N(o,r){S("selectDatapoint",{datapoint:o,index:r})}const L=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-histogram",style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),n.value!==null?(e.openBlock(),e.createElementBlock("span",U,"- "+e.toDisplayString(i.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(i.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",W,"("+e.toDisplayString(i.value[n.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:w,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:{overflow:"visible"}},[e.createVNode(q._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,T)],8,R))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,J)],8,X))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Z)],8,K))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,te))),256))])):(e.openBlock(),e.createElementBlock("g",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(M._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),9,oe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,ae)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:u.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,se)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:u.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>N(l,s)},null,40,ne)]))),256))],8,j)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",re,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},ue=I._export_sfc(ie,[["__scopeId","data-v-c92ac914"]]);exports.default=ue;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cn2tUOoX.cjs"),_=require("./useNestedProp-C8955nsn.cjs"),M=require("./Shape-BQIcurpe.cjs"),O=require("./vue-ui-skeleton-Mcoev-5q.cjs"),q=require("./PackageVersion-BxSGdh6L.cjs"),H=require("./useChartAccessibility-Cm7nkzTG.cjs"),I=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U={key:0},W={key:1},j=["xmlns","viewBox"],P=["width","height"],R=["id"],G=["stop-color"],T=["stop-color"],X=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],Z=["stop-color"],ee={key:1},te=["x","y","height","width","fill","stroke","stroke-width","rx"],le={key:2},oe=["x","y","font-size","font-weight","fill"],ae=["x","y","font-size","fill"],se=["x","y","font-size","fill"],ne=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],re={key:2,ref:"source",dir:"auto"},ie={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:x}){e.useCssVars(o=>({"40b52890":L.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),c=B,f=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(c.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):c.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o}),{svgRef:w}=H.useChartAccessibility({config:t.value.style.title});function b(){const o=_.useNestedProp({userConfig:c.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||c.config,defaultConfig:o})}:o}e.watch(()=>c.config,o=>{t.value=b(),k()},{deep:!0});const u=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),C=e.computed(()=>Math.max(...c.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/C.value}const i=e.computed(()=>c.dataset.map((o,r)=>{const l=$(o.value||0),s=u.value.drawingHeight*l,d=u.value.drawingWidth/c.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=u.value.centerY-s/2,m=u.value.left+(y/2+r*d),V=u.value.left+r*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),z=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,h):a.setOpacity(t.value.style.bars.colors.negative,h),D=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,A=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,F=m+p/2;return{...o,color:z,gradient:A,height:s,intensity:h,proportion:l,stroke:D,textAnchor:F,trapX:V,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null),S=x;function N(o,r){S("selectDatapoint",{datapoint:o,index:r})}const L=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-histogram",style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),n.value!==null?(e.openBlock(),e.createElementBlock("span",U,"- "+e.toDisplayString(i.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(i.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",W,"("+e.toDisplayString(i.value[n.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:w,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:{overflow:"visible"}},[e.createVNode(q._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,T)],8,R))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,J)],8,X))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Z)],8,K))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,te))),256))])):(e.openBlock(),e.createElementBlock("g",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(M._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),9,oe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,ae)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:u.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,se)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:u.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>N(l,s)},null,40,ne)]))),256))],8,j)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",re,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},ue=I._export_sfc(ie,[["__scopeId","data-v-c92ac914"]]);exports.default=ue;
@@ -1,9 +1,9 @@
1
1
  import { useCssVars as Z, computed as _, onMounted as ee, ref as N, watch as te, createElementBlock as s, openBlock as a, normalizeStyle as $, createCommentVNode as c, createBlock as D, createElementVNode as h, createTextVNode as le, toDisplayString as p, unref as n, createVNode as ae, renderSlot as I, Fragment as f, renderList as g, normalizeClass as V } from "vue";
2
- import { u as se, o as oe, e as E, g as ue, c as ie, a as re, s as m, i as H, f as F, X as ne, w as z } from "./index-BMcwUsiG.js";
3
- import { u as O } from "./useNestedProp-DwQWwt5e.js";
4
- import { _ as ve } from "./Shape-B0OqBXWl.js";
5
- import de from "./vue-ui-skeleton-BoZyBfQF.js";
6
- import { _ as ce } from "./PackageVersion-BPCzY_N5.js";
2
+ import { u as se, o as oe, e as E, g as ue, c as ie, a as re, s as m, i as H, f as F, X as ne, w as z } from "./index-d3erwTWB.js";
3
+ import { u as O } from "./useNestedProp-BqKuhIvF.js";
4
+ import { _ as ve } from "./Shape-DLjaeo5U.js";
5
+ import de from "./vue-ui-skeleton-BOtCpAcY.js";
6
+ import { _ as ce } from "./PackageVersion-D-aPPO0L.js";
7
7
  import { u as ye } from "./useChartAccessibility-BWojgys7.js";
8
8
  import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const fe = { key: 0 }, ge = { key: 1 }, pe = ["xmlns", "viewBox"], me = ["width", "height"], be = ["id"], _e = ["stop-color"], xe = ["stop-color"], ke = ["id"], we = ["stop-color"], $e = ["stop-color"], Ce = ["id"], Le = ["stop-color"], ze = ["stop-color"], Se = { key: 1 }, Ae = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Me = { key: 2 }, Ne = ["x", "y", "font-size", "font-weight", "fill"], De = ["x", "y", "font-size", "fill"], Ie = ["x", "y", "font-size", "fill"], Ve = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Ee = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CG-euAJp.cjs"),A=require("./useNestedProp-DYDoE86w.cjs"),X=require("./vue-ui-skeleton-LYOlEoA_.cjs"),O=require("./useResponsive-BBkmXXaa.cjs"),H=require("./PackageVersion-B6nxekEz.cjs"),U=require("./useChartAccessibility-Cm7nkzTG.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={__name:"SparkTooltip",props:{svgRef:{type:Object},x:{type:Number,required:!0},y:{type:Number,required:!0},prevX:{type:Number,required:!0},prevY:{type:Number,required:!0},offsetY:{type:Number,default:0},background:{type:String},backgroundOpacity:{type:Number,default:100},borderRadius:{type:Number,default:2},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#FFFFFF"},color:{type:String},fontSize:{type:Number}},setup(f){const c=f,w=e.toRef(c.svgRef),u=e.ref(null),y=e.ref(0),p=e.ref(0),m=e.ref(!1),V=e.computed(()=>r.setOpacity(c.background,c.backgroundOpacity)),N=async()=>{if(!w.value||!u.value)return;const t=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.x,y:c.y,offsetY:c.offsetY}),g=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.prevX,y:c.prevY,offsetY:c.offsetY});!t||!g||(m.value=!1,y.value=g.top,p.value=g.left,await e.nextTick(),setTimeout(()=>{m.value=!0,y.value=t.top,p.value=t.left},50))};return e.onMounted(N),e.watch(()=>[c.x,c.y,c.prevX,c.prevY],()=>N(),{immediate:!0}),(t,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tooltipRef",ref:u,class:"vue-data-ui-spark-tooltip",style:e.normalizeStyle({position:"fixed",top:`${y.value}px`,left:`${p.value}px`,pointerEvents:"none",background:V.value,color:c.color,fontSize:`${c.fontSize}px`,borderRadius:`${c.borderRadius}px`,border:`${c.borderWidth}px solid ${c.borderColor}`,transition:m.value?"top 0.3s ease-out, left 0.3s ease-out":"none"})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}},J=D._export_sfc(Z,[["__scopeId","data-v-c8e27542"]]),K=["id"],Q=["xmlns","viewBox"],ee=["width","height"],te=["id"],le=["stop-color"],ae=["stop-color"],oe=["id"],re=["stop-color"],ue=["stop-color"],ne=["id"],se=["stop-color"],ie=["stop-color"],de={key:1},ce=["d","fill"],ve=["d","fill"],pe=["d","stroke","stroke-width"],fe=["d","stroke","stroke-width"],ye=["x","y","width","height","fill","rx"],he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ge=["cx","cy","r","fill","stroke","stroke-width"],ke=["x","y","font-size","font-weight","fill"],be=["x","y","height","width","onMouseenter","onClick"],xe={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:c}){const{vue_ui_sparkline:w}=r.useConfig(),u=f,y=e.computed(()=>Array.isArray(u.dataset)&&u.dataset.length>0),p=e.ref(r.createUid()),m=e.ref(null),V=e.ref(null),N=e.ref(null),t=e.computed({get:()=>M(),set:l=>l}),{svgRef:g}=U.useChartAccessibility({config:t.value.style.title});function M(){const l=A.useNestedProp({userConfig:u.config,defaultConfig:w});let o={};return l.theme?o={...A.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||u.config,defaultConfig:l})}:o=l,u.config&&r.hasDeepProperty(u.config,"style.scaleMin")?o.style.scaleMin=u.config.style.scaleMin:o.style.scaleMin=null,u.config&&r.hasDeepProperty(u.config,"style.scaleMax")?o.style.scaleMax=u.config.style.scaleMax:o.style.scaleMax=null,o}const L=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=M(),z(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>u.dataset,l=>{k.value=r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const k=e.ref(W());function W(){return r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(l=>t.value.style.animation.show&&u.dataset.length>1?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const I=e.ref(null);e.onMounted(()=>{if(z(),t.value.style.animation.show&&u.dataset.length>1){let a=function(){o<L.value.length?(k.value.push(L.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):k.value=L.value,o+=1};k.value=[];const l=t.value.style.animation.animationFrames/u.dataset.length;let o=0;a()}});function z(){if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):u.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=O.throttle(()=>{const{width:o,height:a}=O.useResponsive({chart:m.value,title:t.value.style.title.show&&u.showInfo?V.value:null,source:N.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=u.forcedPadding/500*o})});I.value=new ResizeObserver(l),I.value.observe(m.value.parentNode)}}const n=e.ref({height:80*u.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:u.forcedPadding}),$=c,s=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:u.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:u.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),E=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),F=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),B=e.computed(()=>{const l=E.value>=0?0:E.value;return Math.abs(l)}),P=e.computed(()=>F.value+B.value),x=e.computed(()=>s.value.bottom-s.value.height*S(B.value));function S(l){return isNaN(l/P.value)?0:l/P.value}const b=e.computed(()=>L.value.length-1),v=e.computed(()=>k.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0,i=s.value.width/(b.value+1)>n.padding?n.padding:s.value.width/(b.value+1);return{absoluteValue:a,period:l.period,plotValue:a+B.value,toMax:S(a+B.value),x:s.value.start+o*(i>s.value.width/12?s.value.width/12:i),y:s.value.bottom-s.value.height*S(a+B.value),id:`plot_${p.value}_${o}`,color:C.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/b.value)):t.value.style.line.color,width:i>s.value.width/12?s.value.width/12:i}})),q=e.computed(()=>{const l={x:v.value[0].x||0,y:(n.value.height||0)-6},o={x:v.value[v.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return v.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),d=e.ref(void 0),_=e.ref(void 0);function Y(l,o){d.value=l,_.value||(_.value=l),$("hoverIndex",{index:o})}function j(){_.value=d.value,d.value=void 0,$("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(y.value){const l=v.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:v.value[v.value.length-1].absoluteValue,sum:o,average:o/v.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(v.value.map(({x:a,y:i,absoluteValue:T})=>({x:a,y:i,value:T}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),R=e.computed(()=>y.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),C=e.computed(()=>t.value.type&&t.value.type==="bar");function G(l,o){$("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:m,class:"vue-ui-sparkline",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:d.value,latest:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(d.value?d.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:g,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`),onMouseleave:o[0]||(o[0]=a=>_.value=void 0)},[e.createVNode(H._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ee)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ae)],8,te),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ue)],8,oe),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,se),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ie)],8,ne)]),t.value.style.area.show&&!C.value&&v.value[0]?(e.openBlock(),e.createElementBlock("g",de,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${v.value[0].x},${s.value.bottom} ${e.unref(r.createSmoothPath)(v.value)} L ${v.value.at(-1).x},${s.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ce)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${q.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ve))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,pe)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${e.unref(r.createStraightPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[C.value?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x-a.width/2,y:isNaN(a.absoluteValue>0?a.y:x.value)?0:a.absoluteValue>0?a.y:x.value,width:a.width,height:isNaN(Math.abs(a.y-x.value))?0:Math.abs(a.y-x.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${p.value})`:`url(#sparkline_bar_gradient_neg_${p.value})`,rx:t.value.style.bar.borderRadius},null,8,ye)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(d.value&&a.id===d.value.id||f.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:s.value.top-6,y2:s.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,he)):e.createCommentVNode("",!0)]))),256)),E.value<0?(e.openBlock(),e.createElementBlock("line",{key:4,x1:s.value.start,x2:s.value.start+s.value.width-16,y1:e.unref(r.forceValidValue)(x.value,s.value.bottom),y2:e.unref(r.forceValidValue)(x.value,s.value.bottom),stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[d.value&&a.id===d.value.id||f.selectedIndex===i||f.dataset.length===1?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ge)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:s.value.width+12+t.value.style.dataLabel.offsetX,y:n.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(d.value?e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value}):e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,R.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:R.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,ke)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1))/2,y:s.value.top-6,height:s.value.height+6,width:s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1),fill:"transparent",onMouseenter:T=>Y(a,i),onMouseleave:j,onClick:()=>G(a,i)},null,40,be))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],44,Q)):e.createCommentVNode("",!0),d.value&&t.value.style.tooltip.show?(e.openBlock(),e.createBlock(J,{key:2,x:d.value.x,y:d.value.y,prevX:_.value.x,prevY:_.value.y,offsetY:t.value.style.plot.radius*3+t.value.style.tooltip.offsetY,svgRef:e.unref(g),background:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderWidth:t.value.style.tooltip.borderWidth,borderColor:t.value.style.tooltip.borderColor,borderRadius:t.value.style.tooltip.borderRadius,backgroundOpacity:t.value.style.tooltip.backgroundOpacity},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip",e.normalizeProps(e.guardReactiveProps({...d.value})),()=>[e.createTextVNode(e.toDisplayString(d.value.period)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value})),1)],!0)]),_:3},8,["x","y","prevX","prevY","offsetY","svgRef","background","color","fontSize","borderWidth","borderColor","borderRadius","backgroundOpacity"])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X.default,{key:4,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,K))}},_e=D._export_sfc(xe,[["__scopeId","data-v-246ce941"]]);exports.default=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),A=require("./useNestedProp-C8955nsn.cjs"),X=require("./vue-ui-skeleton-Mcoev-5q.cjs"),O=require("./useResponsive-BBkmXXaa.cjs"),H=require("./PackageVersion-BxSGdh6L.cjs"),U=require("./useChartAccessibility-Cm7nkzTG.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={__name:"SparkTooltip",props:{svgRef:{type:Object},x:{type:Number,required:!0},y:{type:Number,required:!0},prevX:{type:Number,required:!0},prevY:{type:Number,required:!0},offsetY:{type:Number,default:0},background:{type:String},backgroundOpacity:{type:Number,default:100},borderRadius:{type:Number,default:2},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#FFFFFF"},color:{type:String},fontSize:{type:Number}},setup(f){const c=f,w=e.toRef(c.svgRef),u=e.ref(null),y=e.ref(0),p=e.ref(0),m=e.ref(!1),V=e.computed(()=>r.setOpacity(c.background,c.backgroundOpacity)),N=async()=>{if(!w.value||!u.value)return;const t=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.x,y:c.y,offsetY:c.offsetY}),g=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.prevX,y:c.prevY,offsetY:c.offsetY});!t||!g||(m.value=!1,y.value=g.top,p.value=g.left,await e.nextTick(),setTimeout(()=>{m.value=!0,y.value=t.top,p.value=t.left},50))};return e.onMounted(N),e.watch(()=>[c.x,c.y,c.prevX,c.prevY],()=>N(),{immediate:!0}),(t,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tooltipRef",ref:u,class:"vue-data-ui-spark-tooltip",style:e.normalizeStyle({position:"fixed",top:`${y.value}px`,left:`${p.value}px`,pointerEvents:"none",background:V.value,color:c.color,fontSize:`${c.fontSize}px`,borderRadius:`${c.borderRadius}px`,border:`${c.borderWidth}px solid ${c.borderColor}`,transition:m.value?"top 0.3s ease-out, left 0.3s ease-out":"none"})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}},J=D._export_sfc(Z,[["__scopeId","data-v-c8e27542"]]),K=["id"],Q=["xmlns","viewBox"],ee=["width","height"],te=["id"],le=["stop-color"],ae=["stop-color"],oe=["id"],re=["stop-color"],ue=["stop-color"],ne=["id"],se=["stop-color"],ie=["stop-color"],de={key:1},ce=["d","fill"],ve=["d","fill"],pe=["d","stroke","stroke-width"],fe=["d","stroke","stroke-width"],ye=["x","y","width","height","fill","rx"],he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ge=["cx","cy","r","fill","stroke","stroke-width"],ke=["x","y","font-size","font-weight","fill"],be=["x","y","height","width","onMouseenter","onClick"],xe={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:c}){const{vue_ui_sparkline:w}=r.useConfig(),u=f,y=e.computed(()=>Array.isArray(u.dataset)&&u.dataset.length>0),p=e.ref(r.createUid()),m=e.ref(null),V=e.ref(null),N=e.ref(null),t=e.computed({get:()=>M(),set:l=>l}),{svgRef:g}=U.useChartAccessibility({config:t.value.style.title});function M(){const l=A.useNestedProp({userConfig:u.config,defaultConfig:w});let o={};return l.theme?o={...A.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||u.config,defaultConfig:l})}:o=l,u.config&&r.hasDeepProperty(u.config,"style.scaleMin")?o.style.scaleMin=u.config.style.scaleMin:o.style.scaleMin=null,u.config&&r.hasDeepProperty(u.config,"style.scaleMax")?o.style.scaleMax=u.config.style.scaleMax:o.style.scaleMax=null,o}const L=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=M(),z(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>u.dataset,l=>{k.value=r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const k=e.ref(W());function W(){return r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(l=>t.value.style.animation.show&&u.dataset.length>1?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const I=e.ref(null);e.onMounted(()=>{if(z(),t.value.style.animation.show&&u.dataset.length>1){let a=function(){o<L.value.length?(k.value.push(L.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):k.value=L.value,o+=1};k.value=[];const l=t.value.style.animation.animationFrames/u.dataset.length;let o=0;a()}});function z(){if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):u.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=O.throttle(()=>{const{width:o,height:a}=O.useResponsive({chart:m.value,title:t.value.style.title.show&&u.showInfo?V.value:null,source:N.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=u.forcedPadding/500*o})});I.value=new ResizeObserver(l),I.value.observe(m.value.parentNode)}}const n=e.ref({height:80*u.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:u.forcedPadding}),$=c,s=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:u.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:u.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),E=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),F=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),B=e.computed(()=>{const l=E.value>=0?0:E.value;return Math.abs(l)}),P=e.computed(()=>F.value+B.value),x=e.computed(()=>s.value.bottom-s.value.height*S(B.value));function S(l){return isNaN(l/P.value)?0:l/P.value}const b=e.computed(()=>L.value.length-1),v=e.computed(()=>k.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0,i=s.value.width/(b.value+1)>n.padding?n.padding:s.value.width/(b.value+1);return{absoluteValue:a,period:l.period,plotValue:a+B.value,toMax:S(a+B.value),x:s.value.start+o*(i>s.value.width/12?s.value.width/12:i),y:s.value.bottom-s.value.height*S(a+B.value),id:`plot_${p.value}_${o}`,color:C.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/b.value)):t.value.style.line.color,width:i>s.value.width/12?s.value.width/12:i}})),q=e.computed(()=>{const l={x:v.value[0].x||0,y:(n.value.height||0)-6},o={x:v.value[v.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return v.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),d=e.ref(void 0),_=e.ref(void 0);function Y(l,o){d.value=l,_.value||(_.value=l),$("hoverIndex",{index:o})}function j(){_.value=d.value,d.value=void 0,$("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(y.value){const l=v.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:v.value[v.value.length-1].absoluteValue,sum:o,average:o/v.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(v.value.map(({x:a,y:i,absoluteValue:T})=>({x:a,y:i,value:T}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),R=e.computed(()=>y.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),C=e.computed(()=>t.value.type&&t.value.type==="bar");function G(l,o){$("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:m,class:"vue-ui-sparkline",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:d.value,latest:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(d.value?d.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:g,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`),onMouseleave:o[0]||(o[0]=a=>_.value=void 0)},[e.createVNode(H._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ee)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ae)],8,te),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ue)],8,oe),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,se),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ie)],8,ne)]),t.value.style.area.show&&!C.value&&v.value[0]?(e.openBlock(),e.createElementBlock("g",de,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${v.value[0].x},${s.value.bottom} ${e.unref(r.createSmoothPath)(v.value)} L ${v.value.at(-1).x},${s.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ce)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${q.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ve))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,pe)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${e.unref(r.createStraightPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[C.value?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x-a.width/2,y:isNaN(a.absoluteValue>0?a.y:x.value)?0:a.absoluteValue>0?a.y:x.value,width:a.width,height:isNaN(Math.abs(a.y-x.value))?0:Math.abs(a.y-x.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${p.value})`:`url(#sparkline_bar_gradient_neg_${p.value})`,rx:t.value.style.bar.borderRadius},null,8,ye)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(d.value&&a.id===d.value.id||f.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:s.value.top-6,y2:s.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,he)):e.createCommentVNode("",!0)]))),256)),E.value<0?(e.openBlock(),e.createElementBlock("line",{key:4,x1:s.value.start,x2:s.value.start+s.value.width-16,y1:e.unref(r.forceValidValue)(x.value,s.value.bottom),y2:e.unref(r.forceValidValue)(x.value,s.value.bottom),stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[d.value&&a.id===d.value.id||f.selectedIndex===i||f.dataset.length===1?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ge)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:s.value.width+12+t.value.style.dataLabel.offsetX,y:n.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(d.value?e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value}):e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,R.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:R.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,ke)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1))/2,y:s.value.top-6,height:s.value.height+6,width:s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1),fill:"transparent",onMouseenter:T=>Y(a,i),onMouseleave:j,onClick:()=>G(a,i)},null,40,be))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],44,Q)):e.createCommentVNode("",!0),d.value&&t.value.style.tooltip.show?(e.openBlock(),e.createBlock(J,{key:2,x:d.value.x,y:d.value.y,prevX:_.value.x,prevY:_.value.y,offsetY:t.value.style.plot.radius*3+t.value.style.tooltip.offsetY,svgRef:e.unref(g),background:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderWidth:t.value.style.tooltip.borderWidth,borderColor:t.value.style.tooltip.borderColor,borderRadius:t.value.style.tooltip.borderRadius,backgroundOpacity:t.value.style.tooltip.backgroundOpacity},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip",e.normalizeProps(e.guardReactiveProps({...d.value})),()=>[e.createTextVNode(e.toDisplayString(d.value.period)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value})),1)],!0)]),_:3},8,["x","y","prevX","prevY","offsetY","svgRef","background","color","fontSize","borderWidth","borderColor","borderRadius","backgroundOpacity"])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X.default,{key:4,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,K))}},_e=D._export_sfc(xe,[["__scopeId","data-v-246ce941"]]);exports.default=_e;
@@ -1,9 +1,9 @@
1
1
  import { toRef as ge, ref as g, computed as f, onMounted as ie, watch as q, createElementBlock as d, openBlock as n, normalizeStyle as z, renderSlot as M, nextTick as be, createCommentVNode as h, createBlock as ee, normalizeProps as te, guardReactiveProps as ae, createElementVNode as b, toDisplayString as P, unref as c, createVNode as me, Fragment as E, renderList as B, withCtx as ke, createTextVNode as xe } from "vue";
2
- import { s as W, a2 as le, u as _e, c as we, a as $e, C as oe, a3 as G, o as Ne, e as ue, g as Le, w as F, a4 as Ce, a5 as Me, X as Se, T as se, S as Ie, a6 as re, i as X, f as j } from "./index-BMcwUsiG.js";
3
- import { u as ne } from "./useNestedProp-DwQWwt5e.js";
4
- import Ve from "./vue-ui-skeleton-BoZyBfQF.js";
2
+ import { s as W, a2 as le, u as _e, c as we, a as $e, C as oe, a3 as G, o as Ne, e as ue, g as Le, w as F, a4 as Ce, a5 as Me, X as Se, T as se, S as Ie, a6 as re, i as X, f as j } from "./index-d3erwTWB.js";
3
+ import { u as ne } from "./useNestedProp-BqKuhIvF.js";
4
+ import Ve from "./vue-ui-skeleton-BOtCpAcY.js";
5
5
  import { t as Re, u as ze } from "./useResponsive-JZ9xq-JV.js";
6
- import { _ as We } from "./PackageVersion-BPCzY_N5.js";
6
+ import { _ as We } from "./PackageVersion-D-aPPO0L.js";
7
7
  import { u as Ae } from "./useChartAccessibility-BWojgys7.js";
8
8
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const Te = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CG-euAJp.cjs"),V=require("./useNestedProp-DYDoE86w.cjs"),U=require("./vue-ui-skeleton-LYOlEoA_.cjs"),M=require("./PackageVersion-B6nxekEz.cjs"),j=require("./Tooltip-eL97y6Ym.cjs"),R=require("./useChartAccessibility-Cm7nkzTG.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),I=["xmlns","viewBox"],W=["id"],Y=["stop-color"],G=["stop-color"],X=["stop-color"],J={id:"stackPill",clipPathUnits:"objectBoundingBox"},K=["fill"],Q={key:0,"clip-path":"url(#stackPill)"},Z=["x","width","height","fill"],ee=["x","width","height","fill","stroke"],te=["onClick","x","width","height","onMouseenter"],le=["width","height","rx"],oe=["onClick"],ae={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},re=["height","width"],ne=["fill"],se={key:4,ref:"source",dir:"auto"},ue={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(P,{emit:D}){const{vue_ui_sparkstackbar:L}=a.useConfig(),u=P,F=e.useSlots();e.onMounted(()=>{F["chart-background"]&&console.warn("VueUiSparkStackbar does not support the #chart-background slot.")});const x=e.computed(()=>!!u.dataset&&u.dataset.length),B=e.ref(null),S=e.ref(a.createUid()),b=e.ref(!1),C=e.ref(""),t=e.computed({get:()=>$(),set:l=>l}),{svgRef:A}=R.useChartAccessibility({config:t.value.style.title});function $(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:L});return l.theme?{...V.useNestedProp({userConfig:a.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>u.config,l=>{t.value=$(),E()},{deep:!0}),e.watch(()=>u.dataset,l=>{p.value=u.dataset.map((n,o)=>({...n,color:n.color?a.convertColorToHex(n.color):f.value[o]||a.palette[o]||a.palette[o%a.palette.length]}))},{deep:!0});const f=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),p=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?a.convertColorToHex(l.color):f.value[n]||a.palette[n]||a.palette[n%a.palette.length]}))),g=e.ref(!0);e.onMounted(()=>{if(E(),t.value.style.animation.show){let v=function(){r+=o/l,r<o?(p.value=p.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length]})),requestAnimationFrame(v)):(g.value=!1,p.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length],id:a.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),o=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;g.value=!0,v()}});function E(){a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(o=>{a.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:o,index:n})})})}const c=e.ref({width:500,height:16}),d=e.ref([]),N=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!d.value.includes(n)).reduce((l,n)=>l+n,0)),y=e.computed(()=>p.value.map((l,n)=>{const o=l.value||0,r=o/N.value,v=isNaN(r)?0:r,s=v*c.value.width;return{...l,value:o,proportion:v,width:s,proportionLabel:a.dataLabel({v:v*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),_=e.computed(()=>y.value.filter((l,n)=>!d.value.includes(n)));function T(l){d.value.includes(l)?d.value=d.value.filter(n=>n!==l):d.value.length<p.value.length-1&&d.value.push(l)}const h=e.computed(()=>{let l=0;const n=[];for(let o=0;o<_.value.length;o+=1)n.push({..._.value[o],start:l}),l+=_.value[o].width;return n}),q=D;function z(l,n){q("selectDatapoint",{datapoint:l,index:n})}const w=e.ref(null),k=e.ref(!1),m=e.ref(null);function O({datapoint:l,seriesIndex:n}){if(!t.value.style.tooltip.show)return;w.value={datapoint:l,seriesIndex:n,config:t.value,series:y.value},b.value=!0,m.value=n;const o=t.value.style.tooltip.customFormat;if(a.isFunction(o))try{const r=o({seriesIndex:n,datapoint:l,series:y.value,config:t.value});typeof r=="string"&&(C.value=r,k.value=!0)}catch{console.warn("Custom format cannot be applied."),k.value=!1}if(!k.value){let r="";r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,r+=`<b>${l.proportionLabel}</b>`,r+=`<span>(${a.applyDataLabel(t.value.style.legend.value.formatter,l.value,a.dataLabel({p:t.value.style.legend.value.prefix,v:l.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:l,seriesIndex:n})})</span>`,C.value=`<div>${r}</div>`}}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-stackbar",ref_key:"sparkstackbarChart",ref:B,style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:A,xmlns:e.unref(a.XMLNS),width:"100%",viewBox:`0 0 ${c.value.width} ${c.value.height}`},[e.createVNode(M._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${S.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,Y),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(o.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,X)],8,W))),128)),e.createElementVNode("clipPath",J,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,K)])]),N.value>0?(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_underlayer_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,Z))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${S.value})`:o.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,ee))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_trap_${r}`,onClick:()=>z(o,r),x:o.start,y:0,width:o.width,height:c.value.height,fill:"transparent",stroke:"none",class:e.normalizeClass({animated:!g.value}),onMouseenter:()=>O({datapoint:o,seriesIndex:r}),onMouseleave:n[0]||(n[0]=v=>{b.value=!1,m.value=null})},null,42,te))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:c.value.width-4,height:c.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(c.value.height-4)/2},null,8,le))],8,I)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(U.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":d.value.includes(r)}),onClick:v=>{T(r),z(o,r)}},[e.createElementVNode("div",ae,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:o.color},null,8,ne)],8,re)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(o.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(d.value.includes(r)?" - ":o.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.legend.value.formatter,o.value,e.unref(a.dataLabel)({p:t.value.style.legend.value.prefix,v:o.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:o,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,oe))),256))],4)):e.createCommentVNode("",!0),e.createVNode(j._sfc_main,{show:b.value&&t.value.style.tooltip.show,parent:B.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,content:C.value,isCustom:k.value,offsetY:-124+t.value.style.tooltip.offsetY,blockShiftY:!0},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),_:3},8,["show","parent","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","content","isCustom","offsetY"]),l.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],4))}},ie=H._export_sfc(ue,[["__scopeId","data-v-7955299f"]]);exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cn2tUOoX.cjs"),V=require("./useNestedProp-C8955nsn.cjs"),U=require("./vue-ui-skeleton-Mcoev-5q.cjs"),M=require("./PackageVersion-BxSGdh6L.cjs"),j=require("./Tooltip-C_H6-uAa.cjs"),R=require("./useChartAccessibility-Cm7nkzTG.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),I=["xmlns","viewBox"],W=["id"],Y=["stop-color"],G=["stop-color"],X=["stop-color"],J={id:"stackPill",clipPathUnits:"objectBoundingBox"},K=["fill"],Q={key:0,"clip-path":"url(#stackPill)"},Z=["x","width","height","fill"],ee=["x","width","height","fill","stroke"],te=["onClick","x","width","height","onMouseenter"],le=["width","height","rx"],oe=["onClick"],ae={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},re=["height","width"],ne=["fill"],se={key:4,ref:"source",dir:"auto"},ue={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(P,{emit:D}){const{vue_ui_sparkstackbar:L}=a.useConfig(),u=P,F=e.useSlots();e.onMounted(()=>{F["chart-background"]&&console.warn("VueUiSparkStackbar does not support the #chart-background slot.")});const x=e.computed(()=>!!u.dataset&&u.dataset.length),B=e.ref(null),S=e.ref(a.createUid()),b=e.ref(!1),C=e.ref(""),t=e.computed({get:()=>$(),set:l=>l}),{svgRef:A}=R.useChartAccessibility({config:t.value.style.title});function $(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:L});return l.theme?{...V.useNestedProp({userConfig:a.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>u.config,l=>{t.value=$(),E()},{deep:!0}),e.watch(()=>u.dataset,l=>{p.value=u.dataset.map((n,o)=>({...n,color:n.color?a.convertColorToHex(n.color):f.value[o]||a.palette[o]||a.palette[o%a.palette.length]}))},{deep:!0});const f=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),p=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?a.convertColorToHex(l.color):f.value[n]||a.palette[n]||a.palette[n%a.palette.length]}))),g=e.ref(!0);e.onMounted(()=>{if(E(),t.value.style.animation.show){let v=function(){r+=o/l,r<o?(p.value=p.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length]})),requestAnimationFrame(v)):(g.value=!1,p.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length],id:a.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),o=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;g.value=!0,v()}});function E(){a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(o=>{a.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:o,index:n})})})}const c=e.ref({width:500,height:16}),d=e.ref([]),N=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!d.value.includes(n)).reduce((l,n)=>l+n,0)),y=e.computed(()=>p.value.map((l,n)=>{const o=l.value||0,r=o/N.value,v=isNaN(r)?0:r,s=v*c.value.width;return{...l,value:o,proportion:v,width:s,proportionLabel:a.dataLabel({v:v*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),_=e.computed(()=>y.value.filter((l,n)=>!d.value.includes(n)));function T(l){d.value.includes(l)?d.value=d.value.filter(n=>n!==l):d.value.length<p.value.length-1&&d.value.push(l)}const h=e.computed(()=>{let l=0;const n=[];for(let o=0;o<_.value.length;o+=1)n.push({..._.value[o],start:l}),l+=_.value[o].width;return n}),q=D;function z(l,n){q("selectDatapoint",{datapoint:l,index:n})}const w=e.ref(null),k=e.ref(!1),m=e.ref(null);function O({datapoint:l,seriesIndex:n}){if(!t.value.style.tooltip.show)return;w.value={datapoint:l,seriesIndex:n,config:t.value,series:y.value},b.value=!0,m.value=n;const o=t.value.style.tooltip.customFormat;if(a.isFunction(o))try{const r=o({seriesIndex:n,datapoint:l,series:y.value,config:t.value});typeof r=="string"&&(C.value=r,k.value=!0)}catch{console.warn("Custom format cannot be applied."),k.value=!1}if(!k.value){let r="";r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,r+=`<b>${l.proportionLabel}</b>`,r+=`<span>(${a.applyDataLabel(t.value.style.legend.value.formatter,l.value,a.dataLabel({p:t.value.style.legend.value.prefix,v:l.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:l,seriesIndex:n})})</span>`,C.value=`<div>${r}</div>`}}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-stackbar",ref_key:"sparkstackbarChart",ref:B,style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:A,xmlns:e.unref(a.XMLNS),width:"100%",viewBox:`0 0 ${c.value.width} ${c.value.height}`},[e.createVNode(M._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${S.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,Y),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(o.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,X)],8,W))),128)),e.createElementVNode("clipPath",J,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,K)])]),N.value>0?(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_underlayer_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,Z))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${S.value})`:o.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,ee))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_trap_${r}`,onClick:()=>z(o,r),x:o.start,y:0,width:o.width,height:c.value.height,fill:"transparent",stroke:"none",class:e.normalizeClass({animated:!g.value}),onMouseenter:()=>O({datapoint:o,seriesIndex:r}),onMouseleave:n[0]||(n[0]=v=>{b.value=!1,m.value=null})},null,42,te))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:c.value.width-4,height:c.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(c.value.height-4)/2},null,8,le))],8,I)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(U.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":d.value.includes(r)}),onClick:v=>{T(r),z(o,r)}},[e.createElementVNode("div",ae,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:o.color},null,8,ne)],8,re)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(o.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(d.value.includes(r)?" - ":o.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.legend.value.formatter,o.value,e.unref(a.dataLabel)({p:t.value.style.legend.value.prefix,v:o.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:o,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,oe))),256))],4)):e.createCommentVNode("",!0),e.createVNode(j._sfc_main,{show:b.value&&t.value.style.tooltip.show,parent:B.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,content:C.value,isCustom:k.value,offsetY:-124+t.value.style.tooltip.offsetY,blockShiftY:!0},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),_:3},8,["show","parent","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","content","isCustom","offsetY"]),l.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],4))}},ie=H._export_sfc(ue,[["__scopeId","data-v-7955299f"]]);exports.default=ie;