vue-data-ui 3.28.7 → 3.28.9

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 (225) hide show
  1. package/dist/BaseDraggableDialog-BK7dj9O6.js +1 -0
  2. package/dist/BaseIcon-CoY0vuL3.js +1 -0
  3. package/dist/{BaseLegendToggle-aT9fOoGO.js → BaseLegendToggle-BIzyyI1h.js} +1 -1
  4. package/dist/{BaseZoomControls-1OdFWrHW.js → BaseZoomControls-JSk9zW3D.js} +1 -1
  5. package/dist/ColorPicker-CwYfNvwH.js +1 -0
  6. package/dist/{DataTable-5Ug6gMAX.js → DataTable-Dof6yhO7.js} +1 -1
  7. package/dist/{HillActions-C8am4I5c.js → HillActions-BMH9pSmQ.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-CawVDtNj.js → NonSvgPenAndPaper-DXdAh1Sz.js} +1 -1
  9. package/dist/{PackageVersion-CHQWwTik.js → PackageVersion-D6_O7PmZ.js} +1 -1
  10. package/dist/PenAndPaper-DoNTA-SV.js +1 -0
  11. package/dist/{SlicerPreview-D7gm-OsZ.js → SlicerPreview-ChKbdZSU.js} +1 -1
  12. package/dist/UserOptions-B9EyfU9n.js +1 -0
  13. package/dist/XyAnalysisOptions-djGOJdKc.js +1 -0
  14. package/dist/annotationSlots-OLiW25XN.js +1 -0
  15. package/dist/components/vue-ui-3d-bar.js +1 -1
  16. package/dist/components/vue-ui-accordion.js +1 -1
  17. package/dist/components/vue-ui-age-pyramid.js +1 -1
  18. package/dist/components/vue-ui-annotator.js +1 -1
  19. package/dist/components/vue-ui-bullet.js +1 -1
  20. package/dist/components/vue-ui-bump.js +1 -1
  21. package/dist/components/vue-ui-candlestick.js +1 -1
  22. package/dist/components/vue-ui-carousel-table.js +1 -1
  23. package/dist/components/vue-ui-chestnut.js +1 -1
  24. package/dist/components/vue-ui-chord.js +1 -1
  25. package/dist/components/vue-ui-circle-pack.js +1 -1
  26. package/dist/components/vue-ui-cursor.js +1 -1
  27. package/dist/components/vue-ui-dag.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-geo.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-graph.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-hill.js +1 -1
  42. package/dist/components/vue-ui-history-plot.js +1 -1
  43. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  44. package/dist/components/vue-ui-icon.js +1 -1
  45. package/dist/components/vue-ui-kpi.js +1 -1
  46. package/dist/components/vue-ui-label.js +1 -1
  47. package/dist/components/vue-ui-mini-loader.js +1 -1
  48. package/dist/components/vue-ui-molecule.js +1 -1
  49. package/dist/components/vue-ui-mood-radar.js +1 -1
  50. package/dist/components/vue-ui-nested-donuts.js +1 -1
  51. package/dist/components/vue-ui-onion.js +1 -1
  52. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  53. package/dist/components/vue-ui-quadrant.js +1 -1
  54. package/dist/components/vue-ui-quick-chart.js +1 -1
  55. package/dist/components/vue-ui-radar.js +1 -1
  56. package/dist/components/vue-ui-rating.js +1 -1
  57. package/dist/components/vue-ui-relation-circle.js +1 -1
  58. package/dist/components/vue-ui-ridgeline.js +1 -1
  59. package/dist/components/vue-ui-rings.js +1 -1
  60. package/dist/components/vue-ui-scatter.js +1 -1
  61. package/dist/components/vue-ui-skeleton.js +1 -1
  62. package/dist/components/vue-ui-smiley.js +1 -1
  63. package/dist/components/vue-ui-spark-trend.js +1 -1
  64. package/dist/components/vue-ui-sparkbar.js +1 -1
  65. package/dist/components/vue-ui-sparkgauge.js +1 -1
  66. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  67. package/dist/components/vue-ui-sparkline.js +1 -1
  68. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  69. package/dist/components/vue-ui-stackbar.js +1 -1
  70. package/dist/components/vue-ui-stackline.js +1 -1
  71. package/dist/components/vue-ui-strip-plot.js +1 -1
  72. package/dist/components/vue-ui-table-heatmap.js +1 -1
  73. package/dist/components/vue-ui-table-sparkline.js +1 -1
  74. package/dist/components/vue-ui-table.js +1 -1
  75. package/dist/components/vue-ui-thermometer.js +1 -1
  76. package/dist/components/vue-ui-timer.js +1 -1
  77. package/dist/components/vue-ui-tiremarks.js +1 -1
  78. package/dist/components/vue-ui-treemap.js +1 -1
  79. package/dist/components/vue-ui-vertical-bar.js +1 -1
  80. package/dist/components/vue-ui-waffle.js +1 -1
  81. package/dist/components/vue-ui-wheel.js +1 -1
  82. package/dist/components/vue-ui-word-cloud.js +1 -1
  83. package/dist/components/vue-ui-world.js +1 -1
  84. package/dist/components/vue-ui-xy-canvas.js +1 -1
  85. package/dist/components/vue-ui-xy.js +1 -1
  86. package/dist/package-BEq7yyhf.js +1 -0
  87. package/dist/{render-common-_8VmVGgq.js → render-common-BbY81Ao2.js} +1 -1
  88. package/dist/ssr/vue-ui-donut.js +1 -1
  89. package/dist/ssr/vue-ui-xy.js +1 -1
  90. package/dist/ssr.js +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +96 -0
  93. package/dist/types/vue-ui-xy.d.ts +4 -0
  94. package/dist/useConfig-By3Vb5kz.js +1 -0
  95. package/dist/{useObjectBindings-BCi3Az41.js → useObjectBindings-0vvvimYP.js} +1 -1
  96. package/dist/utils.js +1 -1
  97. package/dist/vue-data-ui-BwiGr37w.js +1 -0
  98. package/dist/vue-data-ui.js +1 -1
  99. package/dist/vue-ui-3d-bar-C2igj6OX.js +19 -0
  100. package/dist/{vue-ui-accordion-D4FHxzsL.js → vue-ui-accordion-DFxSW8ET.js} +1 -1
  101. package/dist/vue-ui-age-pyramid-DOG_ZOgO.js +1 -0
  102. package/dist/{vue-ui-annotator-DuAQovkf.js → vue-ui-annotator-BnR2XnsL.js} +1 -1
  103. package/dist/vue-ui-bullet-HUKP90GR.js +34 -0
  104. package/dist/vue-ui-bump-BuHuxEzm.js +8 -0
  105. package/dist/vue-ui-candlestick-CZkyowA5.js +22 -0
  106. package/dist/{vue-ui-carousel-table-Uik-OwJI.js → vue-ui-carousel-table-B73USTMi.js} +1 -1
  107. package/dist/vue-ui-chestnut-VdMHjsWk.js +1 -0
  108. package/dist/vue-ui-chord-DfWjMAuo.js +21 -0
  109. package/dist/vue-ui-circle-pack-ByV3SOkF.js +13 -0
  110. package/dist/{vue-ui-cursor-Cn4I6C1F.js → vue-ui-cursor-D3E3f7Lc.js} +1 -1
  111. package/dist/vue-ui-dag-DlllVyCV.js +9 -0
  112. package/dist/vue-ui-dashboard-C9aGsEAi.js +1 -0
  113. package/dist/{vue-ui-digits-DD5Ehw6Z.js → vue-ui-digits-p2met3a2.js} +1 -1
  114. package/dist/vue-ui-donut-BlQXnf7O.js +47 -0
  115. package/dist/{vue-ui-donut-B4RYYl9y.js → vue-ui-donut-CZbBq7bs.js} +1 -1
  116. package/dist/vue-ui-donut-evolution-Csq1sqhK.js +2 -0
  117. package/dist/vue-ui-dumbbell-ChLfyyGq.js +9 -0
  118. package/dist/vue-ui-flow-DfEHi_Cq.js +3 -0
  119. package/dist/vue-ui-funnel-QCG-rmsx.js +1 -0
  120. package/dist/vue-ui-galaxy-DFTeXUse.js +1 -0
  121. package/dist/vue-ui-gauge-XTx--A-H.js +1 -0
  122. package/dist/vue-ui-geo-BXB5xFcV.js +1 -0
  123. package/dist/{vue-ui-gizmo-ByT8Q0Mm.js → vue-ui-gizmo-COJHVo7O.js} +1 -1
  124. package/dist/vue-ui-graph-BqnyGn9p.js +7 -0
  125. package/dist/vue-ui-heatmap-CPq3bcnS.js +1 -0
  126. package/dist/vue-ui-hill-DKm3PjHT.js +1 -0
  127. package/dist/vue-ui-history-plot-B5OPsHZ1.js +2 -0
  128. package/dist/vue-ui-horizontal-bar-C8SymyhN.js +4 -0
  129. package/dist/{vue-ui-kpi-w-6ZJ7A1.js → vue-ui-kpi-D1Ps7D_O.js} +1 -1
  130. package/dist/{vue-ui-label-0lSeoxvv.js → vue-ui-label-W0oz08pp.js} +1 -1
  131. package/dist/{vue-ui-mini-loader-C6vhrfx3.js → vue-ui-mini-loader-OLYDdN3T.js} +1 -1
  132. package/dist/vue-ui-molecule-f-GNAQ0p.js +1 -0
  133. package/dist/vue-ui-mood-radar-kp-jOb4S.js +1 -0
  134. package/dist/vue-ui-nested-donuts-DCCSKIGa.js +19 -0
  135. package/dist/vue-ui-onion-KqzGj1z_.js +5 -0
  136. package/dist/vue-ui-parallel-coordinate-plot-dn_41Wv5.js +9 -0
  137. package/dist/vue-ui-quadrant-CP8n4v5B.js +2 -0
  138. package/dist/vue-ui-quick-chart-D8PbGpSw.js +17 -0
  139. package/dist/vue-ui-radar-ybR3N44-.js +1 -0
  140. package/dist/{vue-ui-rating-7RAJA7I4.js → vue-ui-rating-B9HeTCLa.js} +1 -1
  141. package/dist/vue-ui-relation-circle-B0PwfFpT.js +1 -0
  142. package/dist/vue-ui-ridgeline-BnslUzA-.js +2 -0
  143. package/dist/vue-ui-rings-B-cOW0Dw.js +1 -0
  144. package/dist/vue-ui-scatter-BX5cTC01.js +9 -0
  145. package/dist/{vue-ui-skeleton-D7PLCXgR.js → vue-ui-skeleton-98OnGJ2N.js} +1 -1
  146. package/dist/{vue-ui-smiley-BdhxsPGW.js → vue-ui-smiley-Cht1imV-.js} +1 -1
  147. package/dist/{vue-ui-spark-trend-DwiVMTjG.js → vue-ui-spark-trend-C4uYyXEy.js} +1 -1
  148. package/dist/{vue-ui-sparkbar-DO5fcy40.js → vue-ui-sparkbar-BcZyqPB9.js} +1 -1
  149. package/dist/{vue-ui-sparkgauge-jbsycjzU.js → vue-ui-sparkgauge-dBZzMqn5.js} +1 -1
  150. package/dist/{vue-ui-sparkhistogram-BXO6RMNA.js → vue-ui-sparkhistogram-DcbAY6vr.js} +1 -1
  151. package/dist/{vue-ui-sparkline-BwiQOUi0.js → vue-ui-sparkline-BizzsAR5.js} +1 -1
  152. package/dist/{vue-ui-sparkstackbar-3hDYCDkU.js → vue-ui-sparkstackbar-xlg048YB.js} +1 -1
  153. package/dist/vue-ui-stackbar-2AX-m3Pb.js +29 -0
  154. package/dist/vue-ui-stackline-GKaZJh8y.js +39 -0
  155. package/dist/vue-ui-strip-plot-BhxIrd67.js +2 -0
  156. package/dist/{vue-ui-table-fYf1nuff.js → vue-ui-table-D9FJBxrk.js} +1 -1
  157. package/dist/{vue-ui-table-heatmap-qU0Mk0US.js → vue-ui-table-heatmap-SGJGI5Wq.js} +1 -1
  158. package/dist/{vue-ui-table-sparkline-EIvf8kjn.js → vue-ui-table-sparkline-B6ynMUGE.js} +1 -1
  159. package/dist/vue-ui-thermometer-SE_c51TO.js +1 -0
  160. package/dist/{vue-ui-timer-Dw7ycl6H.js → vue-ui-timer-B1JNZk6j.js} +2 -2
  161. package/dist/vue-ui-tiremarks-Cr8EG4T5.js +1 -0
  162. package/dist/vue-ui-treemap-DKJVe7v7.js +1 -0
  163. package/dist/vue-ui-waffle-DSq3l2sE.js +1 -0
  164. package/dist/vue-ui-wheel-CcYOzS05.js +1 -0
  165. package/dist/vue-ui-word-cloud-gogYiwIU.js +4 -0
  166. package/dist/vue-ui-world-C2zGhq_U.js +19 -0
  167. package/dist/{vue-ui-xy-D4R3bhnl.js → vue-ui-xy-B2lrTGG4.js} +1 -1
  168. package/dist/vue-ui-xy-CpS-ASnd.js +27 -0
  169. package/dist/{vue-ui-xy-canvas-D3TCqFzz.js → vue-ui-xy-canvas-CXBsRU35.js} +1 -1
  170. package/package.json +1 -1
  171. package/dist/BaseDraggableDialog-9d30Yx8c.js +0 -1
  172. package/dist/BaseIcon-fYK0iID8.js +0 -1
  173. package/dist/ColorPicker-DEJOjcmD.js +0 -1
  174. package/dist/PenAndPaper-r50tK3S4.js +0 -1
  175. package/dist/UserOptions-BUXg7qOC.js +0 -1
  176. package/dist/annotationSlots-RvQBEO9-.js +0 -1
  177. package/dist/package-Dbb7W156.js +0 -1
  178. package/dist/useConfig-D3ZfFSE5.js +0 -1
  179. package/dist/vue-data-ui-Bkohx9Cs.js +0 -1
  180. package/dist/vue-ui-3d-bar-CT0QhtL7.js +0 -19
  181. package/dist/vue-ui-age-pyramid-CkZqtIdC.js +0 -1
  182. package/dist/vue-ui-bullet-DEJJEz65.js +0 -34
  183. package/dist/vue-ui-bump-Bk4KKRas.js +0 -8
  184. package/dist/vue-ui-candlestick-CLB_sBqP.js +0 -22
  185. package/dist/vue-ui-chestnut-y3HrgMF1.js +0 -1
  186. package/dist/vue-ui-chord-B_N2fsWI.js +0 -21
  187. package/dist/vue-ui-circle-pack-D66Nfd--.js +0 -13
  188. package/dist/vue-ui-dag-CDDz8tXx.js +0 -9
  189. package/dist/vue-ui-dashboard-B3mEQdok.js +0 -1
  190. package/dist/vue-ui-donut-BD1mPA4G.js +0 -47
  191. package/dist/vue-ui-donut-evolution-B8SGQL4s.js +0 -2
  192. package/dist/vue-ui-dumbbell-BuvzG3Tl.js +0 -9
  193. package/dist/vue-ui-flow-IowFhHnI.js +0 -3
  194. package/dist/vue-ui-funnel-gYtcHX9x.js +0 -1
  195. package/dist/vue-ui-galaxy-CnCTZrbX.js +0 -1
  196. package/dist/vue-ui-gauge-BKrgEDiX.js +0 -1
  197. package/dist/vue-ui-geo-C-gc9jm2.js +0 -1
  198. package/dist/vue-ui-graph-C5p4Zie1.js +0 -7
  199. package/dist/vue-ui-heatmap-BEj47GVD.js +0 -1
  200. package/dist/vue-ui-hill-C10eL0jq.js +0 -1
  201. package/dist/vue-ui-history-plot-BgnJx2mW.js +0 -2
  202. package/dist/vue-ui-horizontal-bar-D1ko4Ir0.js +0 -4
  203. package/dist/vue-ui-molecule-C4xemEWm.js +0 -1
  204. package/dist/vue-ui-mood-radar-Db-Y54f9.js +0 -1
  205. package/dist/vue-ui-nested-donuts-rcZDqWJr.js +0 -19
  206. package/dist/vue-ui-onion-ChgJz_7Y.js +0 -5
  207. package/dist/vue-ui-parallel-coordinate-plot-PI7nplGP.js +0 -9
  208. package/dist/vue-ui-quadrant-BJeocB2S.js +0 -2
  209. package/dist/vue-ui-quick-chart-C4d0hcRJ.js +0 -17
  210. package/dist/vue-ui-radar-gUERUZrP.js +0 -1
  211. package/dist/vue-ui-relation-circle-Ci_6Orcb.js +0 -1
  212. package/dist/vue-ui-ridgeline-9LPlODqi.js +0 -2
  213. package/dist/vue-ui-rings-Ccd4RdGu.js +0 -1
  214. package/dist/vue-ui-scatter-BsyczCTX.js +0 -9
  215. package/dist/vue-ui-stackbar-CPb7WvxK.js +0 -29
  216. package/dist/vue-ui-stackline-Dv2So8hb.js +0 -39
  217. package/dist/vue-ui-strip-plot-t6XVuFen.js +0 -2
  218. package/dist/vue-ui-thermometer-DrcMnnAa.js +0 -1
  219. package/dist/vue-ui-tiremarks-BHainFYD.js +0 -1
  220. package/dist/vue-ui-treemap-B8vm7e8w.js +0 -1
  221. package/dist/vue-ui-waffle-CyoTLAoh.js +0 -1
  222. package/dist/vue-ui-wheel-TN4hPSqT.js +0 -1
  223. package/dist/vue-ui-word-cloud-BOMaVinm.js +0 -4
  224. package/dist/vue-ui-world-BCzP1m1G.js +0 -19
  225. package/dist/vue-ui-xy-NkwuuQv8.js +0 -24
