vue-data-ui 3.28.12 → 3.29.1

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 (234) hide show
  1. package/dist/BaseScanner-m6QR9rwD.js +1 -0
  2. package/dist/{PackageVersion-PdpqwkYX.js → PackageVersion-BbZ3wNGs.js} +1 -1
  3. package/dist/SlicerPreview-Ks9FNVzh.js +1 -0
  4. package/dist/{StackChartTable-D-31a1zL.js → StackChartTable-rTC6w378.js} +1 -1
  5. package/dist/Tooltip-B432XpvC.js +1 -0
  6. package/dist/{XyAnalysisOptions-DmKfwSu6.js → XyAnalysisOptions-BpjGs_2b.js} +1 -1
  7. package/dist/components/vue-ui-3d-bar.js +1 -1
  8. package/dist/components/vue-ui-accordion.js +1 -1
  9. package/dist/components/vue-ui-age-pyramid.js +1 -1
  10. package/dist/components/vue-ui-annotator.js +1 -1
  11. package/dist/components/vue-ui-bullet.js +1 -1
  12. package/dist/components/vue-ui-bump.js +1 -1
  13. package/dist/components/vue-ui-candlestick.js +1 -1
  14. package/dist/components/vue-ui-carousel-table.js +1 -1
  15. package/dist/components/vue-ui-chestnut.js +1 -1
  16. package/dist/components/vue-ui-chord.js +1 -1
  17. package/dist/components/vue-ui-circle-pack.js +1 -1
  18. package/dist/components/vue-ui-cursor.js +1 -1
  19. package/dist/components/vue-ui-dag.js +1 -1
  20. package/dist/components/vue-ui-dashboard.js +1 -1
  21. package/dist/components/vue-ui-digits.js +1 -1
  22. package/dist/components/vue-ui-donut-evolution.js +1 -1
  23. package/dist/components/vue-ui-donut.js +1 -1
  24. package/dist/components/vue-ui-dumbbell.js +1 -1
  25. package/dist/components/vue-ui-flow.js +1 -1
  26. package/dist/components/vue-ui-funnel.js +1 -1
  27. package/dist/components/vue-ui-galaxy.js +1 -1
  28. package/dist/components/vue-ui-gauge.js +1 -1
  29. package/dist/components/vue-ui-geo.js +1 -1
  30. package/dist/components/vue-ui-gizmo.js +1 -1
  31. package/dist/components/vue-ui-graph.js +1 -1
  32. package/dist/components/vue-ui-heatmap.js +1 -1
  33. package/dist/components/vue-ui-hill.js +1 -1
  34. package/dist/components/vue-ui-history-plot.js +1 -1
  35. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  36. package/dist/components/vue-ui-kpi.js +1 -1
  37. package/dist/components/vue-ui-label.js +1 -1
  38. package/dist/components/vue-ui-mini-loader.js +1 -1
  39. package/dist/components/vue-ui-molecule.js +1 -1
  40. package/dist/components/vue-ui-mood-radar.js +1 -1
  41. package/dist/components/vue-ui-nested-donuts.js +1 -1
  42. package/dist/components/vue-ui-onion.js +1 -1
  43. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  44. package/dist/components/vue-ui-quadrant.js +1 -1
  45. package/dist/components/vue-ui-quick-chart.js +1 -1
  46. package/dist/components/vue-ui-radar.js +1 -1
  47. package/dist/components/vue-ui-rating.js +1 -1
  48. package/dist/components/vue-ui-relation-circle.js +1 -1
  49. package/dist/components/vue-ui-ridgeline.js +1 -1
  50. package/dist/components/vue-ui-rings.js +1 -1
  51. package/dist/components/vue-ui-scatter.js +1 -1
  52. package/dist/components/vue-ui-skeleton.js +1 -1
  53. package/dist/components/vue-ui-smiley.js +1 -1
  54. package/dist/components/vue-ui-spark-trend.js +1 -1
  55. package/dist/components/vue-ui-sparkbar.js +1 -1
  56. package/dist/components/vue-ui-sparkgauge.js +1 -1
  57. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  58. package/dist/components/vue-ui-sparkline.js +1 -1
  59. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  60. package/dist/components/vue-ui-stackbar.js +1 -1
  61. package/dist/components/vue-ui-stackline.js +1 -1
  62. package/dist/components/vue-ui-strip-plot.js +1 -1
  63. package/dist/components/vue-ui-table-heatmap.js +1 -1
  64. package/dist/components/vue-ui-table-sparkline.js +1 -1
  65. package/dist/components/vue-ui-table.js +1 -1
  66. package/dist/components/vue-ui-thermometer.js +1 -1
  67. package/dist/components/vue-ui-timer.js +1 -1
  68. package/dist/components/vue-ui-tiremarks.js +1 -1
  69. package/dist/components/vue-ui-treemap.js +1 -1
  70. package/dist/components/vue-ui-vertical-bar.js +1 -1
  71. package/dist/components/vue-ui-waffle.js +1 -1
  72. package/dist/components/vue-ui-wheel.js +1 -1
  73. package/dist/components/vue-ui-word-cloud.js +1 -1
  74. package/dist/components/vue-ui-world.js +1 -1
  75. package/dist/components/vue-ui-xy-canvas.js +1 -1
  76. package/dist/components/vue-ui-xy.js +1 -1
  77. package/dist/package-BsppqqRX.js +1 -0
  78. package/dist/{render-common-C9aE_Va1.js → render-common-Bc3-uPjM.js} +1 -1
  79. package/dist/ssr/vue-ui-donut.js +1 -1
  80. package/dist/ssr/vue-ui-xy.js +1 -1
  81. package/dist/ssr.js +1 -1
  82. package/dist/style.css +1 -1
  83. package/dist/types/vue-data-ui.d.ts +75 -9
  84. package/dist/useAnimationFrame-D8gcRfnW.js +1 -0
  85. package/dist/useConfig-CBXrYhMI.js +1 -0
  86. package/dist/useLoading-BwiplGDB.js +1 -0
  87. package/dist/{useObjectBindings-D789Dz63.js → useObjectBindings-DDUobNFp.js} +1 -1
  88. package/dist/usePanZoom-CTGk8aJt.js +1 -0
  89. package/dist/utils.js +1 -1
  90. package/dist/vue-data-ui-CMig_4IZ.js +1 -0
  91. package/dist/vue-data-ui.js +1 -1
  92. package/dist/vue-ui-3d-bar-BXDDF5Hq.js +10 -0
  93. package/dist/{vue-ui-accordion-DxGxf-Rm.js → vue-ui-accordion-CV2dxsXB.js} +1 -1
  94. package/dist/vue-ui-age-pyramid-BDoFrY4Y.js +1 -0
  95. package/dist/vue-ui-annotator-DBItXQjx.js +259 -0
  96. package/dist/vue-ui-bullet-iOGIwd8G.js +11 -0
  97. package/dist/vue-ui-bump-CYYE7AYx.js +8 -0
  98. package/dist/vue-ui-candlestick-fQbKxfp6.js +22 -0
  99. package/dist/vue-ui-carousel-table-DUUhomv3.js +1 -0
  100. package/dist/vue-ui-chestnut-D7bO1IIi.js +1 -0
  101. package/dist/vue-ui-chord-Cwg9Vjnn.js +9 -0
  102. package/dist/vue-ui-circle-pack-C18kRERE.js +13 -0
  103. package/dist/vue-ui-cursor-BxBeDqnb.js +1 -0
  104. package/dist/vue-ui-dag-BMBSp7ua.js +7 -0
  105. package/dist/vue-ui-dashboard-wDPL7yQw.js +1 -0
  106. package/dist/vue-ui-digits-CVpi-dBr.js +1 -0
  107. package/dist/vue-ui-donut-BJumteL7.js +23 -0
  108. package/dist/{vue-ui-donut-BqnLIKwZ.js → vue-ui-donut-D5LOpVST.js} +1 -1
  109. package/dist/vue-ui-donut-evolution-DNY_zpSw.js +2 -0
  110. package/dist/vue-ui-dumbbell-CT22NxlP.js +9 -0
  111. package/dist/vue-ui-flow-ihpQN8B4.js +3 -0
  112. package/dist/vue-ui-funnel-CydmxKNq.js +1 -0
  113. package/dist/vue-ui-galaxy-CDdpiwLH.js +1 -0
  114. package/dist/vue-ui-gauge-Cu6cz42H.js +1 -0
  115. package/dist/vue-ui-geo-DAtuaLrb.js +1 -0
  116. package/dist/vue-ui-gizmo-C-MEb9P1.js +1 -0
  117. package/dist/{vue-ui-graph-CBkbFJIA.js → vue-ui-graph-CyySb2SE.js} +2 -2
  118. package/dist/vue-ui-heatmap-CcWLxTbW.js +1 -0
  119. package/dist/{vue-ui-hill-8c-9u8eg.js → vue-ui-hill-mvdRA1RD.js} +1 -1
  120. package/dist/vue-ui-history-plot-AL9z3mC6.js +2 -0
  121. package/dist/vue-ui-horizontal-bar-D2IV9phG.js +4 -0
  122. package/dist/vue-ui-kpi-ZCJekvYX.js +1 -0
  123. package/dist/{vue-ui-label-CBrMoFDG.js → vue-ui-label-CAMjkZc2.js} +1 -1
  124. package/dist/{vue-ui-mini-loader-PsWZLMLF.js → vue-ui-mini-loader-B15gWQp1.js} +1 -1
  125. package/dist/vue-ui-molecule-H88Xsomv.js +1 -0
  126. package/dist/vue-ui-mood-radar-De_2I7pq.js +1 -0
  127. package/dist/vue-ui-nested-donuts-DGWgyIoR.js +19 -0
  128. package/dist/vue-ui-onion-QidVWMud.js +5 -0
  129. package/dist/vue-ui-parallel-coordinate-plot-DFw19TpK.js +9 -0
  130. package/dist/vue-ui-quadrant-CeMOzfdY.js +2 -0
  131. package/dist/vue-ui-quick-chart-Tyt1WdUW.js +9 -0
  132. package/dist/vue-ui-radar-C4U7ohC4.js +1 -0
  133. package/dist/{vue-ui-rating-D0QvpD3V.js → vue-ui-rating-BbHvfFsG.js} +1 -1
  134. package/dist/vue-ui-relation-circle-zoBhpcTB.js +1 -0
  135. package/dist/vue-ui-ridgeline-C9ECt2cC.js +2 -0
  136. package/dist/vue-ui-rings-kYvvKGXk.js +1 -0
  137. package/dist/vue-ui-scatter-Bs5NhtfK.js +9 -0
  138. package/dist/{vue-ui-skeleton-CZMyXM-1.js → vue-ui-skeleton-BSM40fOT.js} +2 -2
  139. package/dist/{vue-ui-smiley-C00q-teB.js → vue-ui-smiley-BvkpUjyE.js} +1 -1
  140. package/dist/vue-ui-spark-trend-DmJHx3aj.js +1 -0
  141. package/dist/vue-ui-sparkbar-6wKyKgYy.js +1 -0
  142. package/dist/vue-ui-sparkgauge-BnZZ2zhe.js +1 -0
  143. package/dist/vue-ui-sparkhistogram-C9cyazhH.js +1 -0
  144. package/dist/vue-ui-sparkline-a1e4A-Gl.js +1 -0
  145. package/dist/vue-ui-sparkstackbar-BTEpVODr.js +1 -0
  146. package/dist/vue-ui-stackbar-BplckX2c.js +29 -0
  147. package/dist/vue-ui-stackline-1KSn7Lw-.js +17 -0
  148. package/dist/vue-ui-strip-plot-ZCX50Scf.js +2 -0
  149. package/dist/vue-ui-table-BRwwKG0f.js +14 -0
  150. package/dist/vue-ui-table-heatmap-2csQOE2c.js +1 -0
  151. package/dist/{vue-ui-table-sparkline-39sKOqcp.js → vue-ui-table-sparkline-VLptltwn.js} +1 -1
  152. package/dist/vue-ui-thermometer-DUocWNhm.js +1 -0
  153. package/dist/vue-ui-timer-DfFRykEz.js +65 -0
  154. package/dist/vue-ui-tiremarks-BBtWpWBE.js +1 -0
  155. package/dist/vue-ui-treemap-Bz1FshtF.js +1 -0
  156. package/dist/vue-ui-waffle-C7SVznJl.js +1 -0
  157. package/dist/vue-ui-wheel-BaZ08ojL.js +1 -0
  158. package/dist/vue-ui-word-cloud-BOUVu-F2.js +4 -0
  159. package/dist/vue-ui-world-E2JfHzRD.js +19 -0
  160. package/dist/vue-ui-xy-CGuTzofF.js +27 -0
  161. package/dist/vue-ui-xy-CmQ5D8Rm.js +31 -0
  162. package/dist/{vue-ui-xy-canvas-CRSisgSA.js → vue-ui-xy-canvas-FULC8M7D.js} +2 -2
  163. package/dist/vue_ui_stackline-CBl7ydff.js +1 -0
  164. package/dist/xyScaleTicks-DMX-D9Wd.js +1 -0
  165. package/dist/xyScales-Cb-Z9Qso.js +1 -0
  166. package/package.json +3 -3
  167. package/dist/BaseScanner-8NdoBs7B.js +0 -1
  168. package/dist/SlicerPreview-0m9E7Zh_.js +0 -1
  169. package/dist/Tooltip-C1q0Qoh7.js +0 -1
  170. package/dist/package-DWjs4THo.js +0 -1
  171. package/dist/useConfig-_JwRfIqE.js +0 -1
  172. package/dist/usePanZoom-CE6Ofyy8.js +0 -1
  173. package/dist/vue-data-ui-Da3HK_wb.js +0 -1
  174. package/dist/vue-ui-3d-bar-D1XfKXhp.js +0 -19
  175. package/dist/vue-ui-age-pyramid-CJqqtEIh.js +0 -1
  176. package/dist/vue-ui-annotator-D31LD4-s.js +0 -331
  177. package/dist/vue-ui-bullet-CxyL5Bdm.js +0 -34
  178. package/dist/vue-ui-bump-BWWMzAN_.js +0 -8
  179. package/dist/vue-ui-candlestick-CQXdyPEt.js +0 -22
  180. package/dist/vue-ui-carousel-table-DwsfnL_l.js +0 -1
  181. package/dist/vue-ui-chestnut-DV7XKL7g.js +0 -1
  182. package/dist/vue-ui-chord-DRNn_E6i.js +0 -21
  183. package/dist/vue-ui-circle-pack-BcA9ZxZS.js +0 -13
  184. package/dist/vue-ui-cursor-DSgVvP1L.js +0 -1
  185. package/dist/vue-ui-dag-CWpyU7AJ.js +0 -9
  186. package/dist/vue-ui-dashboard-Dh_Zi8oG.js +0 -1
  187. package/dist/vue-ui-digits-Cy3Y6qro.js +0 -42
  188. package/dist/vue-ui-donut-DasGeYdl.js +0 -47
  189. package/dist/vue-ui-donut-evolution-Bw7ilDYR.js +0 -2
  190. package/dist/vue-ui-dumbbell-BPvvKhag.js +0 -9
  191. package/dist/vue-ui-flow-XI5Y3qdk.js +0 -3
  192. package/dist/vue-ui-funnel-DqoQogQE.js +0 -1
  193. package/dist/vue-ui-galaxy-NRaBIHpn.js +0 -1
  194. package/dist/vue-ui-gauge-DX4SBIKS.js +0 -1
  195. package/dist/vue-ui-geo-C3e4J_kw.js +0 -1
  196. package/dist/vue-ui-gizmo-C9ls2b4h.js +0 -1
  197. package/dist/vue-ui-heatmap-D6KP1N8f.js +0 -1
  198. package/dist/vue-ui-history-plot-CowxWkEd.js +0 -2
  199. package/dist/vue-ui-horizontal-bar-CVP5jBNJ.js +0 -4
  200. package/dist/vue-ui-kpi-D1MUlURM.js +0 -1
  201. package/dist/vue-ui-molecule-BRB54XBD.js +0 -1
  202. package/dist/vue-ui-mood-radar-CkHJdUyF.js +0 -1
  203. package/dist/vue-ui-nested-donuts-C-7VZO11.js +0 -19
  204. package/dist/vue-ui-onion-erpKpDKg.js +0 -5
  205. package/dist/vue-ui-parallel-coordinate-plot-BDg0pRkN.js +0 -9
  206. package/dist/vue-ui-quadrant-CUdNxC6W.js +0 -2
  207. package/dist/vue-ui-quick-chart-DE5Zwioe.js +0 -16
  208. package/dist/vue-ui-radar-6y6er9ND.js +0 -1
  209. package/dist/vue-ui-relation-circle-CjnG9G7s.js +0 -1
  210. package/dist/vue-ui-ridgeline-B4qi2Ajl.js +0 -2
  211. package/dist/vue-ui-rings-EYfCkNB6.js +0 -1
  212. package/dist/vue-ui-scatter-Tw-5uRac.js +0 -9
  213. package/dist/vue-ui-spark-trend-Cmj4aWcQ.js +0 -1
  214. package/dist/vue-ui-sparkbar-Crq1Vui3.js +0 -1
  215. package/dist/vue-ui-sparkgauge-CN_9yenn.js +0 -1
  216. package/dist/vue-ui-sparkhistogram-CK7JmyCw.js +0 -1
  217. package/dist/vue-ui-sparkline-2_RlGrAT.js +0 -1
  218. package/dist/vue-ui-sparkstackbar-Dwdn2_9q.js +0 -1
  219. package/dist/vue-ui-stackbar-BVmQJn2b.js +0 -29
  220. package/dist/vue-ui-stackline-nvhui30B.js +0 -39
  221. package/dist/vue-ui-strip-plot-Dig2RljR.js +0 -2
  222. package/dist/vue-ui-table-_qSw3iGd.js +0 -14
  223. package/dist/vue-ui-table-heatmap-BwoRcqFD.js +0 -1
  224. package/dist/vue-ui-thermometer-CoVrrzHW.js +0 -1
  225. package/dist/vue-ui-timer-DoR5PqOa.js +0 -64
  226. package/dist/vue-ui-tiremarks-9tPPNGiq.js +0 -1
  227. package/dist/vue-ui-treemap-D3mZkT4P.js +0 -1
  228. package/dist/vue-ui-waffle-D2GfM_Se.js +0 -1
  229. package/dist/vue-ui-wheel-CYBaqHm6.js +0 -1
  230. package/dist/vue-ui-word-cloud-ClGL6iKL.js +0 -4
  231. package/dist/vue-ui-world-Dm7LSNB2.js +0 -19
  232. package/dist/vue-ui-xy-2VCMSzeE.js +0 -27
  233. package/dist/vue-ui-xy-DUlJcC9R.js +0 -31
  234. package/dist/vue_ui_stackline-B6ylXHBJ.js +0 -1
