vue-data-ui 2.3.85 → 2.3.86

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 (169) hide show
  1. package/dist/{Arrow-JwDgP3de.js → Arrow-CJ7hmWgf.js} +1 -1
  2. package/dist/{Arrow-CLOh6oi7.cjs → Arrow-CebZn6E4.cjs} +1 -1
  3. package/dist/{BaseIcon-BysUnfCR.js → BaseIcon-B9istAKo.js} +1 -1
  4. package/dist/{BaseIcon-BBQHz_Sf.cjs → BaseIcon-DnG75_Ol.cjs} +1 -1
  5. package/dist/{DataTable-pVXaNplZ.cjs → DataTable-BA_BCbHC.cjs} +1 -1
  6. package/dist/{DataTable-MkG5Dqrn.js → DataTable-tSDSY14n.js} +2 -2
  7. package/dist/{Legend-k2mcTp7z.cjs → Legend-BOY57qwA.cjs} +1 -1
  8. package/dist/{Legend-KW7sTwN3.js → Legend-D3hovFqM.js} +1 -1
  9. package/dist/{Shape-COoEWeGM.cjs → Shape-D6jrLLku.cjs} +1 -1
  10. package/dist/{Shape-BFiZBf3X.js → Shape-XiTBfhJM.js} +1 -1
  11. package/dist/{Slicer-CALc-Q4W.js → Slicer-BMvzmCKt.js} +2 -2
  12. package/dist/{Slicer-DCyxUSsn.cjs → Slicer-sZ-DArc4.cjs} +1 -1
  13. package/dist/{Title-BaKZYHEx.cjs → Title-Ahj4TYHa.cjs} +1 -1
  14. package/dist/{Title-ISDbzCH8.js → Title-DJ2FNrSN.js} +1 -1
  15. package/dist/{Tooltip-BHmMXOej.js → Tooltip-CQpXRqRC.js} +1 -1
  16. package/dist/{Tooltip-okAYzo5Y.cjs → Tooltip-XhevgJmm.cjs} +1 -1
  17. package/dist/index-CVgBMJU6.cjs +4 -0
  18. package/dist/{index-BiuHBtkZ.js → index-D2epy0rJ.js} +4 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +3 -0
  21. package/dist/types/vue-data-ui.d.ts +3 -0
  22. package/dist/{useNestedProp-B9yDavuy.cjs → useNestedProp-B-NmF2LO.cjs} +1 -1
  23. package/dist/{useNestedProp-Ck5_RzLu.js → useNestedProp-C_ZrJBd9.js} +1 -1
  24. package/dist/usePrinter-B6qtXaHk.js +527 -0
  25. package/dist/usePrinter-DN-6Hoh5.cjs +1 -0
  26. package/dist/{vue-data-ui-CVYCyzY-.cjs → vue-data-ui-DlNasA0G.cjs} +1 -1
  27. package/dist/{vue-data-ui-CAl2KJv9.js → vue-data-ui-vegY0BJm.js} +57 -57
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/vue-ui-3d-bar-CqRRjlUU.cjs +19 -0
  31. package/dist/{vue-ui-3d-bar-CploAEkY.js → vue-ui-3d-bar-D-0SSMOt.js} +11 -10
  32. package/dist/{vue-ui-accordion-btKAUUTu.cjs → vue-ui-accordion-BaV9R6cy.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-D2fhyKpk.js → vue-ui-accordion-DzTB2FL0.js} +3 -3
  34. package/dist/vue-ui-age-pyramid-Bx4BuL3K.cjs +1 -0
  35. package/dist/{vue-ui-age-pyramid-DkaM5MrK.js → vue-ui-age-pyramid-_eo2DGen.js} +25 -24
  36. package/dist/{vue-ui-annotator-38FBI0Pn.js → vue-ui-annotator-8j2dJ0CU.js} +1 -1
  37. package/dist/{vue-ui-annotator-BMYk78DR.cjs → vue-ui-annotator-CDZtr6tp.cjs} +1 -1
  38. package/dist/{vue-ui-candlestick-CKsjq0Uw.js → vue-ui-candlestick-CsF7OSvJ.js} +12 -11
  39. package/dist/vue-ui-candlestick-NypxP0Uu.cjs +2 -0
  40. package/dist/{vue-ui-carousel-table-DjGaEuM7.js → vue-ui-carousel-table-CMHd2i-6.js} +7 -7
  41. package/dist/{vue-ui-carousel-table-Cx72LlTd.cjs → vue-ui-carousel-table-CV0eVeRd.cjs} +1 -1
  42. package/dist/{vue-ui-chestnut-DAiBfoPN.cjs → vue-ui-chestnut-B9miwyAN.cjs} +2 -2
  43. package/dist/{vue-ui-chestnut-TLyh4dIZ.js → vue-ui-chestnut-CVftKftk.js} +10 -9
  44. package/dist/{vue-ui-cursor-BunDuWpK.cjs → vue-ui-cursor-Bsrt107X.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-B1xa5yua.js → vue-ui-cursor-wujy8n_T.js} +2 -2
  46. package/dist/{vue-ui-dashboard-CMZ736DL.cjs → vue-ui-dashboard-BCN0BhjL.cjs} +1 -1
  47. package/dist/{vue-ui-dashboard-DdcubzWu.js → vue-ui-dashboard-Cvy0gI52.js} +2 -2
  48. package/dist/{vue-ui-digits-z5g__gqs.cjs → vue-ui-digits-CnHgzHPI.cjs} +1 -1
  49. package/dist/{vue-ui-digits-BUpjWWnD.js → vue-ui-digits-J-WrKKHg.js} +2 -2
  50. package/dist/{vue-ui-donut-ZLpfm-XT.js → vue-ui-donut-BOhWcHY_.js} +34 -33
  51. package/dist/vue-ui-donut-CZ1iKZq6.cjs +1 -0
  52. package/dist/{vue-ui-donut-evolution-Bn4asQO3.js → vue-ui-donut-evolution-CSSYuoti.js} +12 -11
  53. package/dist/vue-ui-donut-evolution-DuY2883r.cjs +1 -0
  54. package/dist/{vue-ui-dumbbell-D2R9tJ99.js → vue-ui-dumbbell-Cm0Rp_6W.js} +11 -10
  55. package/dist/{vue-ui-dumbbell-CY6X8J1K.cjs → vue-ui-dumbbell-i9QcsSVO.cjs} +2 -2
  56. package/dist/{vue-ui-flow-Dd5uPNTQ.js → vue-ui-flow-0m7a1NP7.js} +10 -9
  57. package/dist/vue-ui-flow-DXCBGdQT.cjs +1 -0
  58. package/dist/vue-ui-galaxy-D6GyjAnX.cjs +1 -0
  59. package/dist/{vue-ui-galaxy-B7CoWLhj.js → vue-ui-galaxy-DCHEdZAl.js} +12 -11
  60. package/dist/{vue-ui-gauge-CGh_m922.js → vue-ui-gauge-HcM2JJpg.js} +29 -28
  61. package/dist/vue-ui-gauge-wbHQGQro.cjs +1 -0
  62. package/dist/{vue-ui-gizmo-D5Kn7w7L.cjs → vue-ui-gizmo-B-zMyi1m.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-BY3hnKSH.js → vue-ui-gizmo-Bfo_nUnZ.js} +2 -2
  64. package/dist/{vue-ui-heatmap-yYN0u0I6.js → vue-ui-heatmap-CxIHmv0t.js} +41 -40
  65. package/dist/vue-ui-heatmap-Du2vI5Ae.cjs +1 -0
  66. package/dist/{vue-ui-kpi-Q20yM3IP.cjs → vue-ui-kpi-BOe7-M9V.cjs} +1 -1
  67. package/dist/{vue-ui-kpi-B4zr_geL.js → vue-ui-kpi-DibULfkp.js} +3 -3
  68. package/dist/{vue-ui-mini-loader-GFSZofpE.cjs → vue-ui-mini-loader-Bv7l-Kx3.cjs} +1 -1
  69. package/dist/{vue-ui-mini-loader-GImbaGsN.js → vue-ui-mini-loader-qFRhERid.js} +2 -2
  70. package/dist/{vue-ui-molecule-DmrB3kgA.js → vue-ui-molecule-4cIGPnWg.js} +290 -286
  71. package/dist/vue-ui-molecule-eOj3ZjvT.cjs +1 -0
  72. package/dist/{vue-ui-mood-radar-sEkQtzI2.js → vue-ui-mood-radar-BTe21WKk.js} +79 -78
  73. package/dist/vue-ui-mood-radar-tUFqqekd.cjs +1 -0
  74. package/dist/{vue-ui-nested-donuts-DvpZLcYd.js → vue-ui-nested-donuts-BVzabOga.js} +35 -34
  75. package/dist/vue-ui-nested-donuts-BigBLrFR.cjs +17 -0
  76. package/dist/{vue-ui-onion-DQMLPe3M.js → vue-ui-onion-C3TAKqro.js} +12 -11
  77. package/dist/vue-ui-onion-_ZC3vbIS.cjs +5 -0
  78. package/dist/{vue-ui-parallel-coordinate-plot-BBuPdl2K.cjs → vue-ui-parallel-coordinate-plot-BiXGkfj7.cjs} +2 -2
  79. package/dist/{vue-ui-parallel-coordinate-plot-DN2LPNyS.js → vue-ui-parallel-coordinate-plot-CKoCQXqj.js} +13 -12
  80. package/dist/vue-ui-quadrant-B67wGTic.cjs +1 -0
  81. package/dist/{vue-ui-quadrant-D2GpeXI6.js → vue-ui-quadrant-CKnyfJoi.js} +13 -12
  82. package/dist/vue-ui-quick-chart-DEjdx0AB.cjs +15 -0
  83. package/dist/{vue-ui-quick-chart-C5K9DfUV.js → vue-ui-quick-chart-DZDYYnsI.js} +60 -59
  84. package/dist/vue-ui-radar-Cm_QkYGb.cjs +1 -0
  85. package/dist/{vue-ui-radar-B9TZPujK.js → vue-ui-radar-v9yayJxu.js} +13 -12
  86. package/dist/{vue-ui-rating-B0pNsmGB.js → vue-ui-rating-Cc_N7qbe.js} +2 -2
  87. package/dist/{vue-ui-rating-DpxzUDQq.cjs → vue-ui-rating-DV4cCZbB.cjs} +1 -1
  88. package/dist/{vue-ui-relation-circle-DSnlpLHt.js → vue-ui-relation-circle-Clqo4kkb.js} +46 -45
  89. package/dist/{vue-ui-relation-circle-D3B-lpdM.cjs → vue-ui-relation-circle-DcpIVbI6.cjs} +1 -1
  90. package/dist/{vue-ui-rings-BuvFDBXg.js → vue-ui-rings-D27xNq9q.js} +12 -11
  91. package/dist/{vue-ui-rings-cmeFVitd.cjs → vue-ui-rings-DTn3t8Ku.cjs} +2 -2
  92. package/dist/{vue-ui-scatter-D_chvOSJ.js → vue-ui-scatter-C07Mon-6.js} +13 -12
  93. package/dist/vue-ui-scatter-CXbrqLFm.cjs +1 -0
  94. package/dist/{vue-ui-screenshot-DSHeHshf.js → vue-ui-screenshot-CsxqbqlJ.js} +1 -1
  95. package/dist/{vue-ui-screenshot-CwrXLMru.cjs → vue-ui-screenshot-D8TAvQYN.cjs} +1 -1
  96. package/dist/{vue-ui-skeleton-Du4zw-c1.js → vue-ui-skeleton-BLiYyX95.js} +2 -2
  97. package/dist/{vue-ui-skeleton-DJhwv2oY.cjs → vue-ui-skeleton-Br1K3exH.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-BtQLJ7rA.js → vue-ui-smiley-BUHatT3Z.js} +2 -2
  99. package/dist/{vue-ui-smiley-BNkk6suC.cjs → vue-ui-smiley-CR_TkSYT.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DFIjxBTY.cjs → vue-ui-spark-trend-CnUz6s1m.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-BgA79g7a.js → vue-ui-spark-trend-GY2CfYRt.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-BlwQfhlY.cjs → vue-ui-sparkbar-DaFwUA6Z.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-DQAWZReF.js → vue-ui-sparkbar-tdgek1gv.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-CCApU38s.js → vue-ui-sparkgauge-1zu5KmTA.js} +3 -3
  105. package/dist/{vue-ui-sparkgauge-BCRSQDpt.cjs → vue-ui-sparkgauge-D8P01Hem.cjs} +1 -1
  106. package/dist/{vue-ui-sparkhistogram-PKTt4EmH.js → vue-ui-sparkhistogram-b68QStxA.js} +4 -4
  107. package/dist/{vue-ui-sparkhistogram-CTxG1Vtn.cjs → vue-ui-sparkhistogram-mg6yuwLH.cjs} +1 -1
  108. package/dist/{vue-ui-sparkline-BUaixngQ.cjs → vue-ui-sparkline-CAqav9Gn.cjs} +1 -1
  109. package/dist/{vue-ui-sparkline-EESAiZyt.js → vue-ui-sparkline-CMmtp8MK.js} +3 -3
  110. package/dist/{vue-ui-sparkstackbar-TnLNixdf.js → vue-ui-sparkstackbar-Cz8tOM3m.js} +3 -3
  111. package/dist/{vue-ui-sparkstackbar-iQnc0zcO.cjs → vue-ui-sparkstackbar-DOrquZvw.cjs} +1 -1
  112. package/dist/vue-ui-stackbar-DUa5F_Zl.cjs +6 -0
  113. package/dist/{vue-ui-stackbar-Ci04sup3.js → vue-ui-stackbar-DeQkP1dj.js} +13 -12
  114. package/dist/vue-ui-strip-plot-KNL9ToYG.cjs +1 -0
  115. package/dist/{vue-ui-strip-plot-DbvW0BuF.js → vue-ui-strip-plot-vqOCzdFV.js} +12 -11
  116. package/dist/{vue-ui-table-328De4vk.cjs → vue-ui-table-BCdHNku5.cjs} +1 -1
  117. package/dist/{vue-ui-table-CamkBCdL.js → vue-ui-table-DDdVqdHt.js} +1 -1
  118. package/dist/vue-ui-table-heatmap-BJDnZMZN.cjs +1 -0
  119. package/dist/{vue-ui-table-heatmap-D-YdrvGV.js → vue-ui-table-heatmap-DQg_jtYq.js} +27 -26
  120. package/dist/{vue-ui-table-sparkline-Dg2RKv6f.js → vue-ui-table-sparkline-Bg-VFq7X.js} +25 -24
  121. package/dist/{vue-ui-table-sparkline-Cmg7wnQ0.cjs → vue-ui-table-sparkline-D8DJxb5J.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-jWHbZTc2.js → vue-ui-thermometer-CajBbbYc.js} +51 -50
  123. package/dist/vue-ui-thermometer-eYM8DX7u.cjs +1 -0
  124. package/dist/{vue-ui-timer-BPepr5eV.js → vue-ui-timer-D3VRVK-8.js} +4 -4
  125. package/dist/{vue-ui-timer-B_FyRAU7.cjs → vue-ui-timer-RclP4Tql.cjs} +1 -1
  126. package/dist/{vue-ui-tiremarks-DW8Q2IBl.js → vue-ui-tiremarks-BT0k_3xi.js} +48 -47
  127. package/dist/{vue-ui-tiremarks-CaJWlyz8.cjs → vue-ui-tiremarks-Bc8bBBAw.cjs} +1 -1
  128. package/dist/{vue-ui-treemap-B9GpvA0k.cjs → vue-ui-treemap-BjWDt2b2.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-CWu43qLo.js → vue-ui-treemap-DMhe3zCm.js} +13 -12
  130. package/dist/vue-ui-vertical-bar-DWzafNBH.cjs +4 -0
  131. package/dist/{vue-ui-vertical-bar-CndASePh.js → vue-ui-vertical-bar-hH9R9V-K.js} +13 -12
  132. package/dist/{vue-ui-waffle-c9ycdoKz.cjs → vue-ui-waffle-BvYE9hAY.cjs} +1 -1
  133. package/dist/{vue-ui-waffle-CdyqwJwN.js → vue-ui-waffle-DnNd6Iba.js} +46 -45
  134. package/dist/{vue-ui-wheel-Byq_BLhl.js → vue-ui-wheel-Bx9_m-7W.js} +34 -33
  135. package/dist/vue-ui-wheel-CVBmY6h7.cjs +1 -0
  136. package/dist/{vue-ui-word-cloud-BVOcsuMP.cjs → vue-ui-word-cloud-3R-mYkIW.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-BRxN5uFD.js → vue-ui-word-cloud-DUk0Xt8q.js} +10 -9
  138. package/dist/{vue-ui-xy-DgEdZz0O.js → vue-ui-xy-FtaqoNK8.js} +161 -160
  139. package/dist/{vue-ui-xy-canvas-BI7jUOTn.js → vue-ui-xy-canvas-Bp4PTl_E.js} +54 -53
  140. package/dist/{vue-ui-xy-canvas-Td0WNYN0.cjs → vue-ui-xy-canvas-Ctw_3PzN.cjs} +2 -2
  141. package/dist/vue-ui-xy-rX-aml0b.cjs +3 -0
  142. package/package.json +1 -1
  143. package/dist/index-D-vy9N1v.cjs +0 -4
  144. package/dist/usePrinter-Do8KiK5h.js +0 -513
  145. package/dist/usePrinter-P4nLcXX-.cjs +0 -1
  146. package/dist/vue-ui-3d-bar-DlUqKETN.cjs +0 -19
  147. package/dist/vue-ui-age-pyramid-CvSoQ1op.cjs +0 -1
  148. package/dist/vue-ui-candlestick-BJulnyV3.cjs +0 -2
  149. package/dist/vue-ui-donut-TY2Z9Ljx.cjs +0 -1
  150. package/dist/vue-ui-donut-evolution-BEm2dOxe.cjs +0 -1
  151. package/dist/vue-ui-flow-DswsuPwy.cjs +0 -1
  152. package/dist/vue-ui-galaxy-Dxy6jzus.cjs +0 -1
  153. package/dist/vue-ui-gauge-CWd_ol6u.cjs +0 -1
  154. package/dist/vue-ui-heatmap-AUm42a1v.cjs +0 -1
  155. package/dist/vue-ui-molecule-C9FcDH4x.cjs +0 -1
  156. package/dist/vue-ui-mood-radar-CRwStVTV.cjs +0 -1
  157. package/dist/vue-ui-nested-donuts-BcOgxtZV.cjs +0 -17
  158. package/dist/vue-ui-onion-C9v9YjdJ.cjs +0 -5
  159. package/dist/vue-ui-quadrant-ulY-rCMI.cjs +0 -1
  160. package/dist/vue-ui-quick-chart-DFj17h6h.cjs +0 -15
  161. package/dist/vue-ui-radar-KA287Tp-.cjs +0 -1
  162. package/dist/vue-ui-scatter-BWPqoSUN.cjs +0 -1
  163. package/dist/vue-ui-stackbar-Rrcyg4CC.cjs +0 -6
  164. package/dist/vue-ui-strip-plot-CowHumiU.cjs +0 -1
  165. package/dist/vue-ui-table-heatmap-CCHre3Gt.cjs +0 -1
  166. package/dist/vue-ui-thermometer-BDeKErC9.cjs +0 -1
  167. package/dist/vue-ui-vertical-bar-a_41JdIn.cjs +0 -4
  168. package/dist/vue-ui-wheel-B3BMfKmd.cjs +0 -1
  169. package/dist/vue-ui-xy-CsS5ny0q.cjs +0 -3
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-D-vy9N1v.cjs"),V=require("./html2canvas.esm-BA_v9SIU.cjs"),U={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(z,{expose:T,emit:H}){const C=z,{vue_ui_screenshot:B}=k.useConfig(),$=i.ref(`vue-ui-screenshot-${Math.random()}`),n=i.computed(()=>{if(!Object.keys(C.config||{}).length)return B;const e=k.treeShake({defaultConfig:B,userConfig:C.config});return k.convertConfigColors(e)}),a=i.ref(null),d=i.ref(null),v=i.ref(null),M=i.ref(null),S=i.ref(null),y=i.ref(null),h=i.ref(null),p=i.ref(null),f=i.ref(null),b=i.ref(null),x=i.ref(null),w=i.ref(!1),I=i.ref(null);function R(){const e=document.createElement("DIV"),{innerWidth:t,innerHeight:l}=window;return e.style.position="fixed",e.style.top=`${l?l/2-n.value.style.captureArea.initialHeight/2:200}px`,e.style.left=`${t?t/2-n.value.style.captureArea.initialWidth/2:100}px`,e.style.width=`${n.value.style.captureArea.initialWidth}px`,e.style.height=`${n.value.style.captureArea.initialHeight}px`,e.style.background=n.value.style.captureArea.background,e.style.cursor="move",e.style.boxSizing="border-box",e.style.border=n.value.style.captureArea.border,e.style.resize="both",e.style.padding="none !important",e.style.margin="none !important",e.dataset.cy="screenshot-overlay",e}function E(){a.value&&(clearTimeout(I.value),a.value.remove(),a.value=null)}function W(e){const t=document.createElement("DIV");t.classList.add("vue-ui-screenshot-info-text"),t.innerHTML=n.value.translations.info,t.dataset.html2canvasIgnore="true",t.dataset.cy="screenshot-info-text",t.style.background=n.value.style.info.background,t.style.color=n.value.style.info.color,t.style.fontWeight=n.value.style.info.bold?"bold":"normal",t.style.minWidth=`${n.value.style.info.minWidth}px`,t.style.left="50%",t.style.padding=`${n.value.style.info.padding}px`,t.style.position="absolute",t.style.textAlign="center",t.style.top=`${n.value.style.info.top}px`,t.style.transform="translateX(-50%)",t.style.borderRadius=`${n.value.style.info.borderRadius}px`,t.style.boxShadow=n.value.style.info.boxShadow,t.style.fontFamily=n.value.style.info.fontFamily,t.style.fontSize=`${n.value.style.info.fontSize}px`,t.style.border=n.value.style.info.border,t.style.userSelect="none";const l=document.createElement("BUTTON");l.classList.add("vue-ui-screenshot-close-button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',l.style.outline="none",l.dataset.cy="screenshot-close-button",l.style.display="flex",l.style.cursor="pointer",l.style.borderRadius="50%",l.style.alignItems="center",l.style.position="absolute",l.style.justifyContent="center",l.style.transformOrigin="center",l.style.top=`${n.value.style.cancelButton.top}px`,l.style.right=`${n.value.style.cancelButton.right}px`,l.style.background=n.value.style.cancelButton.background,l.style.color=n.value.style.cancelButton.color,l.style.border=n.value.style.cancelButton.border,l.style.borderRadius=`${n.value.style.cancelButton.borderRadius}px`,l.style.height=`${n.value.style.cancelButton.size}px`,l.style.width=`${n.value.style.cancelButton.size}px`,l.addEventListener("click",E),t.appendChild(l),e.appendChild(t)}function X(e){a.value&&(w.value=!0,e.touches?(y.value=e.touches[0].clientX,h.value=e.touches[0].clientY):(y.value=e.clientX,h.value=e.clientY),b.value=a.value.getBoundingClientRect().width,x.value=a.value.getBoundingClientRect().height,e.target.addEventListener("mousemove",L),e.target.addEventListener("touchmove",L))}function L(e){if(!a.value)return;let t,l;e.touches?(p.value=e.touches[0].clientX,t=e.touches[0].clientX,f.value=e.touches[0].clientY,l=e.touches[0].clientY):(p.value=e.clientX,t=e.clientX,f.value=e.clientY,l=e.clientY);const u=e.target.classList[0],o=a.value.style;switch(!0){case u==="vue-ui-screenshot-handle-nw":o.top=`${l}px`,o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(h.value-f.value)}px`;break;case u==="vue-ui-screenshot-handle-ne":o.top=`${l}px`,o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(h.value-f.value)}px`;break;case u==="vue-ui-screenshot-handle-sw":o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(f.value-h.value)}px`;break;case u==="vue-ui-screenshot-handle-se":o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(f.value-h.value)}px`;break}}function A(e){if(!a.value)return;e.stopPropagation();const t=Array.from(e.target.classList);t.includes("vue-ui-screenshot-handle-se")||t.includes("vue-ui-screenshot-handle-sw")||t.includes("vue-ui-screenshot-handle-nw")||t.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,a.value.style.pointerEvents="auto",e.touches?(d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(d.value=e.clientX,v.value=e.clientY),M.value=d.value,S.value=v.value,document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",m),document.addEventListener("touchend",m))}function m(){d.value=null,v.value=null,M.value=null,S.value=null,w.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",m),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",m)}function g(e){if(!a.value)return;const t=a.value.getBoundingClientRect();let l,u;e.touches?(l=e.touches[0].clientX-d.value,u=e.touches[0].clientY-v.value,d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(l=e.clientX-d.value,u=e.clientY-v.value,d.value=e.clientX,v.value=e.clientY),a.value.style.top=`${t.top+u}px`,a.value.style.left=`${t.left+l}px`}function Y(e){e.target.removeEventListener("mousemove",L),e.target.removeEventListener("touchmove",L),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",m),document.removeEventListener("touchend",m),w.value=!1}function D(){const e=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}function O(){const e=document.getElementById(`vue-ui-screenshot-button-${$.value}`);e.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-CVgBMJU6.cjs"),V=require("./html2canvas.esm-BA_v9SIU.cjs"),U={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(z,{expose:T,emit:H}){const C=z,{vue_ui_screenshot:B}=k.useConfig(),$=i.ref(`vue-ui-screenshot-${Math.random()}`),n=i.computed(()=>{if(!Object.keys(C.config||{}).length)return B;const e=k.treeShake({defaultConfig:B,userConfig:C.config});return k.convertConfigColors(e)}),a=i.ref(null),d=i.ref(null),v=i.ref(null),M=i.ref(null),S=i.ref(null),y=i.ref(null),h=i.ref(null),p=i.ref(null),f=i.ref(null),b=i.ref(null),x=i.ref(null),w=i.ref(!1),I=i.ref(null);function R(){const e=document.createElement("DIV"),{innerWidth:t,innerHeight:l}=window;return e.style.position="fixed",e.style.top=`${l?l/2-n.value.style.captureArea.initialHeight/2:200}px`,e.style.left=`${t?t/2-n.value.style.captureArea.initialWidth/2:100}px`,e.style.width=`${n.value.style.captureArea.initialWidth}px`,e.style.height=`${n.value.style.captureArea.initialHeight}px`,e.style.background=n.value.style.captureArea.background,e.style.cursor="move",e.style.boxSizing="border-box",e.style.border=n.value.style.captureArea.border,e.style.resize="both",e.style.padding="none !important",e.style.margin="none !important",e.dataset.cy="screenshot-overlay",e}function E(){a.value&&(clearTimeout(I.value),a.value.remove(),a.value=null)}function W(e){const t=document.createElement("DIV");t.classList.add("vue-ui-screenshot-info-text"),t.innerHTML=n.value.translations.info,t.dataset.html2canvasIgnore="true",t.dataset.cy="screenshot-info-text",t.style.background=n.value.style.info.background,t.style.color=n.value.style.info.color,t.style.fontWeight=n.value.style.info.bold?"bold":"normal",t.style.minWidth=`${n.value.style.info.minWidth}px`,t.style.left="50%",t.style.padding=`${n.value.style.info.padding}px`,t.style.position="absolute",t.style.textAlign="center",t.style.top=`${n.value.style.info.top}px`,t.style.transform="translateX(-50%)",t.style.borderRadius=`${n.value.style.info.borderRadius}px`,t.style.boxShadow=n.value.style.info.boxShadow,t.style.fontFamily=n.value.style.info.fontFamily,t.style.fontSize=`${n.value.style.info.fontSize}px`,t.style.border=n.value.style.info.border,t.style.userSelect="none";const l=document.createElement("BUTTON");l.classList.add("vue-ui-screenshot-close-button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',l.style.outline="none",l.dataset.cy="screenshot-close-button",l.style.display="flex",l.style.cursor="pointer",l.style.borderRadius="50%",l.style.alignItems="center",l.style.position="absolute",l.style.justifyContent="center",l.style.transformOrigin="center",l.style.top=`${n.value.style.cancelButton.top}px`,l.style.right=`${n.value.style.cancelButton.right}px`,l.style.background=n.value.style.cancelButton.background,l.style.color=n.value.style.cancelButton.color,l.style.border=n.value.style.cancelButton.border,l.style.borderRadius=`${n.value.style.cancelButton.borderRadius}px`,l.style.height=`${n.value.style.cancelButton.size}px`,l.style.width=`${n.value.style.cancelButton.size}px`,l.addEventListener("click",E),t.appendChild(l),e.appendChild(t)}function X(e){a.value&&(w.value=!0,e.touches?(y.value=e.touches[0].clientX,h.value=e.touches[0].clientY):(y.value=e.clientX,h.value=e.clientY),b.value=a.value.getBoundingClientRect().width,x.value=a.value.getBoundingClientRect().height,e.target.addEventListener("mousemove",L),e.target.addEventListener("touchmove",L))}function L(e){if(!a.value)return;let t,l;e.touches?(p.value=e.touches[0].clientX,t=e.touches[0].clientX,f.value=e.touches[0].clientY,l=e.touches[0].clientY):(p.value=e.clientX,t=e.clientX,f.value=e.clientY,l=e.clientY);const u=e.target.classList[0],o=a.value.style;switch(!0){case u==="vue-ui-screenshot-handle-nw":o.top=`${l}px`,o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(h.value-f.value)}px`;break;case u==="vue-ui-screenshot-handle-ne":o.top=`${l}px`,o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(h.value-f.value)}px`;break;case u==="vue-ui-screenshot-handle-sw":o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(f.value-h.value)}px`;break;case u==="vue-ui-screenshot-handle-se":o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(f.value-h.value)}px`;break}}function A(e){if(!a.value)return;e.stopPropagation();const t=Array.from(e.target.classList);t.includes("vue-ui-screenshot-handle-se")||t.includes("vue-ui-screenshot-handle-sw")||t.includes("vue-ui-screenshot-handle-nw")||t.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,a.value.style.pointerEvents="auto",e.touches?(d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(d.value=e.clientX,v.value=e.clientY),M.value=d.value,S.value=v.value,document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",m),document.addEventListener("touchend",m))}function m(){d.value=null,v.value=null,M.value=null,S.value=null,w.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",m),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",m)}function g(e){if(!a.value)return;const t=a.value.getBoundingClientRect();let l,u;e.touches?(l=e.touches[0].clientX-d.value,u=e.touches[0].clientY-v.value,d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(l=e.clientX-d.value,u=e.clientY-v.value,d.value=e.clientX,v.value=e.clientY),a.value.style.top=`${t.top+u}px`,a.value.style.left=`${t.left+l}px`}function Y(e){e.target.removeEventListener("mousemove",L),e.target.removeEventListener("touchmove",L),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",m),document.removeEventListener("touchend",m),w.value=!1}function D(){const e=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}function O(){const e=document.getElementById(`vue-ui-screenshot-button-${$.value}`);e.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
2
2
  <path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
3
3
  </svg>`,document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),e.classList.add("loading"),e.setAttribute("disabled","true")}function _(){if(!a.value)return;O();const e=a.value.getBoundingClientRect();I.value=setTimeout(()=>{V.default(document.body,{allowTaint:!0,width:e.width,height:e.height,x:e.left+window.scrollX,y:e.top+window.scrollY,useCORS:!0,scale:n.value.quality}).then(t=>{const l=t.toDataURL("image/png",1),u=l.split(",")[1],c=atob(u).length/1024;if(n.value.mode==="download"){const s=document.createElement("a");s.download="screenshot.png",s.href=l,s.click()}n.value.mode==="post"&&H("postImage",{createdAt:Date.now(),fileSize:`${c.toFixed(2)} KB`,image:l,x:e.left+window.scrollX,y:e.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:D()})}).finally(E)},10)}function F(e){const t=n.value.style.handles.size/2+4,l=document.createElement("DIV");l.style.top=`${-t}px`,l.style.left=`${-t}px`,l.style.cursor="nw-resize",l.classList.add("vue-ui-screenshot-handle-nw"),l.dataset.cy="screenshot-handle-nw";const u=document.createElement("DIV");u.style.top=`${-t}px`,u.style.left="auto",u.style.right=`${-t}px`,u.style.cursor="ne-resize",u.classList.add("vue-ui-screenshot-handle-ne"),u.dataset.cy="screenshot-handle-ne";const o=document.createElement("DIV");o.style.top="auto",o.style.bottom=`${-t}px`,o.style.left=`${-t}px`,o.style.cursor="sw-resize",o.classList.add("vue-ui-screenshot-handle-sw"),o.dataset.cy="screenshot-handle-sw";const c=document.createElement("DIV");c.style.top="auto",c.style.left="auto",c.style.right=`${-t}px`,c.style.bottom=`${-t}px`,c.style.cursor="se-resize",c.classList.add("vue-ui-screenshot-handle-se"),c.dataset.cy="screenshot-handle-se";const s=document.createElement("BUTTON");s.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`,s.classList.add("vue-ui-screenshot-capture-button"),s.id=`vue-ui-screenshot-button-${$.value}`,s.style.position="absolute",s.style.top="50%",s.style.left="50%",s.style.transform="translate(-50%,-50%)",s.style.background=n.value.style.captureButton.background,s.style.color=n.value.style.captureButton.color,s.style.border=n.value.style.captureButton.border,s.style.outline="none",s.style.cursor="pointer",s.style.padding=n.value.style.captureButton.padding,s.style.fontFamily=n.value.style.captureButton.fontFamily,s.style.fontSize=`${n.value.style.captureButton.fontSize}px`,s.style.minHeight=`${n.value.style.captureButton.minHeight}px`,s.style.width="fit-content",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="center",s.style.gap="3px",s.style.borderRadius=`${n.value.style.captureButton.borderRadius}px`,s.style.boxShadow=n.value.style.captureButton.boxShadow,s.style.userSelect="none",s.style.opacity="0.95",s.style.textAlign="left",s.style.fontWeight=n.value.style.captureButton.bold?"bold":"normal",s.dataset.cy="screenshot-save-button",s.addEventListener("mouseenter",()=>{s.style.opacity="1"}),s.addEventListener("mouseleave",()=>{s.style.opacity="0.95"}),s.addEventListener("click",_),e.appendChild(s),[l,u,o,c].forEach((r,N)=>{r.classList.add(`handle-${N}`),r.dataset.html2canvasIgnore="true",r.style.position="absolute",r.style.height=`${n.value.style.handles.size}px`,r.style.width=`${n.value.style.handles.size}px`,r.style.background=n.value.style.handles.background,r.style.border=n.value.style.handles.border,r.style.borderRadius=`${n.value.style.handles.borderRadius}px`,r.style.pointerEvents="auto !important",r.addEventListener("mousedown",X),r.addEventListener("touchstart",X),e.appendChild(r)})}function j(){a.value||i.nextTick(()=>{const e=R();e.dataset.html2canvasIgnore=!0,W(e),F(e),a.value=e,e.addEventListener("touchmove",function(t){t.preventDefault()},{passive:!1}),document.body.appendChild(e),document.addEventListener("mousedown",A),document.addEventListener("touchstart",A),document.addEventListener("mouseup",Y),document.addEventListener("touchend",Y)})}return T({shoot:j,close:E}),(e,t)=>(i.openBlock(),i.createElementBlock("div"))}};exports.default=U;