@@ -1,39 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,B as r,D as i,Dt as a,Ft as o,Ht as s,J as c,Jt as l,M as u,Ot as d,P as f,S as p,U as m,X as h,Zt as g,_,_t as ee,at as v,b as te,c as ne,dt as re,en as ie,gt as ae,i as oe,in as se,nn as ce,nt as le,pt as ue,t as de,tn as fe,v as pe,w as me,wt as he,yt as ge,zt as _e}from"./lib-rPeBMZrn.js";import{n as ve,t as ye}from"./BaseScanner-8NdoBs7B.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Ce}from"./useNestedProp-DnGoh-XS.js";import{t as we}from"./useThemeCheck-BKNRbGeC.js";import{t as Te}from"./img-D4RQwASc.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./useChartExport-BZts4KFb.js";import{n as Oe,t as ke}from"./tableIntegration-CNoJ1CIY.js";import{n as Ae,t as je}from"./annotationSlots-RvQBEO9-.js";import{n as Me,t as Ne}from"./userOptionsSlots-DYuo-E5m.js";import{n as Pe,r as Fe,t as Ie}from"./useTimeLabels-Das5O74F.js";import{t as Le}from"./usePrinter-DVf3YcG5.js";import{t as Re}from"./useTransitions-ChGGrtrv.js";import{t as ze}from"./useStableElementSize-CegFbRlF.js";import{t as Be}from"./useSvgLabelLayout-42Kats14.js";import{t as Ve}from"./useTimeLabelCollider-BTybMUFi.js";import{t as He}from"./Shape-CRe8woTu.js";import{c as Ue}from"./canvas-lib-22VpOI4_.js";import{t as We}from"./useResponsive-CENUxfEL.js";import{t as Ge}from"./DefGrad-DKMq1REY.js";import{t as Ke}from"./SlicerPreview-D7gm-OsZ.js";import{t as qe}from"./BaseLegendToggle-aT9fOoGO.js";import{t as Je}from"./A11yDataTable-DWNlWXzs.js";import{t as Ye}from"./useUserOptionState-CXlFnwPv.js";import{t as Xe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ze}from"./annotationViewport-X8fvs7pz.js";import{t as Qe}from"./Legend-DM0ClX3D.js";import{t as $e}from"./vue_ui_stackline-D7b63K84.js";import{Fragment as y,Teleport as et,computed as b,createBlock as x,createCommentVNode as S,createElementBlock as C,createElementVNode as w,createSlots as tt,createTextVNode as nt,createVNode as rt,defineAsyncComponent as it,guardReactiveProps as at,mergeProps as ot,nextTick as st,normalizeClass as T,normalizeProps as ct,normalizeStyle as lt,onBeforeUnmount as ut,onMounted as dt,openBlock as E,ref as D,renderList as O,renderSlot as k,resolveDynamicComponent as ft,shallowRef as pt,toDisplayString as mt,toRefs as ht,unref as A,useSlots as gt,watch as _t,watchEffect as vt,withCtx as j}from"vue";var yt=/* @__PURE__ */ e({default:()=>un}),bt=[`id`],xt=[`id`],St=[`id`],Ct={style:{position:`relative`}},wt=[`aria-describedby`,`xmlns`,`viewBox`],Tt=[`id`],Et=[`x`,`y`,`width`,`height`],Dt={key:0},Ot=[`x`,`y`,`width`,`height`],kt={key:1},At=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],jt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Ft=[`transform`,`font-size`,`fill`,`font-weight`],It=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-dasharray`],Lt=[`clip-path`],Rt=[`d`,`fill`,`opacity`],zt=[`d`,`stroke`,`stroke-width`],Bt=[`x1`,`x2`,`y1`,`y2`,`stroke`],Vt=[`transform`,`font-size`,`font-weight`,`fill`,`text-anchor`],Ht={key:0},Ut={key:1},Wt=[`text-anchor`,`font-size`,`font-weight`,`fill`,`stroke`,`transform`,`onClick`],Gt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`,`onClick`],Kt=[`x`,`y`,`height`,`width`,`fill`],qt={key:0},Jt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Yt=[`clip-path`],Xt={key:0},Zt=[`transform`,`font-size`,`fill`,`font-weight`],Qt=[`transform`,`font-size`,`font-weight`,`fill`],$t=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],en=[`data-start`,`data-end`],tn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},nn={key:5,class:`vue-data-ui-watermark`},rn=[`onClick`],an={key:0},on={key:1},sn=[`innerHTML`],cn=[`id`],ln=280,un=/*#__PURE__*/ Se({__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:Se,emit:yt}){let un=it(()=>import(`./Tooltip-C1q0Qoh7.js`)),dn=it(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),fn=it(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),pn=it(()=>import(`./DataTable-5Ug6gMAX.js`)),mn=it(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),hn=it(()=>import(`./UserOptions-BUXg7qOC.js`).then(e=>e.n)),gn=it(()=>import(`./PackageVersion-CHQWwTik.js`).then(e=>e.t)),_n=it(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_stackline:vn}=t(),{isThemeValid:yn,warnInvalidTheme:bn}=we(),xn=gt(),M=e,N=yt,Sn=b({get(){return!!M.dataset&&M.dataset.length},set(e){return e}}),Cn=D(null),P=D(h()),wn=D(!1),F=D([]),Tn=D(0),En=D(null),Dn=D(null),On=D(null),kn=D(null),An=D(null),jn=D(!1),Mn=D(!1),Nn=D(!1),Pn=D(0),Fn=D(0),In=D(0),Ln=D(!1),Rn=D(null),zn=D(null),Bn=D(!1),Vn=D(null),Hn=D(null),Un=D(null),Wn=D(null),Gn=D(null),Kn=pt(null),qn=D(!1),Jn=D(0),Yn=D(0),Xn=D(null),Zn=D({x:0,y:0}),Qn=D(`pointer`),$n=ze({elementRef:Kn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{nr()}});function er(){Kn.value=Cn.value?.parentNode??null}function tr(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function nr(){let e=++Yn.value;qn.value=!1,await st(),await tr(),await tr(),e===Yn.value&&(Jn.value+=1,qn.value=!0)}let rr=D(null),I=D(!1);function ir(){I.value=!I.value}dt(()=>{er(),$n.start(),Ln.value=!0,jr(),nr()});let L=D(gr()),R=b(()=>L.value.userOptions),z=b(()=>L.value.style.chart.grid.x.timeLabels),B=b(()=>L.value.style.chart.grid),V=b(()=>L.value.style.chart.lines),H=b(()=>L.value.style.chart.tooltip),U=b(()=>L.value.style.chart);be({config:()=>L.value,dataset:()=>M.dataset,component:`VueUiStackline`,rules:[xe.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:ar}=Re({config:()=>L.value.transitions,dataset:()=>M.dataset}),or=b(()=>L.value.userOptions.useCursorPointer),sr=b(()=>se({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:L.value.skeletonConfig??{}})),{loading:cr,FINAL_DATASET:lr,manualLoading:ur}=ve({...ht(M),FINAL_CONFIG:L,prepareConfig:gr,callback:()=>{Promise.resolve().then(async()=>{(!U.value.zoom.keepState||!ia.value||Y.value.start===0&&Y.value.end===0)&&await oa()})},skeletonDataset:M.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:se({defaultConfig:L.value,userConfig:sr.value})}),{userOptionsVisible:dr,setUserOptionsVisibility:fr,keepUserOptionState:pr}=Ye({config:L.value}),{svgRef:W}=Xe({config:U.value.title});function mr(){Bn.value=!0,fr(!0)}function hr(){fr(!1),Bn.value=!1,Xn.value=null,Qn.value=`pointer`,wn.value=!1,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null})}function gr(){let e=Ce({userConfig:M.config,defaultConfig:vn}),t={};M.config&&he(M.config,`style.chart.grid.x.timeLabels.showFirstAndLast`)&&(e.style.chart.grid.x.timeLabels.showFirstAndLast=!!M.config.style.chart.grid.x.timeLabels.showFirstAndLast);let n=e.theme;if(n){if(!yn.value(e))bn(e),t=e;else{let r=Ce({userConfig:$e[n]||M.config,defaultConfig:e});t={...Ce({userConfig:M.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||s}}}else t=e;return t}let _r=b(()=>V.value.dataLabels.hideUnderValue!==null),vr=b(()=>V.value.dataLabels.hideUnderPercentage!==null),yr=g(M.config);_t(()=>M.config,(e,t)=>{let n=g(e),r=n!==yr;yr=n;let i=gr();r?(cr.value||(L.value=i),dr.value=!L.value.userOptions.showOnChartHover,G.value.dataLabels.show=V.value.dataLabels.show,G.value.showTable=L.value.table.show,G.value.showTooltip=H.value.show,jr({resetSlicer:!U.value.zoom.keepState}),Pn.value+=1,Fn.value+=1,In.value+=1,Tr.value.width=U.value.width,Tr.value.height=U.value.height,Tr.value.paddingRatio={top:U.value.padding.top/U.value.height,right:U.value.padding.right/U.value.width,bottom:U.value.padding.bottom/U.value.height,left:U.value.padding.left/U.value.width},er(),nr(),!U.value.zoom.keepState||!ia.value||Y.value.start===0&&Y.value.end===0?oa():Ti()):(L.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=L.value.style.chart.tooltip.show)},{deep:!0}),_t(()=>M.dataset,e=>{Array.isArray(e)&&e.length>0&&(ur.value=!1),U.value.zoom.keepState?Ti():Oi(),er(),nr()},{deep:!0});let G=D({dataLabels:{show:V.value.dataLabels.show},showTable:L.value.table.show,showTooltip:H.value.show});_t(L,()=>{G.value={dataLabels:{show:V.value.dataLabels.show},showTable:L.value.table.show,showTooltip:H.value.show}},{immediate:!0});let{isPrinting:br,isImaging:xr,generatePdf:Sr,generateImage:Cr}=Le({elementId:`stackline_${P.value}`,fileName:U.value.title.text||`vue-ui-stackline`,options:L.value.userOptions.print}),wr=b(()=>L.value.userOptions.show&&!U.value.title.text),Tr=D({width:U.value.width,height:U.value.height,paddingRatio:{top:U.value.padding.top/U.value.height,right:U.value.padding.right/U.value.width,bottom:U.value.padding.bottom/U.value.height,left:U.value.padding.left/U.value.width}}),Er=b(()=>me(L.value.customPalette)),Dr=pt(null),Or=pt(null),kr=D(null),Ar=b(()=>L.value.debug);function jr({resetSlicer:e=!0}={}){if(_e(M.dataset)?(v({componentName:`VueUiStackline`,type:`dataset`,debug:Ar.value}),ur.value=!0):M.dataset.forEach((e,t)=>{ge({datasetObject:e,requiredAttributes:[`name`,`series`]}).forEach(e=>{Sn.value=!1,v({componentName:`VueUiStackline`,type:`datasetSerieAttribute`,property:e,index:t,debug:Ar.value}),ur.value=!0})}),_e(M.dataset)||(ur.value=L.value.loading),setTimeout(()=>{Mn.value=!0},10),L.value.responsive){let e=Ue(()=>{Mn.value=!1;let{width:e,height:t}=We({chart:Cn.value,noTitle:kn.value,title:U.value.title.text?En.value:null,legend:U.value.legend.show?Dn.value:null,slicer:U.value.zoom.show&&J.value>6?On.value.$el:null,source:An.value});requestAnimationFrame(()=>{Tr.value.width=e,Tr.value.height=t-12,Nn.value=!0,clearTimeout(kr.value),kr.value=setTimeout(()=>{Mn.value=!0},10)})});Dr.value&&(Or.value&&Dr.value.unobserve(Or.value),Dr.value.disconnect()),Dr.value=new ResizeObserver(e),Or.value=Cn.value.parentNode,Dr.value.observe(Or.value)}e&&oa()}ut(()=>{$n.stop(),Dr.value&&(Or.value&&Dr.value.unobserve(Or.value),Dr.value.disconnect())});let Mr=b(()=>B.value.y.position===`right`),{metrics:Nr,ready:Pr,settling:Fr,update:Ir}=Be({svgRef:W,canMeasure:()=>(!L.value.responsive||Nn.value)&&(!z.value.show||Hi.value),measure:e=>{let t=Un.value,n=Wn.value;return{scaleLabelsWidth:B.value.y.axisLabels.show?e(t).textWidth:0,yAxisLabelWidth:Hn.value?e(Hn.value).rotatedWidth+B.value.y.axisName.fontSize+B.value.y.axisName.offsetX:0,xAxisLabelHeight:e(Vn.value).height,timeLabelsHeight:z.value.show?e(n).height:0,right:0}}}),Lr=b(()=>Nr.value.xAxisLabelHeight+Nr.value.timeLabelsHeight),K=b(()=>{let{height:e,width:t}=Tr.value,{right:n}=Tr.value.paddingRatio,r=V.value.totalValues.show&&M.dataset&&M.dataset.length>1?V.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=U.value.padding.top+r,u=t-t*n-Nr.value.right-c,d=e-U.value.padding.bottom-Lr.value-r,f=U.value.padding.left+s,p=t-f-t*n-Nr.value.right-c,m=e-l-U.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=b(()=>{let{left:e,top:t,width:n,height:r}=K.value,i=Y.value.start,a=Y.value.end,o=Math.max(1,a-i),s=Math.max(0,Math.min(o,(Hr.value.start??i)-i)),c=Math.max(0,Math.min(o,(Hr.value.end??a)-i)),l=Math.max(0,c-s),u={fill:U.value.zoom.preview.fill,stroke:U.value.zoom.preview.stroke,"stroke-width":U.value.zoom.preview.strokeWidth,"stroke-dasharray":U.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}}),q=b(()=>lr.value.map((e,t)=>{let n=h(),r=p(e.color)||Er.value[t]||s[t]||s[t%s.length];return{...e,shape:e.shape||`circle`,standalone:!!e.standalone,series:JSON.parse(JSON.stringify(e.series)).map(e=>V.value.distributed?Math.abs(e):e),seriesSource:e.series,signedSeries:e.series.map(e=>e>=0?1:-1),absoluteIndex:t,id:n,color:r}})),zr=b(()=>q.value.filter(e=>!F.value.includes(e.id)&&!e.standalone)),Br=b(()=>q.value.filter(e=>!F.value.includes(e.id)&&e.standalone)),J=b(()=>{let e=Math.max(...q.value.filter(e=>!F.value.includes(e.id)).map(e=>e.series.length));return isFinite(e)?e:Math.max(...q.value.map(e=>e.series.length))});function Vr(e){rr.value=e}let Y=D({start:0,end:Math.max(...lr.value.map(e=>e.series.length))}),Hr=D({start:0,end:Math.max(...lr.value.map(e=>e.series.length))}),Ur=D(!1),Wr=D(!1),Gr=D(!1),Kr=D(`matrix(1, 0, 0, 1, 0, 0)`),qr=D(!1),Jr=0,Yr=0,Xr=0,Zr=0,Qr=D(null),$r=D(null),ei=D(null),ti=D(!1),ni=D({time:0,x:0,y:0,pointerType:null}),ri=b(()=>U.value.zoom?.dragToZoom),ii=b(()=>ri.value.show&&Sn.value&&ia.value&&!cr.value),ai=null,oi={};function si(e){return(Y.value.start??0)+(e??0)}let ci=b(()=>U.value.zoom.preview.enable&&(Hr.value.start!==Y.value.start||Hr.value.end!==Y.value.end));function li(e,t){Hr.value[e]=t}function ui(e,t=Y.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function di(e){let t=ui(e);t&&N(`update:zoomState`,t)}function fi(){ai&&=(cancelAnimationFrame(ai),null),oi={}}function pi(e=Y.value){return{start:Number(e.start),end:Number(e.end)}}function mi(e,t){let n=Number(K.value?.left)||0,r=Math.max(0,Number(K.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 hi(){if(V.value.distributed)return null;let e=(Bi.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 gi(e,t){if(!t||!Number.isFinite(e))return Number(K.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 _i({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=mi(i,t),r=mi(a,t),c=mi(i,e),l=mi(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=gi(e,r),a=gi(t,r),o=gi(e,n),s=gi(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 vi({resetTransform:e=!0}={}){Zr+=1,Jr&&=(cancelAnimationFrame(Jr),0),Yr&&=(cancelAnimationFrame(Yr),0),Xr&&=(clearTimeout(Xr),0),qr.value=!1,Gr.value=!1,e&&(Kr.value=`matrix(1, 0, 0, 1, 0, 0)`)}function yi(e,t){return!W.value||cr.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 bi(e,t){let n=pi();if(!yi(e,n))return vi(),!1;let r=_i({previousRange:e,targetRange:n,previousYScale:t,targetYScale:hi()});if(r===`matrix(1, 0, 0, 1, 0, 0)`)return vi(),!1;vi();let i=++Zr;return Gr.value=!0,qr.value=!1,Kr.value=r,Jr=requestAnimationFrame(()=>{Jr=0,Yr=requestAnimationFrame(()=>{Yr=0,i===Zr&&(qr.value=!0,Kr.value=`matrix(1, 0, 0, 1, 0, 0)`,Xr=setTimeout(()=>{Xr=0,i===Zr&&(qr.value=!1,Gr.value=!1)},ln))})}),!0}let xi=b(()=>({transform:Kr.value,transformOrigin:`0 0`,transformBox:`view-box`,transition:qr.value?`transform ${ln}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:Gr.value?`transform`:void 0})),Si=b(()=>Gr.value?`url(#vue_ui_stackline_zoom_clip_${P.value})`:void 0);function Ci(e,{transition:t=!1}={}){let n=ui(e);if(!n)return null;let{start:r,end:i}=n;if(r!==Number(Y.value.start)||i!==Number(Y.value.end)){let e=pi(),n=hi();fi(),Y.value={start:r,end:i},Hr.value={start:r,end:i},Ti(),t&&bi(e,n)}return{start:Number(Y.value.start),end:Number(Y.value.end)}}function wi(e,{transition:t=!0}={}){let n=Ci(e,{transition:t});return n?(N(`update:zoomState`,n),n):null}function Ti(){let e=J.value,t=Math.max(0,Math.min(Y.value.start??0,e-1)),n=Math.max(t+1,Math.min(Y.value.end??e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),Y.value.start=t,Y.value.end=n,Hr.value.start=t,Hr.value.end=n,On.value&&On.value.setRangeValues(t,n)}let Ei=D(null);function Di(){return new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e())))}ut(()=>{Ei.value&&cancelAnimationFrame(Ei.value),fi(),ba(),vi()});async function Oi({force:e=!1,publish:t=!1,transition:n=e&&t}={}){if(U.value.zoom.keepState&&!e&&ia.value&&(Y.value.start!==0||Y.value.end!==0)){Ti();return}let r=!e,i=n?pi():null,a=n?hi():null;oa(r),n&&bi(i,a),await st(),Ei.value&&cancelAnimationFrame(Ei.value),Ei.value=requestAnimationFrame(async()=>{await Di(),oa(r),Ei.value=null,t&&(di({start:Number(Y.value.start),end:Number(Y.value.end)}),N(`zoomReset`))})}let ki=b(()=>Math.max(0,K.value.width/(Y.value.end-Y.value.start))),Ai=b(()=>ie(zr.value.map(e=>({...e,series:e.series.map(e=>e??0)}))).slice(Y.value.start,Y.value.end)),ji=b(()=>F.value.length===q.value.length),Mi=b(()=>{if(!U.value.zoom.minimap.show)return[];let e=q.value.filter(e=>ji.value?!0:!F.value.includes(e.id)&&!e.standalone);if(e.length)return ie(e.map(e=>({...e,series:(e.series||[]).map(e=>e??0)})));let t=Br.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))}),Ni=b(()=>{if(!U.value.zoom.minimap.show)return[];let e=q.value.filter(e=>ji.value?!0:!F.value.includes(e.id)&&!e.standalone),t=Br.value,n=e.length?[{name:``,series:Mi.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)}),Pi=b(()=>ie(zr.value.filter(e=>!F.value.includes(e.id)).map(e=>({...e,series:e.series.map((t,n)=>{let r=t??0;return e.signedSeries[n]===-1&&r>=0?-r:r})}))).slice(Y.value.start,Y.value.end)),Fi=b(()=>{let e=zr.value.filter(e=>!F.value.includes(e.id));return{positive:ie(e.map(e=>({...e,series:e.series.slice(Y.value.start,Y.value.end).map(e=>(e??0)>=0?e??0:0)}))),negative:ie(e.map(e=>({...e,series:e.series.slice(Y.value.start,Y.value.end).map(e=>(e??0)<0?e??0:0)})))}}),Ii=b(()=>{let e=Math.max(0,Y.value.end-Y.value.start),t=Array(e).fill(0),n=Array(e).fill(0);return Br.value.forEach(r=>{for(let i=0;i<e;i+=1){let e=r.series[Y.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}}),Li=b(()=>Pi.value.map((e,t)=>({value:e,sign:e>=0?1:-1})));function Ri(){return{y0:Bi.value?.[0]?.zero??K.value.bottom}}function zi(e){let{y0:t}=Ri(),n=V.value.totalValues,r=Math.max(2,n.fontSize*1.3+n.offsetY),i=e=>Math.min(Math.max(e,K.value.top-V.value.totalValues.fontSize*1.3),K.value.bottom+V.value.totalValues.fontSize*2);if((Li.value?.[e]?.value??0)>=0||V.value.distributed){let n=1/0;for(let t of X.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-V.value.totalValues.offsetY)}{let a=-1/0;for(let t of X.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+V.value.totalValues.offsetY)}}let Bi=b(()=>{let e=Math.max(...Fi.value.positive,0),t=Math.min(...Fi.value.negative,0),n=Math.max(...Ii.value.positive,0),r=Math.min(...Ii.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=B.value.scale.scaleMin,c=B.value.scale.scaleMax,l=!V.value.distributed&&(s!==null||c!==null),u=s!==null&&!V.value.distributed?s:o>0?0:o,d=c!==null&&!V.value.distributed?c:i<0?0:i,f=l?pe(u,d,B.value.scale.ticks):_(u,d,B.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=K.value.bottom-K.value.height*(p/h);return g.map(e=>{let t=Number(e)||0,n=K.value.bottom-K.value.height*((t+p)/h);return{zero:ee,y:n,x:Mr.value?Z.value.right+8:Z.value.left-8,value:t}})}),Vi=D([]),Hi=D(!1),Ui=D([]),Wi=0;vt(()=>{let e=++Wi;(async()=>{let t=await Ie({values:z.value.values,maxDatapoints:J.value,formatter:z.value.datetimeFormatter,start:Y.value.start,end:Y.value.end});e===Wi&&(Vi.value=t,Hi.value=!0)})()});let Gi=0;vt(()=>{let e=++Gi;(async()=>{let t=await Ie({values:z.value.values,maxDatapoints:J.value,formatter:z.value.datetimeFormatter,start:0,end:J.value});e===Gi&&(Ui.value=t)})()});let Ki=b(()=>{let e=Math.max(1,Math.floor(Number(z.value.modulo)||1)),t=(Vi.value||[]).map(e=>e?.text??``),n=(Ui.value||[]).map(e=>e?.text??``),r=Y.value.start??0,i=r>0||t.length<n.length;return ae({configuredModulo:e,visibleTexts:t,allTexts:n,startAbs:r,isZoomed:i})});function qi(e){let t=z.value,n=Vi.value||[],r=Ui.value||[],i=Y.value.start??0,a=J.value,o=n.map(e=>e?.text??``),s=r.map(e=>e?.text??``),c=ne(!!t.showOnlyFirstAndLast,!!t.showOnlyAtModulo,Ki.value,o,s,i,e,a);if(!t.showFirstAndLast||t.showOnlyFirstAndLast||!c.length)return c;let l=c.length-1;return c.map((e,t)=>t!==0&&t!==l?e:{...e,text:o[t]??``})}let Ji=b(()=>qi($.value)),Yi=b(()=>qi(null));_t(()=>[Tr.value.width,Tr.value.height,Jn.value,L.value.style.fontFamily,B.value,z.value,V.value,Yi.value.map(e=>e?.text??``).join(`|`),M.dataset,Hi.value,Nn.value,F.value,G.value,Y.value.start,Y.value.end,Wn.value,Un.value,Vn.value,Hn.value],Ir,{flush:`post`,deep:!0});let Xi=D({months:[],shortMonths:[],days:[],shortDays:[]}),Zi=0;vt(()=>{let e=++Zi,t=z.value.datetimeFormatter;(async()=>{let n=await Fe(t.locale).catch(()=>Fe(`en`));e===Zi&&(Xi.value=n.data)})()});let Qi=b(()=>{let e=z.value.datetimeFormatter,t=Pe({useUTC:e.useUTC,locale:Xi.value,januaryAsYear:e.januaryAsYear});return(e,n)=>{let r=z.value.values?.[e];return r==null?``:t.formatDate(new Date(r),n)}}),$i=b(()=>(z.value.values||[]).map((e,t)=>({text:Qi.value(t,U.value.zoom.timeFormat),absoluteIndex:t}))),ea=b(()=>(z.value.values||[]).map((e,t)=>({text:Qi.value(t,H.value.timeFormat),absoluteIndex:t}))),ta=b(()=>{if(!Sn.value&&!cr.value)return[];let e=K.value.height,t=Bi.value[0]?Bi.value[0].zero:K.value.bottom,n=Y.value.start??0,r=Y.value.end??0,i=Math.max(1,r-n),a=Math.max(...Fi.value.positive,0),o=Math.min(...Fi.value.negative,0),s=Math.max(...Ii.value.positive,0),c=Math.min(...Ii.value.negative,0),l=Math.max(a,s),u=Math.min(o,c),{min:d,max:f}=!V.value.distributed&&(B.value.scale.scaleMax!==null||B.value.scale.scaleMin!==null)?pe(B.value.scale.scaleMin===null?u>0?0:u:B.value.scale.scaleMin,B.value.scale.scaleMax===null?l<0?0:l:B.value.scale.scaleMax,B.value.scale.ticks):_(B.value.scale.scaleMin===null?u>0?0:u:B.value.scale.scaleMin,B.value.scale.scaleMax===null?l<0?0:l:B.value.scale.scaleMax,B.value.scale.ticks),p=f+(d>=0?0:Math.abs(d))||1,m=Array(i).fill(0),h=Array(i).fill(0),g=e=>i<=1?K.value.left+K.value.width/2:K.value.left+e/(i-1)*K.value.width;return q.value.filter(e=>!F.value.includes(e.id)).map(r=>{let a=[],o=[],s=[],c=Array(i).fill(null),l=Array(i).fill(null);for(let u=0;u<i;u+=1){let i=n+u,d=r.series?.[i],f=r.signedSeries?.[i],g=d==null||Number.isNaN(d)?0:d,_=r.standalone?g/p:V.value.distributed?g/(Ai.value[u]||1):g/p;if(g>=0){let n=e*Math.abs(_);if(r.standalone)c[u]=t,l[u]=t-n;else{let e=m[u],r=e+n;c[u]=t-e,l[u]=t-r,m[u]=r}}else{let n=e*Math.abs(_);if(r.standalone)c[u]=t,l[u]=t+n;else{let e=h[u],r=e+n;c[u]=t+e,l[u]=t+r,h[u]=r}}a.push(u),o.push(g),s.push(f??(g>=0?1:-1))}let u=a.map(e=>({x:g(e),y:l[e]})),d=u.map(e=>e.x),f=o.reduce((e,t)=>e+Math.abs(t||0),0),_=f===0?1:f,ee=o.map((e,t)=>{if(V.value.distributed&&!r.standalone){let n=a[t],r=Ai.value[n]||1;return(e||0)/r}return(e||0)/_});return{...r,x:d,points:u,baseY:a.map(e=>c[e]),topY:a.map(e=>l[e]),series:o,signedSeries:s,proportions:ee,rel:a,fullSeries:Array.isArray(r.fullSeries)?r.fullSeries:r.series}})}),X=b(()=>{let e=e=>typeof e==`string`?e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,``).trim():``,t=Math.max(...Fi.value.positive,0),n=Math.min(...Fi.value.negative,0),r=Math.max(...Ii.value.positive,0),i=Math.min(...Ii.value.negative,0),a=Math.max(t,r),o=Math.min(n,i),s=!V.value.distributed&&(B.value.scale.scaleMax!==null||B.value.scale.scaleMin!==null)?pe(B.value.scale.scaleMin===null?o>0?0:o:B.value.scale.scaleMin,B.value.scale.scaleMax===null?a<0?0:a:B.value.scale.scaleMax,B.value.scale.ticks):_(B.value.scale.scaleMin===null?o>0?0:o:B.value.scale.scaleMin,B.value.scale.scaleMax===null?a<0?0:a:B.value.scale.scaleMax,B.value.scale.ticks),c=Number(s.min)||0,l=Number(s.max)||0,u=Math.abs(c),d=l+u||1,p=e=>{if(V.value.distributed){let t=Math.max(0,Math.min(1,e));return minimapH-minimapH*t}return clampY(minimapH-minimapH*(((e??0)+u)/d))};return ta.value.map(t=>{let n=t.x.length,r=Array.isArray(t.fullSeries)?t.fullSeries:t.series,i=({left:e=0,unitW:t})=>{let n=r.length;return!Number.isFinite(t)||t<=0||n<=0?[]:n===1?[e+t*.5]:r.map((n,r)=>e+r*t)},a=({minimapH:e})=>!Number.isFinite(e)||e<=0?[]:r.map(t=>p(t||0,e)),o=({minimapH:e})=>{if(!Number.isFinite(e)||e<=0)return[];let t=p(0,e);return r.map(()=>t)};if(n===0)return{...t,points:[],smoothPath:``,straightPath:``,smoothArea:``,straightArea:``,xMinimap:i,yMinimap:a,yMinimapBase:o};let s=t.x.map((e,n)=>({x:e,y:t.topY[n]})),c=t.x.map((e,n)=>({x:e,y:t.baseY[n]})),l=n>=2?f(s):`M${s[0].x},${s[0].y}`,u=n>=2?m(s):`M${s[0].x},${s[0].y}`,d=n>=2?`M${e(l)}`:l,h=n>=2?`M${e(u)}`:u,g=``,_=``;if(V.value.useArea&&n>=2){let t=f([...c].reverse()),n=m([...c].reverse()),r=c[c.length-1];g=`M${s[0].x},${s[0].y} ${e(l)} L${r.x},${r.y} ${e(t)} Z`,_=`M${s[0].x},${s[0].y} ${e(u)} L${r.x},${r.y} ${e(n)} Z`}return{...t,points:s,smoothPath:d,straightPath:h,smoothArea:g,straightArea:_,xMinimap:i,yMinimap:a,yMinimapBase:o}})}),na=b(()=>$.value===null||$.value===void 0?null:{timeLabel:Ba($.value),absoluteIndex:$.value+Y.value.start,seriesIndex:$.value,datapoint:za.value,series:X.value,config:L.value}),ra=D(!1),ia=D(!1);function aa(e,t=Y.value.start){let n=J.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function oa(e=!0){if(!ra.value){ra.value=!0;try{let{startIndex:t,endIndex:n,keepState:r}=U.value.zoom,i=r?Math.max(0,J.value):J.value;if(r&&i<=0)return;let a=t??0,o=n==null?i:Math.min(aa(n+1,a),i);da.value=!0,Y.value.start=a,Y.value.end=o,Hr.value.start=a,Hr.value.end=o,Ti(),ia.value=!0,e&&M.zoomState&&Ci(M.zoomState)}finally{queueMicrotask(()=>{da.value=!1}),ra.value=!1}}}function sa(e){oi={...oi,...e},ai&&cancelAnimationFrame(ai),ai=requestAnimationFrame(()=>{let e={...Y.value,...oi};oi={},ai=null,Y.value=e,Hr.value={...e},Ti(),di({start:Number(Y.value.start),end:Number(Y.value.end)})})}function ca(e){if(ra.value||da.value)return;let t=Number(e);Number.isFinite(t)&&(N(`zoomStart`,{index:t,isZoom:t!==0}),t!==Y.value.start&&sa({start:t}))}function la(e){if(ra.value||da.value)return;let t=oi.start===void 0?Y.value.start:oi.start,n=aa(Number(e),t);Number.isFinite(n)&&(N(`zoomEnd`,{index:n,isZoom:n!==J.value}),(n!==Y.value.end||oi.start!==void 0)&&sa({end:n}))}let Z=b(()=>({left:K.value.left,right:K.value.right,width:K.value.width})),ua=b(()=>{let e=B.value.y.axisLabels,{prefix:t,suffix:r}=V.value.dataLabels;return Bi.value.map(i=>String(oe(e.formatter,i.value,n({p:t,v:i.value,s:r,r:e.rounding}),{datapoint:i})??``)).join(`|`)});_t([ua,()=>B.value.y.axisLabels.show,()=>B.value.y.axisLabels.fontSize,()=>B.value.y.axisLabels.bold,()=>B.value.y.position],()=>{B.value.y.axisLabels.show&&nr()},{flush:`post`});let da=D(!1);_t([()=>M.zoomState,ia],([e,t])=>{t&&e&&Ci(e,{transition:!0})},{deep:!0,immediate:!0});let fa=b(()=>Tr.value.width),pa=b(()=>Tr.value.height);Ve({timeLabelsEls:Wn,timeLabels:Vi,slicer:Y,configRef:L,rotationPath:[`style`,`chart`,`grid`,`x`,`timeLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`grid`,`x`,`timeLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:fa,height:pa,rotation:z.value.autoRotate.angle});let ma=D(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=b(()=>!Ur.value||Qr.value==null||$r.value==null?null:{x:Math.min(Qr.value,$r.value),y:K.value.top,width:Math.abs($r.value-Qr.value),height:K.value.height}),_a=b(()=>ia.value?Number(Y.value.start)!==0||Number(Y.value.end)!==Number(J.value):!1);function va(e){return Math.min(Math.max(e,K.value.left),K.value.right)}function ya(){ja&&=(cancelAnimationFrame(ja),0),ma.value=null,rr.value=null,Xn.value=null,$.value=null,Ha(!1,null)}function ba(e){let t=e?.pointerId==null?ei.value:e.pointerId;t!=null&&W.value?.hasPointerCapture?.(t)&&W.value.releasePointerCapture(t),Ur.value=!1,Qr.value=null,$r.value=null,ei.value=null}function xa(){ti.value=!0,setTimeout(()=>{ti.value=!1},0)}function Sa(e){if(!ii.value||!_a.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=ni.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?(ni.value={time:0,x:0,y:0,pointerType:null},xa(),ba(e),Oi({force:!0,publish:!0}),!0):(ni.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function Ca(e){if(Q.value<=0)return null;if(Q.value===1||Ma.value<=0)return 0;let t=(va(e)-K.value.left)/Ma.value;return Math.max(0,Math.min(Q.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(Y.value.start)+i,end:Number(Y.value.start)+a+1}}function Ta(e){let t=wi(e,{transition:!0});return t?(N(`zoomStart`,{index:t.start,isZoom:t.start!==0}),N(`zoomEnd`,{index:t.end,isZoom:t.end!==J.value}),t):null}function Ea(){Wr.value=!0,W.value?.classList?.add(`vue-ui-stackline-chart-zoom-pointer-focus`)}function Da(){Wr.value=!1,W.value?.classList?.remove(`vue-ui-stackline-chart-zoom-pointer-focus`)}function Oa(e){if(!ii.value||I.value||e.button!==void 0&&e.button!==0||ei.value!=null&&e.pointerId!==ei.value)return;let t=ha(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=K.value;t.x<n||t.x>r||t.y<i||t.y>a||Q.value<=1||(Ea(),W.value?.focus?.({preventScroll:!0}),ya(),ei.value=e.pointerId,Ur.value=!0,Qr.value=va(t.x),$r.value=va(t.x))}function ka(e){if(!ii.value||!Ur.value||ei.value!=null&&e.pointerId!==ei.value)return;let t=ha(e);t&&($r.value=va(t.x),Qr.value!=null&&Math.abs($r.value-Qr.value)>=2&&!W.value?.hasPointerCapture?.(e.pointerId)&&W.value?.setPointerCapture?.(e.pointerId))}function Aa(e){if(!ii.value||!Ur.value||ei.value!=null&&e.pointerId!==ei.value)return;let t=ha(e);t&&($r.value=va(t.x));let n=Qr.value,r=$r.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,K.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)&&(ni.value={time:0,x:0,y:0,pointerType:null},ya(),xa())):ba(e)}let ja=0,Q=b(()=>Math.max(1,Y.value.end-Y.value.start)),Ma=b(()=>Q.value>1?K.value.width/(Q.value-1):0);function Na(e){return Q.value<=1?K.value.left+K.value.width/2:K.value.left+e*Ma.value}function Pa(e){if(Q.value<=1)return{x:K.value.left,width:K.value.width};let t=e===0?K.value.left:(Na(e-1)+Na(e))/2,n=e===Q.value-1?K.value.left+K.value.width:(Na(e)+Na(e+1))/2;return{x:t,width:Math.max(0,n-t)}}function Fa(e){I.value||Ur.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}=K.value;if(t.x<n||t.x>r||t.y<i||t.y>a){Ra();return}let o=0;if(Q.value>1){let e=(t.x-n)/Ma.value;o=Math.round(e)}else o=0;o<0&&(o=0),o>Q.value-1&&(o=Q.value-1),ma.value!==o&&(ma.value=o,Ha(!0,o))}))}function Ia(e){if(ti.value){ti.value=!1;return}if(Ur.value)return;let t=ha(e);if(!t||!W.value)return;let{left:n,right:r,top:i,bottom:a}=K.value;if(t.x<n||t.x>r||t.y<i||t.y>a)return;let o=0;if(Q.value>1){let e=(t.x-n)/Ma.value;o=Math.round(e)}else o=0;o<0&&(o=0),o>Q.value-1&&(o=Q.value-1),wo({seriesIndex:o,datapoint:go(o)}),La(o)}function La(e){let t=JSON.parse(JSON.stringify(X.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}));L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:t,seriesIndex:e+Y.value.start}),N(`selectDatapoint`,{datapoint:t,period:Vi.value[e]})}_t(()=>[Y.value.start,Y.value.end,X.value.length],()=>{let e=Q.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,Ha(!1,null)}let $=D(null),za=b(()=>{let e=$.value,t=e==null?null:si(e);return X.value.map(n=>({slotAbsoluteIndex:n.absoluteIndex,shape:n.shape||`circle`,name:n.name,color:n.color,value:e==null?null:n.series.find((t,n)=>n===e),sourceValue:t==null?null:n.seriesSource?.[t],comments:n.comments||[],id:n.id,standalone:!!n.standalone}))});function Ba(e){if(e==null||!H.value.showTimeLabel)return null;let t=Vi.value?.[e]?.text||null,n=ea.value?.[e]?.text||null,r=Ui.value?.[e]?.text||null;return H.value.useDefaultTimeFormat?t:n||r}let Va=b(()=>{let e=H.value.customFormat,t=[...za.value].reverse(),i=t.filter(e=>!e.standalone),o=t.filter(e=>e.standalone),s=i.map(e=>e.value).filter(e=>d(e)&&e!==null).reduce((e,t)=>Math.abs(e)+Math.abs(t),0);if(a(e)&&ue(()=>e({absoluteIndex:$.value+Y.value.start,seriesIndex:$.value,datapoint:za.value,series:q.value,config:L.value})))return e({absoluteIndex:$.value+Y.value.start,seriesIndex:$.value,datapoint:za.value,series:q.value,config:L.value});let{showValue:c,showTotal:l,totalTranslation:f,showPercentage:p,borderColor:m,roundingValue:h,roundingPercentage:g}=H.value,_=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="${H.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="${H.value.backgroundColor}" stroke-width="1" fill="${e.color}" points="${r({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="${u({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`square`?`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${u({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`diamond`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${u({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`pentagon`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${u({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${u({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`,ee=(e,t)=>{let r=t?n({v:isNaN((e.value??0)/(s||1))?0:Math.abs(e.value??0)/(s||1)*100,s:`%`,r:g}):``,i=c&&t?`(`:``,a=c&&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;">${_(e)}</div>
4
- ${e.name}${c||t?`:`:``}
5
- ${c?oe(V.value.dataLabels.formatter,e.sourceValue,n({p:V.value.dataLabels.prefix,v:e.sourceValue,s:V.value.dataLabels.suffix,r:h},{datapoint:e})):``} ${i}${r}${a}
6
- </div>
7
- `},v=``,te=Ba($.value);return te&&(v+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${te}</div>`),l&&i.length>1&&(v+=`<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
8
- <span>${f}:</span>
9
- <span>${oe(V.value.dataLabels.formatter,re(s),n({p:V.value.dataLabels.prefix,v:re(s),s:V.value.dataLabels.suffix,r:h}),{datapoint:{name:f,value:re(s)}})}</span>
10
- </div>`),i.forEach(e=>{v+=ee(e,p)}),o.length&&(v+=`<div style="border-top:1px solid ${zr.value.length?m:`transparent`}; margin:${zr.value.length?`6px 0`:`0`};"></div>`,o.forEach(e=>{v+=ee(e,!1)})),`<div>${v}</div>`});function Ha(e,t=null,n=`pointer`){if(ji.value)return;Qn.value=n,wn.value=e;let r=X.value.map(e=>({name:e.name,value:[null,void 0,NaN].includes(e.series[t])?null:e.series[t],color:e.color}));e?(Xn.value=t,$.value=t,wo({seriesIndex:t,datapoint:r}),L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:r,seriesIndex:t+Y.value.start})):(Xn.value=null,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null}),L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:r,seriesIndex:t+Y.value.start}))}function Ua(e,t){let n=JSON.parse(JSON.stringify(X.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}));N(`selectTimeLabel`,{datapoint:n,absoluteIndex:e.absoluteIndex,label:e.text})}function Wa(){F.value.length?F.value=[]:Ka.value.forEach(e=>{F.value.push(e.id)}),N(`selectLegend`,X.value)}function Ga(e){if(F.value.includes(e.id))F.value=F.value.filter(t=>t!==e.id);else{if(F.value.length===q.value.length-1)return;F.value.push(e.id)}N(`selectLegend`,X.value)}let Ka=b(()=>q.value.map(e=>({...e,opacity:F.value.includes(e.id)?.5:1,segregate:()=>Ga(e),isSegregated:F.value.includes(e.id)}))),qa=b(()=>({cy:`stackline-legend`,backgroundColor:U.value.legend.backgroundColor,color:U.value.legend.color,fontSize:U.value.legend.fontSize,paddingBottom:12,fontWeight:U.value.legend.bold?`bold`:``}));function Ja(e){return q.value.length?q.value.find(t=>t.name===e)||(Ar.value&&console.warn(`VueUiStackline - Series name not found "${e}"`),null):(Ar.value&&console.warn(`VueUiStackline - There are no series to show.`),null)}function Ya(e){let t=Ja(e);t!==null&&F.value.includes(t.id)&&Ga({id:t.id})}function Xa(e){let t=Ja(e);t!==null&&(F.value.includes(t.id)||Ga({id:t.id}))}let Za=b(()=>{if(X.value.length===0)return{head:[],body:[],config:{},columnNames:[]};let e=X.value.map(({name:e,color:t})=>({label:e,color:t})),t=[];return Ji.value.forEach(e=>{let n=e.absoluteIndex,r=[z.value.values?.[n]?e.text:n+1];q.value.forEach(e=>{let t=e.series?.[n],i=Number((t??0).toFixed(L.value.table.td.roundingValue));r.push(i)}),t.push(r)}),{head:e,body:t}});function Qa(e=null){let t=[[U.value.title.text],[U.value.title.subtitle.text],[``]],n=[``,...Za.value.head.map(e=>e.label)],r=Za.value.body,a=t.concat([n]).concat(r),o=i(a);e?e(o):le({csvContent:o,title:U.value.title.text||`vue-ui-stackline`})}let $a=b(()=>{let e=[``].concat(X.value.map(e=>e.name),`__SUM__`),t=[],n=Math.max(0,Y.value.end-Y.value.start);for(let e=0;e<n;e+=1){let n=si(e),r=z.value.values?.[n]?Vi.value?.[e]?.text??n+1:n+1,i=X.value.map(t=>{let n=t.series?.[e]??0;return Number(n.toFixed(L.value.table.td.roundingValue))}),a=X.value.filter(e=>!e.standalone).map(t=>t.series?.[e]??0).reduce((e,t)=>e+t,0);t.push([r].concat(i,Number(a.toFixed(L.value.table.td.roundingValue))))}return{head:e,body:t,config:{th:{backgroundColor:L.value.table.th.backgroundColor,color:L.value.table.th.color,outline:L.value.table.th.outline},td:{backgroundColor:L.value.table.td.backgroundColor,color:L.value.table.td.color,outline:L.value.table.td.outline},breakpoint:L.value.table.responsiveBreakpoint},colNames:[L.value.table.columnNames.period].concat(X.value.map(e=>e.name),L.value.table.columnNames.total)}}),eo=b(()=>U.value.backgroundColor),to=b(()=>U.value.legend),no=b(()=>U.value.title),{isCallbackImaging:ro,isCallbackSvg:io,generateSvg:ao,onGenerateImage:oo}=De({svg:W,title:no,legend:to,legendItems:Ka,backgroundColor:eo,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:Cr});async function so({scale:e=2}={}){if(!Cn.value)return;let{imageUri:t,base64:n}=await Te({domElement:Cn.value,base64:!0,img:!0,scale:e}),r=Cn.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await ee(t,e)??i;return{imageUri:t,base64:n,title:U.value.title.text,...a}}let co=b(()=>ke({config:L,style:U,mutableConfig:G,dialog:_n,accordion:fn,isFullscreen:jn,parent:Cn,maxWidth:800,isCursorPointer:or}));_t(()=>G.value.showTable,e=>Oe(e,L,Rn));function lo(){G.value.showTable=!1,zn.value&&zn.value.setTableIconState(!1)}function uo(e){jn.value=e,Tn.value+=1}function fo(){G.value.showTable=!G.value.showTable}function po(){G.value.dataLabels.show=!G.value.dataLabels.show}function mo(){G.value.showTooltip=!G.value.showTooltip}function ho(){return X.value}function go(e){let t=e??0,n=si(t);return JSON.parse(JSON.stringify(X.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:Ui.value?.[n]||null}})}let _o=b(()=>Array(J.value).fill(0).map((e,t)=>go(t)));_t(()=>M.selectedXIndex,e=>{if([null,void 0].includes(M.selectedXIndex)){$.value=null;return}let t=e-Y.value.start;t<0||e>=Y.value.end?$.value=null:$.value=t??null},{immediate:!0});let vo=b(()=>{if(V.value.distributed)return{min:-1,max:1};let e=zr.value,t=Br.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=B.value.scale.scaleMin,u=B.value.scale.scaleMax,d=B.value.scale.ticks,f=!V.value.distributed&&(l!==null||u!==null)?pe(l===null?c>0?0:c:l,u===null?s<0?0:s:u,d):_(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 yo({minimapH:e,unitW:t}){let n=e=>typeof e==`string`?e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,``).trim():``;if(!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<=0)return``;let r=X.value.filter(e=>!e.standalone),i=X.value.filter(e=>e.standalone),a=Math.max(0,...X.value.map(e=>Array.isArray(e.fullSeries)?e.fullSeries.length:e.series.length));if(a<=0)return``;let o=a===1?[t*.5]:Array.from({length:a},(e,n)=>n*t);if(V.value.distributed){let t=Array.from({length:a},(e,t)=>{let n=0;return r.forEach(e=>{let r=(Array.isArray(e.fullSeries)?e.fullSeries:e.series)?.[t];r!=null&&!Number.isNaN(r)&&(n+=Math.abs(r))}),n||1}),s=t=>e-e*Math.max(0,Math.min(1,t||0)),c=[],l=Array(a).fill(0);return r.forEach(e=>{let r=Array.isArray(e.fullSeries)?e.fullSeries:e.series,i=Array(a),u=Array(a);for(let e=0;e<a;e+=1){let n=r?.[e],a=n==null||Number.isNaN(n)?0:Math.abs(n)/t[e];u[e]=l[e],l[e]+=a,i[e]=l[e]}let d=i.map(s),p=u.map(s),h=o.map((e,t)=>({x:e,y:d[t]})),g=o.map((e,t)=>({x:e,y:p[t]})),_=f(h),ee=f([...g].reverse()),v=m(h),te=m([...g].reverse()),ne=g[g.length-1];if(V.value.useArea){let t=V.value.smooth?`M${h[0].x},${h[0].y} ${n(_)} L${ne.x},${ne.y} ${n(ee)} Z`:`M${h[0].x},${h[0].y} ${n(v)} L${ne.x},${ne.y} ${n(te)} Z`;c.push(`<path d="${t}"
11
- fill="${xn.pattern?`url(#pattern_${P.value}_${e.absoluteIndex})`:(V.value.gradient.show,e.color)}"
12
- opacity="${V.value.areaOpacity}"
13
- stroke="none" />`)}let re=V.value.smooth?`M${h[0].x},${h[0].y} ${n(_)}`:`M${h[0].x},${h[0].y} ${n(v)}`;c.push(`<path d="${re}"
14
- fill="none"
15
- stroke="${e.color}"
16
- stroke-width="${V.value.strokeWidth}"
17
- stroke-linecap="round" />`)}),i.length&&i.forEach(e=>{let r=Array.isArray(e.fullSeries)?e.fullSeries:e.series,i=Array.from({length:a},(e,n)=>s(Math.abs(r?.[n]??0)/t[n])),l=o.map((e,t)=>({x:e,y:i[t]})),u=f(l),d=m(l),p=V.value.smooth?`M${l[0].x},${l[0].y} ${n(u)}`:`M${l[0].x},${l[0].y} ${n(d)}`;c.push(`<path d="${p}"
18
- fill="none"
19
- stroke="${e.color}"
20
- stroke-width="${V.value.strokeWidth}"
21
- stroke-linecap="round" />`)}),c.join(``)}let s=vo.value.min,c=vo.value.max,l=Math.abs(s),u=c+l||1,d=t=>Math.max(0,Math.min(e,t)),p=t=>d(e-e*(((t??0)+l)/u)),h=[];if(r.length){let e=Array(a).fill(0),t=Array(a).fill(0);r.forEach(r=>{let i=Array.isArray(r.fullSeries)?r.fullSeries:r.series,s=Array(a),c=Array(a);for(let n=0;n<a;n+=1){let r=i?.[n]??0;r>=0?(c[n]=e[n],e[n]+=r,s[n]=e[n]):(c[n]=t[n],t[n]+=r,s[n]=t[n])}let l=s.map(p),u=c.map(p),d=o.map((e,t)=>({x:e,y:l[t]})),g=o.map((e,t)=>({x:e,y:u[t]})),_=f(d),ee=f([...g].reverse()),v=m(d),te=m([...g].reverse()),ne=g[g.length-1];if(V.value.useArea){let e=V.value.smooth?`M${d[0].x},${d[0].y} ${n(_)} L${ne.x},${ne.y} ${n(ee)} Z`:`M${d[0].x},${d[0].y} ${n(v)} L${ne.x},${ne.y} ${n(te)} Z`;h.push(`<path d="${e}"
22
- fill="${xn.pattern?`url(#pattern_${P.value}_${r.absoluteIndex})`:(V.value.gradient.show,r.color)}"
23
- opacity="${V.value.areaOpacity}"
24
- stroke="none" />`)}let re=V.value.smooth?`M${d[0].x},${d[0].y} ${n(_)}`:`M${d[0].x},${d[0].y} ${n(v)}`;h.push(`<path d="${re}"
25
- fill="none"
26
- stroke="${r.color}"
27
- stroke-width="${V.value.strokeWidth}"
28
- stroke-linecap="round" />`)})}return i.length&&i.forEach(e=>{let t=(Array.isArray(e.fullSeries)?e.fullSeries:e.series).map(p),r=o.map((e,n)=>({x:e,y:t[n]})),i=f(r),a=m(r),s=V.value.smooth?`M${r[0].x},${r[0].y} ${n(i)}`:`M${r[0].x},${r[0].y} ${n(a)}`;h.push(`<path d="${s}"
29
- fill="none"
30
- stroke="${e.color}"
31
- stroke-width="${V.value.strokeWidth}"
32
- stroke-linecap="round" />`)}),h.join(``)}function bo(e,t){let n=V.value,r=n.dataLabels;return n.showDistributedPercentage&&n.distributed?vr.value?t===0?!r.hideEmptyPercentages:Math.abs(t)*100>=r.hideUnderPercentage:!r.hideEmptyPercentages||Math.abs(t)>0:vr.value?(_r.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)>xo.value*r.hideUnderPercentage/100):_r.value?Math.abs(e)>=r.hideUnderValue:!r.hideEmptyValues||e!==0}let xo=b(()=>Math.max(...X.value.flatMap(e=>e.series)));function So(e,t,r,i,a){let o=a===-1&&e>=0?-e:e;return oe(V.value.dataLabels.formatter,o,n({p:V.value.dataLabels.prefix,v:o,s:V.value.dataLabels.suffix,r:V.value.dataLabels.rounding}),{datapoint:t,seriesIndex:r,datapointIndex:i})}function Co(e,t,r,i){return oe(V.value.dataLabels.formatter,e,n({v:isNaN(e)?0:e,s:`%`,r:V.value.dataLabels.rounding}),{datapoint:t,seriesIndex:r,datapointIndex:i})}function wo({seriesIndex:e,datapoint:t}){let n=Y.value.start+e;N(`selectX`,{dataset:t,index:n,indexLabel:z.value.values[n]})}async function To(){N(`copyAlt`,{config:L.value,dataset:X.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Eo=D(!1);function Do(){Xn.value=null,Eo.value=!0}function Oo(){Da(),Xn.value=null,Qn.value=`pointer`,wn.value=!1,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null}),Eo.value=!1}function ko(e){if(!W.value||I.value||document.activeElement!==W.value||(Da(),ji.value)||!Q.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(ii.value&&(_a.value||Ur.value)){ba(),Oi({force:!0,publish:!0});return}Xn.value=null,Qn.value=`pointer`,wn.value=!1,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null});return}if(r){if(Xn.value===null)return;La(Xn.value);return}let a=Xn.value,o=ma.value,s=a!==null&&a>=0&&a<Q.value,c=o!==null&&o>=0&&o<Q.value;s?n?(a+=1,a>=Q.value&&(a=0)):t&&(--a,a<0&&(a=Q.value-1)):c?(a=n?o+1:o-1,a>=Q.value&&(a=0),a<0&&(a=Q.value-1)):a=n?0:Q.value-1,Xn.value=a,Ao(a),Ha(!0,a,`keyboard`)}function Ao(e){if(!Number.isFinite(e)||!W.value)return;let t=K.value.left+e*Ma.value,n=K.value.top+K.value.height/2,r=fe(t,n,W.value);r&&(Zn.value=r)}let jo=b(()=>({headers:$a.value?.colNames??[],rows:$a.value?.body??[]}));Se({getData:ho,getImage:so,generatePdf:Sr,generateCsv:Qa,generateImage:Cr,generateSvg:ao,hideSeries:Xa,showSeries:Ya,toggleTable:fo,toggleLabels:po,toggleTooltip:mo,toggleAnnotator:ir,toggleFullscreen:uo,copyAlt:To,resetZoom:()=>Oi({force:!0,publish:!0}),setZoomState:wi});let Mo=b(()=>{let e=Kr.value.match(/matrix\(([^)]+)\)/)[1].split(`,`).map(Number);return Ze({enabled:R.value?.annotator?.followZoom,area:K.value,range:Y.value,ticks:V.value.distributed?[]:Bi.value,middle:!1,motion:{scaleX:I.value?1:e[0],scaleY:I.value?1:e[3],translateX:I.value?0:e[4],translateY:I.value?0:e[5],transition:!I.value&&qr.value?`transform ${ln}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`}})});return(t,r)=>(E(),C(`div`,{id:`stackline_${P.value}`,ref_key:`stacklineChart`,ref:Cn,class:T({"vue-data-ui-component":!0,"vue-ui-stackline":!0,"vue-data-ui-wrapper-fullscreen":jn.value}),style:lt(`background:${U.value.backgroundColor};color:${U.value.color};font-family:${L.value.style.fontFamily}; position: relative; ${L.value.responsive?`height: 100%`:``}`),onMouseenter:mr,onMouseleave:hr},[w(`div`,{id:`chart-instructions-${P.value}`,class:`sr-only`},[w(`p`,null,mt(L.value.a11y.translations.keyboardNavigation),1)],8,xt),jo.value?.rows?.length?(E(),x(Je,{key:0,uid:P.value,head:jo.value.headers,body:jo.value.rows,notice:L.value.a11y.translations.tableAvailable,caption:L.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):S(``,!0),R.value.buttons.annotator?(E(),x(A(mn),{key:1,showGroupActions:R.value.annotator?.showGroupActions??!0,svgRef:A(W),followZoom:R.value?.annotator?.followZoom,annotationViewport:Mo.value,backgroundColor:U.value.backgroundColor,color:U.value.color,active:I.value,isCursorPointer:or.value,palette:R.value.annotatorPalette,onClose:ir},tt({_:2},[O(A(je),e=>({name:e,fn:j(n=>[k(t.$slots,e,ct(at(A(Ae)(e,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):S(``,!0),k(t.$slots,`userConfig`,{},void 0,!0),wr.value?(E(),C(`div`,{key:2,ref_key:`noTitle`,ref:kn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):S(``,!0),U.value.title.text?(E(),C(`div`,{key:3,ref_key:`chartTitle`,ref:En,style:`width:100%;background:transparent;`},[(E(),x(Ee,{key:`title_${Pn.value}`,config:{title:{cy:`stackline-title`,...U.value.title},subtitle:{cy:`stackline-subtitle`,...U.value.title.subtitle}}},null,8,[`config`]))],512)):S(``,!0),w(`div`,{id:`legend-top-${P.value}`},null,8,St),R.value.show&&Sn.value&&(A(pr)||A(dr))?(E(),x(A(hn),{ref_key:`userOptionsRef`,ref:zn,key:`user_option_${Tn.value}`,backgroundColor:U.value.backgroundColor,color:U.value.color,isPrinting:A(br),isImaging:A(xr),uid:P.value,hasTooltip:H.value.show&&R.value.buttons.tooltip,hasPdf:R.value.buttons.pdf,hasImg:R.value.buttons.img,hasSvg:R.value.buttons.svg,hasXls:R.value.buttons.csv,hasTable:R.value.buttons.table,hasLabel:R.value.buttons.labels,hasFullscreen:R.value.buttons.fullscreen,hasAltCopy:R.value.buttons.altCopy,isFullscreen:jn.value,chartElement:Cn.value,position:R.value.position,isTooltip:G.value.showTooltip,titles:{...R.value.buttonTitles},hasAnnotator:R.value.buttons.annotator,isAnnotation:I.value,callbacks:R.value.callbacks,printScale:R.value.print.scale,tableDialog:L.value.table.useDialog,isCursorPointer:or.value,onToggleFullscreen:uo,onGeneratePdf:A(Sr),onGenerateCsv:Qa,onGenerateImage:A(oo),onGenerateSvg:A(ao),onToggleTable:fo,onToggleLabels:po,onToggleTooltip:mo,onToggleAnnotator:ir,onCopyAlt:To,style:lt({visibility:A(pr)?A(dr)?`visible`:`hidden`:`visible`})},tt({_:2},[O(A(Me)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:j(n=>[k(t.$slots,e,ct(at(A(Ne)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):S(``,!0),w(`div`,Ct,[(E(),C(`svg`,{ref_key:`svgRef`,ref:W,"aria-describedby":`chart-instructions-${P.value}`,xmlns:A(de),viewBox:`0 0 ${K.value.chartWidth<=0?10:K.value.chartWidth} ${K.value.chartHeight<=0?10:K.value.chartHeight}`,class:T({"vue-data-ui-loading":A(cr),"vue-data-ui-fullscreen--on":jn.value,"vue-data-ui-fulscreen--off":!jn.value,"vue-data-ui-no-transition":!A(ar)||A(Fr),"vue-ui-stackline-chart-zoom-pointer-focus":ii.value&&Wr.value}),style:lt({maxWidth:`100%`,visibility:A(Pr)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:U.value.color,cursor:ii.value?Ur.value?`col-resize`:`crosshair`:void 0,touchAction:ii.value?`pan-y`:void 0,userSelect:ii.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:Do,onBlur:Oo,onKeydown:ko},[rt(A(gn)),k(t.$slots,`svg-underlayer`,{svg:{drawingArea:K.value,data:X.value,isPrintingImg:A(br)||A(xr)||A(ro),isPrintingSvg:A(io)}},void 0,!0),w(`defs`,null,[w(`clipPath`,{id:`vue_ui_stackline_zoom_clip_${P.value}`},[w(`rect`,{x:K.value.left,y:K.value.top,width:Math.max(0,K.value.width),height:Math.max(0,K.value.height)},null,8,Et)],8,Tt)]),(E(!0),C(y,null,O(zr.value,e=>(E(),C(y,null,[t.$slots.pattern?(E(),C(`defs`,Dt,[k(t.$slots,`pattern`,ot({ref_for:!0},{seriesIndex:e.absoluteIndex,patternId:`pattern_${P.value}_${e.absoluteIndex}`}),void 0,!0)])):S(``,!0)],64))),256)),t.$slots[`chart-background`]?(E(),C(`foreignObject`,{key:0,x:Z.value.left,y:K.value.top,width:Z.value.width,height:K.value.height,style:{pointerEvents:`none`}},[k(t.$slots,`chart-background`,{},void 0,!0)],8,Ot)):S(``,!0),V.value.gradient.show?(E(),C(`defs`,kt,[(E(!0),C(y,null,O(X.value,(e,t)=>(E(),x(Ge,{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%`,A(o)(e.color,V.value.gradient.intensity/100),1]]},null,8,[`id`,`stops`]))),128))])):S(``,!0),B.value.x.showHorizontalLines?(E(!0),C(y,{key:2},O(Bi.value,(e,t)=>(E(),C(`line`,{x1:Z.value.left,x2:Z.value.right,y1:e.y,y2:e.y,stroke:B.value.x.linesColor,"stroke-width":B.value.x.linesThickness,"stroke-dasharray":B.value.x.linesStrokeDasharray,"stroke-linecap":`round`},null,8,At))),256)):S(``,!0),B.value.y.showVerticalLines?(E(!0),C(y,{key:3},O(Y.value.end-Y.value.start,(e,t)=>(E(),C(`line`,{x1:Na(t),x2:Na(t),y1:K.value.top,y2:K.value.bottom,stroke:B.value.y.linesColor,"stroke-width":B.value.y.linesThickness,"stroke-dasharray":B.value.y.linesStrokeDasharray,"stroke-linecap":`round`},null,8,jt))),256)):S(``,!0),B.value.x.showAxis?(E(),C(`line`,{key:4,x1:Z.value.left,x2:Z.value.right,y1:K.value.bottom,y2:K.value.bottom,stroke:B.value.x.axisColor,"stroke-width":B.value.x.axisThickness,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,Mt)):S(``,!0),B.value.y.showAxis&&!V.value.distributed?(E(),C(`line`,{key:5,x1:Mr.value?Z.value.right:Z.value.left,x2:Mr.value?Z.value.right:Z.value.left,y1:K.value.top,y2:K.value.bottom,stroke:B.value.y.axisColor,"stroke-width":B.value.y.axisThickness,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,Nt)):S(``,!0),B.value.x.axisName.show&&B.value.x.axisName.text?(E(),C(`text`,{key:6,ref_key:`xAxisLabel`,ref:Vn,x:K.value.left+K.value.width/2,y:K.value.chartHeight-3,"font-size":B.value.x.axisName.fontSize,fill:B.value.x.axisName.color,"font-weight":B.value.x.axisName.bold?`bold`:`normal`,"text-anchor":`middle`},mt(B.value.x.axisName.text),9,Pt)):S(``,!0),B.value.y.axisName.show&&B.value.y.axisName.text?(E(),C(`text`,{key:7,ref_key:`yAxisLabel`,ref:Hn,transform:`translate(${Mr.value?K.value.chartWidth-B.value.y.axisName.fontSize/2-B.value.y.axisName.offsetX:B.value.y.axisName.fontSize+B.value.y.axisName.offsetX}, ${K.value.top+K.value.height/2}) rotate(-90)`,"font-size":B.value.y.axisName.fontSize,fill:B.value.y.axisName.color,"font-weight":B.value.y.axisName.bold?`bold`:`normal`,"text-anchor":`middle`},mt(B.value.y.axisName.text),9,Ft)):S(``,!0),B.value.frame.show?(E(),C(`rect`,{key:8,style:{pointerEvents:`none`,transition:`none`,animation:`none !important`},x:Z.value.left,y:K.value.top,width:Z.value.width,height:K.value.height,fill:`transparent`,stroke:B.value.frame.stroke,"stroke-width":B.value.frame.strokeWidth,"stroke-linecap":B.value.frame.strokeLinecap,"stroke-linejoin":B.value.frame.strokeLinejoin,"stroke-dasharray":B.value.frame.strokeDasharray},null,8,It)):S(``,!0),w(`g`,{"clip-path":Si.value},[w(`g`,{class:T([`vue-ui-stackline-zoom-geometry`,{"vue-ui-stackline-zoom-geometry--transitioning":Gr.value}]),style:lt(xi.value)},[(E(!0),C(y,null,O(X.value,e=>(E(),C(y,null,[V.value.useArea&&!e.standalone?(E(),C(`path`,{key:0,d:V.value.smooth?e.smoothArea:e.straightArea,fill:t.$slots.pattern?`url(#pattern_${P.value}_${e.absoluteIndex})`:V.value.gradient.show?`url(#gradient_${e.id})`:e.color,opacity:V.value.areaOpacity,class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)})},null,10,Rt)):S(``,!0)],64))),256)),(E(!0),C(y,null,O(X.value,e=>(E(),C(`path`,{d:V.value.smooth?e.smoothPath:e.straightPath,stroke:V.value.path.useSerieColor?e.color:V.value.path.stroke,"stroke-width":V.value.strokeWidth,fill:`none`,"stroke-linecap":`round`,class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)})},null,10,zt))),256))],6)],8,Lt),B.value.y.axisLabels.show&&!V.value.distributed?(E(),C(`g`,{key:9,ref_key:`scaleLabels`,ref:Un},[(E(!0),C(y,null,O(Bi.value,(e,t)=>(E(),C(`line`,{key:`ytick_${t}`,class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)}),x1:Mr.value?Z.value.right:Z.value.left,x2:Mr.value?Z.value.right+6:Z.value.left-6,y1:e.y,y2:e.y,stroke:B.value.x.axisColor,"stroke-width":1},null,10,Bt))),128)),(E(!0),C(y,null,O(Bi.value,(e,t)=>(E(),C(`text`,{class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)}),transform:`translate(${e.x}, ${e.y+B.value.y.axisLabels.fontSize/3})`,"font-size":B.value.y.axisLabels.fontSize,"font-weight":B.value.y.axisLabels.bold?`bold`:`normal`,fill:B.value.y.axisLabels.color,"text-anchor":Mr.value?`start`:`end`},mt(A(oe)(B.value.y.axisLabels.formatter,e.value,A(n)({p:V.value.dataLabels.prefix,v:e.value,s:V.value.dataLabels.suffix,r:B.value.y.axisLabels.rounding}),{datapoint:e})),11,Vt))),256))],512)):S(``,!0),z.value.show?(E(),C(`g`,{key:10,ref_key:`timeLabelsEls`,ref:Wn},[t.$slots[`time-label`]?(E(),C(`g`,Ht,[(E(!0),C(y,null,O(Ji.value,(e,n)=>(E(),C(`g`,null,[k(t.$slots,`time-label`,ot({ref_for:!0},{x:K.value.left+ki.value*n+ki.value/2,y:K.value.bottom+B.value.x.timeLabels.fontSize*1.3+B.value.x.timeLabels.offsetY,fontSize:B.value.x.timeLabels.fontSize,fill:B.value.x.timeLabels.color,transform:`translate(${K.value.left+ki.value*n+ki.value/2}, ${K.value.bottom+z.value.fontSize*1.3+z.value.offsetY}), rotate(${z.value.rotation})`,absoluteIndex:e.absoluteIndex,content:e.text,textAnchor:B.value.x.timeLabels.rotation>0?`start`:B.value.x.timeLabels.rotation<0?`end`:`middle`,show:!0}),void 0,!0)]))),256))])):(E(),C(`g`,Ut,[(E(!0),C(y,null,O(Ji.value,(e,t)=>(E(),C(`g`,null,[String(e.text).includes(`
33
- `)?(E(),C(`text`,{key:t+`-multi`,"text-anchor":B.value.x.timeLabels.rotation>0?`start`:B.value.x.timeLabels.rotation<0?`end`:`middle`,"font-size":B.value.x.timeLabels.fontSize,fill:B.value.x.timeLabels.color,transform:`
34
- translate(
35
- ${Na(t)},
36
- ${K.value.bottom+z.value.fontSize*1.3+z.value.offsetY}
37
- ),
38
- rotate(${z.value.rotation})
39
- `,style:lt({cursor:or.value?`pointer`:`default`}),innerHTML:A(c)({content:String(e.text),fontSize:B.value.x.timeLabels.fontSize,fill:B.value.x.timeLabels.color,stroke:U.value.backgroundColor,x:0,y:0}),onClick:()=>Ua(e,t)},null,12,Gt)):(E(),C(`text`,{class:`vue-data-ui-time-label`,key:t,"text-anchor":B.value.x.timeLabels.rotation>0?`start`:B.value.x.timeLabels.rotation<0?`end`:`middle`,"font-size":B.value.x.timeLabels.fontSize,"font-weight":B.value.x.timeLabels.bold?`bold`:`normal`,fill:B.value.x.timeLabels.color,stroke:U.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,transform:`translate(${Na(t)}, ${K.value.bottom+z.value.fontSize*1.3+z.value.offsetY}), rotate(${z.value.rotation})`,style:lt({cursor:or.value?`pointer`:`default`}),onClick:()=>Ua(e,t)},mt(e.text),13,Wt))]))),256))]))],512)):S(``,!0),(Bn.value||![null,void 0].includes($.value))&&!U.value.highlighter.useLine?(E(!0),C(y,{key:11},O(Y.value.end-Y.value.start,(e,t)=>(E(),C(`g`,{key:`tooltip_trap_highlighter_${t}`},[w(`rect`,{x:Pa(t).x,y:K.value.top,height:K.value.height,width:Pa(t).width,fill:[rr.value,$.value].includes(t)?A(l)(U.value.highlighter.color,U.value.highlighter.opacity):`transparent`,style:{transition:`none !important`,animation:`none !important`}},null,8,Kt)]))),128)):S(``,!0),(Bn.value||![null,void 0].includes($.value))&&U.value.highlighter.useLine?(E(),C(y,{key:12},[![null,void 0].includes($.value)||![null,void 0].includes(rr.value)?(E(),C(`g`,qt,[w(`line`,{x1:Na(($.value??rr.value)||0),x2:Na(($.value??rr.value)||0),y1:A(re)(K.value.top),y2:A(re)(K.value.bottom),stroke:U.value.highlighter.color,"stroke-width":U.value.highlighter.lineWidth,"stroke-dasharray":U.value.highlighter.lineDasharray,"stroke-linecap":`round`,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},null,8,Jt)])):S(``,!0)],64)):S(``,!0),w(`g`,{"clip-path":Si.value},[w(`g`,{class:T([`vue-ui-stackline-zoom-geometry`,{"vue-ui-stackline-zoom-geometry--transitioning":Gr.value}]),style:lt(xi.value)},[(E(!0),C(y,null,O(X.value,e=>(E(),C(y,{key:`shp_sel_${e.id}`},[Bn.value&&Y.value.end-Y.value.start>V.value.dot.hideAboveMaxSerieLength?(E(),C(`g`,Xt,[$.value==null?S(``,!0):(E(),C(y,{key:0},[e.rel.includes($.value)&&e.fullSeries?.[Y.value.start+$.value]!=null&&!Number.isNaN(e.fullSeries?.[Y.value.start+$.value])?(E(),x(He,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:V.value.dot.useSerieColor?e.color:V.value.dot.fill,plot:{x:A(te)(e.points[e.rel.indexOf($.value)].x),y:A(te)(e.points[e.rel.indexOf($.value)].y)},radius:V.value.dot.radius*1.3,stroke:V.value.dot.useSerieColor?V.value.dot.stroke:e.color,strokeWidth:V.value.dot.strokeWidth,still:A(cr),class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)})},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`still`,`class`])):S(``,!0)],64))])):S(``,!0)],64))),128)),(E(!0),C(y,null,O(X.value,e=>(E(),C(y,{key:`shp_${e.id}`},[Y.value.end-Y.value.start<V.value.dot.hideAboveMaxSerieLength?(E(!0),C(y,{key:0},O(e.points,(t,n)=>(E(),C(`g`,{key:`shp_${e.id}_${Y.value.start+n}`},[e.fullSeries?.[Y.value.start+e.rel[n]]!=null&&!Number.isNaN(e.fullSeries?.[Y.value.start+e.rel[n]])?(E(),x(He,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:V.value.dot.useSerieColor?e.color:V.value.dot.fill,plot:{x:t.x,y:t.y},radius:Bn.value&&$.value===e.rel[n]?V.value.dot.radius*1.3:V.value.dot.radius,stroke:V.value.dot.useSerieColor?V.value.dot.stroke:e.color,strokeWidth:V.value.dot.strokeWidth,still:A(cr),class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)})},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`still`,`class`])):S(``,!0)]))),128)):S(``,!0)],64))),128))],6)],8,Yt),G.value.dataLabels.show&&V.value.dataLabels.hideAboveMaxSerieLength>Y.value.end-Y.value.start?(E(),C(y,{key:13},[(E(!0),C(y,null,O(X.value,(e,t)=>(E(),C(`g`,{key:`dl_${e.id}`},[(E(!0),C(y,null,O(e.points,(n,r)=>(E(),C(y,{key:`dp_${e.id}_${Y.value.start+r}`},[bo(e.series[r],e.proportions[r])?(E(),C(`text`,{key:0,class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)}),transform:`translate(${n.x}, ${n.y+(e.series[r]>=0?-V.value.dataLabels.fontSize/2+V.value.dataLabels.offsetY:V.value.dataLabels.fontSize*1.2-V.value.dataLabels.offsetY)})`,"font-size":V.value.dataLabels.fontSize,fill:V.value.dataLabels.color,"font-weight":V.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`middle`},mt(V.value.showDistributedPercentage&&V.value.distributed?Co(e.proportions[r]*100,e,t,e.rel[r]):So(e.series[r],e,t,e.rel[r],e.signedSeries[r])),11,Zt)):S(``,!0)],64))),128))]))),128)),V.value.totalValues.show&&X.value.length>1?(E(),C(`g`,{key:0,ref_key:`sumTop`,ref:Gn},[(E(!0),C(y,null,O(Li.value,(e,t)=>(E(),C(y,{key:`total_l_${t+Y.value.start}`},[!V.value.dataLabels.hideEmptyValues||e.value!==0?(E(),C(`text`,{key:0,class:T({"vue-data-ui-transition":A(ar)&&!A(Fr)}),transform:`translate(${Na(t)}, ${zi(t)})`,"text-anchor":`middle`,"font-size":V.value.totalValues.fontSize,"font-weight":V.value.totalValues.bold?`bold`:`normal`,fill:V.value.totalValues.color},mt(So(e.value,e,t,t,e.sign)),11,Qt)):S(``,!0)],64))),128))],512)):S(``,!0)],64)):S(``,!0),ga.value?(E(),C(`rect`,{key:14,x:ga.value.x,y:ga.value.y,width:ga.value.width,height:ga.value.height,fill:ri.value.selection.fill,"fill-opacity":ri.value.selection.fillOpacity,stroke:ri.value.selection.stroke,"stroke-opacity":ri.value.selection.strokeOpacity,"stroke-width":ri.value.selection.strokeWidth,"stroke-dasharray":ri.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,$t)):S(``,!0),ci.value?(E(),C(`rect`,ot({key:15},Rr.value,{"data-start":Y.value.start,"data-end":Y.value.end}),null,16,en)):S(``,!0),k(t.$slots,`svg`,{svg:{drawingArea:K.value,data:X.value,isPrintingImg:A(br)||A(xr)||A(ro),isPrintingSvg:A(io)}},void 0,!0)],46,wt)),t.$slots.hint?(E(),C(`div`,tn,[k(t.$slots,`hint`,ct(at({hint:L.value.a11y.translations.keyboardNavigation,isVisible:Eo.value})),void 0,!0)])):S(``,!0)]),t.$slots.watermark?(E(),C(`div`,nn,[k(t.$slots,`watermark`,ct(at({isPrinting:A(br)||A(xr)||A(ro)||A(io)})),void 0,!0)])):S(``,!0),Ln.value&&(U.value.legend.show||t.$slots.legend)?(E(),x(et,{key:6,to:U.value.legend.position===`top`?`#legend-top-${P.value}`:`#legend-bottom-${P.value}`},[w(`div`,{ref_key:`chartLegend`,ref:Dn},[k(t.$slots,`legend`,{legend:Ka.value},()=>[U.value.legend.show?(E(),x(Qe,{key:0,legendSet:Ka.value,config:qa.value,isCursorPointer:or.value,onClickMarker:r[0]||=({legend:e})=>e.segregate()},tt({item:j(({legend:e})=>[A(cr)?S(``,!0):(E(),C(`div`,{key:0,onClick:t=>e.segregate(),style:lt(`opacity:${F.value.includes(e.id)?.5:1}`)},mt(e.name),13,rn))]),legendToggle:j(()=>[Ka.value.length>2&&U.value.legend.selectAllToggle.show&&!A(cr)?(E(),x(qe,{key:0,backgroundColor:U.value.legend.selectAllToggle.backgroundColor,color:U.value.legend.selectAllToggle.color,fontSize:U.value.legend.fontSize,checked:F.value.length>0,isCursorPointer:or.value,onToggle:Wa},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):S(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:j(({legend:e,index:t})=>[rt(He,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${P.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):S(``,!0)],!0)],512)],8,[`to`])):S(``,!0),Sn.value&&R.value.buttons.table?(E(),x(ft(co.value.component),ot({key:7},co.value.props,{ref_key:`tableUnit`,ref:Rn,onClose:lo}),tt({content:j(()=>[rt(A(pn),{colNames:$a.value.colNames,head:$a.value.head,body:$a.value.body,config:$a.value.config,title:L.value.table.useDialog?``:co.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:or.value,onClose:lo},{th:j(({th:e})=>[e===`__SUM__`?(E(),C(`div`,an,[rt(A(dn),{name:`sigma`,stroke:$a.value.config.th.color,size:16},null,8,[`stroke`])])):(E(),C(`div`,on,mt(e),1))]),td:j(({td:e})=>[nt(mt(isNaN(Number(e))?e:A(n)({p:V.value.dataLabels.prefix,v:e,s:V.value.dataLabels.suffix,r:L.value.table.td.roundingValue})),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[L.value.table.useDialog?{name:`title`,fn:j(()=>[nt(mt(co.value.title),1)]),key:`0`}:void 0,L.value.table.useDialog?{name:`actions`,fn:j(()=>[w(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:r[1]||=e=>Qa(R.value.callbacks.csv),style:lt({cursor:or.value?`pointer`:`default`})},[rt(A(dn),{name:`fileCsv`,stroke:co.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):S(``,!0),U.value.zoom.show&&Sn.value&&ia.value&&J.value>6?(E(),x(Ke,{key:8,ref_key:`chartSlicer`,ref:On,"data-dom-to-png-ignore-layout":``,allMinimaps:Ni.value,background:U.value.zoom.color,borderColor:U.value.backgroundColor,customFormat:U.value.zoom.customFormat,cutNullValues:!1,enableRangeHandles:U.value.zoom.enableRangeHandles,enableSelectionDrag:U.value.zoom.enableSelectionDrag,end:Y.value.end,focusOnDrag:U.value.zoom.focusOnDrag,focusRangeRatio:U.value.zoom.focusRangeRatio,fontSize:U.value.zoom.fontSize,immediate:!U.value.zoom.preview.enable,inputColor:U.value.zoom.color,isPreview:ci.value,labelLeft:z.value.values[Y.value.start]?Vi.value?.[0]?.text??``:``,labelRight:z.value.values[Y.value.end-1]?Vi.value?.at(-1)?.text??``:``,max:Math.max(...e.dataset.map(e=>e.series.length)),min:0,minimap:Mi.value,minimapCompact:U.value.zoom.minimap.compact,minimapFrameColor:U.value.zoom.minimap.frameColor,minimapIndicatorColor:U.value.zoom.minimap.indicatorColor,minimapMerged:!1,minimapSelectedColor:U.value.zoom.minimap.selectedColor,minimapSelectedColorOpacity:U.value.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:$.value,minimapSelectionRadius:1,preciseLabels:$i.value.length?$i.value:Ui.value,refreshEndPoint:U.value.zoom.endIndex===null?Math.max(...e.dataset.map(e=>e.series.length)):U.value.zoom.endIndex+1,refreshStartPoint:U.value.zoom.startIndex===null?0:U.value.zoom.startIndex,selectColor:U.value.zoom.highlightColor,selectedSeries:_o.value,smoothMinimap:!1,start:Y.value.start,textColor:U.value.color,timeLabels:Ui.value,usePreciseLabels:z.value.datetimeFormatter.enable&&!U.value.zoom.useDefaultFormat,valueEnd:Y.value.end,valueStart:Y.value.start,verticalHandles:U.value.zoom.minimap.verticalHandles,maxWidth:U.value.zoom.maxWidth,minimapLeftInsetRatio:K.value.chartWidth>0&&U.value.zoom.autoFit?K.value.left/K.value.chartWidth:null,minimapRightInsetRatio:K.value.chartWidth>0&&U.value.zoom.autoFit?(K.value.chartWidth-K.value.right)/K.value.chartWidth:null,isCursorPointer:or.value,additionalMinimapHeight:U.value.zoom.minimap.additionalHeight,handleType:U.value.zoom.minimap.handleType,handleIconColor:U.value.zoom.minimap.handleIconColor,handleBorderWidth:U.value.zoom.minimap.handleBorderWidth,handleBorderColor:U.value.zoom.minimap.handleBorderColor,handleFill:U.value.zoom.minimap.handleFill,handleWidth:U.value.zoom.minimap.handleWidth,"onUpdate:end":la,"onUpdate:start":ca,onTrapMouse:Vr,onReset:r[2]||=()=>Oi({force:!0,publish:!0}),onFutureEnd:r[3]||=e=>li(`end`,e),onFutureStart:r[4]||=e=>li(`start`,e)},{"reset-action":j(({reset:e})=>[k(t.$slots,`reset-action`,ct(at({reset:e})),void 0,!0)]),slotMap:j(({width:e,height:t,unitW:n})=>[w(`g`,{innerHTML:yo({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`.split(`.`))):S(``,!0),w(`div`,{id:`legend-bottom-${P.value}`},null,8,cn),rt(A(un),{teleportTo:H.value.teleportTo,show:G.value.showTooltip&&wn.value,backgroundColor:H.value.backgroundColor,color:H.value.color,fontSize:H.value.fontSize,borderRadius:H.value.borderRadius,borderColor:H.value.borderColor,borderWidth:H.value.borderWidth,backgroundOpacity:H.value.backgroundOpacity,position:H.value.position,offsetX:H.value.offsetX,offsetY:H.value.offsetY,parent:Cn.value,content:Va.value,isFullscreen:jn.value,isCustom:H.value.customFormat&&typeof H.value.customFormat==`function`,smooth:H.value.smooth,backdropFilter:H.value.backdropFilter,smoothForce:H.value.smoothForce,smoothSnapThreshold:H.value.smoothSnapThreshold,isA11yMode:Qn.value===`keyboard`,a11yPosition:Zn.value},{"tooltip-before":j(()=>[k(t.$slots,`tooltip-before`,ct(at({...na.value})),void 0,!0)]),tooltip:j(()=>[k(t.$slots,`tooltip`,ct(at({...na.value})),void 0,!0)]),"tooltip-after":j(()=>[k(t.$slots,`tooltip-after`,ct(at({...na.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?(E(),C(`div`,{key:9,ref_key:`source`,ref:An,dir:`auto`},[k(t.$slots,`source`,{},void 0,!0)],512)):S(``,!0),k(t.$slots,`skeleton`,{},()=>[A(cr)?(E(),x(ye,{key:0})):S(``,!0)],!0)],46,bt))}},[[`__scopeId`,`data-v-d7913ade`]]);export{yt as n,un as t};
@@ -1,2 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Dt as i,Ft as a,Ht as o,J as s,Q as c,S as ee,X as te,Zt as ne,_ as re,at as ie,b as ae,i as oe,in as se,nt as ce,pt as le,rn as ue,sn as de,t as fe,v as pe,w as me,x as he,yt as ge,zt as _e}from"./lib-rPeBMZrn.js";import{n as ve,t as ye}from"./BaseScanner-8NdoBs7B.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as Ce}from"./resolveChartConfig-CIhClE5R.js";import{t as we}from"./chartImage-DPGnEuYM.js";import{n as Te}from"./Title-BliHuXfT.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{n as De,t as Oe}from"./tableIntegration-CNoJ1CIY.js";import{n as ke,t as Ae}from"./annotationSlots-RvQBEO9-.js";import{n as je,t as Me}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ne}from"./usePrinter-DVf3YcG5.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useSvgLabelLayout-42Kats14.js";import{t as Ie}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Le}from"./Shape-CRe8woTu.js";import{t as Re}from"./useResponsive-CENUxfEL.js";import{t as ze}from"./DefGrad-DKMq1REY.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./useUserOptionState-CXlFnwPv.js";import{t as He}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ue}from"./vue_ui_strip_plot-CwMowrhT.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as qe,nextTick as Je,normalizeClass as Ye,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Xe,onMounted as Ze,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Qe,shallowRef as $e,toDisplayString as C,toRefs as et,unref as w,watch as tt,withCtx as T}from"vue";var nt=/* @__PURE__ */ e({default:()=>Pt}),rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`viewBox`,`aria-describedby`],st=[`x`,`y`,`width`,`height`],ct={key:1},lt={key:0},ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],dt={key:1},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ht=[`transform`,`fill`,`font-size`],gt=[`transform`,`font-size`,`fill`,`text-anchor`],_t=[`transform`,`font-size`,`fill`,`text-anchor`,`innerHTML`],vt=[`fill`,`font-size`,`transform`],yt=[`fill`,`font-size`,`x`,`y`],bt=[`x1`,`x2`,`y1`,`y2`,`stroke`],xt=[`cx`,`cy`,`fill`],St=[`cx`,`cy`,`fill`],Ct=[`d`,`fill`,`stroke`,`fill-opacity`,`stroke-opacity`,`stroke-width`,`onMouseenter`],wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-opacity`,`stroke-width`],Tt=[`onMouseenter`],Et=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Dt=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],Ot=[`cx`,`cy`,`r`,`fill`,`stroke`],kt={key:1},At=[`x`,`y`,`font-size`,`fill`],jt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Mt={key:5,class:`vue-data-ui-watermark`},Nt={style:{display:`flex`,"align-items":`center`}},Pt=/*#__PURE__*/ Se({__name:`vue-ui-strip-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:Se,emit:nt}){let Pt=h(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ft=h(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),It=h(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),Lt=h(()=>import(`./DataTable-5Ug6gMAX.js`)),Rt=h(()=>import(`./UserOptions-BUXg7qOC.js`).then(e=>e.n)),zt=h(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),Bt=h(()=>import(`./PackageVersion-CHQWwTik.js`).then(e=>e.t)),Vt=h(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),Ht=[`classic`,`scatter`,`violin`],{vue_ui_strip_plot:Ut}=t(),E=e,Wt=nt,Gt=u({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),Kt=b(te()),qt=b(0),Jt=b(!1),Yt=b(``),D=b(null),Xt=b(null),Zt=b(null),Qt=b(null),$t=b(!1),en=b(0),tn=b(0),nn=b(null),rn=b(null),an=b(null),on=b(null),sn=b(null),cn=b(null),O=b(null),ln=b(null),k=b(`pointer`),un=b({x:0,y:0}),dn=b(!1),A=b(xn()),j=u(()=>A.value.userOptions),M=u(()=>A.value.style.chart.tooltip),N=u(()=>A.value.style.chart.labels),P=u(()=>A.value.style.chart.violin),F=u(()=>A.value.style.chart.grid),I=u(()=>A.value.style.chart);be({config:()=>A.value,dataset:()=>E.dataset,component:`VueUiStripPlot`,rules:[xe.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:fn}=Pe({config:()=>A.value.transitions,dataset:()=>E.dataset}),pn=u(()=>Sn(A.value.type)),L=u(()=>A.value.userOptions.useCursorPointer),mn=u(()=>se({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:A.value.skeletonConfig??{}})),{loading:hn,FINAL_DATASET:gn,manualLoading:_n}=ve({...et(E),FINAL_CONFIG:A,prepareConfig:xn,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:se({defaultConfig:A.value,userConfig:mn.value})}),{userOptionsVisible:vn,setUserOptionsVisibility:yn,keepUserOptionState:bn}=Ve({config:A.value}),{svgRef:R}=He({config:I.value.title});function xn(){return Ce(E.config,Ut,Ue)}function Sn(e){return Ht.includes(e)?e:`classic`}let Cn=ne(E.config);tt(()=>E.config,async(e,t)=>{let n=ne(e),r=n!==Cn;Cn=n;let i=xn();r?(hn.value||(A.value=i),vn.value=!A.value.userOptions.showOnChartHover,On(),en.value+=1,tn.value+=1,H.value.dataLabels.show=N.value.bestPlotLabel.show,H.value.showTable=A.value.table.show,H.value.showTooltip=M.value.show,A.value.responsive||(B.value=I.value.width,V.value=I.value.height,Rn.value=I.value.plots.radius)):(A.value.style.chart.tooltip=i.style.chart.tooltip,H.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0}),tt(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(_n.value=!1)},{deep:!0});let z=$e(null),wn=$e(null),Tn=b(!1),En=0;Ze(()=>{On()});let Dn=u(()=>A.value.debug);function On(){_e(E.dataset)?(ie({componentName:`VueUiStripPlot`,type:`dataset`,debug:Dn.value}),_n.value=!0):E.dataset.forEach((e,t)=>{ge({datasetObject:e,requiredAttributes:[`name`,`plots`]}).forEach(e=>{Gt.value=!1,ie({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:Dn.value})}),e.plots&&e.plots.forEach((e,n)=>{ge({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{Gt.value=!1,ie({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:`${t},${n}`,debug:Dn.value})})})}),_e(E.dataset)||(_n.value=A.value.loading),A.value.responsive&&(z.value&&(wn.value&&z.value.unobserve(wn.value),z.value.disconnect()),z.value=new ResizeObserver(()=>{let{width:e,height:t}=Re({chart:D.value,title:I.value.title.text?Xt.value:null,source:Zt.value,noTitle:Qt.value});cancelAnimationFrame(En),En=requestAnimationFrame(()=>{Ln.value=t,B.value=Math.max(.1,e),V.value=Math.max(.1,t-12),Tn.value=!0,A.value.responsiveProportionalSizing?Rn.value=ue({relator:Math.min(t,e),adjuster:600,source:I.value.plots.radius,threshold:6,fallback:6}):Rn.value=I.value.plots.radius})}),wn.value=D.value.parentNode,z.value.observe(wn.value)),$t.value=!0,setTimeout(()=>{Fn.value=!1},Jn.value*50)}Xe(()=>{cancelAnimationFrame(En),z.value&&(wn.value&&z.value.unobserve(wn.value),z.value.disconnect())});let{isPrinting:kn,isImaging:An,generatePdf:jn,generateImage:Mn}=Ne({elementId:`strip-plot_${Kt.value}`,fileName:I.value.title.text||`vue-ui-strip-plot`,options:A.value.userOptions.print}),Nn=u(()=>A.value.userOptions.show&&!I.value.title.text),Pn=u(()=>me(A.value.customPalette)),Fn=b(A.value.useCssAnimation),In=b({top:I.value.padding.top,bottom:I.value.padding.bottom,left:I.value.padding.left,right:I.value.padding.right}),B=b(I.value.width),V=b(I.value.height),Ln=b(I.value.height),Rn=b(I.value.plots.radius),H=b({showTable:A.value.table.show,dataLabels:{show:N.value.bestPlotLabel.show},showTooltip:M.value.show});tt(A,()=>{H.value={showTable:A.value.table.show,dataLabels:{show:N.value.bestPlotLabel.show},showTooltip:M.value.show},A.value.responsive||(B.value=I.value.width,V.value=I.value.height,Rn.value=I.value.plots.radius)},{immediate:!0});let U=u(()=>Math.min(Rn.value,G.value.stripWidth/2*.9));function W(e){return Number.isFinite(e)?Number(e.toFixed(2)):0}function zn(){return Math.max(0,(G.value.stripWidth/2-U.value*1.8)*.86)*Math.min(1,P.value.widthRatio)}let{metrics:Bn,ready:Vn,settling:Hn,update:Un}=Fe({svgRef:R,canMeasure:()=>!A.value.responsive||Tn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(cn.value).textWidth,yAxisLabelWidth:e(on.value).rotatedWidth,xAxisLabelHeight:e(an.value).height,timeLabelsHeight:e(sn.value).height})});function Wn(){let e=Bn.value.scaleLabelsWidth,t=Bn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Gn=u(()=>Bn.value.xAxisLabelHeight+Bn.value.timeLabelsHeight+(an.value?N.value.axis.fontSize/3+12+N.value.axis.xLabelOffsetY:0)+(sn.value?12:0)),G=u(()=>{let e=Wn(),t=In.value.left+e+N.value.axis.yLabelOffsetX+5,n=B.value-In.value.right,r=Math.max(0,n-t),i=In.value.top+I.value.plots.radius+N.value.bestPlotLabel.fontSize,a=V.value-In.value.bottom-Gn.value,o=Math.max(0,a-i),s=Array.isArray(gn.value)?gn.value.length:0;return{left:t,right:n,top:i,bottom:a,width:r,height:o,stripWidth:s>0?r/s:0,absoluteHeight:V.value}});function Kn(e){return G.value.left+(e+1)*G.value.stripWidth-G.value.stripWidth/2}let qn=u(()=>gn.value.map((e,t)=>{let n=te();return{...e,id:n,color:e.color?ee(e.color):Pn.value[t]||o[t]||o[t%o.length],plots:e.plots.map((r,i)=>({...r,value:ae(r.value),parentId:n,parentName:e.name,parentIndex:t,plotIndex:i,color:e.color?ee(e.color):Pn.value[t]||o[t]||o[t%o.length],id:te()})).sort((e,t)=>e.value-t.value)}})),K=u(()=>(qn.value||[]).map((e,t)=>({...e,plots:e.plots.map(e=>({...e,x:Kn(t)}))}))),Jn=u(()=>Math.max(...K.value.map(e=>e.plots.length))),Yn=u(()=>{let e=K.value.flatMap(e=>e.plots.map(e=>e.value));return{max:Math.max(...e),min:Math.min(...e)}}),Xn=u(()=>{let e=F.value.scaleMin,t=F.value.scaleMax,n=Math.max(2,F.value.scaleSteps),r=Yn.value.min<0?Yn.value.min:0,i=Yn.value.max;if(e===null&&t===null)return re(r,i,n);if(e!==null&&t!==null)return pe(e,t,n);let a=re(e===null?r:e,t===null?i:t,n);return pe(e===null?a.min:e,t===null?a.max:t,n)});function q(e){let t=Xn.value.max-Xn.value.min;return t?G.value.bottom-(e-Xn.value.min)/t*G.value.height:G.value.bottom}let J=u(()=>(K.value||[]).map((e,t)=>{let n=e.plots.map(e=>({...e,y:q(e.value)})),r=pn.value===`classic`?n.map(()=>0):er(n);return{...e,plots:n.map((e,t)=>({...e,x:e.x+r[t]}))}})),Y=u(()=>pn.value===`violin`&&!!P.value?.boxPlot?.show);function Zn(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 X=u(()=>Y.value?J.value.map((e,t)=>{let n=e.plots.map(e=>e.value).sort((e,t)=>e-t),r=Zn(n,.25),i=Zn(n,.5),a=Zn(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),ne=Kn(t),re=Math.max(U.value*2.8,Math.min(zn()*.32,G.value.stripWidth*.12))*Math.min(1.5,P.value.boxPlot.widthRatio);return{id:e.id,boxPlotColor:P.value.boxPlot.useSerieColor?e.color:P.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:ne,boxLeft:ne-re/2,boxWidth:re,q1Y:q(r),medianY:q(i),q3Y:q(a),lowerY:q(ee??n[0]),upperY:q(te??n[n.length-1])}}):[]),Qn=u(()=>[A.value.table.columnNames.series,P.value.tooltipLabels.lowerAdjacent,P.value.tooltipLabels.q1,P.value.tooltipLabels.median,P.value.tooltipLabels.q3,P.value.tooltipLabels.upperAdjacent,P.value.tooltipLabels.iqr,P.value.tooltipLabels.count]);function $n(e){return n({p:N.value.prefix,v:e,s:N.value.suffix,r:A.value.table.td.roundingValue})}function er(e){let t=pn.value===`violin`?Math.max(0,zn()-U.value*1.15):Math.max(0,G.value.stripWidth/2-U.value*1.5);if(!e.length||!t)return e.map(()=>0);let n=e.map(()=>0),r=U.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 tr=u(()=>pn.value===`violin`?J.value.map((e,t)=>({id:e.id,color:P.value.useSerieColor?e.color:P.value.stroke,fill:P.value.useSerieColor?e.color:P.value.fill,path:nr(e.plots,t),connectors:rr(e.plots,t)})):[]);function nr(e,t){let n=zn();if(!e.length||!G.value.height||!n)return``;let r=Kn(t),i=e.map(e=>e.y),a=Z(i),o=ar({yValues:i,bandwidth:a});return o.length>1?o.map(e=>sr({yValues:e,centerX:r,maxWidth:ir({clusterLength:e.length,totalLength:i.length,maxWidth:n}),bandwidth:Z(e)})).join(` `):sr({yValues:i,centerX:r,maxWidth:n,bandwidth:a})}function rr(e,t){if(!e.length)return[];let n=Kn(t),r=e.map(e=>e.y),i=ar({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=he(Math.max(...r)+a*2.35,G.value.top,G.value.bottom),c=he(Math.min(...e)-o*2.35,G.value.top,G.value.bottom);return{x:W(n),y1:W(s),y2:W(c)}})}function ir({clusterLength:e,totalLength:t,maxWidth:n}){let r=(e/t)**.6,i=e<=2?.72:1;return Math.max(U.value*2.2,n*he(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(U.value*2.6,G.value.height/48):U.value*2.1;return he(1.06*r*e.length**-.2,i,G.value.height/5)}function ar({yValues:e,bandwidth:t}){if(e.length<2)return[e];let n=[...e].sort((e,t)=>e-t),r=Math.max(t*1.45,U.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),or(i)}function or(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 sr({yValues:e,centerX:t,maxWidth:n,bandwidth:r}){let i=he(Math.min(...e)-r*2.35,G.value.top,G.value.bottom),a=he(Math.max(...e)+r*2.35,G.value.top,G.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:W(e.y),width:W(r)}}),te=ee.map(e=>({x:W(t-e.width),y:e.y})),ne=ee.slice(0,-1).reverse().map(e=>({x:W(t+e.width),y:e.y}));return`${cr([...te,...ne])} Z`}function cr(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=W((r.x+i.x)/2),o=W((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 lr=u(()=>Xn.value.ticks.map(e=>({y:q(e),x1:G.value.left,x2:G.value.right,value:e}))),ur=b(null),Q=b(null);function dr({datapoint:e,seriesIndex:t}){k.value!==`keyboard`&&(Jt.value=!1,Q.value=null,A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function fr({datapoint:e,seriesIndex:t}){Wt(`selectDatapoint`,e),A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function pr(e,t={}){return oe(N.value.formatter,e,n({p:N.value.prefix,v:e,s:N.value.suffix,r:M.value.roundingValue}),t)}function mr({datapoint:e,seriesIndex:t,triggerMode:n=`pointer`}){A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),k.value=n,ur.value={datapoint:e,seriesIndex:t,config:A.value,series:qn.value},Jt.value=!0,Q.value=e;let r=M.value.customFormat;if(i(r)&&le(()=>r({seriesIndex:t,datapoint:e,series:qn.value,config:A.value})))Yt.value=r({seriesIndex:t,datapoint:e,series:qn.value,config:A.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="${I.value.plots.gradient.show?`url(#${e.parentId})`:e.color}"/></svg>${e.name}</div>`,n+=`<div>${pr(e.value,{datapoint:e,seriesIndex:t})}</div>`,Yt.value=`<div>${n}</div>`}}function hr(){k.value!==`keyboard`&&(Jt.value=!1,Q.value=null)}function gr({boxPlot:e,seriesIndex:t,triggerMode:n=`pointer`}){k.value=n,Q.value=null,Jt.value=!0,ur.value={boxPlot:e,seriesIndex:t,config:A.value,series:qn.value};let r=M.value.customFormat;if(i(r))try{let n={boxPlot:e,seriesIndex:t,series:qn.value,config:A.value};if(le(()=>r(n))){Yt.value=r(n);return}}catch{}let a=[[P.value.tooltipLabels.upperAdjacent,e.upperAdjacent],[P.value.tooltipLabels.q3,e.q3],[P.value.tooltipLabels.median,e.median],[P.value.tooltipLabels.q1,e.q1],[P.value.tooltipLabels.lowerAdjacent,e.lowerAdjacent],[P.value.tooltipLabels.iqr,e.iqr]],o=`<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>`,s=a.map(([n,r])=>`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;"><span>${n}</span><b>${pr(r,{boxPlot:e,seriesIndex:t})}</b></div>`).join(``);Yt.value=`<div style="min-width:160px;"><div style="display:flex;flex-direction:row;gap:6px;align-items:center;margin-bottom:6px;">${o}${e.name}</div>`+s+`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;margin-top:6px;"><span>${P.value.tooltipLabels.count}</span><b>${e.count}</b></div></div>`}let _r=u(()=>({head:K.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:K.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(e=>e.value))}));function vr(e=null){Je(()=>{let t=[],n=[A.value.table.columnNames.series,A.value.table.columnNames.value];Y.value?(n=Qn.value,t=X.value.map(e=>[[e.name],[e.lowerAdjacent],[e.q1],[e.median],[e.q3],[e.upperAdjacent],[e.iqr],[e.count]])):t=_r.value.head.map((e,t)=>[[e.name],[_r.value.body[t]]]);let i=[[I.value.title.text],[I.value.title.subtitle.text],n.map(e=>[e])].concat(t),a=r(i);e?e(a):ce({csvContent:a,title:I.value.title.text||`vue-ui-strip-plot`})})}let yr=u(()=>{if(Y.value){let e=Qn.value;return{colNames:e,head:e,body:X.value.map(e=>[{color:e.color,name:e.name},$n(e.lowerAdjacent),$n(e.q1),$n(e.median),$n(e.q3),$n(e.upperAdjacent),$n(e.iqr),e.count]),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint}}}let e=[A.value.table.columnNames.series,A.value.table.columnNames.value],t=_r.value.head.map((e,t)=>{let r=n({p:N.value.prefix,v:_r.value.body[t],s:N.value.suffix,r:A.value.table.td.roundingValue});return[{color:e.color,name:e.name},r]}),r={th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint};return{colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value],head:e,body:t,config:r}}),$=b(!1);function br(e){$.value=e,qt.value+=1}function xr(){return K.value}function Sr(){H.value.showTable=!H.value.showTable}function Cr(){H.value.dataLabels.show=!H.value.dataLabels.show}function wr(){H.value.showTooltip=!H.value.showTooltip}let Tr=b(!1);function Er(){Tr.value=!Tr.value}let Dr=we(D,()=>I.value.title.text),Or=u(()=>K.value.map(e=>e.name)),kr=b({start:0,end:K.value.length});Ie({timeLabelsEls:sn,timeLabels:Or,slicer:kr,configRef:A,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:B,height:V,targetClass:`.vue-ui-strip-plot-category-name`,rotation:N.value.xAxisLabels.autoRotate.angle});let Ar=u(()=>Oe({config:A,style:I,mutableConfig:H,dialog:Vt,accordion:It,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:L}));tt(()=>H.value.showTable,e=>De(e,A,nn));function jr(){H.value.showTable=!1,rn.value&&rn.value.setTableIconState(!1)}let Mr=u(()=>I.value.backgroundColor),Nr=u(()=>I.value.title),{isCallbackImaging:Pr,isCallbackSvg:Fr,generateSvg:Ir,onGenerateImage:Lr}=Ee({svg:R,title:Nr,legend:null,legendItems:null,backgroundColor:Mr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Mn});async function Rr(){Wt(`copyAlt`,{config:A.value,dataset:J.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function zr(){return J.value.length}function Br(e){return J.value[e]?.plots??[]}function Vr(e=O.value,t=ln.value){return!Number.isInteger(e)||!Number.isInteger(t)?null:Br(e)[t]??null}function Hr(){O.value=null,ln.value=null,k.value=`pointer`,Jt.value=!1,Q.value=null}function Ur(e){if(!e||!R.value)return;let t=R.value.getBoundingClientRect();un.value={x:t.left+e.x/B.value*t.width,y:t.top+e.y/V.value*t.height}}function Wr(e,t){let n=Vr(e,t);n&&(O.value=e,ln.value=t,k.value=`keyboard`,Ur(n),mr({datapoint:n,seriesIndex:e,triggerMode:`keyboard`}))}function Gr(){dn.value=!0,O.value=null,ln.value=null}function Kr(){dn.value=!1,Hr()}function qr(e){if(!R.value||Tr.value||document.activeElement!==R.value||!zr())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){Hr();return}let s=O.value,c=ln.value;if(s===null||c===null)s=0,c=0;else if(t||n){let e=zr();s=n?(s+1)%e:(s-1+e)%e;let t=Br(s);if(!t.length)return;c=Math.min(c,t.length-1)}else if(r||i){let e=Br(s);if(!e.length)return;c=r?(c+1)%e.length:(c-1+e.length)%e.length}if(a){let e=Vr();if(!e)return;fr({datapoint:e,seriesIndex:O.value})}else Wr(s,c)}let Jr=u(()=>({headers:yr.value?.colNames??[],rows:yr.value?.body?.map(e=>e.map(e=>e&&typeof e==`object`&&`name`in e?e.name:e))??[]}));return Se({getData:xr,getImage:Dr,generatePdf:jn,generateCsv:vr,generateImage:Mn,generateSvg:Ir,toggleTable:Sr,toggleLabels:Cr,toggleTooltip:wr,toggleAnnotator:Er,toggleFullscreen:br,copyAlt:Rr}),tt(()=>[B.value,V.value,N.value,I.value,A.value.style.fontFamily,E.dataset,Tn.value,cn.value,sn.value,an.value,on.value],Un,{flush:`post`,deep:!0}),(e,t)=>(y(),p(`div`,{ref_key:`stripPlotChart`,ref:D,class:Ye(`vue-data-ui-component vue-ui-strip-plot ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:v(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor};${A.value.responsive?`height:100%`:``}`),id:`strip-plot_${Kt.value}`,onMouseenter:t[2]||=()=>w(yn)(!0),onMouseleave:t[3]||=()=>w(yn)(!1)},[m(`div`,{id:`chart-instructions-${Kt.value}`,class:`sr-only`},[m(`p`,null,C(A.value.a11y.translations.keyboardNavigation),1)],8,it),Jr.value?.rows?.length?(y(),d(Be,{key:0,uid:Kt.value,head:Jr.value.headers,body:Jr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),j.value.buttons.annotator?(y(),d(w(zt),{key:1,showGroupActions:j.value.annotator?.showGroupActions??!0,svgRef:w(R),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Tr.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Er},We({_:2},[x(w(Ae),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(g(w(ke)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Nn.value?(y(),p(`div`,{key:2,ref_key:`noTitle`,ref:Qt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),I.value.title.text?(y(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Xt,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),d(Te,{key:`title_${en.value}`,config:{title:{cy:`donut-div-title`,...I.value.title},subtitle:{cy:`donut-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),j.value.show&&Gt.value&&(w(bn)||w(vn))?(y(),d(w(Rt),{ref_key:`userOptionsRef`,ref:rn,key:`user_option_${qt.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:w(kn),isImaging:w(An),uid:Kt.value,hasTooltip:j.value.buttons.tooltip&&M.value.show,hasPdf:j.value.buttons.pdf,hasXls:j.value.buttons.csv,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasTable:j.value.buttons.table,hasLabel:j.value.buttons.labels&&A.value.type!==`violin`,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,isTooltip:H.value.showTooltip,isFullscreen:$.value,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Tr.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:br,onGeneratePdf:w(jn),onGenerateCsv:vr,onGenerateImage:w(Lr),onGenerateSvg:w(Ir),onToggleTable:Sr,onToggleLabels:Cr,onToggleTooltip:wr,onToggleAnnotator:Er,onCopyAlt:Rr,style:v({visibility:w(bn)?w(vn)?`visible`:`hidden`:`visible`})},We({_:2},[x(w(je)(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,_(g(w(Me)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,at,[(y(),p(`svg`,{ref_key:`svgRef`,ref:R,xmlns:w(fe),class:Ye({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,"vue-data-ui-no-transition":!w(fn)||w(Hn)}),viewBox:`0 0 ${B.value} ${V.value}`,style:v(`max-width:100%; overflow: visible; background:transparent;color:${I.value.color};;visibility:${w(Vn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${Kt.value}`,tabindex:`0`,onFocus:Gr,onBlur:Kr,onKeydown:qr},[Ke(w(Bt)),S(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:w(kn)||w(An)||w(Pr),isPrintingSvg:w(Fr),boxPlotSummaries:X.value,series:K.value}},void 0,!0),e.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:G.value.left,y:G.value.top,width:Math.max(.1,G.value.width),height:Math.max(.1,G.value.height),style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,st)):f(``,!0),F.value.show?(y(),p(`g`,ct,[F.value.horizontalGrid.show?(y(),p(`g`,lt,[(y(!0),p(l,null,x(lr.value,e=>(y(),p(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:F.value.horizontalGrid.stroke,"stroke-width":F.value.horizontalGrid.strokeWidth,"stroke-dasharray":F.value.horizontalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,ut))),256))])):f(``,!0),F.value.verticalGrid.show?(y(),p(`g`,dt,[(y(!0),p(l,null,x(K.value,(e,t)=>(y(),p(`line`,{x1:G.value.left+(t+1)*G.value.stripWidth,x2:G.value.left+(t+1)*G.value.stripWidth,y1:G.value.top,y2:G.value.bottom,stroke:F.value.verticalGrid.stroke,"stroke-width":F.value.verticalGrid.strokeWidth,"stroke-dasharray":F.value.verticalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,ft))),256))])):f(``,!0),m(`line`,{x1:G.value.left,x2:G.value.left,y1:G.value.top,y2:G.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,pt),m(`line`,{x1:G.value.left,x2:G.value.right,y1:G.value.bottom,y2:G.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,mt)])):f(``,!0),N.value.yAxisLabels.show?(y(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:cn},[(y(!0),p(l,null,x(lr.value,(e,t)=>(y(),p(`text`,{class:Ye({"vue-data-ui-transition":w(fn)&&!w(Hn)}),key:`sl_${t}`,transform:`translate(${e.x1+N.value.yAxisLabels.offsetX-5}, ${e.y+N.value.yAxisLabels.fontSize/3})`,fill:N.value.yAxisLabels.color,"font-size":N.value.yAxisLabels.fontSize,"text-anchor":`end`},C(w(oe)(N.value.formatter,e.value,w(n)({p:N.value.prefix,v:e.value,s:N.value.suffix,r:N.value.yAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),11,ht))),128))],512)):f(``,!0),N.value.xAxisLabels.show?(y(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:sn},[(y(!0),p(l,null,x(Or.value,(e,t)=>(y(),p(`g`,null,[String(e).includes(`
2
- `)?(y(),p(`text`,{key:1,class:`vue-ui-strip-plot-category-name`,transform:`translate(${G.value.left+(t+1)*G.value.stripWidth-G.value.stripWidth/2}, ${G.value.bottom+N.value.xAxisLabels.fontSize*2+N.value.xAxisLabels.offsetY}), rotate(${N.value.xAxisLabels.rotation})`,"font-size":N.value.xAxisLabels.fontSize,fill:N.value.xAxisLabels.color,"text-anchor":N.value.xAxisLabels.rotation>0?`start`:N.value.xAxisLabels.rotation<0?`end`:`middle`,innerHTML:w(s)({content:w(de)(String(e)),fontSize:N.value.xAxisLabels.fontSize,fill:N.value.xAxisLabels.color,x:0,y:0})},null,8,_t)):(y(),p(`text`,{key:0,class:`vue-ui-strip-plot-category-name`,transform:`translate(${G.value.left+(t+1)*G.value.stripWidth-G.value.stripWidth/2}, ${G.value.bottom+N.value.xAxisLabels.fontSize*2+N.value.xAxisLabels.offsetY}), rotate(${N.value.xAxisLabels.rotation})`,"font-size":N.value.xAxisLabels.fontSize,fill:N.value.xAxisLabels.color,"text-anchor":N.value.xAxisLabels.rotation>0?`start`:N.value.xAxisLabels.rotation<0?`end`:`middle`},C(String(e)),9,gt))]))),256))],512)):f(``,!0),N.value.axis.yLabel?(y(),p(`text`,{key:4,ref_key:`yAxisLabel`,ref:on,fill:N.value.axis.color,"font-size":N.value.axis.fontSize,transform:`translate(${N.value.axis.fontSize}, ${G.value.top+G.value.height/2}) rotate(-90)`,"text-anchor":`middle`},C(N.value.axis.yLabel),9,vt)):f(``,!0),N.value.axis.xLabel?(y(),p(`text`,{key:5,ref_key:`xAxisLabel`,ref:an,fill:N.value.axis.color,"font-size":N.value.axis.fontSize,x:G.value.left+G.value.width/2,y:V.value-N.value.axis.fontSize/3,"text-anchor":`middle`},C(N.value.axis.xLabel),9,yt)):f(``,!0),Q.value?(y(),p(l,{key:6},[m(`line`,{x1:G.value.left,x2:G.value.right,y1:Q.value.y,y2:Q.value.y,stroke:Q.value.color,"stroke-width":1,class:Ye({"select-circle":A.value.useCssAnimation})},null,10,bt),m(`circle`,{cx:G.value.left,cy:Q.value.y,r:3,fill:Q.value.color,class:Ye({"select-circle":A.value.useCssAnimation})},null,10,xt),m(`circle`,{cx:G.value.right,cy:Q.value.y,r:3,fill:Q.value.color,class:Ye({"select-circle":A.value.useCssAnimation})},null,10,St)],64)):f(``,!0),m(`defs`,null,[(y(!0),p(l,null,x(K.value,e=>(y(),d(ze,{t:`radial`,id:e.id,key:`r_${e.id}`,fy:`30%`,stops:[[`10%`,w(a)(e.color,I.value.plots.gradient.intensity/100),1],[`90%`,w(c)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),(y(!0),p(l,null,x(tr.value,(e,n)=>(y(),p(l,{key:e.id},[e.path?(y(),p(`path`,{key:0,d:e.path,fill:e.fill,stroke:e.color,"fill-opacity":P.value.opacity,"stroke-opacity":P.value.strokeOpacity,"stroke-width":P.value.strokeWidth,style:v({pointerEvents:Y.value?`auto`:`none`,cursor:Y.value&&L.value?`pointer`:`default`}),onMouseenter:e=>Y.value&&X.value[n]&&gr({boxPlot:X.value[n],seriesIndex:n,triggerMode:`pointer`}),onMouseleave:t[0]||=e=>Y.value&&hr()},null,44,Ct)):f(``,!0),(y(!0),p(l,null,x(e.connectors,(t,n)=>(y(),p(`line`,{key:`violin_connector_${e.id}_${n}`,x1:t.x,x2:t.x,y1:t.y1,y2:t.y2,stroke:e.color,"stroke-opacity":P.value.strokeOpacity,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,wt))),128))],64))),128)),(y(!0),p(l,null,x(X.value,(e,t)=>(y(),p(`g`,{key:`boxplot_${e.id}`,style:v({cursor:L.value?`pointer`:`default`}),onMouseenter:n=>gr({boxPlot:e,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:hr},[m(`line`,{x1:e.centerX,x2:e.centerX,y1:e.upperY,y2:e.lowerY,stroke:w(c)(e.boxPlotColor,.2),"stroke-width":Math.max(1,P.value.strokeWidth),"stroke-linecap":`round`},null,8,Et),m(`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(c)(e.boxPlotColor,.2),"stroke-width":Math.max(1,P.value.strokeWidth),rx:e.boxWidth/20},null,8,Dt),m(`circle`,{cx:e.boxLeft+e.boxWidth/2,cy:e.medianY,r:e.boxWidth/3*Math.min(1,P.value.boxPlot.medianCircleRadiusRatio),fill:P.value.boxPlot.medianCircleFill,stroke:w(c)(e.boxPlotColor,.2)},null,8,Ot)],44,Tt))),128)),(y(!0),p(l,null,x(J.value,(t,r)=>(y(),p(l,null,[Y.value?f(``,!0):(y(!0),p(l,{key:0},x(t.plots,(n,r)=>(y(),d(Le,qe({ref_for:!0},e.$attrs,{plot:{x:n.x,y:$t.value?n.y:G.value.top},radius:Q.value&&Q.value.id===n.id?U.value*1.5:U.value,shape:I.value.plots.shape,stroke:I.value.plots.stroke,strokeWidth:I.value.plots.strokeWidth,color:I.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:I.value.plots.opacity};${Fn.value?`transition-delay:${r*50}ms`:``}`,class:{"vue-ui-strip-plot-animated":A.value.useCssAnimation&&Fn.value&&!w(hn),"vue-ui-strip-plot-select-circle":A.value.useCssAnimation&&!Fn.value},onMouseenter:e=>mr({datapoint:n,seriesIndex:r,triggerMode:`pointer`}),onMouseleave:e=>dr({datapoint:n,seriesIndex:r}),onClick:e=>fr({datapoint:n,seriesIndex:r})}),null,16,[`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`color`,`style`,`class`,`onMouseenter`,`onMouseleave`,`onClick`]))),256)),H.value.dataLabels.show&&!Y.value?(y(),p(`g`,kt,[(y(!0),p(l,null,x(t.plots,(e,r)=>(y(),p(l,null,[r===t.plots.length-1||Q.value&&Q.value.id===e.id&&!H.value.showTooltip?(y(),p(`text`,{key:0,x:e.x,y:e.y+N.value.bestPlotLabel.offsetY-U.value*(Q.value&&Q.value.id===e.id&&!H.value.showTooltip?2:1.5),"font-size":N.value.bestPlotLabel.fontSize,fill:N.value.bestPlotLabel.color,"text-anchor":`middle`,style:v(`opacity:${A.value.useCssAnimation?+!Fn.value:1};transition:opacity 0.2s ease-in;`)},C(e.name)+` `+C(N.value.bestPlotLabel.showValue?w(oe)(N.value.formatter,e.value,w(n)({p:`(${N.value.prefix}`,v:e.value,s:`${N.value.suffix})`,r:I.value.labels.bestPlotLabel.rounding}),{datapoint:e,seriesIndex:r}):``),13,At)):f(``,!0)],64))),256))])):f(``,!0)],64))),256)),S(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:w(kn)||w(An)||w(Pr),isPrintingSvg:w(Fr),boxPlotSummaries:X.value,series:K.value}},void 0,!0)],46,ot)),e.$slots.hint?(y(),p(`div`,jt,[S(e.$slots,`hint`,_(g({hint:A.value.a11y.translations.keyboardNavigation,isVisible:dn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(y(),p(`div`,Mt,[S(e.$slots,`watermark`,_(g({isPrinting:w(kn)||w(An)||w(Pr)||w(Fr)})),void 0,!0)])):f(``,!0),e.$slots.source?(y(),p(`div`,{key:6,ref_key:`source`,ref:Zt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Ke(w(Pt),{teleportTo:M.value.teleportTo,show:H.value.showTooltip&&Jt.value,backgroundColor:M.value.backgroundColor,color:M.value.color,borderRadius:M.value.borderRadius,borderColor:M.value.borderColor,borderWidth:M.value.borderWidth,fontSize:M.value.fontSize,backgroundOpacity:M.value.backgroundOpacity,position:M.value.position,offsetX:M.value.offsetX,offsetY:M.value.offsetY,parent:D.value,content:Yt.value,isFullscreen:$.value,isCustom:w(i)(M.value.customFormat),smooth:M.value.smooth,backdropFilter:M.value.backdropFilter,smoothForce:M.value.smoothForce,smoothSnapThreshold:M.value.smoothSnapThreshold,isA11yMode:k.value===`keyboard`,a11yPosition:un.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,_(g({...ur.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,_(g({...ur.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,_(g({...ur.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`]),Gt.value&&j.value.buttons.table?(y(),d(Qe(Ar.value.component),qe({key:7},Ar.value.props,{ref_key:`tableUnit`,ref:nn,onClose:jr}),We({content:T(()=>[(y(),d(w(Lt),{key:`table_${tn.value}`,colNames:yr.value.colNames,head:yr.value.head,body:yr.value.body,config:yr.value.config,title:A.value.table.useDialog?``:Ar.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:jr},{th:T(({th:e})=>[m(`div`,Nt,C(e),1)]),td:T(({td:e})=>[Ge(C(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:T(()=>[Ge(C(Ar.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:T(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>vr(j.value.callbacks.csv),style:v({cursor:L.value?`pointer`:`default`})},[Ke(w(Ft),{name:`fileCsv`,stroke:Ar.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),S(e.$slots,`skeleton`,{},()=>[w(hn)?(y(),d(ye,{key:0})):f(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-0c2e1049`]]);export{nt as n,Pt as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,Ht as r,Jt as i,S as a,X as ee,at as o,b as s,i as te,in as ne,t as re,w as ie,yt as ae,zt as oe}from"./lib-rPeBMZrn.js";import{n as se,t as ce}from"./BaseScanner-8NdoBs7B.js";import{n as le,t as ue}from"./useHints-C-TwxM0Y.js";import{t as de}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as fe}from"./resolveChartConfig-CIhClE5R.js";import{t as pe}from"./img-D4RQwASc.js";import{n as me}from"./Title-BliHuXfT.js";import{t as he}from"./useChartExport-BZts4KFb.js";import{n as ge,t as _e}from"./annotationSlots-RvQBEO9-.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./DefGrad-DKMq1REY.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./usePrefersMotion-XLHwega2.js";import{t as De}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Oe}from"./vue_ui_thermometer-CRijq6H6.js";import{Fragment as c,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as ke,createVNode as Ae,defineAsyncComponent as m,guardReactiveProps as h,normalizeClass as g,normalizeProps as _,normalizeStyle as je,onMounted as Me,openBlock as v,ref as y,renderList as b,renderSlot as x,toDisplayString as S,toRefs as Ne,unref as C,useCssVars as Pe,watch as Fe,withCtx as Ie}from"vue";var Le=/* @__PURE__ */ e({default:()=>w}),Re=[`id`],ze={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Be=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Ve=[`id`],He=[`id`],Ue=[`width`,`height`],We=[`id`],Ge=[`x`,`y`,`width`,`height`,`rx`,`ry`],Ke=[`clip-path`],qe=[`x`,`y`,`height`,`width`],Je=[`x`,`y`,`height`,`width`,`fill`],Ye=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],Xe=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],Ze=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],Qe=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],$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=[`x`,`y`,`height`,`width`],it=[`aria-label`],at=[`x`,`y`,`height`],ot=[`y`,`x`,`fill`,`font-size`,`font-weight`],st={key:4,class:`vue-data-ui-watermark`},w=/*#__PURE__*/ de({__name:`vue-ui-thermometer`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:de,emit:Le}){Pe(e=>({v4bc83366:Mt.value,v19dfc1e8:jt.value,v4cc4b0d5:At.value}));let w=m(()=>import(`./PackageVersion-CHQWwTik.js`).then(e=>e.t)),ct=m(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),lt=m(()=>import(`./UserOptions-BUXg7qOC.js`).then(e=>e.n)),{vue_ui_thermometer:ut}=t(),dt=Ee(),T=e,ft=Le,E=y(ee()),D=y(null),pt=y(0),mt=y(0),ht=y(null),gt=y(null),O=y(null),k=y(null),_t=l(()=>!!T.dataset&&Object.keys(T.dataset).length);Me(()=>{St()});let A=y(B()),j=l(()=>A.value.userOptions),M=l(()=>A.value.style.chart.graduations),N=l(()=>A.value.style.chart);le({config:()=>A.value,dataset:()=>T.dataset,component:`VueUiThermometer`,rules:[ue.noHint]});let vt=y(N.value.thermometer.width),P=y(N.value.height),F=y(N.value.width),yt=l(()=>A.value.userOptions.useCursorPointer),bt=l(()=>ne({defaultConfig:{userOptions:{show:!1},style:{chart:{animation:{use:!1},backgroundColor:`#99999930`,graduations:{stroke:`#6A6A6A`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:I,FINAL_DATASET:L}=se({...Ne(T),FINAL_CONFIG:A,prepareConfig:B,skeletonDataset:T.config?.skeletonDataset??{value:0,from:-100,to:100,steps:20,colors:{from:`#A1A1A1`,to:`#CACACA`}},skeletonConfig:ne({defaultConfig:A.value,userConfig:bt.value})}),xt=l(()=>A.value.debug);function St(){if(oe(T.dataset)?o({componentName:`VueUiThermometer`,type:`dataset`,debug:xt.value}):ae({datasetObject:T.dataset,requiredAttributes:[`value`,`from`,`to`]}).forEach(e=>{o({componentName:`VueUiThermometer`,type:`datasetAttribute`,property:e,debug:xt.value})}),A.value.responsive){let e=xe(()=>{let{width:e,height:t}=Se({chart:D.value,title:A.value.style.title.text?ht.value:null,source:gt.value});requestAnimationFrame(()=>{P.value=Math.max(.1,t-12),F.value=e,Rt()})});O.value&&(k.value&&O.value.unobserve(k.value),O.value.disconnect()),O.value=new ResizeObserver(e),k.value=D.value,O.value.observe(k.value)}Rt()}let{userOptionsVisible:R,setUserOptionsVisibility:Ct,keepUserOptionState:wt}=we({config:A.value}),{svgRef:z}=Te({config:A.value.style.title});function B(){return fe(T.config,ut,Oe)}Fe(()=>T.config,e=>{A.value=B(),R.value=!A.value.userOptions.showOnChartHover,vt.value=N.value.thermometer.width,P.value=N.value.height,F.value=N.value.width,St(),mt.value+=1},{deep:!0});let{isPrinting:V,isImaging:H,generatePdf:Tt,generateImage:Et}=be({elementId:`thermometer__${E.value}`,fileName:A.value.style.title.text||`vue-ui-thermometer`,options:A.value.userOptions.print}),Dt=l(()=>A.value.userOptions.show&&!A.value.style.title.text),U=l(()=>ie(A.value.customPalette)),W=l(()=>L.value.steps||10);function G(e,t,n){let r=[],i=Ot(e),a=Ot(t);for(let e=0;e<n;e+=1){let t=K(i.red,a.red,e,n),ee=K(i.green,a.green,e,n),o=K(i.blue,a.blue,e,n),s=`#${q(t)}${q(ee)}${q(o)}`;r.push(s)}return r}function Ot(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 K(e,t,n,r){return Math.round(e+(t-e)*n/r)}function q(e){return e.toString(16).padStart(2,`0`)}let J=l(()=>{let e=Math.max(.1,F.value),t=Math.max(.1,P.value),n=N.value.padding;return{width:e,left:e/2-N.value.thermometer.width/2,right:e/2+N.value.thermometer.width/2,top:n.top,bottom:t-n.bottom-n.top,height:t,thermoHeight:t-n.top-n.bottom,thermoWidth:N.value.thermometer.width}}),kt=l(()=>J.value),Y=l(()=>{let e=s(L.value.from)<0?Math.abs(s(L.value.from)):s(L.value.from),t=s(L.value.to)<0?Math.abs(s(L.value.to)):s(L.value.to),n=0;return n=s(L.value.to)>0?e+t:e>t?e-t:t-e,(1-(Math.abs(s(L.value.from))+s(L.value.value))/n)*J.value.thermoHeight}),At=l(()=>`${Y.value}px`),jt=l(()=>`${J.value.thermoHeight}px`),Mt=l(()=>dt.value?`0ms`:`${N.value.animation.speedMs}ms`),Nt=l(()=>{if(L.value.colors){if(!L.value.colors.from)return G(U.value[0]||r[0],a(L.value.colors.to),W.value||10);if(!L.value.colors.to)return G(a(L.value.colors.from),U.value[1]||r[1],W.value||10)}else return G(U.value[1]||r[1],U.value[0]||r[0],W.value||10);return G(a(L.value.colors.from),a(L.value.colors.to),W.value||10)}),Pt=l(()=>{let e=[],t=0,n=J.value.thermoHeight;for(let r=0;r<n-1;r+=n/W.value)e.push({x:J.value.left,y:J.value.top+r,qYLess:J.value.top+r+n/W.value/4,halfY:J.value.top+r+n/W.value/2,qYMore:J.value.top+r+n/W.value/4*3,color:Nt.value[t],height:Math.max(.1,n/W.value)}),t+=1;return e}),X=y(!1);function Ft(e){X.value=e,pt.value+=1}let Z=y(!1);function It(){Z.value=!Z.value}async function Lt({scale:e=2}={}){if(!D.value)return;let{width:t,height:n}=D.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await pe({domElement:D.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:A.value.style.title.text,width:t,height:n,aspectRatio:r}}let Q=l({get:()=>N.value.label.fontSize,set:e=>e}),{autoSizeLabels:Rt}=De({svgRef:z,fontSize:N.value.label.fontSize,minFontSize:N.value.label.minFontSize,sizeRef:Q,labelClass:`.vue-ui-thermometer-label`}),zt=l(()=>N.value.backgroundColor),Bt=l(()=>A.value.style.title),{isCallbackImaging:Vt,isCallbackSvg:Ht,generateSvg:Ut,onGenerateImage:Wt}=he({svg:z,title:Bt,legend:null,legendItems:null,backgroundColor:zt,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Et});async function Gt(){ft(`copyAlt`,{config:A.value,dataset:L.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:L.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Kt=l(()=>`${E.value}-title`),qt=l(()=>`${E.value}-desc`),$=l(()=>te(N.value.label.formatter,L.value.value,n({p:N.value.label.prefix,v:L.value.value,s:N.value.label.suffix,r:N.value.label.rounding}),{datapoint:L.value})),Jt=l(()=>A.value.style.title.text||``),Yt=l(()=>{if(I.value)return`...`;let e=s(L.value.from),t=s(L.value.to);return`Thermometer value: ${$.value}. Range: ${e} to ${t}.`});return de({getImage:Lt,generatePdf:Tt,generateImage:Et,generateSvg:Ut,toggleAnnotator:It,toggleFullscreen:Ft,copyAlt:Gt}),(e,t)=>(v(),f(`div`,{ref_key:`thermoChart`,ref:D,class:g(`vue-data-ui-component vue-ui-thermometer ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:je(`width:100%;background:${N.value.backgroundColor};color:${N.value.color};font-family:${A.value.style.fontFamily}`),id:`thermometer__${E.value}`,onMouseenter:t[0]||=()=>C(Ct)(!0),onMouseleave:t[1]||=()=>C(Ct)(!1)},[j.value.buttons.annotator?(v(),u(C(ct),{key:0,showGroupActions:j.value.annotator?.showGroupActions??!0,svgRef:C(z),backgroundColor:N.value.backgroundColor,color:N.value.color,active:Z.value,isCursorPointer:yt.value,palette:j.value.annotatorPalette,onClose:It},ke({_:2},[b(C(_e),t=>({name:t,fn:Ie(n=>[x(e.$slots,t,_(h(C(ge)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),Dt.value?(v(),f(`div`,ze,null,512)):d(``,!0),A.value.style.title.text?(v(),f(`div`,{key:2,ref_key:`chartTitle`,ref:ht,style:`width:100%`},[(v(),u(me,{key:`title_${mt.value}`,config:{title:{cy:`thermometer-div-title`,...A.value.style.title},subtitle:{cy:`thermometer-div-subtitle`,...A.value.style.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),j.value.show&&_t.value&&(C(wt)||C(R))?(v(),u(C(lt),{ref:`details`,key:`user_options_${pt.value}`,backgroundColor:N.value.backgroundColor,color:N.value.color,isImaging:C(H),isPrinting:C(V),uid:E.value,hasPdf:j.value.buttons.pdf,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,hasXls:!1,isFullscreen:X.value,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Z.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,isCursorPointer:yt.value,onToggleFullscreen:Ft,onGeneratePdf:C(Tt),onGenerateImage:C(Wt),onGenerateSvg:C(Ut),onToggleAnnotator:It,onCopyAlt:Gt,style:je({visibility:C(wt)?C(R)?`visible`:`hidden`:`visible`})},ke({_:2},[b(C(ve)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ie(n=>[x(e.$slots,t,_(h(C(ye)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),(v(),f(`svg`,{ref_key:`svgRef`,ref:z,xmlns:C(re),class:g({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),width:`100%`,viewBox:`0 0 ${J.value.width} ${J.value.height}`,style:`background:transparent`,"aria-labelledby":Kt.value,"aria-describedby":qt.value},[p(`title`,{id:Kt.value},S(Jt.value),9,Ve),p(`desc`,{id:qt.value},S(Yt.value),9,He),Ae(C(w)),x(e.$slots,`svg-underlayer`,{svg:{...kt.value,isPrintingImg:C(V)||C(H)||C(Vt),isPrintingSvg:C(Ht)}},void 0,!0),e.$slots[`chart-background`]?(v(),f(`foreignObject`,{key:0,x:0,y:0,width:J.value.width,height:J.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,Ue)):d(``,!0),p(`defs`,null,[p(`clipPath`,{id:`vueUiPill-${E.value}`,clipPathUnits:`userSpaceOnUse`},[p(`rect`,{x:J.value.left,y:J.value.top,width:J.value.thermoWidth,height:J.value.thermoHeight,rx:J.value.thermoWidth/2,ry:J.value.thermoWidth/2},null,8,Ge)],8,We),(v(!0),f(c,null,b(Pt.value,(e,t)=>(v(),u(Ce,{t:`linear`,id:`vueUiThermometerGradient_${t}_${E.value}`,key:`t_${t}_${E.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`50%`,C(i)(e.color,100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),p(`g`,{"clip-path":`url(#vueUiPill-${E.value})`},[p(`rect`,{x:J.value.left,y:J.value.top,height:J.value.thermoHeight,width:J.value.thermoWidth,fill:`#FFFFFF`},null,8,qe),(v(!0),f(c,null,b(Pt.value,(e,t)=>(v(),f(`g`,{key:`graduation_${t}`},[p(`rect`,{x:e.x,y:e.y,height:e.height,width:J.value.thermoWidth,fill:M.value.gradient.show?`url(#vueUiThermometerGradient_${t}_${E.value})`:e.color,"shape-rendering":`crispEdges`},null,8,Je),M.value.show&&[`both`,`left`].includes(M.value.sides)?(v(),f(`line`,{key:0,x1:e.x,x2:e.x+10,y1:e.y,y2:e.y,"stroke-width":M.value.strokeWidth,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,Ye)):d(``,!0),M.value.showIntermediate?(v(),f(c,{key:1},[M.value.show&&[`both`,`left`].includes(M.value.sides)?(v(),f(`line`,{key:0,x1:e.x,x2:e.x+5,y1:e.halfY,y2:e.halfY,"stroke-width":M.value.strokeWidth/2,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,Xe)):d(``,!0),M.value.show&&[`both`,`left`].includes(M.value.sides)?(v(),f(`line`,{key:1,x1:e.x,x2:e.x+2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":M.value.strokeWidth/2,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,Ze)):d(``,!0),M.value.show&&[`both`,`left`].includes(M.value.sides)?(v(),f(`line`,{key:2,x1:e.x,x2:e.x+2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":M.value.strokeWidth/2,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,Qe)):d(``,!0)],64)):d(``,!0),M.value.show&&[`both`,`right`].includes(M.value.sides)?(v(),f(`line`,{key:2,x1:J.value.right,x2:J.value.right-10,y1:e.y,y2:e.y,"stroke-width":M.value.strokeWidth,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,$e)):d(``,!0),M.value.showIntermediate?(v(),f(c,{key:3},[M.value.show&&[`both`,`right`].includes(M.value.sides)?(v(),f(`line`,{key:0,x1:J.value.right,x2:J.value.right-5,y1:e.halfY,y2:e.halfY,"stroke-width":M.value.strokeWidth/2,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,et)):d(``,!0),M.value.show&&[`both`,`right`].includes(M.value.sides)?(v(),f(`line`,{key:1,x1:J.value.right,x2:J.value.right-2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":M.value.strokeWidth/2,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,tt)):d(``,!0),M.value.show&&[`both`,`right`].includes(M.value.sides)?(v(),f(`line`,{key:2,x1:J.value.right,x2:J.value.right-2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":M.value.strokeWidth/2,stroke:M.value.stroke,"stroke-linecap":`round`},null,8,nt)):d(``,!0)],64)):d(``,!0)]))),128)),p(`rect`,{class:g({"vue-ui-thermometer-temperature":N.value.animation.use}),x:J.value.left,y:J.value.top,height:Y.value,width:J.value.thermoWidth,fill:`#FFFFFF66`},null,10,rt)],8,Ke),N.value.label.show?(v(),f(`g`,{key:1,role:`status`,"aria-live":`polite`,"aria-label":C(I)?`Loading data`:$.value},[C(I)?(v(),f(`rect`,{key:0,x:J.value.left-60,y:Y.value+J.value.top-Q.value/2,width:50,height:Q.value,fill:`#6A6A6A40`,rx:`3`},null,8,at)):(v(),f(`text`,{key:1,"aria-hidden":`true`,class:g({"vue-ui-thermometer-temperature-value":N.value.animation.use,"vue-ui-thermometer-label":!0}),y:Y.value+J.value.top+Q.value/3,x:J.value.left-10,"text-anchor":`end`,fill:N.value.label.color,"font-size":Q.value,"font-weight":N.value.label.bold?`bold`:`normal`},S($.value),11,ot))],8,it)):d(``,!0),x(e.$slots,`svg`,{svg:{...kt.value,isPrintingImg:C(V)||C(H)||C(Vt),isPrintingSvg:C(Ht)}},void 0,!0)],10,Be)),e.$slots.watermark?(v(),f(`div`,st,[x(e.$slots,`watermark`,_(h({isPrinting:C(V)||C(H)||C(Vt)||C(Ht)})),void 0,!0)])):d(``,!0),e.$slots.source?(v(),f(`div`,{key:5,ref_key:`source`,ref:gt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),x(e.$slots,`skeleton`,{},()=>[C(I)?(v(),u(ce,{key:0})):d(``,!0)],!0)],46,Re))}},[[`__scopeId`,`data-v-a3048cf1`]]);export{Le as n,w as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,X as r,Yt as i,at as a,b as o,i as s,in as c,t as l,zt as ee}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./BaseScanner-8NdoBs7B.js";import{n as re,t as ie}from"./useHints-C-TwxM0Y.js";import{t as ae}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as oe}from"./resolveChartConfig-CIhClE5R.js";import{t as se}from"./chartImage-DPGnEuYM.js";import{n as ce}from"./Title-BliHuXfT.js";import{t as le}from"./useChartExport-BZts4KFb.js";import{n as ue,t as de}from"./annotationSlots-RvQBEO9-.js";import{n as fe,t as pe}from"./userOptionsSlots-DYuo-E5m.js";import{t as me}from"./usePrinter-DVf3YcG5.js";import{c as he}from"./canvas-lib-22VpOI4_.js";import{t as ge}from"./useResponsive-CENUxfEL.js";import{t as _e}from"./useUserOptionState-CXlFnwPv.js";import{t as ve}from"./useChartAccessibility-DOMuYJfm.js";import{t as ye}from"./usePrefersMotion-XLHwega2.js";import{t as be}from"./vue_ui_tiremarks-8HFfABNF.js";import{Fragment as xe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as Se,createSlots as Ce,createVNode as we,defineAsyncComponent as m,guardReactiveProps as h,normalizeClass as g,normalizeProps as Te,normalizeStyle as Ee,onMounted as De,openBlock as _,ref as v,renderList as y,renderSlot as b,toDisplayString as x,toRefs as Oe,unref as S,watch as ke,withCtx as Ae}from"vue";var je=/* @__PURE__ */ e({default:()=>C}),Me=[`id`],Ne=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Pe=[`id`],Fe=[`id`],Ie=[`width`,`height`],Le={key:1},Re=[`d`,`stroke-width`,`stroke`],ze={key:2},Be=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],Ve=[`aria-label`],He=[`x`,`y`,`height`],Ue=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],We={key:4,class:`vue-data-ui-watermark`},C=/*#__PURE__*/ ae({__name:`vue-ui-tiremarks`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:ae,emit:je}){let C=m(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),Ge=m(()=>import(`./UserOptions-BUXg7qOC.js`).then(e=>e.n)),Ke=m(()=>import(`./PackageVersion-CHQWwTik.js`).then(e=>e.t)),{vue_ui_tiremarks:qe}=t(),w=ye(),T=e,Je=je,Ye=u(()=>!!T.dataset&&Object.keys(T.dataset).length),E=v(r()),D=v(null),Xe=v(null),Ze=v(null),Qe=v(null),$e=v(0),et=v(0),O=v(null),k=v(null),A=v(L()),j=u(()=>A.value.userOptions),M=u(()=>A.value.style.chart.layout),N=u(()=>A.value.style.chart);re({config:()=>A.value,dataset:()=>T.dataset,component:`VueUiTiremarks`,rules:[ie.noHint]});let tt=u(()=>A.value.userOptions.useCursorPointer),nt=u(()=>c({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,animation:{use:!1},layout:{activeColor:`#6A6A6A80`,inactiveColor:`#CACACA80`,ticks:{gradient:{show:!1}}}}}},userConfig:A.value.skeletonConfig??{}})),{loading:P,FINAL_DATASET:F}=te({...Oe(T),FINAL_CONFIG:A,prepareConfig:L,skeletonDataset:T.config?.skeletonDataset??{percentage:50},skeletonConfig:c({defaultConfig:A.value,userConfig:nt.value})}),{userOptionsVisible:I,setUserOptionsVisibility:rt,keepUserOptionState:it}=_e({config:A.value}),{svgRef:at}=ve({config:N.value.title});function L(){return oe(T.config,qe,be)}ke(()=>T.config,e=>{A.value=L(),I.value=!A.value.userOptions.showOnChartHover,W.value=N.value.width,G.value=N.value.height,dt(),et.value+=1},{deep:!0});let{isPrinting:R,isImaging:z,generatePdf:ot,generateImage:st}=me({elementId:E.value,fileName:N.value.title.text||`vue-ui-tiremarks`,options:A.value.userOptions.print}),ct=u(()=>A.value.userOptions.show&&!N.value.title.text),B=v(N.value.animation.use&&!w.value?0:o(F.value.percentage));ke(()=>F.value,e=>{N.value.animation.use&&!w.value?lt(e.percentage):B.value=e.percentage||0},{deep:!0}),De(()=>{dt()});function lt(e){let t=N.value.animation.speed,n=Math.abs(e-B.value)/(t*120);function r(){B.value<e?B.value=Math.min(B.value+n,e):B.value>e&&(B.value=Math.max(B.value-n,e)),B.value!==e&&requestAnimationFrame(r)}r()}let ut=u(()=>A.value.debug);function dt(){if(ee(T.dataset)&&a({componentName:`VueUiTiremarks`,type:`dataset`,debug:ut.value}),A.value.responsive){let e=he(()=>{let{width:e,height:t}=ge({chart:D.value,title:N.value.title.text?Ze.value:null,source:Qe.value});requestAnimationFrame(()=>{W.value=Math.max(.1,e),G.value=Math.max(.1,t-12)})});O.value&&(k.value&&O.value.unobserve(k.value),O.value.disconnect()),O.value=new ResizeObserver(e),k.value=D.value.parentNode,O.value.observe(k.value)}lt(F.value.percentage||0)}let V=u(()=>M.value.display===`vertical`),H=u(()=>{let e=N.value.percentage.show,t={top:e?48:12,left:e?64:16,right:e?64:16,bottom:e?48:12};return V.value?{top:N.value.percentage.verticalPosition===`top`?t.top:3,left:3,right:3,bottom:N.value.percentage.verticalPosition===`bottom`?t.bottom:3}:{top:0,bottom:0,left:N.value.percentage.horizontalPosition===`left`?t.left:16,right:N.value.percentage.horizontalPosition===`right`?t.right:10}}),U=u(()=>Object.values(H.value).reduce((e,t)=>e+t,0)),W=v(N.value.width),G=v(N.value.height),K=u(()=>({height:G.value,width:W.value})),ft=u(()=>({horizontal:{x:J.value.x+(N.value.percentage.horizontalPosition===`left`?6:3),y:K.value.height/2-J.value.fontSize/2},vertical:{x:K.value.width/2-20,y:J.value.y-J.value.fontSize/2}})[M.value.display]),q=u(()=>V.value?{mark:(K.value.height-U.value)/100*.5,space:(K.value.height-U.value)/100*.5}:{mark:(K.value.width-U.value)/100*.5,space:(K.value.width-U.value)/100*.5}),pt=u(()=>{let e=[];for(let t=0;t<100;t+=1){let n=M.value.ticks.gradient.show?i(M.value.activeColor,t/100*(M.value.ticks.gradient.shiftHueIntensity/100)):M.value.activeColor;if(V.value){let r=M.value.crescendo?(100-t)*(K.value.width-H.value.left-H.value.right)/100/3:0,i=H.value.left+4+r,a=K.value.width-H.value.right-4-r,o=K.value.height-H.value.bottom-t*q.value.mark-t*q.value.space-q.value.mark,s=K.value.height-H.value.bottom-t*q.value.mark-t*q.value.space-q.value.mark,c=(a-i)/M.value.curveAngleX,l=M.value.curveAngleY*((1+t)/100);e.push({x1:i,x2:a,y1:o,y2:s,curve:`M ${i} ${o} C ${i+c} ${o-l}, ${a-c} ${s-l}, ${a} ${s}`,color:n})}else{let r=M.value.crescendo?(100-t)*(K.value.height-H.value.top-H.value.bottom)/100/3:0,i=H.value.left+t*q.value.mark+t*q.value.space-q.value.mark,a=i,o=H.value.top+4+r,s=K.value.height-H.value.bottom-4-r,c=M.value.curveAngleY*((1+t)/100),l=(s-o)/M.value.curveAngleX;e.push({x1:i,x2:a,y1:o,y2:s,curve:`M ${i} ${o} C ${i+c} ${o+l}, ${a+c} ${s-l}, ${a} ${s}`,color:n})}}return e}),J=u(()=>{let e,t,n,r=N.value.percentage.fontSize/3;return V.value?N.value.percentage.verticalPosition===`top`?(e=K.value.width/2,t=H.value.top/2,n=`middle`):N.value.percentage.verticalPosition===`bottom`&&(e=K.value.width/2,t=K.value.height-H.value.bottom/2+r,n=`middle`):N.value.percentage.horizontalPosition===`left`?(e=4,t=K.value.height/2+r,n=`start`):N.value.percentage.horizontalPosition===`right`&&(e=K.value.width-H.value.right+8,t=K.value.height/2+r,n=`start`),{x:e,y:t,textAnchor:n,bold:N.value.percentage.bold,fontSize:N.value.percentage.fontSize,fill:N.value.percentage.color}}),Y=v(!1);function mt(e){Y.value=e,$e.value+=1}let X=v(!1);function Z(){X.value=!X.value}let ht=se(D,()=>N.value.title.text),gt=u(()=>N.value.backgroundColor),_t=u(()=>N.value.title),{isCallbackImaging:vt,isCallbackSvg:Q,generateSvg:yt,onGenerateImage:bt}=le({svg:at,title:_t,legend:null,legendItems:null,backgroundColor:gt,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:st});async function xt(){Je(`copyAlt`,{config:A.value,dataset:F.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:F.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let St=u(()=>`${E.value}-title`),Ct=u(()=>`${E.value}-desc`),$=u(()=>s(N.value.percentage.formatter,B.value,n({v:B.value,s:`%`,r:N.value.percentage.rounding}))),wt=u(()=>N.value.title.text||``),Tt=u(()=>P.value?`Loading data`:`Value: ${$.value}`);return ae({getImage:ht,generatePdf:ot,generateImage:st,generateSvg:yt,toggleAnnotator:Z,toggleFullscreen:mt,copyAlt:xt}),(e,t)=>(_(),p(`div`,{ref_key:`tiremarksChart`,ref:D,class:g(`vue-data-ui-component vue-ui-tiremarks ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:Ee(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${N.value.backgroundColor}`),id:E.value,onMouseenter:t[0]||=()=>S(rt)(!0),onMouseleave:t[1]||=()=>S(rt)(!1)},[j.value.buttons.annotator?(_(),d(S(C),{key:0,showGroupActions:j.value.annotator?.showGroupActions??!0,svgRef:S(at),backgroundColor:N.value.backgroundColor,color:N.value.color,active:X.value,isCursorPointer:tt.value,palette:j.value.annotatorPalette,onClose:Z},Ce({_:2},[y(S(de),t=>({name:t,fn:Ae(n=>[b(e.$slots,t,Te(h(S(ue)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),ct.value?(_(),p(`div`,{key:1,ref_key:`noTitle`,ref:Xe,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),N.value.title.text?(_(),p(`div`,{key:2,ref_key:`chartTitle`,ref:Ze,style:`width:100%;background:transparent;padding-bottom:12px`},[(_(),d(ce,{key:`title_${et.value}`,config:{title:{cy:`wheel-title`,...N.value.title},subtitle:{cy:`wheel-subtitle`,...N.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),j.value.show&&Ye.value&&(S(it)||S(I))?(_(),d(S(Ge),{ref:`details`,key:`user_options_${$e.value}`,backgroundColor:N.value.backgroundColor,color:N.value.color,isPrinting:S(R),isImaging:S(z),uid:E.value,hasPdf:j.value.buttons.pdf,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,hasXls:!1,isFullscreen:Y.value,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:X.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,isCursorPointer:tt.value,onToggleFullscreen:mt,onGeneratePdf:S(ot),onGenerateImage:S(bt),onGenerateSvg:S(yt),onToggleAnnotator:Z,onCopyAlt:xt,style:Ee({visibility:S(it)?S(I)?`visible`:`hidden`:`visible`})},Ce({_:2},[y(S(fe)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ae(n=>[b(e.$slots,t,Te(h(S(pe)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),(_(),p(`svg`,{ref_key:`svgRef`,ref:at,xmlns:S(l),class:g({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),viewBox:`0 0 ${W.value} ${G.value}`,style:Ee(`max-width:100%; overflow: visible; background:transparent;color:${N.value.color}`),role:`img`,"aria-labelledby":St.value,"aria-describedby":Ct.value},[Se(`title`,{id:St.value},x(wt.value),9,Pe),Se(`desc`,{id:Ct.value},x(Tt.value),9,Fe),we(S(Ke)),b(e.$slots,`svg-underlayer`,{svg:{...K.value,isPrintingImg:S(R)||S(z)||S(vt),isPrintingSvg:S(Q)}},void 0,!0),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:0,y:0,width:K.value.width,height:K.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,Ie)):f(``,!0),M.value.curved?(_(),p(`g`,Le,[(_(!0),p(xe,null,y(pt.value,(e,t)=>(_(),p(`path`,{d:e.curve,"stroke-width":q.value.mark,stroke:B.value>=t?e.color:M.value.inactiveColor,"stroke-linecap":`round`,fill:`none`,class:g({"vue-ui-tick-animated":N.value.animation.use&&!S(w)&&t<=B.value})},null,10,Re))),256))])):(_(),p(`g`,ze,[(_(!0),p(xe,null,y(pt.value,(e,t)=>(_(),p(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,"stroke-width":q.value.mark,stroke:B.value>=t?e.color:M.value.inactiveColor,"stroke-linecap":`round`},null,8,Be))),256))])),N.value.percentage.show?(_(),p(`g`,{key:3,role:`status`,"aria-live":`polite`,"aria-label":S(P)?`...`:`${$.value}`},[S(P)?(_(),p(`rect`,{key:0,x:ft.value.x,y:ft.value.y,width:40,height:J.value.fontSize,fill:`#6A6A6A80`,rx:3},null,8,He)):(_(),p(`text`,{key:1,"aria-hidden":`true`,x:J.value.x,y:J.value.y,"font-size":J.value.fontSize,fill:M.value.ticks.gradient.show&&N.value.percentage.useGradientColor?S(i)(M.value.activeColor,B.value/100*(M.value.ticks.gradient.shiftHueIntensity/100)):N.value.percentage.color,"font-weight":J.value.bold?`bold`:`normal`,"text-anchor":J.value.textAnchor},x($.value),9,Ue))],8,Ve)):f(``,!0),b(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:S(R)||S(z)||S(vt),isPrintingSvg:S(Q)}},void 0,!0)],14,Ne)),e.$slots.watermark?(_(),p(`div`,We,[b(e.$slots,`watermark`,Te(h({isPrinting:S(R)||S(z)||S(vt)||S(Q)})),void 0,!0)])):f(``,!0),e.$slots.source?(_(),p(`div`,{key:5,ref_key:`source`,ref:Qe,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),b(e.$slots,`skeleton`,{},()=>[S(P)?(_(),d(ne,{key:0})):f(``,!0)],!0)],46,Me))}},[[`__scopeId`,`data-v-4c1d1c2f`]]);export{je as n,C as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Dt as i,Ft as a,Ht as o,S as s,X as c,Zt as l,at as u,et as d,i as f,in as ee,nt as te,pt as ne,r as re,t as ie,w as ae,zt as oe}from"./lib-rPeBMZrn.js";import{n as se,t as ce}from"./BaseScanner-8NdoBs7B.js";import{n as le,t as ue}from"./useHints-C-TwxM0Y.js";import{t as de}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as fe}from"./resolveChartConfig-CIhClE5R.js";import{t as pe}from"./chartImage-DPGnEuYM.js";import{t as me}from"./BaseIcon-fYK0iID8.js";import{n as he}from"./Title-BliHuXfT.js";import{t as ge}from"./useChartExport-BZts4KFb.js";import{n as _e,t as ve}from"./tableIntegration-CNoJ1CIY.js";import{n as ye,t as be}from"./annotationSlots-RvQBEO9-.js";import{n as xe,t as Se}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useTransitions-ChGGrtrv.js";import{c as Te}from"./canvas-lib-22VpOI4_.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./BaseLegendToggle-aT9fOoGO.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{n as Me}from"./annotationViewport-X8fvs7pz.js";import{t as Ne}from"./Legend-DM0ClX3D.js";import{t as Pe}from"./usePanZoom-CE6Ofyy8.js";import{t as Fe}from"./vue_ui_treemap-Bv4Rdl5_.js";import{Fragment as Ie,Teleport as Le,computed as p,createBlock as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as Re,createTextVNode as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as v,mergeProps as He,nextTick as Ue,normalizeClass as We,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Ge,onMounted as Ke,openBlock as x,ref as S,renderList as qe,renderSlot as C,resolveDynamicComponent as Je,shallowRef as w,toDisplayString as Ye,toRefs as Xe,unref as T,useCssVars as Ze,useSlots as Qe,watch as $e,withCtx as E,withKeys as et,withModifiers as tt}from"vue";function nt(e,t){let n=e.length;if(n===0)throw Error(`Max aspect ratio cannot be computed: ${e} is an empty array`);{let r=1/0,i=-1/0,a=0;for(let t=0;t<n;t+=1){let n=e[t].normalizedValue;n<r&&(r=n),n>i&&(i=n),a+=n}return Math.max(t**2*i/a**2,a**2/(t**2*r))}}function rt(e){let{xOffset:t,yOffset:n,width:r,height:i}=e;return{x0:t,y0:n,x1:t+r,y1:n+i}}function it(e,t,n){if(e.length===0)return!0;{let r=e.concat(t);return nt(e,n)>=nt(r,n)}}function at(e){let t=[],n=e.length;for(let r=0;r<n;r+=1){let n=e[r],i=n.length;for(let e=0;e<i;e+=1)t.push(n[e])}return t}function ot(e,t){return ft({...t,children:e})}function st(e){return(e.x1-e.x0)*(e.y1-e.y0)}function ct(e,t){let{width:n,height:r,xOffset:i,yOffset:a}=dt(t),o=e.length,s=e.map(e=>e.normalizedValue||0).reduce((e,t)=>e+t,0),c=s/r,l=s/n,u=i,d=a,f=[];if(n>=r){for(let t=0;t<o;t+=1){let n=e[t],r=d+n.normalizedValue/c,i={x0:u,y0:d,x1:u+c,y1:r},a=Object.assign({},n,i);d=r,f.push(a)}return f}for(let t=0;t<o;t+=1){let n=e[t],r=u+n.normalizedValue/l,i={x0:u,y0:d,x1:r,y1:d+l},a=Object.assign({},n,i);u=r,f.push(a)}return f}function lt(e){let t=dt(e),n=t.width,r=t.height;return Math.min(n,r)}function ut(e,t){let n=e.length,r=t/e.map(e=>e.value??0).reduce((e,t)=>e+t,0),i=[],a,o;for(let t=0;t<n;t+=1)o=e[t],a=Object.assign({},o,{normalizedValue:o.value*(r||0)}),i.push(a);return i}function dt(e){let{x0:t,y0:n,x1:r,y1:i}=e;return{xOffset:t,yOffset:n,width:r-t,height:i-n}}function D(e,t,n,r){let i=e,a=t,o=n,s=r;for(;;){let e=i.length;if(e===0){let e=ct(a,o);return s.concat(e)}let t=lt(o),n=i[0],r=i.slice(1,e);if(it(a,n,t)){let e=a.concat(n);i=r,a=e,o=o,s=s}else{let e=a.length,t=0;for(let n=0;n<e;n+=1)t+=a[n].normalizedValue;let n=pt(o,t),r=ct(a,o),c=s.concat(r);i=i,a=[],o=n,s=c}}}function ft(e){if(e.children===void 0||!e.children.length)return[e];{let t=D(ut(e.children,st(e)),[],e,[]),n=t.length,r=[];for(let e=0;e<n;e+=1)r.push(ft(t[e]));return at(r)}}function pt(e,t){let{width:n,height:r,xOffset:i,yOffset:a}=dt(e);if(n>=r){let e=t/r,o=n-e;return rt({xOffset:i+e,yOffset:a,width:o,height:r})}{let e=t/n,o=r-e;return rt({xOffset:i,yOffset:a+e,width:n,height:o})}}var mt=/* @__PURE__ */ e({default:()=>Ut}),ht=[`id`],gt=[`id`],_t=[`id`],vt=[`tabindex`,`onClick`,`onKeydown`,`data-last-crumb`,`onMouseenter`,`onFocus`],yt={class:`vue-ui-treemap-crumb-unit`},bt={class:`vue-ui-treemap-crumb-unit-label`},xt={key:0,style:{width:`24px`,display:`flex`,"align-items":`center`}},St={key:0,class:`vue-ui-treemap-crumb-unit-arrow`},Ct={style:{position:`relative`}},wt=[`xmlns`,`aria-describedby`,`viewBox`],Tt={key:0},Et=[`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`,`onMouseenter`,`onMouseleave`],Dt=[`id`],Ot=[`x`,`y`,`width`,`height`],kt=[`clip-path`],At=[`transform`],jt=[`transform`],Mt=[`x`,`y`,`fill`,`font-size`,`font-family`,`font-weight`],Nt={key:0},Pt=[`x`,`y`,`height`,`width`],Ft={style:{width:`100%`,height:`100%`,overflow:`hidden`},class:`vue-ui-treemap-cell`},It={key:0,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Lt={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Rt={key:6,class:`vue-data-ui-watermark`},zt=[`id`],Bt=[`onClick`],Vt={style:{display:`flex`,"align-items":`center`}},Ht=4,Ut=/*#__PURE__*/ de({__name:`vue-ui-treemap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:de,emit:nt}){Ze(e=>({v55d3d2fe:Oi.value}));let rt=Ve(()=>import(`./DataTable-5Ug6gMAX.js`)),it=Ve(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),at=Ve(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),st=Ve(()=>import(`./Tooltip-C1q0Qoh7.js`)),ct=Ve(()=>import(`./UserOptions-BUXg7qOC.js`).then(e=>e.n)),lt=Ve(()=>import(`./PackageVersion-CHQWwTik.js`).then(e=>e.t)),ut=Ve(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_treemap:dt}=t(),D=e,ft=nt,pt=Qe(),mt=p(()=>!!D.dataset&&D.dataset.length),Ut=p(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),O=S(c()),Wt=S(!1),Gt=S(``),Kt=S(!1),qt=S(0),k=S([]),Jt=w(null),Yt=w(null),Xt=w(null),Zt=w(null),Qt=w(null),$t=S(0),en=S(0),tn=S(0),A=S([]),nn=S(null),rn=S(!1),an=S(null),on=S(null),sn=S(null),cn=S(/* @__PURE__ */ new Map),j=S(null),ln=S({x:0,y:0}),un=S(`pointer`),dn=S(!1),M=S(bn()),N=p(()=>M.value.userOptions),P=p(()=>M.value.style.chart.tooltip),F=p(()=>M.value.style.chart.legend),I=p(()=>M.value.style.chart.layout.labels),L=p(()=>M.value.style.chart.layout),R=p(()=>M.value.style.chart);le({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiTreemap`,rules:[ue.emptyArray,{test:e=>e.length===1&&e[0]?.children&&e[0].children.length<6&&e[0].children.length>0||e.flatMap(e=>e?.children?.length??0).reduce((e,t)=>e+t,0)<6,message:[`👀 The number of data points is < 6. Consider:`,``,`▶️ Using another type of chart instead to better show proportions: VueUiDonut, VueUiWaffle`]},{test:e=>e.length===1&&e[0]?.children&&e[0].children.length===0,message:[`👀 There is a series defined in the dataset but it has no children items.`,``,`▶️ Add children items to your series.`]}]});let{transitionEnabled:fn}=we({config:()=>M.value.transitions,dataset:()=>D.dataset}),z=p(()=>M.value.userOptions.useCursorPointer),pn=p(()=>ee({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#999999`,layout:{labels:{showDefaultLabels:!1},rects:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:mn,FINAL_DATASET:hn,manualLoading:gn}=se({...Xe(D),FINAL_CONFIG:M,prepareConfig:bn,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,value:53,color:`#CACACA90`,children:[{name:`_`,value:21},{name:`_`,value:13},{name:`_`,value:8},{name:`_`,value:5},{name:`_`,value:3},{name:`_`,value:2},{name:`_`,value:1}]}],skeletonConfig:ee({defaultConfig:M.value,userConfig:pn.value})}),{userOptionsVisible:_n,setUserOptionsVisibility:vn,keepUserOptionState:yn}=Ae({config:M.value}),{svgRef:B}=je({config:R.value.title});function bn(){return fe(D.config,dt,Fe)}let xn=l(D.config);$e(()=>D.config,(e,t)=>{let n=l(e),r=n!==xn;xn=n;let i=bn();r?(mn.value||(M.value=i),_n.value=!M.value.userOptions.showOnChartHover,$t.value+=1,en.value+=1,tn.value+=1,V.value.showTable=M.value.table.show,V.value.showTooltip=P.value.show,V.value.showZoom=R.value.zoom?.show??!1):(M.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Sn,isImaging:Cn,generatePdf:wn,generateImage:Tn}=Ce({elementId:`treemap_${O.value}`,fileName:R.value.title.text||`vue-ui-treemap`,options:M.value.userOptions.print}),En=p(()=>M.value.userOptions.show&&!R.value.title.text),Dn=p(()=>ae(M.value.customPalette)),V=S({showTable:M.value.table.show,showTooltip:P.value.show,showZoom:R.value.zoom?.show??!1});$e(M,()=>{V.value={showTable:M.value.table.show,showTooltip:P.value.show,showZoom:R.value.zoom?.show??!1}},{immediate:!0});let On=S({height:R.value.height,width:R.value.width});function kn(e){let t=Jt.value,n=On.value.height;return!t||!n?e:e*(n/t.getBoundingClientRect().height)}function An(){if(!nn.value||X.value.length<=1)return 0;let e=nn.value,t=getComputedStyle(e);return kn(e.offsetHeight+parseFloat(t.marginTop||`0`)+parseFloat(t.marginBottom||`0`)+parseFloat(t.paddingTop||`0`)+parseFloat(t.paddingBottom||`0`))}let H=p(()=>{let e=R.value.padding,t=On.value.width,n=On.value.height,r=An(),i=e.left,a=t-e.right,o=e.top,s=n-e.bottom-r;return{left:i,top:o,right:a,bottom:s,width:a-i,height:Math.max(0,s-o),vbWidth:t,vbHeight:n-r,offsetY:r}}),U=S(d(hn.value)),W=S(U.value),jn=w(/* @__PURE__ */ new Map);$e([U,()=>M.value],()=>{sn.value=null,cn.value=/* @__PURE__ */ new Map},{deep:!0}),$e(()=>k.value,()=>{sn.value=null,cn.value=/* @__PURE__ */ new Map,Fn(),tn.value+=1,en.value+=1},{deep:!0}),$e([()=>On.value.width,()=>On.value.height],()=>{cn.value=/* @__PURE__ */ new Map});function Mn(e){Array.isArray(e)&&e.forEach((e,t)=>{e.id||=c(),e.sourceColor===void 0&&(e.sourceColor=s(e.color)||null);let n=e.sourceColor||jn.value.get(e.id)||Dn.value[t]||o[t]||o[t%o.length];n=s(n),jn.value.set(e.id,n),e.color=n,Nn(e,n)})}function Nn(e,t){Array.isArray(e.children)&&e.children.forEach(n=>{n.id||=c(),n.parentId=e.id,n.sourceColor===void 0&&(n.sourceColor=s(n.color)||null);let r=n.sourceColor||t;n.color=r,Nn(n,r)})}function Pn(e){let t=Y(e);for(;t?.parentId;)t=Y(t.parentId);return t?.id??null}function Fn(){let e=U.value.filter(e=>!k.value.includes(e.id));if(!A.value.length){W.value=e;return}let t=A.value[A.value.length-1],n=Y(t);if(!n){A.value=[],W.value=e;return}let r=Pn(n.id);r&&k.value.includes(r)?(A.value=[],W.value=e):W.value=[n]}$e(()=>hn.value,()=>{U.value=d(hn.value),Mn(U.value),Fn(),tn.value+=1,en.value+=1},{deep:!0,immediate:!0,flush:`post`});let In=w(null),Ln=w(null);Ke(()=>{rn.value=!0,zn()});let Rn=p(()=>M.value.debug);Ke(()=>{pt[`chart-background`]&&Rn.value&&console.warn(`VueUiTreemap does not support the #chart-background slot.`)});function zn(){if(oe(D.dataset)&&u({componentName:`VueUiTreemap`,type:`dataset`,debug:Rn.value}),Mn(U.value),oe(D.dataset)||(gn.value=M.value.loading),M.value.responsive){let e=Te(()=>{let{width:e,height:t}=Ee({chart:Jt.value,title:R.value.title.text?Yt.value:null,legend:F.value.show?Xt.value:null,source:Zt.value,noTitle:Qt.value});requestAnimationFrame(()=>{On.value.width=e,On.value.height=t-12})});In.value&&(Ln.value&&In.value.unobserve(Ln.value),In.value.disconnect()),In.value=new ResizeObserver(e),Ln.value=Jt.value.parentNode,In.value.observe(Ln.value)}}Ge(()=>{In.value&&(Ln.value&&In.value.unobserve(Ln.value),In.value.disconnect())});let Bn=p(()=>W.value.map((e,t)=>({...e,color:s(e.color)||Dn.value[t]||o[t]||o[t%o.length]})).filter(e=>!k.value.includes(e.id))),Vn=p(()=>U.value.filter(e=>!k.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0)),Hn=p({get(){let e=[...Bn.value];return L.value.sorted&&(e=[...Bn.value].sort((e,t)=>t.value-e.value)),e.map(e=>({...e}))},set(e){return e}});function Un(e,t){return e.value/t}function Wn(e,t,n){let r=L.value.rects.colorRatio-Un(t,n);return a(e,r<0?0:r)}function Gn(e){return Array.isArray(e.children)&&e.children.length>0}function Kn(e){return[...e].sort((e,t)=>{let n=Gn(e),r=Gn(t);if(n!==r)return n-r;let i=Number(e.value)||0;return(Number(t.value)||0)-i})}function qn(e,t,n,r,i){return Kn(e).map((e,a)=>{let c=e.sourceColor||s(e.color)||s(t)||Dn.value[a]||o[a]||o[a%o.length],l=e.sourceColor?e.sourceColor:Wn(c,e,r),u=Un(e,r),d=i??e.parentId??e.id,f=Array.isArray(e.children)&&e.children.length&&e.children.reduce((e,t)=>e+(Number(t.value)||0),0)||1;return{...e,color:l,proportion:u,parentName:n,rootId:d,children:Array.isArray(e.children)&&e.children.length?qn(e.children,c,e.name,f,d):void 0}})}function Jn(e){let t=sr(e),n=Yn(e),r=t*.55,i=t*.55,a=t*1.05,o=t*1.05,s=t*.35,c=n?a+o+s:t*.45,l=e.x0+r,u=e.x1-r,d=e.y0+c,f=e.y1-i;return u<=l||f<=d?null:{x0:l,y0:d,x1:u,y1:f}}function Yn(e){return I.value.hideUnderProportion===0||Xn(e)}function Xn(e){let t=Number(I.value.hideUnderProportion);return!Number.isFinite(t)||t<=0||e.proportion>t}function Zn(e,t,n=0,r=null){if(!Array.isArray(e)||!e.length)return[];let i=e.map(e=>{let{children:t,...n}=e;return{...n}}),a=new Map(e.map(e=>[e.id,Array.isArray(e.children)?e.children:[]])),o=new Map(e.map(e=>[e.id,e])),s=ot(i,t),c=[];for(let e of s){let t=a.get(e.id)||[],i=o.get(e.id),s={...e,depth:n,parentId:r??e.parentId??null,color:i?.color??e.color??null,children:t,isVisibleNode:!0,showLabel:Yn(e)};if(c.push(s),t.length){let r=Jn(s);r&&c.push(...Zn(t,r,n+1,e.id))}}return c}let Qn=p(()=>{let e=W.value.length?W.value:Hn.value,t=e.map(e=>Number(e.value)||0).reduce((e,t)=>e+t,0)||1;return Zn(e.map((e,n)=>{let r=e.children?e.children.reduce((e,t)=>e+(Number(t.value)||0),0):e.value,{children:i,...a}=e,l=e.sourceColor||s(e.color)||jn.value.get(e.id)||Dn.value[n]||o[n]||o[n%o.length],u=e.sourceColor?e.sourceColor:Wn(l,e,t);return{...a,id:e.id||c(),parentId:e.parentId??null,name:e.name,value:e.value,color:u,proportion:(Number(e.value)||0)/t,children:Array.isArray(e.children)&&e.children.length?qn(e.children,l,e.name,r||1):void 0}}),{x0:H.value.left,y0:H.value.top,x1:H.value.left+H.value.width,y1:H.value.top+H.value.height})}),G=p(()=>Qn.value);function $n(e){return(Z.value&&Z.value.id===e.id?L.value.rects.selected.strokeWidth:L.value.rects.strokeWidth)*Ur.value}function K({y0:e,y1:t}){return t-e<=0?1e-4:Math.round((t-e)*1e4)/1e4}function q({x0:e,x1:t}){return t-e<=0?1e-4:Math.round((t-e)*1e4)/1e4}function er(){let e=I.value,t=Number(e.minFontSize),n=Number(e.fontSize),r=Math.max(0,Math.min(Number.isFinite(t)?t:0,Number.isFinite(n)?n:0));return{lowerBound:r,upperBound:Math.max(r,Number.isFinite(n)?n:r)}}function tr(e){let t=Math.min(4,Math.max(e*.25,.5));return{paddingX:t,paddingTop:t}}function nr(e,t){let{paddingX:n,paddingTop:r}=tr(t),i=t*1.1;return{x:e.x0+n,y:e.y0+r,width:Math.max(q(e)-n*2,0),height:Math.max(K(e)-r*2,0),lineHeight:i}}function rr(e,t){return f(I.value.formatter,e.value,n({p:I.value.prefix,v:e.value,s:I.value.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}function ir(e,t){let n=rr(e,t);return Array.isArray(e.children)&&e.children.length?[`${e.name} (${n})`]:[`${e.name}`,n].filter(e=>`${e}`.length)}function ar(e,t,n){let r=ir(e,n),i=nr(e,t);return!r.length||i.width<=0||i.height<=0||r.length*i.lineHeight>i.height?!1:r.every((e,n)=>bi(e,t,n===0?500:400)<=i.width)}function or(e,t,n,r){let i=ir(e,t),a=Math.max(1,...i.map(e=>String(e).length)),o=Math.min(18,Math.max(10,Math.ceil(a*.7))),s=Math.max(1,i.length),c=Math.max(q(e)-1,1e-4),l=Math.max(K(e)-1,1e-4),u=c/(o*.58),d=l/(s*1.35);return Math.max(n,Math.min(r,u,d))}function sr(e,t){let{lowerBound:n,upperBound:r}=er(),i=Math.max(1e-4,Math.min(q(e),K(e))),a=Math.max(n,Math.min(r,i*.9)),o=Math.min(a,or(e,t,n,r));if(ar(e,o,t)||!ar(e,n,t))return o;let s=n,c=o,l=n;for(let n=0;n<8;n+=1){let n=(s+c)/2;ar(e,n,t)?(l=n,s=n):c=n}let u=Math.max(n,o*.7);return l>=u?l:o}function cr(e){Kt.value=e,qt.value+=1}let J=p(()=>({x:0,y:0,width:H.value.vbWidth,height:H.value.vbHeight}));function Y(e,t=U.value){for(let n of t){if(n.id===e)return n;if(n.children){let t=Y(e,n.children);if(t)return t}}return null}function lr(e){let t=[],n=Y(e);for(;n&&n.parentId;){let e=Y(n.parentId);if(!e)break;t.unshift(e.id),n=e}return t}let ur=p(()=>A.value.length>0);function dr(){W.value=U.value.slice(),A.value=[],ft(`selectDatapoint`,void 0)}function fr(){return A.value[A.value.length-1]??null}function pr(e,t,n){A.value=[...lr(e.id),e.id],W.value=[e],M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t??e,seriesIndex:n}),ft(`selectDatapoint`,t??e)}function mr(e,t){let n=fr();if(!n){dr();return}let r=Y(n);if(!r?.parentId){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t}),dr();return}let i=Y(r.parentId);i?(A.value=[...lr(i.id),i.id],W.value=[i],M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t}),ft(`selectDatapoint`,e)):dr()}function hr(e,t){if(!e){dr();return}let n=Y(e.id);n&&(fr()===n.id?mr(e,t):pr(n,e,t))}function gr(e){return e?fr()===e.id:!1}let X=p(()=>{let e=[{id:null,label:`All`}];if(A.value.length>0){let t=Y(A.value[A.value.length-1]),n=[];for(;t;)n.unshift(t),t=t.parentId?Y(t.parentId):null;for(let t of n)e.push({id:t.id,label:t.name,node:t})}return e}),Z=w(null),_r=p(()=>U.value.map((e,t)=>({...e,color:s(e.color)||Dn.value[t]||o[t]||o[t%o.length],shape:`square`})).sort((e,t)=>t.value-e.value).map((e,t)=>{let r=e.value/U.value.map(e=>e.value).reduce((e,t)=>e+t,0);return{...e,proportion:r,isSegregated:k.value.includes(e.id),segregate:()=>xr(e),opacity:k.value.includes(e.id)?.5:1,display:`${e.name}${F.value.showPercentage||F.value.showValue?`: `:``}${F.value.showValue?f(I.value.formatter,e.value,n({p:I.value.prefix,v:e.value,s:I.value.suffix,r:F.value.roundingValue}),{datapoint:e}):``}${F.value.showPercentage?k.value.includes(e.id)?`${F.value.showValue?` (`:``}- %${F.value.showValue?`)`:``}`:`${F.value.showValue?` (`:``}${isNaN(e.value/Vn.value)?`-`:(e.value/Vn.value*100).toFixed(F.value.roundingPercentage)}%${F.value.showValue?`)`:``}`:``}`}})),vr=p(()=>({cy:`treemap-div-legend`,backgroundColor:F.value.backgroundColor,color:F.value.color,fontSize:F.value.fontSize,paddingBottom:12,fontWeight:F.value.bold?`bold`:``})),yr=p(()=>k.value.length===_r.value.length);function br(){k.value.length?k.value=[]:_r.value.forEach(e=>{k.value.push(e.id)}),ft(`selectLegend`,U.value.filter(e=>!k.value.includes(e.id)))}function xr(e){Z.value=null,k.value.includes(e.id)?k.value=k.value.filter(t=>t!==e.id):k.value.length<D.dataset.length-1&&k.value.push(e.id),ft(`selectLegend`,U.value.filter(e=>!k.value.includes(e.id)))}function Sr(e){return U.value.length?U.value.find(t=>t.name===e)||(Rn.value&&console.warn(`VueUiTreemap - Series name not found "${e}"`),null):(Rn.value&&console.warn(`VueUiTreemap - There are no series to show.`),null)}function Cr(e){let t=Sr(e);t!==null&&k.value.includes(t.id)&&xr({id:t.id})}function wr(e){let t=Sr(e);t!==null&&(k.value.includes(t.id)||xr({id:t.id}))}function Tr({datapoint:e,seriesIndex:t}){Z.value=null,Wt.value=!1,j.value=null,un.value=`pointer`,M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t})}let Er=S(null);function Dr({datapoint:e,seriesIndex:t,triggerMode:r=`pointer`}){if(yr.value||r===`pointer`&&Lr.value)return;M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:t}),j.value=t,un.value=r,Z.value=e,Er.value={datapoint:e,seriesIndex:t,config:M.value,series:Bn.value};let a=P.value.customFormat;if(i(a)&&ne(()=>a({seriesIndex:t,datapoint:e,series:Bn.value,config:M.value})))Gt.value=a({seriesIndex:t,datapoint:e,series:Bn.value,config:M.value});else{let r=``;r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${e.color}"/></svg>`,r+=`<b>${f(I.value.formatter,e.value,n({p:I.value.prefix,v:e.value,s:I.value.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b>`,Gt.value=`<div>${r}</div>`}Wt.value=!0}let Q=p(()=>({head:G.value.map(e=>({name:e.name,color:e.color})),body:G.value.map(e=>e.value)}));function Or(e=null){Ue(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t]],[isNaN(Q.value.body[t]/Vn.value)?`-`:Q.value.body[t]/Vn.value*100]]),n=[[R.value.title.text],[R.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),i=r(n);e?e(i):te({csvContent:i,title:R.value.title.text||`vue-ui-treemap`})})}let kr=p(()=>{let e=[M.value.table.columnNames.series,M.value.table.columnNames.value,M.value.table.columnNames.percentage],t=Q.value.head.map((e,t)=>{let r=f(I.value.formatter,Q.value.body[t],n({p:I.value.prefix,v:Q.value.body[t],s:I.value.suffix,r:M.value.table.td.roundingValue}));return[{color:e.color,name:e.name,shape:`square`},r,isNaN(Q.value.body[t]/Vn.value)?`-`:n({v:Q.value.body[t]/Vn.value*100,s:`%`,r:M.value.table.td.roundingPercentage})]}),r={th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint};return{colNames:[M.value.table.columnNames.series,M.value.table.columnNames.value],head:e,body:t,config:r}});function Ar(){return G.value}function jr(){V.value.showTable=!V.value.showTable}function Mr(){V.value.showTooltip=!V.value.showTooltip}function Nr(){V.value.showZoom=!V.value.showZoom}let Pr=S(!1);function Fr(){Pr.value=!Pr.value}let Ir=p(()=>!Pr.value&&V.value.showZoom),Lr=S(null),Rr=S(!1),{viewBox:$,resetZoom:zr,isZoom:Br,setInitialViewBox:Vr,scale:Hr}=Pe(B,{x:J.value.x,y:J.value.y,width:Math.max(10,J.value.width),height:Math.max(10,J.value.height)},1,Ir),Ur=p(()=>1/Hr.value),Wr=p(()=>Math.min(1,I.value.fontSizeZoomFactor/Math.max(Hr.value,1e-4))),Gr=p(()=>`scale(${Wr.value})`),Kr=p(()=>V.value.showZoom||Br.value);$e([()=>J.value.x,()=>J.value.y,()=>J.value.width,()=>J.value.height],()=>{Ue(()=>{Vr({x:J.value.x,y:J.value.y,width:Math.max(10,J.value.width),height:Math.max(10,J.value.height)})})},{immediate:!0});function qr(e){Ir.value&&(e.button===void 0||e.button===0)&&(Lr.value={x:e.clientX,y:e.clientY},Rr.value=!1)}function Jr(e){if(!Ir.value||!Lr.value)return;let t=e.clientX-Lr.value.x,n=e.clientY-Lr.value.y;Math.hypot(t,n)>Ht&&(Rr.value=!0)}function Yr(){Lr.value=null,Rr.value&&window.setTimeout(()=>{Rr.value=!1},0)}function Xr(e,t){Rr.value||hr(e,t)}let Zr=S(null);function Qr(e){Zr.value=e}function $r(){Zr.value=null}let ei=pe(Jt,()=>R.value.title.text),ti=p(()=>ve({config:M,style:R,mutableConfig:V,dialog:ut,accordion:at,isFullscreen:Kt,parent:Jt,maxWidth:800,isCursorPointer:z}));$e(()=>V.value.showTable,e=>_e(e,M,an));function ni(){V.value.showTable=!1,on.value&&on.value.setTableIconState(!1)}let ri=p(()=>_r.value.map(e=>({...e,name:e.display}))),ii=p(()=>R.value.backgroundColor),ai=p(()=>R.value.title),{isCallbackImaging:oi,isCallbackSvg:si,generateSvg:ci,onGenerateImage:li}=ge({svg:B,title:ai,legend:F,legendItems:ri,backgroundColor:ii,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Tn});function ui(e,t){let n=sr(e,t),{paddingX:r,paddingTop:i}=tr(n);return{fontSize:n,paddingX:r,paddingTop:i,lineHeight:n*1.1}}function di(e){return re(e.color??R.value.backgroundColor)}function fi({availableHeight:e,lineHeight:t,lineIndex:n}){if(n===0)return 1/0;let r=e/(n+1);return r<1e-4?-1/0:t<=0?1/0:r/t}function pi(){return Number(I.value.hideUnderProportion)===0}function mi(e){let t=Wr.value;return e.alwaysShowAllLines?`scale(${Math.min(t,e.allLinesScaleCap)})`:Gr.value}function hi({rect:e,seriesIndex:t}){if(!e||!I.value.showDefaultLabels||!Yn(e))return null;let{fontSize:n,paddingX:r,paddingTop:i,lineHeight:a}=ui(e,t),o=di(e),s=ir(e,t).map(e=>String(e??``)),c=nr(e,n);if(!s.some(Boolean)||c.width<=0||c.height<=0)return null;let l=pi(),u=l?Math.max(1e-4,Math.min(1,c.height/Math.max(s.length*a,1e-4))):1,d=`treemap_clip_${O.value}_${e.id}`,f=e.x0,ee=e.y0,te=Math.max(q(e),0),ne=Math.max(K(e),0);return{key:gi(e),clipId:d,clipX:f,clipY:ee,clipWidth:te,clipHeight:ne,translate:`translate(${e.x0}, ${e.y0})`,alwaysShowAllLines:l,allLinesScaleCap:u,lines:s.map((t,s)=>({key:`${e.id}_${s}`,text:t,x:r,y:i+a*s,maxZoomFactor:fi({availableHeight:c.height,lineHeight:a,lineIndex:s}),fill:o,fontSize:n,fontFamily:M.value.style.fontFamily,fontWeight:s===0?500:400}))}}function gi(e){return`${e.id}`}let _i=p(()=>pt.rect||mn.value||!I.value.showDefaultLabels||yr.value?[]:G.value.map((e,t)=>e.showLabel?hi({rect:e,seriesIndex:t}):null).filter(Boolean)),vi;function yi(){return typeof document>`u`?null:(vi||=document.createElement(`canvas`),vi.getContext(`2d`))}function bi(e,t,n=400){let r=yi();return r?(r.font=`${n} ${t}px ${M.value.style.fontFamily}`,r.measureText(String(e)).width):e.length*t*.6}function xi(e){let t=L.value.rects.borderRadius,n=q(e),r=K(e);return Math.min(t,Math.min(n,r)/6)}async function Si(){ft(`copyAlt`,{config:M.value,dataset:G.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:G.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Ci(){j.value=null,dn.value=!0}function wi(){j.value=null,un.value=`pointer`,Wt.value=!1,Z.value=null,dn.value=!1}function Ti(e){if(!B.value||Pr.value||document.activeElement!==B.value||!G.value.length||yr.value)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){j.value=null,un.value=`pointer`,Wt.value=!1,Z.value=null;return}if(r){if(j.value===null)return;let e=G.value[j.value];if(!e)return;hr(e,j.value);return}let a=j.value,o=Z.value?G.value.findIndex(e=>e.id===Z.value.id):null,s=a!==null&&a>=0&&a<G.value.length,c=o!==null&&o>=0&&o<G.value.length;s?n?(a+=1,a>=G.value.length&&(a=0)):t&&(--a,a<0&&(a=G.value.length-1)):c?(a=n?o+1:o-1,a>=G.value.length&&(a=0),a<0&&(a=G.value.length-1)):a=n?0:G.value.length-1;let l=G.value[a];l&&(Ei(a),Dr({datapoint:l,seriesIndex:a,triggerMode:`keyboard`}))}function Ei(e){if(!Number.isFinite(e)||!B.value)return;let t=G.value[e];if(!t)return;let n=t.x0+q(t)/2,r=t.y0+K(t)/2,i=B.value.getBoundingClientRect();ln.value={x:i.left+(n-$.value.x)/$.value.width*i.width,y:i.top+(r-$.value.y)/$.value.height*i.height}}let Di=p(()=>({headers:kr.value?.colNames??[],rows:kr.value?.body??[]})),Oi=p(()=>R.value.color);de({getData:Ar,getImage:ei,generateCsv:Or,generateImage:Tn,generateSvg:ci,generatePdf:wn,hideSeries:wr,showSeries:Cr,toggleTable:jr,toggleTooltip:Mr,toggleZoom:Nr,toggleAnnotator:Fr,toggleFullscreen:cr,resetZoom:zr,copyAlt:Si});let ki=p(()=>Me(M.value.userOptions?.annotator?.followZoom,$.value));return(e,t)=>(x(),g(`div`,{ref_key:`treemapChart`,ref:Jt,class:We(`vue-data-ui-component vue-ui-treemap ${Kt.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),style:b(`font-family:${M.value.style.fontFamily};width:100%; ${M.value.responsive?`height: 100%;`:``} text-align:center;background:${R.value.backgroundColor}`),id:`treemap_${O.value}`,onMouseenter:t[3]||=()=>T(vn)(!0),onMouseleave:t[4]||=()=>T(vn)(!1)},[_(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[_(`p`,null,Ye(M.value.a11y.translations.keyboardNavigation),1)],8,gt),Di.value?.rows?.length?(x(),m(ke,{key:0,uid:O.value,head:Di.value.headers,body:Di.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):h(``,!0),N.value.buttons.annotator?(x(),m(T(it),{key:1,showGroupActions:N.value.annotator?.showGroupActions??!0,svgRef:T(B),followZoom:M.value.userOptions?.annotator?.followZoom,annotationViewport:ki.value,backgroundColor:R.value.backgroundColor,color:R.value.color,active:Pr.value,isCursorPointer:z.value,palette:N.value.annotatorPalette,onClose:Fr},Re({_:2},[qe(T(be),t=>({name:t,fn:E(n=>[C(e.$slots,t,y(v(T(ye)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):h(``,!0),En.value?(x(),g(`div`,{key:2,ref_key:`noTitle`,ref:Qt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):h(``,!0),R.value.title.text?(x(),g(`div`,{key:3,ref_key:`chartTitle`,ref:Yt,style:b(`width:100%;background:${R.value.backgroundColor};padding-bottom:6px`)},[(x(),m(he,{key:`title_${$t.value}`,config:{title:{cy:`treemap-div-title`,...R.value.title},subtitle:{cy:`treemap-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],4)):h(``,!0),_(`div`,{id:`legend-top-${O.value}`},null,8,_t),N.value.show&&mt.value&&(T(yn)||T(_n))?(x(),m(T(ct),{ref_key:`userOptionsRef`,ref:on,key:`user_option_${qt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:T(Sn),isImaging:T(Cn),uid:O.value,hasTooltip:N.value.buttons.tooltip&&P.value.show,hasPdf:N.value.buttons.pdf,hasXls:N.value.buttons.csv,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasTable:N.value.buttons.table,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Kt.value,isTooltip:V.value.showTooltip,titles:{...N.value.buttonTitles},chartElement:Jt.value,position:N.value.position,hasAnnotator:N.value.buttons.annotator,isAnnotation:Pr.value,callbacks:N.value.callbacks,printScale:N.value.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:z.value,hasZoom:N.value.buttons.zoom,isZoom:V.value.showZoom,onToggleFullscreen:cr,onGeneratePdf:T(wn),onGenerateCsv:Or,onGenerateImage:T(li),onGenerateSvg:T(ci),onToggleTable:jr,onToggleTooltip:Mr,onToggleAnnotator:Fr,onToggleZoom:Nr,onCopyAlt:Si,style:b({visibility:T(yn)?T(_n)?`visible`:`hidden`:`visible`})},Re({_:2},[qe(T(xe)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,y(v(T(Se)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.hasZoom.isZoom.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):h(``,!0),X.value.length>1?(x(),g(`nav`,{key:5,class:`vue-ui-treemap-breadcrumbs`,"data-dom-to-png-ignore":``,ref_key:`breadcrumbsNav`,ref:nn},[(x(!0),g(Ie,null,qe(X.value,(n,r)=>(x(),g(`span`,{role:`button`,tabindex:r<X.value.length-1?0:void 0,key:n.id||`root`,onClick:e=>r===X.value.length-1?()=>{}:hr(n.node),onKeydown:[et(tt(e=>r===X.value.length-1?void 0:hr(n.node),[`prevent`]),[`enter`]),et(tt(e=>r===X.value.length-1?void 0:hr(n.node),[`prevent`]),[`space`])],class:`vue-ui-treemap-crumb`,"data-last-crumb":r===X.value.length-1,style:b({color:R.value.color,cursor:z.value?`pointer`:`default`}),onMouseenter:e=>Qr(r),onMouseleave:$r,onFocus:e=>Qr(r),onBlur:$r},[_(`span`,yt,[_(`span`,bt,[C(e.$slots,`breadcrumb-label`,He({ref_for:!0},{crumb:n,isRoot:r===0,isFocus:Zr.value===r}),()=>[r===0?(x(),g(`div`,xt,[Be(me,{name:Zr.value===0?`homeFilled`:`home`,stroke:R.value.color},null,8,[`name`,`stroke`])])):(x(),g(Ie,{key:1},[ze(Ye(n.label),1)],64))],!0)]),r<X.value.length-1?(x(),g(`span`,St,[C(e.$slots,`breadcrumb-arrow`,{},()=>[t[5]||=ze(` › `,-1)],!0)])):h(``,!0)])],44,vt))),128))],512)):h(``,!0),_(`div`,Ct,[(x(),g(`svg`,{ref_key:`svgRef`,ref:B,xmlns:T(ie),"aria-describedby":`chart-instructions-${O.value}`,class:We({"vue-data-ui-fullscreen--on":Kt.value,"vue-data-ui-fulscreen--off":!Kt.value,"vue-data-ui-zoom-plus":!ur.value,"vue-data-ui-zoom-minus":ur.value,"vue-data-ui-no-transition":!T(fn),loading:T(mn)}),viewBox:`${T($).x} ${T($).y} ${T($).width<=0?10:T($).width} ${T($).height<=0?10:T($).height}`,style:b(`max-width:100%; overflow:${Kr.value?`hidden`:`visible`}; background:transparent;color:${R.value.color}`),tabindex:`0`,onFocus:Ci,onBlur:wi,onKeydown:Ti,onPointerdown:qr,onPointermove:Jr,onPointerup:Yr,onPointercancel:Yr,onPointerleave:Yr},[Be(T(lt)),C(e.$slots,`svg-underlayer`,y(v({svg:H.value,isZoom:ur.value,rect:Z.value,config:M.value,isPrintingImg:T(Sn)||T(Cn)||T(oi),isPrintingSvg:T(si)})),void 0,!0),(x(!0),g(Ie,null,qe(G.value,(e,t)=>(x(),g(`g`,{key:`tgrad_${e.id}`},[L.value.rects.gradient.show?(x(),g(`defs`,Tt,[Be(De,{t:`radial`,id:`tgrad_${e.id}`,gradientTransform:`translate(-1, -1.000001) scale(2, 2)`,stops:[[`18%`,e.color,1],[`100%`,T(a)(e.color,L.value.rects.gradient.intensity/100),1]]},null,8,[`id`,`stops`])])):h(``,!0)]))),128)),_(`g`,null,[(x(!0),g(Ie,null,qe(G.value,(e,t)=>(x(),g(`g`,{key:`rect_${e.id}_${e.depth}`},[_(`rect`,{x:e.x0,y:e.y0,height:K(e),width:q(e),fill:Ut.value?e.color??R.value.backgroundColor:L.value.rects.gradient.show?yr.value?R.value.backgroundColor:`url(#tgrad_${e.id})`:e.color??R.value.backgroundColor,rx:T(Hr)>1?xi(e)*Ur.value:xi(e),stroke:Z.value&&Z.value.id===e.id?L.value.rects.selected.stroke:L.value.rects.stroke,"stroke-width":$n(e),onClick:tt(n=>Xr(e,t),[`stop`]),onMouseenter:()=>Dr({datapoint:e,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:n=>Tr({datapoint:e,seriesIndex:t}),style:b(`opacity:${Z.value?Z.value.id===e.id?1:L.value.rects.selected.unselectedOpacity:1}`),class:We([`vue-ui-treemap-rect`,T(fn)?`vue-data-ui-transition`:``,gr(e)?`vue-data-ui-zoom-minus`:`vue-data-ui-zoom-plus`])},null,46,Et)]))),128)),(x(!0),g(Ie,null,qe(_i.value,e=>(x(),g(`g`,{key:e.key,style:{"pointer-events":`none`}},[_(`defs`,null,[_(`clipPath`,{id:e.clipId,clipPathUnits:`userSpaceOnUse`},[_(`rect`,{class:We({"vue-data-ui-transition":T(fn)}),x:e.clipX,y:e.clipY,width:e.clipWidth,height:e.clipHeight},null,10,Ot)],8,Dt)]),_(`g`,{"clip-path":`url(#${e.clipId})`},[_(`g`,{transform:e.translate},[_(`g`,{class:We({"vue-data-ui-transition":T(fn)}),transform:mi(e)},[(x(!0),g(Ie,null,qe(e.lines,t=>(x(),g(Ie,{key:t.key},[t.text&&(e.alwaysShowAllLines||Wr.value<=t.maxZoomFactor)?(x(),g(`text`,{key:0,x:t.x,y:t.y,fill:t.fill,"font-size":t.fontSize,"font-family":t.fontFamily,"font-weight":t.fontWeight,class:We({"vue-data-ui-transition":T(fn)}),"text-anchor":`start`,"dominant-baseline":`text-before-edge`},Ye(t.text),11,Mt)):h(``,!0)],64))),128))],10,jt)],8,At)],8,kt)]))),128)),e.$slots.rect?(x(),g(`g`,Nt,[(x(!0),g(Ie,null,qe(G.value,(t,n)=>(x(),g(`g`,{key:`slot_${t.id}_${t.depth}`},[(x(),g(`foreignObject`,{x:t.x0,y:t.y0,height:K(t),width:q(t),class:`vue-ui-treemap-cell-foreignObject`,style:{"pointer-events":`none`,overflow:`hidden`}},[_(`div`,Ft,[T(mn)?h(``,!0):C(e.$slots,`rect`,He({ref_for:!0},{rect:{...t,height:K(t),width:q(t),isSelected:!Z.value||Z.value.id===t.id},shouldShow:Xn(t)||ur.value,fontSize:sr(t,n),isZoom:ur.value,textColor:T(re)(t.color)}),void 0,!0,0)])],8,Pt))]))),128))])):h(``,!0)]),C(e.$slots,`svg`,y(v({svg:H.value,isZoom:ur.value,rect:Z.value,config:M.value,isPrintingImg:T(Sn)||T(Cn)||T(oi),isPrintingSvg:T(si)})),void 0,!0)],46,wt)),T(Br)?(x(),g(`div`,It,[C(e.$slots,`reset-action`,{reset:T(zr)},()=>[_(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:b({background:R.value.backgroundColor,cursor:z.value?`pointer`:`default`}),onClick:t[0]||=e=>T(zr)(!0)},[Be(me,{name:`refresh`,stroke:R.value.color},null,8,[`stroke`])],4)],!0)])):h(``,!0),e.$slots.hint?(x(),g(`div`,Lt,[C(e.$slots,`hint`,y(v({hint:M.value.a11y.translations.keyboardNavigation,isVisible:dn.value})),void 0,!0)])):h(``,!0)]),e.$slots.watermark?(x(),g(`div`,Rt,[C(e.$slots,`watermark`,y(v({isPrinting:T(Sn)||T(Cn)||T(oi)||T(si)})),void 0,!0)])):h(``,!0),_(`div`,{id:`legend-bottom-${O.value}`},null,8,zt),rn.value&&(F.value.show||e.$slots.legend)?(x(),m(Le,{key:7,to:F.value.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[_(`div`,{ref_key:`chartLegend`,ref:Xt},[C(e.$slots,`legend`,{legend:_r.value},()=>[F.value.show?(x(),m(Ne,{key:`legend_${tn.value}`,legendSet:_r.value,config:vr.value,id:`treemap_legend_${O.value}`,isCursorPointer:z.value,onClickMarker:t[1]||=({legend:e})=>xr(e)},{item:E(({legend:e,index:t})=>[T(mn)?h(``,!0):(x(),g(`div`,{key:0,onClick:t=>xr(e),style:b(`opacity:${k.value.includes(e.id)?.5:1}`)},Ye(e.display),13,Bt))]),legendToggle:E(()=>[_r.value.length>2&&F.value.selectAllToggle.show&&!T(mn)?(x(),m(Oe,{key:0,backgroundColor:F.value.selectAllToggle.backgroundColor,color:F.value.selectAllToggle.color,fontSize:F.value.fontSize,checked:k.value.length>0,isCursorPointer:z.value,onToggle:br},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):h(``,!0)]),_:1},8,[`legendSet`,`config`,`id`,`isCursorPointer`])):h(``,!0)],!0)],512)],8,[`to`])):h(``,!0),e.$slots.source?(x(),g(`div`,{key:8,ref_key:`source`,ref:Zt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):h(``,!0),Be(T(st),{teleportTo:P.value.teleportTo,show:V.value.showTooltip&&Wt.value,backgroundColor:P.value.backgroundColor,color:P.value.color,fontSize:P.value.fontSize,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:Jt.value,content:Gt.value,isFullscreen:Kt.value,isCustom:T(i)(P.value.customFormat),smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:un.value===`keyboard`,a11yPosition:ln.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,y(v({...Er.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,y(v({...Er.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,y(v({...Er.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`]),mt.value&&N.value.buttons.table?(x(),m(Je(ti.value.component),He({key:9},ti.value.props,{ref_key:`tableUnit`,ref:an,onClose:ni}),Re({content:E(()=>[(x(),m(T(rt),{key:`table_${en.value}`,colNames:kr.value.colNames,head:kr.value.head,body:kr.value.body,config:kr.value.config,title:M.value.table.useDialog?``:ti.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:ni},{th:E(({th:e})=>[_(`div`,Vt,Ye(e),1)]),td:E(({td:e})=>[ze(Ye(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:E(()=>[ze(Ye(ti.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:E(()=>[_(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[2]||=e=>Or(N.value.callbacks.csv),style:b({cursor:z.value?`pointer`:`default`})},[Be(me,{name:`fileCsv`,stroke:ti.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):h(``,!0),C(e.$slots,`skeleton`,{},()=>[T(mn)?(x(),m(ce,{key:0})):h(``,!0)],!0)],46,ht))}},[[`__scopeId`,`data-v-56d2b332`]]);export{mt as n,Ut as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Dt as i,Ht as a,Jt as o,S as s,X as ee,Yt as c,Zt as te,at as ne,i as re,in as ie,n as ae,nt as oe,pt as se,r as ce,t as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-C-TwxM0Y.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./chartImage-DPGnEuYM.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./annotationSlots-RvQBEO9-.js";import{n as Ee,t as De}from"./userOptionsSlots-DYuo-E5m.js";import{t as Oe}from"./usePrinter-DVf3YcG5.js";import{t as ke}from"./useTransitions-ChGGrtrv.js";import{t as Ae}from"./Shape-CRe8woTu.js";import{c as je}from"./canvas-lib-22VpOI4_.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./DefGrad-DKMq1REY.js";import{t as Pe}from"./BaseLegendToggle-aT9fOoGO.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useUserOptionState-CXlFnwPv.js";import{t as Le}from"./useChartAccessibility-DOMuYJfm.js";import{t as Re}from"./labelUtils-CdtU-yB_.js";import{t as ze}from"./Legend-DM0ClX3D.js";import{t as Be}from"./usePrefersMotion-XLHwega2.js";import{t as Ve}from"./vue_ui_waffle-BbBLSluB.js";import{Fragment as l,Teleport as He,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ue,createTextVNode as We,createVNode as Ge,defineAsyncComponent as h,guardReactiveProps as Ke,mergeProps as qe,nextTick as Je,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Ye,onMounted as Xe,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as $e,toRefs as et,unref as C,useSlots as tt,watch as nt,withCtx as w}from"vue";var rt=/* @__PURE__ */ e({default:()=>jt}),it=[`id`],at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`aria-describedby`,`viewBox`],lt=[`id`],ut=[`x`,`y`,`height`,`width`],dt=[`height`,`width`],ft={key:0},pt=[`d`,`stroke`,`stroke-width`,`filter`],mt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],ht={key:0},gt=[`d`,`fill`,`filter`],_t=[`rx`,`x`,`y`,`height`,`width`,`stroke`,`stroke-width`,`filter`],vt=[`rx`,`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`filter`],yt={key:0},bt=[`rx`,`x`,`y`,`height`,`width`,`fill`,`filter`],xt=[`points`,`stroke`,`stroke-width`,`stroke-linejoin`],St=[`textContent`,`x`,`y`,`font-size`,`fill`,`filter`],Ct=[`d`,`onMouseover`,`onMouseleave`,`onClick`],wt=[`x`,`y`,`height`,`width`,`onMouseover`,`onMouseleave`,`onClick`],Tt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Et={key:5,class:`vue-data-ui-watermark`},Dt=[`id`],Ot=[`onClick`],kt={key:0},At={key:1},jt=/*#__PURE__*/ _e({__name:`vue-ui-waffle`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:_e,emit:rt}){let jt=h(()=>import(`./Tooltip-C1q0Qoh7.js`)),Mt=h(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),Nt=h(()=>import(`./DataTable-5Ug6gMAX.js`)),Pt=h(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),Ft=h(()=>import(`./UserOptions-BUXg7qOC.js`).then(e=>e.n)),It=h(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),Lt=h(()=>import(`./PackageVersion-CHQWwTik.js`).then(e=>e.t)),Rt=h(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_waffle:zt}=t(),Bt=Be(),T=e,Vt=tt(),Ht=u({get(){return!!T.dataset&&T.dataset.length},set(e){return e}}),E=b(ee()),Ut=b(!1),Wt=b(``),D=b(null),Gt=b(0),Kt=b(null),qt=b(null),Jt=b(null),Yt=b(null),Xt=b(null),Zt=b(0),Qt=b(0),$t=b(0),en=b(!1),tn=b(null),nn=b(null),O=b(null),rn=b({x:0,y:0}),an=b(`pointer`),on=b(!1),k=b(gn()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.chart.tooltip),M=u(()=>k.value.style.chart.legend),N=u(()=>k.value.style.chart.layout.rect),P=u(()=>k.value.style.chart.layout.grid),F=u(()=>k.value.style.chart.layout),I=u(()=>k.value.style.chart),{transitionEnabled:L}=ke({config:()=>k.value.transitions,dataset:()=>T.dataset});he({config:()=>k.value,dataset:()=>T.dataset,component:`VueUiWaffle`,rules:[ge.singleSeries,ge.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let sn=u(()=>k.value.userOptions.useCursorPointer),cn=u(()=>ie({defaultConfig:{useCustomCells:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{captions:{show:!1}},rect:{stroke:`#999999`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1}}}},userConfig:k.value.skeletonConfig??{}})),{loading:ln,FINAL_DATASET:un,manualLoading:dn}=pe({...et(T),FINAL_CONFIG:k,prepareConfig:gn,callback:()=>{Promise.resolve().then(async()=>{W.value=jn()})},skeletonDataset:T.config?.skeletonDataset??[{name:``,values:[1],color:`#AAAAAA`},{name:``,values:[1],color:`#BABABA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:ie({defaultConfig:k.value,userConfig:cn.value})}),{userOptionsVisible:fn,setUserOptionsVisibility:pn,keepUserOptionState:mn}=Ie({config:k.value}),{svgRef:hn}=Le({config:I.value.title});function gn(){return ve(T.config,zt,Ve)}let _n=te(T.config);nt(()=>T.config,(e,t)=>{let n=te(e),r=n!==_n;_n=n;let i=gn();r?(ln.value||(k.value=i),fn.value=!k.value.userOptions.showOnChartHover,bn(),Zt.value+=1,Qt.value+=1,$t.value+=1,z.value.showTable=k.value.table.show,z.value.showTooltip=j.value.show):(k.value.style.chart.tooltip=i.style.chart.tooltip,z.value.showTooltip=k.value.style.chart.tooltip.show)},{deep:!0});let R=Qe(null),vn=Qe(null),yn=u(()=>k.value.debug);function bn(){if(fe(T.dataset)?(ne({componentName:`VueUiWaffle`,type:`dataset`,debug:yn.value}),Ht.value=!1,dn.value=!0):yn.value&&T.dataset.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ne({componentName:`VueUiWaffle`,type:`datasetSerieAttribute`,property:e,index:t})})}),fe(T.dataset)||(dn.value=k.value.loading),k.value.responsive){let e=je(()=>{let{width:e,height:t}=Me({chart:Kt.value,title:I.value.title.text?qt.value:null,legend:M.value.show?Jt.value:null,source:Yt.value,noTitle:Xt.value});requestAnimationFrame(()=>{B.value.width=e,B.value.height=t,V.value.width=e,V.value.height=t})});R.value&&(vn.value&&R.value.unobserve(vn.value),R.value.disconnect()),R.value=new ResizeObserver(e),vn.value=Kt.value.parentNode,R.value.observe(vn.value)}}Xe(()=>{en.value=!0,bn()}),Ye(()=>{R.value&&(vn.value&&R.value.unobserve(vn.value),R.value.disconnect())});let{isPrinting:xn,isImaging:Sn,generatePdf:Cn,generateImage:wn}=Oe({elementId:`vue-ui-waffle_${E.value}`,fileName:I.value.title.text||`vue-ui-waffle`,options:k.value.userOptions.print}),Tn=u(()=>k.value.userOptions.show&&!I.value.title.text),En=u(()=>ue(k.value.customPalette)),z=b({showTable:k.value.table.show,showTooltip:j.value.show});nt(k,()=>{z.value={showTable:k.value.table.show,showTooltip:j.value.show}},{immediate:!0});let B=b({height:512,width:512}),V=b({top:0,left:0,height:512,width:512}),H=u(()=>(V.value.width-P.value.size*P.value.spaceBetween)/P.value.size),U=u(()=>(V.value.height-P.value.size*P.value.spaceBetween)/P.value.size),Dn=u(()=>Math.max(1e-4,V.value.width/P.value.size)),On=u(()=>Math.max(1e-4,V.value.height/P.value.size));function kn(e){let t=P.value.size*P.value.size,n=e.reduce((e,t)=>e+t,0),r=e.map(e=>e/n*t),i=r.map(Math.floor),a=r.map(e=>e%1),o=t-i.reduce((e,t)=>e+t,0);for(;o>0;){let e=a.indexOf(Math.max(...a));i[e]+=1,a[e]=0,--o}return i}let An=b(!1);function jn(){return An.value=un.value.flatMap(e=>e.values.reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0)===0,un.value.map((e,t)=>({...e,color:s(e.color)||En.value[t]||a[t]||a[t%a.length],uid:`serie_${t}`,absoluteIndex:t}))}let Mn=u(()=>jn()),W=b(Mn.value);nt(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(dn.value=!1)},{immediate:!0}),nt(()=>T.dataset,e=>{W.value=jn()},{deep:!0});let Nn=u(()=>kn(W.value.filter((e,t)=>!J.value.includes(e.uid)).map((e,t)=>An.value?1:(e.values||[]).reduce((e,t)=>e+t,0)))),Pn=u(()=>kn(W.value.map((e,t)=>An.value?1:(e.values||[]).reduce((e,t)=>e+t)))),Fn=u(()=>P.value.size**2),G=u(()=>(yn.value&&un.value.forEach((e,t)=>{[null,void 0].includes(e.values)&&ne({componentName:`VueUiWaffle`,type:`datasetSerieAttribute`,property:`values (number[])`,index:t})}),W.value.filter((e,t)=>!J.value.includes(e.uid)).map((e,t)=>{let n=Nn.value[t];return{absoluteIndex:e.absoluteIndex,uid:e.uid,name:e.name,color:e.color,value:(e.values||[]).reduce((e,t)=>e+t,0),absoluteValues:e.values||[],squareCount:n,proportion:n/Fn.value}}))),In=u(()=>W.value.map((e,t)=>{let n=Pn.value[t];return{absoluteIndex:e.absoluteIndex,uid:e.uid,name:e.name,color:e.color,value:(e.values||[]).reduce((e,t)=>e+t,0),absoluteValues:e.values||[],squareCount:n,proportion:n/Fn.value}}));function Ln(){return In.value.map(e=>({name:e.name,color:e.color,value:e.value,squareCount:e.squareCount,proportion:e.proportion}))}let Rn=u(()=>{let e=0;return G.value.map((t,n)=>{let r=e,i=r+t.squareCount,a=[];for(let e=Math.floor(r);e<Math.floor(i);e+=1)a.push(e);return e=i,{...t,start:r,rects:a}})}),K=u(()=>Rn.value.flatMap((e,t)=>e.rects.map((n,r)=>({isFirst:r===0,isLongEnough:n.length>2,name:e.name,color:e.color,value:e.value,serieIndex:t,absoluteStartIndex:r<3,serieId:e.uid,...e}))).map((e,t)=>({...e,isAbsoluteFirst:t%P.value.size===0}))),q=u(()=>{let e=[];for(let t=0;t<P.value.size;t+=1)for(let n=0;n<P.value.size;n+=1)e.push({isStartOfLine:n===0,position:P.value.vertical?t:n,x:(P.value.vertical?t:n)*(H.value+P.value.spaceBetween),y:(P.value.vertical?n:t)*(U.value+P.value.spaceBetween)+V.value.top});return e}),J=b([]),zn=b(!1),Bn=b(Object.create(null)),Vn=b(Object.create(null)),Y=b(0);function Hn(e,t){W.value=W.value.map(n=>n.uid===e?{...n,values:[t]}:n)}function Un(e,t){let n=t.find(t=>t.uid===e);return n?(n.values||[]).reduce((e,t)=>e+t,0):0}function Wn(e){let t=!1;Bn.value[e]&&(cancelAnimationFrame(Bn.value[e]),delete Bn.value[e],t=!0),Vn.value[e]&&(cancelAnimationFrame(Vn.value[e]),delete Vn.value[e],t=!0),t&&(Y.value=Math.max(0,Y.value-1),zn.value=Y.value>0)}function Gn({seriesId:e,fromValue:t,toValue:n,mode:r}){Wn(e),Y.value+=1,zn.value=!0;let i=t;return new Promise(a=>{function o(){if(r===`increase`){if(i>=n){Hn(e,n),--Y.value,Y.value<=0&&(zn.value=!1),delete Bn.value[e],a();return}i+=n*.025,i>n&&(i=n),Hn(e,i),Bn.value[e]=requestAnimationFrame(o)}else{if(i<=t/100){Hn(e,0),--Y.value,Y.value<=0&&(zn.value=!1),delete Vn.value[e],a();return}i/=1.15,Hn(e,i),Vn.value[e]=requestAnimationFrame(o)}}o()})}function Kn(){W.value=Mn.value;let e=J.value.length>0;k.value.useAnimation?e?[...J.value].forEach(e=>{qn(e,!0)}):X.value.map(e=>e.uid).forEach(e=>{qn(e,!0)}):e?J.value=[]:J.value=X.value.map(e=>e.uid)}function qn(e,t=!1){if(An.value&&!t)return;let n=t||J.value.length<X.value.length-1&&X.value.length>1;if(!k.value.useAnimation){J.value.includes(e)?J.value=J.value.filter(t=>t!==e):n&&J.value.push(e);return}let r=Un(e,Mn.value),i=Un(e,W.value);if(i!==0||r!==0){if(J.value.includes(e)){if(J.value=J.value.filter(t=>t!==e),Bt.value){Wn(e),Hn(e,r),or(`selectLegend`,G.value.map(e=>({name:e.name,color:e.color,value:e.value,proportion:e.proportion})));return}Gn({seriesId:e,fromValue:i,toValue:r,mode:`increase`}).then(()=>{or(`selectLegend`,G.value.map(e=>({name:e.name,color:e.color,value:e.value,proportion:e.proportion})))})}else n&&(Bt.value?(Wn(e),J.value.includes(e)||J.value.push(e),Hn(e,0),or(`selectLegend`,G.value.map(e=>({name:e.name,color:e.color,value:e.value,proportion:e.proportion})))):Gn({seriesId:e,fromValue:i,toValue:0,mode:`decrease`}).then(()=>{J.value.includes(e)||J.value.push(e),Hn(e,0),or(`selectLegend`,G.value.map(e=>({name:e.name,color:e.color,value:e.value,proportion:e.proportion})))}))}}function Jn(e){return In.value.length?In.value.find(t=>t.name===e)||(yn.value&&console.warn(`VueUiWaffle - Series name not found "${e}"`),null):(yn.value&&console.warn(`VueUiWaffle - There are no series to show.`),null)}function Yn(e){let t=Jn(e);t!==null&&J.value.includes(t.uid)&&qn(t.uid)}function Xn(e){let t=Jn(e);t!==null&&(J.value.includes(t.uid)||qn(t.uid))}function Zn({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return Re({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}let X=u(()=>W.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/W.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:e.color||En[t]||a[t]||a[t%a.length],value:n,proportion:r,uid:e.uid,shape:`square`}}).map((e,t)=>{let r=Zn({val:re(F.value.labels.dataLabels.formatter,e.value,n({p:F.value.labels.dataLabels.prefix,v:e.value,s:F.value.labels.dataLabels.suffix,r:M.value.roundingValue}),{datapoint:e,index:t}),percentage:isNaN(e.value/Z.value)?`-`:n({v:e.value/Z.value*100,s:`%`,r:M.value.roundingPercentage}),showVal:M.value.showValue,showPercentage:M.value.showPercentage,config:M.value});return{...e,opacity:J.value.includes(e.uid)?.5:1,segregate:()=>qn(e.uid),isSegregated:J.value.includes(e.uid),display:`${e.name}${M.value.showPercentage||M.value.showValue?`: `:``}${r}`}})),Qn=u(()=>({cy:`waffle-div-legend`,backgroundColor:M.value.backgroundColor,color:M.value.color,fontSize:M.value.fontSize,paddingBottom:12,fontWeight:M.value.bold?`bold`:``})),Z=u(()=>G.value.map(e=>e.value).reduce((e,t)=>e+t,0)),$n=b(null),er=b(null),Q=u(()=>{let e=/* @__PURE__ */ new Map;return K.value.forEach((t,n)=>{e.has(t.serieIndex)?e.get(t.serieIndex).rectIndexes.push(n):e.set(t.serieIndex,{serieIndex:t.serieIndex,absoluteIndex:t.absoluteIndex,serieId:t.serieId,name:t.name,color:t.color,value:t.value,proportion:t.proportion,rectIndexes:[n]})}),Array.from(e.values()).sort((e,t)=>e.serieIndex-t.serieIndex)});function tr(e){return Q.value.find(t=>t.serieIndex===e)||null}function nr(e){let t=tr(e);return!t||!t.rectIndexes.length?null:t.rectIndexes[0]}function rr(e){let t=K.value[e];k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:t,seriesIndex:t.serieIndex})}function ir(e){let t=K.value[e];k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:t,seriesIndex:t.serieIndex}),er.value=null,Ut.value=!1,D.value=null,O.value=null,an.value=`pointer`}function ar(e,t=`pointer`){if(J.value.length===T.dataset.length)return;let r=K.value[e];if(!r)return;an.value=t,O.value=r.serieIndex,$n.value={datapoint:r,seriesIndex:r.absoluteIndex,series:W.value,config:k.value},k.value.events.datapointEnter&&er.value!==r.serieIndex&&k.value.events.datapointEnter({datapoint:r,seriesIndex:r.serieIndex}),er.value=r.serieIndex,Ut.value=!0,D.value=r.serieIndex;let a=j.value.customFormat;if(i(a)&&se(()=>a({seriesIndex:r.absoluteIndex,datapoint:r,series:W.value,config:k.value})))Wt.value=a({seriesIndex:r.absoluteIndex,datapoint:r,series:W.value,config:k.value});else{let e=``;e+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${j.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,e+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${r.color}" />${Vt.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${E.value}_${r.absoluteIndex})"/>`:``}</svg>`,e+=`<b>${Zn({config:j.value,showVal:j.value.showValue,showPercentage:j.value.showPercentage,val:`<span>${re(F.value.labels.dataLabels.formatter,r.value,n({p:F.value.labels.dataLabels.prefix,v:r.value,s:F.value.labels.dataLabels.suffix,r:j.value.roundingValue}),{datapoint:r,seriesIndex:r.absoluteIndex,series:W.value})}</span>`,percentage:`<span>${n({v:An.value?1/un.value.length*100:r.value/Z.value*100,s:`%`,r:j.value.roundingPercentage})}</span>`})}</b></div>`,Wt.value=e}}let or=rt,$=u(()=>({head:G.value.map(e=>({name:e.name,color:e.color})),body:G.value.map(e=>e.value)}));function sr(e){return k.value.useBlurOnHover&&![null,void 0].includes(D.value)&&D.value!==e?`url(#blur_${E.value})`:``}function cr(e){return[null,void 0].includes(D.value)||D.value===e?{opacity:1}:{opacity:N.value.selection.unselectedOpacity}}function lr(e){return e.length<=3?e:e.filter((t,n)=>{let r=e[(n-1+e.length)%e.length],i=e[(n+1)%e.length],a=r.x===t.x&&t.x===i.x,o=r.y===t.y&&t.y===i.y;return!a&&!o})}function ur(e){if(!e.length)return[];let t=new Set(e.map(({row:e,col:t})=>`${e}:${t}`)),n=[],r=/* @__PURE__ */ new Set,i=[[-1,0],[0,1],[1,0],[0,-1]];e.forEach(e=>{let a=`${e.row}:${e.col}`;if(r.has(a))return;let o=[],s=[e];for(r.add(a);s.length;){let e=s.shift();o.push(e),i.forEach(([n,i])=>{let a=e.row+n,o=e.col+i,ee=`${a}:${o}`;t.has(ee)&&!r.has(ee)&&(r.add(ee),s.push({row:a,col:o}))})}n.push(o)});let a=[];return n.forEach(e=>{let t=new Set(e.map(({row:e,col:t})=>`${e}:${t}`)),n=[];e.forEach(({row:e,col:r})=>{t.has(`${e-1}:${r}`)||n.push({start:{x:r,y:e},end:{x:r+1,y:e}}),t.has(`${e}:${r+1}`)||n.push({start:{x:r+1,y:e},end:{x:r+1,y:e+1}}),t.has(`${e+1}:${r}`)||n.push({start:{x:r+1,y:e+1},end:{x:r,y:e+1}}),t.has(`${e}:${r-1}`)||n.push({start:{x:r,y:e+1},end:{x:r,y:e}})});let r=/* @__PURE__ */ new Map,i=e=>`${e.start.x}:${e.start.y}>${e.end.x}:${e.end.y}`,o=e=>`${e.x}:${e.y}`,s=new Set(n.map(i));for(n.forEach(e=>{let t=o(e.start);r.has(t)||r.set(t,[]),r.get(t).push(e)});s.size;){let e=s.values().next().value,t=n.find(t=>i(t)===e),ee=t.start,c=[ee],te=t;for(;te;){s.delete(i(te));let e=te.end;if(o(e)===o(ee))break;c.push(e),te=(r.get(o(e))||[]).find(e=>s.has(i(e)))}c.length>=4&&a.push(lr(c))}}),a}function dr(e){let t=P.value.size,n=P.value.vertical,r=[];return K.value.forEach((i,a)=>{if(i.serieIndex!==e)return;let o=Math.floor(a/t),s=a%t;r.push({row:n?s:o,col:n?o:s})}),r}function fr(e){let t=Dn.value,n=On.value;return ur(dr(e)).map(e=>e.map(({x:e,y:r})=>({x:e*t,y:V.value.top+r*n})))}function pr(e){return e.map(({x:e,y:t})=>`${e},${t}`).join(` `)}function mr(e){return e.map(e=>{if(!e.length)return``;let[t,...n]=e,r=n.map(({x:e,y:t})=>`L ${e} ${t}`).join(` `);return`M ${t.x} ${t.y} ${r} Z`}).filter(Boolean).join(` `)}let hr=u(()=>!N.value.selection?.wrap?.show||[null,void 0].includes(D.value)?[]:fr(D.value).map(pr)),gr=u(()=>{if(!N.value.merged)return[];let e=/* @__PURE__ */ new Map;return K.value.forEach((t,n)=>{e.has(t.serieIndex)||e.set(t.serieIndex,{serieIndex:t.serieIndex,absoluteIndex:t.absoluteIndex,color:t.color,gradientIndex:n,rectIndex:n})}),Array.from(e.values()).map(e=>({...e,d:mr(fr(e.serieIndex))})).filter(e=>e.d)});function _r(e,t){return F.value.labels.captions.show?K.value.length&&!zn.value&&!P.value.vertical&&(K.value[e].isFirst&&t.position<P.value.size-2||K.value[e].isAbsoluteFirst&&e%P.value.size===0&&K.value[e].absoluteStartIndex):!1}function vr(e,t=null){let r=re(F.value.labels.dataLabels.formatter,K.value[e].value,n({p:F.value.labels.dataLabels.prefix,v:K.value[e].value,s:F.value.labels.dataLabels.suffix,r:F.value.labels.captions.roundingValue}),{datapoint:K.value[e],position:t}),i=n({v:K.value[e].proportion*100,s:`%`,r:F.value.labels.captions.roundingPercentage}),a=(F.value.labels.captions.serieNameAbbreviation?ae({source:K.value[e].name,length:F.value.labels.captions.serieNameMaxAbbreviationSize}):K.value[e].name)+(F.value.labels.captions.showPercentage||F.value.labels.captions.showValue?`:`:``);return`${F.value.labels.captions.showSerieName?a:``} ${Zn({val:r,percentage:i,showVal:F.value.labels.captions.showValue,showPercentage:F.value.labels.captions.showPercentage,config:F.value.labels.dataLabels})}`}function yr(e=null){Je(()=>{let t=$.value.head.map((e,t)=>[[e.name],[$.value.body[t]],[isNaN($.value.body[t]/Z.value)?`-`:$.value.body[t]/Z.value*100]]),n=[[I.value.title.text],[I.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),i=r(n);e?e(i):oe({csvContent:i,title:I.value.title.text||`vue-ui-waffle`})})}let br=u(()=>({head:[`__SUM__`,re(F.value.labels.dataLabels.formatter,Z.value,n({p:F.value.labels.dataLabels.prefix,v:Z.value,s:F.value.labels.dataLabels.suffix,r:k.value.table.td.roundingValue})),`100%`],body:$.value.head.map((e,t)=>[{color:e.color,name:e.name},re(F.value.labels.dataLabels.formatter,$.value.body[t],n({p:F.value.labels.dataLabels.prefix,v:$.value.body[t],s:F.value.labels.dataLabels.suffix,r:k.value.table.td.roundingValue})),isNaN($.value.body[t]/Z.value)?`-`:n({v:$.value.body[t]/Z.value*100,s:`%`,r:k.value.table.td.roundingPercentage})]),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},shape:`square`,breakpoint:k.value.table.responsiveBreakpoint},colNames:[k.value.table.columnNames.series,k.value.table.columnNames.value,k.value.table.columnNames.percentage]})),xr=b(!1);function Sr(e){xr.value=e,Gt.value+=1}function Cr(){z.value.showTable=!z.value.showTable}function wr(){z.value.showTooltip=!z.value.showTooltip}let Tr=b(!1);function Er(){Tr.value=!Tr.value}let Dr=ye(Kt,()=>I.value.title.text),Or=u(()=>Ce({config:k,style:I,mutableConfig:z,dialog:Rt,accordion:Pt,isFullscreen:xr,parent:Kt,maxWidth:500,isCursorPointer:sn}));nt(()=>z.value.showTable,e=>Se(e,k,tn));function kr(){z.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let Ar=u(()=>X.value.map(e=>({...e,name:e.display}))),jr=u(()=>I.value.backgroundColor),Mr=u(()=>I.value.title),{isCallbackImaging:Nr,isCallbackSvg:Pr,generateSvg:Fr,onGenerateImage:Ir}=xe({svg:hn,title:Mr,legend:M,legendItems:Ar,backgroundColor:jr,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:wn});async function Lr(){or(`copyAlt`,{config:k.value,dataset:In.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:In.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Rr(){O.value=null,on.value=!0}function zr(){O.value=null,an.value=`pointer`,Ut.value=!1,D.value=null,er.value=null,on.value=!1}function Br(e){if(!hn.value||Tr.value||document.activeElement!==hn.value||!Q.value.length||J.value.length===T.dataset.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){O.value=null,an.value=`pointer`,Ut.value=!1,D.value=null,er.value=null;return}if(r){if(O.value===null)return;let e=nr(O.value);if(e===null)return;rr(e);return}let a=Q.value.findIndex(e=>e.serieIndex===O.value),o=null;if(o=a===-1?n?Q.value[0]:Q.value[Q.value.length-1]:n?Q.value[(a+1)%Q.value.length]:Q.value[(a-1+Q.value.length)%Q.value.length],!o)return;let s=nr(o.serieIndex);s!==null&&(Vr(o.serieIndex),ar(s,`keyboard`))}function Vr(e){if(!Number.isFinite(e)||!hn.value)return;let t=tr(e);if(!t||!t.rectIndexes.length)return;let n=t.rectIndexes.map(e=>{let t=q.value[e];return t?{x:t.x+P.value.spaceBetween/2+Dn.value/2,y:t.y+P.value.spaceBetween/2+On.value/2}:null}).filter(Boolean);if(!n.length)return;let r=Math.min(...n.map(e=>e.x)),i=Math.max(...n.map(e=>e.x)),a=Math.min(...n.map(e=>e.y)),o=Math.max(...n.map(e=>e.y)),s=(r+i)/2,ee=(a+o)/2,c=hn.value.getBoundingClientRect();rn.value={x:c.left+s/B.value.width*c.width,y:c.top+ee/B.value.height*c.height}}let Hr=u(()=>({headers:br.value?.colNames??[],rows:br.value?.body??[]}));return _e({getData:Ln,getImage:Dr,generatePdf:Cn,generateCsv:yr,generateImage:wn,generateSvg:Fr,hideSeries:Xn,showSeries:Yn,toggleTable:Cr,toggleTooltip:wr,toggleAnnotator:Er,toggleFullscreen:Sr,copyAlt:Lr}),(e,t)=>(y(),p(`div`,{class:g(`vue-data-ui-component vue-ui-waffle ${xr.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`waffleChart`,ref:Kt,id:`vue-ui-waffle_${E.value}`,style:v(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor};${k.value.responsive?`height: 100%`:``}`),onMouseenter:t[2]||=()=>C(pn)(!0),onMouseleave:t[3]||=()=>C(pn)(!1)},[m(`div`,{id:`chart-instructions-${E.value}`,class:`sr-only`},[m(`p`,null,$e(k.value.a11y.translations.keyboardNavigation),1)],8,at),Hr.value?.rows?.length?(y(),d(Fe,{key:0,uid:E.value,head:Hr.value.headers,body:Hr.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),A.value.buttons.annotator?(y(),d(C(It),{key:1,showGroupActions:A.value.annotator?.showGroupActions??!0,svgRef:C(hn),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Tr.value,isCursorPointer:sn.value,palette:A.value.annotatorPalette,onClose:Er},Ue({_:2},[x(C(Te),t=>({name:t,fn:w(n=>[S(e.$slots,t,_(Ke(C(we)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Tn.value?(y(),p(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),I.value.title.text?(y(),p(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:12px`},[(y(),d(be,{key:`title_${Zt.value}`,config:{title:{cy:`waffle-title`,...I.value.title},subtitle:{cy:`waffle-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),m(`div`,{id:`legend-top-${E.value}`},null,8,ot),A.value.show&&Ht.value&&(C(mn)||C(fn))?(y(),d(C(Ft),{ref_key:`userOptionsRef`,ref:nn,key:`user_options_${Gt.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:C(xn),isImaging:C(Sn),uid:E.value,hasTooltip:A.value.buttons.tooltip&&j.value.show,hasPdf:A.value.buttons.pdf,hasImg:A.value.buttons.img,hasSvg:A.value.buttons.svg,hasXls:A.value.buttons.csv,hasTable:A.value.buttons.table,hasFullscreen:A.value.buttons.fullscreen,hasAltCopy:A.value.buttons.altCopy,isFullscreen:xr.value,isTooltip:z.value.showTooltip,titles:{...A.value.buttonTitles},chartElement:Kt.value,position:A.value.position,hasAnnotator:A.value.buttons.annotator,isAnnotation:Tr.value,callbacks:A.value.callbacks,printScale:A.value.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:sn.value,onToggleFullscreen:Sr,onGeneratePdf:C(Cn),onGenerateCsv:yr,onGenerateImage:C(Ir),onGenerateSvg:C(Fr),onToggleTable:Cr,onToggleTooltip:wr,onToggleAnnotator:Er,onCopyAlt:Lr,style:v({visibility:C(mn)?C(fn)?`visible`:`hidden`:`visible`})},Ue({_:2},[x(C(Ee)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[S(e.$slots,t,_(Ke(C(De)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,st,[(y(),p(`svg`,{ref_key:`svgRef`,ref:hn,xmlns:C(le),"aria-describedby":`chart-instructions-${E.value}`,class:g({"vue-data-ui-fullscreen--on":xr.value,"vue-data-ui-fulscreen--off":!xr.value,"vue-data-ui-no-transition":!C(L)}),tabindex:`0`,viewBox:`0 0 ${B.value.width<=0?10:B.value.width} ${B.value.height<=0?10:B.value.height}`,style:v(`max-width:100%;overflow:visible;background:transparent;color:${I.value.color}`),onFocus:Rr,onBlur:zr,onKeydown:Br},[Ge(C(Lt)),S(e.$slots,`svg-underlayer`,{svg:{...B.value,isPrintingImg:C(xn)||C(Sn)||C(Nr),isPrintingSvg:C(Pr)}},void 0,!0),m(`defs`,null,[(y(!0),p(l,null,x(K.value,(e,t)=>(y(),d(Ne,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${E.value}_${t}`,key:`gradient_${E.value}_${t}`,stops:[[`0%`,C(o)(C(c)(e.color,.05),100-N.value.gradientIntensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),m(`defs`,null,[m(`filter`,{id:`blur_${E.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[...t[4]||=[m(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2},null,-1),m(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)]],8,lt)]),k.value.useCustomCells&&K.value.length&&e.$slots.cell?(y(!0),p(l,{key:0},x(q.value,(t,n)=>(y(),p(`foreignObject`,{x:t.x,y:t.y,height:U.value<=0?1e-4:U.value,width:H.value<=0?1e-4:H.value,class:`vue-ui-waffle-custom-cell-foreignObject`},[S(e.$slots,`cell`,qe({ref_for:!0},{cell:{...t,color:K.value[n].color,height:Math.max(0,U.value),width:Math.max(0,H.value),...K.value[n]},isSelected:[null,void 0].includes(D.value)?!0:K.value[n].serieIndex===D.value}),void 0,!0)],8,ut))),256)):f(``,!0),!K.value.length&&!k.value.useCustomCells?(y(),p(`rect`,{key:1,x:12,y:12,height:V.value.height-24,width:V.value.width-24,rx:3,fill:`none`,stroke:`black`},null,8,dt)):K.value.length&&!k.value.useCustomCells?(y(),p(l,{key:2},[e.$slots.pattern?(y(),p(`g`,ft,[(y(!0),p(l,null,x(Mn.value,t=>(y(),p(`defs`,null,[S(e.$slots,`pattern`,qe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${E.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):f(``,!0),N.value.merged?(y(),p(l,{key:1},[(y(!0),p(l,null,x(gr.value,e=>(y(),p(`path`,{key:`merged-underlayer-${e.serieIndex}`,d:e.d,fill:`white`,"fill-rule":`evenodd`,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linejoin":`round`,filter:sr(e.serieIndex),style:v(cr(e.serieIndex)),class:g({"vue-data-ui-transition":C(L)})},null,14,pt))),128)),(y(!0),p(l,null,x(gr.value,e=>(y(),p(`path`,{key:`merged-serie-${e.serieIndex}`,d:e.d,fill:N.value.useGradient&&N.value.gradientIntensity>0?`url(#gradient_${E.value}_${e.gradientIndex})`:e.color,"fill-rule":`evenodd`,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linejoin":`round`,filter:sr(e.serieIndex),style:v(cr(e.serieIndex)),class:g({"vue-data-ui-transition":C(L)})},null,14,mt))),128)),e.$slots.pattern?(y(),p(`g`,ht,[(y(!0),p(l,null,x(gr.value,e=>(y(),p(`path`,{key:`merged-pattern-${e.serieIndex}`,d:e.d,fill:`url(#pattern_${E.value}_${e.absoluteIndex})`,"fill-rule":`evenodd`,stroke:`none`,filter:sr(e.serieIndex),style:v(cr(e.serieIndex)),class:g({"vue-data-ui-transition":C(L)})},null,14,gt))),128))])):f(``,!0)],64)):(y(),p(l,{key:2},[(y(!0),p(l,null,x(q.value,(e,t)=>(y(),p(`rect`,{rx:N.value.rounded?N.value.rounding:0,x:e.x+P.value.spaceBetween/2,y:e.y+P.value.spaceBetween/2,height:U.value<=0?1e-4:U.value,width:H.value<=0?1e-4:H.value,fill:`white`,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,filter:sr(K.value[t].serieIndex),style:v(cr(K.value[t].serieIndex)),class:g({"vue-data-ui-transition":C(L)})},null,14,_t))),256)),(y(!0),p(l,null,x(q.value,(e,t)=>(y(),p(`rect`,{rx:N.value.rounded?N.value.rounding:0,x:e.x+P.value.spaceBetween/2,y:e.y+P.value.spaceBetween/2,height:U.value<=0?1e-4:U.value,width:H.value<=0?1e-4:H.value,fill:N.value.useGradient&&N.value.gradientIntensity>0?`url(#gradient_${E.value}_${t})`:K.value[t].color,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,filter:sr(K.value[t].serieIndex),style:v(cr(K.value[t].serieIndex)),class:g({"vue-data-ui-transition":C(L)})},null,14,vt))),256)),e.$slots.pattern?(y(),p(`g`,yt,[(y(!0),p(l,null,x(q.value,(e,t)=>(y(),p(`rect`,{rx:N.value.rounded?N.value.rounding:0,x:e.x+P.value.spaceBetween/2,y:e.y+P.value.spaceBetween/2,height:U.value<=0?1e-4:U.value,width:H.value<=0?1e-4:H.value,fill:`url(#pattern_${E.value}_${K.value[t].absoluteIndex})`,stroke:`none`,filter:sr(K.value[t].serieIndex),style:v(cr(K.value[t].serieIndex)),class:g({"vue-data-ui-transition":C(L)})},null,14,bt))),256))])):f(``,!0)],64))],64)):f(``,!0),e.$slots.cellSvg?(y(!0),p(l,{key:3},x(q.value,(t,n)=>(y(),p(`g`,null,[S(e.$slots,`cellSvg`,qe({ref_for:!0},{cell:{...t,color:K.value[n].color,height:Math.max(0,U.value),width:Math.max(0,H.value),...K.value[n]},isSelected:[null,void 0].includes(D.value)?!0:K.value[n].serieIndex===D.value}),void 0,!0)]))),256)):f(``,!0),(y(!0),p(l,null,x(hr.value,(e,t)=>(y(),p(`polygon`,{key:`selected-series-wrap-${t}`,points:e,fill:`none`,stroke:N.value.selection.wrap.stroke,"stroke-width":N.value.selection.wrap.strokeWidth,"stroke-linejoin":N.value.selection.wrap.strokeLinejoin,"pointer-events":`none`},null,8,xt))),128)),(y(!0),p(l,null,x(q.value,(e,t)=>(y(),p(l,null,[_r(t,e)?(y(),p(`text`,{key:`datalabel_${t}`,textContent:$e(vr(t,e)),x:e.x+F.value.labels.captions.offsetX+P.value.spaceBetween/2+6,y:e.y+F.value.labels.captions.offsetY+P.value.spaceBetween/2+On.value/2+F.value.labels.captions.fontSize/3,"font-size":F.value.labels.captions.fontSize,fill:C(ce)(K.value[t].color),filter:sr(K.value[t].serieIndex),class:g({"vue-data-ui-transition":C(L)})},null,10,St)):f(``,!0)],64))),256)),N.value.merged&&!k.value.useCustomCells?(y(!0),p(l,{key:4},x(gr.value,e=>(y(),p(`path`,{key:`tooltip-trap-${e.serieIndex}`,d:e.d,fill:`transparent`,"fill-rule":`evenodd`,stroke:`none`,"pointer-events":`fill`,onMouseover:t=>ar(e.rectIndex),onMouseleave:t=>ir(e.rectIndex),onClick:t=>rr(e.rectIndex)},null,40,Ct))),128)):(y(!0),p(l,{key:5},x(q.value,(e,t)=>(y(),p(`rect`,{key:`tooltip-trap-${t}`,x:e.x+P.value.spaceBetween/2,y:e.y+P.value.spaceBetween/2,height:On.value,width:Dn.value,fill:`transparent`,stroke:`none`,onMouseover:e=>ar(t),onMouseleave:e=>ir(t),onClick:e=>rr(t)},null,40,wt))),128)),S(e.$slots,`svg`,{svg:{...B.value,isPrintingImg:C(xn)||C(Sn)||C(Nr),isPrintingSvg:C(Pr)}},void 0,!0)],46,ct)),e.$slots.hint?(y(),p(`div`,Tt,[S(e.$slots,`hint`,_(Ke({hint:k.value.a11y.translations.keyboardNavigation,isVisible:on.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(y(),p(`div`,Et,[S(e.$slots,`watermark`,_(Ke({isPrinting:C(xn)||C(Sn)||C(Nr)||C(Pr)})),void 0,!0)])):f(``,!0),m(`div`,{id:`legend-bottom-${E.value}`},null,8,Dt),en.value&&(M.value.show||e.$slots.legend)?(y(),d(He,{key:6,to:M.value.position===`top`?`#legend-top-${E.value}`:`#legend-bottom-${E.value}`},[m(`div`,{ref_key:`chartLegend`,ref:Jt},[S(e.$slots,`legend`,{legend:X.value},()=>[M.value.show?(y(),d(ze,{key:`legend_${$t.value}`,legendSet:X.value,config:Qn.value,isCursorPointer:sn.value,onClickMarker:t[0]||=({legend:e})=>qn(e.uid)},Ue({item:w(({legend:e})=>[m(`div`,{onClick:t=>e.segregate(),style:v(`opacity:${J.value.includes(e.uid)?.5:1}`)},$e(e.display),13,Ot)]),legendToggle:w(()=>[X.value.length>2&&M.value.selectAllToggle.show&&!C(ln)?(y(),d(Pe,{key:0,backgroundColor:M.value.selectAllToggle.backgroundColor,color:M.value.selectAllToggle.color,fontSize:M.value.fontSize,checked:J.value.length>0,isCursorPointer:sn.value,onToggle:Kn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):f(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:w(({legend:e,index:t})=>[Ge(Ae,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${E.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(y(),p(`div`,{key:7,ref_key:`source`,ref:Yt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Ge(C(jt),{teleportTo:j.value.teleportTo,show:z.value.showTooltip&&Ut.value&&J.value.length<T.dataset.length,backgroundColor:j.value.backgroundColor,color:j.value.color,borderRadius:j.value.borderRadius,borderColor:j.value.borderColor,borderWidth:j.value.borderWidth,backgroundOpacity:j.value.backgroundOpacity,position:j.value.position,offsetX:j.value.offsetX,offsetY:j.value.offsetY,parent:Kt.value,content:Wt.value,isCustom:j.value.customFormat&&typeof j.value.customFormat==`function`,fontSize:j.value.fontSize,isFullscreen:xr.value,smooth:j.value.smooth,backdropFilter:j.value.backdropFilter,smoothForce:j.value.smoothForce,smoothSnapThreshold:j.value.smoothSnapThreshold,isA11yMode:an.value===`keyboard`,a11yPosition:rn.value},{"tooltip-before":w(()=>[S(e.$slots,`tooltip-before`,_(Ke({...$n.value})),void 0,!0)]),tooltip:w(()=>[S(e.$slots,`tooltip`,_(Ke({...$n.value})),void 0,!0)]),"tooltip-after":w(()=>[S(e.$slots,`tooltip-after`,_(Ke({...$n.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`fontSize`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Ht.value&&A.value.buttons.table?(y(),d(Ze(Or.value.component),qe({key:8},Or.value.props,{ref_key:`tableUnit`,ref:tn,onClose:kr}),Ue({content:w(()=>[(y(),d(C(Nt),{key:`table_${Qt.value}`,colNames:br.value.colNames,head:br.value.head,body:br.value.body,config:br.value.config,title:k.value.table.useDialog?``:Or.value.title,withCloseButton:!k.value.table.useDialog,isCursorPointer:sn.value,onClose:kr},{th:w(({th:e})=>[e===`__SUM__`?(y(),p(`div`,kt,[Ge(C(Mt),{name:`sigma`,stroke:br.value.config.th.color,size:16},null,8,[`stroke`])])):(y(),p(`div`,At,$e(e),1))]),td:w(({td:e})=>[We($e(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[k.value.table.useDialog?{name:`title`,fn:w(()=>[We($e(Or.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:w(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>yr(A.value.callbacks.csv),style:v({cursor:sn.value?`pointer`:`default`})},[Ge(C(Mt),{name:`fileCsv`,stroke:Or.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),S(e.$slots,`skeleton`,{},()=>[C(ln)?(y(),d(me,{key:0})):f(``,!0)],!0)],46,it))}},[[`__scopeId`,`data-v-8ee15dca`]]);export{rt as n,jt as t};