@@ -0,0 +1,17 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{a as t,i as n,n as r,o as i,r as a,t as o}from"./StackChartTable-rTC6w378.js";import{n as s,r as c,t as l}from"./userOptionsSlots-CWtXN5Q6.js";import{n as u,r as d,t as f}from"./annotationSlots-OLiW25XN.js";import{t as p}from"./annotationViewport-X8fvs7pz.js";import{n as m,t as h}from"./tableIntegration-CNoJ1CIY.js";import{$ as g,B as ee,Dt as te,Ft as ne,Ht as re,J as ie,Jt as ae,M as oe,Ot as se,P as ce,S as le,U as ue,X as de,Zt as fe,_ as pe,_t as me,at as he,b as ge,dt as _e,en as ve,i as ye,in as be,nn as xe,t as Se,tn as Ce,v as we,w as Te,wt as Ee,yt as De,zt as Oe}from"./lib-rPeBMZrn.js";import{c as ke}from"./canvas-lib-22VpOI4_.js";import{n as Ae,t as je}from"./useHints-C-TwxM0Y.js";import{t as Me}from"./useConfig-CBXrYhMI.js";import{t as Ne}from"./useSvgLabelLayout-42Kats14.js";import{t as Pe}from"./useLoading-BwiplGDB.js";import{t as Fe}from"./usePrinter-DVf3YcG5.js";import{t as Ie}from"./useNestedProp-DnGoh-XS.js";import{t as Le}from"./useResponsive-CENUxfEL.js";import{t as Re}from"./useThemeCheck-BKNRbGeC.js";import{t as ze}from"./useChartExport-BZts4KFb.js";import{t as Be}from"./useTransitions-ChGGrtrv.js";import{t as Ve}from"./useStableElementSize-CegFbRlF.js";import{t as He}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ue}from"./useTimeLabelCollider-BTybMUFi.js";import{t as We}from"./useUserOptionState-CXlFnwPv.js";import{t as Ge}from"./img-D4RQwASc.js";import{t as Ke}from"./Shape-CRe8woTu.js";import{n as qe}from"./Title-BliHuXfT.js";import{t as Je}from"./vue_ui_stackline-CBl7ydff.js";import{t as Ye}from"./BaseScanner-m6QR9rwD.js";import{t as Xe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ze}from"./SlicerPreview-Ks9FNVzh.js";import{t as Qe}from"./DefGrad-DKMq1REY.js";import{t as $e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as _,Teleport as et,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as tt,createVNode as nt,defineAsyncComponent as rt,guardReactiveProps as it,mergeProps as at,nextTick as ot,normalizeClass as C,normalizeProps as st,normalizeStyle as ct,onBeforeUnmount as lt,onMounted as ut,openBlock as w,ref as T,renderList as E,renderSlot as D,shallowRef as dt,toDisplayString as ft,toRefs as pt,unref as O,useSlots as mt,watch as k,withCtx as ht,withMemo as gt}from"vue";var _t=/* @__PURE__ */ e({default:()=>fn}),vt=[`id`],yt=[`id`],bt=[`id`],xt={style:{position:`relative`}},St=[`aria-describedby`,`xmlns`,`viewBox`],Ct=[`id`],wt=[`x`,`y`,`width`,`height`],Tt={key:0},Et=[`x`,`y`,`width`,`height`],Dt={key:1},Ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],kt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],At=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],jt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Mt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Nt=[`transform`,`font-size`,`fill`,`font-weight`],Pt=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-dasharray`],Ft=[`d`,`fill`,`opacity`],It=[`d`,`stroke`,`stroke-width`],Lt=[`x1`,`x2`,`y1`,`y2`,`stroke`],Rt=[`transform`,`font-size`,`font-weight`,`fill`,`text-anchor`],zt={key:0},Bt={key:1},Vt=[`text-anchor`,`font-size`,`font-weight`,`fill`,`stroke`,`transform`,`onClick`],Ht=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`,`onClick`],Ut=[`text-anchor`,`font-size`,`font-weight`,`fill`,`stroke`,`transform`,`innerHTML`],Wt={key:12,style:{"pointer-events":`none`}},Gt=[`x`,`y`],Kt=[`innerHTML`],qt=[`cx`,`cy`,`r`,`fill`],Jt=[`x`,`y`,`height`,`width`,`fill`],Yt={key:0},Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`clip-path`],Qt={key:0},$t=[`transform`,`font-size`,`fill`,`font-weight`],en={key:0},tn=[`transform`,`font-size`,`font-weight`,`fill`],nn=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],rn=[`data-start`,`data-end`],an={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},on={key:5,class:`vue-data-ui-watermark`},sn=[`innerHTML`],cn=[`id`],ln=280,un=62,dn=60,fn=/*#__PURE__*/ $e({__name:`vue-ui-stackline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},selectedXIndex:{type:Number,default:void 0},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`selectTimeLabel`,`selectX`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:$e,emit:_t}){let fn=rt(()=>import(`./Tooltip-B432XpvC.js`));rt(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n));let pn=rt(()=>import(`./vue-ui-accordion-CV2dxsXB.js`).then(e=>e.n)),mn=rt(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),hn=rt(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),gn=rt(()=>import(`./PackageVersion-BbZ3wNGs.js`).then(e=>e.t)),_n=rt(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_stackline:vn}=Me(),{isThemeValid:yn,warnInvalidTheme:bn}=Re(),xn=mt(),A=e,j=_t,Sn=v(()=>!!A.dataset?.length),M=T(null),N=T(de()),Cn=T(!1),wn=T([]),Tn=T(0),En=T(null),Dn=T(null),On=T(null),kn=T(null),An=T(null),jn=T(!1),Mn=T(!1),Nn=T(0),Pn=T(0),Fn=T(0),In=T(!1),Ln=T(null),Rn=T(null),zn=T(!1),Bn=T(null),Vn=T(null),Hn=T(null),Un=T(null),Wn=dt(null),Gn=T(0),Kn=T(0),P=T(null),qn=T({x:0,y:0}),Jn=T(`pointer`),Yn=Ve({elementRef:Wn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{ir()}});function Xn(){Wn.value=M.value?.parentNode??null}let Zn=!1,Qn=/* @__PURE__ */ new Map,$n=0,er=null,tr=null;function nr(){return new Promise(e=>{let t=requestAnimationFrame(()=>{Qn.delete(t),e(!0)});Qn.set(t,e)})}async function rr(e,t){for(let n=0;n<e;n+=1)if(!await nr()||!t()||Zn)return!1;return!0}async function ir(){if(Zn)return;let e=++Kn.value;await ot();let t=()=>e===Kn.value;t()&&!Zn&&await rr(4,t)&&(Gn.value+=1)}let ar=T(null),F=T(!1);function or(){F.value=!F.value}ut(()=>{Xn(),Yn.start(),In.value=!0,jr(),ir()});let I=T(_r()),L=v(()=>I.value.userOptions),R=v(()=>I.value.style.chart.grid.x.timeLabels),z=v(()=>I.value.style.chart.grid),B=v(()=>I.value.style.chart.lines),V=v(()=>I.value.style.chart.tooltip),H=v(()=>I.value.style.chart);Ae({config:()=>I.value,dataset:()=>A.dataset,component:`VueUiStackline`,rules:[je.emptyArray,{test:e=>e.some(e=>e.series.length>200),message:[`👀 Some series have > 200 datapoints, which can impact performance. Consider:`,``,`▶️ Aggregating data to larger time units, to reduce the number of datapoints.`,``,`▶️ Using filters to constraint the data to a specific time range.`]},{test:e=>e.length>6,message:[`👀 The number of series > 6, which can make the chart hard to read. Consider:`,``,`▶️ Grouping small values into an "Other" category.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]}]});let{transitionEnabled:U}=Be({config:()=>I.value.transitions,dataset:()=>A.dataset}),sr=v(()=>I.value.userOptions.useCursorPointer),cr=v(()=>be({defaultConfig:{userOptions:{show:!1},useCssAnimation:!1,table:{show:!1},tooltip:{show:!1},style:{chart:{backgroundColor:`#99999930`,lines:{totalValues:{show:!1},dataLabels:{show:!1}},grid:{frame:{stroke:`#6A6A6A`},scale:{scaleMin:0,scaleMax:144},x:{axisColor:`#6A6A6A`,linesColor:`#6A6A6A`,axisName:{show:!1},timeLabels:{show:!1}},y:{axisColor:`#6A6A6A`,linesColor:`#6A6A6A`,axisName:{show:!1},axisLabels:{show:!1}}},legend:{backgroundColor:`transparent`},padding:{left:24,right:24,bottom:12},zoom:{show:!1,startIndex:null,endIndex:null,keepState:!1}}}},userConfig:I.value.skeletonConfig??{}})),{loading:lr,FINAL_DATASET:ur,manualLoading:dr}=Pe({...pt(A),FINAL_CONFIG:I,prepareConfig:_r,callback:()=>{Promise.resolve().then(async()=>{(!H.value.zoom.keepState||!oi.value||J.value.start===0&&J.value.end===0)&&await ri()})},skeletonDataset:A.config?.skeletonDataset??[{name:``,series:[3,2,1,5,13,21,8,89,34,55],color:`#8A8A8A`},{name:``,series:[1,2,3,5,8,13,21,34,55,89],color:`#CACACA`}],skeletonConfig:be({defaultConfig:I.value,userConfig:cr.value})}),{userOptionsVisible:fr,setUserOptionsVisibility:pr,keepUserOptionState:mr}=We({config:I.value}),{svgRef:W}=He({config:H.value.title});function hr(){zn.value=!0,pr(!0)}function gr(){pr(!1),zn.value=!1,P.value=null,Jn.value=`pointer`,Cn.value=!1,$.value=null,j(`selectX`,{index:null,indexLabel:null,dataset:null})}function _r(){let e=Ie({userConfig:A.config,defaultConfig:vn}),t={};A.config&&Ee(A.config,`style.chart.grid.x.timeLabels.showFirstAndLast`)&&(e.style.chart.grid.x.timeLabels.showFirstAndLast=!!A.config.style.chart.grid.x.timeLabels.showFirstAndLast);let n=e.theme;if(n){if(!yn.value(e))bn(e),t=e;else{let r=Ie({userConfig:Je[n]||A.config,defaultConfig:e});t={...Ie({userConfig:A.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:xe[n]||re}}}else t=e;return t}let vr=v(()=>B.value.dataLabels.hideUnderValue!==null),yr=v(()=>B.value.dataLabels.hideUnderPercentage!==null),br=fe(A.config);k(()=>A.config,(e,t)=>{let n=fe(e),r=n!==br;br=n;let i=_r();r?(lr.value||(I.value=i),fr.value=!I.value.userOptions.showOnChartHover,G.value.dataLabels.show=B.value.dataLabels.show,G.value.showTable=I.value.table.show,G.value.showTooltip=V.value.show,jr({resetSlicer:!H.value.zoom.keepState}),Nn.value+=1,Pn.value+=1,Fn.value+=1,K.value.width=H.value.width,K.value.height=H.value.height,K.value.paddingRatio={top:H.value.padding.top/H.value.height,right:H.value.padding.right/H.value.width,bottom:H.value.padding.bottom/H.value.height,left:H.value.padding.left/H.value.width},Xn(),ir(),H.value.zoom.keepState&&(!oi.value||J.value.start===0&&J.value.end===0?ri():ni())):(I.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=I.value.style.chart.tooltip.show)},{deep:!0}),k(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(dr.value=!1),H.value.zoom.keepState?ni():Ii(),Xn(),ir()},{deep:!0});function xr(){return{dataLabels:{show:B.value.dataLabels.show},showTable:I.value.table.show,showTooltip:V.value.show}}let G=T(xr());k(I,()=>{G.value=xr()},{immediate:!0});let{isPrinting:Sr,isImaging:Cr,generatePdf:wr,generateImage:Tr}=Fe({elementId:`stackline_${N.value}`,fileName:H.value.title.text||`vue-ui-stackline`,options:I.value.userOptions.print}),Er=v(()=>I.value.userOptions.show&&!H.value.title.text),K=T({width:H.value.width,height:H.value.height,paddingRatio:{top:H.value.padding.top/H.value.height,right:H.value.padding.right/H.value.width,bottom:H.value.padding.bottom/H.value.height,left:H.value.padding.left/H.value.width}}),Dr=v(()=>Te(I.value.customPalette)),Or=dt(null),kr=dt(null),Ar=v(()=>I.value.debug);function jr({resetSlicer:e=!0}={}){if(!Zn){if(Oe(A.dataset)?(he({componentName:`VueUiStackline`,type:`dataset`,debug:Ar.value}),dr.value=!0):A.dataset.forEach((e,t)=>{De({datasetObject:e,requiredAttributes:[`name`,`series`]}).forEach(e=>{he({componentName:`VueUiStackline`,type:`datasetSerieAttribute`,property:e,index:t,debug:Ar.value}),dr.value=!0})}),Oe(A.dataset)||(dr.value=I.value.loading),I.value.responsive){let e=ke(()=>{let{width:e,height:t}=Le({chart:M.value,noTitle:kn.value,title:H.value.title.text?En.value:null,legend:H.value.legend.show?Dn.value:null,slicer:H.value.zoom.show&&Jr.value>6?On.value.$el:null,source:An.value});cancelAnimationFrame(er),er=requestAnimationFrame(()=>{K.value.width=e,K.value.height=t-12,Mn.value=!0})});Or.value&&(kr.value&&Or.value.unobserve(kr.value),Or.value.disconnect()),Or.value=new ResizeObserver(e),kr.value=M.value.parentNode,Or.value.observe(kr.value)}e&&ri()}}lt(()=>{Zn=!0,$n+=1,Kn.value+=1,cancelAnimationFrame(er),cancelAnimationFrame(ja),clearTimeout(tr);for(let[e,t]of Qn)cancelAnimationFrame(e),t(!1);Qn.clear(),Yn.stop(),Or.value&&(kr.value&&Or.value.unobserve(kr.value),Or.value.disconnect())});let Mr=v(()=>z.value.y.position===`right`),{metrics:Nr,ready:Pr,settling:Fr,update:Ir}=Ne({svgRef:W,canMeasure:()=>(!I.value.responsive||Mn.value)&&(!R.value.show||Xi.value),measure:e=>{let t=Hn.value,n=Un.value;return{scaleLabelsWidth:z.value.y.axisLabels.show?e(t).textWidth:0,yAxisLabelWidth:Vn.value?e(Vn.value).rotatedWidth+z.value.y.axisName.fontSize+z.value.y.axisName.offsetX:0,xAxisLabelHeight:e(Bn.value).height,timeLabelsHeight:R.value.show?e(n).height:0,right:0}}}),Lr=v(()=>Nr.value.xAxisLabelHeight+Nr.value.timeLabelsHeight),q=v(()=>{let{height:e,width:t}=K.value,{right:n}=K.value.paddingRatio,r=B.value.totalValues.show&&A.dataset&&A.dataset.length>1?B.value.totalValues.fontSize*1.3:0,{scaleLabelsWidth:i,yAxisLabelWidth:a}=Nr.value,o=i+a,s=Mr.value?0:o,c=Mr.value?o:0,l=H.value.padding.top+r,u=t-t*n-Nr.value.right-c,d=e-H.value.padding.bottom-Lr.value-r,f=H.value.padding.left+s,p=t-f-t*n-Nr.value.right-c,m=e-l-H.value.padding.bottom-Lr.value-r;return{chartHeight:Math.max(0,e),chartWidth:Math.max(0,t),top:l,right:Math.max(0,u),bottom:Math.max(0,d),left:Math.max(0,f),width:Math.max(0,p),height:Math.max(0,m),offsetLeftAxis:s,offsetRightAxis:c,scaleLabelsWidth:i,yAxisLabelWidth:a}}),Rr=v(()=>{let{left:e,top:t,width:n,height:r}=q.value,i=J.value.start,a=J.value.end,o=Math.max(1,a-i),s=Math.max(0,Math.min(o,(Xr.value.start??i)-i)),c=Math.max(0,Math.min(o,(Xr.value.end??a)-i)),l=Math.max(0,c-s),u={fill:H.value.zoom.preview.fill,stroke:H.value.zoom.preview.stroke,"stroke-width":H.value.zoom.preview.strokeWidth,"stroke-dasharray":H.value.zoom.preview.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:{pointerEvents:`none`,transition:`none !important`,animation:`none !important`}},d=n/o;return{x:e+s*d,y:t,width:l*d,height:r,...u}}),zr=v(()=>ur.value.map((e,t)=>{let n=de(),r=le(e.color)||Dr.value[t]||re[t]||re[t%re.length];return{...e,shape:e.shape||`circle`,standalone:!!e.standalone,series:JSON.parse(JSON.stringify(e.series)).map(e=>B.value.distributed?Math.abs(e):e),seriesSource:e.series,signedSeries:e.series.map(e=>e>=0?1:-1),absoluteIndex:t,id:n,color:r}})),Br=v(()=>zr.value.filter(e=>!wn.value.includes(e.id))),Vr=v(()=>Br.value.filter(e=>!e.standalone)),Hr=v(()=>Br.value.filter(e=>e.standalone)),{toggleLegend:Ur,showSeries:Wr,hideSeries:Gr,legendSet:Kr,legendConfig:qr}=i({unmutableDataset:zr,formattedDataset:v(()=>Y.value),segregated:wn,cfgChart:H,debug:Ar,emit:j,chartName:`stackline`,componentName:`VueUiStackline`}),Jr=v(()=>{let e=Math.max(...Br.value.map(e=>e.series.length));return isFinite(e)?e:Math.max(...zr.value.map(e=>e.series.length))});function Yr(e){ar.value=e}let J=T({start:0,end:Math.max(...ur.value.map(e=>e.series.length))}),Xr=T({start:0,end:Math.max(...ur.value.map(e=>e.series.length))}),{isPrecog:Zr,setPrecog:Qr,normalizeZoomState:$r,emitZoomState:ei,clearQueuedSlicerFrame:ti,normalizeSlicerWindow:ni,setupSlicer:ri,onSlicerStart:ii,onSlicerEnd:ai,slicerReady:oi}=t({slicer:J,slicerPrecog:Xr,cfgChart:H,maxSeries:Jr,chartSlicer:On,props:A,emit:j,applyZoomState:e=>Pi(e)}),si=T(!1),ci=T(!1),li=T(!1),ui=T(`matrix(1, 0, 0, 1, 0, 0)`),di=T(!1),fi=0,pi=0,mi=0,hi=0,gi=T(null),_i=T(null),vi=T(null),yi=T(!1),bi=T({time:0,x:0,y:0,pointerType:null}),xi=v(()=>H.value.zoom?.dragToZoom),Si=v(()=>xi.value.show&&Sn.value&&oi.value&&!lr.value);function Ci(e){return(J.value.start??0)+(e??0)}function wi(e=J.value){return{start:Number(e.start),end:Number(e.end)}}function Ti(e,t){let n=Number(q.value?.left)||0,r=Math.max(0,Number(q.value?.width)||0),i=Number(t?.start),a=Number(t?.end),o=a-i;return!Number.isFinite(e)||!Number.isFinite(i)||!Number.isFinite(a)||o<=0?n:o<=1?n+r/2:n+(e-i)/(o-1)*r}function Ei(){if(B.value.distributed)return null;let e=(Ji.value||[]).filter(e=>Number.isFinite(e?.value)&&Number.isFinite(e?.y));if(e.length<2)return null;let t=e.reduce((e,t)=>t.value<e.value?t:e),n=e.reduce((e,t)=>t.value>e.value?t:e);return n.value===t.value||n.y===t.y?null:{minValue:t.value,maxValue:n.value,minY:t.y,maxY:n.y}}function Di(e,t){if(!t||!Number.isFinite(e))return Number(q.value?.bottom)||0;let n=t.maxValue-t.minValue;if(!Number.isFinite(n)||n===0)return t.minY;let r=(e-t.minValue)/n;return t.minY+(t.maxY-t.minY)*r}function Oi({previousRange:e,targetRange:t,previousYScale:n,targetYScale:r}){let i=Number(t.start),a=Number(t.end)-1,o=1,s=0;if(Number.isFinite(i)&&Number.isFinite(a)&&a>i){let n=Ti(i,t),r=Ti(a,t),c=Ti(i,e),l=Ti(a,e),u=r-n;Number.isFinite(u)&&Math.abs(u)>1e-9&&(o=(l-c)/u,s=c-o*n)}let c=1,l=0;if(n&&r){let e=r.minValue,t=r.maxValue,i=Di(e,r),a=Di(t,r),o=Di(e,n),s=Di(t,n),u=a-i;Number.isFinite(u)&&Math.abs(u)>1e-9&&(c=(s-o)/u,l=o-c*i)}return[o,s,c,l].every(Number.isFinite)?`matrix(${o}, 0, 0, ${c}, ${s}, ${l})`:`matrix(1, 0, 0, 1, 0, 0)`}function ki({resetTransform:e=!0}={}){hi+=1,fi&&=(cancelAnimationFrame(fi),0),pi&&=(cancelAnimationFrame(pi),0),mi&&=(clearTimeout(mi),0),di.value=!1,li.value=!1,e&&(ui.value=`matrix(1, 0, 0, 1, 0, 0)`)}function Ai(e,t){return!W.value||lr.value||!Sn.value||!e||!t||typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches?!1:Number.isFinite(e.start)&&Number.isFinite(e.end)&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e.end>e.start&&t.end>t.start}function ji(e,t){let n=wi();if(!Ai(e,n))return ki(),!1;let r=Oi({previousRange:e,targetRange:n,previousYScale:t,targetYScale:Ei()});if(r===`matrix(1, 0, 0, 1, 0, 0)`)return ki(),!1;ki();let i=++hi;return li.value=!0,di.value=!1,ui.value=r,fi=requestAnimationFrame(()=>{fi=0,pi=requestAnimationFrame(()=>{pi=0,i===hi&&(di.value=!0,ui.value=`matrix(1, 0, 0, 1, 0, 0)`,mi=setTimeout(()=>{mi=0,i===hi&&(di.value=!1,li.value=!1)},ln))})}),!0}let Mi=v(()=>({transform:ui.value,transformOrigin:`0 0`,transformBox:`view-box`,transition:di.value?`transform ${ln}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:li.value?`transform`:void 0})),Ni=v(()=>li.value?`url(#vue_ui_stackline_zoom_clip_${N.value})`:void 0);function Pi(e,{transition:t=!1}={}){let n=$r(e);if(!n)return null;let{start:r,end:i}=n;if(r!==Number(J.value.start)||i!==Number(J.value.end)){let e=wi(),n=Ei();ti(),J.value={start:r,end:i},Xr.value={start:r,end:i},ni(),t&&ji(e,n)}return{start:Number(J.value.start),end:Number(J.value.end)}}function Fi(e,{transition:t=!0}={}){let n=Pi(e,{transition:t});return n?(j(`update:zoomState`,n),n):null}lt(()=>{ti(),ba(),ki()});async function Ii({force:e=!1,publish:t=!1,transition:n=e&&t}={}){if(Zn)return;let r=++$n;if(H.value.zoom.keepState&&!e&&oi.value&&(J.value.start!==0||J.value.end!==0)){ni();return}let i=!e,a=n?wi():null,o=n?Ei():null;ri(i),n&&ji(a,o),await ot();let s=()=>r===$n;s()&&!Zn&&await rr(3,s)&&(ri(i),t&&(ei({start:Number(J.value.start),end:Number(J.value.end)}),j(`zoomReset`)))}let Li=v(()=>ve(Vr.value.map(e=>({series:e.series.map(e=>e??0)})))),Ri=v(()=>Li.value.slice(J.value.start,J.value.end)),zi=v(()=>wn.value.length===zr.value.length),Bi=v(()=>{if(!H.value.zoom.minimap.show)return[];let e=zr.value.filter(e=>zi.value?!0:!wn.value.includes(e.id)&&!e.standalone);if(e.length)return ve(e.map(e=>({...e,series:(e.series||[]).map(e=>e??0)})));let t=Hr.value;if(!t.length)return[];let n=Math.max(...t.map(e=>e.series.length||0));return Array.from({length:n},(e,n)=>t.reduce((e,t)=>e+Math.abs(t.series[n]??0),0))}),Vi=v(()=>{if(!H.value.zoom.minimap.show)return[];let e=zr.value.filter(e=>zi.value?!0:!wn.value.includes(e.id)&&!e.standalone),t=Hr.value,n=e.length?[{name:``,series:Bi.value,color:`#000000`,isVisible:!0}]:[],r=t.map(e=>({name:e.name||``,series:(e.series||[]).map(e=>e??0),color:e.color,isVisible:!0}));return n.concat(r)}),Hi=v(()=>ve(Vr.value.map(e=>({...e,series:e.series.map((t,n)=>{let r=t??0;return e.signedSeries[n]===-1&&r>=0?-r:r})}))).slice(J.value.start,J.value.end)),Ui=v(()=>{let e=Vr.value;return{positive:ve(e.map(e=>({...e,series:e.series.slice(J.value.start,J.value.end).map(e=>(e??0)>=0?e??0:0)}))),negative:ve(e.map(e=>({...e,series:e.series.slice(J.value.start,J.value.end).map(e=>(e??0)<0?e??0:0)})))}}),Wi=v(()=>{let e=Math.max(0,J.value.end-J.value.start),t=Array(e).fill(0),n=Array(e).fill(0);return Hr.value.forEach(r=>{for(let i=0;i<e;i+=1){let e=r.series[J.value.start+i]??0;e>0&&(t[i]=Math.max(t[i],e)),e<0&&(n[i]=Math.min(n[i],e))}}),{positive:t,negative:n}}),Gi=v(()=>Hi.value.map((e,t)=>({value:e,sign:e>=0?1:-1})));function Ki(){return{y0:Ji.value?.[0]?.zero??q.value.bottom}}function qi(e){let{y0:t}=Ki(),n=B.value.totalValues,r=Math.max(2,n.fontSize*1.3+n.offsetY),i=e=>Math.min(Math.max(e,q.value.top-B.value.totalValues.fontSize*1.3),q.value.bottom+B.value.totalValues.fontSize*2);if((Gi.value?.[e]?.value??0)>=0||B.value.distributed){let n=1/0;for(let t of Y.value||[]){let r=t?.series?.[e],i=t?.topY?.[e];(r??0)>0&&Number.isFinite(i)&&i<n&&(n=i)}return i((Number.isFinite(n)?n:t)-r-B.value.totalValues.offsetY)}{let a=-1/0;for(let t of Y.value||[]){let n=t?.series?.[e],r=t?.topY?.[e];(n??0)<0&&Number.isFinite(r)&&r>a&&(a=r)}return i((Number.isFinite(a)?a:t)+r+n.fontSize*.7+B.value.totalValues.offsetY)}}let Ji=v(()=>{let e=Math.max(...Ui.value.positive,0),t=Math.min(...Ui.value.negative,0),n=Math.max(...Wi.value.positive,0),r=Math.min(...Wi.value.negative,0),i=Math.max(e,n),a=Math.min(t,r),o=[-1/0,1/0,NaN,void 0,null].includes(a)?0:a,s=z.value.scale.scaleMin,c=z.value.scale.scaleMax,l=!B.value.distributed&&(s!==null||c!==null),u=s!==null&&!B.value.distributed?s:o>0?0:o,d=c!==null&&!B.value.distributed?c:i<0?0:i,f=l?we(u,d,z.value.scale.ticks):pe(u,d,z.value.scale.ticks),p=Math.abs(Number(f.min)||0),m=(Number(f.max)||0)+p,h=m===0||!Number.isFinite(m)?1:m,g=Array.isArray(f.ticks)&&f.ticks.length?f.ticks:[0],ee=q.value.bottom-q.value.height*(p/h);return g.map(e=>{let t=Number(e)||0,n=q.value.bottom-q.value.height*((t+p)/h);return{zero:ee,y:n,x:Mr.value?X.value.right+8:X.value.left-8,value:t}})}),Yi=T([]),Xi=T(!1),Zi=T([]),{getDisplayedTimeLabels:Qi,preciseAllTimeLabels:$i,preciseAllTimeLabelsTooltip:ea,preciseTimeFormatter:ta}=n({cfgTimeLabels:R,timeLabels:Yi,timeLabelsAreReady:Xi,allTimeLabels:Zi,slicer:J,maxSeries:Jr,cfgChart:H,cfgTooltip:V}),na=v(()=>Qi(H.value.timeTag.show?$.value:null)),ra=v(()=>Qi(null)),ia=v(()=>!xn[`time-label`]&&J.value.end-J.value.start>un),aa=v(()=>{let e=(ia.value?ra.value:na.value).map((e,t)=>({timeLabel:e,index:t}));if(!ia.value)return e;let t=e.filter(({timeLabel:e})=>String(e.text??``).length),n=Math.max(2,Math.floor(q.value.width/dn));return t.length<=n?t:Array.from({length:n},(e,r)=>t[Math.round(r*(t.length-1)/(n-1))])}),oa=v(()=>{let e=$.value;return!H.value.timeTag.show||!ia.value||e==null||!Yi.value[e]||aa.value.some(t=>t.index===e)?null:{index:e,timeLabel:Yi.value[e]}});k(()=>[K.value.width,K.value.height,Gn.value,I.value.style.fontFamily,z.value,R.value,B.value,ra.value.map(e=>e?.text??``).join(`|`),A.dataset,Xi.value,Mn.value,wn.value,G.value,J.value.start,J.value.end,Un.value,Hn.value,Bn.value,Vn.value],Ir,{flush:`post`,deep:!0});let sa=v(()=>{let e=Math.max(...Ui.value.positive,0),t=Math.min(...Ui.value.negative,0),n=Math.max(...Wi.value.positive,0),r=Math.min(...Wi.value.negative,0),i=Math.max(e,n),a=Math.min(t,r);return!B.value.distributed&&(z.value.scale.scaleMax!==null||z.value.scale.scaleMin!==null)?we(z.value.scale.scaleMin===null?a>0?0:a:z.value.scale.scaleMin,z.value.scale.scaleMax===null?i<0?0:i:z.value.scale.scaleMax,z.value.scale.ticks):pe(z.value.scale.scaleMin===null?a>0?0:a:z.value.scale.scaleMin,z.value.scale.scaleMax===null?i<0?0:i:z.value.scale.scaleMax,z.value.scale.ticks)}),ca=v(()=>{if(!Sn.value&&!lr.value)return[];let e=q.value.height,t=Ji.value[0]?Ji.value[0].zero:q.value.bottom,n=J.value.start??0,r=J.value.end??0,i=Math.max(1,r-n),{min:a,max:o}=sa.value,s=o+(a>=0?0:Math.abs(a))||1,c=Array(i).fill(0),l=Array(i).fill(0),u=e=>i<=1?q.value.left+q.value.width/2:q.value.left+e/(i-1)*q.value.width;return Br.value.map(r=>{let a=[],o=[],d=[],f=Array(i).fill(null),p=Array(i).fill(null);for(let u=0;u<i;u+=1){let i=n+u,m=r.series?.[i],h=r.signedSeries?.[i],g=m==null||Number.isNaN(m)?0:m,ee=r.standalone?g/s:B.value.distributed?g/(Ri.value[u]||1):g/s;if(g>=0){let n=e*Math.abs(ee);if(r.standalone)f[u]=t,p[u]=t-n;else{let e=c[u],r=e+n;f[u]=t-e,p[u]=t-r,c[u]=r}}else{let n=e*Math.abs(ee);if(r.standalone)f[u]=t,p[u]=t+n;else{let e=l[u],r=e+n;f[u]=t+e,p[u]=t+r,l[u]=r}}a.push(u),o.push(g),d.push(h??(g>=0?1:-1))}let m=a.map(e=>({x:u(e),y:p[e]})),h=m.map(e=>e.x),g=o.reduce((e,t)=>e+Math.abs(t||0),0),ee=g===0?1:g,te=o.map((e,t)=>{if(B.value.distributed&&!r.standalone){let n=a[t],r=Ri.value[n]||1;return(e||0)/r}return(e||0)/ee});return{...r,x:h,points:m,baseY:a.map(e=>f[e]),topY:a.map(e=>p[e]),series:o,signedSeries:d,proportions:te,rel:a,fullSeries:Array.isArray(r.fullSeries)?r.fullSeries:r.series}})}),la=e=>typeof e==`string`?e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,``).trim():``,Y=v(()=>{let e=sa.value,t=Number(e.min)||0,n=Number(e.max)||0,r=Math.abs(t),i=n+r||1,a=(e,t)=>B.value.distributed?t-t*Math.max(0,Math.min(1,e)):Math.max(0,Math.min(t,t-t*(((e??0)+r)/i)));return ca.value.map(e=>{let t=e.x.length,n=Array.isArray(e.fullSeries)?e.fullSeries:e.series,r=({left:e=0,unitW:t})=>{let r=n.length;return!Number.isFinite(t)||t<=0||r<=0?[]:r===1?[e+t*.5]:n.map((n,r)=>e+r*t)},i=({minimapH:e})=>!Number.isFinite(e)||e<=0?[]:n.map(t=>a(t||0,e)),o=({minimapH:e})=>{if(!Number.isFinite(e)||e<=0)return[];let t=a(0,e);return n.map(()=>t)};if(t===0)return{...e,points:[],smoothPath:``,straightPath:``,smoothArea:``,straightArea:``,xMinimap:r,yMinimap:i,yMinimapBase:o};let s=e.x.map((t,n)=>({x:t,y:e.topY[n]})),c=e.x.map((t,n)=>({x:t,y:e.baseY[n]})),l=v(()=>t>=2?ce(s):`M${s[0].x},${s[0].y}`),u=v(()=>t>=2?ue(s):`M${s[0].x},${s[0].y}`),d=v(()=>t>=2?`M${la(l.value)}`:l.value),f=v(()=>t>=2?`M${la(u.value)}`:u.value),p=v(()=>{if(!B.value.useArea||t<2)return``;let e=c[c.length-1];return`M${s[0].x},${s[0].y} ${la(l.value)} L${e.x},${e.y} ${la(ce([...c].reverse()))} Z`}),m=v(()=>{if(!B.value.useArea||t<2)return``;let e=c[c.length-1];return`M${s[0].x},${s[0].y} ${la(u.value)} L${e.x},${e.y} ${la(ue([...c].reverse()))} Z`});return{...e,points:s,get smoothPath(){return d.value},get straightPath(){return f.value},get smoothArea(){return p.value},get straightArea(){return m.value},xMinimap:r,yMinimap:i,yMinimapBase:o}})}),ua=v(()=>$.value===null||$.value===void 0?null:{timeLabel:Ya($.value),absoluteIndex:$.value+J.value.start,seriesIndex:$.value,datapoint:Ha.value,series:Y.value,config:I.value}),X=v(()=>({left:q.value.left,right:q.value.right,width:q.value.width})),da=v(()=>{let e=z.value.y.axisLabels,{prefix:t,suffix:n}=B.value.dataLabels;return Ji.value.map(r=>String(ye(e.formatter,r.value,g({p:t,v:r.value,s:n,r:e.rounding}),{datapoint:r})??``)).join(`|`)});k([da,()=>z.value.y.axisLabels.show,()=>z.value.y.axisLabels.fontSize,()=>z.value.y.axisLabels.bold,()=>z.value.y.position],()=>{z.value.y.axisLabels.show&&ir()},{flush:`post`}),k([()=>A.zoomState,oi],([e,t])=>{t&&e&&Pi(e,{transition:!0})},{deep:!0,immediate:!0});let fa=v(()=>K.value.width),pa=v(()=>K.value.height);Ue({timeLabelsEls:Un,timeLabels:Yi,slicer:J,configRef:I,rotationPath:[`style`,`chart`,`grid`,`x`,`timeLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`grid`,`x`,`timeLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:fa,height:pa,rotation:R.value.autoRotate.angle});let ma=T(null);function ha(e){let t=W.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y,ok:!0}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height),a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y,ok:!0}}let ga=v(()=>!si.value||gi.value==null||_i.value==null?null:{x:Math.min(gi.value,_i.value),y:q.value.top,width:Math.abs(_i.value-gi.value),height:q.value.height}),_a=v(()=>oi.value?Number(J.value.start)!==0||Number(J.value.end)!==Number(Jr.value):!1);function va(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function ya(){ja&&=(cancelAnimationFrame(ja),0),ma.value=null,ar.value=null,P.value=null,$.value=null,Za(!1,null)}function ba(e){let t=e?.pointerId==null?vi.value:e.pointerId;t!=null&&W.value?.hasPointerCapture?.(t)&&W.value.releasePointerCapture(t),si.value=!1,gi.value=null,_i.value=null,vi.value=null}function xa(){yi.value=!0,clearTimeout(tr),tr=setTimeout(()=>{yi.value=!1},0)}function Sa(e){if(!Si.value||!_a.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=bi.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(bi.value={time:0,x:0,y:0,pointerType:null},xa(),ba(e),Ii({force:!0,publish:!0}),!0):(bi.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function Ca(e){if(Z.value<=0)return null;if(Z.value===1||Ma.value<=0)return 0;let t=(va(e)-q.value.left)/Ma.value;return Math.max(0,Math.min(Z.value-1,Math.round(t)))}function wa(e,t){let n=Ca(e),r=Ca(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(J.value.start)+i,end:Number(J.value.start)+a+1}}function Ta(e){let t=Fi(e,{transition:!0});return t?(j(`zoomStart`,{index:t.start,isZoom:t.start!==0}),j(`zoomEnd`,{index:t.end,isZoom:t.end!==Jr.value}),t):null}function Ea(){ci.value=!0,W.value?.classList?.add(`vue-ui-stackline-chart-zoom-pointer-focus`)}function Da(){ci.value=!1,W.value?.classList?.remove(`vue-ui-stackline-chart-zoom-pointer-focus`)}function Oa(e){if(!Si.value||F.value||e.button!==void 0&&e.button!==0||vi.value!=null&&e.pointerId!==vi.value)return;let t=ha(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=q.value;t.x<n||t.x>r||t.y<i||t.y>a||Z.value<=1||(Ea(),W.value?.focus?.({preventScroll:!0}),ya(),vi.value=e.pointerId,si.value=!0,gi.value=va(t.x),_i.value=va(t.x))}function ka(e){if(!Si.value||!si.value||vi.value!=null&&e.pointerId!==vi.value)return;let t=ha(e);t&&(_i.value=va(t.x),gi.value!=null&&Math.abs(_i.value-gi.value)>=2&&!W.value?.hasPointerCapture?.(e.pointerId)&&W.value?.setPointerCapture?.(e.pointerId))}function Aa(e){if(!Si.value||!si.value||vi.value!=null&&e.pointerId!==vi.value)return;let t=ha(e);t&&(_i.value=va(t.x));let n=gi.value,r=_i.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(Sa(e))return;ba(e);return}let i=wa(Math.min(n,r),Math.max(n,r));i?(ba(e),Ta(i)&&(bi.value={time:0,x:0,y:0,pointerType:null},ya(),xa())):ba(e)}let ja=0,Z=v(()=>Math.max(1,J.value.end-J.value.start)),Ma=v(()=>Z.value>1?q.value.width/(Z.value-1):0);function Q(e){return Z.value<=1?q.value.left+q.value.width/2:q.value.left+e*Ma.value}function Na(e){if(Z.value<=1)return{x:q.value.left,width:q.value.width};let t=e===0?q.value.left:(Q(e-1)+Q(e))/2,n=e===Z.value-1?q.value.left+q.value.width:(Q(e)+Q(e+1))/2;return{x:t,width:Math.max(0,n-t)}}function Pa(e){let t=Z.value>1?Math.round((e-q.value.left)/Ma.value):0;return Math.min(Z.value-1,Math.max(0,t))}function Fa(e){F.value||si.value||(ja&&cancelAnimationFrame(ja),ja=requestAnimationFrame(()=>{ja=0;let t=ha(e);if(!t||!W.value){Ra();return}let{left:n,right:r,top:i,bottom:a}=q.value;if(t.x<n||t.x>r||t.y<i||t.y>a){Ra();return}let o=Pa(t.x);ma.value!==o&&(ma.value=o,Za(!0,o))}))}function Ia(e){if(yi.value){yi.value=!1;return}if(si.value)return;let t=ha(e);if(!t||!W.value)return;let{left:n,right:r,top:i,bottom:a}=q.value;if(t.x<n||t.x>r||t.y<i||t.y>a)return;let o=Pa(t.x);Oo({seriesIndex:o,datapoint:bo(o)}),La(o)}function La(e){let t=Y.value.map(t=>({name:t.name,value:t.series[e]===0?0:t.series[e]||null,proportion:t.proportions[e]||null,color:t.color,id:t.id}));I.value.events.datapointClick&&I.value.events.datapointClick({datapoint:t,seriesIndex:e+J.value.start}),j(`selectDatapoint`,{datapoint:t,period:Yi.value[e]})}k(()=>[J.value.start,J.value.end,Y.value.length],()=>{let e=Z.value;$.value!=null&&(e<=0?$.value=null:($.value<0&&($.value=0),$.value>e-1&&($.value=e-1)))});function Ra(){ja&&=(cancelAnimationFrame(ja),0),ma.value=null,Za(!1,null)}let $=T(null),za=v(()=>B.value.dot.show&&J.value.end-J.value.start<B.value.dot.hideAboveMaxSerieLength),Ba=v(()=>B.value.dot.showOnHover&&!za.value),Va=v(()=>[.../* @__PURE__ */ new Set([ar.value,$.value])].filter(e=>e!=null&&e>=0&&e<Z.value)),Ha=v(()=>{let e=$.value,t=e==null?null:Ci(e);return Y.value.map(n=>({slotAbsoluteIndex:n.absoluteIndex,shape:n.shape||`circle`,name:n.name,color:n.color,value:e==null?null:n.series[e],sourceValue:t==null?null:n.seriesSource?.[t],comments:n.comments||[],id:n.id,standalone:!!n.standalone}))}),Ua=v(()=>$.value??ar.value),Wa=dt(null),Ga=T(200),Ka;ut(()=>{Ka=new ResizeObserver(()=>{Wa.value&&(Ga.value=Math.min(200,Math.max(1,Wa.value.getBoundingClientRect().width)))}),Wa.value&&Ka.observe(Wa.value)}),k(Wa,(e,t)=>{t&&Ka?.unobserve(t),e&&Ka?.observe(e)},{flush:`post`}),lt(()=>Ka?.disconnect());let qa=v(()=>{let e=Ga.value/2,t=Q(Ua.value??0);return ge(Math.max(q.value.left+e,Math.min(t,q.value.right-e))-100)}),Ja=v(()=>{let e=Ua.value;if(e==null)return``;let t=H.value.timeTag;if(te(t.customFormat))try{let n=t.customFormat({absoluteIndex:Ci(e),seriesIndex:e,datapoint:Y.value.map(t=>({slotAbsoluteIndex:t.absoluteIndex,shape:t.shape||`circle`,name:t.name,color:t.color,value:t.series[e],sourceValue:t.seriesSource?.[Ci(e)],comments:t.comments||[],id:t.id,standalone:!!t.standalone})),config:I.value});if(typeof n==`string`)return n}catch{console.warn(`Custom format cannot be applied on timeTag.`)}return R.value.datetimeFormatter.enable&&!t.useDefaultFormat?ta.value(Ci(e),t.timeFormat):Yi.value[e]?.text??``});function Ya(e){if(e==null||!V.value.showTimeLabel)return null;let t=Yi.value?.[e]?.text||null,n=ea.value?.[Ci(e)]?.text||null,r=Zi.value?.[Ci(e)]?.text||null;return V.value.useDefaultTimeFormat?t:n||r}let Xa=v(()=>{let e=V.value.customFormat,t=[...Ha.value].reverse(),n=t.filter(e=>!e.standalone),r=t.filter(e=>e.standalone),i=n.map(e=>e.value).filter(e=>se(e)&&e!==null).reduce((e,t)=>Math.abs(e)+Math.abs(t),0),a=te(e)?e({absoluteIndex:$.value+J.value.start,seriesIndex:$.value,datapoint:Ha.value,series:zr.value,config:I.value}):null;if(typeof a==`string`)return a;let{showValue:o,showTotal:s,totalTranslation:c,showPercentage:l,borderColor:u,roundingValue:d,roundingPercentage:f}=V.value,p=e=>!e.shape||![`star`,`triangle`,`square`,`diamond`,`pentagon`,`hexagon`].includes(e.shape)?`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${V.value.backgroundColor}" stroke-width="1" fill="${e.color}" /></svg>`:e.shape===`star`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><polygon stroke="${V.value.backgroundColor}" stroke-width="1" fill="${e.color}" points="${ee({plot:{x:6,y:6},radius:5})}" /></svg>`:e.shape===`triangle`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${oe({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${e.color}" stroke="${V.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`square`?`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${oe({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${e.color}" stroke="${V.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`diamond`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${oe({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${e.color}" stroke="${V.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`pentagon`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${oe({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${e.color}" stroke="${V.value.backgroundColor}" stroke-width="1" /></svg>`:`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${oe({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${e.color}" stroke="${V.value.backgroundColor}" stroke-width="1" /></svg>`,m=(e,t)=>{let n=t?g({v:isNaN((e.value??0)/(i||1))?0:Math.abs(e.value??0)/(i||1)*100,s:`%`,r:f}):``,r=o&&t?`(`:``,a=o&&t?`)`:``;return`
2
+ <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
3
+ <div style="width:20px;height:20px;display:flex;align-items:center;justify-content:center;">${p(e)}</div>
4
+ ${e.name}${o||t?`:`:``}
5
+ ${o?ye(B.value.dataLabels.formatter,e.sourceValue,g({p:B.value.dataLabels.prefix,v:e.sourceValue,s:B.value.dataLabels.suffix,r:d},{datapoint:e})):``} ${r}${n}${a}
6
+ </div>
7
+ `},h=``,ne=Ya($.value);return ne&&(h+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${u};padding-bottom:6px;margin-bottom:3px;">${ne}</div>`),s&&n.length>1&&(h+=`<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
8
+ <span>${c}:</span>
9
+ <span>${ye(B.value.dataLabels.formatter,_e(i),g({p:B.value.dataLabels.prefix,v:_e(i),s:B.value.dataLabels.suffix,r:d}),{datapoint:{name:c,value:_e(i)}})}</span>
10
+ </div>`),n.forEach(e=>{h+=m(e,l)}),r.length&&(h+=`<div style="border-top:1px solid ${Vr.value.length?u:`transparent`}; margin:${Vr.value.length?`6px 0`:`0`};"></div>`,r.forEach(e=>{h+=m(e,!1)})),`<div>${h}</div>`});function Za(e,t=null,n=`pointer`){if(zi.value)return;Jn.value=n,Cn.value=e;let r=Y.value.map(e=>({name:e.name,value:[null,void 0,NaN].includes(e.series[t])?null:e.series[t],color:e.color}));e?(P.value=t,$.value=t,Oo({seriesIndex:t,datapoint:r}),I.value.events.datapointEnter&&I.value.events.datapointEnter({datapoint:r,seriesIndex:t+J.value.start})):(P.value=null,$.value=null,j(`selectX`,{index:null,indexLabel:null,dataset:null}),I.value.events.datapointLeave&&I.value.events.datapointLeave({datapoint:r,seriesIndex:t+J.value.start}))}function Qa(e,t){let n=Y.value.map(e=>({name:e.name,value:e.series[t]===0?0:(e.signedSeries[t]===-1&&e.series[t]>=0?-e.series[t]:e.series[t])||null,proportion:e.proportions[t]||null,color:e.color,id:e.id}));j(`selectTimeLabel`,{datapoint:n,absoluteIndex:e.absoluteIndex,label:e.text})}let $a=v(()=>{if(Y.value.length===0)return{head:[],body:[],config:{},columnNames:[]};let e=Y.value.map(({name:e,color:t})=>({label:e,color:t})),t=[];return ra.value.forEach(e=>{let n=e.absoluteIndex,r=[R.value.values?.[n]?e.text:n+1];Br.value.forEach(e=>{let t=e.series?.[n],i=Number((t??0).toFixed(I.value.table.td.roundingValue));r.push(i)}),t.push(r)}),{head:e,body:t}}),{valueLabel:eo,percentageLabel:to,generateCsv:no}=a({dataLabels:v(()=>B.value.dataLabels),cfgChart:H,tableCsv:$a,fallbackTitle:`vue-ui-stackline`}),ro=v(()=>{let e=[``].concat(Y.value.map(e=>e.name),`__SUM__`),t=[],n=Math.max(0,J.value.end-J.value.start);for(let e=0;e<n;e+=1){let n=Ci(e),r=R.value.values?.[n]?Yi.value?.[e]?.text??n+1:n+1,i=Y.value.map(t=>{let n=t.series?.[e]??0;return Number(n.toFixed(I.value.table.td.roundingValue))}),a=Li.value[n]??0;t.push([r].concat(i,Number(a.toFixed(I.value.table.td.roundingValue))))}return{head:e,body:t,config:{th:{backgroundColor:I.value.table.th.backgroundColor,color:I.value.table.th.color,outline:I.value.table.th.outline},td:{backgroundColor:I.value.table.td.backgroundColor,color:I.value.table.td.color,outline:I.value.table.td.outline},breakpoint:I.value.table.responsiveBreakpoint},colNames:[I.value.table.columnNames.period].concat(Y.value.map(e=>e.name),I.value.table.columnNames.total)}}),io=v(()=>H.value.backgroundColor),ao=v(()=>H.value.legend),oo=v(()=>H.value.title),{isCallbackImaging:so,isCallbackSvg:co,generateSvg:lo,onGenerateImage:uo}=ze({svg:W,title:oo,legend:ao,legendItems:Kr,backgroundColor:io,getSvgCallback:()=>I.value.userOptions.callbacks.svg,generateImage:Tr});async function fo({scale:e=2}={}){if(!M.value)return;let{imageUri:t,base64:n}=await Ge({domElement:M.value,base64:!0,img:!0,scale:e}),r=M.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await me(t,e)??i;return{imageUri:t,base64:n,title:H.value.title.text,...a}}let po=v(()=>h({config:I,style:H,mutableConfig:G,dialog:_n,accordion:pn,isFullscreen:jn,parent:M,maxWidth:800,isCursorPointer:sr}));k([()=>G.value.showTable,Ln],([e])=>{Ln.value&&m(e,I,Ln)},{flush:`post`});function mo(){G.value.showTable=!1,Rn.value&&Rn.value.setTableIconState(!1)}function ho(e){jn.value=e,Tn.value+=1}function go(){G.value.showTable=!G.value.showTable}function _o(){G.value.dataLabels.show=!G.value.dataLabels.show}function vo(){G.value.showTooltip=!G.value.showTooltip}function yo(){return Y.value}function bo(e){let t=e??0,n=Ci(t);return Y.value.map(e=>{let r=e.series[t],i=e.signedSeries?.[t],a=r===0?0:(i===-1&&r>=0?-r:r)||null;return{name:e.name,absoluteIndex:e.absoluteIndex,value:a,proportion:e.proportions?.[t]||null,color:e.color,id:e.id,timeLabel:Zi.value?.[n]||null}})}let xo=v(()=>Array(Jr.value).fill(0).map((e,t)=>bo(t)));k([()=>A.selectedXIndex,()=>J.value.start,()=>J.value.end],([e])=>{if([null,void 0].includes(A.selectedXIndex)){$.value=null;return}let t=e-J.value.start;t<0||e>=J.value.end?$.value=null:$.value=t??null},{immediate:!0});let So=v(()=>{if(B.value.distributed)return{min:-1,max:1};let e=Vr.value,t=Hr.value,n=Math.max(1,...[...e,...t].map(e=>e.series?.length||0)),r=Array(n).fill(0),i=Array(n).fill(0);e.forEach(e=>{for(let t=0;t<n;t+=1){let n=e.series[t]??0;n>=0?r[t]+=n:i[t]+=n}});let a=Array(n).fill(0),o=Array(n).fill(0);t.forEach(e=>{for(let t=0;t<n;t+=1){let n=e.series[t]??0;n>0&&(a[t]=Math.max(a[t],n)),n<0&&(o[t]=Math.min(o[t],n))}});let s=Math.max(0,...r,...a),c=Math.min(0,...i,...o),l=z.value.scale.scaleMin,u=z.value.scale.scaleMax,d=z.value.scale.ticks,f=!B.value.distributed&&(l!==null||u!==null)?we(l===null?c>0?0:c:l,u===null?s<0?0:s:u,d):pe(l===null?c>0?0:c:l,u===null?s<0?0:s:u,d);return{min:Number(f.min)||0,max:Number(f.max)||0}});function Co({minimapH:e,unitW:t},{dataset:n,scale:r,config:i,hasPattern:a}){if(!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<=0)return``;let o=n.filter(e=>!e.standalone),s=n.filter(e=>e.standalone),c=Math.max(0,...n.map(e=>Array.isArray(e.fullSeries)?e.fullSeries.length:e.series.length));if(c<=0)return``;let l=c===1?[t*.5]:Array.from({length:c},(e,n)=>n*t);function u(e,t,n=null){let r=i.smooth?ce:ue,o=r(t),s=``;if(n&&i.useArea){let c=r([...n].reverse()),l=n[n.length-1],u=`M${t[0].x},${t[0].y} ${la(o)} L${l.x},${l.y} ${la(c)} Z`;s+=`<path d="${u}" fill="${a?`url(#pattern_${N.value}_${e.absoluteIndex})`:e.color}" opacity="${i.areaOpacity}" stroke="none" />`}let c=`M${t[0].x},${t[0].y} ${la(o)}`;return s+`<path d="${c}" fill="none" stroke="${e.color}" stroke-width="${i.strokeWidth}" stroke-linecap="round" />`}if(i.distributed){let t=Array.from({length:c},(e,t)=>{let n=0;return o.forEach(e=>{let r=(Array.isArray(e.fullSeries)?e.fullSeries:e.series)?.[t];r!=null&&!Number.isNaN(r)&&(n+=Math.abs(r))}),n||1}),n=t=>e-e*Math.max(0,Math.min(1,t||0)),r=[],i=Array(c).fill(0);return o.forEach(e=>{let a=Array.isArray(e.fullSeries)?e.fullSeries:e.series,o=Array(c),s=Array(c);for(let e=0;e<c;e+=1){let n=a?.[e],r=n==null||Number.isNaN(n)?0:Math.abs(n)/t[e];s[e]=i[e],i[e]+=r,o[e]=i[e]}let d=o.map(n),f=s.map(n),p=l.map((e,t)=>({x:e,y:d[t]})),m=l.map((e,t)=>({x:e,y:f[t]}));r.push(u(e,p,m))}),s.length&&s.forEach(e=>{let i=Array.isArray(e.fullSeries)?e.fullSeries:e.series,a=Array.from({length:c},(e,r)=>n(Math.abs(i?.[r]??0)/t[r])),o=l.map((e,t)=>({x:e,y:a[t]}));r.push(u(e,o))}),r.join(``)}let d=r.min,f=r.max,p=Math.abs(d),m=f+p||1,h=t=>Math.max(0,Math.min(e,t)),g=t=>h(e-e*(((t??0)+p)/m)),ee=[];if(o.length){let e=Array(c).fill(0),t=Array(c).fill(0);o.forEach(n=>{let r=Array.isArray(n.fullSeries)?n.fullSeries:n.series,i=Array(c),a=Array(c);for(let n=0;n<c;n+=1){let o=r?.[n]??0;o>=0?(a[n]=e[n],e[n]+=o,i[n]=e[n]):(a[n]=t[n],t[n]+=o,i[n]=t[n])}let o=i.map(g),s=a.map(g),d=l.map((e,t)=>({x:e,y:o[t]})),f=l.map((e,t)=>({x:e,y:s[t]}));ee.push(u(n,d,f))})}return s.length&&s.forEach(e=>{let t=(Array.isArray(e.fullSeries)?e.fullSeries:e.series).map(g),n=l.map((e,n)=>({x:e,y:t[n]}));ee.push(u(e,n))}),ee.join(``)}let wo=v(()=>{let e={dataset:Y.value,scale:So.value,config:{smooth:B.value.smooth,distributed:B.value.distributed,useArea:B.value.useArea,areaOpacity:B.value.areaOpacity,strokeWidth:B.value.strokeWidth}},t,n;return(r,i)=>(t&&t.minimapH===r.minimapH&&t.unitW===r.unitW&&t.hasPattern===i||(t={...r,hasPattern:i},n=Co(r,{...e,hasPattern:i})),n)});function To(e){return wo.value(e,!!xn.pattern)}function Eo(e,t){let n=B.value,r=n.dataLabels;return n.showDistributedPercentage&&n.distributed?yr.value?t===0?!r.hideEmptyPercentages:Math.abs(t)*100>=r.hideUnderPercentage:!r.hideEmptyPercentages||Math.abs(t)>0:yr.value?(vr.value&&Ar.value&&console.warn(`Vue Data UI - VueUiStackline - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case.`),Math.abs(e)>Do.value*r.hideUnderPercentage/100):vr.value?Math.abs(e)>=r.hideUnderValue:!r.hideEmptyValues||e!==0}let Do=v(()=>Math.max(...Y.value.flatMap(e=>e.series)));function Oo({seriesIndex:e,datapoint:t}){let n=J.value.start+e;j(`selectX`,{dataset:t,index:n,indexLabel:R.value.values[n]})}async function ko(){j(`copyAlt`,{config:I.value,dataset:Y.value}),I.value.userOptions.callbacks.altCopy?await Promise.resolve(I.value.userOptions.callbacks.altCopy({config:I.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Ao=T(!1);function jo(){P.value=null,Ao.value=!0}function Mo(){Da(),P.value=null,Jn.value=`pointer`,Cn.value=!1,$.value=null,j(`selectX`,{index:null,indexLabel:null,dataset:null}),Ao.value=!1}function No(e){if(!W.value||F.value||document.activeElement!==W.value||(Da(),zi.value)||!Z.value)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(Si.value&&(_a.value||si.value)){ba(),Ii({force:!0,publish:!0});return}P.value=null,Jn.value=`pointer`,Cn.value=!1,$.value=null,j(`selectX`,{index:null,indexLabel:null,dataset:null});return}if(r){if(P.value===null)return;La(P.value);return}let a=P.value,o=ma.value,s=a!==null&&a>=0&&a<Z.value,c=o!==null&&o>=0&&o<Z.value;s?n?(a+=1,a>=Z.value&&(a=0)):t&&(--a,a<0&&(a=Z.value-1)):c?(a=n?o+1:o-1,a>=Z.value&&(a=0),a<0&&(a=Z.value-1)):a=n?0:Z.value-1,P.value=a,Po(a),Za(!0,a,`keyboard`)}function Po(e){if(!Number.isFinite(e)||!W.value)return;let t=Q(e),n=q.value.top+q.value.height/2,r=Ce(t,n,W.value);r&&(qn.value=r)}let Fo=v(()=>({headers:ro.value?.colNames??[],rows:ro.value?.body??[]}));$e({getData:yo,getImage:fo,generatePdf:wr,generateCsv:no,generateImage:Tr,generateSvg:lo,hideSeries:Gr,showSeries:Wr,toggleTable:go,toggleLabels:_o,toggleTooltip:vo,toggleAnnotator:or,toggleFullscreen:ho,copyAlt:ko,resetZoom:()=>Ii({force:!0,publish:!0}),setZoomState:Fi});let Io=v(()=>{let e=ui.value.match(/matrix\(([^)]+)\)/)[1].split(`,`).map(Number);return p({enabled:L.value?.annotator?.followZoom,area:q.value,range:J.value,ticks:B.value.distributed?[]:Ji.value,middle:!1,motion:{scaleX:F.value?1:e[0],scaleY:F.value?1:e[3],translateX:F.value?0:e[4],translateY:F.value?0:e[5],transition:!F.value&&di.value?`transform ${ln}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`}})});return(t,n)=>(w(),x(`div`,{id:`stackline_${N.value}`,ref_key:`stacklineChart`,ref:M,class:C({"vue-data-ui-component":!0,"vue-ui-stackline":!0,"vue-data-ui-wrapper-fullscreen":jn.value}),style:ct(`background:${H.value.backgroundColor};color:${H.value.color};font-family:${I.value.style.fontFamily}; position: relative; ${I.value.responsive?`height: 100%`:``}`),onMouseenter:hr,onMouseleave:gr},[S(`div`,{id:`chart-instructions-${N.value}`,class:`sr-only`},[S(`p`,null,ft(I.value.a11y.translations.keyboardNavigation),1)],8,yt),I.value.a11y.includeTable&&Fo.value?.rows?.length?(w(),y(Xe,{key:0,uid:N.value,head:Fo.value.headers,body:Fo.value.rows,notice:I.value.a11y.translations.tableAvailable,caption:I.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),L.value.buttons.annotator?(w(),y(O(mn),at({key:1},O(d)(L.value.annotator),{svgRef:O(W),followZoom:L.value?.annotator?.followZoom,annotationViewport:Io.value,backgroundColor:H.value.backgroundColor,color:H.value.color,active:F.value,isCursorPointer:sr.value,palette:L.value.annotatorPalette,onClose:or}),tt({_:2},[E(O(f),e=>({name:e,fn:ht(n=>[D(t.$slots,e,st(it(O(u)(e,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),D(t.$slots,`userConfig`,{},void 0,!0),Er.value?(w(),x(`div`,{key:2,ref_key:`noTitle`,ref:kn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),H.value.title.text?(w(),x(`div`,{key:3,ref_key:`chartTitle`,ref:En,style:`width:100%;background:transparent;`},[(w(),y(qe,{key:`title_${Nn.value}`,config:{title:{cy:`stackline-title`,...H.value.title},subtitle:{cy:`stackline-subtitle`,...H.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),S(`div`,{id:`legend-top-${N.value}`},null,8,bt),L.value.show&&Sn.value&&(O(mr)||O(fr))?(w(),y(O(hn),at({ref_key:`userOptionsRef`,ref:Rn,key:`user_option_${Tn.value}`,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:O(Sr),isImaging:O(Cr),uid:N.value,hasTooltip:V.value.show&&L.value.buttons.tooltip,isFullscreen:jn.value,chartElement:M.value},O(c)(L.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isTooltip:G.value.showTooltip,isAnnotation:F.value,tableDialog:I.value.table.useDialog,isCursorPointer:sr.value,onToggleFullscreen:ho,onGeneratePdf:O(wr),onGenerateCsv:O(no),onGenerateImage:O(uo),onGenerateSvg:O(lo),onToggleTable:go,onToggleLabels:_o,onToggleTooltip:vo,onToggleAnnotator:or,onCopyAlt:ko,style:{visibility:O(mr)?O(fr)?`visible`:`hidden`:`visible`}}),tt({_:2},[E(O(s)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:ht(n=>[D(t.$slots,e,st(it(O(l)(e,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isFullscreen`,`chartElement`,`isTooltip`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateCsv`,`onGenerateImage`,`onGenerateSvg`,`style`])):b(``,!0),S(`div`,xt,[(w(),x(`svg`,{ref_key:`svgRef`,ref:W,"aria-describedby":`chart-instructions-${N.value}`,xmlns:O(Se),viewBox:`0 0 ${q.value.chartWidth<=0?10:q.value.chartWidth} ${q.value.chartHeight<=0?10:q.value.chartHeight}`,class:C({"vue-data-ui-loading":O(lr),"vue-data-ui-fullscreen--on":jn.value,"vue-data-ui-fulscreen--off":!jn.value,"vue-data-ui-no-transition":!O(U)||O(Fr),"vue-ui-stackline-chart-zoom-pointer-focus":Si.value&&ci.value}),style:ct({maxWidth:`100%`,visibility:O(Pr)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:H.value.color,cursor:Si.value?si.value?`col-resize`:`crosshair`:void 0,touchAction:Si.value?`pan-y`:void 0,userSelect:Si.value?`none`:void 0}),role:`img`,"aria-live":`polite`,tabindex:`0`,preserveAspectRatio:`xMidYMid`,onMousemove:Fa,onMouseleave:Ra,onClick:Ia,onPointerdown:Oa,onPointermove:ka,onPointerup:Aa,onPointercancel:ba,onFocus:jo,onBlur:Mo,onKeydown:No},[nt(O(gn)),D(t.$slots,`svg-underlayer`,{svg:{drawingArea:q.value,data:Y.value,isPrintingImg:O(Sr)||O(Cr)||O(so),isPrintingSvg:O(co)}},void 0,!0),S(`defs`,null,[S(`clipPath`,{id:`vue_ui_stackline_zoom_clip_${N.value}`},[S(`rect`,{x:q.value.left,y:q.value.top,width:Math.max(0,q.value.width),height:Math.max(0,q.value.height)},null,8,wt)],8,Ct)]),(w(!0),x(_,null,E(Vr.value,e=>(w(),x(_,null,[t.$slots.pattern?(w(),x(`defs`,Tt,[D(t.$slots,`pattern`,at({ref_for:!0},{seriesIndex:e.absoluteIndex,patternId:`pattern_${N.value}_${e.absoluteIndex}`}),void 0,!0)])):b(``,!0)],64))),256)),t.$slots[`chart-background`]?(w(),x(`foreignObject`,{key:0,x:X.value.left,y:q.value.top,width:X.value.width,height:q.value.height,style:{pointerEvents:`none`}},[D(t.$slots,`chart-background`,{},void 0,!0)],8,Et)):b(``,!0),B.value.gradient.show?(w(),x(`defs`,Dt,[(w(!0),x(_,null,E(Y.value,(e,t)=>(w(),y(Qe,{t:`linear`,id:`gradient_${e.id}`,key:`gradient_${e.id}_${t}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,e.color,1],[`100%`,O(ne)(e.color,B.value.gradient.intensity/100),1]]},null,8,[`id`,`stops`]))),128))])):b(``,!0),z.value.x.showHorizontalLines?(w(!0),x(_,{key:2},E(Ji.value,(e,t)=>(w(),x(`line`,{x1:X.value.left,x2:X.value.right,y1:e.y,y2:e.y,stroke:z.value.x.linesColor,"stroke-width":z.value.x.linesThickness,"stroke-dasharray":z.value.x.linesStrokeDasharray,"stroke-linecap":`round`},null,8,Ot))),256)):b(``,!0),z.value.y.showVerticalLines?(w(!0),x(_,{key:3},E(J.value.end-J.value.start,(e,t)=>(w(),x(`line`,{x1:Q(t),x2:Q(t),y1:q.value.top,y2:q.value.bottom,stroke:z.value.y.linesColor,"stroke-width":z.value.y.linesThickness,"stroke-dasharray":z.value.y.linesStrokeDasharray,"stroke-linecap":`round`},null,8,kt))),256)):b(``,!0),z.value.x.showAxis?(w(),x(`line`,{key:4,x1:X.value.left,x2:X.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:z.value.x.axisColor,"stroke-width":z.value.x.axisThickness,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,At)):b(``,!0),z.value.y.showAxis&&!B.value.distributed?(w(),x(`line`,{key:5,x1:Mr.value?X.value.right:X.value.left,x2:Mr.value?X.value.right:X.value.left,y1:q.value.top,y2:q.value.bottom,stroke:z.value.y.axisColor,"stroke-width":z.value.y.axisThickness,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,jt)):b(``,!0),z.value.x.axisName.show&&z.value.x.axisName.text?(w(),x(`text`,{key:6,ref_key:`xAxisLabel`,ref:Bn,x:q.value.left+q.value.width/2,y:q.value.chartHeight-3,"font-size":z.value.x.axisName.fontSize,fill:z.value.x.axisName.color,"font-weight":z.value.x.axisName.bold?`bold`:`normal`,"text-anchor":`middle`},ft(z.value.x.axisName.text),9,Mt)):b(``,!0),z.value.y.axisName.show&&z.value.y.axisName.text?(w(),x(`text`,{key:7,ref_key:`yAxisLabel`,ref:Vn,transform:`translate(${Mr.value?q.value.chartWidth-z.value.y.axisName.fontSize/2-z.value.y.axisName.offsetX:z.value.y.axisName.fontSize+z.value.y.axisName.offsetX}, ${q.value.top+q.value.height/2}) rotate(-90)`,"font-size":z.value.y.axisName.fontSize,fill:z.value.y.axisName.color,"font-weight":z.value.y.axisName.bold?`bold`:`normal`,"text-anchor":`middle`},ft(z.value.y.axisName.text),9,Nt)):b(``,!0),z.value.frame.show?(w(),x(`rect`,{key:8,style:{pointerEvents:`none`,transition:`none`,animation:`none !important`},x:X.value.left,y:q.value.top,width:X.value.width,height:q.value.height,fill:`transparent`,stroke:z.value.frame.stroke,"stroke-width":z.value.frame.strokeWidth,"stroke-linecap":z.value.frame.strokeLinecap,"stroke-linejoin":z.value.frame.strokeLinejoin,"stroke-dasharray":z.value.frame.strokeDasharray},null,8,Pt)):b(``,!0),gt([Y.value,B.value,O(U),O(Fr),Mi.value,Ni.value,t.$slots.pattern],()=>(w(),x(`g`,{"clip-path":Ni.value},[S(`g`,{class:C([`vue-ui-stackline-zoom-geometry`,{"vue-ui-stackline-zoom-geometry--transitioning":li.value}]),style:ct(Mi.value)},[(w(!0),x(_,null,E(Y.value,e=>(w(),x(_,null,[B.value.useArea&&!e.standalone?(w(),x(`path`,{key:0,d:B.value.smooth?e.smoothArea:e.straightArea,fill:t.$slots.pattern?`url(#pattern_${N.value}_${e.absoluteIndex})`:B.value.gradient.show?`url(#gradient_${e.id})`:e.color,opacity:B.value.areaOpacity,class:C({"vue-data-ui-transition":O(U)&&!O(Fr)})},null,10,Ft)):b(``,!0)],64))),256)),(w(!0),x(_,null,E(Y.value,e=>(w(),x(`path`,{d:B.value.smooth?e.smoothPath:e.straightPath,stroke:B.value.path.useSerieColor?e.color:B.value.path.stroke,"stroke-width":B.value.strokeWidth,fill:`none`,"stroke-linecap":`round`,class:C({"vue-data-ui-transition":O(U)&&!O(Fr)})},null,10,It))),256))],6)],8,[`clip-path`])),n,0),z.value.y.axisLabels.show&&!B.value.distributed?(w(),x(`g`,{key:9,ref_key:`scaleLabels`,ref:Hn},[(w(!0),x(_,null,E(Ji.value,(e,t)=>(w(),x(`line`,{key:`ytick_${t}`,class:C({"vue-data-ui-transition":O(U)&&!O(Fr)}),x1:Mr.value?X.value.right:X.value.left,x2:Mr.value?X.value.right+6:X.value.left-6,y1:e.y,y2:e.y,stroke:z.value.x.axisColor,"stroke-width":1},null,10,Lt))),128)),(w(!0),x(_,null,E(Ji.value,(e,t)=>(w(),x(`text`,{class:C({"vue-data-ui-transition":O(U)&&!O(Fr)}),transform:`translate(${e.x}, ${e.y+z.value.y.axisLabels.fontSize/3})`,"font-size":z.value.y.axisLabels.fontSize,"font-weight":z.value.y.axisLabels.bold?`bold`:`normal`,fill:z.value.y.axisLabels.color,"text-anchor":Mr.value?`start`:`end`},ft(O(ye)(z.value.y.axisLabels.formatter,e.value,O(g)({p:B.value.dataLabels.prefix,v:e.value,s:B.value.dataLabels.suffix,r:z.value.y.axisLabels.rounding}),{datapoint:e})),11,Rt))),256))],512)):b(``,!0),R.value.show?(w(),x(`g`,{key:10,ref_key:`timeLabelsEls`,ref:Un},[t.$slots[`time-label`]?(w(),x(`g`,zt,[(w(!0),x(_,null,E(na.value,(e,n)=>(w(),x(`g`,null,[D(t.$slots,`time-label`,at({ref_for:!0},{x:Q(n),y:q.value.bottom+z.value.x.timeLabels.fontSize*1.3+z.value.x.timeLabels.offsetY,fontSize:z.value.x.timeLabels.fontSize,fill:z.value.x.timeLabels.color,transform:`translate(${Q(n)}, ${q.value.bottom+R.value.fontSize*1.3+R.value.offsetY}), rotate(${R.value.rotation})`,absoluteIndex:e.absoluteIndex,content:e.text,textAnchor:z.value.x.timeLabels.rotation>0?`start`:z.value.x.timeLabels.rotation<0?`end`:`middle`,show:!0}),void 0,!0)]))),256))])):(w(),x(`g`,Bt,[(w(!0),x(_,null,E(aa.value,({timeLabel:e,index:t})=>(w(),x(`g`,{key:t},[String(e.text).includes(`
11
+ `)?(w(),x(`text`,{key:t+`-multi`,"text-anchor":z.value.x.timeLabels.rotation>0?`start`:z.value.x.timeLabels.rotation<0?`end`:`middle`,"font-size":z.value.x.timeLabels.fontSize,fill:z.value.x.timeLabels.color,transform:`
12
+ translate(
13
+ ${Q(t)},
14
+ ${q.value.bottom+R.value.fontSize*1.3+R.value.offsetY}
15
+ ),
16
+ rotate(${R.value.rotation})
17
+ `,style:ct({cursor:sr.value?`pointer`:`default`}),innerHTML:O(ie)({content:String(e.text),fontSize:z.value.x.timeLabels.fontSize,fill:z.value.x.timeLabels.color,stroke:H.value.backgroundColor,x:0,y:0}),onClick:()=>Qa(e,t)},null,12,Ht)):(w(),x(`text`,{class:`vue-data-ui-time-label`,key:t,"text-anchor":z.value.x.timeLabels.rotation>0?`start`:z.value.x.timeLabels.rotation<0?`end`:`middle`,"font-size":z.value.x.timeLabels.fontSize,"font-weight":z.value.x.timeLabels.bold?`bold`:`normal`,fill:z.value.x.timeLabels.color,stroke:H.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,transform:`translate(${Q(t)}, ${q.value.bottom+R.value.fontSize*1.3+R.value.offsetY}), rotate(${R.value.rotation})`,style:ct({cursor:sr.value?`pointer`:`default`}),onClick:()=>Qa(e,t)},ft(e.text),13,Vt))]))),128))]))],512)):b(``,!0),R.value.show&&oa.value?(w(),x(`text`,{key:11,"text-anchor":R.value.rotation>0?`start`:R.value.rotation<0?`end`:`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:H.value.backgroundColor,"stroke-width":`3`,"paint-order":`stroke fill`,transform:`translate(${Q(oa.value.index)}, ${q.value.bottom+R.value.fontSize*1.3+R.value.offsetY}), rotate(${R.value.rotation})`,onClick:n[1]||=e=>Qa(oa.value.timeLabel,oa.value.index),innerHTML:O(ie)({content:String(oa.value.timeLabel.text),fontSize:R.value.fontSize,fill:R.value.color,stroke:H.value.backgroundColor,x:0,y:0})},null,8,Ut)):b(``,!0),H.value.timeTag.show&&Ua.value!=null?(w(),x(`g`,Wt,[(w(),x(`foreignObject`,{x:qa.value,y:q.value.bottom,width:`200`,height:`40`,style:{overflow:`visible !important`}},[S(`div`,{ref_key:`timeTagEl`,ref:Wa,class:`vue-ui-stackline-time-tag`,style:ct(`width: fit-content;max-width:200px;box-sizing:border-box;margin:0 auto;text-align:center;padding:3px 12px;background:${H.value.timeTag.backgroundColor};color:${H.value.timeTag.color};font-size:${H.value.timeTag.fontSize}px`),innerHTML:Ja.value},null,12,Kt)],8,Gt)),S(`circle`,{cx:Q(Ua.value),cy:q.value.bottom,r:H.value.timeTag.circleMarker.radius,fill:H.value.timeTag.circleMarker.color},null,8,qt)])):b(``,!0),(zn.value||![null,void 0].includes($.value))&&!H.value.highlighter.useLine?(w(!0),x(_,{key:13},E(Va.value,e=>(w(),x(`g`,{key:`tooltip_trap_highlighter_${e}`},[S(`rect`,{x:Na(e).x,y:q.value.top,height:q.value.height,width:Na(e).width,fill:[ar.value,$.value].includes(e)?O(ae)(H.value.highlighter.color,H.value.highlighter.opacity):`transparent`,style:{transition:`none !important`,animation:`none !important`}},null,8,Jt)]))),128)):b(``,!0),(zn.value||![null,void 0].includes($.value))&&H.value.highlighter.useLine?(w(),x(_,{key:14},[![null,void 0].includes($.value)||![null,void 0].includes(ar.value)?(w(),x(`g`,Yt,[S(`line`,{x1:Q(($.value??ar.value)||0),x2:Q(($.value??ar.value)||0),y1:O(_e)(q.value.top),y2:O(_e)(q.value.bottom),stroke:H.value.highlighter.color,"stroke-width":H.value.highlighter.lineWidth,"stroke-dasharray":H.value.highlighter.lineDasharray,"stroke-linecap":`round`,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},null,8,Xt)])):b(``,!0)],64)):b(``,!0),S(`g`,{"clip-path":Ni.value},[S(`g`,{class:C([`vue-ui-stackline-zoom-geometry`,{"vue-ui-stackline-zoom-geometry--transitioning":li.value}]),style:ct(Mi.value)},[(w(!0),x(_,null,E(Y.value,e=>(w(),x(_,{key:`shp_sel_${e.id}`},[zn.value&&Ba.value?(w(),x(`g`,Qt,[$.value==null?b(``,!0):(w(),x(_,{key:0},[$.value<e.points.length&&e.fullSeries?.[J.value.start+$.value]!=null&&!Number.isNaN(e.fullSeries?.[J.value.start+$.value])?(w(),y(Ke,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:B.value.dot.useSerieColor?e.color:B.value.dot.fill,plot:{x:O(ge)(e.points[$.value].x),y:O(ge)(e.points[$.value].y)},radius:B.value.dot.radius*1.3,stroke:B.value.dot.useSerieColor?B.value.dot.stroke:e.color,strokeWidth:B.value.dot.strokeWidth,still:O(lr),class:C({"vue-data-ui-transition":O(U)&&!O(Fr)})},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`still`,`class`])):b(``,!0)],64))])):b(``,!0)],64))),128)),(w(!0),x(_,null,E(Y.value,e=>(w(),x(_,{key:`shp_${e.id}`},[za.value?(w(!0),x(_,{key:0},E(e.points,(t,n)=>(w(),x(`g`,{key:`shp_${e.id}_${J.value.start+n}`},[e.fullSeries?.[J.value.start+e.rel[n]]!=null&&!Number.isNaN(e.fullSeries?.[J.value.start+e.rel[n]])?(w(),y(Ke,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:B.value.dot.useSerieColor?e.color:B.value.dot.fill,plot:{x:t.x,y:t.y},radius:zn.value&&B.value.dot.showOnHover&&$.value===e.rel[n]?B.value.dot.radius*1.3:B.value.dot.radius,stroke:B.value.dot.useSerieColor?B.value.dot.stroke:e.color,strokeWidth:B.value.dot.strokeWidth,still:O(lr),class:C({"vue-data-ui-transition":O(U)&&!O(Fr)})},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`still`,`class`])):b(``,!0)]))),128)):b(``,!0)],64))),128))],6)],8,Zt),G.value.dataLabels.show&&B.value.dataLabels.hideAboveMaxSerieLength>J.value.end-J.value.start?(w(),x(_,{key:15},[(w(!0),x(_,null,E(Y.value,(e,t)=>(w(),x(`g`,{key:`dl_${e.id}`},[(w(!0),x(_,null,E(e.points,(n,r)=>(w(),x(_,{key:`dp_${e.id}_${J.value.start+r}`},[Eo(e.series[r],e.proportions[r])?(w(),x(`text`,{key:0,class:C({"vue-data-ui-transition":O(U)&&!O(Fr)}),transform:`translate(${n.x}, ${n.y+(e.series[r]>=0?-B.value.dataLabels.fontSize/2+B.value.dataLabels.offsetY:B.value.dataLabels.fontSize*1.2-B.value.dataLabels.offsetY)})`,"font-size":B.value.dataLabels.fontSize,fill:B.value.dataLabels.color,"font-weight":B.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`middle`},ft(B.value.showDistributedPercentage&&B.value.distributed?O(to)(e.proportions[r]*100,e,t,e.rel[r]):O(eo)(e.series[r],e,t,e.rel[r],e.signedSeries[r])),11,$t)):b(``,!0)],64))),128))]))),128)),B.value.totalValues.show&&Y.value.length>1?(w(),x(`g`,en,[(w(!0),x(_,null,E(Gi.value,(e,t)=>(w(),x(_,{key:`total_l_${t+J.value.start}`},[!B.value.dataLabels.hideEmptyValues||e.value!==0?(w(),x(`text`,{key:0,class:C({"vue-data-ui-transition":O(U)&&!O(Fr)}),transform:`translate(${Q(t)}, ${qi(t)})`,"text-anchor":`middle`,"font-size":B.value.totalValues.fontSize,"font-weight":B.value.totalValues.bold?`bold`:`normal`,fill:B.value.totalValues.color},ft(O(eo)(e.value,e,t,t,e.sign)),11,tn)):b(``,!0)],64))),128))])):b(``,!0)],64)):b(``,!0),ga.value?(w(),x(`rect`,{key:16,x:ga.value.x,y:ga.value.y,width:ga.value.width,height:ga.value.height,fill:xi.value.selection.fill,"fill-opacity":xi.value.selection.fillOpacity,stroke:xi.value.selection.stroke,"stroke-opacity":xi.value.selection.strokeOpacity,"stroke-width":xi.value.selection.strokeWidth,"stroke-dasharray":xi.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,nn)):b(``,!0),O(Zr)?(w(),x(`rect`,at({key:17},Rr.value,{"data-start":J.value.start,"data-end":J.value.end}),null,16,rn)):b(``,!0),D(t.$slots,`svg`,{svg:{drawingArea:q.value,data:Y.value,isPrintingImg:O(Sr)||O(Cr)||O(so),isPrintingSvg:O(co)}},void 0,!0)],46,St)),t.$slots.hint?(w(),x(`div`,an,[D(t.$slots,`hint`,st(it({hint:I.value.a11y.translations.keyboardNavigation,isVisible:Ao.value})),void 0,!0)])):b(``,!0)]),t.$slots.watermark?(w(),x(`div`,on,[D(t.$slots,`watermark`,st(it({isPrinting:O(Sr)||O(Cr)||O(so)||O(co)})),void 0,!0)])):b(``,!0),In.value&&(H.value.legend.show||t.$slots.legend)?(w(),y(et,{key:6,to:H.value.legend.position===`top`?`#legend-top-${N.value}`:`#legend-bottom-${N.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Dn},[D(t.$slots,`legend`,{legend:O(Kr)},()=>[nt(r,{legend:H.value.legend,legendSet:O(Kr),legendConfig:O(qr),isCursorPointer:sr.value,hasPattern:!!t.$slots.pattern,uid:N.value,segregated:wn.value,loading:O(lr),onToggle:O(Ur)},null,8,[`legend`,`legendSet`,`legendConfig`,`isCursorPointer`,`hasPattern`,`uid`,`segregated`,`loading`,`onToggle`])],!0)],512)],8,[`to`])):b(``,!0),Sn.value&&L.value.buttons.table&&G.value.showTable?(w(),y(o,{key:7,tableComponent:po.value,dataTable:ro.value,useDialog:I.value.table.useDialog,dataLabels:B.value.dataLabels,rounding:I.value.table.td.roundingValue,isCursorPointer:sr.value,setTableRef:e=>Ln.value=e,onClose:mo,onCsv:n[2]||=e=>O(no)(L.value.callbacks.csv)},null,8,[`tableComponent`,`dataTable`,`useDialog`,`dataLabels`,`rounding`,`isCursorPointer`,`setTableRef`])):b(``,!0),H.value.zoom.show&&Sn.value&&O(oi)&&Jr.value>6?(w(),y(Ze,{key:8,ref_key:`chartSlicer`,ref:On,"data-dom-to-png-ignore-layout":``,allMinimaps:Vi.value,background:H.value.zoom.color,borderColor:H.value.backgroundColor,customFormat:H.value.zoom.customFormat,cutNullValues:!1,enableRangeHandles:H.value.zoom.enableRangeHandles,enableSelectionDrag:H.value.zoom.enableSelectionDrag,end:J.value.end,focusOnDrag:H.value.zoom.focusOnDrag,focusRangeRatio:H.value.zoom.focusRangeRatio,fontSize:H.value.zoom.fontSize,immediate:!H.value.zoom.preview.enable,inputColor:H.value.zoom.color,isPreview:O(Zr),labelLeft:R.value.values[J.value.start]?Yi.value?.[0]?.text??``:``,labelRight:R.value.values[J.value.end-1]?Yi.value?.at(-1)?.text??``:``,max:Math.max(...e.dataset.map(e=>e.series.length)),min:0,minimap:Bi.value,minimapCompact:H.value.zoom.minimap.compact,minimapFrameColor:H.value.zoom.minimap.frameColor,minimapIndicatorColor:H.value.zoom.minimap.indicatorColor,minimapMerged:!1,minimapSelectedColor:H.value.zoom.minimap.selectedColor,minimapSelectedColorOpacity:H.value.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:$.value,minimapSelectionRadius:1,preciseLabels:O($i).length?O($i):Zi.value,refreshEndPoint:H.value.zoom.endIndex===null?Math.max(...e.dataset.map(e=>e.series.length)):H.value.zoom.endIndex+1,refreshStartPoint:H.value.zoom.startIndex===null?0:H.value.zoom.startIndex,selectColor:H.value.zoom.highlightColor,selectedSeries:O(te)(H.value.zoom.customFormat)?xo.value:[],smoothMinimap:!1,start:J.value.start,textColor:H.value.color,timeLabels:Zi.value,usePreciseLabels:R.value.datetimeFormatter.enable&&!H.value.zoom.useDefaultFormat,valueEnd:J.value.end,valueStart:J.value.start,verticalHandles:H.value.zoom.minimap.verticalHandles,maxWidth:H.value.zoom.maxWidth,minimapLeftInsetRatio:q.value.chartWidth>0&&H.value.zoom.autoFit?q.value.left/q.value.chartWidth:null,minimapRightInsetRatio:q.value.chartWidth>0&&H.value.zoom.autoFit?(q.value.chartWidth-q.value.right)/q.value.chartWidth:null,isCursorPointer:sr.value,additionalMinimapHeight:H.value.zoom.minimap.additionalHeight,handleType:H.value.zoom.minimap.handleType,handleIconColor:H.value.zoom.minimap.handleIconColor,handleBorderWidth:H.value.zoom.minimap.handleBorderWidth,handleBorderColor:H.value.zoom.minimap.handleBorderColor,handleFill:H.value.zoom.minimap.handleFill,handleWidth:H.value.zoom.minimap.handleWidth,"onUpdate:end":O(ai),"onUpdate:start":O(ii),onTrapMouse:Yr,onReset:n[3]||=()=>Ii({force:!0,publish:!0}),onFutureEnd:n[4]||=e=>O(Qr)(`end`,e),onFutureStart:n[5]||=e=>O(Qr)(`start`,e)},{"reset-action":ht(({reset:e})=>[D(t.$slots,`reset-action`,st(it({reset:e})),void 0,!0)]),slotMap:ht(({width:e,height:t,unitW:n})=>[S(`g`,{innerHTML:To({minimapW:e,minimapH:t,unitW:n})},null,8,sn)]),_:3},8,/* @__PURE__ */ `allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth.onUpdate:end.onUpdate:start`.split(`.`))):b(``,!0),S(`div`,{id:`legend-bottom-${N.value}`},null,8,cn),nt(O(fn),{teleportTo:V.value.teleportTo,show:G.value.showTooltip&&Cn.value,backgroundColor:V.value.backgroundColor,color:V.value.color,fontSize:V.value.fontSize,borderRadius:V.value.borderRadius,borderColor:V.value.borderColor,borderWidth:V.value.borderWidth,backgroundOpacity:V.value.backgroundOpacity,position:V.value.position,offsetX:V.value.offsetX,offsetY:V.value.offsetY,parent:M.value,content:Xa.value,isFullscreen:jn.value,isCustom:V.value.customFormat&&typeof V.value.customFormat==`function`,smooth:V.value.smooth,backdropFilter:V.value.backdropFilter,smoothForce:V.value.smoothForce,smoothSnapThreshold:V.value.smoothSnapThreshold,isA11yMode:Jn.value===`keyboard`,a11yPosition:qn.value},{"tooltip-before":ht(()=>[D(t.$slots,`tooltip-before`,st(it({...ua.value})),void 0,!0)]),tooltip:ht(()=>[D(t.$slots,`tooltip`,st(it({...ua.value})),void 0,!0)]),"tooltip-after":ht(()=>[D(t.$slots,`tooltip-after`,st(it({...ua.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),t.$slots.source?(w(),x(`div`,{key:9,ref_key:`source`,ref:An,dir:`auto`},[D(t.$slots,`source`,{},void 0,!0)],512)):b(``,!0),D(t.$slots,`skeleton`,{},()=>[O(lr)?(w(),y(Ye,{key:0})):b(``,!0)],!0)],46,vt))}},[[`__scopeId`,`data-v-cfdb73a4`]]);export{_t as n,fn as t};
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as ee}from"./chartImage-DPGnEuYM.js";import{n as te}from"./resolveChartConfig-0IvbmIE_.js";import{$ as l,D as ne,Dt as re,Ft as ie,Ht as ae,J as oe,Q as se,S as ce,X as le,Zt as ue,_ as de,at as fe,b as pe,i as me,in as he,nt as ge,pt as _e,rn as ve,sn as ye,t as be,v as xe,w as Se,x as Ce,yt as we,zt as Te}from"./lib-rPeBMZrn.js";import{n as Ee,t as De}from"./useHints-C-TwxM0Y.js";import{t as Oe}from"./useConfig-CBXrYhMI.js";import{t as ke}from"./useSvgLabelLayout-42Kats14.js";import{t as Ae}from"./useLoading-BwiplGDB.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./useChartExport-BZts4KFb.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Re}from"./Shape-CRe8woTu.js";import{n as ze}from"./Title-BliHuXfT.js";import{t as Be}from"./vue_ui_strip_plot-uxKGttVC.js";import{t as Ve}from"./BaseScanner-m6QR9rwD.js";import{t as He}from"./A11yDataTable-DWNlWXzs.js";import{t as Ue}from"./DefGrad-DKMq1REY.js";import{t as We}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as v,normalizeStyle as Ze,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,watch as rt,withCtx as T}from"vue";var it=/* @__PURE__ */ e({default:()=>It}),at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`viewBox`,`aria-describedby`],lt=[`x`,`y`,`width`,`height`],ut={key:1},dt={key:0},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt={key:1},mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],_t=[`transform`,`fill`,`font-size`],vt=[`transform`,`font-size`,`fill`,`text-anchor`],yt=[`transform`,`font-size`,`fill`,`text-anchor`,`innerHTML`],bt=[`fill`,`font-size`,`transform`],xt=[`fill`,`font-size`,`x`,`y`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ct=[`cx`,`cy`,`fill`],wt=[`cx`,`cy`,`fill`],Tt=[`d`,`fill`,`stroke`,`fill-opacity`,`stroke-opacity`,`stroke-width`,`onMouseenter`],Et=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-opacity`,`stroke-width`],Dt=[`onMouseenter`],Ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],kt=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],At=[`cx`,`cy`,`r`,`fill`,`stroke`],jt={key:1},Mt=[`x`,`y`,`font-size`,`fill`],Nt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Pt={key:5,class:`vue-data-ui-watermark`},Ft={style:{display:`flex`,"align-items":`center`}},It=/*#__PURE__*/ We({__name:`vue-ui-strip-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:We,emit:it}){let It=g(()=>import(`./Tooltip-B432XpvC.js`)),Lt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Rt=g(()=>import(`./vue-ui-accordion-CV2dxsXB.js`).then(e=>e.n)),zt=g(()=>import(`./DataTable-KeuZB1JM.js`)),Bt=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Vt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ht=g(()=>import(`./PackageVersion-BbZ3wNGs.js`).then(e=>e.t)),Ut=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),Wt=[`classic`,`scatter`,`violin`],{vue_ui_strip_plot:Gt}=Oe(),E=e,Kt=it,qt=d({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),Jt=b(le()),Yt=b(0),Xt=b(!1),Zt=b(``),D=b(null),Qt=b(null),$t=b(null),en=b(null),tn=b(!1),nn=b(0),rn=b(0),an=b(null),on=b(null),sn=b(null),cn=b(null),ln=b(null),un=b(null),dn=b(null),fn=b(null),O=b(`pointer`),pn=b({x:0,y:0}),mn=b(!1),k=b(wn()),A=d(()=>k.value.userOptions),j=d(()=>k.value.style.chart.tooltip),M=d(()=>k.value.style.chart.labels),N=d(()=>k.value.style.chart.violin),P=d(()=>k.value.style.chart.grid),F=d(()=>k.value.style.chart);Ee({config:()=>k.value,dataset:()=>E.dataset,component:`VueUiStripPlot`,rules:[De.emptyArray,{test:e=>e.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the chart to display related series.`]}]});let{transitionEnabled:hn}=Pe({config:()=>k.value.transitions,dataset:()=>E.dataset}),gn=d(()=>Tn(k.value.type)),I=d(()=>k.value.userOptions.useCursorPointer),_n=d(()=>he({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,padding:{top:24,left:24,right:24,bottom:24},grid:{stroke:`#6A6A6A`,horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},plots:{stroke:`#6A6A6A`},labels:{bestPlotLabel:{show:!1},axis:{xLabel:``,yLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:vn,FINAL_DATASET:yn,manualLoading:bn}=Ae({...nt(E),FINAL_CONFIG:k,prepareConfig:wn,skeletonDataset:E.config?.skeletonDataset??[{name:`_`,color:`#DBDBDB`,plots:[{name:`_`,value:1},{name:`_`,value:2},{name:`_`,value:3}]},{name:`_`,color:`#C4C4C4`,plots:[{name:`_`,value:3},{name:`_`,value:5},{name:`_`,value:8}]},{name:`_`,color:`#ADADAD`,plots:[{name:`_`,value:8},{name:`_`,value:13},{name:`_`,value:21}]},{name:`_`,color:`#969696`,plots:[{name:`_`,value:21},{name:`_`,value:34},{name:`_`,value:55}]},{name:`_`,color:`#808080`,plots:[{name:`_`,value:55},{name:`_`,value:89},{name:`_`,value:144}]}],skeletonConfig:he({defaultConfig:k.value,userConfig:_n.value})}),{userOptionsVisible:xn,setUserOptionsVisibility:Sn,keepUserOptionState:Cn}=Fe({config:k.value}),{svgRef:L}=Ie({config:F.value.title});function wn(){return te(E.config,Gt,Be)}function Tn(e){return Wt.includes(e)?e:`classic`}let En=ue(E.config);rt(()=>E.config,async(e,t)=>{let n=ue(e),r=n!==En;En=n;let i=wn();r?(vn.value||(k.value=i),xn.value=!k.value.userOptions.showOnChartHover,jn(),nn.value+=1,rn.value+=1,V.value.dataLabels.show=M.value.bestPlotLabel.show,V.value.showTable=k.value.table.show,V.value.showTooltip=j.value.show,k.value.responsive||(z.value=F.value.width,B.value=F.value.height,Vn.value=F.value.plots.radius)):(k.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=k.value.style.chart.tooltip.show)},{deep:!0}),rt(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(bn.value=!1)},{deep:!0});let R=tt(null),Dn=tt(null),On=b(!1),kn=0;$e(()=>{jn()});let An=d(()=>k.value.debug);function jn(){Te(E.dataset)?(fe({componentName:`VueUiStripPlot`,type:`dataset`,debug:An.value}),bn.value=!0):E.dataset.forEach((e,t)=>{we({datasetObject:e,requiredAttributes:[`name`,`plots`]}).forEach(e=>{qt.value=!1,fe({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:An.value})}),e.plots&&e.plots.forEach((e,n)=>{we({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{qt.value=!1,fe({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:`${t},${n}`,debug:An.value})})})}),Te(E.dataset)||(bn.value=k.value.loading),k.value.responsive&&(R.value&&(Dn.value&&R.value.unobserve(Dn.value),R.value.disconnect()),R.value=new ResizeObserver(()=>{let{width:e,height:t}=Me({chart:D.value,title:F.value.title.text?Qt.value:null,source:$t.value,noTitle:en.value});cancelAnimationFrame(kn),kn=requestAnimationFrame(()=>{Bn.value=t,z.value=Math.max(.1,e),B.value=Math.max(.1,t-12),On.value=!0,k.value.responsiveProportionalSizing?Vn.value=ve({relator:Math.min(t,e),adjuster:600,source:F.value.plots.radius,threshold:6,fallback:6}):Vn.value=F.value.plots.radius})}),Dn.value=D.value.parentNode,R.value.observe(Dn.value)),tn.value=!0,setTimeout(()=>{Rn.value=!1},Zn.value*50)}Qe(()=>{cancelAnimationFrame(kn),R.value&&(Dn.value&&R.value.unobserve(Dn.value),R.value.disconnect())});let{isPrinting:Mn,isImaging:Nn,generatePdf:Pn,generateImage:Fn}=je({elementId:`strip-plot_${Jt.value}`,fileName:F.value.title.text||`vue-ui-strip-plot`,options:k.value.userOptions.print}),In=d(()=>k.value.userOptions.show&&!F.value.title.text),Ln=d(()=>Se(k.value.customPalette)),Rn=b(k.value.useCssAnimation),zn=b({top:F.value.padding.top,bottom:F.value.padding.bottom,left:F.value.padding.left,right:F.value.padding.right}),z=b(F.value.width),B=b(F.value.height),Bn=b(F.value.height),Vn=b(F.value.plots.radius),V=b({showTable:k.value.table.show,dataLabels:{show:M.value.bestPlotLabel.show},showTooltip:j.value.show});rt(k,()=>{V.value={showTable:k.value.table.show,dataLabels:{show:M.value.bestPlotLabel.show},showTooltip:j.value.show},k.value.responsive||(z.value=F.value.width,B.value=F.value.height,Vn.value=F.value.plots.radius)},{immediate:!0});let H=d(()=>Math.min(Vn.value,W.value.stripWidth/2*.9));function U(e){return Number.isFinite(e)?Number(e.toFixed(2)):0}function Hn(){return Math.max(0,(W.value.stripWidth/2-H.value*1.8)*.86)*Math.min(1,N.value.widthRatio)}let{metrics:Un,ready:Wn,settling:Gn,update:Kn}=ke({svgRef:L,canMeasure:()=>!k.value.responsive||On.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(un.value).textWidth,yAxisLabelWidth:e(cn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(ln.value).height})});function qn(){let e=Un.value.scaleLabelsWidth,t=Un.value.yAxisLabelWidth;return e+t+(t?24:0)}let Jn=d(()=>Un.value.xAxisLabelHeight+Un.value.timeLabelsHeight+(sn.value?M.value.axis.fontSize/3+12+M.value.axis.xLabelOffsetY:0)+(ln.value?12:0)),W=d(()=>{let e=qn(),t=zn.value.left+e+M.value.axis.yLabelOffsetX+5,n=z.value-zn.value.right,r=Math.max(0,n-t),i=zn.value.top+F.value.plots.radius+M.value.bestPlotLabel.fontSize,a=B.value-zn.value.bottom-Jn.value,o=Math.max(0,a-i),s=Array.isArray(yn.value)?yn.value.length:0;return{left:t,right:n,top:i,bottom:a,width:r,height:o,stripWidth:s>0?r/s:0,absoluteHeight:B.value}});function Yn(e){return W.value.left+(e+1)*W.value.stripWidth-W.value.stripWidth/2}let Xn=d(()=>yn.value.map((e,t)=>{let n=le();return{...e,id:n,color:e.color?ce(e.color):Ln.value[t]||ae[t]||ae[t%ae.length],plots:e.plots.map((r,i)=>({...r,value:pe(r.value),parentId:n,parentName:e.name,parentIndex:t,plotIndex:i,color:e.color?ce(e.color):Ln.value[t]||ae[t]||ae[t%ae.length],id:le()})).sort((e,t)=>e.value-t.value)}})),G=d(()=>(Xn.value||[]).map((e,t)=>({...e,plots:e.plots.map(e=>({...e,x:Yn(t)}))}))),Zn=d(()=>Math.max(...G.value.map(e=>e.plots.length))),Qn=d(()=>{let e=G.value.flatMap(e=>e.plots.map(e=>e.value));return{max:Math.max(...e),min:Math.min(...e)}}),$n=d(()=>{let e=P.value.scaleMin,t=P.value.scaleMax,n=Math.max(2,P.value.scaleSteps),r=Qn.value.min<0?Qn.value.min:0,i=Qn.value.max;if(e===null&&t===null)return de(r,i,n);if(e!==null&&t!==null)return xe(e,t,n);let a=de(e===null?r:e,t===null?i:t,n);return xe(e===null?a.min:e,t===null?a.max:t,n)});function K(e){let t=$n.value.max-$n.value.min;return t?W.value.bottom-(e-$n.value.min)/t*W.value.height:W.value.bottom}let q=d(()=>(G.value||[]).map((e,t)=>{let n=e.plots.map(e=>({...e,y:K(e.value)})),r=gn.value===`classic`?n.map(()=>0):nr(n);return{...e,plots:n.map((e,t)=>({...e,x:e.x+r[t]}))}})),J=d(()=>gn.value===`violin`&&!!N.value?.boxPlot?.show);function er(e,t){if(!e.length)return 0;if(e.length===1)return e[0];let n=(e.length-1)*t,r=Math.floor(n),i=n-r,a=e[r+1];return a===void 0?e[r]:e[r]+i*(a-e[r])}let Y=d(()=>J.value?q.value.map((e,t)=>{let n=e.plots.map(e=>e.value).sort((e,t)=>e-t),r=er(n,.25),i=er(n,.5),a=er(n,.75),o=a-r,s=r-o*1.5,c=a+o*1.5,ee=n.find(e=>e>=s),te=n.slice().reverse().find(e=>e<=c),l=Yn(t),ne=Math.max(H.value*2.8,Math.min(Hn()*.32,W.value.stripWidth*.12))*Math.min(1.5,N.value.boxPlot.widthRatio);return{id:e.id,boxPlotColor:N.value.boxPlot.useSerieColor?e.color:N.value.boxPlot.color,color:e.color,name:e.name,count:n.length,lowerAdjacent:ee??n[0],q1:r,median:i,q3:a,upperAdjacent:te??n[n.length-1],iqr:o,lowerFence:s,upperFence:c,centerX:l,boxLeft:l-ne/2,boxWidth:ne,q1Y:K(r),medianY:K(i),q3Y:K(a),lowerY:K(ee??n[0]),upperY:K(te??n[n.length-1])}}):[]),tr=d(()=>[k.value.table.columnNames.series,N.value.tooltipLabels.lowerAdjacent,N.value.tooltipLabels.q1,N.value.tooltipLabels.median,N.value.tooltipLabels.q3,N.value.tooltipLabels.upperAdjacent,N.value.tooltipLabels.iqr,N.value.tooltipLabels.count]);function X(e){return l({p:M.value.prefix,v:e,s:M.value.suffix,r:k.value.table.td.roundingValue})}function nr(e){let t=gn.value===`violin`?Math.max(0,Hn()-H.value*1.15):Math.max(0,W.value.stripWidth/2-H.value*1.5);if(!e.length||!t)return e.map(()=>0);let n=e.map(()=>0),r=H.value*2.1,i=Math.min(t,r),a=[0];for(let e=i;e<=t+i/2;e+=i)a.push(-Math.min(e,t)),a.push(Math.min(e,t));let o=[];return e.forEach((e,t)=>{let i=a.find(t=>o.every(n=>{let i=t-n.offset,a=e.y-n.y;return Math.hypot(i,a)>=r}))??0;n[t]=i,o.push({y:e.y,offset:i})}),n}let rr=d(()=>gn.value===`violin`?q.value.map((e,t)=>({id:e.id,color:N.value.useSerieColor?e.color:N.value.stroke,fill:N.value.useSerieColor?e.color:N.value.fill,path:ir(e.plots,t),connectors:ar(e.plots,t)})):[]);function ir(e,t){let n=Hn();if(!e.length||!W.value.height||!n)return``;let r=Yn(t),i=e.map(e=>e.y),a=Z(i),o=sr({yValues:i,bandwidth:a});return o.length>1?o.map(e=>lr({yValues:e,centerX:r,maxWidth:or({clusterLength:e.length,totalLength:i.length,maxWidth:n}),bandwidth:Z(e)})).join(` `):lr({yValues:i,centerX:r,maxWidth:n,bandwidth:a})}function ar(e,t){if(!e.length)return[];let n=Yn(t),r=e.map(e=>e.y),i=sr({yValues:r,bandwidth:Z(r)});return i.length<2?[]:i.slice(1).map((e,t)=>{let r=i[t],a=Z(r),o=Z(e),s=Ce(Math.max(...r)+a*2.35,W.value.top,W.value.bottom),c=Ce(Math.min(...e)-o*2.35,W.value.top,W.value.bottom);return{x:U(n),y1:U(s),y2:U(c)}})}function or({clusterLength:e,totalLength:t,maxWidth:n}){let r=(e/t)**.6,i=e<=2?.72:1;return Math.max(H.value*2.2,n*Ce(r*i,.18,1))}function Z(e){let t=e.reduce((e,t)=>e+t,0)/Math.max(1,e.length),n=e.reduce((e,n)=>e+(n-t)**2,0)/Math.max(1,e.length),r=Math.sqrt(n),i=e.length<2?Math.max(H.value*2.6,W.value.height/48):H.value*2.1;return Ce(1.06*r*e.length**-.2,i,W.value.height/5)}function sr({yValues:e,bandwidth:t}){if(e.length<2)return[e];let n=[...e].sort((e,t)=>e-t),r=Math.max(t*1.45,H.value*5),i=[],a=[n[0]];for(let e=1;e<n.length;e+=1)Math.abs(n[e]-n[e-1])>r?(i.push(a),a=[n[e]]):a.push(n[e]);return i.push(a),cr(i)}function cr(e){return e.reduce((e,t)=>{let n=e[e.length-1];if(!n)return e.push(t),e;let r=Z(n),i=Z(t);return Math.max(...n)+r*2.35>=Math.min(...t)-i*2.35?n.push(...t):e.push(t),e},[])}function lr({yValues:e,centerX:t,maxWidth:n,bandwidth:r}){let i=Ce(Math.min(...e)-r*2.35,W.value.top,W.value.bottom),a=Ce(Math.max(...e)+r*2.35,W.value.top,W.value.bottom),o=Math.max(48,Math.min(120,Math.round((a-i)/Math.max(1,r/4)))),s=Array.from({length:o},(t,n)=>{let s=i+(a-i)*n/Math.max(1,o-1);return{y:s,density:e.reduce((e,t)=>{let n=(s-t)/r;return e+Math.exp(-.5*n*n)},0)}}),c=Math.max(...s.map(e=>e.density));if(!c)return``;let ee=s.map((e,t)=>{let r=t===0||t===s.length-1?0:e.density/c*n;return{y:U(e.y),width:U(r)}}),te=ee.map(e=>({x:U(t-e.width),y:e.y})),l=ee.slice(0,-1).reverse().map(e=>({x:U(t+e.width),y:e.y}));return`${ur([...te,...l])} Z`}function ur(e){if(!e.length)return``;if(e.length===1)return`M ${e[0].x} ${e[0].y}`;let t=`M ${e[0].x} ${e[0].y}`;for(let n=1;n<e.length-1;n+=1){let r=e[n],i=e[n+1],a=U((r.x+i.x)/2),o=U((r.y+i.y)/2);t+=` Q ${r.x} ${r.y} ${a} ${o}`}let n=e[e.length-1];return`${t} L ${n.x} ${n.y}`}let dr=d(()=>$n.value.ticks.map(e=>({y:K(e),x1:W.value.left,x2:W.value.right,value:e}))),fr=b(null),Q=b(null);function pr({datapoint:e,seriesIndex:t}){O.value!==`keyboard`&&(Xt.value=!1,Q.value=null,k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function mr({datapoint:e,seriesIndex:t}){Kt(`selectDatapoint`,e),k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t})}function hr(e,t={}){return me(M.value.formatter,e,l({p:M.value.prefix,v:e,s:M.value.suffix,r:j.value.roundingValue}),t)}function gr({datapoint:e,seriesIndex:t,triggerMode:n=`pointer`}){k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t}),O.value=n,fr.value={datapoint:e,seriesIndex:t,config:k.value,series:Xn.value},Xt.value=!0,Q.value=e;let r=j.value.customFormat;if(re(r)&&_e(()=>r({seriesIndex:t,datapoint:e,series:Xn.value,config:k.value})))Zt.value=r({seriesIndex:t,datapoint:e,series:Xn.value,config:k.value});else{let n=``;n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${F.value.plots.gradient.show?`url(#${e.parentId})`:e.color}"/></svg>${e.name}</div>`,n+=`<div>${hr(e.value,{datapoint:e,seriesIndex:t})}</div>`,Zt.value=`<div>${n}</div>`}}function _r(){O.value!==`keyboard`&&(Xt.value=!1,Q.value=null)}function vr({boxPlot:e,seriesIndex:t,triggerMode:n=`pointer`}){O.value=n,Q.value=null,Xt.value=!0,fr.value={boxPlot:e,seriesIndex:t,config:k.value,series:Xn.value};let r=j.value.customFormat;if(re(r))try{let n={boxPlot:e,seriesIndex:t,series:Xn.value,config:k.value};if(_e(()=>r(n))){Zt.value=r(n);return}}catch{}let i=[[N.value.tooltipLabels.upperAdjacent,e.upperAdjacent],[N.value.tooltipLabels.q3,e.q3],[N.value.tooltipLabels.median,e.median],[N.value.tooltipLabels.q1,e.q1],[N.value.tooltipLabels.lowerAdjacent,e.lowerAdjacent],[N.value.tooltipLabels.iqr,e.iqr]],a=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="1" y="1" width="10" height="10" rx="2" stroke="none" fill="${e.color}"/></svg>`,o=i.map(([n,r])=>`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;"><span>${n}</span><b>${hr(r,{boxPlot:e,seriesIndex:t})}</b></div>`).join(``);Zt.value=`<div style="min-width:160px;"><div style="display:flex;flex-direction:row;gap:6px;align-items:center;margin-bottom:6px;">${a}${e.name}</div>`+o+`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;margin-top:6px;"><span>${N.value.tooltipLabels.count}</span><b>${e.count}</b></div></div>`}let yr=d(()=>({head:G.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(t=>({name:`${e.name} - ${t.name}`,color:t.color}))),body:G.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(e=>e.value))}));function br(e=null){Ye(()=>{let t=[],n=[k.value.table.columnNames.series,k.value.table.columnNames.value];J.value?(n=tr.value,t=Y.value.map(e=>[[e.name],[e.lowerAdjacent],[e.q1],[e.median],[e.q3],[e.upperAdjacent],[e.iqr],[e.count]])):t=yr.value.head.map((e,t)=>[[e.name],[yr.value.body[t]]]);let r=[[F.value.title.text],[F.value.title.subtitle.text],n.map(e=>[e])].concat(t),i=ne(r);e?e(i):ge({csvContent:i,title:F.value.title.text||`vue-ui-strip-plot`})})}let xr=d(()=>{if(J.value){let e=tr.value;return{colNames:e,head:e,body:Y.value.map(e=>[{color:e.color,name:e.name},X(e.lowerAdjacent),X(e.q1),X(e.median),X(e.q3),X(e.upperAdjacent),X(e.iqr),e.count]),config:{th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint}}}let e=[k.value.table.columnNames.series,k.value.table.columnNames.value],t=yr.value.head.map((e,t)=>{let n=l({p:M.value.prefix,v:yr.value.body[t],s:M.value.suffix,r:k.value.table.td.roundingValue});return[{color:e.color,name:e.name},n]}),n={th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint};return{colNames:[k.value.table.columnNames.series,k.value.table.columnNames.value],head:e,body:t,config:n}}),$=b(!1);function Sr(e){$.value=e,Yt.value+=1}function Cr(){return G.value}function wr(){V.value.showTable=!V.value.showTable}function Tr(){V.value.dataLabels.show=!V.value.dataLabels.show}function Er(){V.value.showTooltip=!V.value.showTooltip}let Dr=b(!1);function Or(){Dr.value=!Dr.value}let kr=ee(D,()=>F.value.title.text),Ar=d(()=>G.value.map(e=>e.name)),jr=b({start:0,end:G.value.length});Le({timeLabelsEls:ln,timeLabels:Ar,slicer:jr,configRef:k,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:z,height:B,targetClass:`.vue-ui-strip-plot-category-name`,rotation:M.value.xAxisLabels.autoRotate.angle});let Mr=d(()=>c({config:k,style:F,mutableConfig:V,dialog:Ut,accordion:Rt,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:I}));rt(()=>V.value.showTable,e=>s(e,k,an));function Nr(){V.value.showTable=!1,on.value&&on.value.setTableIconState(!1)}let Pr=d(()=>F.value.backgroundColor),Fr=d(()=>F.value.title),{isCallbackImaging:Ir,isCallbackSvg:Lr,generateSvg:Rr,onGenerateImage:zr}=Ne({svg:L,title:Fr,legend:null,legendItems:null,backgroundColor:Pr,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Fn});async function Br(){Kt(`copyAlt`,{config:k.value,dataset:q.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Vr(){return q.value.length}function Hr(e){return q.value[e]?.plots??[]}function Ur(e=dn.value,t=fn.value){return!Number.isInteger(e)||!Number.isInteger(t)?null:Hr(e)[t]??null}function Wr(){dn.value=null,fn.value=null,O.value=`pointer`,Xt.value=!1,Q.value=null}function Gr(e){if(!e||!L.value)return;let t=L.value.getBoundingClientRect();pn.value={x:t.left+e.x/z.value*t.width,y:t.top+e.y/B.value*t.height}}function Kr(e,t){let n=Ur(e,t);n&&(dn.value=e,fn.value=t,O.value=`keyboard`,Gr(n),gr({datapoint:n,seriesIndex:e,triggerMode:`keyboard`}))}function qr(){mn.value=!0,dn.value=null,fn.value=null}function Jr(){mn.value=!1,Wr()}function Yr(e){if(!L.value||Dr.value||document.activeElement!==L.value||!Vr())return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){Wr();return}let s=dn.value,c=fn.value;if(s===null||c===null)s=0,c=0;else if(t||n){let e=Vr();s=n?(s+1)%e:(s-1+e)%e;let t=Hr(s);if(!t.length)return;c=Math.min(c,t.length-1)}else if(r||i){let e=Hr(s);if(!e.length)return;c=r?(c+1)%e.length:(c-1+e.length)%e.length}if(a){let e=Ur();if(!e)return;mr({datapoint:e,seriesIndex:dn.value})}else Kr(s,c)}let Xr=d(()=>({headers:xr.value?.colNames??[],rows:xr.value?.body?.map(e=>e.map(e=>e&&typeof e==`object`&&`name`in e?e.name:e))??[]}));return We({getData:Cr,getImage:kr,generatePdf:Pn,generateCsv:br,generateImage:Fn,generateSvg:Rr,toggleTable:wr,toggleLabels:Tr,toggleTooltip:Er,toggleAnnotator:Or,toggleFullscreen:Sr,copyAlt:Br}),rt(()=>[z.value,B.value,M.value,F.value,k.value.style.fontFamily,E.dataset,On.value,un.value,ln.value,sn.value,cn.value],Kn,{flush:`post`,deep:!0}),(e,s)=>(y(),m(`div`,{ref_key:`stripPlotChart`,ref:D,class:Xe(`vue-data-ui-component vue-ui-strip-plot ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${k.value.useCssAnimation?``:`vue-ui-dna`}`),style:Ze(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${k.value.responsive?`height:100%`:``}`),id:`strip-plot_${Jt.value}`,onMouseenter:s[2]||=()=>w(Sn)(!0),onMouseleave:s[3]||=()=>w(Sn)(!1)},[h(`div`,{id:`chart-instructions-${Jt.value}`,class:`sr-only`},[h(`p`,null,C(k.value.a11y.translations.keyboardNavigation),1)],8,ot),k.value.a11y.includeTable&&Xr.value?.rows?.length?(y(),f(He,{key:0,uid:Jt.value,head:Xr.value.headers,body:Xr.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),A.value.buttons.annotator?(y(),f(w(Vt),Je({key:1},w(a)(A.value.annotator),{svgRef:w(L),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Dr.value,isCursorPointer:I.value,palette:A.value.annotatorPalette,onClose:Or}),Ge({_:2},[x(w(o),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),In.value?(y(),m(`div`,{key:2,ref_key:`noTitle`,ref:en,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),F.value.title.text?(y(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Qt,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),f(ze,{key:`title_${nn.value}`,config:{title:{cy:`donut-div-title`,...F.value.title},subtitle:{cy:`donut-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),A.value.show&&qt.value&&(w(Cn)||w(xn))?(y(),f(w(Bt),Je({ref_key:`userOptionsRef`,ref:on,key:`user_option_${Yt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:w(Mn),isImaging:w(Nn),uid:Jt.value,hasTooltip:A.value.buttons.tooltip&&j.value.show,hasLabel:A.value.buttons.labels&&k.value.type!==`violin`,isTooltip:V.value.showTooltip,isFullscreen:$.value,chartElement:D.value},w(n)(A.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Dr.value,tableDialog:k.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Sr,onGeneratePdf:w(Pn),onGenerateCsv:br,onGenerateImage:w(zr),onGenerateSvg:w(Rr),onToggleTable:wr,onToggleLabels:Tr,onToggleTooltip:Er,onToggleAnnotator:Or,onCopyAlt:Br,style:{visibility:w(Cn)?w(xn)?`visible`:`hidden`:`visible`}}),Ge({_:2},[x(w(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`hasLabel`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,st,[(y(),m(`svg`,{ref_key:`svgRef`,ref:L,xmlns:w(be),class:Xe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,"vue-data-ui-no-transition":!w(hn)||w(Gn)}),viewBox:`0 0 ${z.value} ${B.value}`,style:Ze(`max-width:100%; overflow: visible; background:transparent;color:${F.value.color};;visibility:${w(Wn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${Jt.value}`,tabindex:`0`,onFocus:qr,onBlur:Jr,onKeydown:Yr},[qe(w(Ht)),S(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:w(Mn)||w(Nn)||w(Ir),isPrintingSvg:w(Lr),boxPlotSummaries:Y.value,series:G.value}},void 0,!0),e.$slots[`chart-background`]?(y(),m(`foreignObject`,{key:0,x:W.value.left,y:W.value.top,width:Math.max(.1,W.value.width),height:Math.max(.1,W.value.height),style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,lt)):p(``,!0),P.value.show?(y(),m(`g`,ut,[P.value.horizontalGrid.show?(y(),m(`g`,dt,[(y(!0),m(u,null,x(dr.value,e=>(y(),m(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:P.value.horizontalGrid.stroke,"stroke-width":P.value.horizontalGrid.strokeWidth,"stroke-dasharray":P.value.horizontalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,ft))),256))])):p(``,!0),P.value.verticalGrid.show?(y(),m(`g`,pt,[(y(!0),m(u,null,x(G.value,(e,t)=>(y(),m(`line`,{x1:W.value.left+(t+1)*W.value.stripWidth,x2:W.value.left+(t+1)*W.value.stripWidth,y1:W.value.top,y2:W.value.bottom,stroke:P.value.verticalGrid.stroke,"stroke-width":P.value.verticalGrid.strokeWidth,"stroke-dasharray":P.value.verticalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,mt))),256))])):p(``,!0),h(`line`,{x1:W.value.left,x2:W.value.left,y1:W.value.top,y2:W.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,ht),h(`line`,{x1:W.value.left,x2:W.value.right,y1:W.value.bottom,y2:W.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,gt)])):p(``,!0),M.value.yAxisLabels.show?(y(),m(`g`,{key:2,ref_key:`scaleLabels`,ref:un},[(y(!0),m(u,null,x(dr.value,(e,t)=>(y(),m(`text`,{class:Xe({"vue-data-ui-transition":w(hn)&&!w(Gn)}),key:`sl_${t}`,transform:`translate(${e.x1+M.value.yAxisLabels.offsetX-5}, ${e.y+M.value.yAxisLabels.fontSize/3})`,fill:M.value.yAxisLabels.color,"font-size":M.value.yAxisLabels.fontSize,"text-anchor":`end`},C(w(me)(M.value.formatter,e.value,w(l)({p:M.value.prefix,v:e.value,s:M.value.suffix,r:M.value.yAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),11,_t))),128))],512)):p(``,!0),M.value.xAxisLabels.show?(y(),m(`g`,{key:3,ref_key:`timeLabelsEls`,ref:ln},[(y(!0),m(u,null,x(Ar.value,(e,t)=>(y(),m(`g`,null,[String(e).includes(`
2
+ `)?(y(),m(`text`,{key:1,class:`vue-ui-strip-plot-category-name`,transform:`translate(${W.value.left+(t+1)*W.value.stripWidth-W.value.stripWidth/2}, ${W.value.bottom+M.value.xAxisLabels.fontSize*2+M.value.xAxisLabels.offsetY}), rotate(${M.value.xAxisLabels.rotation})`,"font-size":M.value.xAxisLabels.fontSize,fill:M.value.xAxisLabels.color,"text-anchor":M.value.xAxisLabels.rotation>0?`start`:M.value.xAxisLabels.rotation<0?`end`:`middle`,innerHTML:w(oe)({content:w(ye)(String(e)),fontSize:M.value.xAxisLabels.fontSize,fill:M.value.xAxisLabels.color,x:0,y:0})},null,8,yt)):(y(),m(`text`,{key:0,class:`vue-ui-strip-plot-category-name`,transform:`translate(${W.value.left+(t+1)*W.value.stripWidth-W.value.stripWidth/2}, ${W.value.bottom+M.value.xAxisLabels.fontSize*2+M.value.xAxisLabels.offsetY}), rotate(${M.value.xAxisLabels.rotation})`,"font-size":M.value.xAxisLabels.fontSize,fill:M.value.xAxisLabels.color,"text-anchor":M.value.xAxisLabels.rotation>0?`start`:M.value.xAxisLabels.rotation<0?`end`:`middle`},C(String(e)),9,vt))]))),256))],512)):p(``,!0),M.value.axis.yLabel?(y(),m(`text`,{key:4,ref_key:`yAxisLabel`,ref:cn,fill:M.value.axis.color,"font-size":M.value.axis.fontSize,transform:`translate(${M.value.axis.fontSize}, ${W.value.top+W.value.height/2}) rotate(-90)`,"text-anchor":`middle`},C(M.value.axis.yLabel),9,bt)):p(``,!0),M.value.axis.xLabel?(y(),m(`text`,{key:5,ref_key:`xAxisLabel`,ref:sn,fill:M.value.axis.color,"font-size":M.value.axis.fontSize,x:W.value.left+W.value.width/2,y:B.value-M.value.axis.fontSize/3,"text-anchor":`middle`},C(M.value.axis.xLabel),9,xt)):p(``,!0),Q.value?(y(),m(u,{key:6},[h(`line`,{x1:W.value.left,x2:W.value.right,y1:Q.value.y,y2:Q.value.y,stroke:Q.value.color,"stroke-width":1,class:Xe({"select-circle":k.value.useCssAnimation})},null,10,St),h(`circle`,{cx:W.value.left,cy:Q.value.y,r:3,fill:Q.value.color,class:Xe({"select-circle":k.value.useCssAnimation})},null,10,Ct),h(`circle`,{cx:W.value.right,cy:Q.value.y,r:3,fill:Q.value.color,class:Xe({"select-circle":k.value.useCssAnimation})},null,10,wt)],64)):p(``,!0),h(`defs`,null,[(y(!0),m(u,null,x(G.value,e=>(y(),f(Ue,{t:`radial`,id:e.id,key:`r_${e.id}`,fy:`30%`,stops:[[`10%`,w(ie)(e.color,F.value.plots.gradient.intensity/100),1],[`90%`,w(se)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),(y(!0),m(u,null,x(rr.value,(e,t)=>(y(),m(u,{key:e.id},[e.path?(y(),m(`path`,{key:0,d:e.path,fill:e.fill,stroke:e.color,"fill-opacity":N.value.opacity,"stroke-opacity":N.value.strokeOpacity,"stroke-width":N.value.strokeWidth,style:Ze({pointerEvents:J.value?`auto`:`none`,cursor:J.value&&I.value?`pointer`:`default`}),onMouseenter:e=>J.value&&Y.value[t]&&vr({boxPlot:Y.value[t],seriesIndex:t,triggerMode:`pointer`}),onMouseleave:s[0]||=e=>J.value&&_r()},null,44,Tt)):p(``,!0),(y(!0),m(u,null,x(e.connectors,(t,n)=>(y(),m(`line`,{key:`violin_connector_${e.id}_${n}`,x1:t.x,x2:t.x,y1:t.y1,y2:t.y2,stroke:e.color,"stroke-opacity":N.value.strokeOpacity,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,Et))),128))],64))),128)),(y(!0),m(u,null,x(Y.value,(e,t)=>(y(),m(`g`,{key:`boxplot_${e.id}`,style:Ze({cursor:I.value?`pointer`:`default`}),onMouseenter:n=>vr({boxPlot:e,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:_r},[h(`line`,{x1:e.centerX,x2:e.centerX,y1:e.upperY,y2:e.lowerY,stroke:w(se)(e.boxPlotColor,.2),"stroke-width":Math.max(1,N.value.strokeWidth),"stroke-linecap":`round`},null,8,Ot),h(`rect`,{x:e.boxLeft,y:Math.min(e.q1Y,e.q3Y),width:e.boxWidth,height:Math.max(1,Math.abs(e.q3Y-e.q1Y)),fill:e.boxPlotColor,stroke:w(se)(e.boxPlotColor,.2),"stroke-width":Math.max(1,N.value.strokeWidth),rx:e.boxWidth/20},null,8,kt),h(`circle`,{cx:e.boxLeft+e.boxWidth/2,cy:e.medianY,r:e.boxWidth/3*Math.min(1,N.value.boxPlot.medianCircleRadiusRatio),fill:N.value.boxPlot.medianCircleFill,stroke:w(se)(e.boxPlotColor,.2)},null,8,At)],44,Dt))),128)),(y(!0),m(u,null,x(q.value,(t,n)=>(y(),m(u,null,[J.value?p(``,!0):(y(!0),m(u,{key:0},x(t.plots,(n,r)=>(y(),f(Re,Je({ref_for:!0},e.$attrs,{plot:{x:n.x,y:tn.value?n.y:W.value.top},radius:Q.value&&Q.value.id===n.id?H.value*1.5:H.value,shape:F.value.plots.shape,stroke:F.value.plots.stroke,strokeWidth:F.value.plots.strokeWidth,color:F.value.plots.gradient.show?`url(#${t.id})`:t.color,style:`transition: all 0.2s ease-in-out; opacity:${Q.value?Q.value.id===n.id?1:.2:F.value.plots.opacity};${Rn.value?`transition-delay:${r*50}ms`:``}`,class:{"vue-ui-strip-plot-animated":k.value.useCssAnimation&&Rn.value&&!w(vn),"vue-ui-strip-plot-select-circle":k.value.useCssAnimation&&!Rn.value},onMouseenter:e=>gr({datapoint:n,seriesIndex:r,triggerMode:`pointer`}),onMouseleave:e=>pr({datapoint:n,seriesIndex:r}),onClick:e=>mr({datapoint:n,seriesIndex:r})}),null,16,[`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`color`,`style`,`class`,`onMouseenter`,`onMouseleave`,`onClick`]))),256)),V.value.dataLabels.show&&!J.value?(y(),m(`g`,jt,[(y(!0),m(u,null,x(t.plots,(e,n)=>(y(),m(u,null,[n===t.plots.length-1||Q.value&&Q.value.id===e.id&&!V.value.showTooltip?(y(),m(`text`,{key:0,x:e.x,y:e.y+M.value.bestPlotLabel.offsetY-H.value*(Q.value&&Q.value.id===e.id&&!V.value.showTooltip?2:1.5),"font-size":M.value.bestPlotLabel.fontSize,fill:M.value.bestPlotLabel.color,"text-anchor":`middle`,style:Ze(`opacity:${k.value.useCssAnimation?+!Rn.value:1};transition:opacity 0.2s ease-in;`)},C(e.name)+` `+C(M.value.bestPlotLabel.showValue?w(me)(M.value.formatter,e.value,w(l)({p:`(${M.value.prefix}`,v:e.value,s:`${M.value.suffix})`,r:F.value.labels.bestPlotLabel.rounding}),{datapoint:e,seriesIndex:n}):``),13,Mt)):p(``,!0)],64))),256))])):p(``,!0)],64))),256)),S(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:w(Mn)||w(Nn)||w(Ir),isPrintingSvg:w(Lr),boxPlotSummaries:Y.value,series:G.value}},void 0,!0)],46,ct)),e.$slots.hint?(y(),m(`div`,Nt,[S(e.$slots,`hint`,v(_({hint:k.value.a11y.translations.keyboardNavigation,isVisible:mn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(y(),m(`div`,Pt,[S(e.$slots,`watermark`,v(_({isPrinting:w(Mn)||w(Nn)||w(Ir)||w(Lr)})),void 0,!0)])):p(``,!0),e.$slots.source?(y(),m(`div`,{key:6,ref_key:`source`,ref:$t,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),qe(w(It),{teleportTo:j.value.teleportTo,show:V.value.showTooltip&&Xt.value,backgroundColor:j.value.backgroundColor,color:j.value.color,borderRadius:j.value.borderRadius,borderColor:j.value.borderColor,borderWidth:j.value.borderWidth,fontSize:j.value.fontSize,backgroundOpacity:j.value.backgroundOpacity,position:j.value.position,offsetX:j.value.offsetX,offsetY:j.value.offsetY,parent:D.value,content:Zt.value,isFullscreen:$.value,isCustom:w(re)(j.value.customFormat),smooth:j.value.smooth,backdropFilter:j.value.backdropFilter,smoothForce:j.value.smoothForce,smoothSnapThreshold:j.value.smoothSnapThreshold,isA11yMode:O.value===`keyboard`,a11yPosition:pn.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,v(_({...fr.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,v(_({...fr.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,v(_({...fr.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),qt.value&&A.value.buttons.table?(y(),f(et(Mr.value.component),Je({key:7},Mr.value.props,{ref_key:`tableUnit`,ref:an,onClose:Nr}),Ge({content:T(()=>[(y(),f(w(zt),{key:`table_${rn.value}`,colNames:xr.value.colNames,head:xr.value.head,body:xr.value.body,config:xr.value.config,title:k.value.table.useDialog?``:Mr.value.title,withCloseButton:!k.value.table.useDialog,isCursorPointer:I.value,onClose:Nr},{th:T(({th:e})=>[h(`div`,Ft,C(e),1)]),td:T(({td:e})=>[Ke(C(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[k.value.table.useDialog?{name:`title`,fn:T(()=>[Ke(C(Mr.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:T(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>br(A.value.callbacks.csv),style:Ze({cursor:I.value?`pointer`:`default`})},[qe(w(Lt),{name:`fileCsv`,stroke:Mr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),S(e.$slots,`skeleton`,{},()=>[w(vn)?(y(),f(Ve,{key:0})):p(``,!0)],!0)],46,at))}},[[`__scopeId`,`data-v-15e44b60`]]);export{it as n,It as t};
@@ -0,0 +1,14 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,C as n,D as r,Ft as i,Ht as a,Jt as o,X as ee,d as te,in as s,nt as ne,r as re}from"./lib-rPeBMZrn.js";import{t as ie}from"./useConfig-CBXrYhMI.js";import{n as ae,t as oe}from"./useHints-C-TwxM0Y.js";import{t as se}from"./vue-ui-xy-CGuTzofF.js";import{t as ce}from"./vue-ui-donut-BJumteL7.js";import{t as le}from"./BaseIcon-CoY0vuL3.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as ue,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as de,defineAsyncComponent as fe,mergeProps as pe,nextTick as me,normalizeClass as h,normalizeStyle as g,onBeforeUnmount as he,onMounted as ge,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x,useCssVars as _e,vModelSelect as ve,vModelText as ye,watch as be,withCtx as xe,withDirectives as Se,withKeys as Ce,withModifiers as we}from"vue";var Te=/* @__PURE__ */ e({default:()=>rn}),Ee=[`innerHTML`],De=[`data-is-open`],Oe={class:`vue-ui-table-export-hub-options`},ke={class:`label`},Ae=[`id`,`onClick`],je=[`innerHTML`],Me={class:`vue-ui-table-dialog-field`},Ne={class:`label vue-ui-table-dialog-input-label`,style:{width:`100%`}},Pe={style:{width:`fit-content`}},Fe={class:`vue-ui-table`},Ie={key:0},Le={key:0},Re={key:1},ze={key:0,style:{display:`flex`,"align-items":`center`,"justify-content":`flex-end`}},Be=[`innerHTML`],Ve={key:0,style:{"margin-left":`3px`}},He={key:0},Ue={class:`th-filter`},We={key:0,class:`th-date`},Ge={class:`date-wrapper--inputs`},Ke={class:`date-fieldset`},qe=[`for`],Je=[`id`,`onUpdate:modelValue`,`onInput`],Ye={class:`date-fieldset`},Xe=[`for`],Ze=[`id`,`onUpdate:modelValue`,`onInput`],Qe={class:`date-wrapper--button`},$e=[`onClick`],et=[`innerHTML`],tt=[`innerHTML`],nt=[`innerHTML`],rt=[`onClick`,`disabled`],it=[`placeholder`,`onUpdate:modelValue`,`name`],at=[`onClick`],ot=[`innerHTML`],st=[`innerHTML`],ct=[`innerHTML`],lt=[`onClick`,`innerHTML`],ut=[`innerHTML`],dt={key:5,class:`th-range-filter`},ft=[`for`],pt=[`id`,`max`,`min`,`onUpdate:modelValue`],mt=[`id`,`max`,`min`,`onUpdate:modelValue`],ht=[`for`],gt=[`onClick`,`disabled`],_t=[`id`],vt=[`onClick`],yt=[`onClick`,`onKeyup`],bt=[`innerHTML`,`onClick`,`onKeyup`],xt=[`data-row`],St=[`data-row`],Ct=[`data-row`,`onClick`,`onKeyup`,`id`],wt=[`innerHTML`],Tt={key:1},Et={key:2},Dt={key:5},Ot=[`innerHTML`],kt={key:0},At={style:{"margin-left":`12px`}},jt={class:`format-num`},Mt={key:0,class:`format-num`},Nt={key:1,class:`format-num`},Pt={key:2},Ft={key:1,class:`vue-ui-table-paginator format-num`},It={key:2,class:`vue-ui-table-size-warning`},Lt=[`innerHTML`],Rt={key:4,class:`vue-ui-table-pagination format-num`},zt=[`innerHTML`],Bt={for:`pageScroller`,style:{"font-size":`14px`}},Vt=[`max`,`value`],Ht={key:1},Ut=[`innerHTML`],Wt={class:`vue-ui-table-chart-modal-options`},Gt=[`innerHTML`],Kt=[`innerHTML`],qt=[`innerHTML`],Jt={style:{width:`100%`,height:`fit-content`}},Yt={class:`vue-ui-table-fieldset`},Xt={class:`vue-ui-table-fieldset-wrapper`},Zt=[`name`,`id`,`checked`,`onInput`],Qt=[`for`],$t=[`disabled`],en=[`innerHTML`],tn={style:{width:`100%`,"margin-bottom":`12px`}},nn={key:2,style:{width:`100%`,"margin-bottom":`32px`}},rn=/*#__PURE__*/ c({__name:`vue-ui-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`page-change`],setup(e,{expose:c,emit:Te}){_e(e=>({v1963bdc6:In.value,v65c97fa0:Ln.value,v5bb9dfbe:Vn.value,v1e9a6f90:Rn.value,v08a6a8ea:Hn.value,v438d66f0:Un.value,v4581052e:zn.value,c4e8e4bc:Bn.value,v2e03e998:Wn.value}));let rn=fe(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),S=e,an=Te,{vue_ui_table:on}=ie(),C=ee(),sn=v(null),cn=v(null),ln=v(null),w=v({height:316,type:`bar`,width:512}),T=v({ASC:1,BAR:`bar`,DATE:`date`,DESC:-1,DONUT:`donut`,LINE:`line`,NUMERIC:`numeric`,PERCENTAGE:`percentage`,TEXT:`text`}),un=v(100),dn=v(100),fn=v(0),pn=v(0);v(400),v(200);let mn=v({CELL:`smart-td-selected`,FIRST_TD:`smart-td-selected-first`,LAST_TD:`smart-td-selected-last`,ROW:`smart-td-selected-neighbor`}),hn=v(void 0),gn=v(void 0),E=v({col:void 0,rows:[]}),D=v(0),O=v(20),_n=v(!1),vn=v(!1),k=v({}),A=v({}),yn=v({}),j=v({}),M=v({}),N=v({}),P=v({}),F=v({}),I=v({}),bn=v(S.config.rowsPerPage?S.config.rowsPerPage:25),xn=v([.../* @__PURE__ */ new Set([10,25,50,100,250,500,S.config.rowsPerPage?S.config.rowsPerPage:25,S.dataset.body.length])].sort((e,t)=>e-t)),Sn=v(void 0),L=v(void 0),Cn=v(void 0),R=v(!1),wn=v(0),Tn=v(``),En=v(``),z=v(!1),B=v(JSON.parse(JSON.stringify(S.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),Dn=v(JSON.parse(JSON.stringify(S.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),V=v(JSON.parse(JSON.stringify(S.dataset.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t}))),On=u(()=>`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`);function kn(e){return{disabled:e,style:`cursor:${Y.value?`pointer`:`default`};background:${Pn.value.buttons.backgroundColor};color:${Pn.value.buttons.color};opacity:${e?Pn.value.buttons.opacityDisabled:1}`}}function An(e,n){return t({p:n.prefix,v:Number(e),s:n.suffix,r:n.decimals})}let jn=u(()=>cn.value?cn.value.getBoundingClientRect().height+3:3),H=u(()=>{if(!Object.keys(S.config||{}).length)return on;let e=s({defaultConfig:on,userConfig:S.config});return n(e)}),U=u(()=>H.value.style.exportMenu),W=u(()=>H.value.style.title),G=u(()=>H.value.style.th),K=u(()=>H.value.style.inputs),Mn=u(()=>H.value.style.dropdowns),Nn=u(()=>H.value.style.closeButtons),q=u(()=>H.value.style.rows),Pn=u(()=>H.value.style.pagination),J=u(()=>H.value.style.chart),Fn=u(()=>H.value.style);ae({config:()=>H.value,dataset:()=>S.dataset,component:`VueUiTable`,rules:[oe.noHint]});let Y=u(()=>H.value.useCursorPointer),In=u(()=>G.value.buttons.cancel.inactive.backgroundColor),Ln=u(()=>G.value.buttons.cancel.inactive.color),Rn=u(()=>G.value.buttons.cancel.active.backgroundColor),zn=u(()=>G.value.buttons.filter.active.backgroundColor),Bn=u(()=>G.value.buttons.filter.active.color),Vn=u(()=>i(Rn.value,.33)),Hn=u(()=>o(Rn.value,33)),Un=u(()=>i(zn.value,.33)),Wn=u(()=>o(zn,33)),Gn=u(()=>[...V.value].filter(e=>e.type===T.value.DATE)),Kn=u(()=>[``,...Gn.value.map(e=>e.name)]),qn=u(()=>{let e=Gn.value.find(e=>e.name===Tn.value);return e?e.index:null}),X=u(()=>{let e=[];if(B.value.length)for(let t=0;t<B.value.length;t+=bn.value)e.push(B.value.slice(t,t+bn.value));return e}),Jn=u(()=>X.value[D.value]),Yn=u(()=>qn.value==null?[]:Jn.value.map(e=>e.td[qn.value])),Xn=u(()=>Object.keys(M.value).map(e=>({index:e,name:S.dataset.header[e].name,options:M.value[e]}))),Zn=u(()=>H.value.useChart&&E.value.rows.length>1),Qn=u(()=>S.dataset.header.map(e=>e.type).includes(T.value.NUMERIC)),Z=u(()=>({arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,grip:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>`})),$n=u(()=>B.value.map(e=>e.td)),er=u(()=>S.dataset.header[E.value.col]),tr=u(()=>{let e=E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0),t=e/E.value.rows.length,n=e=>Number(e.toFixed(er.value.decimals)).toLocaleString();return{sumPercentage:n(e*100),sumRegular:n(e),averagePercentage:n(t*100),averageRegular:n(t)}}),nr=v({width:1e3,height:500});function rr({width:e,height:t}){nr.value={width:e,height:t}}let ir=u(()=>{if(!Zn.value)return[];let e=er.value,t={pdf:!1,csv:!1,table:!1,annotator:!1},n=nr.value.height,r=nr.value.width,a=r/E.value.rows.length,o=Math.max(...E.value.rows.map(e=>e.value)),ee=Math.min(...E.value.rows.map(e=>e.value)),s=e.isPercentage&&e.percentageTo,ne=w.value.type===T.value.DONUT&&L.value&&L.value.name,ie=e.name+(s?` / ${S.dataset.header[N.value[E.value.col].referenceIndex].name}`:``)+(ne?` ${H.value.translations.by} ${L.value.name}`:``),ae=e.prefix,oe=e.suffix,se=e=>[{name:ie,series:E.value.rows.map(e=>e.value),type:e,useProgression:!0,...e===`line`?{smooth:J.value.layout.line.smooth,color:J.value.layout.line.stroke,useArea:J.value.layout.line.useArea}:{color:J.value.layout.bar.fill}}],ce=se(`line`),le=se(`bar`),c=J.value.modal.backgroundColor,l=re(c),u=e.decimals,ue={useCssAnimation:!1,chart:{width:r,height:n-250,backgroundColor:c,color:l,labels:{fontSize:18,prefix:ae,suffix:oe},grid:{stroke:i(l,.5),labels:{color:l,xAxisLabels:{color:l,show:Yn.value.length,values:Yn.value,datetimeFormatter:J.value.layout.datetimeFormatter,showOnlyAtModulo:J.value.layout.timeLabels.showOnlyAtModulo,modulo:J.value.layout.timeLabels.modulo}}},highlighter:{color:l},legend:{color:l,show:!1},title:{text:ie,color:l,textAlign:`center`,fontSize:18},tooltip:{showTimeLabel:Yn.value.length,backgroundOpacity:30,color:l,backgroundColor:c,showPercentage:!1,roundingValue:u},userOptions:{buttons:{...t}},zoom:{show:J.value.layout.zoom.show,autoFit:J.value.layout.zoom.autoFit,focusOnDrag:!0,minimap:{show:!0}}},line:{labels:{show:!0,color:l,rounding:u},dot:{useSerieColor:!1,fill:J.value.layout.line.plot.fill,strokeWidth:J.value.layout.line.plot.strokeWidth}},bar:{useGradient:!1,border:{useSerieColor:!1,stroke:J.value.layout.bar.stroke,strokeWidth:J.value.layout.bar.strokeWidth},labels:{show:!0,color:l,rounding:u}}},d=ee>=0?0:Math.abs(ee),f=o+d,p=e.isPercentage,m=E.value.rows.map((t,r)=>({x:a*r+a/2,y:(1-(t.value+d)/f)*n,value:p?t.value*100:t.value,suffix:p?`%`:e.suffix?e.suffix:``,prefix:e.prefix?e.prefix:``,index:t.index,absoluteValue:p?Math.abs(t.value)*100:Math.abs(t.value)}));return{donutConfig:{useCssAnimation:!1,userOptions:{position:`left`,buttons:{...t}},style:{chart:{backgroundColor:c,color:l,layout:{curvedMarkers:!0,donut:{strokeWidth:64},labels:{dataLabels:{suffix:p?`%`:``,prefix:ae},value:{rounding:u},percentage:{color:l,rounding:u},name:{color:l},hollow:{average:{color:l,text:H.value.translations.average,value:{color:l}},total:{color:l,offsetY:-12,text:H.value.translations.total,value:{color:l,offsetY:-12}}}}},legend:{backgroundColor:c,color:l,roundingValue:u,roundingPercentage:u},padding:{left:12,right:12},title:{text:ie,color:l,fontSize:18},tooltip:{backgroundOpacity:30,color:l,backgroundColor:c,roundingValue:u,roundingValue:u}}}},xyConfig:ue,xyDatasetLine:ce,xyDatasetBar:le,progression:m.length>=2&&te(m)}});function ar(){let e=L.value.options.map((e,t)=>({name:e,color:a[t]||a[t%a.length],values:[Jn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>Math.abs(e)+Math.abs(t),0)],absoluteValue:Jn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>e+t,0)})).sort((e,t)=>t.value-e.value);hn.value=e,me(()=>{w.value.type=T.value.DONUT,z.value=!1})}function or(e,t){return!A.value[e]&&(t.isSort||t.isSearch||t.isMultiselect||t.rangeFilter)&&![T.value.DATE].includes(t.type)}function sr(e=`all`){let t=S.dataset.header.map(e=>e.name),n=e===`all`?B.value.map(e=>e.td):Jn.value.map(e=>e.td),i=[t].concat(n),a=r(i);ne({csvContent:a,title:En.value})}function cr(){let e=document.getElementsByClassName(`th-dropdown`);e.length&&Array.from(e).forEach(e=>{e.dataset.isOpen=!1})}function lr(e,t){let n;clearTimeout(n),n=setTimeout(e,t)}function ur(){let e=document.getElementsByClassName(`tr_${C}`);Array.from(e).forEach(e=>{Array.from(e.getElementsByTagName(`td`)).forEach(e=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)})}),Array.from(e).forEach(e=>e.dataset.selected=`false`),D.value>X.value.length-1&&(D.value=X.value.length-1),R.value=!1,hn.value=void 0,Sn.value=void 0,w.value.type=T.value.BAR,E.value={col:void 0,rows:[]},un.value=100,dn.value=100}function dr(e,t){B.value=e.filter(e=>e.td[t]>=P.value[t].min&&e[t]<=P.value[t].max)}function fr(e,t){if(I.value[t]===T.value.ASC&&(e=e.sort((e,n)=>e[t]-n[t])),I.value[t]===T.value.DESC)e=e.sort((e,n)=>n[t]-e[t]);else return 0}function pr(){ur(),Object.keys(P.value).forEach(e=>{dr(B.value,e)}),Object.keys(I.value).forEach(e=>{fr(B.value,e)}),gn.value!==void 0&&fr(B.value,gn.value),S.dataset.header.forEach((e,t)=>{if(e.isPercentage){let e=N.value[t].referenceIndex,n=B.value.map(t=>t.td[e]).reduce((e,t)=>e+t,0);B.value.forEach(r=>{r.td[t]=r.td[e]/n})}}),D.value>X.value.length-1&&(D.value=X.value.length-1),[-1].includes(D.value)&&(D.value=0)}function Q(){B.value=Dn.value.filter(e=>{for(let t in F.value)if(!e.td[t].toUpperCase().includes(F.value[t].toUpperCase()))return!1;for(let t in M.value)if(!M.value[t].some(n=>n===e.td[t]))return!1;for(let t in k.value){let n=new Date(e.td[t]),r=new Date(k.value[t].from),i=new Date(k.value[t].to);if(n<r||n>i)return!1}return!0}),pr()}function mr(e){return gr(e)/B.value.length}function hr(e){let t=S.dataset.body.map(t=>new Date(t.td[e])),n=new Date(Math.min(...t)),r=new Date(Math.max(...t)),i=n.getFullYear(),a=r.getFullYear(),o=String(n.getMonth()+1).padStart(2,`0`),ee=String(r.getMonth()+1).padStart(2,`0`),te=String(n.getDate()).padStart(2,`0`),s=String(r.getDate()).padStart(2,`0`);return{from:`${i}-${o}-${te}`,to:`${a}-${ee}-${s}`}}function $(e){return[...new Set(S.dataset.body.map(t=>t.td[e]))]}function gr(e){return $n.value.map(t=>t[e]).map(e=>isNaN(Number(e))?0:e).reduce((e,t)=>e+t,0)}function _r(e){return e.includes(NaN)}function vr(e,t){return!M.value[t]||M.value[t].includes(e)}function yr(e){return!isNaN(Number(String(e).replaceAll(`%`,``)))}function br(e,t){let n=t.isSort,r=t.isSearch,i=t.isMultiselect&&M.value[e],a=t.rangeFilter,o=e=>{if(a&&P.value[e])return Math.round(P.value[e].min)===j.value[e].min&&Math.round(P.value[e].max)===j.value[e].max};if(n&&r&&i&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&r&&i)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(n&&r&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&o(e);if(n&&r)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e]);if(n&&i&&a)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&i)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(r&&i&&a)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length&&o(e);if(r&&i)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length;if(r&&a)return[``,void 0].includes(F.value[e])&&o(e);if(r)return[``,void 0].includes(F.value[e]);if(n&&a)return[void 0].includes(I.value[e])&&o(e);if(n)return[void 0].includes(I.value[e]);if(i&&a)return M.value[e].length===$(e).length&&o(e);if(i)return M.value[e].length===$(e).length}function xr(){return{totalPages:X.value.length,itemsPerPage:bn.value,currentPage:D.value,currentPageData:Jn.value.map(e=>e.td)}}c({getCurrentPageData:xr});function Sr(){an(`page-change`,xr())}let Cr=v(null);function wr(e){if(ur(),e===`next`&&D.value<X.value.length){if(D.value+1>X.value.length-1)return;D.value+=1}else if(e===`previous`&&D.value>=1)--D.value;else{if(e-1<0||e>X.value.length||e===`previous`)return;D.value=e-1}Sr(),Cr.value&&Cr.value.scrollTo({top:0,left:0,behavior:`smooth`})}function Tr(e){e.preventDefault();let t=e.keyCode;if(![38,40,37,39].includes(t))return;let n=e.target.id.match(/cell_(\d+)_(\d+)_([0-9a-fA-F-]{36})/),r=parseInt(n[1]),i=parseInt(n[2]),a=document.getElementById(`cell_${r}_${i+1}_${C}`),o=document.getElementById(`cell_${r}_${i-1}_${C}`),ee=document.getElementById(`cell_${r+1}_${i}_${C}`),te=document.getElementById(`cell_${r-1}_${i}_${C}`),s;switch(!0){case t===39:s=a;break;case t===37:s=o;break;case t===38:s=te;break;case t===40:s=ee;break;default:return}s&&(s.focus(),s.scrollIntoView({behavior:`smooth`,block:`center`}))}function Er(e){let t=0;for(let n=0;n<e.length;n+=1)t+=e.charCodeAt(n);return t}async function Dr(){return new Promise(e=>{let t=[];V.value.forEach((e,n)=>{if(e.isSearch&&Object.assign(F.value,{[n]:``}),e.isMultiselect&&Object.assign(M.value,{[n]:$(n)}),e.type===T.value.DATE&&(Object.assign(k.value,{[n]:hr(n)}),Object.assign(yn.value,{[n]:!1})),(e.isPercentage||e.percentageTo)&&Object.assign(N.value,{[n]:{reference:e.percentageTo,referenceIndex:S.dataset.header.map(e=>e.name).indexOf(e.percentageTo)}}),e.rangeFilter&&(Object.assign(P.value,{[n]:{min:Math.round(Math.min(...S.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...S.dataset.body.map(e=>e.td).map(e=>e[n])))}}),Object.assign(j.value,{[n]:{min:Math.round(Math.min(...S.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...S.dataset.body.map(e=>e.td).map(e=>e[n])))}})),e.isPercentage){let r=S.dataset.header.map(e=>e.name).indexOf(e.percentageTo),i=S.dataset.body.map(e=>e.td[r]).reduce((e,t)=>e+t,0);t.push([n,r,i])}e.type===T.value.NUMERIC&&!e.isPercentage&&Object.assign(A.value,{[n]:_r(S.dataset.body.map(e=>Number(e.td[n])))})}),B.value.forEach((e,n)=>{t.map(t=>{let[n,r,i]=t;e.td[n]=e.td[r]/i}),e.td.forEach((t,r)=>{S.dataset.header[r].type===T.value.TEXT&&S.dataset.header[r].isSearch&&(e[r]=Er(t)),S.dataset.header[r].type===T.value.DATE&&(e[r]=new Date(t).getTime()),S.dataset.header[r].type===T.value.NUMERIC&&(e[r]=isNaN(Number(t))?r:t),Dn.value[n][r]=e[r]})}),e(!0)})}function Or(e,t){return new Promise((n,r)=>{e().then(e=>{try{n(t(e))}catch(e){r(e)}}).catch(e=>{r(e)})})}async function kr(e){k.value[e]={from:hr(e).from,to:hr(e).to},yn.value[e]=!1,await me(),Q()}function Ar(e,t,n){let r=n.currentTarget;clearTimeout(ln.value),r.classList.add(`clicked`),ln.value=setTimeout(()=>{r.classList.remove(`clicked`)},200),gn.value=void 0,t.rangeFilter&&(P.value[e].min=j.value[e].min,P.value[e].max=j.value[e].max),t.isMultiselect?(M.value[e]=$(e),t.type===T.value.TEXT&&(I.value[e]=void 0),t.isSearch&&(F.value[e]=``)):t.type===T.value.NUMERIC?I.value[e]=void 0:t.type===T.value.TEXT?(I.value[e]=void 0,F.value[e]=``):t.type===T.value.DATE&&(I.value[e]=void 0),Q()}function jr({td:e,rowIndex:t,colIndex:n,headerType:r,event:i}){if(r!==T.value.NUMERIC||isNaN(Number(e))){ur();return}E.value.col!==n&&ur();let a=i.currentTarget.parentNode;E.value.col=n,E.value.rows.map(e=>e.index).includes(t)?(a.dataset.selected=`false`,E.value.rows=E.value.rows.filter(e=>e.index!==t),i.currentTarget.classList.remove(mn.value.CELL),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)}),i.currentTarget.dataset.row===`even`?(i.currentTarget.style.background=q.value.even.backgroundColor,i.currentTarget.style.color=q.value.even.color):(i.currentTarget.style.background=q.value.odd.backgroundColor,i.currentTarget.style.color=q.value.odd.color)):(a.dataset.selected=`true`,E.value.rows.push({index:t,value:e}),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.selectedNeighbors.backgroundColor,e.style.color=q.value.even.selectedNeighbors.color):(e.style.background=q.value.odd.selectedNeighbors.backgroundColor,e.style.color=q.value.odd.selectedNeighbors.color)}),i.currentTarget.dataset.row===`odd`?(i.currentTarget.style.background=q.value.odd.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.odd.selectedCell.color):(i.currentTarget.style.background=q.value.even.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.even.selectedCell.color)),E.value.rows=E.value.rows.sort((e,t)=>e.index-t.index),w.value.type===T.value.DONUT&&E.value.rows.length>0&&ar()}function Mr(e){E.value.col===e?(Sn.value=void 0,ur()):(Jn.value.forEach((t,n)=>{jr({td:t.td[e],rowIndex:n,colIndex:e,headerType:T.value.NUMERIC,event:{currentTarget:document.getElementById(`cell_${n}_${e}_${C}`)}})}),Sn.value=e)}async function Nr(e,t){M.value[t].includes(e)?M.value[t]=M.value[t].filter(t=>t!==e):M.value[t].push(e),await me(),Q()}function Pr(e){yn.value[e]=hr(e).from!==k.value[e].from||hr(e).to!==k.value[e].to}function Fr(e,t){gn.value=e;let n=t.currentTarget;clearTimeout(ln.value),n.classList.add(`clicked`),ln.value=setTimeout(()=>{n.classList.remove(`clicked`)},200),I.value[e]===1?I.value[e]=T.value.DESC:I.value[e]=T.value.ASC,pr()}function Ir(e,t,n){let r=n.currentTarget;clearTimeout(ln.value),r.classList.add(`clicked`),ln.value=setTimeout(()=>{r.classList.remove(`clicked`)},200);let i=document.getElementById(`th_dropdown_${e}`);i.dataset.isOpen===`false`?i.dataset.isOpen=`true`:i.dataset.isOpen=`false`}function Lr(e){ur(),!e||!e.target.value?D.value=0:D.value=Number(e.target.value),Sr()}function Rr(e){let t=document.activeElement;(t&&Array.from(t.classList).includes(`td-focusable`)&&e.key.includes(`Arrow`)||e.code===`Space`)&&e.preventDefault()}he(()=>{document.removeEventListener(`keydown`,Rr),zr(),clearTimeout(ln.value)});function zr(){document.removeEventListener(`mouseup`,zr),document.removeEventListener(`mousemove`,Vr)}let Br=v(null);function Vr(e){if(!sn.value&&Br.value){let t=Br.value.getBoundingClientRect();un.value=e.clientX-fn.value,dn.value=e.clientY-pn.value-40,un.value<0&&(un.value=0),un.value+t.width>window.innerWidth&&(un.value=window.innerWidth-t.width-48),dn.value<0&&(dn.value=0),dn.value+t.height>window.innerHeight&&(dn.value=window.innerHeight-t.height-24)}}ge(()=>{if(S.dataset.header.length===0)throw Error(`vue-ui-table error: missing header data.
2
+ Provide an array of objects of type:
3
+ {
4
+ name: string;
5
+ type: string; ('text' | 'numeric' | 'date')
6
+ average: boolean;
7
+ decimals: number | undefined;
8
+ sum: boolean;
9
+ isSort:boolean;
10
+ isSearch: boolean;
11
+ isMultiselect: boolean;
12
+ isPercentage: boolean;
13
+ percentageTo: string; (or '')
14
+ }`);if(S.dataset.body.length===0)throw Error(`vue-ui-table error: missing body data`);vn.value=!0,Or(Dr,async()=>{await me(),vn.value=!1}),document.addEventListener(`keydown`,Rr),En.value=U.value.filename,Tn.value=Gn.value[0]?.name??``}),be(()=>S.dataset,e=>{vn.value=!0,B.value=JSON.parse(JSON.stringify(e.body)).map((e,t)=>({...e,absoluteIndex:t})),Dn.value=JSON.parse(JSON.stringify(e.body)).map((e,t)=>({...e,absoluteIndex:t})),V.value=JSON.parse(JSON.stringify(e.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t})),E.value={col:void 0,rows:[]},Sn.value=void 0,bn.value=S.config.rowsPerPage?S.config.rowsPerPage:25,N.value={},k.value={},yn.value={},A.value={},j.value={},P.value={},M.value={},F.value={},I.value={},R.value=!1,hn.value=void 0,L.value=void 0,Cn.value=void 0,z.value=!1,E.value.col=void 0,E.value.rows=[],Or(Dr,async()=>{Lr(),await me(),vn.value=!1})},{immediate:!0,deep:!0});let Hr=v(null);return be(_n,e=>{e&&Hr.value&&Hr.value.focus()}),be(R,e=>{e?Br.value&&Br.value.open():Br.value&&Br.value.close()}),(n,r)=>(_(),f(`div`,{class:`vue-data-ui-component vue-ui-table-main`,style:g(`font-family: ${H.value.fontFamily}`)},[U.value.show?(_(),f(`div`,{key:0,class:`vue-ui-table-export-hub`,style:g({top:jn.value+`px`})},[p(`button`,{onClick:r[0]||=e=>_n.value=!_n.value,innerHTML:Z.value.export,style:g(`background:${U.value.backgroundColor};color:${U.value.color};cursor:${Y.value?`pointer`:`default`}`)},null,12,Ee),p(`div`,{class:`vue-ui-table-export-hub-dropdown`,"data-is-open":_n.value||`false`,style:g(`background:${U.value.backgroundColor};color:${U.value.color}`)},[r[22]||=p(`b`,{class:`vue-ui-table-export-hub-title`},` Export `,-1),p(`button`,{class:`close-dropdown`,onClick:r[1]||=e=>_n.value=!1,style:g(`background:${Nn.value.backgroundColor};color:${Nn.value.color};border-radius:${Nn.value.borderRadius}`)},` ✖ `,4),p(`div`,Oe,[(_(),f(l,null,y([`All`,`Page`],e=>p(`div`,{key:e,class:`vue-ui-table-export-hub-option-wrapper`},[p(`div`,ke,[m(b(H.value.translations[`export${e}Label`])+` `,1),e===`All`?(_(),f(l,{key:0},[m(` (`+b(B.value.length)+`)`,1)],64)):d(``,!0)]),p(`button`,{id:`export${e}`,onClick:t=>sr(e.toLowerCase()),style:g(`background:${U.value.buttons.backgroundColor};color:${U.value.buttons.color};cursor:${Y.value?`pointer`:`default`}`)},[p(`div`,{innerHTML:Z.value.fileDownload},null,8,je),p(`span`,null,b(H.value.translations[`export${e}Button`]),1)],12,Ae)])),64)),p(`div`,Me,[p(`label`,Ne,[p(`span`,Pe,b(H.value.translations.filename),1),Se(p(`input`,{name:`filename`,ref_key:`filenameInputRef`,ref:Hr,onKeydown:r[2]||=Ce(we(()=>{},[`stop`]),[`space`]),pattern:`.*`,class:`vue-ui-table-dialog-input`,type:`text`,"onUpdate:modelValue":r[3]||=e=>En.value=e},null,544),[[ye,En.value]])]),En.value?(_(),f(`button`,{key:0,class:`vue-ui-table-dialog-field-button`,onClick:r[4]||=e=>En.value=``,style:g({cursor:Y.value?`pointer`:`default`})},[de(le,{name:`close`,stroke:U.value.color,size:18},null,8,[`stroke`])],4)):d(``,!0)])])],12,De)],4)):d(``,!0),p(`div`,{class:`vue-ui-table__wrapper`,style:g(`max-height:${H.value.maxHeight}px`),ref_key:`tableWrapper`,ref:Cr},[p(`table`,Fe,[W.value.text?(_(),f(`caption`,{key:0,class:`vue-ui-table__caption`,ref_key:`tableCaption`,ref:cn,style:g({textAlign:W.value.textAlign,paddingLeft:W.value.paddingLeft+`px`,paddingRight:W.value.paddingRight+`px`,backgroundColor:W.value.backgroundColor,boxShadow:`${W.value.backgroundColor} -1px 0px 0px 0px`})},[p(`span`,{style:g({fontSize:W.value.fontSize+`px`,fontWeight:W.value.bold?`bold`:`normal`,color:W.value.color})},b(W.value.text),5),W.value.subtitle.text?(_(),f(l,{key:0},[r[23]||=p(`br`,null,null,-1),p(`span`,{style:g({fontSize:W.value.subtitle.fontSize,fontWeight:W.value.subtitle.bold?`bold`:`normal`,color:W.value.subtitle.color})},b(W.value.subtitle.text),5)],64)):d(``,!0)],4)):d(``,!0),p(`thead`,{id:`tableHead`,class:`vue-ui-table__head`,style:g({background:G.value.backgroundColor,boxShadow:`-1px 0 0 ${G.value.backgroundColor}`,top:jn.value-3+`px`})},[p(`tr`,null,[r[24]||=p(`th`,{class:`invisible-cell`},null,-1),(_(!0),f(l,null,y(V.value,(e,t)=>(_(),f(`th`,{key:`thead_${t}`,style:g(`overflow: visible;${On.value}`),class:h({"th-has-nan":A.value[t]})},[Qn.value&&([T.value.TEXT,T.value.DATE].includes(e.type)||e.isPercentage)?(_(),f(`span`,Ie,[m(b(e.name)+` `,1),e.isPercentage?(_(),f(`span`,Le,` / `+b(e.percentageTo),1)):d(``,!0)])):(_(),f(`span`,Re,b(e.name),1))],6))),128))]),Qn.value?(_(),f(l,{key:0},[p(`tr`,null,[r[25]||=p(`th`,{class:`invisible-cell`},null,-1),(_(!0),f(l,null,y(V.value,(e,n)=>(_(),f(`th`,{key:`thead_${n}`,class:h({"th-numeric":!0,"th-has-nan":A.value[n]}),style:g(On.value)},[e.sum&&!A.value[n]?(_(),f(`span`,ze,[p(`span`,{innerHTML:Z.value.sum,style:{"margin-bottom":`-4px`,"margin-right":`3px`}},null,8,Be),m(` `+b(An(gr(n),e))+` `,1),N.value[n]&&e.percentageTo&&!e.isPercentage?(_(),f(`span`,Ve,` (`+b(isNaN(gr(n)/gr(N.value[n].referenceIndex))?`-`:x(t)({v:gr(n)/gr(N.value[n].referenceIndex)*100,s:`%`,r:e.decimals}))+`) `,1)):d(``,!0)])):d(``,!0)],6))),128))]),p(`tr`,null,[r[26]||=p(`th`,{class:`invisible-cell`},null,-1),(_(!0),f(l,null,y(V.value,(e,t)=>(_(),f(`th`,{key:`thead_${t}`,class:h({"th-numeric":!0,"th-has-nan":A.value[t]}),style:g(On.value)},[e.average&&!A.value[t]?(_(),f(`span`,He,` ~ `+b(isNaN(mr(t))?``:An(mr(t),e)),1)):d(``,!0)],6))),128))]),p(`tr`,null,[r[29]||=p(`th`,{class:`invisible-cell`},null,-1),(_(!0),f(l,null,y(V.value,(e,t)=>(_(),f(`th`,{key:`thead_${t}`,class:h({"th-has-nan":A.value[t]}),style:g(On.value)},[p(`div`,Ue,[e.type===T.value.DATE&&k.value[t]?(_(),f(`div`,We,[p(`div`,Ge,[p(`div`,Ke,[p(`label`,{for:`from_${t}`},b(H.value.translations.from),9,qe),Se(p(`input`,{id:`from_${t}`,type:`date`,"onUpdate:modelValue":e=>k.value[t].from=e,onInput:e=>{Q(),Pr(t)},style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,Je),[[ye,k.value[t].from]])]),p(`div`,Ye,[p(`label`,{for:`to_${t}`},b(H.value.translations.to),9,Xe),Se(p(`input`,{id:`to_${t}`,type:`date`,"onUpdate:modelValue":e=>k.value[t].to=e,onInput:e=>{Q(),Pr(t)},style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,Ze),[[ye,k.value[t].to]])])]),p(`div`,Qe,[e.isSort?(_(),f(`button`,{key:0,onClick:e=>Fr(t,e),class:h({"th-button-active":[T.value.DESC,T.value.ASC].includes(I.value[t])}),style:g(`cursor:${Y.value?`pointer`:`default`}; background:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.backgroundColor};color:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.color}`)},[I.value[t]===T.value.ASC?(_(),f(`span`,{key:0,innerHTML:[T.value.DATE].includes(e.type)?Z.value.sort09:Z.value.sortAZ},null,8,et)):I.value[t]===T.value.DESC?(_(),f(`span`,{key:1,innerHTML:[T.value.DATE].includes(e.type)?Z.value.sort90:Z.value.sortZA},null,8,tt)):(_(),f(`span`,{key:2,innerHTML:Z.value.arrowSort},null,8,nt))],14,$e)):d(``,!0),p(`button`,{onClick:n=>{kr(t),Ar(t,e,n)},disabled:!yn.value[t]&&br(t,e),class:`th-reset`,style:g({cursor:Y.value?`pointer`:`default`})},` ✖ `,12,rt)])])):d(``,!0),e.isSearch?Se((_(),f(`input`,{key:1,placeholder:H.value.translations.inputPlaceholder,"onUpdate:modelValue":e=>F.value[t]=e,onInput:r[5]||=e=>lr(Q,400),name:`search_${t}`,style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,it)),[[ye,F.value[t]]]):d(``,!0),!A.value[t]&&e.isSort&&e.type!==T.value.DATE?(_(),f(`button`,{key:2,onClick:e=>Fr(t,e),class:h({"th-button-active":[T.value.DESC,T.value.ASC].includes(I.value[t])}),style:g(`cursor:${Y.value?`pointer`:`default`};background:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.backgroundColor};color:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.color}`)},[I.value[t]===T.value.ASC?(_(),f(`span`,{key:0,innerHTML:[T.value.NUMERIC].includes(e.type)?Z.value.sort09:Z.value.sortZA},null,8,ot)):I.value[t]===T.value.DESC?(_(),f(`span`,{key:1,innerHTML:[T.value.NUMERIC].includes(e.type)?Z.value.sort90:Z.value.sortAZ},null,8,st)):(_(),f(`span`,{key:2,innerHTML:Z.value.arrowSort},null,8,ct))],14,at)):d(``,!0),e.isMultiselect?(_(),f(`button`,{key:3,onClick:n=>Ir(t,e,n),innerHTML:Z.value.filter,class:h({"th-button-active":M.value[t]&&M.value[t].length!==$(t).length}),style:g(`cursor:${Y.value?`pointer`:`default`};background:${M.value[t]&&M.value[t].length!==$(t).length?``:G.value.buttons.filter.inactive.backgroundColor};color:${M.value[t]&&M.value[t].length!==$(t).length?``:G.value.buttons.filter.inactive.color}`)},null,14,lt)):d(``,!0),E.value.col===t&&Zn.value?(_(),f(`button`,{key:4,onClick:r[6]||=e=>R.value=!R.value,innerHTML:Z.value.chart,class:h({"th-button-active":R.value}),style:g(`cursor:${Y.value?`pointer`:`default`};background:${R.value?``:G.value.buttons.filter.inactive.backgroundColor};color:${R.value?``:G.value.buttons.filter.inactive.color}`)},null,14,ut)):d(``,!0),e.rangeFilter&&P.value[t]&&!A.value[t]?(_(),f(`div`,dt,[p(`label`,{for:`rangeMin${t}`},[...r[27]||=[p(`span`,{style:{color:`grey`}},`ᒥ`,-1),m(` min `,-1),p(`span`,{style:{color:`grey`}},`ᒣ`,-1)]],8,ft),Se(p(`input`,{type:`number`,id:`rangeMin${t}`,max:j.value[t].max,min:j.value[t].min,"onUpdate:modelValue":e=>P.value[t].min=e,onInput:r[7]||=e=>lr(Q,400),style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,pt),[[ye,P.value[t].min,void 0,{number:!0}]]),Se(p(`input`,{type:`number`,id:`rangeMax${t}`,max:j.value[t].max,min:j.value[t].min,"onUpdate:modelValue":e=>P.value[t].max=e,onInput:r[8]||=e=>lr(Q,400),style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,mt),[[ye,P.value[t].max,void 0,{number:!0}]]),p(`label`,{for:`rangeMax${t}`},[...r[28]||=[p(`span`,{style:{color:`grey`}},`ᒪ`,-1),m(` max `,-1),p(`span`,{style:{color:`grey`}},`ᒧ`,-1)]],8,ht)])):d(``,!0),or(t,e)?(_(),f(`button`,{key:6,onClick:n=>Ar(t,e,n),disabled:br(t,e),class:`th-reset`,style:g({cursor:Y.value?`pointer`:`default`})},` ✖ `,12,gt)):d(``,!0),e.isMultiselect?(_(),f(`div`,{key:7,class:`th-dropdown`,"data-is-open":`false`,id:`th_dropdown_${t}`,style:g(`background:${Mn.value.backgroundColor};color:${Mn.value.color}`)},[p(`button`,{class:`close-dropdown`,onClick:n=>Ir(t,e,n),style:g(`cursor:${Y.value?`pointer`:`default`};background:${Nn.value.backgroundColor};color:${Nn.value.color}`)},` ✖ `,12,vt),(_(!0),f(l,null,y($(t),(e,n)=>(_(),f(`span`,{class:`th-option`,key:`th_option_${t}_${n}`,onClick:n=>Nr(e,t),onKeyup:[Ce(n=>Nr(e,t),[`enter`]),Ce(n=>Nr(e,t),[`space`])],style:g(`opacity:${vr(e,t)?1:.5}`),tabindex:`0`},[vr(e,t)?(_(),f(`span`,{key:0,style:g(`color:${Mn.value.icons.selected.color};margin-right:5px`),class:`th-icon-green`},b(Mn.value.icons.selected.unicode),5)):(_(),f(`span`,{key:1,style:g(`color:${Mn.value.icons.unselected.color};margin-right:5px`),class:`th-icon-red`},b(Mn.value.icons.unselected.unicode),5)),p(`span`,null,b(e),1)],44,yt))),128))],12,_t)):d(``,!0)])],6))),128))])],64)):d(``,!0),p(`tr`,null,[r[30]||=p(`th`,{class:`invisible-cell`},null,-1),(_(!0),f(l,null,y(V.value,(e,t)=>(_(),f(`th`,{key:`col_selector_${t}`,class:h({"vue-ui-table-col-selector":!A.value[t],"th-has-nan":A.value[t]}),style:g(`background:${t===Sn.value&&!A.value[t]?G.value.selected.backgroundColor:G.value.backgroundColor};color:${t===Sn.value&&!A.value[t]?G.value.selected.color:G.value.color};outline:${G.value.outline}`)},[A.value[t]?d(``,!0):(_(),f(`div`,{key:0,innerHTML:V.value[t].type===T.value.NUMERIC?Z.value.chevronDown:``,class:h({"col-selector":V.value[t].type===T.value.NUMERIC}),tabindex:`0`,style:g({cursor:Y.value?`pointer`:`default`}),onClick:we(e=>Mr(t),[`stop`]),onKeyup:Ce(e=>Mr(t),[`enter`])},null,46,bt))],6))),128))])],4),p(`tbody`,{onClick:cr,onKeydown:r[9]||=e=>Tr(e)},[(_(!0),f(l,null,y(Jn.value,(n,r)=>(_(),f(`tr`,{key:`tbody_${r}`,"data-row":r%2==0?`odd`:`even`,class:h(`tr_${x(C)}`),style:g(`${r%2==0?`background:${q.value.odd.backgroundColor};color:${q.value.odd.color}`:`background:${q.value.even.backgroundColor};color:${q.value.even.color}`}`)},[p(`td`,{class:`vue-ui-table-td-iteration`,"data-row":r%2==0?`odd`:`even`,style:g({outline:q.value.outline})},b(n.absoluteIndex+1),13,St),(_(!0),f(l,null,y(n.td,(i,a)=>(_(),f(`td`,{"data-row":r%2==0?`odd`:`even`,key:`td_${r}_${a}`,style:g(yr(i)||e.dataset.header[a].type===T.value.DATE?`text-align:right;font-variant-numeric: tabular-nums;outline:${q.value.outline}`:`outline:${q.value.outline}`),onClick:t=>jr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),onKeyup:[Ce(t=>jr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),[`enter`]),Ce(t=>jr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),[`space`])],class:h({"td-numeric":e.dataset.header[a].type===T.value.NUMERIC,"td-focusable":!0,"td-has-nan":A.value[a]}),id:`cell_${r}_${a}_${x(C)}`,tabindex:`0`},[n.meta&&n.meta.markerIndices.includes(a)&&n.meta.unicodeIcon?(_(),f(`span`,{key:0,style:g(`color:${n.meta.color};margin-right:3px`),innerHTML:n.meta.unicodeIcon},null,12,wt)):d(``,!0),e.dataset.header[a].type===T.value.DATE?(_(),f(`span`,Tt,b(e.dataset.header[a].prefix)+` `+b(new Date(i).toLocaleString().slice(0,10))+` `+b(e.dataset.header[a].suffix),1)):e.dataset.header[a].isPercentage?(_(),f(`span`,Et,b(x(t)({v:Number(i*100),s:`%`,r:e.dataset.header[a].decimals})),1)):N.value[a]&&e.dataset.header[a].percentageTo&&!e.dataset.header[a].isPercentage?(_(),f(`span`,{key:3,class:h({"td-nan":isNaN(Number(i))})},b(isNaN(Number(i))?`${i} is not ${T.value.NUMERIC}`:x(t)({p:e.dataset.header[a].prefix,v:Number(i),s:e.dataset.header[a].suffix,r:e.dataset.header[a].decimals}))+` (`+b(isNaN(Number(i))?``:x(t)({v:Number(i/gr(N.value[a].referenceIndex)*100),s:`%`,r:e.dataset.header[a].decimals}))+`) `,3)):e.dataset.header[a].type===T.value.NUMERIC?(_(),f(`span`,{key:4,class:h({"td-nan":isNaN(Number(i))})},b(isNaN(Number(i))?`${i} is not ${T.value.NUMERIC}`:x(t)({p:e.dataset.header[a].prefix,v:Number(i.toFixed(e.dataset.header[a].decimals)),s:e.dataset.header[a].suffix,r:e.dataset.header[a].decimals})),3)):(_(),f(`span`,Dt,b(e.dataset.header[a].prefix)+` `+b(i)+` `+b(e.dataset.header[a].suffix),1))],46,Ct))),128))],14,xt))),128))],32)])],4),p(`div`,{class:h({"td-selector-info":!0,"td-selector-info--active":E.value.col!==void 0&&E.value.rows.length}),style:g(`background:${Fn.value.infoBar.backgroundColor};color:${Fn.value.infoBar.color}`)},[E.value.col!==void 0&&E.value.rows.length?(_(),f(l,{key:0},[p(`div`,{innerHTML:Z.value.table,class:`td-selector-icon`},null,8,Ot),p(`span`,null,[p(`b`,null,[m(b(er.value.name)+` `,1),er.value.isPercentage?(_(),f(`span`,kt,` / `+b(e.dataset.header[N.value[E.value.col].referenceIndex].name),1)):d(``,!0)]),p(`span`,At,[m(b(H.value.translations.nb)+` : `,1),p(`b`,jt,b(E.value.rows.length),1)]),(_(),f(l,null,y([`sum`,`average`],e=>p(`span`,{key:e,style:{"margin-left":`12px`}},[m(b(H.value.translations[e])+` : `,1),er.value.isPercentage?(_(),f(`b`,Mt,b(tr.value[`${e}Percentage`]),1)):(_(),f(`b`,Nt,b(er.value.prefix)+` `+b(tr.value[`${e}Regular`])+` `+b(er.value.suffix),1)),er.value.isPercentage?(_(),f(`b`,Pt,`%`)):d(``,!0)])),64))]),p(`button`,{onClick:ur,class:`td-selector-info-reset`,style:g(`cursor:${Y.value?`pointer`:`default`};background:${Nn.value.backgroundColor};color:${Nn.value.color};border-radius:${Nn.value.borderRadius}`)},` ✖ `,4)],64)):d(``,!0)],6),B.value.length>10?(_(),f(`div`,Ft,[m(b(H.value.translations.totalRows)+` : `+b(e.dataset.body.length)+` | `+b(H.value.translations.paginatorLabel)+` : `,1),B.value.length>10?Se((_(),f(`select`,{key:0,id:`paginatorSelector`,"onUpdate:modelValue":r[10]||=e=>bn.value=e,onChange:r[11]||=e=>{ur(),Sr()},style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},[(_(!0),f(l,null,y(xn.value,(t,n)=>(_(),f(l,null,[B.value.length>t||e.dataset.body.length===t?(_(),f(`option`,{key:`paginator_option_${n}`},b(t),1)):d(``,!0)],64))),256))],36)),[[ve,bn.value,void 0,{number:!0}]]):d(``,!0)])):d(``,!0),bn.value>=250?(_(),f(`div`,It,[p(`span`,{innerHTML:Z.value.warning},null,8,Lt),m(b(H.value.translations.sizeWarning),1)])):d(``,!0),X.value.length>1&&X.value.length<=10?(_(),f(`div`,{key:3,class:`vue-ui-table-navigation-indicator`,style:g(`background:${Pn.value.navigationIndicator.backgroundColor};width:calc(${D.value/(X.value.length-1)*100}%)`)},null,4)):d(``,!0),X.value.length>1?(_(),f(`div`,Rt,[p(`button`,pe({class:`vue-ui-table-navigation`,onClick:r[12]||=we(e=>wr(`previous`),[`stop`]),innerHTML:Z.value.chevronLeft},kn(D.value===0)),null,16,zt),X.value.length>3?(_(),f(l,{key:0},[p(`button`,pe({class:`vue-ui-table-navigation`,onClick:r[13]||=we(e=>wr(1),[`stop`])},kn(D.value===0)),` 1 `,16),X.value.length>10?(_(),f(`div`,{key:0,class:`vue-ui-table-page-scroller-wrapper`,style:g({cursor:Y.value?`pointer`:`default`})},[p(`label`,Bt,b(H.value.translations.page)+` `+b(D.value+1)+` / `+b(X.value.length),1),p(`input`,{class:`vue-ui-table-page-scroller`,id:`pageScroller`,type:`range`,step:`1`,min:0,max:X.value.length-1,onInput:r[14]||=e=>Lr(e),value:D.value,style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border};accent-color:${K.value.accentColor}`)},null,44,Vt)],4)):(_(),f(`span`,Ht,b(H.value.translations.page)+` `+b(D.value+1)+` / `+b(X.value.length),1)),p(`button`,pe({class:`vue-ui-table-navigation`,onClick:r[15]||=we(e=>wr(X.value.length),[`stop`])},kn(D.value===X.value.length-1)),b(X.value.length),17)],64)):(_(),f(l,{key:1},[m(b(H.value.translations.page)+` `+b(D.value+1)+` / `+b(X.value.length),1)],64)),p(`button`,pe({class:`vue-ui-table-navigation`,onClick:r[16]||=we(e=>wr(`next`),[`stop`]),innerHTML:Z.value.chevronRight},kn(D.value===X.value.length-1)),null,16,Ut)])):d(``,!0),de(x(rn),{ref_key:`chartModal`,ref:Br,backgroundColor:J.value.modal.backgroundColor,headerColor:J.value.modal.color,color:J.value.modal.color,forcedHeight:500,isCursorPointer:Y.value,withPadding:``,withFullWidth:``,noLayerUpdate:``,onClose:r[21]||=e=>R.value=!1,onSize:rr},{before:xe(()=>[p(`div`,Wt,[Xn.value.length?(_(),f(`button`,{key:0,onClick:r[17]||=e=>z.value=!0,innerHTML:Z.value.donut,class:h({"is-active-chart":w.value.type===T.value.DONUT||z.value}),style:g(`cursor:${Y.value?`pointer`:`default`};background:${w.value.type===T.value.DONUT||z.value?J.value.modal.buttons.selected.backgroundColor:J.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.DONUT||z.value?J.value.modal.buttons.selected.color:J.value.modal.buttons.unselected.color}`)},null,14,Gt)):d(``,!0),p(`button`,{onClick:r[18]||=e=>{w.value.type=T.value.LINE,z.value=!1},innerHTML:Z.value.chart,class:h({"is-active-chart":w.value.type===T.value.LINE&&!z.value}),style:g(`cursor:${Y.value?`pointer`:`default`};background:${w.value.type===T.value.LINE&&!z.value?J.value.modal.buttons.selected.backgroundColor:J.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.LINE&&!z.value?J.value.modal.buttons.selected.color:J.value.modal.buttons.unselected.color}`)},null,14,Kt),p(`button`,{onClick:r[19]||=e=>{w.value.type=T.value.BAR,z.value=!1},innerHTML:Z.value.bar,class:h({"is-active-chart":w.value.type===T.value.BAR&&!z.value}),style:g(`cursor:${Y.value?`pointer`:`default`};background:${w.value.type===T.value.BAR&&!z.value?J.value.modal.buttons.selected.backgroundColor:J.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.BAR&&!z.value?J.value.modal.buttons.selected.color:J.value.modal.buttons.unselected.color}`)},null,14,qt)])]),content:xe(()=>[p(`div`,Jt,[z.value&&Xn.value.length?(_(),f(`div`,{key:0,style:g(`background:${J.value.modal.backgroundColor};color:${J.value.modal.color}`)},[p(`fieldset`,Yt,[p(`legend`,null,b(H.value.translations.chooseCategoryColumn),1),p(`div`,Xt,[(_(!0),f(l,null,y(Xn.value,(e,t)=>(_(),f(`div`,{key:`donut_radio_${t}`,class:`vue-ui-table-fieldset-option`},[p(`input`,{type:`radio`,name:e.name,id:e.name,checked:L.value&&e.name===L.value.name,onInput:e=>L.value=Xn.value[t],style:g(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border};accent-color:${K.value.accentColor}`)},null,44,Zt),p(`label`,{for:e.name},b(e.name),9,Qt)]))),128))]),p(`button`,{class:`vue-ui-table-generate-donut`,disabled:!L.value,onClick:ar,style:g(`cursor:${Y.value?`pointer`:`default`};background:${J.value.modal.buttons.selected.backgroundColor};color:${J.value.modal.buttons.selected.color}`)},[p(`div`,{style:{"margin-bottom":`-3px`},innerHTML:Z.value.donut},null,8,en),m(` `+b(H.value.translations.makeDonut),1)],12,$t)])],4)):d(``,!0),[T.value.BAR,T.value.LINE].includes(w.value.type)&&!z.value?(_(),f(l,{key:1},[Kn.value.length>1?(_(),f(`label`,{key:0,style:g({color:J.value.modal.color})},[m(b(H.value.translations.xAxisLabels)+` `,1),Se(p(`select`,{"onUpdate:modelValue":r[20]||=e=>Tn.value=e},[(_(!0),f(l,null,y(Kn.value,e=>(_(),f(`option`,null,b(e),1))),256))],512),[[ve,Tn.value]])],4)):d(``,!0),p(`div`,tn,[w.value.type===T.value.LINE?(_(),ue(se,{key:`chart_line_${wn.value}`,dataset:ir.value.xyDatasetLine,config:ir.value.xyConfig},null,8,[`dataset`,`config`])):d(``,!0),w.value.type===T.value.BAR?(_(),ue(se,{key:`chart_bar_${wn.value}`,dataset:ir.value.xyDatasetBar,config:ir.value.xyConfig},null,8,[`dataset`,`config`])):d(``,!0)]),E.value.rows.length>=2?(_(),f(`div`,{key:1,class:`chart-trend`,style:g(`color:${J.value.modal.color}`)},[r[31]||=p(`span`,null,`---`,-1),m(` Trend: `+b(x(t)({v:ir.value.progression.trend*100,s:`%`,r:1})),1)],4)):d(``,!0)],64)):d(``,!0),[T.value.DONUT].includes(w.value.type)&&!z.value?(_(),f(`div`,nn,[de(ce,{dataset:hn.value,config:ir.value.donutConfig},null,8,[`dataset`,`config`])])):d(``,!0)])]),_:1},8,[`backgroundColor`,`headerColor`,`color`,`isCursorPointer`])],4))}},[[`__scopeId`,`data-v-015ca75e`]]);export{Te as n,rn as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{t as i}from"./resolveChartConfig-0IvbmIE_.js";import{D as ee,Tt as te,X as a,at as ne,m as re,nt as ie,r as ae,zt as oe}from"./lib-rPeBMZrn.js";import{n as se,t as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./useConfig-CBXrYhMI.js";import{t as ue}from"./usePrinter-DVf3YcG5.js";import{t as de}from"./useUserOptionState-CXlFnwPv.js";import{t as fe}from"./vue_ui_table_heatmap-DVMDsaVJ.js";import{t as pe}from"./Shape-CRe8woTu.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as s,computed as c,createBlock as me,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as he,createVNode as ge,defineAsyncComponent as _e,guardReactiveProps as ve,mergeProps as f,nextTick as p,normalizeClass as m,normalizeProps as ye,normalizeStyle as h,onBeforeUnmount as be,onMounted as g,openBlock as _,ref as v,renderList as y,renderSlot as b,unref as x,useCssVars as xe,useSlots as Se,watch as Ce,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>M}),w=[`id`],T={role:`cell`},E={role:`row`},D=[`data-cell`],O={key:0,style:{display:`flex`,"flex-direction":`row`,gap:`2px`,"align-items":`center`}},k=[`height`,`width`],A={key:0,role:`cell`,"data-cell":`sum`},we={key:1,role:`cell`,"data-cell":`average`},j={key:2,role:`cell`,"data-cell":`median`},Te={key:1,ref:`source`,dir:`auto`},M=/*#__PURE__*/ o({__name:`vue-ui-table-heatmap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e,{expose:o}){xe(e=>({v456a187f:Ne.value,c373804c:Me.value}));let C=_e(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_table_heatmap:M}=le(),N=e,P=v(a()),F=v(!1),I=v(null),L=null,R=!1;be(()=>{R=!0,L?.disconnect(),L=null});let z=v(!1),B=v(0),Ee=Se(),V=c({get:()=>K(),set:e=>e}),H=c(()=>V.value.debug);g(()=>{Ee[`chart-background`]&&H.value&&console.warn(`VueUiTableHeatmap does not support the #chart-background slot.`)}),se({config:()=>V.value,dataset:()=>N.dataset,component:`VueUiTableHeatmap`,rules:[ce.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]},{test:e=>e.some(e=>e?.values&&e?.values.length>31),message:[`👀 Some series have a number of data points > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`]}]});let{userOptionsVisible:U,setUserOptionsVisibility:W,keepUserOptionState:G}=de({config:V.value});function K(){return i(N.config,M,fe)}Ce(()=>N.config,e=>{V.value=K(),U.value=!V.value.userOptions.showOnChartHover,Y()},{deep:!0});let{isPrinting:De,isImaging:Oe,generatePdf:q,generateImage:J}=ue({elementId:`table_heatmap_${P.value}`,fileName:`vue-ui-table-heatmap`,options:V.value.userOptions.print}),ke=c(()=>V.value.table.responsiveBreakpoint),Ae=c(()=>!!N.dataset&&N.dataset.length);g(()=>{Y()});function Y(){if(oe(N.dataset)&&ne({componentName:`VueUiTableHeatmap`,type:`dataset`,debug:H.value}),L?.disconnect(),L=null,R||!I.value)return;let e=new ResizeObserver(t=>{R||L!==e||t.forEach(e=>{F.value=e.contentRect.width<ke.value})});L=e,e.observe(I.value)}let X=c(()=>N.dataset.map(e=>{let t=e.values.map(e=>isNaN(e)?0:e),n=t.reduce((e,t)=>e+t,0);return{...e,values:t,serieExtremes:{max:Math.max(...t),min:Math.min(...t)},sum:n,average:n/t.length,median:re(t),displayValues:[e.name,...e.values],id:a()}})),Z=c(()=>{let e=X.value.flatMap(e=>e.values);return{min:Math.min(...e),max:Math.max(...e)}});function je(e,t){let n=V.value.style.heatmapColors.useIndividualScale;return te(V.value.style.heatmapColors.min,V.value.style.heatmapColors.max,n?t.min:Z.value.min,n?t.max:Z.value.max,e)}let Q=c(()=>X.value.map(e=>({...e,colors:e.displayValues.map(t=>isNaN(t)?V.value.style.backgroundColor:je(t,e.serieExtremes))}))),Me=c(()=>V.value.style.backgroundColor),Ne=c(()=>`${V.value.table.borderWidth}px`);function $(e=null){p(()=>{let t=Q.value.map(e=>[[e.name],e.displayValues,[e.sum],[e.average],[e.median]]),n=[[[``],V.value.table.head.values,[`sum`],[`average`],[`median`]]].concat(t),r=ee(n);e?e(r):ie({csvContent:r,title:`vue-ui-table-heatmap`})})}function Pe(e){z.value=e,B.value+=1}return o({generatePdf:q,generateCsv:$,generateImage:J}),(e,i)=>(_(),u(`div`,{ref_key:`tableContainer`,ref:I,style:h(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${V.value.userOptions.show?`36px`:``}; ${z.value?`vue-data-ui-wrapper-fullscreen`:``}; position:relative;`),class:m({"vue-data-ui-component":!0,"vue-ui-responsive":F.value}),id:`table_heatmap_${P.value}`,onMouseenter:i[0]||=()=>x(W)(!0),onMouseleave:i[1]||=()=>x(W)(!1)},[V.value.userOptions.show&&Ae.value&&(x(G)||x(U))?(_(),me(x(C),f({ref:`details`,key:`user_option_${B.value}`,backgroundColor:V.value.style.backgroundColor,color:V.value.style.color,isPrinting:x(De),isImaging:x(Oe),uid:P.value,isFullscreen:z.value,chartElement:I.value},x(n)(V.value.userOptions,`pdf csv img fullscreen`),{onToggleFullscreen:Pe,onGeneratePdf:x(q),onGenerateCsv:$,onGenerateImage:x(J),style:{visibility:x(G)?x(U)?`visible`:`hidden`:`visible`}}),he({_:2},[y(x(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[b(e.$slots,t,ye(ve(x(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`onGeneratePdf`,`onGenerateImage`,`style`])):l(``,!0),d(`table`,{class:m({"vue-ui-table-heatmap":!0}),style:h(`width:100%;font-family:${V.value.style.fontFamily};background:${V.value.style.backgroundColor};`)},[d(`caption`,null,[b(e.$slots,`caption`,{},void 0,!0)]),d(`thead`,null,[d(`tr`,{role:`row`,style:h(`background:${V.value.table.head.backgroundColor};color:${V.value.table.head.color}`)},[(_(!0),u(s,null,y(V.value.table.head.values,(t,n)=>(_(),u(`th`,T,[b(e.$slots,`head`,f({ref_for:!0},{value:t,rowIndex:n,type:typeof t,isResponsive:F.value}),void 0,!0)]))),256))],4)]),d(`tbody`,null,[(_(!0),u(s,null,y(Q.value,(t,n)=>(_(),u(`tr`,E,[(_(!0),u(s,null,y(t.displayValues,(r,i)=>(_(),u(`td`,{role:`cell`,"data-cell":V.value.table.head.values[i]},[t.color&&i===0?(_(),u(`div`,O,[t.color?(_(),u(`svg`,{key:0,height:V.value.style.shapeSize,width:V.value.style.shapeSize,viewBox:`0 0 20 20`,style:{background:`none`,overflow:`visible`}},[ge(pe,{plot:{x:10,y:10},color:t.color,radius:9,shape:t.shape||`circle`},null,8,[`color`,`shape`])],8,k)):l(``,!0),b(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value}),void 0,!0)])):(_(),u(s,{key:1},[i===0?b(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value}),void 0,!0,0):l(``,!0),i>0?b(e.$slots,`cell`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value,color:t.colors[i],textColor:x(ae)(t.colors[i])}),void 0,!0,1):l(``,!0)],64))],8,D))),256)),V.value.table.showSum?(_(),u(`td`,A,[b(e.$slots,`sum`,f({ref_for:!0},{value:t.sum,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0),V.value.table.showAverage?(_(),u(`td`,we,[b(e.$slots,`average`,f({ref_for:!0},{value:t.average,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0),V.value.table.showMedian?(_(),u(`td`,j,[b(e.$slots,`median`,f({ref_for:!0},{value:t.median,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0)]))),256))])],4),e.$slots.source?(_(),u(`div`,Te,[b(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],46,w))}},[[`__scopeId`,`data-v-b22ddf12`]]);export{C as n,M as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./userOptionsSlots-CWtXN5Q6.js";import{n as r}from"./resolveChartConfig-0IvbmIE_.js";import{$ as i,D as a,Ht as o,Jt as ee,S as te,X as ne,at as re,i as ie,m as ae,nt as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./useConfig-_JwRfIqE.js";import{t as pe}from"./usePrinter-DVf3YcG5.js";import{t as me}from"./useUserOptionState-CXlFnwPv.js";import{t as he}from"./vClickOutside-BxNzkY17.js";import{t as ge}from"./vue_ui_table_sparkline-BQO5A9u8.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as s,computed as c,createBlock as ve,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as ye,createVNode as f,defineAsyncComponent as p,mergeProps as be,nextTick as xe,normalizeClass as m,normalizeStyle as h,onBeforeUnmount as Se,onMounted as Ce,openBlock as g,ref as _,renderList as v,renderSlot as we,shallowRef as Te,toDisplayString as y,unref as b,useCssVars as Ee,useSlots as De,watch as Oe,withCtx as ke,withDirectives as Ae}from"vue";var je=/* @__PURE__ */ e({default:()=>Ge}),Me=[`id`],Ne={style:{"z-index":`1`,"padding-right":`24px`}},Pe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Fe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Ie=[`onClick`],Le=[`onClick`],Re=[`data-cell`],ze=[`data-cell`,`onPointerenter`],Be=[`data-cell`],Ve=[`data-cell`],He=[`data-cell`],Ue=[`data-cell`],We={key:1,ref:`source`,dir:`auto`},Ge=/*#__PURE__*/ _e({__name:`vue-ui-table-sparkline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:_e,emit:je}){Ee(e=>({v5fe3988e:e.tdo}));let Ge=p(()=>import(`./vue-ui-sparkline-2_RlGrAT.js`).then(e=>e.n)),x=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ke=p(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_table_sparkline:qe}=fe(),S=e,Je=je,C=_(ne()),Ye=_(0),w=_(0),T=_(null),Xe=De(),Ze=_(!1),E=c({get:()=>et(),set:e=>e}),D=c(()=>E.value.userOptions),O=c(()=>E.value.sparkline),k=c(()=>E.value.thead),A=c(()=>E.value.tbody),j=c(()=>E.value.title);Ce(()=>{Xe[`chart-background`]&&E.value.debug&&console.warn(`VueUiTableSparkline does not support the #chart-background slot.`)}),ue({config:()=>E.value,dataset:()=>S.dataset,component:`VueUiTableSparkline`,rules:[de.emptyArray,{test:e=>e.some(e=>e?.values&&e.values.length>500),message:[`👀 One or more series have > 500 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`]},{test:e=>e.some(e=>e?.values&&e.values.length>1095),message:[`👀 One or more series have > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let M=c(()=>E.value.userOptions.useCursorPointer),{userOptionsVisible:N,setUserOptionsVisibility:Qe,keepUserOptionState:$e}=me({config:E.value});function et(){return r(S.config,qe,ge)}Oe(()=>S.config,e=>{E.value=et(),N.value=!E.value.userOptions.showOnChartHover,ct(),w.value+=1},{deep:!0}),Oe(()=>S.dataset,e=>{U.value=H.value,w.value+=1},{deep:!0});let{isPrinting:tt,isImaging:nt,generatePdf:rt,generateImage:it}=pe({elementId:`table_${C.value}`,fileName:j.value.text||`vue-ui-table-sparkline`,options:E.value.userOptions.print}),at=c(()=>se(E.value.customPalette)),P=_(null),F=_(!1),ot=c(()=>E.value.responsiveBreakpoint);Ce(()=>{ct()});let st=_(E.value.colNames),I=Te(null);function ct(){le(S.dataset)&&re({componentName:`VueUiTableSparkline`,type:`dataset`}),I.value&&I.value.disconnect(),I.value=new ResizeObserver(e=>{e.forEach(e=>{F.value=e.contentRect.width<ot.value})}),P.value&&I.value.observe(P.value),st.value=[];for(let e=0;e<pt.value;e+=1)st.value.push(E.value.colNames[e]||`col ${e}`)}Se(()=>{I.value&&I.value.disconnect()});function L(e){if([null,void 0].includes(e))return null;let t=Number(e);return Number.isFinite(t)?t:null}function R(e){return typeof e==`number`&&Number.isFinite(e)}function lt(e=[]){return e.map(L).filter(R)}function z(e,t,n){let r=L(e),i=L(t),a=R(r),o=R(i);return a&&o?n===-1?r-i:i-r:a?-1:+!!o}function B(e,t,n={}){let r=L(e);return r===null?`-`:ie(E.value.formatter,r,i({p:E.value.prefix,v:r,s:E.value.suffix,r:t}),n)}let V=c(()=>(S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{re({componentName:`VueUiTableSparkline`,type:`datasetSerieAttribute`,property:e,index:t})})}),S.dataset.map((e,t)=>{let n=e.values||[],r=lt(n),i=r.length?r.reduce((e,t)=>e+t,0):null,a=r.length?i/r.length:null,ee=r.length?ae(r):null;return{...e,values:n,color:te(e.color)||at.value[t]||o[t]||o[t%o.length],sum:i,average:a,median:ee,sparklineDataset:n.map((e,t)=>({period:E.value.colNames[t]||`col ${t}`,value:L(e)}))}})));function ut(e){let t=(e[0]?.values||[]).map((t,n)=>e.map(e=>e?.values?.[n]??null)).map(e=>e.map((e,t)=>[e,t]).sort((e,t)=>z(e[0],t[0],1)).map(e=>e[1]));return e.map((e,n)=>({...e,values:e.values||[],orders:t[n]}))}let H=c(()=>ut(V.value)),U=_(H.value),dt=c(()=>Math.max(...U.value.map(e=>(e.values||[]).length))),W=_(void 0),G=_(!1),K=_(void 0),ft=_(1);function q(){G.value=!1,K.value=void 0,Z.value=void 0,ft.value=1,$.value.forEach(e=>e.state=1),X.value={name:1,sum:1,average:1,median:1},U.value=H.value}function J(e,t,n){if([`name`,`sum`,`average`,`median`].includes(e.type)){mt(e.type,t,n);return}if(!bt(t))return;if(Q.value=t,Z.value=void 0,![null,void 0].includes(K.value)&&t!==K.value&&(K.value=void 0,q()),$.value[t].state===n&&K.value===t){K.value=void 0,q();return}G.value=!0,K.value=t;let r=H.value.map(e=>e.values?.[t]??null),i=n;$.value[t].state=i,ft.value=i,t===W.value?W.value=void 0:W.value=t;let a=r.map((e,t)=>[t,e]).sort((e,t)=>z(e[1],t[1],i)).map(e=>e[0]).map(e=>H.value[e]);U.value=a,w.value+=1}let pt=c(()=>Math.max(...S.dataset.map(e=>(e.values||[]).length))),Y=c(()=>{let e=st.value.map(e=>({type:`reg`,value:e}));if(!e.length)for(let t=0;t<pt.value;t+=1)e.push({type:`reg`,value:`col ${t+1}`});E.value.showTotal&&(e=[...e,{type:`sum`,value:E.value.translations.total}]);let t;return t=E.value.showAverage&&E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average},{type:`median`,value:E.value.translations.median}]:E.value.showAverage&&!E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average}]:!E.value.showAverage&&E.value.showMedian?[...e,{type:`median`,value:E.value.translations.median}]:e,E.value.showSparklines?[...t,{type:`chart`,value:E.value.translations.chart}]:t}),X=_({name:1,sum:1,average:1,median:1}),Z=_(void 0);function mt(e,t,n){if(!U.value||U.value.length===0||!xt(e))return;if(Z.value!==e&&(Z.value=void 0),![null,void 0].includes(K.value)&&t!==K.value&&q(),K.value=void 0,X.value[e]===n&&Z.value){Z.value=void 0,q();return}Z.value=e,G.value=!0,X.value[e]=n,[null,void 0].includes(t)||($.value[t].state=X.value[e]);let r=X.value[e],i=[...U.value].sort((t,n)=>{let i=t[e],a=n[e];return typeof i==`string`&&typeof a==`string`?r===-1?i.localeCompare(a):a.localeCompare(i):z(i,a,r)});U.value=i}let Q=_(void 0),ht=_(void 0);function gt({dataIndex:e,serieIndex:t}){Q.value=e,ht.value=t,T.value[e]&&!F.value&&T.value[e].scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}let _t=_(!1);function vt(e){_t.value=e,Ye.value+=1}function yt(e=null){xe(()=>{let t=[E.value.translations.serie].concat(Y.value),n=V.value.map((e,t)=>[[e.name],e.values,[e.sum],[e.average],[e.median]]),r=[t].concat(n),i=a(r);e?e(i):oe({csvContent:i,title:j.value.text||`vue-ui-table-sparkline`})})}function bt(e){return E.value.sortedDataColumnIndices.includes(e)}function xt(e){return e.type===`name`||e===`name`?E.value.sortedSeriesName:e.type===`sum`||e===`sum`?E.value.sortedSum:e.type===`average`||e===`average`?E.value.sortedAverage:e.type===`median`||e===`median`?E.value.sortedMedian:!1}function St(e,t,n){return[`sum`,`average`,`median`].includes(t.type)?Z.value===t.type&&X.value[t.type]===n?1:.3:e===K.value&&$.value[e].state===n?1:.3}function Ct(){E.value.resetSortOnClickOutside&&q()}let $=c({get:()=>Y.value.map(e=>({state:1})),set:e=>e});function wt(e){e?.stage===`start`?Ze.value=!0:e?.stage===`end`?Ze.value=!1:it()}async function Tt(){Je(`copyAlt`,{config:E.value,dataset:V.value}),E.value.userOptions.callbacks.altCopy?await Promise.resolve(E.value.userOptions.callbacks.altCopy({config:E.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return _e({generatePdf:rt,generateImage:it,generateCsv:yt,restoreOrder:q,copyAlt:Tt}),(e,r)=>(g(),u(`div`,{ref_key:`tableContainer`,ref:P,class:m({"vue-data-ui-component":!0,"vue-ui-table-sparkline":!0,"vue-ui-responsive":F.value}),style:{overflow:`hidden`},id:`table_${C.value}`,onMouseenter:r[3]||=()=>b(Qe)(!0),onMouseleave:r[4]||=()=>b(Qe)(!1)},[j.value.text?(g(),u(`div`,{key:0,class:`vue-ui-table-sparkline-caption`,style:h({backgroundColor:j.value.backgroundColor})},[d(`div`,{class:`atom-title`,style:h({fontSize:`${j.value.fontSize}px`,fontWeight:j.value.bold?`bold`:`normal`,color:j.value.color,textAlign:j.value.textAlign})},y(j.value.text),5),j.value.subtitle.text?(g(),u(`div`,{key:0,class:`atom-subtitle`,style:h({fontSize:`${j.value.subtitle.fontSize}px`,fontWeight:j.value.subtitle.bold?`bold`:`normal`,color:j.value.subtitle.color,textAlign:j.value.textAlign})},y(j.value.subtitle.text),5)):l(``,!0)],4)):l(``,!0),d(`div`,{style:{overflow:`auto`},onPointerleave:r[2]||=e=>{ht.value=void 0,Q.value=void 0}},[d(`table`,{class:`vue-ui-data-table`,style:h({fontFamily:E.value.fontFamily,position:`relative`})},[d(`thead`,Ne,[Ae((g(),u(`tr`,{role:`row`,class:`vue-ui-data-table__thead-row`,style:h({backgroundColor:k.value.backgroundColor,color:k.value.color})},[d(`th`,{role:`cell`,style:h({backgroundColor:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`}),class:`sticky-col-first`},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(E.value.translations.serie),1),U.value.length>1&&E.value.sortedSeriesName?(g(),u(`div`,Pe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:r[0]||=e=>J({type:`name`},null,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===-1?1:.3})},null,8,[`stroke`,`style`])],4),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:r[1]||=e=>J({type:`name`},null,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===1?1:.3})},null,8,[`stroke`,`style`])],4)])):l(``,!0)],4)],4),(g(!0),u(s,null,v(Y.value,(r,i)=>(g(),u(`th`,{role:`cell`,style:h({background:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`,minWidth:i===Y.value.length-1?`${O.value.dimensions.width}px`:`48px`,paddingRight:i===Y.value.length-1&&D.value.show?`36px`:``}),class:m({"sticky-col":i===Y.value.length-1&&E.value.showSparklines})},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(r.value),1),U.value.length>1&&(bt(i)||xt(r))?(g(),u(`div`,Fe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:()=>J(r,i,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:St(i,r,-1)})},null,8,[`stroke`,`style`])],12,Ie),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:()=>J(r,i,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:St(i,r,1)})},null,8,[`stroke`,`style`])],12,Le)])):l(``,!0)],4),D.value.show&&i===Y.value.length-1&&(b($e)||b(N))?(g(),ve(b(Ke),{ref_for:!0,ref:`details`,key:`user_option_${Ye.value}`,backgroundColor:k.value.backgroundColor,color:k.value.color,isPrinting:b(tt),isImaging:b(nt),uid:C.value,hasPdf:D.value.buttons.pdf,hasXls:D.value.buttons.csv,hasImg:D.value.buttons.img,hasFullscreen:D.value.buttons.fullscreen,hasAltCopy:D.value.buttons.altCopy,isFullscreen:_t.value,titles:{...D.value.buttonTitles},chartElement:P.value,position:D.value.position,callbacks:D.value.callbacks,printScale:D.value.print.scale,isCursorPointer:M.value,onToggleFullscreen:vt,onGeneratePdf:b(rt),onGenerateImage:wt,onGenerateCsv:yt,onCopyAlt:Tt,style:h({visibility:b($e)?b(N)?`visible`:`hidden`:`visible`})},ye({_:2},[v(b(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:ke(r=>[we(e.$slots,t,be({ref_for:!0},b(n)(t,r)),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`style`])):l(``,!0)],6))),256))],4)),[[b(he),Ct]])]),d(`tbody`,null,[(g(!0),u(s,null,v(U.value,(e,t)=>(g(),u(`tr`,{role:`row`,style:h({backgroundColor:A.value.backgroundColor,color:A.value.color}),class:m({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0})},[d(`td`,{role:`cell`,style:h({backgroundColor:A.value.backgroundColor,border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.serie,class:`vue-ui-data-table__tbody__td sticky-col-first`},[d(`div`,{dir:`auto`,style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,justifyContent:A.value.textAlign})},[A.value.showColorMarker?(g(),u(`span`,{key:0,style:h({color:e.color})},`⬤`,4)):l(``,!0),d(`span`,null,y(e.name??`-`),1)],4)],12,Re),(g(!0),u(s,null,v(dt.value,(n,r)=>(g(),u(`td`,{dir:`auto`,role:`cell`,ref_for:!0,ref_key:`TD`,ref:T,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,background:Q.value!==void 0&&r===Q.value?A.value.selectedColor.useSerieColor?b(ee)(e.color,20):A.value.selectedColor.fallback:``}),"data-cell":Y.value[r]?Y.value[r].value:``,class:`vue-ui-data-table__tbody__td`,onPointerenter:e=>{ht.value=t,Q.value=r}},y(B(e.values[r],E.value.roundingValues,{datapoint:e,seriesIndex:t,datapointIndex:r})),45,ze))),256)),E.value.showTotal?(g(),u(`td`,{key:0,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.total,class:`vue-ui-data-table__tbody__td`},y(B(e.sum,E.value.roundingTotal,{datapoint:e.sum,seriesIndex:t})),13,Be)):l(``,!0),E.value.showAverage?(g(),u(`td`,{key:1,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.average,class:`vue-ui-data-table__tbody__td`},y(B(e.average,E.value.roundingAverage,{datapoint:e.average,seriesIndex:t})),13,Ve)):l(``,!0),E.value.showMedian?(g(),u(`td`,{key:2,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.median,class:`vue-ui-data-table__tbody__td`},y(B(e.median,E.value.roundingMedian,{datapoint:e.median,seriesIndex:t})),13,He)):l(``,!0),E.value.showSparklines?(g(),u(`td`,{key:3,role:`cell`,"data-cell":E.value.translations.chart,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,backgroundColor:A.value.backgroundColor,padding:`0`}),class:`vue-ui-data-table__tbody__td sticky-col`},[f(b(Ge),{onHoverIndex:({index:e})=>gt({dataIndex:e,serieIndex:t}),"height-ratio":O.value.dimensions.heightRatio,"forced-padding":30,dataset:e.sparklineDataset,showInfo:!1,selectedIndex:Q.value,config:{type:O.value.type,style:{backgroundColor:`transparent`,animation:{show:O.value.animation.show&&!b(tt)&&!b(nt),animationFrames:O.value.animation.animationFrames},padding:{right:12},line:{color:e.color,smooth:O.value.smooth,cutNullValues:O.value.cutNullValues,strokeWidth:O.value.strokeWidth},bar:{color:e.color},area:{color:e.color,opacity:O.value.showArea?16:0,useGradient:O.value.useGradient},verticalIndicator:{color:e.color},plot:{radius:9,stroke:A.value.backgroundColor,strokeWidth:3}}}},null,8,[`onHoverIndex`,`height-ratio`,`dataset`,`selectedIndex`,`config`])],12,Ue)):l(``,!0)],6))),256))])],4)],32),e.$slots.source?(g(),u(`div`,We,[we(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],42,Me))}},[[`__scopeId`,`data-v-bb68c573`]]);export{je as n,Ge as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./userOptionsSlots-CWtXN5Q6.js";import{n as r}from"./resolveChartConfig-0IvbmIE_.js";import{$ as i,D as a,Ht as o,Jt as ee,S as te,X as ne,at as re,i as ie,m as ae,nt as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./useConfig-CBXrYhMI.js";import{t as pe}from"./usePrinter-DVf3YcG5.js";import{t as me}from"./useUserOptionState-CXlFnwPv.js";import{t as he}from"./vClickOutside-BxNzkY17.js";import{t as ge}from"./vue_ui_table_sparkline-BQO5A9u8.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as s,computed as c,createBlock as ve,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as ye,createVNode as f,defineAsyncComponent as p,mergeProps as be,nextTick as xe,normalizeClass as m,normalizeStyle as h,onBeforeUnmount as Se,onMounted as Ce,openBlock as g,ref as _,renderList as v,renderSlot as we,shallowRef as Te,toDisplayString as y,unref as b,useCssVars as Ee,useSlots as De,watch as Oe,withCtx as ke,withDirectives as Ae}from"vue";var je=/* @__PURE__ */ e({default:()=>Ge}),Me=[`id`],Ne={style:{"z-index":`1`,"padding-right":`24px`}},Pe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Fe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Ie=[`onClick`],Le=[`onClick`],Re=[`data-cell`],ze=[`data-cell`,`onPointerenter`],Be=[`data-cell`],Ve=[`data-cell`],He=[`data-cell`],Ue=[`data-cell`],We={key:1,ref:`source`,dir:`auto`},Ge=/*#__PURE__*/ _e({__name:`vue-ui-table-sparkline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:_e,emit:je}){Ee(e=>({v5fe3988e:e.tdo}));let Ge=p(()=>import(`./vue-ui-sparkline-a1e4A-Gl.js`).then(e=>e.n)),x=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ke=p(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_table_sparkline:qe}=fe(),S=e,Je=je,C=_(ne()),Ye=_(0),w=_(0),T=_(null),Xe=De(),Ze=_(!1),E=c({get:()=>et(),set:e=>e}),D=c(()=>E.value.userOptions),O=c(()=>E.value.sparkline),k=c(()=>E.value.thead),A=c(()=>E.value.tbody),j=c(()=>E.value.title);Ce(()=>{Xe[`chart-background`]&&E.value.debug&&console.warn(`VueUiTableSparkline does not support the #chart-background slot.`)}),ue({config:()=>E.value,dataset:()=>S.dataset,component:`VueUiTableSparkline`,rules:[de.emptyArray,{test:e=>e.some(e=>e?.values&&e.values.length>500),message:[`👀 One or more series have > 500 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`]},{test:e=>e.some(e=>e?.values&&e.values.length>1095),message:[`👀 One or more series have > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let M=c(()=>E.value.userOptions.useCursorPointer),{userOptionsVisible:N,setUserOptionsVisibility:Qe,keepUserOptionState:$e}=me({config:E.value});function et(){return r(S.config,qe,ge)}Oe(()=>S.config,e=>{E.value=et(),N.value=!E.value.userOptions.showOnChartHover,ct(),w.value+=1},{deep:!0}),Oe(()=>S.dataset,e=>{U.value=H.value,w.value+=1},{deep:!0});let{isPrinting:tt,isImaging:nt,generatePdf:rt,generateImage:it}=pe({elementId:`table_${C.value}`,fileName:j.value.text||`vue-ui-table-sparkline`,options:E.value.userOptions.print}),at=c(()=>se(E.value.customPalette)),P=_(null),F=_(!1),ot=c(()=>E.value.responsiveBreakpoint);Ce(()=>{ct()});let st=_(E.value.colNames),I=Te(null);function ct(){le(S.dataset)&&re({componentName:`VueUiTableSparkline`,type:`dataset`}),I.value&&I.value.disconnect(),I.value=new ResizeObserver(e=>{e.forEach(e=>{F.value=e.contentRect.width<ot.value})}),P.value&&I.value.observe(P.value),st.value=[];for(let e=0;e<pt.value;e+=1)st.value.push(E.value.colNames[e]||`col ${e}`)}Se(()=>{I.value&&I.value.disconnect()});function L(e){if([null,void 0].includes(e))return null;let t=Number(e);return Number.isFinite(t)?t:null}function R(e){return typeof e==`number`&&Number.isFinite(e)}function lt(e=[]){return e.map(L).filter(R)}function z(e,t,n){let r=L(e),i=L(t),a=R(r),o=R(i);return a&&o?n===-1?r-i:i-r:a?-1:+!!o}function B(e,t,n={}){let r=L(e);return r===null?`-`:ie(E.value.formatter,r,i({p:E.value.prefix,v:r,s:E.value.suffix,r:t}),n)}let V=c(()=>(S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{re({componentName:`VueUiTableSparkline`,type:`datasetSerieAttribute`,property:e,index:t})})}),S.dataset.map((e,t)=>{let n=e.values||[],r=lt(n),i=r.length?r.reduce((e,t)=>e+t,0):null,a=r.length?i/r.length:null,ee=r.length?ae(r):null;return{...e,values:n,color:te(e.color)||at.value[t]||o[t]||o[t%o.length],sum:i,average:a,median:ee,sparklineDataset:n.map((e,t)=>({period:E.value.colNames[t]||`col ${t}`,value:L(e)}))}})));function ut(e){let t=(e[0]?.values||[]).map((t,n)=>e.map(e=>e?.values?.[n]??null)).map(e=>e.map((e,t)=>[e,t]).sort((e,t)=>z(e[0],t[0],1)).map(e=>e[1]));return e.map((e,n)=>({...e,values:e.values||[],orders:t[n]}))}let H=c(()=>ut(V.value)),U=_(H.value),dt=c(()=>Math.max(...U.value.map(e=>(e.values||[]).length))),W=_(void 0),G=_(!1),K=_(void 0),ft=_(1);function q(){G.value=!1,K.value=void 0,Z.value=void 0,ft.value=1,$.value.forEach(e=>e.state=1),X.value={name:1,sum:1,average:1,median:1},U.value=H.value}function J(e,t,n){if([`name`,`sum`,`average`,`median`].includes(e.type)){mt(e.type,t,n);return}if(!bt(t))return;if(Q.value=t,Z.value=void 0,![null,void 0].includes(K.value)&&t!==K.value&&(K.value=void 0,q()),$.value[t].state===n&&K.value===t){K.value=void 0,q();return}G.value=!0,K.value=t;let r=H.value.map(e=>e.values?.[t]??null),i=n;$.value[t].state=i,ft.value=i,t===W.value?W.value=void 0:W.value=t;let a=r.map((e,t)=>[t,e]).sort((e,t)=>z(e[1],t[1],i)).map(e=>e[0]).map(e=>H.value[e]);U.value=a,w.value+=1}let pt=c(()=>Math.max(...S.dataset.map(e=>(e.values||[]).length))),Y=c(()=>{let e=st.value.map(e=>({type:`reg`,value:e}));if(!e.length)for(let t=0;t<pt.value;t+=1)e.push({type:`reg`,value:`col ${t+1}`});E.value.showTotal&&(e=[...e,{type:`sum`,value:E.value.translations.total}]);let t;return t=E.value.showAverage&&E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average},{type:`median`,value:E.value.translations.median}]:E.value.showAverage&&!E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average}]:!E.value.showAverage&&E.value.showMedian?[...e,{type:`median`,value:E.value.translations.median}]:e,E.value.showSparklines?[...t,{type:`chart`,value:E.value.translations.chart}]:t}),X=_({name:1,sum:1,average:1,median:1}),Z=_(void 0);function mt(e,t,n){if(!U.value||U.value.length===0||!xt(e))return;if(Z.value!==e&&(Z.value=void 0),![null,void 0].includes(K.value)&&t!==K.value&&q(),K.value=void 0,X.value[e]===n&&Z.value){Z.value=void 0,q();return}Z.value=e,G.value=!0,X.value[e]=n,[null,void 0].includes(t)||($.value[t].state=X.value[e]);let r=X.value[e],i=[...U.value].sort((t,n)=>{let i=t[e],a=n[e];return typeof i==`string`&&typeof a==`string`?r===-1?i.localeCompare(a):a.localeCompare(i):z(i,a,r)});U.value=i}let Q=_(void 0),ht=_(void 0);function gt({dataIndex:e,serieIndex:t}){Q.value=e,ht.value=t,T.value[e]&&!F.value&&T.value[e].scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}let _t=_(!1);function vt(e){_t.value=e,Ye.value+=1}function yt(e=null){xe(()=>{let t=[E.value.translations.serie].concat(Y.value),n=V.value.map((e,t)=>[[e.name],e.values,[e.sum],[e.average],[e.median]]),r=[t].concat(n),i=a(r);e?e(i):oe({csvContent:i,title:j.value.text||`vue-ui-table-sparkline`})})}function bt(e){return E.value.sortedDataColumnIndices.includes(e)}function xt(e){return e.type===`name`||e===`name`?E.value.sortedSeriesName:e.type===`sum`||e===`sum`?E.value.sortedSum:e.type===`average`||e===`average`?E.value.sortedAverage:e.type===`median`||e===`median`?E.value.sortedMedian:!1}function St(e,t,n){return[`sum`,`average`,`median`].includes(t.type)?Z.value===t.type&&X.value[t.type]===n?1:.3:e===K.value&&$.value[e].state===n?1:.3}function Ct(){E.value.resetSortOnClickOutside&&q()}let $=c({get:()=>Y.value.map(e=>({state:1})),set:e=>e});function wt(e){e?.stage===`start`?Ze.value=!0:e?.stage===`end`?Ze.value=!1:it()}async function Tt(){Je(`copyAlt`,{config:E.value,dataset:V.value}),E.value.userOptions.callbacks.altCopy?await Promise.resolve(E.value.userOptions.callbacks.altCopy({config:E.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return _e({generatePdf:rt,generateImage:it,generateCsv:yt,restoreOrder:q,copyAlt:Tt}),(e,r)=>(g(),u(`div`,{ref_key:`tableContainer`,ref:P,class:m({"vue-data-ui-component":!0,"vue-ui-table-sparkline":!0,"vue-ui-responsive":F.value}),style:{overflow:`hidden`},id:`table_${C.value}`,onMouseenter:r[3]||=()=>b(Qe)(!0),onMouseleave:r[4]||=()=>b(Qe)(!1)},[j.value.text?(g(),u(`div`,{key:0,class:`vue-ui-table-sparkline-caption`,style:h({backgroundColor:j.value.backgroundColor})},[d(`div`,{class:`atom-title`,style:h({fontSize:`${j.value.fontSize}px`,fontWeight:j.value.bold?`bold`:`normal`,color:j.value.color,textAlign:j.value.textAlign})},y(j.value.text),5),j.value.subtitle.text?(g(),u(`div`,{key:0,class:`atom-subtitle`,style:h({fontSize:`${j.value.subtitle.fontSize}px`,fontWeight:j.value.subtitle.bold?`bold`:`normal`,color:j.value.subtitle.color,textAlign:j.value.textAlign})},y(j.value.subtitle.text),5)):l(``,!0)],4)):l(``,!0),d(`div`,{style:{overflow:`auto`},onPointerleave:r[2]||=e=>{ht.value=void 0,Q.value=void 0}},[d(`table`,{class:`vue-ui-data-table`,style:h({fontFamily:E.value.fontFamily,position:`relative`})},[d(`thead`,Ne,[Ae((g(),u(`tr`,{role:`row`,class:`vue-ui-data-table__thead-row`,style:h({backgroundColor:k.value.backgroundColor,color:k.value.color})},[d(`th`,{role:`cell`,style:h({backgroundColor:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`}),class:`sticky-col-first`},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(E.value.translations.serie),1),U.value.length>1&&E.value.sortedSeriesName?(g(),u(`div`,Pe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:r[0]||=e=>J({type:`name`},null,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===-1?1:.3})},null,8,[`stroke`,`style`])],4),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:r[1]||=e=>J({type:`name`},null,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===1?1:.3})},null,8,[`stroke`,`style`])],4)])):l(``,!0)],4)],4),(g(!0),u(s,null,v(Y.value,(r,i)=>(g(),u(`th`,{role:`cell`,style:h({background:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`,minWidth:i===Y.value.length-1?`${O.value.dimensions.width}px`:`48px`,paddingRight:i===Y.value.length-1&&D.value.show?`36px`:``}),class:m({"sticky-col":i===Y.value.length-1&&E.value.showSparklines})},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(r.value),1),U.value.length>1&&(bt(i)||xt(r))?(g(),u(`div`,Fe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:()=>J(r,i,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:St(i,r,-1)})},null,8,[`stroke`,`style`])],12,Ie),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:()=>J(r,i,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:St(i,r,1)})},null,8,[`stroke`,`style`])],12,Le)])):l(``,!0)],4),D.value.show&&i===Y.value.length-1&&(b($e)||b(N))?(g(),ve(b(Ke),{ref_for:!0,ref:`details`,key:`user_option_${Ye.value}`,backgroundColor:k.value.backgroundColor,color:k.value.color,isPrinting:b(tt),isImaging:b(nt),uid:C.value,hasPdf:D.value.buttons.pdf,hasXls:D.value.buttons.csv,hasImg:D.value.buttons.img,hasFullscreen:D.value.buttons.fullscreen,hasAltCopy:D.value.buttons.altCopy,isFullscreen:_t.value,titles:{...D.value.buttonTitles},chartElement:P.value,position:D.value.position,callbacks:D.value.callbacks,printScale:D.value.print.scale,isCursorPointer:M.value,onToggleFullscreen:vt,onGeneratePdf:b(rt),onGenerateImage:wt,onGenerateCsv:yt,onCopyAlt:Tt,style:h({visibility:b($e)?b(N)?`visible`:`hidden`:`visible`})},ye({_:2},[v(b(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:ke(r=>[we(e.$slots,t,be({ref_for:!0},b(n)(t,r)),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`style`])):l(``,!0)],6))),256))],4)),[[b(he),Ct]])]),d(`tbody`,null,[(g(!0),u(s,null,v(U.value,(e,t)=>(g(),u(`tr`,{role:`row`,style:h({backgroundColor:A.value.backgroundColor,color:A.value.color}),class:m({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0})},[d(`td`,{role:`cell`,style:h({backgroundColor:A.value.backgroundColor,border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.serie,class:`vue-ui-data-table__tbody__td sticky-col-first`},[d(`div`,{dir:`auto`,style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,justifyContent:A.value.textAlign})},[A.value.showColorMarker?(g(),u(`span`,{key:0,style:h({color:e.color})},`⬤`,4)):l(``,!0),d(`span`,null,y(e.name??`-`),1)],4)],12,Re),(g(!0),u(s,null,v(dt.value,(n,r)=>(g(),u(`td`,{dir:`auto`,role:`cell`,ref_for:!0,ref_key:`TD`,ref:T,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,background:Q.value!==void 0&&r===Q.value?A.value.selectedColor.useSerieColor?b(ee)(e.color,20):A.value.selectedColor.fallback:``}),"data-cell":Y.value[r]?Y.value[r].value:``,class:`vue-ui-data-table__tbody__td`,onPointerenter:e=>{ht.value=t,Q.value=r}},y(B(e.values[r],E.value.roundingValues,{datapoint:e,seriesIndex:t,datapointIndex:r})),45,ze))),256)),E.value.showTotal?(g(),u(`td`,{key:0,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.total,class:`vue-ui-data-table__tbody__td`},y(B(e.sum,E.value.roundingTotal,{datapoint:e.sum,seriesIndex:t})),13,Be)):l(``,!0),E.value.showAverage?(g(),u(`td`,{key:1,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.average,class:`vue-ui-data-table__tbody__td`},y(B(e.average,E.value.roundingAverage,{datapoint:e.average,seriesIndex:t})),13,Ve)):l(``,!0),E.value.showMedian?(g(),u(`td`,{key:2,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.median,class:`vue-ui-data-table__tbody__td`},y(B(e.median,E.value.roundingMedian,{datapoint:e.median,seriesIndex:t})),13,He)):l(``,!0),E.value.showSparklines?(g(),u(`td`,{key:3,role:`cell`,"data-cell":E.value.translations.chart,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,backgroundColor:A.value.backgroundColor,padding:`0`}),class:`vue-ui-data-table__tbody__td sticky-col`},[f(b(Ge),{onHoverIndex:({index:e})=>gt({dataIndex:e,serieIndex:t}),"height-ratio":O.value.dimensions.heightRatio,"forced-padding":30,dataset:e.sparklineDataset,showInfo:!1,selectedIndex:Q.value,config:{type:O.value.type,style:{backgroundColor:`transparent`,animation:{show:O.value.animation.show&&!b(tt)&&!b(nt),animationFrames:O.value.animation.animationFrames},padding:{right:12},line:{color:e.color,smooth:O.value.smooth,cutNullValues:O.value.cutNullValues,strokeWidth:O.value.strokeWidth},bar:{color:e.color},area:{color:e.color,opacity:O.value.showArea?16:0,useGradient:O.value.useGradient},verticalIndicator:{color:e.color},plot:{radius:9,stroke:A.value.backgroundColor,strokeWidth:3}}}},null,8,[`onHoverIndex`,`height-ratio`,`dataset`,`selectedIndex`,`config`])],12,Ue)):l(``,!0)],6))),256))])],4)],32),e.$slots.source?(g(),u(`div`,We,[we(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],42,Me))}},[[`__scopeId`,`data-v-bb68c573`]]);export{je as n,Ge as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useAnimationFrame-D8gcRfnW.js";import{n,r,t as i}from"./userOptionsSlots-CWtXN5Q6.js";import{n as a,r as ee,t as te}from"./annotationSlots-OLiW25XN.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as re,Ht as o,Jt as ie,S as s,X as ae,at as oe,b as c,i as se,in as ce,t as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{c as pe}from"./canvas-lib-22VpOI4_.js";import{n as me,t as he}from"./useHints-C-TwxM0Y.js";import{t as ge}from"./useConfig-CBXrYhMI.js";import{t as _e}from"./useLoading-BwiplGDB.js";import{t as ve}from"./usePrinter-DVf3YcG5.js";import{t as ye}from"./useResponsive-CENUxfEL.js";import{t as be}from"./useChartExport-BZts4KFb.js";import{t as xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Se}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ce}from"./usePrefersMotion-XLHwega2.js";import{t as we}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Te}from"./vue_ui_thermometer-BAFdvXZW.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./img-D4RQwASc.js";import{t as Oe}from"./BaseScanner-m6QR9rwD.js";import{t as ke}from"./DefGrad-DKMq1REY.js";import{t as Ae}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as je,createVNode as Me,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as Ne,normalizeClass as _,normalizeProps as v,normalizeStyle as Pe,onBeforeUnmount as Fe,onMounted as Ie,openBlock as y,ref as b,renderList as x,renderSlot as S,toDisplayString as C,toRefs as Le,unref as w,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>T}),He=[`id`],Ue={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},We=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Ge=[`id`],Ke=[`id`],qe=[`width`,`height`],Je=[`id`],Ye=[`x`,`y`,`width`,`height`,`rx`,`ry`],Xe=[`clip-path`],Ze=[`x`,`y`,`height`,`width`],Qe=[`x`,`y`,`height`,`width`,`fill`],$e=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],et=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],tt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],nt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],rt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],it=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],at=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],ot=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],st=[`x`,`y`,`height`,`width`],ct=[`aria-label`],lt=[`x`,`y`,`height`],ut=[`y`,`x`,`fill`,`font-size`,`font-weight`],dt={key:4,class:`vue-data-ui-watermark`},T=/*#__PURE__*/ Ae({__name:`vue-ui-thermometer`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:Ae,emit:Ve}){Re(e=>({fdaea97c:zt.value,dee374e8:Rt.value,v77c7cd79:Lt.value}));let T=h(()=>import(`./PackageVersion-BbZ3wNGs.js`).then(e=>e.t)),ft=h(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),pt=h(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_thermometer:mt}=ge(),ht=Ce(),E=e,gt=Ve,D=b(ae()),O=b(null),_t=b(0),vt=b(0),yt=b(null),bt=b(null),k=b(null),A=b(null),xt=t(),j=0;function St(){j+=1,xt.cancel(),k.value?.disconnect(),k.value=null,A.value=null}Fe(St);let Ct=u(()=>!!E.dataset&&Object.keys(E.dataset).length);Ie(()=>{Ot()});let M=b(V()),N=u(()=>M.value.userOptions),P=u(()=>M.value.style.chart.graduations),F=u(()=>M.value.style.chart);me({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiThermometer`,rules:[he.noHint]});let wt=b(F.value.thermometer.width),I=b(F.value.height),L=b(F.value.width),Tt=u(()=>M.value.userOptions.useCursorPointer),Et=u(()=>ce({defaultConfig:{userOptions:{show:!1},style:{chart:{animation:{use:!1},backgroundColor:`#99999930`,graduations:{stroke:`#6A6A6A`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:z}=_e({...Le(E),FINAL_CONFIG:M,prepareConfig:V,skeletonDataset:E.config?.skeletonDataset??{value:0,from:-100,to:100,steps:20,colors:{from:`#A1A1A1`,to:`#CACACA`}},skeletonConfig:ce({defaultConfig:M.value,userConfig:Et.value})}),Dt=u(()=>M.value.debug);function Ot(){if(St(),fe(E.dataset)?oe({componentName:`VueUiThermometer`,type:`dataset`,debug:Dt.value}):de({datasetObject:E.dataset,requiredAttributes:[`value`,`from`,`to`]}).forEach(e=>{oe({componentName:`VueUiThermometer`,type:`datasetAttribute`,property:e,debug:Dt.value})}),M.value.responsive&&O.value){let e=j,t=pe(()=>{if(e!==j||xt.isDisposed())return;let{width:t,height:n}=ye({chart:O.value,title:M.value.style.title.text?yt.value:null,source:bt.value});xt.request(()=>{I.value=Math.max(.1,n-12),L.value=t,Gt()})});k.value=new ResizeObserver(t),A.value=O.value,k.value.observe(A.value)}Gt()}let{userOptionsVisible:kt,setUserOptionsVisibility:At,keepUserOptionState:jt}=xe({config:M.value}),{svgRef:B}=Se({config:M.value.style.title});function V(){return ne(E.config,mt,Te)}ze(()=>E.config,e=>{M.value=V(),kt.value=!M.value.userOptions.showOnChartHover,wt.value=F.value.thermometer.width,I.value=F.value.height,L.value=F.value.width,Ot(),vt.value+=1},{deep:!0});let{isPrinting:H,isImaging:U,generatePdf:Mt,generateImage:Nt}=ve({elementId:`thermometer__${D.value}`,fileName:M.value.style.title.text||`vue-ui-thermometer`,options:M.value.userOptions.print}),Pt=u(()=>M.value.userOptions.show&&!M.value.style.title.text),W=u(()=>ue(M.value.customPalette)),G=u(()=>z.value.steps||10);function K(e,t,n){let r=[],i=Ft(e),a=Ft(t);for(let e=0;e<n;e+=1){let t=q(i.red,a.red,e,n),ee=q(i.green,a.green,e,n),te=q(i.blue,a.blue,e,n),ne=`#${J(t)}${J(ee)}${J(te)}`;r.push(ne)}return r}function Ft(e){let t=e.slice(1);return{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}}function q(e,t,n,r){return Math.round(e+(t-e)*n/r)}function J(e){return e.toString(16).padStart(2,`0`)}let Y=u(()=>{let e=Math.max(.1,L.value),t=Math.max(.1,I.value),n=F.value.padding;return{width:e,left:e/2-F.value.thermometer.width/2,right:e/2+F.value.thermometer.width/2,top:n.top,bottom:t-n.bottom-n.top,height:t,thermoHeight:t-n.top-n.bottom,thermoWidth:F.value.thermometer.width}}),It=u(()=>Y.value),X=u(()=>{let e=c(z.value.from)<0?Math.abs(c(z.value.from)):c(z.value.from),t=c(z.value.to)<0?Math.abs(c(z.value.to)):c(z.value.to),n=0;return n=c(z.value.to)>0?e+t:e>t?e-t:t-e,(1-(Math.abs(c(z.value.from))+c(z.value.value))/n)*Y.value.thermoHeight}),Lt=u(()=>`${X.value}px`),Rt=u(()=>`${Y.value.thermoHeight}px`),zt=u(()=>ht.value?`0ms`:`${F.value.animation.speedMs}ms`),Bt=u(()=>{if(z.value.colors){if(!z.value.colors.from)return K(W.value[0]||o[0],s(z.value.colors.to),G.value||10);if(!z.value.colors.to)return K(s(z.value.colors.from),W.value[1]||o[1],G.value||10)}else return K(W.value[1]||o[1],W.value[0]||o[0],G.value||10);return K(s(z.value.colors.from),s(z.value.colors.to),G.value||10)}),Vt=u(()=>{let e=[],t=0,n=Y.value.thermoHeight;for(let r=0;r<n-1;r+=n/G.value)e.push({x:Y.value.left,y:Y.value.top+r,qYLess:Y.value.top+r+n/G.value/4,halfY:Y.value.top+r+n/G.value/2,qYMore:Y.value.top+r+n/G.value/4*3,color:Bt.value[t],height:Math.max(.1,n/G.value)}),t+=1;return e}),Z=b(!1);function Ht(e){Z.value=e,_t.value+=1}let Q=b(!1);function Ut(){Q.value=!Q.value}async function Wt({scale:e=2}={}){if(!O.value)return;let{width:t,height:n}=O.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await De({domElement:O.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.style.title.text,width:t,height:n,aspectRatio:r}}let $=u({get:()=>F.value.label.fontSize,set:e=>e}),{autoSizeLabels:Gt}=we({svgRef:B,fontSize:F.value.label.fontSize,minFontSize:F.value.label.minFontSize,sizeRef:$,labelClass:`.vue-ui-thermometer-label`}),Kt=u(()=>F.value.backgroundColor),qt=u(()=>M.value.style.title),{isCallbackImaging:Jt,isCallbackSvg:Yt,generateSvg:Xt,onGenerateImage:Zt}=be({svg:B,title:qt,legend:null,legendItems:null,backgroundColor:Kt,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Nt});async function Qt(){gt(`copyAlt`,{config:M.value,dataset:z.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let $t=u(()=>`${D.value}-title`),en=u(()=>`${D.value}-desc`),tn=u(()=>se(F.value.label.formatter,z.value.value,re({p:F.value.label.prefix,v:z.value.value,s:F.value.label.suffix,r:F.value.label.rounding}),{datapoint:z.value})),nn=u(()=>M.value.style.title.text||``),rn=u(()=>{if(R.value)return`...`;let e=c(z.value.from),t=c(z.value.to);return`Thermometer value: ${tn.value}. Range: ${e} to ${t}.`});return Ae({getImage:Wt,generatePdf:Mt,generateImage:Nt,generateSvg:Xt,toggleAnnotator:Ut,toggleFullscreen:Ht,copyAlt:Qt}),(e,t)=>(y(),p(`div`,{ref_key:`thermoChart`,ref:O,class:_(`vue-data-ui-component vue-ui-thermometer ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:Pe(`width:100%;background:${F.value.backgroundColor};color:${F.value.color};font-family:${M.value.style.fontFamily}`),id:`thermometer__${D.value}`,onMouseenter:t[0]||=()=>w(At)(!0),onMouseleave:t[1]||=()=>w(At)(!1)},[N.value.buttons.annotator?(y(),d(w(ft),Ne({key:0},w(ee)(N.value.annotator),{svgRef:w(B),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Q.value,isCursorPointer:Tt.value,palette:N.value.annotatorPalette,onClose:Ut}),je({_:2},[x(w(te),t=>({name:t,fn:Be(n=>[S(e.$slots,t,v(g(w(a)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Pt.value?(y(),p(`div`,Ue,null,512)):f(``,!0),M.value.style.title.text?(y(),p(`div`,{key:2,ref_key:`chartTitle`,ref:yt,style:`width:100%`},[(y(),d(Ee,{key:`title_${vt.value}`,config:{title:{cy:`thermometer-div-title`,...M.value.style.title},subtitle:{cy:`thermometer-div-subtitle`,...M.value.style.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),N.value.show&&Ct.value&&(w(jt)||w(kt))?(y(),d(w(pt),Ne({ref:`details`,key:`user_options_${_t.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(U),isPrinting:w(H),uid:D.value,hasXls:!1,isFullscreen:Z.value,chartElement:O.value},w(r)(N.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:Q.value,isCursorPointer:Tt.value,onToggleFullscreen:Ht,onGeneratePdf:w(Mt),onGenerateImage:w(Zt),onGenerateSvg:w(Xt),onToggleAnnotator:Ut,onCopyAlt:Qt,style:{visibility:w(jt)?w(kt)?`visible`:`hidden`:`visible`}}),je({_:2},[x(w(n)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[S(e.$slots,t,v(g(w(i)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(le),class:_({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),width:`100%`,viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,style:`background:transparent`,"aria-labelledby":$t.value,"aria-describedby":en.value},[m(`title`,{id:$t.value},C(nn.value),9,Ge),m(`desc`,{id:en.value},C(rn.value),9,Ke),Me(w(T)),S(e.$slots,`svg-underlayer`,{svg:{...It.value,isPrintingImg:w(H)||w(U)||w(Jt),isPrintingSvg:w(Yt)}},void 0,!0),e.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:0,y:0,width:Y.value.width,height:Y.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):f(``,!0),m(`defs`,null,[m(`clipPath`,{id:`vueUiPill-${D.value}`,clipPathUnits:`userSpaceOnUse`},[m(`rect`,{x:Y.value.left,y:Y.value.top,width:Y.value.thermoWidth,height:Y.value.thermoHeight,rx:Y.value.thermoWidth/2,ry:Y.value.thermoWidth/2},null,8,Ye)],8,Je),(y(!0),p(l,null,x(Vt.value,(e,t)=>(y(),d(ke,{t:`linear`,id:`vueUiThermometerGradient_${t}_${D.value}`,key:`t_${t}_${D.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`50%`,w(ie)(e.color,100-P.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),m(`g`,{"clip-path":`url(#vueUiPill-${D.value})`},[m(`rect`,{x:Y.value.left,y:Y.value.top,height:Y.value.thermoHeight,width:Y.value.thermoWidth,fill:`#FFFFFF`},null,8,Ze),(y(!0),p(l,null,x(Vt.value,(e,t)=>(y(),p(`g`,{key:`graduation_${t}`},[m(`rect`,{x:e.x,y:e.y,height:e.height,width:Y.value.thermoWidth,fill:P.value.gradient.show?`url(#vueUiThermometerGradient_${t}_${D.value})`:e.color,"shape-rendering":`crispEdges`},null,8,Qe),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+10,y1:e.y,y2:e.y,"stroke-width":P.value.strokeWidth,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,$e)):f(``,!0),P.value.showIntermediate?(y(),p(l,{key:1},[P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+5,y1:e.halfY,y2:e.halfY,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,et)):f(``,!0),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:1,x1:e.x,x2:e.x+2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,tt)):f(``,!0),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:e.x,x2:e.x+2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,nt)):f(``,!0)],64)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-10,y1:e.y,y2:e.y,"stroke-width":P.value.strokeWidth,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,rt)):f(``,!0),P.value.showIntermediate?(y(),p(l,{key:3},[P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:Y.value.right,x2:Y.value.right-5,y1:e.halfY,y2:e.halfY,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,it)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:1,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,at)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,ot)):f(``,!0)],64)):f(``,!0)]))),128)),m(`rect`,{class:_({"vue-ui-thermometer-temperature":F.value.animation.use}),x:Y.value.left,y:Y.value.top,height:X.value,width:Y.value.thermoWidth,fill:`#FFFFFF66`},null,10,st)],8,Xe),F.value.label.show?(y(),p(`g`,{key:1,role:`status`,"aria-live":`polite`,"aria-label":w(R)?`Loading data`:tn.value},[w(R)?(y(),p(`rect`,{key:0,x:Y.value.left-60,y:X.value+Y.value.top-$.value/2,width:50,height:$.value,fill:`#6A6A6A40`,rx:`3`},null,8,lt)):(y(),p(`text`,{key:1,"aria-hidden":`true`,class:_({"vue-ui-thermometer-temperature-value":F.value.animation.use,"vue-ui-thermometer-label":!0}),y:X.value+Y.value.top+$.value/3,x:Y.value.left-10,"text-anchor":`end`,fill:F.value.label.color,"font-size":$.value,"font-weight":F.value.label.bold?`bold`:`normal`},C(tn.value),11,ut))],8,ct)):f(``,!0),S(e.$slots,`svg`,{svg:{...It.value,isPrintingImg:w(H)||w(U)||w(Jt),isPrintingSvg:w(Yt)}},void 0,!0)],10,We)),e.$slots.watermark?(y(),p(`div`,dt,[S(e.$slots,`watermark`,v(g({isPrinting:w(H)||w(U)||w(Jt)||w(Yt)})),void 0,!0)])):f(``,!0),e.$slots.source?(y(),p(`div`,{key:5,ref_key:`source`,ref:bt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),S(e.$slots,`skeleton`,{},()=>[w(R)?(y(),d(Oe,{key:0})):f(``,!0)],!0)],46,He))}},[[`__scopeId`,`data-v-e6779ee0`]]);export{Ve as n,T as t};