@@ -1,6 +1,6 @@
1
1
  import { ref as g, computed as x, openBlock as e, createElementBlock as o, normalizeClass as Z, normalizeStyle as n, unref as s, createElementVNode as t, createCommentVNode as a, Fragment as d, renderList as y, pushScopeId as N, popScopeId as F, createStaticVNode as $ } from "vue";
2
- import { u as O, N as A, X as u, s as h, T as X } from "./index-BiuHBtkZ.js";
3
- import { u as T } from "./useNestedProp-Ck5_RzLu.js";
2
+ import { u as O, N as A, X as u, s as h, T as X } from "./index-D2epy0rJ.js";
3
+ import { u as T } from "./useNestedProp-C_ZrJBd9.js";
4
4
  import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const _ = (w) => (N("data-v-aa0182c9"), w = w(), F(), w), G = ["id"], R = ["xmlns"], Y = ["stroke", "fill"], D = ["xmlns"], U = ["stroke", "fill"], J = ["xmlns"], K = ["stroke"], Q = ["fill"], ll = ["stroke", "fill"], tl = ["stroke", "fill"], el = ["fill"], ol = ["stroke", "fill"], sl = ["stroke", "fill"], rl = ["fill"], il = ["stroke", "fill"], nl = ["stroke", "fill"], al = ["fill"], ul = ["stroke", "fill"], cl = ["stroke", "fill"], dl = ["fill"], hl = ["stroke", "fill"], yl = ["stroke", "fill"], kl = ["xmlns"], vl = ["stroke"], _l = ["stroke"], xl = ["stroke", "fill"], pl = ["stroke", "fill"], gl = ["stroke", "fill"], wl = ["stroke", "fill"], fl = ["stroke", "fill"], ml = ["stroke", "fill"], bl = ["stroke", "fill"], Ml = ["stroke", "fill"], Cl = ["stroke", "fill"], Ll = ["stroke", "fill"], Al = ["stroke", "fill"], $l = ["stroke", "fill"], Bl = ["stroke", "fill"], Wl = ["stroke", "fill"], jl = ["stroke", "fill"], Pl = ["stroke", "fill"], zl = ["stroke", "fill"], ql = ["stroke", "fill"], Hl = ["stroke", "fill"], Sl = ["stroke", "fill"], El = ["stroke", "fill"], Il = ["stroke", "fill"], Zl = ["stroke", "fill"], Nl = ["xmlns"], Fl = ["stroke"], Ol = ["xmlns"], Xl = ["stroke"], Tl = ["xmlns"], Vl = ["stroke"], Gl = ["xmlns"], Rl = ["fill"], Yl = ["fill"], Dl = ["fill"], Ul = ["fill"], Jl = ["fill"], Kl = ["fill"], Ql = ["fill"], lt = ["fill"], tt = ["fill"], et = ["fill"], ot = ["fill"], st = ["fill"], rt = ["xmlns"], it = ["stroke"], nt = ["stroke"], at = ["stroke"], ut = ["stroke"], ct = ["stroke"], dt = ["stroke"], ht = ["xmlns"], yt = ["stroke"], kt = ["stroke"], vt = ["stroke"], _t = ["stroke"], xt = ["stroke"], pt = ["stroke"], gt = ["stroke"], wt = ["stroke"], ft = ["stroke"], mt = ["xmlns"], bt = ["stroke"], Mt = ["xmlns"], Ct = ["stroke"], Lt = ["stroke"], At = ["stroke"], $t = ["stroke"], Bt = ["stroke"], Wt = ["stroke"], jt = ["stroke"], Pt = ["stroke"], zt = ["stroke"], qt = ["xmlns"], Ht = ["x1", "x2", "stroke"], St = ["xmlns"], Et = ["x", "y", "width", "height", "fill"], It = ["y", "width", "height", "fill"], Zt = ["xmlns"], Nt = ["fill"], Ft = ["fill"], Ot = ["fill"], Xt = ["xmlns"], Tt = ["x1", "x2", "y1", "y2", "stroke"], Vt = ["stroke"], Gt = ["fill"], Rt = ["xmlns"], Yt = ["fill"], Dt = ["fill"], Ut = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], Jt = ["xmlns"], Kt = { key: 0 }, Qt = ["stroke", "stroke-width"], le = ["stroke", "stroke-width"], te = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ee = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], oe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], se = ["x", "y", "height", "width", "fill"], re = ["xmlns", "viewBox"], ie = ["x", "y", "stroke", "fill"], ne = ["xmlns"], ae = ["d", "stroke"], ue = ["cx", "cy", "r", "fill", "stroke"], ce = ["cx", "cy", "r", "fill", "stroke"], de = ["x", "y", "width", "fill"], he = ["cx", "cy", "fill"], ye = ["cx", "cy", "fill"], ke = ["stroke"], ve = ["xmlns"], _e = ["stroke", "stroke-width"], xe = ["stroke", "stroke-width"], pe = ["stroke", "stroke-width"], ge = ["fill"], we = ["fill"], fe = ["fill"], me = ["fill"], be = ["fill"], Me = ["fill"], Ce = ["xmlns"], Le = { key: 0 }, Ae = ["stroke", "stroke-width"], $e = ["stroke", "stroke-width"], Be = ["stroke", "stroke-width"], We = { key: 1 }, je = ["r", "fill"], Pe = ["r", "fill"], ze = ["xmlns"], qe = { key: 0 }, He = ["stroke", "stroke-width"], Se = ["stroke", "stroke-width"], Ee = ["fill", "rx", "x", "y", "width", "height"], Ie = ["xmlns"], Ze = ["stroke-width", "stroke"], Ne = ["stroke-width", "stroke"], Fe = ["stroke-width", "stroke"], Oe = ["xmlns"], Xe = ["stroke"], Te = ["stroke"], Ve = ["stroke"], Ge = ["stroke"], Re = ["fill"], Ye = ["stroke"], De = ["xmlns"], Ue = ["stroke", "stroke-width"], Je = ["stroke", "stroke-width"], Ke = ["fill", "r"], Qe = ["fill", "r"], lo = ["fill", "r"], to = ["fill", "r"], eo = ["fill", "r"], oo = ["fill", "r"], so = ["fill", "r"], ro = ["fill", "r"], io = ["fill", "r"], no = ["xmlns"], ao = ["d", "stroke", "stroke-width"], uo = ["d", "stroke", "stroke-width"], co = ["d", "stroke", "stroke-width"], ho = ["d", "stroke", "stroke-width"], yo = ["stroke", "stroke-width"], ko = ["stroke", "stroke-width"], vo = ["stroke", "stroke-width"], _o = ["fill"], xo = ["fill"], po = ["xmlns"], go = ["x", "y", "fill"], wo = ["x", "y", "fill"], fo = ["x", "y", "fill"], mo = ["xmlns"], bo = ["fill"], Mo = ["fill"], Co = ["y1", "y2", "stroke", "stroke-width"], Lo = ["x1", "x2", "stroke", "stroke-width"], Ao = ["xmlns", "stroke"], $o = /* @__PURE__ */ _(() => /* @__PURE__ */ t("path", {
6
6
  stroke: "none",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-D-vy9N1v.cjs"),M=require("./useNestedProp-B9yDavuy.cjs"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c=d=>(e.pushScopeId("data-v-aa0182c9"),d=d(),e.popScopeId(),d),C=["id"],L=["xmlns"],S=["stroke","fill"],z=["xmlns"],A=["stroke","fill"],$=["xmlns"],W=["stroke"],P=["fill"],X=["stroke","fill"],j=["stroke","fill"],F=["fill"],O=["stroke","fill"],q=["stroke","fill"],H=["fill"],I=["stroke","fill"],Z=["stroke","fill"],T=["fill"],G=["stroke","fill"],R=["stroke","fill"],Y=["fill"],D=["stroke","fill"],U=["stroke","fill"],J=["xmlns"],K=["stroke"],Q=["stroke"],ee=["stroke","fill"],te=["stroke","fill"],le=["stroke","fill"],oe=["stroke","fill"],re=["stroke","fill"],ne=["stroke","fill"],se=["stroke","fill"],ae=["stroke","fill"],ce=["stroke","fill"],ie=["stroke","fill"],de=["stroke","fill"],ue=["stroke","fill"],ke=["stroke","fill"],ye=["stroke","fill"],he=["stroke","fill"],me=["stroke","fill"],ve=["stroke","fill"],pe=["stroke","fill"],_e=["stroke","fill"],xe=["stroke","fill"],ge=["stroke","fill"],fe=["stroke","fill"],we=["stroke","fill"],Ee=["xmlns"],Ne=["stroke"],Be=["xmlns"],Ve=["stroke"],Me=["xmlns"],be=["stroke"],Ce=["xmlns"],Le=["fill"],Se=["fill"],ze=["fill"],Ae=["fill"],$e=["fill"],We=["fill"],Pe=["fill"],Xe=["fill"],je=["fill"],Fe=["fill"],Oe=["fill"],qe=["fill"],He=["xmlns"],Ie=["stroke"],Ze=["stroke"],Te=["stroke"],Ge=["stroke"],Re=["stroke"],Ye=["stroke"],De=["xmlns"],Ue=["stroke"],Je=["stroke"],Ke=["stroke"],Qe=["stroke"],et=["stroke"],tt=["stroke"],lt=["stroke"],ot=["stroke"],rt=["stroke"],nt=["xmlns"],st=["stroke"],at=["xmlns"],ct=["stroke"],it=["stroke"],dt=["stroke"],ut=["stroke"],kt=["stroke"],yt=["stroke"],ht=["stroke"],mt=["stroke"],vt=["stroke"],pt=["xmlns"],_t=["x1","x2","stroke"],xt=["xmlns"],gt=["x","y","width","height","fill"],ft=["y","width","height","fill"],wt=["xmlns"],Et=["fill"],Nt=["fill"],Bt=["fill"],Vt=["xmlns"],Mt=["x1","x2","y1","y2","stroke"],bt=["stroke"],Ct=["fill"],Lt=["xmlns"],St=["fill"],zt=["fill"],At=["x1","y1","x2","y2","stroke-width","stroke"],$t=["xmlns"],Wt={key:0},Pt=["stroke","stroke-width"],Xt=["stroke","stroke-width"],jt=["x1","x2","y1","y2","stroke","stroke-width"],Ft=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x","y","height","width","fill"],Ht=["xmlns","viewBox"],It=["x","y","stroke","fill"],Zt=["xmlns"],Tt=["d","stroke"],Gt=["cx","cy","r","fill","stroke"],Rt=["cx","cy","r","fill","stroke"],Yt=["x","y","width","fill"],Dt=["cx","cy","fill"],Ut=["cx","cy","fill"],Jt=["stroke"],Kt=["xmlns"],Qt=["stroke","stroke-width"],el=["stroke","stroke-width"],tl=["stroke","stroke-width"],ll=["fill"],ol=["fill"],rl=["fill"],nl=["fill"],sl=["fill"],al=["fill"],cl=["xmlns"],il={key:0},dl=["stroke","stroke-width"],ul=["stroke","stroke-width"],kl=["stroke","stroke-width"],yl={key:1},hl=["r","fill"],ml=["r","fill"],vl=["xmlns"],pl={key:0},_l=["stroke","stroke-width"],xl=["stroke","stroke-width"],gl=["fill","rx","x","y","width","height"],fl=["xmlns"],wl=["stroke-width","stroke"],El=["stroke-width","stroke"],Nl=["stroke-width","stroke"],Bl=["xmlns"],Vl=["stroke"],Ml=["stroke"],bl=["stroke"],Cl=["stroke"],Ll=["fill"],Sl=["stroke"],zl=["xmlns"],Al=["stroke","stroke-width"],$l=["stroke","stroke-width"],Wl=["fill","r"],Pl=["fill","r"],Xl=["fill","r"],jl=["fill","r"],Fl=["fill","r"],Ol=["fill","r"],ql=["fill","r"],Hl=["fill","r"],Il=["fill","r"],Zl=["xmlns"],Tl=["d","stroke","stroke-width"],Gl=["d","stroke","stroke-width"],Rl=["d","stroke","stroke-width"],Yl=["d","stroke","stroke-width"],Dl=["stroke","stroke-width"],Ul=["stroke","stroke-width"],Jl=["stroke","stroke-width"],Kl=["fill"],Ql=["fill"],eo=["xmlns"],to=["x","y","fill"],lo=["x","y","fill"],oo=["x","y","fill"],ro=["xmlns"],no=["fill"],so=["fill"],ao=["y1","y2","stroke","stroke-width"],co=["x1","x2","stroke","stroke-width"],io=["xmlns","stroke"],uo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ko=["fill"],yo=["xmlns","stroke"],ho=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 10l.01 0" data-v-aa0182c9></path><path d="M15 10l.01 0" data-v-aa0182c9></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-aa0182c9></path>',5),mo=[ho],vo=["xmlns","stroke"],po=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),_o=["fill"],xo=["xmlns","stroke"],go=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 10l.01 0" data-v-aa0182c9></path><path d="M15 10l.01 0" data-v-aa0182c9></path><path d="M9 15l6 0" data-v-aa0182c9></path>',5),fo=[go],wo=["xmlns","stroke"],Eo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),No=["fill"],Bo=["xmlns","stroke"],Vo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Mo=c(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),bo=c(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Co=c(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Lo=[Vo,Mo,bo,Co],So=["xmlns","stroke"],zo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ao=["fill"],$o=["xmlns","stroke"],Wo=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 10l.01 0" data-v-aa0182c9></path><path d="M15 10l.01 0" data-v-aa0182c9></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-aa0182c9></path>',5),Po=[Wo],Xo=["xmlns","stroke"],jo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Fo=["fill"],Oo=["xmlns","stroke"],qo=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 9l.01 0" data-v-aa0182c9></path><path d="M15 9l.01 0" data-v-aa0182c9></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-aa0182c9></path>',5),Ho=[qo],Io=["xmlns"],Zo=["points","fill","stroke","stroke-width"],To=["xmlns"],Go={key:0},Ro=["stroke","stroke-width"],Yo=["y","width","fill","rx"],Do={__name:"vue-ui-skeleton",props:{config:{type:Object,default(){return{}}}},setup(d){const p=d,{vue_ui_skeleton:_}=l.useConfig(),x=e.ref(`vue-ui-skeleton-${Math.random()}`),t=e.computed(()=>M.useNestedProp({userConfig:p.config,defaultConfig:_})),g=e.computed(()=>t.value.style.animated),n=e.computed(()=>t.value.type),f=e.ref([60,50,55,36,40,25,26,12]),w=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:40,sides:6}).path),E=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:30,sides:6}).path),N=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:20,sides:6}).path),B=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:10,sides:6}).path),k=e.ref([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),s=e.ref([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),u=e.ref([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),y=e.ref([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function h(i,m=1){return{x:200+160*Math.cos(29.85+i*Math.PI/180)*m,y:200+160*Math.sin(29.85+i*Math.PI/180)*m}}const V=e.computed(()=>{const i=[];for(let o=0;o<100;o+=1)i.push({x1:h(360/100*o).x,y1:h(360/100*o).y,x2:h(360/100*o,.9).x,y2:h(360/100*o,.9).y,color:t.value.style.wheel.color});return i});return(i,m)=>(e.openBlock(),e.createElementBlock("div",{id:x.value,class:e.normalizeClass({"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":g.value}),style:e.normalizeStyle(`background:${t.value.style.backgroundColor};color:${t.value.style.color};display:flex;align-items:center;justify-content:center;`)},[n.value==="flow"?(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 8 L 28 12 L 52 9 L 75 8 L 75 12 L 52 12 L 28 21 L 5 29 Z M 5 34 L 28 35 L 52 24 L 75 21 L 75 27 L 52 30 L 28 44 L 52 39 L 75 41 L 75 47 L 52 45 L 28 52 L 5 52 Z",stroke:t.value.style.flow.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.flow.color},null,8,S)],12,L)):e.createCommentVNode("",!0),n.value==="parallelCoordinatePlot"?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 10 A 1 1 0 0 0 5 12 A 1 1 0 0 0 5 10 M 28 15 A 1 1 0 0 0 28 17 A 1 1 0 0 0 28 15 M 52 8 A 1 1 0 0 0 52 10 A 1 1 0 0 0 52 8 M 75 11 A 1 1 0 0 0 75 13 A 1 1 0 0 0 75 11 M 6 11 L 27 16 M 29 16 L 51 9 M 53 9 L 74 12 M 5 50 A 1 1 0 0 0 5 48 A 1 1 0 0 0 5 50 M 28 39 A 1 1 0 0 0 28 41 A 1 1 0 0 0 28 39 M 52 45 A 1 1 0 0 0 52 47 A 1 1 0 0 0 52 45 M 75 45 A 1 1 0 0 0 75 47 A 1 1 0 0 0 75 45 M 6 49 L 27 40 M 29 40 L 51 46 M 53 46 L 74 46 M 5 25 A 1 1 0 0 0 5 27 A 1 1 0 0 0 5 25 M 28 31 A 1 1 0 0 0 28 33 A 1 1 0 0 0 28 31 M 52 23 A 1 1 0 0 0 52 25 A 1 1 0 0 0 52 23 M 75 21 A 1 1 0 0 0 75 23 A 1 1 0 0 0 75 21 M 6 26 L 27 32 M 29 32 L 51 24 M 53 24 L 74 22",stroke:t.value.style.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.parallelCoordinatePlot.color},null,8,A)],12,z)):e.createCommentVNode("",!0),n.value==="dumbbell"?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 100 55",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:t.value.style.dumbbell.color,"stroke-width":.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,W),e.createElementVNode("path",{d:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-CVgBMJU6.cjs"),M=require("./useNestedProp-B-NmF2LO.cjs"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c=d=>(e.pushScopeId("data-v-aa0182c9"),d=d(),e.popScopeId(),d),C=["id"],L=["xmlns"],S=["stroke","fill"],z=["xmlns"],A=["stroke","fill"],$=["xmlns"],W=["stroke"],P=["fill"],X=["stroke","fill"],j=["stroke","fill"],F=["fill"],O=["stroke","fill"],q=["stroke","fill"],H=["fill"],I=["stroke","fill"],Z=["stroke","fill"],T=["fill"],G=["stroke","fill"],R=["stroke","fill"],Y=["fill"],D=["stroke","fill"],U=["stroke","fill"],J=["xmlns"],K=["stroke"],Q=["stroke"],ee=["stroke","fill"],te=["stroke","fill"],le=["stroke","fill"],oe=["stroke","fill"],re=["stroke","fill"],ne=["stroke","fill"],se=["stroke","fill"],ae=["stroke","fill"],ce=["stroke","fill"],ie=["stroke","fill"],de=["stroke","fill"],ue=["stroke","fill"],ke=["stroke","fill"],ye=["stroke","fill"],he=["stroke","fill"],me=["stroke","fill"],ve=["stroke","fill"],pe=["stroke","fill"],_e=["stroke","fill"],xe=["stroke","fill"],ge=["stroke","fill"],fe=["stroke","fill"],we=["stroke","fill"],Ee=["xmlns"],Ne=["stroke"],Be=["xmlns"],Ve=["stroke"],Me=["xmlns"],be=["stroke"],Ce=["xmlns"],Le=["fill"],Se=["fill"],ze=["fill"],Ae=["fill"],$e=["fill"],We=["fill"],Pe=["fill"],Xe=["fill"],je=["fill"],Fe=["fill"],Oe=["fill"],qe=["fill"],He=["xmlns"],Ie=["stroke"],Ze=["stroke"],Te=["stroke"],Ge=["stroke"],Re=["stroke"],Ye=["stroke"],De=["xmlns"],Ue=["stroke"],Je=["stroke"],Ke=["stroke"],Qe=["stroke"],et=["stroke"],tt=["stroke"],lt=["stroke"],ot=["stroke"],rt=["stroke"],nt=["xmlns"],st=["stroke"],at=["xmlns"],ct=["stroke"],it=["stroke"],dt=["stroke"],ut=["stroke"],kt=["stroke"],yt=["stroke"],ht=["stroke"],mt=["stroke"],vt=["stroke"],pt=["xmlns"],_t=["x1","x2","stroke"],xt=["xmlns"],gt=["x","y","width","height","fill"],ft=["y","width","height","fill"],wt=["xmlns"],Et=["fill"],Nt=["fill"],Bt=["fill"],Vt=["xmlns"],Mt=["x1","x2","y1","y2","stroke"],bt=["stroke"],Ct=["fill"],Lt=["xmlns"],St=["fill"],zt=["fill"],At=["x1","y1","x2","y2","stroke-width","stroke"],$t=["xmlns"],Wt={key:0},Pt=["stroke","stroke-width"],Xt=["stroke","stroke-width"],jt=["x1","x2","y1","y2","stroke","stroke-width"],Ft=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x","y","height","width","fill"],Ht=["xmlns","viewBox"],It=["x","y","stroke","fill"],Zt=["xmlns"],Tt=["d","stroke"],Gt=["cx","cy","r","fill","stroke"],Rt=["cx","cy","r","fill","stroke"],Yt=["x","y","width","fill"],Dt=["cx","cy","fill"],Ut=["cx","cy","fill"],Jt=["stroke"],Kt=["xmlns"],Qt=["stroke","stroke-width"],el=["stroke","stroke-width"],tl=["stroke","stroke-width"],ll=["fill"],ol=["fill"],rl=["fill"],nl=["fill"],sl=["fill"],al=["fill"],cl=["xmlns"],il={key:0},dl=["stroke","stroke-width"],ul=["stroke","stroke-width"],kl=["stroke","stroke-width"],yl={key:1},hl=["r","fill"],ml=["r","fill"],vl=["xmlns"],pl={key:0},_l=["stroke","stroke-width"],xl=["stroke","stroke-width"],gl=["fill","rx","x","y","width","height"],fl=["xmlns"],wl=["stroke-width","stroke"],El=["stroke-width","stroke"],Nl=["stroke-width","stroke"],Bl=["xmlns"],Vl=["stroke"],Ml=["stroke"],bl=["stroke"],Cl=["stroke"],Ll=["fill"],Sl=["stroke"],zl=["xmlns"],Al=["stroke","stroke-width"],$l=["stroke","stroke-width"],Wl=["fill","r"],Pl=["fill","r"],Xl=["fill","r"],jl=["fill","r"],Fl=["fill","r"],Ol=["fill","r"],ql=["fill","r"],Hl=["fill","r"],Il=["fill","r"],Zl=["xmlns"],Tl=["d","stroke","stroke-width"],Gl=["d","stroke","stroke-width"],Rl=["d","stroke","stroke-width"],Yl=["d","stroke","stroke-width"],Dl=["stroke","stroke-width"],Ul=["stroke","stroke-width"],Jl=["stroke","stroke-width"],Kl=["fill"],Ql=["fill"],eo=["xmlns"],to=["x","y","fill"],lo=["x","y","fill"],oo=["x","y","fill"],ro=["xmlns"],no=["fill"],so=["fill"],ao=["y1","y2","stroke","stroke-width"],co=["x1","x2","stroke","stroke-width"],io=["xmlns","stroke"],uo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ko=["fill"],yo=["xmlns","stroke"],ho=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 10l.01 0" data-v-aa0182c9></path><path d="M15 10l.01 0" data-v-aa0182c9></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-aa0182c9></path>',5),mo=[ho],vo=["xmlns","stroke"],po=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),_o=["fill"],xo=["xmlns","stroke"],go=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 10l.01 0" data-v-aa0182c9></path><path d="M15 10l.01 0" data-v-aa0182c9></path><path d="M9 15l6 0" data-v-aa0182c9></path>',5),fo=[go],wo=["xmlns","stroke"],Eo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),No=["fill"],Bo=["xmlns","stroke"],Vo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Mo=c(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),bo=c(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Co=c(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Lo=[Vo,Mo,bo,Co],So=["xmlns","stroke"],zo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ao=["fill"],$o=["xmlns","stroke"],Wo=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 10l.01 0" data-v-aa0182c9></path><path d="M15 10l.01 0" data-v-aa0182c9></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-aa0182c9></path>',5),Po=[Wo],Xo=["xmlns","stroke"],jo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Fo=["fill"],Oo=["xmlns","stroke"],qo=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-aa0182c9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-aa0182c9></path><path d="M9 9l.01 0" data-v-aa0182c9></path><path d="M15 9l.01 0" data-v-aa0182c9></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-aa0182c9></path>',5),Ho=[qo],Io=["xmlns"],Zo=["points","fill","stroke","stroke-width"],To=["xmlns"],Go={key:0},Ro=["stroke","stroke-width"],Yo=["y","width","fill","rx"],Do={__name:"vue-ui-skeleton",props:{config:{type:Object,default(){return{}}}},setup(d){const p=d,{vue_ui_skeleton:_}=l.useConfig(),x=e.ref(`vue-ui-skeleton-${Math.random()}`),t=e.computed(()=>M.useNestedProp({userConfig:p.config,defaultConfig:_})),g=e.computed(()=>t.value.style.animated),n=e.computed(()=>t.value.type),f=e.ref([60,50,55,36,40,25,26,12]),w=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:40,sides:6}).path),E=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:30,sides:6}).path),N=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:20,sides:6}).path),B=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:10,sides:6}).path),k=e.ref([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),s=e.ref([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),u=e.ref([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),y=e.ref([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function h(i,m=1){return{x:200+160*Math.cos(29.85+i*Math.PI/180)*m,y:200+160*Math.sin(29.85+i*Math.PI/180)*m}}const V=e.computed(()=>{const i=[];for(let o=0;o<100;o+=1)i.push({x1:h(360/100*o).x,y1:h(360/100*o).y,x2:h(360/100*o,.9).x,y2:h(360/100*o,.9).y,color:t.value.style.wheel.color});return i});return(i,m)=>(e.openBlock(),e.createElementBlock("div",{id:x.value,class:e.normalizeClass({"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":g.value}),style:e.normalizeStyle(`background:${t.value.style.backgroundColor};color:${t.value.style.color};display:flex;align-items:center;justify-content:center;`)},[n.value==="flow"?(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 8 L 28 12 L 52 9 L 75 8 L 75 12 L 52 12 L 28 21 L 5 29 Z M 5 34 L 28 35 L 52 24 L 75 21 L 75 27 L 52 30 L 28 44 L 52 39 L 75 41 L 75 47 L 52 45 L 28 52 L 5 52 Z",stroke:t.value.style.flow.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.flow.color},null,8,S)],12,L)):e.createCommentVNode("",!0),n.value==="parallelCoordinatePlot"?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 10 A 1 1 0 0 0 5 12 A 1 1 0 0 0 5 10 M 28 15 A 1 1 0 0 0 28 17 A 1 1 0 0 0 28 15 M 52 8 A 1 1 0 0 0 52 10 A 1 1 0 0 0 52 8 M 75 11 A 1 1 0 0 0 75 13 A 1 1 0 0 0 75 11 M 6 11 L 27 16 M 29 16 L 51 9 M 53 9 L 74 12 M 5 50 A 1 1 0 0 0 5 48 A 1 1 0 0 0 5 50 M 28 39 A 1 1 0 0 0 28 41 A 1 1 0 0 0 28 39 M 52 45 A 1 1 0 0 0 52 47 A 1 1 0 0 0 52 45 M 75 45 A 1 1 0 0 0 75 47 A 1 1 0 0 0 75 45 M 6 49 L 27 40 M 29 40 L 51 46 M 53 46 L 74 46 M 5 25 A 1 1 0 0 0 5 27 A 1 1 0 0 0 5 25 M 28 31 A 1 1 0 0 0 28 33 A 1 1 0 0 0 28 31 M 52 23 A 1 1 0 0 0 52 25 A 1 1 0 0 0 52 23 M 75 21 A 1 1 0 0 0 75 23 A 1 1 0 0 0 75 21 M 6 26 L 27 32 M 29 32 L 51 24 M 53 24 L 74 22",stroke:t.value.style.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.parallelCoordinatePlot.color},null,8,A)],12,z)):e.createCommentVNode("",!0),n.value==="dumbbell"?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 100 55",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:t.value.style.dumbbell.color,"stroke-width":.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,W),e.createElementVNode("path",{d:`
2
2
  M 30,11
3
3
  C 39,10 39,10
4
4
  45,11
@@ -1,6 +1,6 @@
1
1
  import { onMounted as F, ref as S, computed as R, openBlock as s, createElementBlock as a, normalizeStyle as l, createElementVNode as e, toDisplayString as k, createCommentVNode as r, normalizeClass as w, withKeys as z, createTextVNode as M, unref as n, pushScopeId as I, popScopeId as K, createStaticVNode as _ } from "vue";
2
- import { u as E, o as O, e as D, X as c, w as m } from "./index-BiuHBtkZ.js";
3
- import { u as L } from "./useNestedProp-Ck5_RzLu.js";
2
+ import { u as E, o as O, e as D, X as c, w as m } from "./index-D2epy0rJ.js";
3
+ import { u as L } from "./useNestedProp-C_ZrJBd9.js";
4
4
  import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const v = ($) => (I("data-v-3e41118a"), $ = $(), K(), $), P = {
6
6
  key: 0,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-D-vy9N1v.cjs"),$=require("./useNestedProp-B9yDavuy.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),i=y=>(e.pushScopeId("data-v-3e41118a"),y=y(),e.popScopeId(),y),w={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},M=["xmlns","stroke"],B={id:"vueUiSmiley0"},C=["stop-color"],R=["stop-color"],H=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),X=["fill"],j=["stroke"],U=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),G=[U],L=["xmlns","viewBox","stroke"],A={id:"vueUiSmiley0"},D=["stop-color"],Y=["stop-color"],F=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),K=["fill"],I=["viewBox","stroke"],T=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),O=[T],q=["xmlns","stroke"],P={id:"vueUiSmiley1"},J=["stop-color"],Q=["stop-color"],W=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Z=["fill"],ee=["xmlns","stroke"],te=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),oe=[te],le=["xmlns","viewBox","stroke"],ae={id:"vueUiSmiley1"},ne=["stop-color"],se=["stop-color"],ie=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),re=["fill"],de=["viewBox","stroke"],ue=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),ce=[ue],pe=["xmlns","stroke"],ve={id:"vueUiSmiley2"},ye=["stop-color"],me=["stop-color"],fe=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),he=["fill"],ke=["xmlns","stroke"],ge=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),xe=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),_e=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Ne=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),ze=[ge,xe,_e,Ne],Ve=["xmlns","viewBox","stroke"],be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ee={id:"vueUiSmiley2"},$e=["stop-color"],Se=["stop-color"],we=["fill"],Me=["xmlns","viewBox","stroke"],Be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ce=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Re=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),He=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Xe=[Be,Ce,Re,He],je=["xmlns","stroke"],Ue={id:"vueUiSmiley3"},Ge=["stop-color"],Le=["stop-color"],Ae=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),De=["fill"],Ye=["xmlns","stroke"],Fe=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ke=[Fe],Ie=["xmlns","viewBox","stroke"],Te=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Oe={id:"vueUiSmiley3"},qe=["stop-color"],Pe=["stop-color"],Je=["fill"],Qe=["xmlns","viewBox","stroke"],We=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ze=[We],et=["xmlns","stroke"],tt={id:"vueUiSmiley4"},ot=["stop-color"],lt=["stop-color"],at=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),nt=["fill"],st=["xmlns","stroke"],it=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),rt=[it],dt=["xmlns","viewBox","stroke"],ut=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ct={id:"vueUiSmiley4"},pt=["stop-color"],vt=["stop-color"],yt=["fill"],mt=["xmlns","viewBox","stroke"],ft=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),ht=[ft],kt={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(y,{expose:g,emit:x}){const c=y,{vue_ui_smiley:_}=l.useConfig();e.onMounted(()=>{l.objectIsEmpty(c.dataset)&&l.error({componentName:"VueUiSmiley",type:"dataset"})});const f=e.ref(!1),s=e.ref(void 0),t=e.computed(()=>$.useNestedProp({userConfig:c.config,defaultConfig:_})),N=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)?z(c.dataset.rating):c.dataset.rating||null),m=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)),r=e.ref(N.value),d=e.ref(t.value.readonly);function z(n){if(n===null)return null;let o=0,a=0;for(const h in n){const E=parseInt(h),k=n[h];o+=E*k,a+=k}return a===0?0:o/a}function p(n){const o=r.value-n,a=24;switch(!0){case o<0:return 0;case o>1:return 1*a;default:return o*a}}function v(n){d.value||(r.value=n,x("rate",n))}function V(){return r.value}function b(n=!0){d.value=n}g({getData:V,toggleReadonly:b});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,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:o[20]||(o[20]=a=>f.value=!0),onMouseleave:o[21]||(o[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",w,[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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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"),l=require("./index-CVgBMJU6.cjs"),$=require("./useNestedProp-B-NmF2LO.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),i=y=>(e.pushScopeId("data-v-3e41118a"),y=y(),e.popScopeId(),y),w={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},M=["xmlns","stroke"],B={id:"vueUiSmiley0"},C=["stop-color"],R=["stop-color"],H=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),X=["fill"],j=["stroke"],U=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),G=[U],L=["xmlns","viewBox","stroke"],A={id:"vueUiSmiley0"},D=["stop-color"],Y=["stop-color"],F=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),K=["fill"],I=["viewBox","stroke"],T=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),O=[T],q=["xmlns","stroke"],P={id:"vueUiSmiley1"},J=["stop-color"],Q=["stop-color"],W=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Z=["fill"],ee=["xmlns","stroke"],te=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),oe=[te],le=["xmlns","viewBox","stroke"],ae={id:"vueUiSmiley1"},ne=["stop-color"],se=["stop-color"],ie=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),re=["fill"],de=["viewBox","stroke"],ue=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),ce=[ue],pe=["xmlns","stroke"],ve={id:"vueUiSmiley2"},ye=["stop-color"],me=["stop-color"],fe=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),he=["fill"],ke=["xmlns","stroke"],ge=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),xe=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),_e=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Ne=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),ze=[ge,xe,_e,Ne],Ve=["xmlns","viewBox","stroke"],be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ee={id:"vueUiSmiley2"},$e=["stop-color"],Se=["stop-color"],we=["fill"],Me=["xmlns","viewBox","stroke"],Be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ce=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Re=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),He=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Xe=[Be,Ce,Re,He],je=["xmlns","stroke"],Ue={id:"vueUiSmiley3"},Ge=["stop-color"],Le=["stop-color"],Ae=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),De=["fill"],Ye=["xmlns","stroke"],Fe=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ke=[Fe],Ie=["xmlns","viewBox","stroke"],Te=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Oe={id:"vueUiSmiley3"},qe=["stop-color"],Pe=["stop-color"],Je=["fill"],Qe=["xmlns","viewBox","stroke"],We=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ze=[We],et=["xmlns","stroke"],tt={id:"vueUiSmiley4"},ot=["stop-color"],lt=["stop-color"],at=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),nt=["fill"],st=["xmlns","stroke"],it=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),rt=[it],dt=["xmlns","viewBox","stroke"],ut=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ct={id:"vueUiSmiley4"},pt=["stop-color"],vt=["stop-color"],yt=["fill"],mt=["xmlns","viewBox","stroke"],ft=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),ht=[ft],kt={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(y,{expose:g,emit:x}){const c=y,{vue_ui_smiley:_}=l.useConfig();e.onMounted(()=>{l.objectIsEmpty(c.dataset)&&l.error({componentName:"VueUiSmiley",type:"dataset"})});const f=e.ref(!1),s=e.ref(void 0),t=e.computed(()=>$.useNestedProp({userConfig:c.config,defaultConfig:_})),N=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)?z(c.dataset.rating):c.dataset.rating||null),m=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)),r=e.ref(N.value),d=e.ref(t.value.readonly);function z(n){if(n===null)return null;let o=0,a=0;for(const h in n){const E=parseInt(h),k=n[h];o+=E*k,a+=k}return a===0?0:o/a}function p(n){const o=r.value-n,a=24;switch(!0){case o<0:return 0;case o>1:return 1*a;default:return o*a}}function v(n){d.value||(r.value=n,x("rate",n))}function V(){return r.value}function b(n=!0){d.value=n}g({getData:V,toggleReadonly:b});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,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:o[20]||(o[20]=a=>f.value=!0),onMouseleave:o[21]||(o[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",w,[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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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:o[0]||(o[0]=a=>s.value=0),onMouseleave:o[1]||(o[1]=a=>s.value=void 0),onClick:o[2]||(o[2]=a=>v(1)),onKeyup:o[3]||(o[3]=e.withKeys(a=>v(1),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[1]),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(l.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",B,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.active[0],.05)},null,8,C),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[0]},null,8,R)])]),H,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,X)],8,M)):(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"},G,8,j)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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",A,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[0],.05)},null,8,D),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[0]},null,8,Y)])]),F,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,L)):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"},O,8,I)):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:o[4]||(o[4]=a=>s.value=1),onMouseleave:o[5]||(o[5]=a=>s.value=void 0),onClick:o[6]||(o[6]=a=>v(2)),onKeyup:o[7]||(o[7]=e.withKeys(a=>v(2),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[2]),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(l.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",P,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.active[1],.05)},null,8,J),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[1]},null,8,Q)])]),W,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,Z)],8,q)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},oe,8,ee)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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",ae,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[1],.05)},null,8,ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[1]},null,8,se)])]),ie,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,re)],8,le)):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"},ce,8,de)):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:o[8]||(o[8]=a=>s.value=2),onMouseleave:o[9]||(o[9]=a=>s.value=void 0),onClick:o[10]||(o[10]=a=>v(3)),onKeyup:o[11]||(o[11]=e.withKeys(a=>v(3),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[3]),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(l.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",ve,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,ye),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,me)])]),fe,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,he)],8,pe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},ze,8,ke)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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"},[be,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Ee,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,Se)])]),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,we)],8,Ve)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.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"},Xe,8,Me)):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:o[12]||(o[12]=a=>s.value=3),onMouseleave:o[13]||(o[13]=a=>s.value=void 0),onClick:o[14]||(o[14]=a=>v(4)),onKeyup:o[15]||(o[15]=e.withKeys(a=>v(4),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[4]),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(l.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",Ue,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,Le)])]),Ae,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,De)],8,je)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},Ke,8,Ye)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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"},[Te,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Oe,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,Pe)])]),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,Je)],8,Ie)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.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"},Ze,8,Qe)):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:o[16]||(o[16]=a=>s.value=4),onMouseleave:o[17]||(o[17]=a=>s.value=void 0),onClick:o[18]||(o[18]=a=>v(5)),onKeyup:o[19]||(o[19]=e.withKeys(a=>v(5),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[5]),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(l.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",tt,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,ot),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,lt)])]),at,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,nt)],8,et)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},rt,8,st)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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"},[ut,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ct,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,vt)])]),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,yt)],8,dt)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.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"},ht,8,mt)):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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},gt=S._export_sfc(kt,[["__scopeId","data-v-3e41118a"]]);exports.default=gt;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D-vy9N1v.cjs"),V=require("./useNestedProp-B9yDavuy.cjs"),N=require("./BaseIcon-BBQHz_Sf.cjs"),F=require("./vue-ui-skeleton-DJhwv2oY.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=["id"],A=["xmlns","viewBox"],O=["id"],D=["stop-color"],P=["stop-color"],G={key:0},U=["d","fill"],W=["d","fill"],Z=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],H=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],R=["height","width","x"],X={style:{width:"100%"}},J=["x","y","fill","font-size","font-weight"],K=["stroke","cx","cy","fill"],Q=["x","y","font-size","fill","font-weight"],Y={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const u=E,{vue_ui_spark_trend:$}=n.useConfig(),T=e.computed(()=>!!u.dataset&&u.dataset.length),p=e.ref(n.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...V.useNestedProp({userConfig:n.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map(o=>[void 0,1/0,-1/0,null,NaN].includes(o)?null:o)},{deep:!0});function k(l){return l.map(o=>n.checkNaN(o))}const v=e.ref(u.dataset.map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),h=e.ref(!1),g=e.ref(null);e.onMounted(()=>{C();let o=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 b=function(){h.value=!0;let B=performance.now(),L=B-i;L>o?(i=B-L%o,d<u.dataset.length?(v.value.push(u.dataset[d]),d+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),v.value=k(u.dataset),h.value=!1)):g.value=requestAnimationFrame(b)};v.value=[];let d=0;b()}});function C(){n.objectIsEmpty(u.dataset)&&n.error({componentName:"VueUiSparkTrend",type:"dataset"})}const r=e.ref({height:80,width:300}),c=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:r.value.width-t.value.style.padding.right,bottom:r.value.height-t.value.style.padding.bottom,height:r.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:r.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(u.dataset);return{max:Math.max(...l.map(o=>n.checkNaN(o))),min:Math.min(...l.map(o=>n.checkNaN(o)))}}),y=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),S=e.computed(()=>_.value.max+y.value);function w(l){return l/S.value}const z=e.computed(()=>u.dataset.length),a=e.computed(()=>v.value.map((l,o)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:n.checkNaN(l),absoluteValue:n.checkNaN(i),plotValue:n.checkNaN(i+y.value),toMax:w(i+y.value),x:c.value.left+n.checkNaN(o*(c.value.width/(z.value-1)))-t.value.style.padding.right,y:c.value.bottom-n.checkNaN(c.value.height*w(i+y.value))}})),f=e.computed(()=>{const l=k(u.dataset);return t.value.style.trendLabel.trendType==="global"?n.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}),m=e.computed(()=>h.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[m.value]),M=e.computed(()=>{const l={x:a.value[0].x,y:r.value.height-6},o={x:a.value[a.value.length-1].x,y:r.value.height-6},i=[];return a.value.forEach(d=>{i.push(`${d.x},${d.y} `)}),[l.x,l.y,...i,o.x,o.y].toString()}),I=e.computed(()=>{let l=[];return a.value.forEach(o=>{l.push(`${o.x},${o.y} `)}),`M ${l.toString()}`});return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[T.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,D),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,P)],8,O)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",G,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${c.value.bottom} ${e.unref(n.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${c.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,U)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${M.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,W))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(a.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,Z)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:I.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,H)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:r.value.height/2,width:r.value.height/2,x:r.value.height/5,y:8},[e.createElementVNode("div",X,[m.value==="positive"?(e.openBlock(),e.createBlock(N.default,{key:0,stroke:s.value,name:"arrowTop",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="negative"?(e.openBlock(),e.createBlock(N.default,{key:1,stroke:s.value,name:"arrowBottom",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="neutral"?(e.openBlock(),e.createBlock(N.default,{key:2,stroke:s.value,name:"arrowRight",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,R)),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.height/2-r.value.height/20,y:c.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(n.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,J)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,K)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.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(n.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,Q)):e.createCommentVNode("",!0)],8,A)):(e.openBlock(),e.createBlock(F.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,q))}},ee=j._export_sfc(Y,[["__scopeId","data-v-cb10e52f"]]);exports.default=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CVgBMJU6.cjs"),V=require("./useNestedProp-B-NmF2LO.cjs"),N=require("./BaseIcon-DnG75_Ol.cjs"),F=require("./vue-ui-skeleton-Br1K3exH.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=["id"],A=["xmlns","viewBox"],O=["id"],D=["stop-color"],P=["stop-color"],G={key:0},U=["d","fill"],W=["d","fill"],Z=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],H=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],R=["height","width","x"],X={style:{width:"100%"}},J=["x","y","fill","font-size","font-weight"],K=["stroke","cx","cy","fill"],Q=["x","y","font-size","fill","font-weight"],Y={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const u=E,{vue_ui_spark_trend:$}=n.useConfig(),T=e.computed(()=>!!u.dataset&&u.dataset.length),p=e.ref(n.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...V.useNestedProp({userConfig:n.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map(o=>[void 0,1/0,-1/0,null,NaN].includes(o)?null:o)},{deep:!0});function k(l){return l.map(o=>n.checkNaN(o))}const v=e.ref(u.dataset.map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),h=e.ref(!1),g=e.ref(null);e.onMounted(()=>{C();let o=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 b=function(){h.value=!0;let B=performance.now(),L=B-i;L>o?(i=B-L%o,d<u.dataset.length?(v.value.push(u.dataset[d]),d+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),v.value=k(u.dataset),h.value=!1)):g.value=requestAnimationFrame(b)};v.value=[];let d=0;b()}});function C(){n.objectIsEmpty(u.dataset)&&n.error({componentName:"VueUiSparkTrend",type:"dataset"})}const r=e.ref({height:80,width:300}),c=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:r.value.width-t.value.style.padding.right,bottom:r.value.height-t.value.style.padding.bottom,height:r.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:r.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(u.dataset);return{max:Math.max(...l.map(o=>n.checkNaN(o))),min:Math.min(...l.map(o=>n.checkNaN(o)))}}),y=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),S=e.computed(()=>_.value.max+y.value);function w(l){return l/S.value}const z=e.computed(()=>u.dataset.length),a=e.computed(()=>v.value.map((l,o)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:n.checkNaN(l),absoluteValue:n.checkNaN(i),plotValue:n.checkNaN(i+y.value),toMax:w(i+y.value),x:c.value.left+n.checkNaN(o*(c.value.width/(z.value-1)))-t.value.style.padding.right,y:c.value.bottom-n.checkNaN(c.value.height*w(i+y.value))}})),f=e.computed(()=>{const l=k(u.dataset);return t.value.style.trendLabel.trendType==="global"?n.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}),m=e.computed(()=>h.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[m.value]),M=e.computed(()=>{const l={x:a.value[0].x,y:r.value.height-6},o={x:a.value[a.value.length-1].x,y:r.value.height-6},i=[];return a.value.forEach(d=>{i.push(`${d.x},${d.y} `)}),[l.x,l.y,...i,o.x,o.y].toString()}),I=e.computed(()=>{let l=[];return a.value.forEach(o=>{l.push(`${o.x},${o.y} `)}),`M ${l.toString()}`});return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[T.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,D),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,P)],8,O)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",G,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${c.value.bottom} ${e.unref(n.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${c.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,U)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${M.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(n.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,W))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(a.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,Z)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:I.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,H)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:r.value.height/2,width:r.value.height/2,x:r.value.height/5,y:8},[e.createElementVNode("div",X,[m.value==="positive"?(e.openBlock(),e.createBlock(N.default,{key:0,stroke:s.value,name:"arrowTop",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="negative"?(e.openBlock(),e.createBlock(N.default,{key:1,stroke:s.value,name:"arrowBottom",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="neutral"?(e.openBlock(),e.createBlock(N.default,{key:2,stroke:s.value,name:"arrowRight",size:r.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,R)),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.height/2-r.value.height/20,y:c.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(n.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,J)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,K)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.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(n.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,Q)):e.createCommentVNode("",!0)],8,A)):(e.openBlock(),e.createBlock(F.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,q))}},ee=j._export_sfc(Y,[["__scopeId","data-v-cb10e52f"]]);exports.default=ee;
@@ -1,8 +1,8 @@
1
1
  import { computed as u, ref as m, watch as B, onMounted as Q, openBlock as s, createElementBlock as i, normalizeStyle as R, createBlock as C, unref as c, createElementVNode as k, createCommentVNode as v, toDisplayString as V } from "vue";
2
- import { u as H, c as J, t as K, o as Y, e as ee, v as y, U as te, X as ae, s as z, Q as D, f as E, i as le } from "./index-BiuHBtkZ.js";
3
- import { u as G } from "./useNestedProp-Ck5_RzLu.js";
4
- import M from "./BaseIcon-BysUnfCR.js";
5
- import ne from "./vue-ui-skeleton-Du4zw-c1.js";
2
+ import { u as H, c as J, t as K, o as Y, e as ee, v as y, U as te, X as ae, s as z, Q as D, f as E, i as le } from "./index-D2epy0rJ.js";
3
+ import { u as G } from "./useNestedProp-C_ZrJBd9.js";
4
+ import M from "./BaseIcon-B9istAKo.js";
5
+ import ne from "./vue-ui-skeleton-BLiYyX95.js";
6
6
  import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const se = ["id"], ue = ["xmlns", "viewBox"], re = ["id"], ie = ["stop-color"], de = ["stop-color"], ve = { key: 0 }, ce = ["d", "fill"], ye = ["d", "fill"], he = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], fe = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], pe = ["height", "width", "x"], ge = { style: { width: "100%" } }, me = ["x", "y", "fill", "font-size", "font-weight"], ke = ["stroke", "cx", "cy", "fill"], _e = ["x", "y", "font-size", "fill", "font-weight"], be = {
8
8
  __name: "vue-ui-spark-trend",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D-vy9N1v.cjs"),C=require("./useNestedProp-B9yDavuy.cjs"),V=require("./vue-ui-skeleton-DJhwv2oY.cjs"),D=["onClick"],$={key:1},z=["xmlns","viewBox"],L=["id"],P=["stop-color"],A=["stop-color"],F=["height","width","fill","rx"],O=["height","width","fill","rx"],I=["height","width","fill","rx"],T={__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:b}){const n=p,{vue_ui_sparkbar:w}=o.useConfig(),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=C.useNestedProp({userConfig:n.config,defaultConfig:w});return l.theme?{...C.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 S=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(){s+=a/l,s<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 s=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 i=e.ref({width:500,height:16}),N=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),_=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)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function B(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:B(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function E(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{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(_.value,(a,s)=>(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&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({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:s}),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:s})}}))),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:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,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:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${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,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,A)],8,L)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,O),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,I)],8,z))],12,D)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CVgBMJU6.cjs"),C=require("./useNestedProp-B-NmF2LO.cjs"),V=require("./vue-ui-skeleton-Br1K3exH.cjs"),D=["onClick"],$={key:1},z=["xmlns","viewBox"],L=["id"],P=["stop-color"],A=["stop-color"],F=["height","width","fill","rx"],O=["height","width","fill","rx"],I=["height","width","fill","rx"],T={__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:b}){const n=p,{vue_ui_sparkbar:w}=o.useConfig(),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=C.useNestedProp({userConfig:n.config,defaultConfig:w});return l.theme?{...C.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 S=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(){s+=a/l,s<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 s=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 i=e.ref({width:500,height:16}),N=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),_=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)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function B(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:B(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function E(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{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(_.value,(a,s)=>(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&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({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:s}),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:s})}}))),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:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,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:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${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,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,A)],8,L)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,O),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,I)],8,z))],12,D)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=T;
@@ -1,7 +1,7 @@
1
1
  import { computed as g, ref as x, watch as P, onMounted as q, nextTick as H, openBlock as r, createElementBlock as v, normalizeStyle as p, unref as s, renderSlot as z, normalizeProps as L, mergeProps as X, createCommentVNode as d, createElementVNode as c, toDisplayString as y, Fragment as O, renderList as R, guardReactiveProps as J, createBlock as K } from "vue";
2
- import { u as Q, c as Y, t as Z, a as ee, p as k, b as te, o as le, e as T, g as ae, d as oe, s as _, i as w, f as C, X as se, w as ue } from "./index-BiuHBtkZ.js";
3
- import { u as E } from "./useNestedProp-Ck5_RzLu.js";
4
- import ne from "./vue-ui-skeleton-Du4zw-c1.js";
2
+ import { u as Q, c as Y, t as Z, a as ee, p as k, b as te, o as le, e as T, g as ae, d as oe, s as _, i as w, f as C, X as se, w as ue } from "./index-D2epy0rJ.js";
3
+ import { u as E } from "./useNestedProp-C_ZrJBd9.js";
4
+ import ne from "./vue-ui-skeleton-BLiYyX95.js";
5
5
  const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"], de = ["stop-color"], pe = ["stop-color"], ye = ["height", "width", "fill", "rx"], fe = ["height", "width", "fill", "rx"], me = ["height", "width", "fill", "rx"], we = {
6
6
  __name: "vue-ui-sparkbar",
7
7
  props: {
@@ -1,7 +1,7 @@
1
1
  import { computed as s, onMounted as M, ref as A, watch as N, openBlock as i, createElementBlock as c, normalizeStyle as m, toDisplayString as y, createCommentVNode as d, unref as r, createElementVNode as v, normalizeClass as D, createBlock as E } from "vue";
2
- import { u as G, o as I, e as S, g as U, c as q, t as P, M as R, X as T, i as X, v as p, f as H } from "./index-BiuHBtkZ.js";
3
- import { u as z } from "./useNestedProp-Ck5_RzLu.js";
4
- import Y from "./vue-ui-skeleton-Du4zw-c1.js";
2
+ import { u as G, o as I, e as S, g as U, c as q, t as P, M as R, X as T, i as X, v as p, f as H } from "./index-D2epy0rJ.js";
3
+ import { u as z } from "./useNestedProp-C_ZrJBd9.js";
4
+ import Y from "./vue-ui-skeleton-BLiYyX95.js";
5
5
  const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color"], W = ["d", "stroke", "stroke-linecap"], Z = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], ee = ["x", "y", "font-size", "fill", "font-weight"], se = {
6
6
  __name: "vue-ui-sparkgauge",
7
7
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D-vy9N1v.cjs"),b=require("./useNestedProp-B9yDavuy.cjs"),w=require("./vue-ui-skeleton-DJhwv2oY.cjs"),$=["xmlns","viewBox"],L=["id"],S=["stop-color"],B=["stop-color"],E=["d","stroke","stroke-linecap"],M=["d","stroke","stroke-linecap","stroke-dashoffset"],z=["x","y","font-size","fill","font-weight"],A={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(x){const o=x,{vue_ui_sparkgauge:C}=n.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{v()});function v(){n.objectIsEmpty(o.dataset)?n.error({componentName:"VueUiSparkgauge",type:"dataset"}):n.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{n.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const d=e.ref(n.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:C});return a.theme?{...b.useNestedProp({userConfig:n.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),v()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),s=e.computed(()=>{const a=o.dataset.min??0,r=o.dataset.max??0,N=r-a;return{min:a,max:r,diff:N}}),l=e.ref(t.value.style.animation.show?s.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>s.value.max?s.value.max:l.value<s.value.min?s.value.min:l.value),p=e.computed(()=>s.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(o.dataset.value||0)});function y(a){function r(){l.value<a?l.value=Math.min(l.value+p.value,a):l.value>a&&(l.value=Math.max(l.value-p.value,a)),l.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>o.dataset.title??""),g=e.computed(()=>l.value>=0?(f.value-s.value.min)/s.value.diff:(Math.abs(s.value.min)-Math.abs(f.value))/s.value.diff),k=e.computed(()=>n.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,s.value.min,s.value.max,l.value)),h=e.computed(()=>t.value.style.dataLabel.autoColor?k.value:t.value.style.dataLabel.color),_=e.computed(()=>t.value.style.track.autoColor?k.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{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,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${d.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,S),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,B)],8,L)]),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,E),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${d.value})`:_.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,M)):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:h.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(n.checkNaN)(l.value),e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(n.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(n.checkNaN)(l.value),color:h.value})),9,z)],8,$)):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)],4))}};exports.default=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CVgBMJU6.cjs"),b=require("./useNestedProp-B-NmF2LO.cjs"),w=require("./vue-ui-skeleton-Br1K3exH.cjs"),$=["xmlns","viewBox"],L=["id"],S=["stop-color"],B=["stop-color"],E=["d","stroke","stroke-linecap"],M=["d","stroke","stroke-linecap","stroke-dashoffset"],z=["x","y","font-size","fill","font-weight"],A={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(x){const o=x,{vue_ui_sparkgauge:C}=n.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{v()});function v(){n.objectIsEmpty(o.dataset)?n.error({componentName:"VueUiSparkgauge",type:"dataset"}):n.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{n.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const d=e.ref(n.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:C});return a.theme?{...b.useNestedProp({userConfig:n.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),v()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),s=e.computed(()=>{const a=o.dataset.min??0,r=o.dataset.max??0,N=r-a;return{min:a,max:r,diff:N}}),l=e.ref(t.value.style.animation.show?s.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>s.value.max?s.value.max:l.value<s.value.min?s.value.min:l.value),p=e.computed(()=>s.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(o.dataset.value||0)});function y(a){function r(){l.value<a?l.value=Math.min(l.value+p.value,a):l.value>a&&(l.value=Math.max(l.value-p.value,a)),l.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>o.dataset.title??""),g=e.computed(()=>l.value>=0?(f.value-s.value.min)/s.value.diff:(Math.abs(s.value.min)-Math.abs(f.value))/s.value.diff),k=e.computed(()=>n.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,s.value.min,s.value.max,l.value)),h=e.computed(()=>t.value.style.dataLabel.autoColor?k.value:t.value.style.dataLabel.color),_=e.computed(()=>t.value.style.track.autoColor?k.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{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,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${d.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,S),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,B)],8,L)]),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,E),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${d.value})`:_.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,M)):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:h.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(n.checkNaN)(l.value),e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(n.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(n.checkNaN)(l.value),color:h.value})),9,z)],8,$)):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)],4))}};exports.default=A;
@@ -1,8 +1,8 @@
1
1
  import { useCssVars as J, computed as _, onMounted as K, ref as D, watch as Q, openBlock as a, createElementBlock as s, normalizeStyle as $, createElementVNode as y, createTextVNode as Z, toDisplayString as p, unref as r, createCommentVNode as g, Fragment as h, renderList as f, normalizeClass as N, createBlock as I } from "vue";
2
- import { u as ee, o as te, e as H, g as le, c as ae, t as se, s as b, i as V, f as E, X as oe, w as z } from "./index-BiuHBtkZ.js";
3
- import { u as F } from "./useNestedProp-Ck5_RzLu.js";
4
- import { _ as ue } from "./Shape-BFiZBf3X.js";
5
- import ie from "./vue-ui-skeleton-Du4zw-c1.js";
2
+ import { u as ee, o as te, e as H, g as le, c as ae, t as se, s as b, i as V, f as E, X as oe, w as z } from "./index-D2epy0rJ.js";
3
+ import { u as F } from "./useNestedProp-C_ZrJBd9.js";
4
+ import { _ as ue } from "./Shape-XiTBfhJM.js";
5
+ import ie from "./vue-ui-skeleton-BLiYyX95.js";
6
6
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], pe = ["stop-color"], ge = ["stop-color"], be = ["id"], me = ["stop-color"], _e = ["stop-color"], xe = { key: 0 }, ke = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], we = { key: 1 }, $e = ["x", "y", "font-size", "font-weight", "fill"], Ce = ["x", "y", "font-size", "fill"], Le = ["x", "y", "font-size", "fill"], ze = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Se = {
8
8
  __name: "vue-ui-sparkhistogram",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-D-vy9N1v.cjs"),_=require("./useNestedProp-B9yDavuy.cjs"),F=require("./Shape-COoEWeGM.cjs"),M=require("./vue-ui-skeleton-DJhwv2oY.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0},H={key:1},q=["xmlns","viewBox"],I=["id"],U=["stop-color"],W=["stop-color"],j=["id"],P=["stop-color"],G=["stop-color"],T=["id"],X=["stop-color"],Y=["stop-color"],R={key:0},J=["x","y","height","width","fill","stroke","stroke-width","rx"],K={key:1},Q=["x","y","font-size","font-weight","fill"],Z=["x","y","font-size","fill"],ee=["x","y","font-size","fill"],te=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],le={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(x,{emit:B}){const i=x;e.useCssVars(o=>({dca3ca72:S.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),h=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(i.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):i.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});function b(){const o=_.useNestedProp({userConfig:i.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||i.config,defaultConfig:o})}:o}e.watch(()=>i.config,o=>{t.value=b(),k()},{deep:!0});const c=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}}),w=e.computed(()=>Math.max(...i.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const u=e.computed(()=>i.dataset.map((o,r)=>{const l=C(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/i.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+r*d),$=c.value.left+r*d,f=typeof o.intensity>"u"?100:Math.round(o.intensity*100),N=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,f):a.setOpacity(t.value.style.bars.colors.negative,f),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:N,gradient:z,height:s,intensity:f,proportion:l,stroke:V,textAnchor:D,trapX:$,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null);function L(o,r){B("selectDatapoint",{datapoint:o,index:r})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{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",A,"- "+e.toDisplayString(u.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,u.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:u.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(u.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",H,"("+e.toDisplayString(u.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),h.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,U),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,W)],8,I))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,P),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,G)],8,j))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,X),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Y)],8,T))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,J))),256))])):(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createBlock(F._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(u.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:u.value[n.value],seriesIndex:n.value})),9,Q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,Z)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.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,ee)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.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:()=>L(l,s)},null,40,te)]))),256))],8,q)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},oe=O._export_sfc(le,[["__scopeId","data-v-da8fd5e0"]]);exports.default=oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CVgBMJU6.cjs"),_=require("./useNestedProp-B-NmF2LO.cjs"),F=require("./Shape-D6jrLLku.cjs"),M=require("./vue-ui-skeleton-Br1K3exH.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0},H={key:1},q=["xmlns","viewBox"],I=["id"],U=["stop-color"],W=["stop-color"],j=["id"],P=["stop-color"],G=["stop-color"],T=["id"],X=["stop-color"],Y=["stop-color"],R={key:0},J=["x","y","height","width","fill","stroke","stroke-width","rx"],K={key:1},Q=["x","y","font-size","font-weight","fill"],Z=["x","y","font-size","fill"],ee=["x","y","font-size","fill"],te=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],le={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(x,{emit:B}){const i=x;e.useCssVars(o=>({dca3ca72:S.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),h=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(i.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):i.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});function b(){const o=_.useNestedProp({userConfig:i.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||i.config,defaultConfig:o})}:o}e.watch(()=>i.config,o=>{t.value=b(),k()},{deep:!0});const c=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}}),w=e.computed(()=>Math.max(...i.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const u=e.computed(()=>i.dataset.map((o,r)=>{const l=C(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/i.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+r*d),$=c.value.left+r*d,f=typeof o.intensity>"u"?100:Math.round(o.intensity*100),N=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,f):a.setOpacity(t.value.style.bars.colors.negative,f),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:N,gradient:z,height:s,intensity:f,proportion:l,stroke:V,textAnchor:D,trapX:$,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null);function L(o,r){B("selectDatapoint",{datapoint:o,index:r})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{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",A,"- "+e.toDisplayString(u.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,u.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:u.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(u.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",H,"("+e.toDisplayString(u.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),h.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,U),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,W)],8,I))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,P),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,G)],8,j))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,X),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Y)],8,T))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,J))),256))])):(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createBlock(F._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(u.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:u.value[n.value],seriesIndex:n.value})),9,Q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,Z)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.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,ee)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.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:()=>L(l,s)},null,40,te)]))),256))],8,q)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},oe=O._export_sfc(le,[["__scopeId","data-v-da8fd5e0"]]);exports.default=oe;