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
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as s,Qt as c,Tt as l,X as u,at as d,b as f,i as p,in as ee,nt as te,on as ne,pt as re,r as ie,t as ae,yt as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as pe}from"./useNestedProp-DnGoh-XS.js";import{t as me}from"./useThemeCheck-BKNRbGeC.js";import{t as he}from"./img-D4RQwASc.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{t as ve}from"./tableIntegration-CNoJ1CIY.js";import{n as ye,t as be}from"./userOptionsSlots-DYuo-E5m.js";import{t as xe}from"./useTimeLabels-Das5O74F.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./useSvgLabelLayout-42Kats14.js";import{t as we}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./vue-ui-accordion-DFxSW8ET.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ae}from"./useTableResponsive-uSz_qZOB.js";import{t as je}from"./vue_ui_heatmap-kh5NMmwf.js";import{Fragment as m,computed as h,createBlock as Me,createCommentVNode as g,createElementBlock as _,createElementVNode as v,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as Ie,guardReactiveProps as y,mergeProps as Le,nextTick as Re,normalizeClass as ze,normalizeProps as b,normalizeStyle as x,onBeforeUnmount as Be,onMounted as Ve,openBlock as S,reactive as He,ref as C,renderList as w,renderSlot as T,resolveDynamicComponent as Ue,shallowRef as We,toDisplayString as E,toRefs as Ge,unref as D,useCssVars as Ke,vShow as qe,watch as Je,watchEffect as Ye,withCtx as O,withDirectives as Xe,withKeys as Ze}from"vue";var Qe={mounted(e,t){$e(e,t.value)},updated(e,t){$e(e,t.value)}};function $e(e,{cellWidth:t,cellHeight:n,maxFontSize:r,minFontSize:i,index:a,reportRotation:o,reportHide:s,rotateAll:c,hideAll:l}){e.removeAttribute(`transform`),e.removeAttribute(`visibility`);let u=!1,d=!1;e.setAttribute(`font-size`,r);let f=e.getComputedTextLength();if(f<=t)o(a,!1),s(a,!1);else{let n=Math.floor(r*t/f);n>=i?(e.setAttribute(`font-size`,n),o(a,!1),s(a,!1)):(o(a,!0),s(a,!1),u=!0)}if(c&&(u=!0),u){e.setAttribute(`font-size`,r);let t=e.getBBox(),o=t.x+t.width/2,c=t.y+t.height/2;e.setAttribute(`transform`,`rotate(-90 ${o} ${c})`);let l=e.getBBox().width;if(l<=n)s(a,!1);else{let t=Math.floor(r*n/l);t>=i?(e.setAttribute(`font-size`,t),s(a,!1)):(d=!0,s(a,!0))}}(l||d)&&e.setAttribute(`visibility`,`hidden`)}var et=/* @__PURE__ */ e({default:()=>Mt}),tt=[`id`],nt=[`id`],rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`x`,`y`,`width`,`height`],at=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`],ot=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`],st=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`],ct=[`data-a11y-cell-id`,`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`aria-label`,`onMouseover`,`onMouseout`,`onClick`],lt=[`font-size`,`font-weight`,`fill`,`x`,`y`],ut=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`],dt=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`],ft=[`font-size`,`fill`,`x`,`y`,`font-weight`],pt=[`font-size`,`fill`,`x`,`y`,`font-weight`],mt=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`],ht=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`],gt={key:6},_t=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`],vt={key:7},yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],xt={class:`vue-ui-heatmap-legend-gauge-right`},St=[`data-value`],Ct={class:`vue-ui-heatmap-gauge-indicator-value`},wt={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et={class:`vue-ui-data-table`},Dt={key:0},Ot=[`data-cell`],kt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},At=[`data-cell`],jt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Mt=/*#__PURE__*/ fe({__name:`vue-ui-heatmap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:fe,emit:$e}){Ke(e=>({v71e1d1db:e.tdo}));let et=Ie(()=>import(`./Tooltip-C1q0Qoh7.js`)),Mt=Ie(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Nt=Ie(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Pt=Ie(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Ft=Ie(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),It=Ie(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_heatmap:Lt}=i(),{isThemeValid:Rt,warnInvalidTheme:zt}=me(),k=e,Bt=$e,Vt=h({get(){return!!k.dataset&&k.dataset.length},set(e){return e}}),Ht=C(u()),A=C(null),Ut=C(!1),Wt=C(``),Gt=C(void 0),j=C(null),Kt=C(0),qt=C(null),Jt=C(0),Yt=C(null),Xt=C(null),Zt=C(null),Qt=C(null),$t=C(null),en=C(null),tn=C(null),nn=C(null),rn=C(null),an=C(null),on=C(null),sn=C(null),cn=We(null),M=C(null),ln=C(null),un=C({x:0,y:0}),dn=C(`pointer`),fn=C(!1),N=C(Sn()),P=h(()=>N.value.style.layout.cells),F=h(()=>N.value.style.layout.dataLabels),I=h(()=>N.value.style.layout);ue({config:()=>N.value,dataset:()=>k.dataset,component:`VueUiHeatmap`,rules:[de.emptyArray,de.noHint]});let pn=h(()=>N.value.userOptions.useCursorPointer);function mn(){let e=Array(7).fill(`_`),t=[],n=e.length;for(let r=0;r<n;r+=1){let n=[];for(let e=0;e<14;e+=1)n.push(r+e*2);t.push({name:`${e[r]}`,values:n})}return t}let hn=h(()=>ee({defaultConfig:{table:{show:!1},userOptions:{show:!1},style:{backgroundColor:`#99999930`,layout:{cells:{colors:{hot:`#999999`,cold:`#CACACA`},columnTotal:{value:{show:!1}},rowTotal:{value:{show:!1}},value:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}}}}},userConfig:N.value.skeletonConfig??{}})),{loading:gn,FINAL_DATASET:L,manualLoading:_n}=ce({...Ge(k),FINAL_CONFIG:N,prepareConfig:Sn,callback:()=>{Promise.resolve().then(async()=>{await Re(),A.value&&ne(A.value,{delta:.1,delay:250})})},skeletonDataset:k.config?.skeletonDataset??mn(),skeletonConfig:ee({defaultConfig:N.value,userConfig:hn.value})}),{userOptionsVisible:vn,setUserOptionsVisibility:yn,keepUserOptionState:bn}=Oe({config:N.value}),{svgRef:R}=ke({config:N.value.style.title});function xn(e){yn(e)}function Sn(){let e=pe({userConfig:k.config,defaultConfig:Lt}),t={},n=e.theme;if(n){if(!Rt.value(e))zt(e),t=e;else{let r=pe({userConfig:je[n]||k.config,defaultConfig:e});t={...pe({userConfig:k.config,defaultConfig:r})}}}else t=e;return t}let Cn=c(k.config);Je(()=>k.config,(e,t)=>{let n=c(e),r=n!==Cn;Cn=n;let i=Sn();r?(gn.value||(N.value=i),vn.value=!N.value.userOptions.showOnChartHover,Nn(),Jt.value+=1,z.value.showTable=N.value.table.show,z.value.showTooltip=N.value.style.tooltip.show,N.value.responsive||(Pn.value=I.value.width,Fn.value=I.value.height)):(N.value.style.tooltip=i.style.tooltip,z.value.showTooltip=N.value.style.tooltip.show)},{deep:!0}),Je(()=>k.dataset,e=>{Array.isArray(e)&&e.length>0&&(_n.value=!1),Nn()},{deep:!0});let{isPrinting:wn,isImaging:Tn,generatePdf:En,generateImage:Dn}=Se({elementId:`heatmap__${Ht.value}`,fileName:N.value.style.title.text||`vue-ui-heatmap`,options:N.value.userOptions.print}),On=h(()=>N.value.userOptions.show&&!N.value.style.title.text),z=C({showTable:N.value.table.show,showTooltip:N.value.style.tooltip.show});Je(N,()=>{z.value={showTable:N.value.table.show,showTooltip:N.value.style.tooltip.show}},{immediate:!0});let kn=h(()=>N.value.table.responsiveBreakpoint),B=C(null),An=C(!1),jn=0,Mn=h(()=>N.value.debug);function Nn(){se(k.dataset)&&(d({componentName:`VueUiHeatmap`,type:`dataset`,debug:Mn.value}),Vt.value=!1,_n.value=!0),se(k.dataset)||(_n.value=N.value.loading),N.value.responsive&&(B.value&&(cn.value&&B.value.unobserve(cn.value),B.value.disconnect()),B.value=new ResizeObserver(()=>{let{width:e,height:t}=Te({chart:A.value,title:N.value.style.title.text?Qt.value:null,source:sn.value,noTitle:$t.value});cancelAnimationFrame(jn),jn=requestAnimationFrame(()=>{Pn.value=e,Fn.value=t,An.value=!0})}),cn.value=A.value.parentNode,B.value.observe(cn.value))}Be(()=>{cancelAnimationFrame(jn),B.value&&(cn.value&&B.value.unobserve(cn.value),B.value.disconnect())}),Ve(()=>{Nn()});let V=h(()=>Math.max(...L.value.flatMap(e=>(e.values||[]).length))),Pn=C(I.value.width),Fn=C(I.value.height),H=h(()=>({width:Math.max(10,Pn.value),height:Math.max(10,Fn.value)})),{metrics:In,ready:Ln,update:Rn}=Ce({svgRef:R,canMeasure:()=>(!N.value.responsive||An.value)&&(!(F.value.xAxis.show||P.value.columnTotal.value.show)||Kn.value)&&(!F.value.yAxis.show||Gn.value),initialMetrics:{topLabelsHeight:0,leftLabelsWidth:0,xAxisSumLabelsHeight:0},measure:e=>({topLabelsHeight:e(rn.value).height,leftLabelsWidth:e(tn.value).width,xAxisSumLabelsHeight:e(an.value).height})}),zn=h(()=>In.value.topLabelsHeight),Bn=h(()=>In.value.leftLabelsWidth),Vn=h(()=>In.value.xAxisSumLabelsHeight),U=h(()=>Math.min(H.value.height,H.value.width)/1e3*P.value.spacing),W=h(()=>{let e=0;N.value.style.legend.show&&(e=N.value.style.legend.width);let t=I.value.padding,n=F.value.xAxis.fontSize/3,r=F.value.xAxis.fontSize/2,i=H.value.height-t.top-t.bottom-zn.value-n,a=H.value.width/60,o={x:U.value*V.value,y:U.value*((L.value||[]).length+1)},s=H.value.width-t.left-t.right-o.x-a*2-2-e-Bn.value,c=i-a-o.y-Vn.value-r-P.value.columnTotal.value.offsetY,l={width:Math.max(3,s/V.value),height:Math.max(3,c/(L.value.length??1))};return{top:t.top+zn.value+a+n,topLabelsHeight:zn.value,sumCellXHeight:a,height:c,left:t.left+Bn.value+a/2,right:t.right-e,bottom:H.value.height-t.bottom-Vn.value,width:s,cellSize:l}}),Hn=h(()=>Math.max(...L.value.flatMap(e=>e.values))),Un=h(()=>Math.min(...L.value.flatMap(e=>e.values))),G=h(()=>P.value.scaleMax===null?Hn.value:P.value.scaleMax),K=h(()=>P.value.scaleMin===null?Un.value:P.value.scaleMin),q=h(()=>{let e=L.value.flatMap(e=>e.values);return e.reduce((e,t)=>e+t,0)/e.length}),Wn=C([]),Gn=C(!1),Kn=C(!1),qn=C([]),Jn=0;Ye(()=>{let e=++Jn;(async()=>{let t=F.value.yAxis,n=await xe({values:t.values.length?t.values:L.value.map(e=>e.name),maxDatapoints:L.value.length,formatter:t.datetimeFormatter,start:0,end:L.value.length});e===Jn&&(Wn.value=n,Gn.value=!0)})()});let Yn=0;Ye(()=>{let e=++Yn;(async()=>{let t=F.value.xAxis,n=await xe({values:t.values,maxDatapoints:V.value,formatter:t.datetimeFormatter,start:0,end:V.value});e===Yn&&(qn.value=n,Kn.value=!0)})()});function J(e,t,n){if(t===n)return P.value.colors.hot;let r=Math.min(Math.max(e,t),n);return l(P.value.colors.cold,P.value.colors.hot,t,n,r)}function Xn(e){if([void 0,null].includes(e))return 0;let t=K.value,n=G.value;if(t===n)return 0;let r=(e-t)/(n-t);return(1-Math.min(Math.max(r,0),1))*100}let Y=h(()=>{let e=Wn.value.map(e=>e.text),t=qn.value.map(e=>e.text),n=P.value.scaleMin!==null||P.value.scaleMax!==null,r=L.value.map(e=>e.values.reduce((e,t)=>e+t,0)),i=L.value.map(e=>Math.max(1,e.values.length)),a=Math.max(...r),o=Math.min(...r),s=[],c=[];for(let e=0;e<V.value;e+=1){let t=0,n=0;L.value.forEach(r=>{e<r.values.length&&(t+=r.values[e]||0,n+=1)}),s.push(t),c.push(Math.max(1,n))}let l=Math.max(...s),u=Math.min(...s);return{yTotals:r.map((e,t)=>{let r=isNaN(e/a)?0:e/a,s=i[t],c=K.value*s,l=G.value*s;return{total:e,proportion:r,color:n?J(e,c,l):J(e,o,a)}}),xTotals:s.map((e,t)=>{let r=isNaN(e/l)?0:e/l,i=c[t],a=K.value*i,o=G.value*i;return{total:e,proportion:r,color:n?J(e,a,o):J(e,u,l)}}),yLabels:e,xLabels:t.slice(0,V.value)}}),X=h(()=>(L.value.forEach((e,t)=>{oe({datasetObject:e,requiredAttributes:[`values`]}).forEach(e=>{d({componentName:`VueUiHeatmap`,type:`datasetSerieAttribute`,property:`values`,index:t,debug:Mn.value})})}),L.value.map((e,t)=>({...e,temperatures:(e.values||[]).map((e,n)=>e>=q.value?{side:`up`,color:J(e,K.value,G.value),ratio:Math.abs(Math.abs(e-q.value)/Math.abs(Hn.value-q.value))>1?1:Math.abs(Math.abs(e-q.value)/Math.abs(Hn.value-q.value)),value:e,yAxisName:Y.value.yLabels[t],xAxisName:Y.value.xLabels[n],id:`vue-data-ui-heatmap-cell-${u()}`}:{side:`down`,ratio:Math.abs(1-Math.abs(e)/Math.abs(q.value))>1?1:Math.abs(1-Math.abs(e)/Math.abs(q.value)),color:J(e,K.value,G.value),value:e,yAxisName:Y.value.yLabels[t],xAxisName:Y.value.xLabels[n],id:`vue-data-ui-heatmap-cell-${u()}`})})))),Zn=h(()=>X.value.flatMap((e,t)=>e.temperatures.map((e,n)=>{let r=W.value.left+W.value.cellSize.width*n,i=W.value.top+W.value.cellSize.height*t;return{datapoint:e,rowIndex:t,columnIndex:n,x:r+U.value/2+W.value.sumCellXHeight,y:i+U.value/2,width:W.value.cellSize.width-U.value,height:W.value.cellSize.height-U.value,labelX:r+W.value.cellSize.width/2+W.value.sumCellXHeight,labelY:i+W.value.cellSize.height/2+P.value.value.fontSize/3,selectionX:r,selectionY:i}}))),Qn=h(()=>L.value.length),$n=He(Array(Qn.value*V.value||1).fill(!1)),er=h(()=>$n.some(e=>e));function tr(e,t){$n[e]=t}let nr=He(Array(Qn.value*V.value||1).fill(!1)),rr=h(()=>nr.some(e=>e));function ir(e,t){nr[e]=t}let Z=C(null),ar=C(null);function or(){Ut.value=!1,Gt.value=void 0,Z.value=null,j.value=null,M.value=null,ln.value=null}function sr(e){if(!R.value||!e)return;let t=R.value.querySelector(`[data-a11y-cell-id="${e}"]`);if(!t)return;let n=t.getBoundingClientRect();un.value={x:n.left+n.width/2,y:n.top+n.height/2}}function cr(e,t,n,r,i=`pointer`,o=null){let c=W.value.cellSize.width-U.value,l={...e,x:n+c,y:r,width:W.value.cellSize.width-U.value,height:W.value.cellSize.height-U.value};if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:l,seriesIndex:t}),!z.value.showTooltip)return;dn.value=i,M.value=o,ln.value=e.id,j.value={x:n,y:r};let{value:u,yAxisName:d,xAxisName:f,id:ee}=e;Gt.value=ee,Z.value=u,ar.value={datapoint:e,seriesIndex:t,series:X.value,config:N.value},Ut.value=!0;let te=``,ne=N.value.style.tooltip.customFormat;s(ne)&&re(()=>ne({datapoint:e,seriesIndex:t,series:X.value,config:N.value}))?Wt.value=ne({datapoint:e,seriesIndex:t,series:X.value,config:N.value}):(te+=`<div>${d} ${f?d?` - ${f}`:`${f}`:``}</div>`,te+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${N.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${J(u,K.value,G.value)}">⬤</span><span>${isNaN(u)?`-`:p(P.value.value.formatter,u,a({p:F.value.prefix,v:u,s:F.value.suffix,r:N.value.style.tooltip.roundingValue}),{datapoint:e,seriesIndex:t})}</span></div>`,Wt.value=`<div style="font-size:${N.value.style.tooltip.fontSize}px">${te}</div>`),i===`keyboard`&&Re(()=>{sr(e.id)})}function lr({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(ln.value!==e.id||dn.value!==`keyboard`)&&(Ut.value=!1,Gt.value=void 0,Z.value=null,j.value=null)}function ur(e){return p(P.value.value.formatter,Y.value.yTotals[e].total,a({p:F.value.prefix,v:Y.value.yTotals[e].total,s:F.value.suffix,r:P.value.value.roundingValue}),{datapoint:Y.value.yTotals[e],rowIndex:e})}function dr(e){return p(P.value.value.formatter,Y.value.xTotals[e].total,a({p:F.value.prefix,v:Y.value.xTotals[e].total,s:F.value.suffix,r:P.value.value.roundingValue}),{datapoint:Y.value.xTotals[e],colIndex:e})}h(()=>({head:L.value.map(e=>({name:e.name})),body:L.value.map(e=>e.values)}));function fr(e=null){Re(()=>{let t=[``,...L.value.map((e,t)=>e.name)],n=[];for(let e=0;e<Y.value.xLabels.length;e+=1){let t=[Y.value.xLabels[e]];for(let n=0;n<L.value.length;n+=1)t.push([L.value[n].values[e]]);n.push(t)}let r=[[N.value.style.title.text],[N.value.style.title.subtitle.text],[[``],[``],[``]],t].concat(n),i=o(r);e?e(i):te({csvContent:i,title:N.value.style.title.text||`vue-ui-heatmap`})})}let Q=C(!1);function pr(e){Q.value=e,Kt.value+=1}function mr(){z.value.showTable=!z.value.showTable}function hr(){z.value.showTooltip=!z.value.showTooltip}let gr=C(!1);function _r(){gr.value=!gr.value}function vr(e,t){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t}),Bt(`selectDatapoint`,e)}function yr(){return X.value}async function br({scale:e=2}={}){if(!A.value)return;let{width:t,height:n}=A.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await he({domElement:A.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:N.value.style.title.text,width:t,height:n,aspectRatio:r}}let xr=h(()=>({start:0,end:V.value})),Sr=h(()=>Y.value.xLabels);we({timeLabelsEls:rn,timeLabels:Sr,slicer:xr,configRef:N,rotationPath:[`style`,`layout`,`dataLabels`,`xAxis`,`rotation`],autoRotatePath:[`style`,`layout`,`dataLabels`,`xAxis`,`autoRotate`,`enable`],isAutoSize:!1,targetClass:`.vue-ui-heatmap-col-name`,rotation:F.value.xAxis.autoRotate.angle,width:Pn,height:Fn}),we({timeLabelsEls:an,timeLabels:Sr,slicer:xr,configRef:N,rotationPath:[`style`,`layout`,`cells`,`columnTotal`,`value`,`rotation`],autoRotatePath:[`style`,`layout`,`cells`,`columnTotal`,`value`,`autoRotate`,`enable`],isAutoSize:!1,targetClass:`.vue-ui-heatmap-col-total`,rotation:P.value.columnTotal.value.autoRotate.angle,width:Pn,height:Fn});let Cr=h(()=>ve({config:N,style:{value:N.value.style},mutableConfig:z,dialog:It,accordion:Ee,isFullscreen:Q,parent:A,maxWidth:800,isCursorPointer:pn}));Je(()=>z.value.showTable,async e=>{N.value.table.show||(e&&N.value.table.useDialog&&Xt.value?(await Re(),Xt.value.open()):`close`in Xt.value&&Xt.value.close())});let{isResponsive:wr}=Ae(qt,kn);function Tr(){z.value.showTable=!1,Zt.value&&Zt.value.setTableIconState(!1)}let Er=h(()=>N.value.style.backgroundColor),Dr=h(()=>N.value.style.title),{isCallbackImaging:Or,isCallbackSvg:kr,generateSvg:Ar,onGenerateImage:jr}=_e({svg:R,title:Dr,legend:null,legendItems:null,backgroundColor:Er,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Dn});async function Mr(){Bt(`copyAlt`,{config:N.value,dataset:X.value}),N.value.userOptions.callbacks.altCopy?await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Nr(e,t){let n=X.value[e];if(!n)return null;let r=n.temperatures[t];return r?{cell:r,rowIndex:e,columnIndex:t}:null}function Pr(e,t){let n=0;for(let t=0;t<e;t+=1)n+=X.value[t]?.temperatures?.length||0;return n+t}function Fr(){M.value=null,ln.value=null,fn.value=!0}function Ir(){or(),fn.value=!1}function Lr(e){if(!R.value||gr.value||document.activeElement!==R.value||!$.value.length)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){or();return}if(a){if(M.value===null)return;let e=$.value[M.value];if(!e)return;vr(e.cell,e.rowIndex);return}let s=M.value===null?null:$.value[M.value];if(!s){let e=Gt.value?$.value.findIndex(e=>e.cell.id===Gt.value):null;if(e!==null&&e>=0&&e<$.value.length){let a=$.value[e];if(!a)return;let o=a.rowIndex,s=a.columnIndex;n?s+=1:t?--s:i?o+=1:r&&--o;let c=zr.value.rowCount;if(c<=0)return;o<0&&(o=c-1),o>=c&&(o=0);let l=X.value[o];if(!l||!l.temperatures.length)return;let u=l.temperatures.length;s<0&&(s=u-1),s>=u&&(s=0);let d=Nr(o,s);if(!d)return;let f=Pr(o,s),p=W.value.left+W.value.cellSize.width*d.columnIndex,ee=W.value.top+W.value.cellSize.height*d.rowIndex;cr(d.cell,d.rowIndex,p,ee,`keyboard`,f);return}let a=$.value[0];if(!a)return;let o=W.value.left+W.value.cellSize.width*a.columnIndex,s=W.value.top+W.value.cellSize.height*a.rowIndex;cr(a.cell,a.rowIndex,o,s,`keyboard`,0);return}let c=s.rowIndex,l=s.columnIndex;n?l+=1:t?--l:i?c+=1:r&&--c;let u=zr.value.rowCount;if(u<=0)return;c<0&&(c=u-1),c>=u&&(c=0);let d=X.value[c];if(!d||!d.temperatures.length)return;let f=d.temperatures.length;l<0&&(l=f-1),l>=f&&(l=0);let p=Nr(c,l);if(!p)return;let ee=Pr(c,l),te=W.value.left+W.value.cellSize.width*p.columnIndex,ne=W.value.top+W.value.cellSize.height*p.rowIndex;cr(p.cell,p.rowIndex,te,ne,`keyboard`,ee)}let Rr=h(()=>({headers:[N.value.table.colNames.xAxis,...L.value.map(e=>e.name)],rows:Y.value.xLabels.map((e,t)=>[e,...L.value.map(e=>{let n=e.values?.[t];return isNaN(n)?`-`:a({p:F.value.prefix,v:n,s:F.value.suffix,r:N.value.table.td.roundingValue})})])})),zr=h(()=>({rowCount:X.value.length,columnCount:Math.max(0,...X.value.map(e=>e.temperatures.length))})),$=h(()=>X.value.flatMap((e,t)=>e.temperatures.map((e,n)=>({cell:e,rowIndex:t,columnIndex:n}))));return fe({getData:yr,getImage:br,generatePdf:En,generateCsv:fr,generateImage:Dn,generateSvg:Ar,toggleTable:mr,toggleTooltip:hr,toggleAnnotator:_r,toggleFullscreen:pr,copyAlt:Mr}),Je(()=>[H.value,F.value,P.value,N.value.style.fontFamily,k.dataset,qn.value,Wn.value,Kn.value,Gn.value,An.value,rn.value,tn.value,an.value],Rn,{flush:`post`,deep:!0}),(i,o)=>(S(),_(`div`,{ref_key:`heatmapChart`,ref:A,class:ze(`vue-data-ui-component vue-ui-heatmap ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:x(`font-family:${N.value.style.fontFamily};width:100%;${N.value.responsive?`height: 100%;`:``} text-align:center;background:${N.value.style.backgroundColor}`),id:`heatmap__${Ht.value}`,onMouseenter:o[1]||=()=>xn(!0),onMouseleave:o[2]||=()=>{xn(!1),fn.value||or()}},[v(`div`,{id:`chart-instructions-${Ht.value}`,class:`sr-only`},[v(`p`,null,E(N.value.a11y.translations.keyboardNavigation),1)],8,nt),Rr.value?.rows?.length?(S(),Me(De,{key:0,uid:Ht.value,head:Rr.value.headers,body:Rr.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):g(``,!0),N.value.userOptions.buttons.annotator?(S(),Me(D(Nt),Le({key:1},D(n)(N.value.userOptions.annotator),{svgRef:D(R),backgroundColor:N.value.style.backgroundColor,color:N.value.style.color,active:gr.value,isCursorPointer:pn.value,palette:N.value.userOptions.annotatorPalette,onClose:_r}),Ne({_:2},[w(D(r),e=>({name:e,fn:O(n=>[T(i.$slots,e,b(y(D(t)(e,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):g(``,!0),On.value?(S(),_(`div`,{key:2,ref_key:`noTitle`,ref:$t,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):g(``,!0),N.value.style.title.text?(S(),_(`div`,{key:3,ref_key:`chartTitle`,ref:Qt,style:`width:100%;background:transparent`},[(S(),Me(ge,{key:`title_${Jt.value}`,config:{title:{cy:`heatmap-div-title`,...N.value.style.title},subtitle:{cy:`heatmap-div-subtitle`,...N.value.style.title.subtitle}}},null,8,[`config`]))],512)):g(``,!0),N.value.userOptions.show&&Vt.value&&(D(bn)||D(vn))?(S(),Me(D(Pt),{ref_key:`userOptionsRef`,ref:Zt,key:`user_options_${Kt.value}`,backgroundColor:N.value.style.backgroundColor,color:N.value.style.color,isImaging:D(Tn),isPrinting:D(wn),uid:Ht.value,hasTooltip:N.value.userOptions.buttons.tooltip&&N.value.style.tooltip.show,hasPdf:N.value.userOptions.buttons.pdf,hasImg:N.value.userOptions.buttons.img,hasSvg:N.value.userOptions.buttons.svg,hasXls:N.value.userOptions.buttons.csv,hasTable:N.value.userOptions.buttons.table,hasFullscreen:N.value.userOptions.buttons.fullscreen,hasAltCopy:N.value.userOptions.buttons.altCopy,isFullscreen:Q.value,isTooltip:z.value.showTooltip,titles:{...N.value.userOptions.buttonTitles},chartElement:A.value,position:N.value.userOptions.position,hasAnnotator:N.value.userOptions.buttons.annotator,isAnnotation:gr.value,callbacks:N.value.userOptions.callbacks,printScale:N.value.userOptions.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:pn.value,onToggleFullscreen:pr,onGeneratePdf:D(En),onGenerateCsv:fr,onGenerateImage:D(jr),onGenerateSvg:D(Ar),onToggleTable:mr,onToggleTooltip:hr,onToggleAnnotator:_r,onCopyAlt:Mr,style:x({visibility:D(bn)?D(vn)?`visible`:`hidden`:`visible`})},Ne({_:2},[w(D(ye)(i.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:O(t=>[T(i.$slots,e,b(y(D(be)(e,t))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.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(`.`))):g(``,!0),v(`div`,{class:ze({"vue-ui-heatmap-chart-wrapper":!0,"vue-ui-heatmap-chart-wrapper-legend-right":N.value.style.legend.show})},[(S(),_(`svg`,{ref_key:`svgRef`,ref:R,xmlns:D(ae),"aria-describedby":`chart-instructions-${Ht.value}`,class:ze({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${H.value.width} ${H.value.height}`,width:`100%`,style:x(`overflow: visible; background:transparent;color:${N.value.style.color};visibility:${D(Ln)?`visible`:`hidden`}`),"aria-live":`polite`,role:`img`,preserveAspectRatio:`xMidYMid`,tabindex:`0`,onFocus:Fr,onBlur:Ir,onKeydown:Lr},[Fe(D(Ft)),T(i.$slots,`svg-underlayer`,{svg:{...H.value,drawingArea:W.value,cells:Zn.value,isPrintingImg:D(wn)||D(Tn)||D(Or),isPrintingSvg:D(kr)}},void 0,!0),i.$slots[`chart-background`]?(S(),_(`foreignObject`,{key:0,x:W.value.left,y:W.value.top,width:W.value.width,height:W.value.height,style:{pointerEvents:`none`}},[T(i.$slots,`chart-background`,{},void 0,!0)],8,it)):g(``,!0),P.value.columnTotal.color.show?(S(),_(`g`,{key:1,ref_key:`xAxisSumRects`,ref:on},[(S(!0),_(m,null,w(Y.value.xTotals,(e,t)=>(S(),_(`rect`,{x:W.value.left+W.value.cellSize.width*t+U.value/2+W.value.sumCellXHeight,y:W.value.top-W.value.sumCellXHeight+U.value*(H.value.height/H.value.width),height:W.value.sumCellXHeight,width:W.value.cellSize.width-U.value,fill:P.value.colors.underlayer,stroke:N.value.style.backgroundColor,"stroke-width":U.value},null,8,at))),256)),(S(!0),_(m,null,w(Y.value.xTotals,(e,t)=>(S(),_(`rect`,{x:W.value.left+W.value.cellSize.width*t+U.value/2+W.value.sumCellXHeight,y:W.value.top-W.value.sumCellXHeight+U.value*(H.value.height/H.value.width),height:W.value.sumCellXHeight,width:W.value.cellSize.width-U.value,fill:e.color,stroke:N.value.style.backgroundColor,"stroke-width":U.value},null,8,ot))),256))],512)):g(``,!0),v(`g`,{ref_key:`datapoints`,ref:Yt},[(S(!0),_(m,null,w(Zn.value,e=>(S(),_(`g`,null,[v(`rect`,{x:e.x,y:e.y,width:e.width,height:e.height,fill:P.value.colors.underlayer,stroke:N.value.style.backgroundColor,"stroke-width":U.value},null,8,st),v(`rect`,{"data-a11y-cell-id":e.datapoint.id,x:e.x,y:e.y,width:e.width,height:e.height,fill:e.datapoint.color,stroke:N.value.style.backgroundColor,"stroke-width":U.value,"aria-label":`${e.datapoint.yAxisName}${e.datapoint.xAxisName?` - ${e.datapoint.xAxisName}`:``}: ${isNaN(e.datapoint.value)?`-`:e.datapoint.value}`,onMouseover:t=>cr(e.datapoint,e.rowIndex,e.selectionX,e.selectionY,`pointer`,Pr(e.rowIndex,e.columnIndex)),onMouseout:()=>lr({datapoint:e.datapoint,seriesIndex:e.rowIndex}),onClick:()=>vr(e.datapoint,e.rowIndex)},null,40,ct),P.value.value.show?Xe((S(),_(`text`,{key:0,"text-anchor":`middle`,"font-size":P.value.value.fontSize,"font-weight":P.value.value.bold?`bold`:`normal`,fill:D(ie)(e.datapoint.color),x:e.labelX,y:e.labelY,style:{pointerEvents:`none`,userSelect:`none`}},[Pe(E(D(p)(P.value.value.formatter,e.datapoint.value,D(a)({p:F.value.prefix,v:e.datapoint.value,s:F.value.suffix,r:P.value.value.roundingValue}),{datapoint:e.datapoint})),1)],8,lt)),[[D(Qe),{cellWidth:e.width,cellHeight:e.height,maxFontSize:P.value.value.fontSize,minFontSize:10,index:e.rowIndex*V.value+e.columnIndex,reportHide:ir,reportRotation:tr,hideAll:rr.value,rotateAll:er.value}]]):g(``,!0)]))),256))],512),P.value.rowTotal.color.show?(S(),_(`g`,{key:2,ref_key:`yAxisSumRects`,ref:nn},[(S(!0),_(m,null,w(X.value,(e,t)=>(S(),_(m,null,[v(`rect`,{x:W.value.left,y:W.value.top+W.value.cellSize.height*t,width:W.value.sumCellXHeight,height:W.value.cellSize.height-U.value,fill:P.value.colors.underlayer,stroke:N.value.style.backgroundColor,"stroke-width":U.value},null,8,ut),v(`rect`,{x:W.value.left,y:W.value.top+W.value.cellSize.height*t+U.value/2,width:W.value.sumCellXHeight,height:W.value.cellSize.height-U.value,fill:Y.value.yTotals[t].color,stroke:N.value.style.backgroundColor,"stroke-width":U.value},null,8,dt)],64))),256))],512)):g(``,!0),F.value.yAxis.show?(S(),_(`g`,{key:3,ref_key:`yAxisLabels`,ref:tn},[(S(!0),_(m,null,w(X.value,(e,t)=>(S(),_(m,null,[v(`text`,{class:`vue-ui-heatmap-row-name`,"font-size":F.value.yAxis.fontSize,fill:F.value.yAxis.color,x:Bn.value+F.value.yAxis.offsetX,y:W.value.top+W.value.cellSize.height*t+W.value.cellSize.height/2+F.value.yAxis.fontSize/3+F.value.yAxis.offsetY-(P.value.rowTotal.value.show?F.value.yAxis.fontSize/1.5:0),"text-anchor":`end`,"font-weight":F.value.yAxis.bold?`bold`:`normal`},E(Y.value.yLabels[t]),9,ft),P.value.rowTotal.value.show?(S(),_(`text`,{key:0,class:`vue-ui-heatmap-row-total`,"font-size":F.value.yAxis.fontSize,fill:F.value.yAxis.color,x:Bn.value,y:W.value.top+W.value.cellSize.height*t+W.value.cellSize.height/2+F.value.yAxis.fontSize+F.value.yAxis.offsetY,"text-anchor":`end`,"font-weight":F.value.yAxis.bold?`bold`:`normal`},E(ur(t)),9,pt)):g(``,!0)],64))),256))],512)):g(``,!0),F.value.xAxis.show?(S(),_(`g`,{key:4,ref_key:`xAxisLabels`,ref:rn},[(S(!0),_(m,null,w(Y.value.xLabels,(e,t)=>(S(),_(m,null,[!F.value.xAxis.showOnlyAtModulo||F.value.xAxis.showOnlyAtModulo&&t%F.value.xAxis.showOnlyAtModulo===0?(S(),_(`text`,{key:0,class:`vue-ui-heatmap-col-name`,"text-anchor":F.value.xAxis.rotation===0?`middle`:F.value.xAxis.rotation<0?`start`:`end`,"font-size":F.value.xAxis.fontSize,fill:F.value.xAxis.color,"font-weight":F.value.xAxis.bold?`bold`:`normal`,transform:`translate(${W.value.left+W.value.cellSize.width/2+W.value.width/Y.value.xLabels.length*t+F.value.xAxis.offsetX+W.value.sumCellXHeight}, ${W.value.topLabelsHeight+F.value.xAxis.offsetY}), rotate(${F.value.xAxis.rotation})`},E(e),9,mt)):g(``,!0)],64))),256))],512)):g(``,!0),P.value.columnTotal.value.show?(S(),_(`g`,{key:5,ref_key:`xAxisSums`,ref:an},[(S(!0),_(m,null,w(Y.value.xLabels,(e,t)=>(S(),_(`text`,{class:`vue-ui-heatmap-col-total`,"text-anchor":P.value.columnTotal.value.rotation===0?`middle`:P.value.columnTotal.value.rotation<0?`end`:`start`,"font-size":F.value.xAxis.fontSize,fill:F.value.xAxis.color,"font-weight":F.value.xAxis.bold?`bold`:`normal`,transform:`translate(${W.value.left+W.value.cellSize.width/2+W.value.width/Y.value.xLabels.length*t+F.value.xAxis.offsetX+P.value.columnTotal.value.offsetX+W.value.sumCellXHeight}, ${W.value.bottom+F.value.xAxis.fontSize/2}), rotate(${P.value.columnTotal.value.rotation})`},E(dr(t)),9,ht))),256))],512)):g(``,!0),j.value?(S(),_(`g`,gt,[v(`rect`,{style:{"pointer-events":`none`},x:j.value.x-P.value.selected.border/2+U.value+W.value.sumCellXHeight,y:j.value.y-P.value.selected.border/2+U.value,width:W.value.cellSize.width-U.value+P.value.selected.border-U.value,height:W.value.cellSize.height-U.value+P.value.selected.border-U.value,fill:`transparent`,stroke:P.value.selected.color,"stroke-width":P.value.selected.border,rx:1},null,8,_t)])):g(``,!0),I.value.crosshairs.show&&j.value?(S(),_(`g`,vt,[v(`line`,{x1:W.value.left+W.value.sumCellXHeight,x2:j.value.x+W.value.sumCellXHeight,y1:j.value.y+(W.value.cellSize.height-U.value)/2,y2:j.value.y+(W.value.cellSize.height-U.value)/2,stroke:I.value.crosshairs.stroke,"stroke-width":I.value.crosshairs.strokeWidth,"stroke-dasharray":I.value.crosshairs.strokeDasharray,"stroke-linecap":`round`},null,8,yt),v(`line`,{x1:j.value.x+W.value.sumCellXHeight+(W.value.cellSize.width-U.value)/2,x2:j.value.x+W.value.sumCellXHeight+(W.value.cellSize.width-U.value)/2,y1:j.value.y,y2:W.value.top,stroke:I.value.crosshairs.stroke,"stroke-width":I.value.crosshairs.strokeWidth,"stroke-dasharray":I.value.crosshairs.strokeDasharray,"stroke-linecap":`round`},null,8,bt)])):g(``,!0),T(i.$slots,`svg`,{svg:{...H.value,drawingArea:W.value,cells:Zn.value,isPrintingImg:D(wn)||D(Tn)||D(Or),isPrintingSvg:D(kr)}},void 0,!0)],46,rt)),N.value.style.legend.show?(S(),_(`div`,{key:0,ref_key:`legendRight`,ref:en,class:`vue-ui-heatmap-legend-right`,style:x({"--legend-width":N.value.style.legend.width+`px`})},[D(gn)?g(``,!0):(S(),_(`div`,{key:0,class:`vue-ui-heatmap-legend-label-max`,style:x({fontSize:N.value.style.legend.fontSize+`px`,color:N.value.style.legend.color})},E(D(p)(P.value.value.formatter,D(f)(G.value),D(a)({p:F.value.prefix,v:D(f)(G.value),s:F.value.suffix,r:N.value.style.legend.roundingValue}))),5)),v(`div`,xt,[v(`div`,{class:`vue-ui-heatmap-gauge`,style:x({background:`linear-gradient(to bottom, ${P.value.colors.hot}, ${P.value.colors.cold})`})},[Xe(v(`div`,{class:`vue-ui-heatmap-gauge-indicator`,"data-value":D(p)(P.value.value.formatter,D(f)(Z.value),D(a)({p:F.value.prefix,v:D(f)(Z.value),s:F.value.suffix,r:N.value.style.legend.roundingValue})),style:x({position:`absolute`,width:`100%`,height:`2px`,background:[void 0,null].includes(Z.value)?`transparent`:D(ie)(ar.value.datapoint.color),top:`${Xn(Z.value)}%`,transition:`all 0.2s ease-in-out`,"--background-color":N.value.style.backgroundColor,"--gauge-arrow-color":D(ie)(N.value.style.backgroundColor),"--gauge-arrow-text-color":D(ie)(N.value.style.backgroundColor),"--gauge-arrow-value":Z.value,"--gauge-arrow-font-size":N.value.style.legend.fontSize+`px`})},[v(`div`,Ct,E(D(p)(P.value.value.formatter,D(f)(Z.value),D(a)({p:F.value.prefix,v:D(f)(Z.value),s:F.value.suffix,r:N.value.style.legend.roundingValue}))),1)],12,St),[[qe,![void 0,null].includes(Z.value)]])],4)]),D(gn)?g(``,!0):(S(),_(`div`,{key:1,class:`vue-ui-heatmap-legend-label-min`,style:x({fontSize:N.value.style.legend.fontSize+`px`,color:N.value.style.legend.color})},E(D(p)(P.value.value.formatter,D(f)(K.value),D(a)({p:F.value.prefix,v:D(f)(K.value),s:F.value.suffix,r:N.value.style.legend.roundingValue}))),5))],4)):g(``,!0),i.$slots.hint?(S(),_(`div`,wt,[T(i.$slots,`hint`,b(y({hint:N.value.a11y.translations.keyboardNavigation,isVisible:fn.value})),void 0,!0)])):g(``,!0)],2),i.$slots.watermark?(S(),_(`div`,Tt,[T(i.$slots,`watermark`,b(y({isPrinting:D(wn)||D(Tn)||D(Or)||D(kr)})),void 0,!0)])):g(``,!0),i.$slots.source?(S(),_(`div`,{key:6,ref_key:`source`,ref:sn,dir:`auto`},[T(i.$slots,`source`,{},void 0,!0)],512)):g(``,!0),Fe(D(et),{teleportTo:N.value.style.tooltip.teleportTo,show:z.value.showTooltip&&Ut.value,backgroundColor:N.value.style.tooltip.backgroundColor,color:N.value.style.tooltip.color,borderRadius:N.value.style.tooltip.borderRadius,borderColor:N.value.style.tooltip.borderColor,borderWidth:N.value.style.tooltip.borderWidth,fontSize:N.value.style.tooltip.fontSize,backgroundOpacity:N.value.style.tooltip.backgroundOpacity,position:N.value.style.tooltip.position,offsetX:N.value.style.tooltip.offsetX,offsetY:N.value.style.tooltip.offsetY,parent:A.value,content:Wt.value,isFullscreen:Q.value,isCustom:N.value.style.tooltip.customFormat&&typeof N.value.style.tooltip.customFormat==`function`,smooth:N.value.style.tooltip.smooth,backdropFilter:N.value.style.tooltip.backdropFilter,smoothForce:N.value.style.tooltip.smoothForce,smoothSnapThreshold:N.value.style.tooltip.smoothSnapThreshold,isA11yMode:dn.value===`keyboard`,a11yPosition:un.value},{"tooltip-before":O(()=>[T(i.$slots,`tooltip-before`,b(y({...ar.value})),void 0,!0)]),tooltip:O(()=>[T(i.$slots,`tooltip`,b(y({...ar.value})),void 0,!0)]),"tooltip-after":O(()=>[T(i.$slots,`tooltip-after`,b(y({...ar.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`]),Vt.value&&N.value.userOptions.buttons.table?(S(),Me(Ue(Cr.value.component),Le({key:7},Cr.value.props,{ref_key:`tableUnit`,ref:Xt,onClose:Tr}),Ne({content:O(()=>[v(`div`,{ref_key:`tableContainer`,ref:qt,class:`vue-ui-heatmap-table atom-data-table`,style:x(`${N.value.table.useDialog?``:`max-height: 300px; margin-top: 24px;`}`)},[v(`div`,{style:x(`width:100%;overflow-x:auto;position:relative;${N.value.table.useDialog?``:`padding-top:36px`};`),class:ze({"vue-ui-responsive":D(wr)})},[N.value.table.useDialog?g(``,!0):(S(),_(`div`,{key:0,role:`button`,tabindex:`0`,style:x(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${N.value.table.th.backgroundColor};`),onClick:Tr,onKeypress:Ze(Tr,[`enter`])},[Fe(D(Mt),{name:`close`,stroke:N.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),v(`table`,Et,[N.value.table.useDialog?g(``,!0):(S(),_(`caption`,{key:0,style:x(`backgroundColor:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline}`)},[Pe(E(N.value.style.title.text)+` `,1),N.value.style.title.subtitle.text?(S(),_(`span`,Dt,E(N.value.style.title.subtitle.text),1)):g(``,!0)],4)),v(`thead`,null,[v(`tr`,{role:`row`,style:x(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color}`)},[v(`th`,{style:x(`outline:${N.value.table.th.outline};padding-right:6px`)},null,4),(S(!0),_(m,null,w(e.dataset,(e,t)=>(S(),_(`th`,{align:`right`,style:x(`outline:${N.value.table.th.outline};padding-right:6px`)},E(e.name),5))),256))],4)]),v(`tbody`,null,[(S(!0),_(m,null,w(Y.value.xLabels,(t,n)=>(S(),_(`tr`,{role:`row`,class:ze({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2==0,"vue-ui-data-table__tbody__row-odd":n%2!=0}),style:x(`background:${N.value.table.td.backgroundColor};color:${N.value.table.td.color}`)},[v(`td`,{"data-cell":N.value.table.colNames.xAxis,class:`vue-ui-data-table__tbody__td`,style:x(`outline:${N.value.table.td.outline}`)},[v(`div`,kt,E(t),1)],12,Ot),(S(!0),_(m,null,w(e.dataset,(t,r)=>(S(),_(`td`,{class:`vue-ui-data-table__tbody__td`,"data-cell":e.dataset[r].name,style:x(`outline:${N.value.table.td.outline}`)},[v(`div`,jt,E(isNaN(t.values[n])?`-`:D(a)({p:F.value.prefix,v:t.values[n],s:F.value.suffix,r:N.value.table.td.roundingValue})),1)],12,At))),256))],6))),256))])])],6)],4)]),_:2},[N.value.table.useDialog?{name:`title`,fn:O(()=>[Pe(E(Cr.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:O(()=>[v(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:o[0]||=e=>fr(N.value.userOptions.callbacks.csv),style:x({cursor:pn.value?`pointer`:`default`})},[Fe(D(Mt),{name:`fileCsv`,stroke:Cr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):g(``,!0),T(i.$slots,`skeleton`,{},()=>[D(gn)?(S(),Me(le,{key:0})):g(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-e56c3b02`]]);export{et as n,Mt as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,X as c,a as l,i as u,nn as d,nt as f,r as p,x as m}from"./lib-rPeBMZrn.js";import{n as h,t as g}from"./useHints-C-TwxM0Y.js";import{t as ee}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as te}from"./useNestedProp-DnGoh-XS.js";import{t as ne}from"./useThemeCheck-BKNRbGeC.js";import{t as re}from"./chartImage-DPGnEuYM.js";import{n as ie}from"./Title-BliHuXfT.js";import{t as ae}from"./useChartExport-BZts4KFb.js";import{n as oe,t as se}from"./userOptionsSlots-DYuo-E5m.js";import{t as ce}from"./usePrinter-DVf3YcG5.js";import{t as le}from"./useTransitions-ChGGrtrv.js";import{t as ue}from"./useUserOptionState-CXlFnwPv.js";import{t as de}from"./vue_ui_hill-DQi4pQCG.js";import{Fragment as fe,computed as _,createBlock as pe,createCommentVNode as v,createElementBlock as y,createElementVNode as b,createSlots as me,createVNode as he,defineAsyncComponent as ge,guardReactiveProps as _e,mergeProps as ve,nextTick as ye,normalizeClass as be,normalizeProps as xe,normalizeStyle as x,onBeforeUnmount as Se,onMounted as Ce,openBlock as S,ref as C,renderList as w,renderSlot as T,shallowRef as we,toDisplayString as E,unref as D,useTemplateRef as Te,watch as Ee,withCtx as De,withKeys as Oe,withModifiers as O}from"vue";var ke=/* @__PURE__ */ e({default:()=>Ct}),Ae=[`id`,`data-editing`],je={key:0,ref:`chartTitle`,style:`width:100%;background:transparent;padding-bottom:24px`},Me={key:3,class:`vue-ui-hill__toolbar`,"data-dom-to-png-ignore":``},Ne=[`viewBox`],Pe=[`width`,`height`],Fe=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Ie=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Le=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Re={key:0,"pointer-events":`none`},ze=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Be=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ve=[`transform`,`font-size`,`fill`,`stroke`],He=[`transform`,`data-datapoint-index`,`data-datapoint-id`,`tabindex`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`onFocus`,`onBlur`,`onKeydown`,`onPointerenter`,`onPointerleave`,`onClick`],Ue=[`r`,`onPointerdown`],We=[`r`,`fill`,`stroke`,`stroke-width`],Ge=[`stroke`,`stroke-width`],Ke=[`d`],qe=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`font-weight`,`stroke`,`stroke-width`],Je=[`transform`,`tabindex`,`aria-label`,`aria-expanded`,`onClick`,`onFocus`,`onKeydown`],Ye={key:0,class:`vue-ui-hill__stack-overflow-collapse-ghosts`,"pointer-events":`none`,"aria-hidden":`true`},Xe=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ze=[`from`,`dur`],Qe=[`from`,`dur`],$e=[`from`,`to`,`dur`],et=[`dur`],tt=[`r`],nt=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`],rt=[`stroke`,`stroke-width`],it=[`d`],at=[`y`,`fill`,`font-size`,`font-weight`,`stroke`],ot=[`x`,`y`,`fill`,`font-size`,`font-weight`,`letter-spacing`],st=[`x`,`y`,`fill`,`font-size`,`font-weight`,`letter-spacing`],ct=[`x`,`y`,`rx`,`width`,`height`,`fill`],lt=[`id`],ut=[`x`,`y`,`width`,`height`,`rx`,`ry`],dt=[`clip-path`],ft=[`width`,`x`,`y`,`fill`,`height`,`onPointerenter`,`onPointerleave`],pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mt=[`x`,`y`,`width`,`height`,`rx`,`ry`,`stroke`,`stroke-width`],ht=[`x`,`y`,`fill`,`font-size`],gt=[`aria-label`,`onKeydown`],_t={key:0,class:`vue-ui-hill__stack-overflow-menu-title`},vt=[`disabled`,`aria-label`,`onClick`],yt={class:`vue-ui-hill__stack-overflow-menu-label`},bt={class:`vue-ui-hill__stack-overflow-menu-value`},xt={key:6,class:`vue-data-ui-watermark`},St={key:7,class:`vue-ui-hill__loading`,"data-dom-to-png-ignore":``},Ct=/*#__PURE__*/ ee({__name:`vue-ui-hill`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`edit`,`save`,`cancel`,`copyAlt`,`change`,`dragStart`,`dragEnd`,`datapointEnter`,`datapointLeave`,`selectDatapoint`],setup(e,{expose:ee,emit:ke}){let Ct=ge(()=>import(`./HillActions-BMH9pSmQ.js`)),wt=ge(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Tt=ge(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Et=ge(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Dt=ge(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),{vue_ui_hill:Ot}=i(),{isThemeValid:kt,warnInvalidTheme:At}=ne(),jt=e,Mt=C(c()),Nt=we(null),Pt=Te(`hillChartRef`),k=Te(`svgRef`),Ft=Te(`overflowMenuRef`),It=Te(`userOptionsRef`),Lt=C(0),Rt=ke;function zt(){let e=te({userConfig:jt.config,defaultConfig:Ot}),t={},n=e.theme;if(!n)t=e;else if(!kt.value(e))At(e),t=e;else{let r=te({userConfig:de[n]||jt.config,defaultConfig:e});t={...te({userConfig:jt.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:d[n]||nn}}return t}let A=C(zt()),j=_(()=>A.value.style.chart.layout.plots),M=_(()=>A.value.style.chart);h({config:()=>A.value,dataset:()=>jt.dataset,component:`VueUiHill`,rules:[g.emptyArray,g.noHint]});let{transitionEnabled:N}=le({config:()=>A.value.transitions,dataset:()=>jt.dataset}),{userOptionsVisible:Bt,setUserOptionsVisibility:Vt,keepUserOptionState:Ht}=ue({config:A.value});function Ut(){Vt(!0)}function Wt(){Vt(!1),tr.value=null,Z.value=null,er.value=null}let{isPrinting:Gt,isImaging:Kt,generatePdf:qt,generateImage:Jt}=ce({elementId:`hill_${Mt.value}`,fileName:M.value.title.text||`vue-ui-hill`,options:A.value.userOptions.print}),Yt=_(()=>A.value.userOptions.useCursorPointer),Xt=C(0),Zt=C(!1);function Qt(e){Zt.value=e,Xt.value+=1}let $t=C(!1);function en(){$t.value=!$t.value}let tn=_(()=>A.value.userOptions.position===`left`?`right`:`left`);Ee(()=>jt.config,()=>{Nt.value=null,A.value=zt(),Xt.value+=1,P.value!==A.value.editing&&(P.value=A.value.editing&&!A.value.readonly)},{deep:!0});let nn=_(()=>{let e=A.value.customPalette;return Array.isArray(e)&&e.length?e:s});function rn(e){let t=Number(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):0}function an(e){if(e<=0)return`todo`;if(e>=1)return`done`;let t=.5,n=Math.min(t,Math.max(0,Number(A.value.interaction.peakTolerance)||0)),r=t-n,i=t+n;return e>=r&&e<=i?`top`:e<t?`left`:`right`}function on(e,t){let n=e&&typeof e==`object`?e:{},r=`Item ${t+1}`,i=String(n.name??n.label??r),a=rn(n.position??n.value??0);return{...n,id:String(n.id??`${i}-${t}`),name:i,label:String(n.label??i),position:a,color:n.color||nn.value[t%nn.value.length],muted:!!n.muted,disabled:!!n.disabled,status:an(e.position),labelSide:[`left`,`right`,`auto`].includes(n.labelSide)?n.labelSide:`auto`,__index:t}}let sn=_(()=>Array.isArray(jt.dataset)?jt.dataset.map(on):[]);function cn(e){return e.map(e=>({...e}))}function ln(e){let{__index:t,...n}=e;return Object.prototype.hasOwnProperty.call(n,`value`)&&(n.value=n.position),n}function un(e=F.value){return e.map(ln)}let dn=_(()=>A.value.editing&&!A.value.readonly),P=C(dn.value),F=C(cn(sn.value)),I=C(null);Ee(sn,e=>{P.value||(Nt.value=null,F.value=cn(e))},{deep:!0});let L=_(()=>!A.value.readonly);Ee(L,e=>{e||(I.value=null,Nt.value=null,P.value=!1,F.value=cn(sn.value))});function R(e,t){Rt(e,t);let n=A.value.events?.[e];typeof n==`function`&&n(t)}let z=_(()=>M.value),fn=_(()=>z.value.layout),B=_(()=>fn.value.hill),V=_(()=>fn.value.plots),H=_(()=>fn.value.labels.item),U=_(()=>fn.value.labels.phases),W=_(()=>z.value.toolbar),G=_(()=>fn.value.stackbar),K=_(()=>{let e=V.value.stacking?.overflow||{},t=Math.max(0,Number(V.value.radius)||0);return{show:e.show!==!1,marker:{radius:Math.max(4,Number(e.marker?.radius)||t),fill:e.marker.fill,stroke:e.marker?.stroke||V.value.stroke,strokeWidth:e.marker.strokeWidth,color:e.marker.labelColor,fontSize:e.marker.fontSize,bold:e.marker?.bold!==!1,offsetY:e.marker.labelOffsetY},hysteresis:t*1.5,transitionDuration:N.value?e.transitionDuration:0,menu:{width:Math.max(160,Number(e.menu?.width)||220),maxHeight:Math.max(96,Number(e.menu?.maxHeight)||220),backgroundColor:e.menu?.backgroundColor||z.value.backgroundColor,color:e.menu?.color||z.value.color,borderColor:e.menu?.borderColor||V.value.stroke,borderRadius:Math.max(0,Number(e.menu?.borderRadius)||6)}}});function pn(e,t,n=1){let r=Number(e);return Number.isFinite(r)?Math.min(n,Math.max(0,r)):t}let q=_(()=>{let e=B.value.geometry||{},t=Math.max(0,Number(z.value.width)||0),n=Math.max(0,Number(z.value.height)||0),r=pn(e.horizontalPaddingRatio,.02,.49),i=pn(e.topPaddingRatio,.12,.49),a=pn(e.bottomPaddingRatio,.2,.49),o=pn(e.curvature,.65),s=t*r,c=t/2,l=t*(1-r),u=n*i,d=n*(1-a),f=c-s,p=l-c,m=s+f*o,h=c+p*(1-o);return{startX:s,centerX:c,endX:l,baseY:d,peakY:u,width:f+p,left:[{x:s,y:d},{x:m,y:d},{x:m,y:u},{x:c,y:u}],right:[{x:c,y:u},{x:h,y:u},{x:h,y:d},{x:l,y:d}]}}),mn=_(()=>{let{left:e,right:t}=q.value;return[`M${e[0].x} ${e[0].y}`,`C${e[1].x} ${e[1].y} ${e[2].x} ${e[2].y} ${e[3].x} ${e[3].y}`,`C${t[1].x} ${t[1].y} ${t[2].x} ${t[2].y} ${t[3].x} ${t[3].y}`].join(` `)});function hn(e,t,n,r,i){let a=1-i;return a**3*e+3*a**2*i*t+3*a*i**2*n+i**3*r}function gn(e,t,n,r,i){let a=1-i;return 3*a**2*(t-e)+6*a*i*(n-t)+3*i**2*(r-n)}function _n(e){let t=rn(e),{startX:n,centerX:r,endX:i,left:a,right:o}=q.value,s=n+(t-0)/1*(i-n),c=s<=r?a:o,l=0,u=1;for(let e=0;e<28;e+=1){let e=(l+u)/2;hn(c[0].x,c[1].x,c[2].x,c[3].x,e)<s?l=e:u=e}let d=(l+u)/2,f=hn(c[0].y,c[1].y,c[2].y,c[3].y,d),p=gn(c[0].x,c[1].x,c[2].x,c[3].x,d),m=gn(c[0].y,c[1].y,c[2].y,c[3].y,d),h=Math.hypot(p,m)||1;return{x:s,y:f,normalX:m/h,normalY:-p/h}}function vn(e){let t=Number(V.value.stacking.overlapThresholdRatio);return e*(2-(Number.isFinite(t)?Math.min(2,Math.max(0,t)):.5))}function yn(e,t){let n=/* @__PURE__ */ new Map,r=V.value.stacking;if(e.forEach(e=>{n.set(e.id,{position:e.position,index:0,size:1,stackId:`stack:${e.id}`})}),!r.show||e.length<2||t<=0)return n;let i=vn(t),a=e.map((e,t)=>({datapoint:e,index:t,point:_n(e.position)})).sort((e,t)=>e.point.x-t.point.x||e.datapoint.position-t.datapoint.position||e.index-t.index),o=0;for(;o<a.length;){let e=[a[o]],t=o+1;for(;t<a.length;){let n=e[e.length-1],r=a[t];if(Math.hypot(r.point.x-n.point.x,r.point.y-n.point.y)>=i)break;e.push(r),t+=1}if(e.length>1){let t=e[0].datapoint.position,r=`stack:${e.map(({datapoint:e})=>e.id).sort().join(`|`)}`;e.forEach(({datapoint:i},a)=>{n.set(i.id,{position:t,index:a,size:e.length,stackId:r})})}o=t}return n}function bn(e){let t=e+Math.max(0,Number(V.value.strokeWidth)||0)/2,n=V.value.stacking.gap??e/2;return t*2+n}let xn=C(null),J=C(null),Y=C(null),Sn=C(null),Cn=C(null),wn=/* @__PURE__ */ new Set,Tn=null,En=null,X=null;function Dn(e){let t=Math.max(0,Number(V.value.strokeWidth)||0),n=V.value.shadow.show?Math.max(0,Number(V.value.shadow.blur)||0)+Math.max(0,-(Number(V.value.shadow.offsetY)||0)):0;return e+t/2+n}function On(e,t,n){if(t<=1)return e-Dn(n);let r=bn(n);return e-(t-1)*r-Dn(n)}function kn(e,t,n,r){if(n<=1)return wn.delete(e),!1;let i=On(t,n,r),a=wn.has(e),o=K.value.hysteresis,s=a?i<o:i<0;return s?wn.add(e):wn.delete(e),s}let An=_(()=>{let e=Math.max(0,Number(V.value.radius)||0),t=bn(e),n=yn(F.value,e),r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=[],o=/* @__PURE__ */ new Set,s=I.value?.id??null;K.value.show||wn.clear(),F.value.forEach(e=>{let t=n.get(e.id)||{position:e.position,index:0,size:1,stackId:`stack:${e.id}`};r.has(t.stackId)||r.set(t.stackId,[]),r.get(t.stackId).push({datapoint:e,stack:t})});let c=new Set(r.keys());return wn.forEach(e=>{c.has(e)||wn.delete(e)}),r.forEach((n,r)=>{let c=[...n].sort((e,t)=>e.stack.index-t.stack.index||e.datapoint.__index-t.datapoint.__index),l=c.reduce((e,t)=>e+(Number(t.datapoint.position)||0),0)/c.length,u=_n(l);if(!(K.value.show&&kn(r,u.y,c.length,e))){c.forEach(e=>{i.set(e.datapoint.id,{hidden:!1,displayIndex:e.stack.index,stackId:r,stackSize:c.length,promotedFromOverflow:!1,renderPosition:e.stack.position})});return}c.forEach(({datapoint:e})=>{o.add(e.id)});let d=s?c.find(({datapoint:e})=>e.id===s):null,f=c.find(({datapoint:e})=>e.id===xn.value),p=d||f||null,m=p?c.filter(({datapoint:e})=>e.id!==p.datapoint.id):c,h=J.value,g=!(!f||h?.datapointId!==f.datapoint.id||h.moved),ee=m.length?g?l:m.reduce((e,t)=>e+(Number(t.datapoint.position)||0),0)/m.length:l,te=_n(ee);c.forEach(e=>{let t=p?.datapoint.id===e.datapoint.id,n=t&&f?.datapoint.id===e.datapoint.id;i.set(e.datapoint.id,{hidden:!t,displayIndex:+!!t,stackId:r,stackSize:c.length,promotedFromOverflow:n,renderPosition:ee})}),m.length&&a.push({stackId:r,anchorPosition:ee,x:te.x,y:te.y,hiddenCount:m.length,hiddenDatapoints:m.map(({datapoint:e})=>e),memberIds:c.map(({datapoint:e})=>e.id),collapseDatapoints:m.map(({datapoint:e,stack:n})=>{let r=_n(n.position);return{id:e.id,color:e.color,relativeX:r.x-te.x,relativeY:r.y-n.index*t-te.y}})})}),{layoutMap:n,displayMap:i,markers:a,overflowMemberIds:o}});function jn(e){let t=Nn.value.filter(e=>!e.isStackOverflowHidden),n=t.find(t=>t.id===e),r=new Map(t.filter(t=>t.id!==e).map(e=>[e.id,{x:e.x,y:e.y}]));if(!n||!V.value.stacking.show)return r;let i=t.filter(e=>Math.abs(e.x-n.x)<.001).sort((e,t)=>t.y-e.y||e.datasetIndex-t.datasetIndex);if(i.length<2)return r;let a=bn(Math.max(0,Number(V.value.radius)||0)),o=Math.max(...i.map(e=>e.y));return i.filter(t=>t.id!==e).forEach((e,t)=>{r.set(e.id,{x:n.x,y:o-t*a})}),r}function Mn(){return new Map(Nn.value.filter(e=>!e.isStackOverflowHidden).map(e=>[e.id,{x:e.x,y:e.y}]))}let Nn=_(()=>{let e=Math.max(0,Number(V.value.radius)||0),{layoutMap:t,displayMap:n,markers:r}=An.value,i=bn(e),a=I.value,o=a?.stationaryLayout,s=o instanceof Map?o:Nt.value instanceof Map?Nt.value:null,c=null;if(a&&o instanceof Map&&V.value.stacking.show&&e>0){let t=F.value.find(e=>e.id===a.id);if(t){let n=r.find(e=>e.memberIds.includes(t.id));if(n)c={x:n.x,y:n.y-i};else{let n=_n(t.position),r=vn(e),s=F.value.filter(e=>e.id!==a.id&&o.has(e.id)).map(e=>{let t=_n(e.position);return{datapoint:e,distance:Math.hypot(t.x-n.x,t.y-n.y)}}).filter(({distance:e})=>e<r).sort((e,t)=>e.distance-t.distance)[0];if(s){let e=o.get(s.datapoint.id),t=[...o.values()].filter(t=>Math.abs(t.x-e.x)<.001),n=Math.min(e.y,...t.map(e=>e.y));c={x:e.x,y:n-i}}else c=n}}}return F.value.map((e,r)=>{let o=t.get(e.id)||{position:e.position,index:0,size:1,stackId:`stack:${e.id}`},l=n.get(e.id)||{hidden:!1,displayIndex:o.index,stackId:o.stackId,stackSize:o.size,renderPosition:o.position},u=_n(l.renderPosition??o.position),d=e.id!==a?.id&&!l.promotedFromOverflow&&s instanceof Map?s.get(e.id):null,f=e.id===a?.id&&c?c:d||{x:u.x,y:u.y-l.displayIndex*i},p=e.labelSide===`auto`?null:e.labelSide,h=m(H.value.autoSideThreshold,.5,1),g=p||(e.position>h?`left`:`right`),ee=Math.abs(Number(H.value.offsetX)||0)+V.value.radius+H.value.fontSize/2;return{...e,datasetIndex:r,x:f.x,y:f.y,stackId:l.stackId,stackSize:l.stackSize,stackDisplayIndex:l.displayIndex,isStackOverflowHidden:l.hidden,isPromotedFromStackOverflow:l.promotedFromOverflow,labelSide:g,labelX:g===`left`?-ee:ee,textAnchor:g===`left`?`end`:`start`}})});function Pn(e){return F.value.find(t=>t.id===e)}function Fn(e,t){let n=rn(t),r;F.value=F.value.map(t=>t.id===e?(r={...t,position:n},r):t),r&&(br(r.id,r.position),R(`change`,{datapoint:ln(r),dataset:un()}))}function In(e){let t=k.value;if(!t)return null;let n=t.getScreenCTM();if(!n)return null;let r=t.createSVGPoint();r.x=e,r.y=0;let i=r.matrixTransform(n.inverse()),{startX:a,endX:o}=q.value;return rn(0+(i.x-a)/(o-a)*1)}function Ln(){L.value&&(Y.value=null,xn.value=null,J.value=null,Cn.value=null,pr(),Nt.value=null,F.value=cn(sn.value),P.value=!0,R(`edit`,un()))}function Rn(){let e=un();Y.value=null,xn.value=null,J.value=null,Cn.value=null,pr(),I.value=null,P.value=!1,R(`save`,e)}function zn(){Y.value=null,xn.value=null,J.value=null,Cn.value=null,pr(),I.value=null,Nt.value=null,F.value=cn(sn.value),P.value=!1,R(`cancel`,un())}function Bn(e,t){if(!L.value||!P.value||t.disabled)return;Y.value=null;let n=e.currentTarget.closest(`.vue-ui-hill__datapoint`);n&&typeof n.focus==`function`&&(n.focus(),Z.value=t.id),e.preventDefault();let r=jn(t.id),i=J.value?.datapointId===t.id&&!J.value?.moved;if(I.value={id:t.id,pointerId:e.pointerId,stationaryLayout:r,startClientX:e.clientX,hasMoved:!1,deferPositionUpdate:i},k.value?.setPointerCapture(e.pointerId),!i){let n=In(e.clientX);n!==null&&Fn(t.id,n)}let a=Pn(t.id);a&&R(`dragStart`,ln(a))}function Vn(e){if(!I.value||I.value.pointerId!==e.pointerId)return;e.preventDefault();let t=Math.abs(e.clientX-I.value.startClientX);if(I.value.deferPositionUpdate&&!I.value.hasMoved&&t<3)return;I.value.hasMoved||(I.value={...I.value,hasMoved:!0});let n=In(e.clientX);n!==null&&Fn(I.value.id,n)}function Hn(e){let t=I.value;if(!t||t.pointerId!==e.pointerId)return;k.value?.hasPointerCapture(e.pointerId)&&k.value.releasePointerCapture(e.pointerId);let n=e.type===`pointerup`&&!t.hasMoved,r=Pn(t.id);Nt.value=Mn(),I.value=null,r&&(n&&R(`selectDatapoint`,Gn(r)),R(`dragEnd`,ln(r)))}function Un(e,t){if(!L.value||!P.value||t.disabled)return;let n=Math.max(0,Number(A.value.interaction.keyboardStep)||0),r=null;switch(e.key){case`ArrowLeft`:case`ArrowDown`:r=t.position-n;break;case`ArrowRight`:case`ArrowUp`:r=t.position+n;break;case`Home`:r=0;break;case`End`:r=1;break;default:return}e.preventDefault();let i=e.currentTarget;Z.value=t.id,I.value={id:t.id,pointerId:null,stationaryLayout:jn(t.id)},Fn(t.id,r),Nt.value=Mn(),I.value=null,ye(()=>{i?.isConnected&&i.focus({preventScroll:!0})})}function Wn(e){let t=.5,n=Math.max(0,Number(A.value.interaction.peakTolerance)||0);return Math.abs(e-t)<=n?A.value.a11y.translations.topOfHill:e<t?U.value.left.text:U.value.right.text}function Gn(e){return{datapoint:ln(e),index:e.__index}}function Kn(e){Z.value=null,tr.value=e.id,![0,1].includes(e.position)&&Z.value!==e.id&&ir(e),R(`datapointEnter`,Gn(e))}function qn(e){tr.value===e.id&&(tr.value=null),er.value===e.id&&Z.value!==e.id&&I.value?.id!==e.id&&(er.value=null),R(`datapointLeave`,Gn(e))}function Jn(e){P.value&&L.value||R(`selectDatapoint`,Gn(e))}let Yn=_(()=>{let e=z.value;return{width:`100%`,maxWidth:`100%`,color:e.color,backgroundColor:e.backgroundColor,fontFamily:A.value.style.fontFamily,"--vue-ui-hill-button-hover-border":W.value.buttons.hoverBorderColor,"--vue-ui-hill-button-active-offset":`${W.value.buttons.activeTranslateY}px`}}),Xn=_(()=>({color:W.value.status.color,fontSize:`${W.value.status.fontSize}px`,fontWeight:W.value.status.bold?`bold`:`normal`,lineHeight:W.value.status.lineHeight}));_(()=>({color:z.value.title.color,fontSize:`${z.value.title.fontSize}px`,fontWeight:z.value.title.bold?`bold`:`normal`,textAlign:z.value.title.textAlign})),_(()=>({color:z.value.title.subtitle.color,fontSize:`${z.value.title.subtitle.fontSize}px`,fontWeight:z.value.title.subtitle.bold?`bold`:`normal`}));let Zn=_(()=>{let e=Math.max(0,Number(z.value.height)||0);return Math.min(e,q.value.baseY+e)+U.value.offsetY});function Qn(e){return U.value[e].text}function $n(e){return e.position===0||e.position===1}let er=C(null),tr=C(null),Z=C(null);function nr(e){Z.value=e.id}function rr(e){Z.value===e.id&&(Z.value=null),er.value===e.id&&tr.value!==e.id&&I.value?.id!==e.id&&(er.value=null)}function ir(e){e?.id&&(er.value=e.id)}let ar=_(()=>{let e=[],t=[],n=null;return Nn.value.forEach(r=>{r.isStackOverflowHidden||(r.id===er.value?n=r:$n(r)?e.push(r):t.push(r))}),[...e,...t,...n?[n]:[]]}),or=_(()=>An.value.markers),Q=_(()=>or.value.find(e=>e.stackId===Y.value)||null),sr=_(()=>{let e=Math.max(160,Number(K.value.menu.width)||220),t=Math.max(80,Number(K.value.menu.maxHeight)||220);return{visibility:Sn.value?`visible`:`hidden`,width:`max-content`,minWidth:`${e}px`,maxWidth:`calc(100% - 16px)`,maxHeight:`${t}px`,backgroundColor:K.value.menu.backgroundColor,color:K.value.menu.color,borderColor:K.value.menu.borderColor,borderRadius:`${K.value.menu.borderRadius}px`}});function cr(e,t){let n=k.value,r=Pt.value;if(!n||!r)return null;let i=n.getScreenCTM();if(!i)return null;let a=n.createSVGPoint();a.x=e,a.y=t;let o=a.matrixTransform(i),s=r.getBoundingClientRect();return{x:o.x-s.left,y:o.y-s.top}}function lr(){let e=Q.value,t=Ft.value,n=Pt.value;if(!e||!t||!n){Sn.value=null;return}let r=cr(e.x,e.y),i=cr(e.x,e.y+K.value.marker.radius);if(!r||!i){Sn.value=null;return}let a=n.getBoundingClientRect(),o=t.offsetWidth,s=t.offsetHeight,c=Math.abs(i.y-r.y),l=Math.max(0,a.width-16),u=Math.min(o,l),d=r.x;if(u>=l)d=a.width/2;else{let e=u/2;d=Math.min(a.width-8-e,Math.max(8+e,r.x))}let f=r.y+c+8,p=r.y-c-8-s,m=f+s<=a.height-8,h=p>=8,g=f;!m&&h?g=p:m||(g=Math.min(Math.max(8,f),Math.max(8,a.height-s-8))),Sn.value={left:`${d}px`,top:`${g}px`,transform:`translateX(-50%)`,visibility:`visible`}}function ur(){typeof window<`u`&&(X!==null&&window.cancelAnimationFrame(X),X=window.requestAnimationFrame(()=>{X=null,lr()}))}Ee(or,e=>{Y.value&&!e.some(e=>e.stackId===Y.value)&&fr()}),Ee(()=>{let e=Q.value;return e?[e.stackId,e.x,e.y,e.hiddenDatapoints.length,e.hiddenDatapoints.map(e=>`${e.id}:${e.label}:${e.position}`).join(`|`),K.value.marker.radius,K.value.menu.width,K.value.menu.maxHeight,K.value.menu.backgroundColor,K.value.menu.color,K.value.menu.borderColor,K.value.menu.borderRadius,Zt.value]:null},e=>{e?ye(ur):Sn.value=null},{flush:`post`}),Ee(Ft,(e,t)=>{t&&En&&En.unobserve(t),e&&En&&(En.observe(e),ye(ur))},{flush:`post`}),Ee(()=>{let e=xn.value;return!e||An.value.overflowMemberIds.has(e)},e=>{e||(xn.value=null,J.value=null)});function dr(e){e&&(Y.value===e.stackId?ur():(Sn.value=null,Y.value=e.stackId,ye(ur)))}function fr(){Y.value=null,Sn.value=null,typeof window<`u`&&X!==null&&(window.cancelAnimationFrame(X),X=null)}function pr(){Tn!==null&&(clearTimeout(Tn),Tn=null)}function mr(){let e=J.value;e&&!e.moved&&(pr(),Cn.value=e.stackId,xn.value=null,J.value=null,fr(),Tn=setTimeout(()=>{Cn.value=null,Tn=null},K.value.transitionDuration+80))}function hr(e){if(!(e instanceof Element))return{isMenu:!1,isMarker:!1,isSelectedDatapoint:!1};let t=J.value,n=e.closest(`[data-datapoint-id]`);return{isMenu:!!e.closest(`[data-stack-overflow-menu]`),isMarker:!!e.closest(`[data-stack-overflow-marker]`),isSelectedDatapoint:!!(t&&n?.getAttribute(`data-datapoint-id`)===t.datapointId)}}function gr(e){let t=hr(e.target);Y.value&&!t.isMenu&&!t.isMarker&&fr(),!J.value||J.value.moved||t.isMenu||t.isMarker||t.isSelectedDatapoint||mr()}function _r(e){let t=Nn.value.find(t=>t.id===e);if(!t||t.isStackOverflowHidden)return;let n=k.value?.querySelector(`[data-datapoint-index="${t.__index}"]`);n&&typeof n.focus==`function`&&n.focus({preventScroll:!0})}function vr(e){if(!e||e.disabled||A.value.readonly)return;let t=Q.value?.stackId;t&&(pr(),Cn.value=null,xn.value=e.id,J.value={datapointId:e.id,stackId:t,initialPosition:e.position,moved:!1},fr(),ye(()=>{_r(e.id);let t=Nn.value.find(t=>t.id===e.id);t&&R(`selectDatapoint`,Gn(t))}))}function yr(){let e=Math.max(1,Number(q.value.width)||1);return Math.max(1e-6,1/e*2)}function br(e,t){let n=J.value;n&&n.datapointId===e&&!n.moved&&Math.abs(t-n.initialPosition)>=yr()&&(J.value={...n,moved:!0})}Ce(()=>{document.addEventListener(`pointerdown`,gr),window.addEventListener(`resize`,ur,{passive:!0}),typeof ResizeObserver<`u`&&(En=new ResizeObserver(()=>{Q.value&&ur()}),Pt.value&&En.observe(Pt.value),k.value&&En.observe(k.value))}),Se(()=>{document.removeEventListener(`pointerdown`,gr),window.removeEventListener(`resize`,ur),En?.disconnect(),En=null,X!==null&&(window.cancelAnimationFrame(X),X=null),pr()});function xr(e){return I.value?I.value.id===e.id:tr.value===e.id||Z.value===e.id}function Sr(e){return u(j.value.dragMarker.positionIndicator.value.formatter,e.position,a({p:``,v:e.position*100,s:`%`,r:j.value.dragMarker.positionIndicator.value.rounding}))}let Cr=_(()=>M.value.backgroundColor),wr=_(()=>M.value.legend),Tr=_(()=>M.value.title),{isCallbackImaging:Er,isCallbackSvg:Dr,generateSvg:Or,onGenerateImage:kr}=ae({svg:k,title:Tr,legend:wr,legendItems:null,backgroundColor:Cr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Jt});function Ar(e=null){ye(()=>{let t=un().map(e=>[[e.name],[e.position],[Sr(e)],[Wn(e.position)]]),n=[[M.value.title.text],[M.value.title.subtitle.text],[[`Name`],[`Position`],[`Percentage`],[`Phase`]]].concat(t),r=o(n);e?e(r):f({csvContent:r,title:M.value.title.text||`vue-ui-hill`})})}let jr=_(()=>M.value.layout.stackbar.show),Mr=_(()=>{let e=Nn.value.length;Nn.value.reduce((e,t)=>e+(t?.position??0),0);let t=0,n=Nn.value.every(e=>e.position===1);return Nn.value.toSorted((e,t)=>{if(n)return e.__index-t.__index;let r=(e?.position??0)-(t?.position??0);return r===0?e.__index-t.__index:r}).map(n=>{let r=n?.position??0,i=e>0?r/e:0,a={...n,proportion:i,proportionStart:t};return t+=i,a})}),$=_(()=>Math.min(1,Math.max(0,Mr.value.reduce((e,t)=>e+t.proportion,0)))),Nr=_(()=>$.value*100),Pr=_(()=>q.value.left[0].x+q.value.width*$.value),Fr=_(()=>z.value.height+32+G.value.paddingTop);function Ir(){return u(G.value.label.formatter,Nr.value,a({p:``,v:Nr.value,s:`%`,r:0}))}let Lr=_(()=>`${Mt.value}-stackbar-clip`);async function Rr(){let e=un();Rt(`copyAlt`,{config:A.value,dataset:e}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:e})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let zr=re(Pt,()=>M.value.title.text);function Br(){return un()}return ee({isEditing:P,beginEditing:Ln,save:Rn,cancel:zn,getData:Br,copyAlt:Rr,toggleFullscreen:Qt,toggleAnnotator:en,generateImage:Jt,generateSvg:Or,generatePdf:qt,generateCsv:Ar,getImage:zr}),(e,i)=>(S(),y(`div`,{ref_key:`hillChartRef`,ref:Pt,class:be(`vue-data-ui-component vue-ui-hill`),style:x(Yn.value),id:`hill_${Mt.value}`,onMouseenter:Ut,onMouseleave:Wt,"data-editing":P.value},[M.value.title.text?(S(),y(`div`,je,[(S(),pe(ie,{key:`title_${Lt.value}`,config:{title:{cy:`hill-div-title`,...M.value.title},subtitle:{cy:`hill-div-subtitle`,...M.value.title.subtitle}}},null,8,[`config`]))],512)):v(``,!0),A.value.userOptions.buttons.annotator&&k.value?(S(),pe(D(Et),ve({key:1},D(n)(A.value.userOptions.annotator),{color:M.value.color,backgroundColor:M.value.backgroundColor,active:$t.value,svgRef:k.value,isCursorPointer:Yt.value,palette:A.value.userOptions.annotatorPalette,onClose:en}),me({_:2},[w(D(r),n=>({name:n,fn:De(r=>[T(e.$slots,n,xe(_e(D(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):v(``,!0),W.value.show?(S(),pe(D(Ct),{key:2,"is-editing":P.value,"is-editable":L.value,"is-fullscreen":Zt.value,position:tn.value,color:M.value.color,"background-color":M.value.backgroundColor,translations:W.value.buttons.translations,"is-cursor-pointer":Yt.value,onUpdate:Ln,onCancel:zn,onSave:Rn},{"hill-edit":De(()=>[T(e.$slots,`hill-edit`,{},void 0,!0)]),"hill-cancel":De(()=>[T(e.$slots,`hill-cancel`,{},void 0,!0)]),"hill-save":De(()=>[T(e.$slots,`hill-save`,{},void 0,!0)]),_:3},8,[`is-editing`,`is-editable`,`is-fullscreen`,`position`,`color`,`background-color`,`translations`,`is-cursor-pointer`])):v(``,!0),W.value.show?(S(),y(`div`,Me,[b(`p`,{class:`vue-ui-hill__status`,style:x(Xn.value),"aria-live":`polite`},E(P.value?W.value.status.editInstruction:W.value.status.lastUpdated),5)])):v(``,!0),A.value.userOptions.show&&(D(Ht)||D(Bt))?(S(),pe(D(wt),{ref_key:`userOptionsRef`,ref:It,key:`uo_${Xt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:D(Gt),isImaging:D(Kt),uid:Mt.value,hasTooltip:!1,hasPdf:A.value.userOptions.buttons.pdf,hasImg:A.value.userOptions.buttons.img,hasSvg:A.value.userOptions.buttons.svg,hasXls:A.value.userOptions.buttons.csv,hasTable:A.value.userOptions.buttons.table,hasLabel:A.value.userOptions.buttons.labels,hasFullscreen:A.value.userOptions.buttons.fullscreen,hasAltCopy:A.value.userOptions.buttons.altCopy,isFullscreen:Zt.value,chartElement:Pt.value,position:A.value.userOptions.position,callbacks:A.value.userOptions.callbacks,titles:{...A.value.userOptions.buttonTitles},hasAnnotator:A.value.userOptions.buttons.annotator,isAnnotation:$t.value,printScale:A.value.userOptions.print.scale,isCursorPointer:Yt.value,onToggleFullscreen:Qt,onGeneratePdf:D(qt),onGenerateCsv:Ar,onGenerateImage:D(kr),onGenerateSvg:D(Or),onToggleAnnotator:en,onCopyAlt:Rr,style:x({visibility:D(Ht)?D(Bt)?`visible`:`hidden`:`visible`})},me({_:2},[w(D(oe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:De(n=>[T(e.$slots,t,xe(_e(D(se)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.titles.hasAnnotator.isAnnotation.printScale.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):v(``,!0),(S(),y(`svg`,{ref_key:`svgRef`,ref:k,style:x({background:`transparent`,color:M.value.color,fontFamily:A.value.style.fontFamily}),class:be({"vue-data-ui-no-transition":!D(N)}),viewBox:`0 0 ${z.value.width} ${z.value.height+(jr.value?32+G.value.paddingTop+G.value.paddingBottom+G.value.height:0)}`,role:`group`,"aria-live":`polite`,preserveAspectRatio:`xMidYMid meet`,onPointermove:Vn,onPointerup:Hn,onPointercancel:Hn},[he(D(Tt)),T(e.$slots,`svg-underlayer`,{svg:{drawingArea:q.value,isEditing:P.value,datapoints:ar.value,isPrintingImg:D(Gt)||D(Kt)||D(Er),isPrintingSvg:D(Dr)}},void 0,!0),e.$slots[`chart-background`]?(S(),y(`foreignObject`,{key:0,x:0,y:0,width:Math.max(.1,z.value.width),height:Math.max(.1,z.value.height+(jr.value?32+G.value.paddingTop+G.value.paddingBottom+G.value.height:0)),style:{pointerEvents:`none`}},[T(e.$slots,`chart-background`,{},void 0,!0)],8,Pe)):v(``,!0),B.value.baseline.show?(S(),y(`line`,{key:1,x1:q.value.startX,x2:q.value.endX,y1:q.value.baseY,y2:q.value.baseY,stroke:B.value.baseline.stroke,"stroke-width":B.value.baseline.strokeWidth,"stroke-dasharray":B.value.baseline.strokeDasharray,"vector-effect":`non-scaling-stroke`},null,8,Fe)):v(``,!0),B.value.midline.show?(S(),y(`line`,{key:2,x1:q.value.centerX,x2:q.value.centerX,y1:q.value.peakY,y2:q.value.baseY,stroke:B.value.midline.stroke,"stroke-width":B.value.midline.strokeWidth,"stroke-dasharray":B.value.midline.strokeDasharray,"vector-effect":`non-scaling-stroke`},null,8,Ie)):v(``,!0),b(`path`,{d:mn.value,fill:`none`,stroke:B.value.curve.stroke,"stroke-width":B.value.curve.strokeWidth,"stroke-dasharray":B.value.curve.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"vector-effect":`non-scaling-stroke`},null,8,Le),j.value.dragMarker.positionIndicator.show?(S(!0),y(fe,{key:3},w(ar.value,e=>(S(),y(`g`,{key:`position-indicator-${e.id}`},[xr(e)&&V.value.dragMarker.show?(S(),y(`g`,Re,[b(`path`,{d:`M${e.x},${e.y} ${e.x},${q.value.baseY}`,stroke:j.value.dragMarker.positionIndicator.useSerieColor?e.color:j.value.dragMarker.positionIndicator.color,"stroke-width":j.value.dragMarker.positionIndicator.strokeWidth,"stroke-dasharray":j.value.dragMarker.positionIndicator.strokeDasharray,"stroke-linecap":`round`,"vector-effect":`non-scaling-stroke`,class:be({"vue-data-ui-transition":D(N)&&I.value?.id!==e.id})},null,10,ze),j.value.dragMarker.positionIndicator.circle.show?(S(),y(`circle`,{key:0,cx:e.x,cy:q.value.baseY,r:j.value.dragMarker.positionIndicator.circle.radius,fill:j.value.dragMarker.positionIndicator.useSerieColor?e.color:j.value.dragMarker.positionIndicator.color,stroke:j.value.dragMarker.positionIndicator.circle.stroke,"stroke-width":j.value.dragMarker.positionIndicator.circle.strokeWidth,"vector-effect":`non-scaling-stroke`,"paint-order":`stroke fill`,class:be({"vue-data-ui-transition":D(N)&&I.value?.id!==e.id})},null,10,Be)):v(``,!0),j.value.dragMarker.positionIndicator.value.show?(S(),y(`text`,{key:1,"paint-order":`stroke fill`,"vector-effect":`non-scaling-stroke`,"text-anchor":`middle`,transform:`translate(${e.x}, ${q.value.baseY+j.value.radius+j.value.dragMarker.positionIndicator.value.offsetY+j.value.dragMarker.positionIndicator.value.fontSize})`,"font-size":j.value.dragMarker.positionIndicator.value.fontSize,fill:j.value.dragMarker.positionIndicator.value.useSerieColor?e.color:j.value.dragMarker.positionIndicator.value.color,stroke:M.value.backgroundColor,"stroke-width":`1`,class:be({"vue-data-ui-transition":D(N)&&I.value?.id!==e.id})},E(Sr(e)),11,Ve)):v(``,!0)])):v(``,!0)]))),128)):v(``,!0),(S(!0),y(fe,null,w(ar.value,e=>(S(),y(`g`,{key:e.id,"data-cy-datapoint":``,class:be({"vue-ui-hill__datapoint":!0,"vue-data-ui-transition":D(N)&&I.value?.id!==e.id,"vue-ui-hill__datapoint--promoted":D(N)&&e.isPromotedFromStackOverflow}),style:x({opacity:[0,1].includes(e.position)||e?.muted?V.value.mutedOpacity:e?.disabled?V.value.disabledOpacity:1}),transform:`translate(${e.x} ${e.y})`,"data-datapoint-index":e.__index,"data-datapoint-id":e.id,role:`slider`,tabindex:P.value&&L.value&&!e.disabled?0:-1,"aria-orientation":`horizontal`,"aria-valuemin":`0`,"aria-valuemax":`100`,"aria-valuenow":Sr(e),"aria-valuetext":`${e.label}: ${Wn(e.position)}, ${Sr(e)}`,"aria-label":e.label,onFocus:t=>nr(e),onBlur:t=>rr(e),onKeydown:t=>Un(t,e),onPointerenter:t=>Kn(e),onPointerleave:t=>qn(e),onClick:t=>Jn(e)},[b(`circle`,{r:V.value.hitRadius,fill:`transparent`,class:be({"vue-ui-hill__hit-area--active":P.value&&L.value&&!e.disabled,"vue-ui-hill__hit-area--dragging":I.value?.id===e.id}),onPointerdown:t=>Bn(t,e)},null,42,Ue),b(`circle`,{class:`vue-ui-hill-circle`,r:V.value.radius,fill:e.color,stroke:V.value.stroke,"stroke-width":V.value.strokeWidth,style:x({filter:V.value.shadow.show?`drop-shadow(${V.value.shadow.offsetX}px ${V.value.shadow.offsetY}px ${V.value.shadow.blur}px ${V.value.shadow.color})`:`none`}),"vector-effect":`non-scaling-stroke`,"pointer-events":`none`},null,12,We),P.value&&(I.value?.id===e.id&&V.value.dragMarker.show||xr(e))&&!e?.disabled?(S(),y(`g`,{key:0,fill:`none`,stroke:D(p)(e.color),"stroke-width":V.value.dragMarker.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`,"vector-effect":`non-scaling-stroke`,"aria-hidden":`true`},[b(`path`,{d:V.value.dragMarker.crossPath},null,8,Ke)],8,Ge)):v(``,!0),H.value.show?(S(),y(`text`,{key:1,x:e.labelX,y:H.value.offsetY,"text-anchor":e.textAnchor,fill:H.value.useSerieColor?e.color:H.value.color,"font-size":H.value.fontSize,"font-weight":H.value.bold?`bold`:`normal`,"paint-order":`stroke fill`,stroke:H.value.stroke,"stroke-width":H.value.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"pointer-events":`none`,style:{"user-select":`none`},"dominant-baseline":`central`},E(D(l)(e.label,H.value.ellipsisThresholdChars)),9,qe)):v(``,!0)],46,He))),128)),(S(!0),y(fe,null,w(or.value,e=>(S(),y(`g`,{key:`stack-overflow-${e.stackId}`,class:be([`vue-ui-hill__stack-overflow-marker`,{"vue-ui-hill__stack-overflow-marker--animated":D(N),"vue-ui-hill__stack-overflow-marker--restored":Cn.value===e.stackId}]),style:x({"--vue-ui-hill-overflow-marker-duration":`${K.value.transitionDuration*.7}ms`,"--vue-ui-hill-overflow-marker-delay":`${K.value.transitionDuration*.3}ms`,"--vue-ui-hill-overflow-label-duration":`${K.value.transitionDuration*.55}ms`,"--vue-ui-hill-overflow-label-delay":`${K.value.transitionDuration*.45}ms`,cursor:Yt.value&&!A.value.readonly?`pointer`:`default`}),transform:`translate(${e.x} ${e.y})`,"data-stack-overflow-marker":``,role:`button`,tabindex:P.value&&L.value?0:-1,"aria-label":`${e.hiddenCount} stacked datapoints. Activate to choose one.`,"aria-expanded":Y.value===e.stackId,onPointerdown:i[0]||=O(()=>{},[`stop`]),onClick:O(t=>dr(e),[`stop`]),onFocus:t=>dr(e),onKeydown:[Oe(O(t=>dr(e),[`prevent`,`stop`]),[`enter`]),Oe(O(t=>dr(e),[`prevent`,`stop`]),[`space`]),Oe(O(fr,[`prevent`,`stop`]),[`esc`])]},[D(N)&&Cn.value!==e.stackId?(S(),y(`g`,Ye,[(S(!0),y(fe,null,w(e.collapseDatapoints,t=>(S(),y(`circle`,{key:`overflow-ghost-${e.stackId}-${t.id}`,cx:t.relativeX,cy:t.relativeY,r:V.value.radius,fill:t.color,stroke:V.value.stroke,"stroke-width":V.value.strokeWidth,opacity:`0.8`,"vector-effect":`non-scaling-stroke`},[b(`animate`,{attributeName:`cx`,from:t.relativeX,to:`0`,dur:`${K.value.transitionDuration}ms`,fill:`freeze`,calcMode:`spline`,keyTimes:`0;1`,keySplines:`0.22 1 0.36 1`},null,8,Ze),b(`animate`,{attributeName:`cy`,from:t.relativeY,to:`0`,dur:`${K.value.transitionDuration}ms`,fill:`freeze`,calcMode:`spline`,keyTimes:`0;1`,keySplines:`0.22 1 0.36 1`},null,8,Qe),b(`animate`,{attributeName:`r`,from:V.value.radius,to:K.value.marker.radius*.7,dur:`${K.value.transitionDuration}ms`,fill:`freeze`},null,8,$e),b(`animate`,{attributeName:`opacity`,from:`0.8`,to:`0`,dur:`${K.value.transitionDuration*.85}ms`,fill:`freeze`},null,8,et)],8,Xe))),128))])):v(``,!0),b(`circle`,{r:Math.max(V.value.hitRadius,K.value.marker.radius),fill:`transparent`,"pointer-events":`all`},null,8,tt),b(`rect`,{class:`vue-ui-hill__stack-overflow-marker-rect`,x:-K.value.marker.radius,y:-K.value.marker.radius,width:K.value.marker.radius*2,height:K.value.marker.radius*2,fill:K.value.marker.fill,stroke:K.value.marker.stroke,"stroke-width":K.value.marker.strokeWidth,"vector-effect":`non-scaling-stroke`,"pointer-events":`none`},null,8,nt),b(`g`,{class:`vue-ui-hill__stack-overflow-focus-cross`,fill:`none`,stroke:D(p)(B.value.curve.stroke),"stroke-width":V.value.dragMarker.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`,"vector-effect":`non-scaling-stroke`,"aria-hidden":`true`},[b(`path`,{d:V.value.dragMarker.crossPath},null,8,it)],8,rt),Q.value?v(``,!0):(S(),y(`text`,{key:1,class:`vue-ui-hill__stack-overflow-marker-label`,"text-anchor":`middle`,y:K.value.marker.radius+K.value.marker.offsetY+K.value.marker.fontSize,fill:K.value.marker.color,"font-size":K.value.marker.fontSize,"font-weight":K.value.marker.bold?`bold`:`normal`,"pointer-events":`none`,style:{"user-select":`none`},"paint-order":`stroke fill`,"vector-effect":`non-scaling-stroke`,stroke:M.value.backgroundColor,"stroke-width":`3`},` +`+E(e.hiddenCount),9,at))],46,Je))),128)),U.value.show?(S(),y(fe,{key:4},[b(`text`,{x:(q.value.startX+q.value.centerX)/2,y:Zn.value,"text-anchor":`middle`,fill:U.value.color,"font-size":U.value.fontSize,"font-weight":U.value.bold?`bold`:`normal`,"letter-spacing":U.value.letterSpacing},E(Qn(`left`)),9,ot),b(`text`,{x:(q.value.centerX+q.value.endX)/2,y:Zn.value,"text-anchor":`middle`,fill:U.value.color,"font-size":U.value.fontSize,"font-weight":U.value.bold?`bold`:`normal`,"letter-spacing":U.value.letterSpacing},E(Qn(`right`)),9,st)],64)):v(``,!0),jr.value?(S(),y(fe,{key:5},[b(`rect`,{x:q.value.left[0].x,y:Fr.value,rx:G.value.height/2,width:q.value.width,height:G.value.height,fill:G.value.gutterColor},null,8,ct),b(`defs`,null,[b(`clipPath`,{id:Lr.value},[b(`rect`,{x:q.value.left[0].x,y:Fr.value,width:q.value.width*$.value,height:G.value.height,rx:Math.min(G.value.height/2,q.value.width*$.value/2),ry:Math.min(G.value.height/2,q.value.width*$.value/2)},null,8,ut)],8,lt)]),b(`g`,{"clip-path":`url(#${Lr.value})`},[(S(!0),y(fe,null,w(Mr.value,e=>(S(),y(`rect`,{key:`bar_fill_${e.id}`,width:q.value.width*e.proportion,x:q.value.left[0].x+q.value.width*e.proportionStart,y:z.value.height+32+G.value.paddingTop,fill:e.color,height:G.value.height,onPointerenter:t=>Kn(e),onPointerleave:t=>qn(e)},null,40,ft))),128))],8,dt),(S(!0),y(fe,null,w(Mr.value.slice(1),e=>(S(),y(`line`,{key:`bar_separator_${e.id}`,x1:q.value.left[0].x+q.value.width*e.proportionStart,x2:q.value.left[0].x+q.value.width*e.proportionStart,y1:z.value.height+32+G.value.paddingTop,y2:z.value.height+32+G.value.paddingTop+G.value.height,stroke:G.value.stroke,"stroke-width":G.value.strokeWidth,"vector-effect":`non-scaling-stroke`},null,8,pt))),128)),b(`rect`,{x:q.value.left[0].x,y:z.value.height+32+G.value.paddingTop,width:q.value.width*$.value,height:G.value.height,rx:Math.min(G.value.height/2,q.value.width*$.value/2),ry:Math.min(G.value.height/2,q.value.width*$.value/2),fill:`none`,stroke:G.value.stroke,"stroke-width":G.value.strokeWidth,"vector-effect":`non-scaling-stroke`},null,8,mt),G.value.label.show&&$.value>0?(S(),y(`text`,{key:0,x:Pr.value,y:Fr.value-6,fill:G.value.label.color,"font-size":G.value.label.fontSize,"text-anchor":`end`,"dominant-baseline":`auto`,"pointer-events":`none`,style:{"user-select":`none`}},E(Ir()),9,ht)):v(``,!0)],64)):v(``,!0),T(e.$slots,`svg`,{svg:{drawingArea:q.value,isEditing:P.value,datapoints:ar.value,isPrintingImg:D(Gt)||D(Kt)||D(Er),isPrintingSvg:D(Dr)}},void 0,!0)],46,Ne)),Q.value?(S(),y(`div`,{ref_key:`overflowMenuRef`,ref:Ft,key:`stack-overflow-menu-${Q.value.stackId}`,class:`vue-ui-hill__stack-overflow-menu`,"data-stack-overflow-menu":``,"data-dom-to-png-ignore":``,style:x([sr.value,Sn.value]),role:`listbox`,"aria-label":`Choose one of ${Q.value.hiddenCount} stacked datapoints`,onPointerdown:i[1]||=O(()=>{},[`stop`]),onClick:i[2]||=O(()=>{},[`stop`]),onKeydown:Oe(O(fr,[`prevent`,`stop`]),[`esc`])},[j.value.stacking.overflow.menu.title?(S(),y(`div`,_t,E(j.value.stacking.overflow.menu.title),1)):v(``,!0),(S(!0),y(fe,null,w(Q.value.hiddenDatapoints,e=>(S(),y(`button`,{key:`hidden-${e.id}`,type:`button`,class:be([`vue-ui-hill__stack-overflow-menu-item`,{readonly:A.value.readonly}]),role:`option`,disabled:e.disabled,"aria-label":`${e.label}, ${Sr(e)}`,onClick:O(t=>vr(e),[`stop`]),style:x({cursor:Yt.value&&!A.value.readonly?`pointer`:`default`})},[b(`span`,{class:`vue-ui-hill__stack-overflow-menu-swatch`,style:x({backgroundColor:e.color}),"aria-hidden":`true`},null,4),b(`span`,yt,E(D(l)(e.label,H.value.ellipsisThresholdChars)),1),b(`span`,bt,E(Sr(e)),1)],14,vt))),128))],44,gt)):v(``,!0),T(e.$slots,`analysis`,{data:{...Mr.value}},void 0,!0),e.$slots.watermark?(S(),y(`div`,xt,[T(e.$slots,`watermark`,xe(_e({isPrinting:D(Gt)||D(Kt)||D(Er)||D(Dr)})),void 0,!0)])):v(``,!0),A.value.loading?(S(),y(`div`,St,[A.value.loading?T(e.$slots,`loading`,{},()=>[he(D(Dt),{name:`spinner2`,stroke:M.value.color,"is-spin":!0},null,8,[`stroke`])],!0,0):v(``,!0)])):v(``,!0)],44,Ae))}},[[`__scopeId`,`data-v-704eb940`]]);export{ke as n,Ct as t};
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as s,Et as c,Ft as ee,Ht as te,J as ne,Q as re,S as ie,T as ae,X as oe,Zt as se,_ as ce,at as le,i as ue,in as de,nn as fe,nt as pe,qt as me,r as he,rn as l,t as ge,tn as _e,w as ve,yt as ye,zt as be}from"./lib-rPeBMZrn.js";import{n as xe,t as Se}from"./BaseScanner-8NdoBs7B.js";import{n as Ce,t as we}from"./useHints-C-TwxM0Y.js";import{t as Te}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Ee}from"./useNestedProp-DnGoh-XS.js";import{t as De}from"./useThemeCheck-BKNRbGeC.js";import{t as Oe}from"./chartImage-DPGnEuYM.js";import{n as ke}from"./Title-BliHuXfT.js";import{t as Ae}from"./useChartExport-BZts4KFb.js";import{n as je,t as Me}from"./tableIntegration-CNoJ1CIY.js";import{n as Ne,t as Pe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Fe}from"./usePrinter-DVf3YcG5.js";import{t as Ie}from"./useTransitions-ChGGrtrv.js";import{t as Le}from"./useSvgLabelLayout-42Kats14.js";import{t as Re}from"./useTimeLabelCollider-BTybMUFi.js";import{t as ze}from"./useResponsive-CENUxfEL.js";import{t as Be}from"./DefGrad-DKMq1REY.js";import{t as Ve}from"./BaseLegendToggle-BIzyyI1h.js";import{t as He}from"./A11yDataTable-DWNlWXzs.js";import{t as Ue}from"./useUserOptionState-CXlFnwPv.js";import{t as We}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ge}from"./Legend-DM0ClX3D.js";import{t as Ke}from"./vue_ui_history_plot-soyqUW4Y.js";import{Fragment as u,Teleport as qe,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Je,createTextVNode as Ye,createVNode as Xe,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ze,nextTick as Qe,normalizeClass as v,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as $e,onMounted as et,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as tt,shallowRef as nt,toDisplayString as T,toRefs as rt,unref as E,watch as it,withCtx as D}from"vue";var at=/* @__PURE__ */ e({default:()=>Wt}),ot=[`id`],st=[`id`],ct=[`id`],lt={style:{position:`relative`}},ut=[`xmlns`,`viewBox`,`aria-describedby`],dt=[`x`,`y`,`width`,`height`],ft={key:1},pt=[`id`,`x1`,`y1`,`x2`,`y2`],mt=[`stop-color`,`offset`],ht={key:2},gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],_t={key:3},vt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],yt=[`x`,`y`,`fill`,`font-size`],bt=[`transform`,`font-size`,`fill`,`font-weight`],xt={key:6},St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct={key:7},wt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],Tt=[`transform`,`fill`,`font-size`,`text-anchor`],Et=[`x`,`y`,`font-size`,`fill`,`font-weight`],Dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],kt=[`d`,`stroke`,`stroke-width`],At=[`d`,`stroke`,`stroke-width`],jt=[`cx`,`cy`,`fill`,`r`],Mt=[`cx`,`cy`,`fill`,`r`,`stroke`,`stroke-width`],Nt={key:1},Pt=[`transform`,`font-size`,`fill`,`font-weight`],Ft=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],It={key:2},Lt=[`transform`,`font-size`,`font-weight`,`fill`],Rt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],zt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Bt={key:5,class:`vue-data-ui-watermark`},Vt=[`id`],Ht=[`onClick`],Ut={style:{display:`flex`,"align-items":`center`}},Wt=/*#__PURE__*/ Te({__name:`vue-ui-history-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Te,emit:at}){let Wt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Gt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Kt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),qt=g(()=>import(`./DataTable-Dof6yhO7.js`)),Jt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Yt=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Xt=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Zt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_history_plot:Qt}=i(),{isThemeValid:$t,warnInvalidTheme:en}=De(),O=e,k=S(null),tn=S(null),nn=S(0),rn=S(null),an=S(0),on=S(0),sn=S(0),A=nt(null),j=nt(null),cn=S(null),M=S(oe()),ln=S(!1),un=S(``),N=S([]),dn=S(!1),P=S(null),fn=S(!1),pn=S(null),mn=S(!1),hn=S(null),gn=S(null),_n=S(null),vn=S(null),yn=S(null),bn=S(null),F=S(null),I=S(null),xn=S({x:0,y:0}),Sn=S(`pointer`),Cn=S(!1),wn=d({get:()=>!!O.dataset&&O.dataset.length,set:e=>e}),Tn=at,En=S(!1),Dn=0;et(()=>{mn.value=!0,kn()});let On=d(()=>L.value.debug);function kn(){be(O.dataset)?(le({componentName:`VueUiHistoryPlot`,type:`dataset`,debug:On.value}),Pn.value=!0):O.dataset.forEach((e,t)=>{ye({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{wn.value=!1,le({componentName:`VueUiHistoryPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:On.value})})}),be(O.dataset)||(Pn.value=L.value.loading),L.value.responsive&&(A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect()),A.value=new ResizeObserver(()=>{let{width:e,height:t}=ze({chart:k.value,title:V.value.title.text?tn.value:null,noTitle:cn.value,legend:V.value.legend.show?rn.value:null,source:pn.value});cancelAnimationFrame(Dn),Dn=requestAnimationFrame(()=>{K.value.width=e,K.value.height=t,En.value=!0,L.value.responsiveProportionalSizing?(Y.value.plots=l({relator:Math.min(e,t),adjuster:600,source:R.value.radius,threshold:3,fallback:3}),Y.value.indexLabels=l({relator:Math.min(e,t),adjuster:600,source:R.value.indexLabels.fontSize,threshold:6,fallback:6}),Y.value.labels=l({relator:Math.min(e,t),adjuster:600,source:R.value.labels.fontSize,threshold:6,fallback:6}),Y.value.xAxisLabels=l({relator:Math.min(e,t),adjuster:600,source:B.value.x.labels.fontSize,threshold:6,fallback:6}),Y.value.xAxisName=l({relator:Math.min(e,t),adjuster:600,source:B.value.x.name.fontSize,threshold:6,fallback:6}),Y.value.yAxisLabels=l({relator:Math.min(e,t),adjuster:600,source:B.value.y.labels.fontSize,threshold:6,fallback:6}),Y.value.yAxisName=l({relator:Math.min(e,t),adjuster:600,source:B.value.y.name.fontSize,threshold:6,fallback:6})):(Y.value.plots=R.value.radius,Y.value.indexLabels=R.value.indexLabels.fontSize,Y.value.labels=R.value.labels.fontSize,Y.value.xAxisLabels=B.value.x.labels.fontSize,Y.value.xAxisName=B.value.x.name.fontSize,Y.value.yAxisLabels=B.value.y.labels.fontSize,Y.value.yAxisName=B.value.y.name.fontSize)})}),j.value=k.value.parentNode,A.value.observe(j.value))}$e(()=>{cancelAnimationFrame(Dn),A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect())});function An(){let e=Ee({userConfig:O.config,defaultConfig:Qt}),t={},n=e.theme;if(n){if(!$t.value(e))en(e),t=e;else{let r=Ee({userConfig:Ke[n]||O.config,defaultConfig:e});t={...Ee({userConfig:O.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:fe[n]||te}}}else t=e;return t}let L=S(An()),R=d(()=>L.value.style.chart.plots),z=d(()=>L.value.style.chart.grid),B=d(()=>L.value.style.chart.axes),V=d(()=>L.value.style.chart);Ce({config:()=>L.value,dataset:()=>O.dataset,component:`VueUiHistoryPlot`,rules:[we.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]}]});let{transitionEnabled:H}=Ie({config:()=>L.value.transitions,dataset:()=>O.dataset}),U=d(()=>L.value.userOptions.useCursorPointer),jn=d(()=>de({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,axes:{x:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}},y:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}}},grid:{xAxis:{stroke:`#6A6A6A`},horizontalLines:{stroke:`#6A6A6A50`},yAxis:{stroke:`#6A6A6A`},verticalLines:{stroke:`#6A6A6A50`}},legend:{backgroundColor:`transparent`},paths:{useSerieColor:!1,stroke:`#6A6A6A`},plots:{stroke:`#6A6A6A`,indexLabels:{show:!1},labels:{show:!1}}}}},userConfig:L.value.skeletonConfig??{}})),{loading:Mn,FINAL_DATASET:Nn,manualLoading:Pn}=xe({...rt(O),FINAL_CONFIG:L,prepareConfig:An,skeletonDataset:O.config?.skeletonDataset??[{name:``,color:`#CACACA`,values:[{label:``,x:1,y:9},{label:``,x:4,y:1},{label:``,x:7,y:9},{label:``,x:9,y:4}]}],skeletonConfig:de({defaultConfig:L.value,userConfig:jn.value})}),{userOptionsVisible:Fn,setUserOptionsVisibility:In,keepUserOptionState:Ln}=Ue({config:L.value}),{svgRef:W}=We({config:V.value.title}),Rn=se(O.config);it(()=>O.config,(e,t)=>{let n=se(e),r=n!==Rn;Rn=n;let i=An();r?(Mn.value||(L.value=i),Fn.value=!L.value.userOptions.showOnChartHover,kn(),nn.value+=1,on.value+=1,an.value+=1,K.value.height=V.value.height,K.value.width=V.value.width,Y.value.plots=R.value.radius,Y.value.indexLabels=R.value.indexLabels.fontSize,Y.value.labels=R.value.labels.fontSize,Y.value.xAxisLabels=B.value.x.labels.fontSize,Y.value.xAxisName=B.value.x.name.fontSize,Y.value.yAxisLabels=B.value.y.labels.fontSize,Y.value.yAxisName=B.value.y.name.fontSize,G.value.showTable=L.value.table.show,G.value.showTooltip=V.value.tooltip.show):(L.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=L.value.style.chart.tooltip.show)},{deep:!0}),it(()=>O.dataset,e=>{Array.isArray(e)&&e.length>0&&(Pn.value=!1)},{deep:!0});let{isPrinting:zn,isImaging:Bn,generatePdf:Vn,generateImage:Hn}=Fe({elementId:`history_plot_${M.value}`,fileName:V.value.title.text||`vue-ui-history-plot`,options:L.value.userOptions.print}),Un=d(()=>L.value.userOptions.show&&!V.value.title.text),Wn=d(()=>ve(L.value.customPalette)),G=S({showTable:L.value.table.show,showTooltip:V.value.tooltip.show});it(L,()=>{G.value={showTable:L.value.table.show,showTooltip:V.value.tooltip.show}},{immediate:!0});let K=S({height:V.value.height,width:V.value.width}),Gn=d(()=>K.value.width),Kn=d(()=>K.value.height),{metrics:qn,ready:Jn,settling:q,update:Yn}=Le({svgRef:W,canMeasure:()=>!L.value.responsive||En.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(bn.value).textWidth,yAxisLabelWidth:e(vn.value).rotatedWidth,xAxisLabelHeight:e(_n.value).height,timeLabelsHeight:e(yn.value).height})});function Xn(){let e=qn.value.scaleLabelsWidth,t=qn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Zn=d(()=>qn.value.xAxisLabelHeight+qn.value.timeLabelsHeight+(_n.value?Y.value.xAxisName/2:0)),J=d(()=>{let e=V.value.padding.left,t=V.value.padding.top,n=Xn(),r=R.value.radius;return{left:e+n+B.value.y.name.offsetX,top:t+r,right:K.value.width-V.value.padding.right-r-B.value.y.name.offsetX,bottom:K.value.height-V.value.padding.bottom-Zn.value-r-B.value.x.name.offsetY,width:K.value.width-e-V.value.padding.right-n-r-B.value.y.name.offsetX,height:K.value.height-t-V.value.padding.bottom-Zn.value-r*2-B.value.x.name.offsetY}}),Y=S({plots:R.value.radius,indexLabels:R.value.indexLabels.fontSize,labels:R.value.labels.fontSize,xAxisLabels:B.value.x.labels.fontSize,xAxisName:B.value.x.name.fontSize,yAxisLabels:B.value.y.labels.fontSize,yAxisName:B.value.y.name.fontSize}),X=d(()=>Nn.value.map((e,t)=>{let n=Array.isArray(e.temperatureColors)&&e.temperatureColors.length?e.temperatureColors.map(e=>ie(e)):void 0;return{...e,color:e.color?ie(e.color):Wn.value[t]||te[t]||te[t%te.length],temperatureColors:n,temperatureAngle:Qn(e.temperatureAngle),temperatureIndependant:e.temperatureIndependant===!0,usePlotTemperatureColors:e.usePlotTemperatureColors!==!1,seriesIndex:t}}));function Qn(e=0){let t=Number(e);return Number.isFinite(t)?(t%360+360)%360:0}let $n=d(()=>Math.max(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)))),er=d(()=>{let e=Math.min(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)));return e<0?e:0}),tr=d(()=>Math.max(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)))),nr=d(()=>{let e=Math.min(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)));return e<0?e:0}),Z=d(()=>{let e=ce(B.value.x.scaleMin??er.value,B.value.x.scaleMax??$n.value,B.value.x.ticks),t=ce(B.value.y.scaleMin??nr.value,B.value.y.scaleMax??tr.value,B.value.y.ticks);return{x:e,y:t,tickX:e.ticks.map(t=>({x:J.value.left+(t-e.min)/(e.max-e.min)*J.value.width,y1:J.value.top,y2:J.value.bottom,value:t})),tickY:t.ticks.map(e=>({y:J.value.bottom-(e-t.min)/(t.max-t.min)*J.value.height,x1:J.value.left,x2:J.value.right,value:e}))}});function rr(e){let t=Z.value.x.min<0?Math.abs(Z.value.x.min):Z.value.x.min>0?-Z.value.x.min:0;return J.value.left+((e||0)+t)/(Z.value.x.max+t)*J.value.width}function ir(e){let t=Z.value.y.min<0?Math.abs(Z.value.y.min):Z.value.y.min>0?-Z.value.y.min:0;return J.value.bottom-((e||0)+t)/(Z.value.y.max+t)*J.value.height}let Q=d(()=>X.value.filter(e=>!N.value.includes(e.seriesIndex)).map((e,t)=>{let n=e.values.map((t,n)=>({valueX:t.x,valueY:t.y,label:t.label,x:rr(t.x),y:ir(t.y),color:e.color,seriesName:e.name,id:oe()})),r=e.smooth?ae(n):n.map(e=>`${e.x},${e.y} `).join(``).trim();return{...e,gradientIndex:t,plots:n,path:`M${r}`}})),ar=d(()=>{if(P.value===null||F.value===null)return Q.value;let e=Q.value.findIndex(e=>e.seriesIndex===F.value);if(e===-1)return Q.value;let t=Q.value[e];return[...Q.value.slice(0,e),...Q.value.slice(e+1),t]}),or=d(()=>Q.value.some(e=>sr(e)));function sr(e){return Array.isArray(e?.temperatureColors)&&e.temperatureColors.length}function cr(e){return sr(e)&&e.usePlotTemperatureColors}function lr(e){let t=Array.isArray(e?.plots)?e.plots:[];if(!t.length)return{minX:0,maxX:0,minY:0,maxY:0,width:0,height:0};let n=t.map(e=>e.x),r=t.map(e=>e.y),i=Math.min(...n),a=Math.max(...n),o=Math.min(...r),s=Math.max(...r);return{minX:i,maxX:a,minY:o,maxY:s,width:a-i,height:s-o}}function ur(){let e=J.value;return{minX:e.left,maxX:e.right,minY:e.top,maxY:e.bottom,width:e.width,height:e.height}}function dr(e){return e?.temperatureIndependant?lr(e):ur()}function fr(e){let t=Qn(e?.temperatureAngle)*Math.PI/180,n=Math.sin(t),r=Math.cos(t),i=dr(e),a=i.minX+i.width/2,o=i.minY+i.height/2,s=(Math.abs(n)*i.width+Math.abs(r)*i.height)/2||1;return{x1:a-n*s,y1:o-r*s,x2:a+n*s,y2:o+r*s}}function pr(e,t){let{x1:n,y1:r,x2:i,y2:a}=fr(e),o=i-n,s=a-r,c=o*o+s*s;if(!c)return 0;let ee=((t.x-n)*o+(t.y-r)*s)/c;return Math.min(1,Math.max(0,ee))}function $(e,t){return c({colors:e.temperatureColors,ratio:pr(e,t)})}function mr(e,t){return`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${M.value}`}function hr(e,t,n){return cr(e)?R.value.gradient.show?`url(#${mr(e,t)})`:$(e,t):R.value.gradient.show?`url(#gradient_${n}_${M.value})`:t.color}function gr(e,t){return cr(e)?$(e,t):e.color}function _r(e,t){return R.value.indexLabels.adaptColorToBackground?he(gr(e,t)):R.value.indexLabels.color}function vr(e,t){let n=Q.value.find(t=>t.seriesIndex===e);return n&&cr(n)?$(n,t):t.color}function yr(e){return sr(e)?`url(#temperature_grad_history_${e.seriesIndex}_${M.value})`:V.value.paths.useSerieColor?e.color:V.value.paths.stroke}function br(e){return P.value===null||F.value===e?1:Math.min(1,R.value.unselectedOpacity)}d(()=>P.value!==null&&F.value!==null);let xr=S(!1);function Sr(){N.value.length?N.value=[]:Dr.value.forEach(e=>{N.value.push(e.seriesIndex)}),Tn(`selectLegend`,Q.value)}function Cr(e){N.value.includes(e)?N.value=N.value.filter(t=>t!==e):N.value.push(e),Tn(`selectLegend`,Q.value)}function wr(e){return X.value.length?X.value.find(t=>t.name===e)||(On.value&&console.warn(`VueUiHistoryPlot - Series name not found "${e}"`),null):(On.value&&console.warn(`VueUiHistoryPlot - There are no series to show.`),null)}function Tr(e){let t=wr(e);t!==null&&N.value.includes(t.seriesIndex)&&Cr(t.seriesIndex)}function Er(e){let t=wr(e);t!==null&&(N.value.includes(t.seriesIndex)||Cr(t.seriesIndex))}let Dr=d(()=>X.value.map(e=>{let t=sr(e)?e.temperatureColors:null;return{...e,gradientColors:t,opacity:N.value.includes(e.seriesIndex)?.5:1,segregate:()=>Cr(e.seriesIndex),isSegregated:N.value.includes(e.seriesIndex),shape:t?`gradient`:`circle`}})),Or=d(()=>({cy:`history-plot-div-legend`,backgroundColor:V.value.legend.backgroundColor,color:V.value.legend.color,fontSize:V.value.legend.fontSize,paddingBottom:12,fontWeight:V.value.legend.bold?`bold`:``}));function kr({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),Tn(`selectDatapoint`,e)}function Ar(e){dn.value=e,sn.value+=1}let jr=S(null);function Mr({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),(Sn.value!==`keyboard`||F.value!==n||I.value!==t)&&(ln.value=!1,P.value=null)}function Nr(e,t){if(!W.value)return;let n=Q.value.find(t=>t.seriesIndex===e);if(!n)return;let r=n.plots[t];if(!r)return;let i=_e(r.x,r.y,W.value);i&&(xn.value=i)}function Pr({datapoint:e,plotIndex:t,seriesIndex:n,triggerMode:r=`pointer`}){L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),F.value=n,I.value=t,Sn.value=r,xr.value=!0;let i=vr(n,e),o={...e,color:i};jr.value={datapoint:o,color:i,seriesIndex:n,plotIndex:t,config:L.value,series:X.value},P.value=e;let c=V.value.tooltip.customFormat;if(fn.value=!1,s(c))try{let e=c({seriesIndex:n,datapoint:o,color:i,plotIndex:t,series:X.value,config:L.value});typeof e==`string`&&(un.value=e,fn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),fn.value=!1}if(!fn.value){let t=``;t+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${V.value.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${i}"/></svg><span>${e.seriesName}</span></div>`,t+=`<div>${e.label}</div>`,t+=`<div>${B.value.x.name.text||`x`}: ${ue(B.value.x.labels.formatter,e.valueX,a({p:B.value.x.labels.prefix,v:e.valueX,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding}))}</div>`,t+=`<div>${B.value.y.name.text||`y`}: ${ue(B.value.y.labels.formatter,e.valueY,a({p:B.value.y.labels.prefix,v:e.valueY,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))}</div>`,un.value=`<div>${t}</div>`}ln.value=!0,r===`keyboard`&&Qe(()=>{Nr(n,t)})}d(()=>({head:Q.value.map(e=>({name:e.name,color:e.color}))}));let Fr=d(()=>{let e=[L.value.table.columnNames.series,L.value.table.columnNames.datapoint,L.value.table.columnNames.x,L.value.table.columnNames.y];return{head:e,body:Q.value.flatMap(e=>e.plots.map(e=>[{color:e.color,name:e.seriesName},e.label,ue(B.value.x.labels.formatter,e.valueX,a({p:B.value.x.labels.prefix,v:e.valueX,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding})),ue(B.value.y.labels.formatter,e.valueY,a({p:B.value.y.labels.prefix,v:e.valueY,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))])),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:e}});function Ir(e=null){Qe(()=>{let t=[[L.value.table.columnNames.series],[L.value.table.columnNames.datapoint],[L.value.table.columnNames.x],[L.value.table.columnNames.y]],n=Q.value.flatMap(e=>e.plots.map(e=>[[e.seriesName],[e.label],[e.valueX],[e.valueY]])),r=[[V.value.title.text],[V.value.title.subtitle.text],t].concat(n),i=o(r);e?e(i):pe({csvContent:i,title:V.value.title.text||`vue-ui-history-plot`})})}let Lr=S(!1);function Rr(){Lr.value=!Lr.value}function zr(){G.value.showTable=!G.value.showTable}function Br(){G.value.showTooltip=!G.value.showTooltip}function Vr(){return Q.value}let Hr=Oe(k,()=>V.value.title.text),Ur=d(()=>Z.value.tickX),Wr=d(()=>({start:0,end:Z.value.tickX.length}));Re({timeLabelsEls:yn,timeLabels:Ur,slicer:Wr,configRef:L,rotationPath:[`style`,`chart`,`axes`,`x`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`axes`,`x`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Gn,height:Kn,targetClass:`.vue-ui-history-plot-x-axis-scale`,rotation:B.value.x.labels.autoRotate.angle});let Gr=d(()=>Me({config:L,style:V,mutableConfig:G,dialog:Zt,accordion:Kt,isFullscreen:dn,parent:k,maxWidth:800}));it(()=>G.value.showTable,e=>je(e,L,hn));function Kr(){G.value.showTable=!1,gn.value&&gn.value.setTableIconState(!1)}let qr=d(()=>V.value.backgroundColor),Jr=d(()=>V.value.legend),Yr=d(()=>V.value.title),{isCallbackImaging:Xr,isCallbackSvg:Zr,generateSvg:Qr,onGenerateImage:$r}=Ae({svg:W,title:Yr,legend:Jr,legendItems:Dr,backgroundColor:qr,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:Hn});async function ei(){Tn(`copyAlt`,{config:L.value,dataset:Q.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:Q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ti=d(()=>({head:Fr.value.head,body:Fr.value.body.map(e=>[e[0]?.name||``,e[1],e[2],e[3]]),caption:L.value.a11y.translations.tableCaption,notice:L.value.a11y.translations.tableAvailable}));function ni(e){return Q.value.findIndex(t=>t.seriesIndex===e)}function ri(){if(F.value!==null&&I.value!==null){let e=Q.value.find(e=>e.seriesIndex===F.value)?.plots?.[I.value];e&&Mr({datapoint:e,plotIndex:I.value,seriesIndex:F.value})}F.value=null,I.value=null,Sn.value=`pointer`,ln.value=!1,P.value=null}function ii(){F.value=null,I.value=null,Cn.value=!0}function ai(){ri(),Cn.value=!1}function oi(e,t){if(!e?.plots?.length)return null;let n=e.plots.length;return(t%n+n)%n}function si({seriesIndex:e,plotIndex:t,direction:n}){if(!Q.value.length)return null;let r=ni(e);if(r===-1)return null;if(n===`up`||n===`down`){let e=Q.value[r];if(!e?.plots?.length)return null;let i=oi(e,t+(n===`up`?-1:1));return{seriesIndex:e.seriesIndex,plotIndex:i}}if(n===`left`||n===`right`){let e=((r+(n===`left`?-1:1))%Q.value.length+Q.value.length)%Q.value.length,i=Q.value[e];if(!i?.plots?.length)return null;let a=Math.min(t,i.plots.length-1);return{seriesIndex:i.seriesIndex,plotIndex:a}}return null}function ci(e){if(!W.value||Lr.value||document.activeElement!==W.value||!Q.value.length)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){ri();return}if(a){if(F.value===null||I.value===null)return;let e=Q.value.find(e=>e.seriesIndex===F.value)?.plots?.[I.value];if(!e)return;kr({datapoint:e,plotIndex:I.value,seriesIndex:F.value});return}let s=null;if(F.value===null||I.value===null){let e=Q.value[0];if(!e?.plots?.length)return;s={seriesIndex:e.seriesIndex,plotIndex:0}}else r?s=si({seriesIndex:F.value,plotIndex:I.value,direction:`up`}):i?s=si({seriesIndex:F.value,plotIndex:I.value,direction:`down`}):t?s=si({seriesIndex:F.value,plotIndex:I.value,direction:`left`}):n&&(s=si({seriesIndex:F.value,plotIndex:I.value,direction:`right`}));if(!s)return;let c=Q.value.find(e=>e.seriesIndex===s.seriesIndex)?.plots?.[s.plotIndex];c&&Pr({datapoint:c,plotIndex:s.plotIndex,seriesIndex:s.seriesIndex,triggerMode:`keyboard`})}return Te({getData:Vr,getImage:Hr,generatePdf:Vn,generateCsv:Ir,generateImage:Hn,generateSvg:Qr,hideSeries:Er,showSeries:Tr,toggleTable:zr,toggleTooltip:Br,toggleAnnotator:Rr,toggleFullscreen:Ar,copyAlt:ei}),it(()=>[K.value,Y.value,B.value,V.value,L.value.style.fontFamily,O.dataset,En.value,bn.value,yn.value,_n.value,vn.value],Yn,{flush:`post`,deep:!0}),(e,i)=>(x(),m(`div`,{id:`history_plot_${M.value}`,ref_key:`historyPlotChart`,ref:k,class:v({"vue-data-ui-component":!0,"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":dn.value}),style:b(`background:${V.value.backgroundColor};color:${V.value.color};font-family:${L.value.style.fontFamily}; position: relative; ${L.value.responsive?`height: 100%`:``}`),onMouseenter:i[2]||=()=>E(In)(!0),onMouseleave:i[3]||=()=>E(In)(!1)},[h(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[h(`p`,null,T(L.value.a11y.translations.keyboardNavigation),1)],8,st),ti.value.body.length?(x(),f(He,{key:0,uid:M.value,head:ti.value.head,body:ti.value.body,caption:ti.value.caption,notice:ti.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),w(e.$slots,`userConfig`,{},void 0,!0),L.value.userOptions.buttons.annotator?(x(),f(E(Jt),Ze({key:1},E(n)(L.value.userOptions.annotator),{svgRef:E(W),backgroundColor:V.value.backgroundColor,color:V.value.color,active:Lr.value,isCursorPointer:U.value,palette:L.value.userOptions.annotatorPalette,onClose:Rr}),Je({_:2},[C(E(r),n=>({name:n,fn:D(r=>[w(e.$slots,n,y(_(E(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Un.value?(x(),m(`div`,{key:2,ref_key:`noTitle`,ref:cn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),V.value.title.text?(x(),m(`div`,{key:3,ref_key:`chartTitle`,ref:tn,class:`vue-ui-xy-title`,style:b(`font-family:${L.value.style.fontFamily}`)},[(x(),f(ke,{key:`title_${nn.value}`,config:{title:{cy:`history-plot-div-title`,...V.value.title},subtitle:{cy:`history-plot-div-subtitle`,...V.value.title.subtitle}}},null,8,[`config`]))],4)):p(``,!0),h(`div`,{id:`legend-top-${M.value}`},null,8,ct),L.value.userOptions.show&&wn.value&&(E(Ln)||E(Fn))?(x(),f(E(Yt),{ref_key:`userOptionsRef`,ref:gn,key:`user_option_${sn.value}`,backgroundColor:V.value.backgroundColor,color:V.value.color,isPrinting:E(zn),isImaging:E(Bn),uid:M.value,hasTooltip:V.value.tooltip.show&&L.value.userOptions.buttons.tooltip,hasPdf:L.value.userOptions.buttons.pdf,hasImg:L.value.userOptions.buttons.img,hasSvg:L.value.userOptions.buttons.svg,hasXls:L.value.userOptions.buttons.csv,hasTable:L.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:L.value.userOptions.buttons.fullscreen,hasAltCopy:L.value.userOptions.buttons.altCopy,isFullscreen:dn.value,chartElement:k.value,position:L.value.userOptions.position,isTooltip:G.value.showTooltip,titles:{...L.value.userOptions.buttonTitles},hasAnnotator:L.value.userOptions.buttons.annotator,isAnnotation:Lr.value,callbacks:L.value.userOptions.callbacks,printScale:L.value.userOptions.print.scale,tableDialog:L.value.table.useDialog,isCursorPointer:U.value,onToggleFullscreen:Ar,onGeneratePdf:E(Vn),onGenerateCsv:Ir,onGenerateImage:E($r),onGenerateSvg:E(Qr),onToggleTable:zr,onToggleTooltip:Br,onToggleAnnotator:Rr,onCopyAlt:ei,style:b({visibility:E(Ln)?E(Fn)?`visible`:`hidden`:`visible`})},Je({_:2},[C(E(Ne)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(_(E(Pe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,lt,[(x(),m(`svg`,{ref_key:`svgRef`,ref:W,xmlns:E(ge),viewBox:`0 0 ${K.value.width<0?.1:K.value.width} ${K.value.height<0?.1:K.value.height}`,style:b(`max-width:100%;overflow:visible;background:transparent;color:${V.value.color};visibility:${E(Jn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${M.value}`,tabindex:`0`,onFocus:ii,onBlur:ai,onKeydown:ci},[Xe(E(Xt)),w(e.$slots,`svg-underlayer`,{svg:{...K.value,drawingArea:J.value,isPrintingImg:E(zn)||E(Bn)||E(Xr),isPrintingSvg:E(Zr)}},void 0,!0),e.$slots[`chart-background`]?(x(),m(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:J.value.width<=0?10:J.value.width,height:J.value.height<=0?10:J.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,dt)):p(``,!0),R.value.gradient.show||or.value?(x(),m(`defs`,ft,[R.value.gradient.show?(x(!0),m(u,{key:0},C(Q.value,(e,t)=>(x(),f(Be,{t:`radial`,key:`gradient_${t}_${M.value}`,id:`gradient_${t}_${M.value}`,fy:`30%`,stops:[[`10%`,E(ee)(e.color,R.value.gradient.intensity/100),1],[`90%`,E(re)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)):p(``,!0),(x(!0),m(u,null,C(Q.value,e=>(x(),m(u,{key:`temperature_grad_history_template_${e.seriesIndex}_${M.value}`},[R.value.gradient.show&&cr(e)?(x(!0),m(u,{key:0},C(e.plots,t=>(x(),f(Be,{t:`radial`,key:`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${M.value}`,id:mr(e,t),fy:`30%`,stops:[[`10%`,E(ee)($(e,t),R.value.gradient.intensity/100),1],[`90%`,E(re)($(e,t),.1),1],[`100%`,$(e,t),1]]},null,8,[`id`,`stops`]))),128)):p(``,!0),sr(e)?(x(),m(`linearGradient`,{key:1,id:`temperature_grad_history_${e.seriesIndex}_${M.value}`,gradientUnits:`userSpaceOnUse`,x1:fr(e).x1,y1:fr(e).y1,x2:fr(e).x2,y2:fr(e).y2},[(x(!0),m(u,null,C(e.temperatureColors,(t,n)=>(x(),m(`stop`,{key:`temperature_grad_history_stop_${e.seriesIndex}_${n}_${M.value}`,"stop-color":t,offset:e.temperatureColors.length===1?`0%`:E(me)(n,e.temperatureColors.length)},null,8,mt))),128))],8,pt)):p(``,!0)],64))),128))])):p(``,!0),z.value.verticalLines.show?(x(),m(`g`,ht,[(x(!0),m(u,null,C(Z.value.tickX,e=>(x(),m(`line`,{x1:e.x,x2:e.x,y1:e.y1,y2:e.y2,stroke:z.value.verticalLines.stroke,"stroke-width":z.value.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,gt))),256))])):p(``,!0),B.value.y.labels.show?(x(),m(`g`,_t,[(x(!0),m(u,null,C(Z.value.tickY,e=>(x(),m(`line`,{stroke:z.value.verticalLines.stroke,"stroke-width":z.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:J.value.left-5,x2:J.value.left,y1:e.y,y2:e.y},null,8,vt))),256))])):p(``,!0),B.value.y.labels.show?(x(),m(`g`,{key:4,ref_key:`yAxisScales`,ref:bn},[(x(!0),m(u,null,C(Z.value.tickY,e=>(x(),m(`text`,{x:J.value.left+B.value.y.labels.offsetX-4-R.value.radius,y:e.y+Y.value.yAxisLabels/3,fill:B.value.y.labels.color,"font-size":Y.value.yAxisLabels,"text-anchor":`end`},T(E(ue)(B.value.y.labels.formatter,e.value,E(a)({p:B.value.y.labels.prefix,v:e.value,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))),9,yt))),256))],512)):p(``,!0),B.value.y.name.text?(x(),m(`text`,{key:5,ref_key:`yAxisLabel`,ref:vn,transform:`translate(${Y.value.yAxisName}, ${K.value.height/2+B.value.y.name.offsetY}), rotate(-90)`,"font-size":Y.value.yAxisName,fill:B.value.y.name.color,"font-weight":B.value.y.name.bold?`bold`:`normal`,"text-anchor":`middle`},T(B.value.y.name.text),9,bt)):p(``,!0),z.value.horizontalLines.show?(x(),m(`g`,xt,[(x(!0),m(u,null,C(Z.value.tickY,e=>(x(),m(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:z.value.horizontalLines.stroke,"stroke-width":z.value.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,St))),256))])):p(``,!0),B.value.x.labels.show?(x(),m(`g`,Ct,[(x(!0),m(u,null,C(Z.value.tickX,e=>(x(),m(`line`,{stroke:z.value.verticalLines.stroke,"stroke-width":z.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:e.x,x2:e.x,y1:J.value.bottom,y2:J.value.bottom+5},null,8,wt))),256))])):p(``,!0),B.value.x.labels.show?(x(),m(`g`,{key:8,ref_key:`xAxisScales`,ref:yn},[(x(!0),m(u,null,C(Z.value.tickX,e=>(x(),m(`text`,{class:`vue-ui-history-plot-x-axis-scale`,transform:`translate(${e.x}, ${J.value.bottom+B.value.x.labels.offsetY+Y.value.xAxisLabels+R.value.radius}), rotate(${B.value.x.labels.rotation})`,fill:B.value.x.labels.color,"font-size":Y.value.xAxisLabels,"text-anchor":B.value.x.labels.rotation>0?`start`:B.value.x.labels.rotation<0?`end`:`middle`},T(E(ue)(B.value.x.labels.formatter,e.value,E(a)({p:B.value.x.labels.prefix,v:e.value,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding}))),9,Tt))),256))],512)):p(``,!0),B.value.x.name.text?(x(),m(`text`,{key:9,ref_key:`xAxisLabel`,ref:_n,x:K.value.width/2+B.value.x.name.offsetX,y:K.value.height,"font-size":Y.value.xAxisName,fill:B.value.x.name.color,"font-weight":B.value.x.name.bold?`bold`:`normal`,"text-anchor":`middle`},T(B.value.x.name.text),9,Et)):p(``,!0),z.value.xAxis.show?(x(),m(`line`,{key:10,x1:J.value.left,x2:J.value.left+J.value.width,y1:J.value.bottom,y2:J.value.bottom,stroke:z.value.xAxis.stroke,"stroke-width":z.value.xAxis.strokeWidth,"stroke-linecap":`round`},null,8,Dt)):p(``,!0),z.value.yAxis.show?(x(),m(`line`,{key:11,x1:J.value.left,x2:J.value.left,y1:J.value.top,y2:J.value.bottom,stroke:z.value.yAxis.stroke,"stroke-width":z.value.yAxis.strokeWidth,"stroke-linecap":`round`},null,8,Ot)):p(``,!0),(x(!0),m(u,null,C(ar.value,e=>(x(),m(`g`,{key:`history_plot_serie_${e.seriesIndex}_${M.value}`},[V.value.paths.show?(x(),m(`g`,{key:0,style:b({opacity:br(e.seriesIndex)})},[h(`path`,{class:v({"vue-data-ui-transition":E(H)&&!E(q)}),d:e.path,stroke:V.value.backgroundColor,"stroke-width":V.value.paths.strokeWidth+4,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,kt),h(`path`,{class:v({"vue-data-ui-transition":E(H)&&!E(q)}),d:e.path,stroke:yr(e),"stroke-width":V.value.paths.strokeWidth,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,At)],4)):p(``,!0),(x(!0),m(u,null,C(e.plots,e=>(x(),m(`circle`,{cx:e.x,cy:e.y,fill:V.value.backgroundColor,r:Y.value.plots,stroke:`none`,class:v({"vue-data-ui-transition":E(H)&&!E(q)})},null,10,jt))),256)),(x(!0),m(u,null,C(e.plots,t=>(x(),m(`circle`,{cx:t.x,cy:t.y,fill:hr(e,t,e.gradientIndex),r:Y.value.plots,stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,class:v({"vue-data-ui-transition":E(H)&&!E(q)}),style:b({opacity:br(e.seriesIndex)})},null,14,Mt))),256)),R.value.labels.show?(x(),m(`g`,Nt,[(x(!0),m(u,null,C(e.plots,(t,n)=>(x(),m(`g`,{key:`plab_${n}`},[String(t.label).includes(`
2
+ `)?(x(),m(`text`,{key:1,class:v({"vue-data-ui-transition":E(H)&&!E(q)}),transform:`translate(${t.x+R.value.labels.offsetX}, ${t.y+R.value.labels.offsetY+Y.value.plots+Y.value.labels})`,"font-size":Y.value.labels,fill:R.value.labels.color,"font-weight":R.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:b({opacity:br(e.seriesIndex)}),innerHTML:E(ne)({content:String(t.label),fontSize:Y.value.labels,fill:R.value.labels.color,x:0,y:0})},null,14,Ft)):(x(),m(`text`,{key:0,class:v({"vue-data-ui-transition":E(H)&&!E(q)}),transform:`translate(${t.x+R.value.labels.offsetX}, ${t.y+R.value.labels.offsetY+Y.value.plots+Y.value.labels})`,"font-size":Y.value.labels,fill:R.value.labels.color,"font-weight":R.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:b({opacity:br(e.seriesIndex)})},T(t.label),15,Pt))]))),128))])):p(``,!0),R.value.indexLabels.show?(x(),m(`g`,It,[(x(!0),m(u,null,C(e.plots,(t,n)=>(x(),m(`text`,{key:`lab_${n}`,class:v({"vue-data-ui-transition":E(H)&&!E(q)}),transform:`translate(${t.x+R.value.indexLabels.offsetX}, ${t.y+R.value.indexLabels.offsetY+Y.value.indexLabels/3})`,"font-size":Y.value.indexLabels,"font-weight":R.value.indexLabels.bold?`bold`:`normal`,fill:_r(e,t),"text-anchor":`middle`,style:b({opacity:br(e.seriesIndex)})},T(R.value.indexLabels.startAtZero?n:n+1),15,Lt))),128))])):p(``,!0)]))),128)),(x(!0),m(u,null,C(ar.value,e=>(x(),m(`g`,{key:`history_plot_trap_serie_${e.seriesIndex}_${M.value}`},[(x(!0),m(u,null,C(e.plots,(t,n)=>(x(),m(`circle`,{cx:t.x,cy:t.y,fill:`transparent`,r:Y.value.plots,stroke:`none`,onMouseenter:r=>Pr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex,triggerMode:`pointer`}),onMouseleave:r=>Mr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex}),onClick:r=>kr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex})},null,40,Rt))),256))]))),128)),w(e.$slots,`svg`,{svg:{...K.value,drawingArea:J.value,isPrintingImg:E(zn)||E(Bn)||E(Xr),isPrintingSvg:E(Zr)}},void 0,!0)],44,ut)),e.$slots.hint?(x(),m(`div`,zt,[w(e.$slots,`hint`,y(_({hint:L.value.a11y.translations.keyboardNavigation,isVisible:Cn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(x(),m(`div`,Bt,[w(e.$slots,`watermark`,y(_({isPrinting:E(zn)||E(Bn)||E(Xr)||E(Zr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${M.value}`},null,8,Vt),mn.value&&(V.value.legend.show||e.$slots.legend)?(x(),f(qe,{key:6,to:V.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[h(`div`,{ref_key:`chartLegend`,ref:rn},[w(e.$slots,`legend`,{legend:Dr.value},()=>[V.value.legend.show&&wn.value?(x(),f(Ge,{key:`legend_${an.value}`,legendSet:Dr.value,config:Or.value,isCursorPointer:U.value,onClickMarker:i[0]||=({legend:e})=>{Cr(e.seriesIndex)}},{item:D(({legend:e,index:t})=>[h(`div`,{onClick:t=>e.segregate(),style:b(`opacity:${N.value.includes(e.seriesIndex)?.5:1}`)},T(e.name),13,Ht)]),legendToggle:D(()=>[Dr.value.length>2&&V.value.legend.selectAllToggle.show&&!E(Mn)?(x(),f(Ve,{key:0,backgroundColor:V.value.legend.selectAllToggle.backgroundColor,color:V.value.legend.selectAllToggle.color,fontSize:V.value.legend.fontSize,checked:N.value.length>0,isCursorPointer:U.value,onToggle:Sr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(x(),m(`div`,{key:7,ref_key:`source`,ref:pn,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Xe(E(Wt),{teleportTo:V.value.tooltip.teleportTo,show:G.value.showTooltip&&ln.value,backgroundColor:V.value.tooltip.backgroundColor,color:V.value.tooltip.color,fontSize:V.value.tooltip.fontSize,borderRadius:V.value.tooltip.borderRadius,borderColor:V.value.tooltip.borderColor,borderWidth:V.value.tooltip.borderWidth,backgroundOpacity:V.value.tooltip.backgroundOpacity,position:V.value.tooltip.position,offsetX:V.value.tooltip.offsetX,offsetY:V.value.tooltip.offsetY,parent:k.value,content:un.value,isCustom:fn.value,isFullscreen:dn.value,smooth:V.value.tooltip.smooth,backdropFilter:V.value.tooltip.backdropFilter,smoothForce:V.value.tooltip.smoothForce,smoothSnapThreshold:V.value.tooltip.smoothSnapThreshold,isA11yMode:Sn.value===`keyboard`,a11yPosition:xn.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(_({...jr.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(_({...jr.value})),void 0,!0)]),"tooltip-after":D(()=>[w(e.$slots,`tooltip-after`,y(_({...jr.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),wn.value&&L.value.userOptions.buttons.table?(x(),f(tt(Gr.value.component),Ze({key:8},Gr.value.props,{ref_key:`tableUnit`,ref:hn,onClose:Kr}),Je({content:D(()=>[(x(),f(E(qt),{key:`table_${on.value}`,colNames:Fr.value.colNames,head:Fr.value.head,body:Fr.value.body,config:Fr.value.config,title:L.value.table.useDialog?``:Gr.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:U.value,onClose:Kr},{th:D(({th:e})=>[h(`div`,Ut,T(e),1)]),td:D(({td:e})=>[Ye(T(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[L.value.table.useDialog?{name:`title`,fn:D(()=>[Ye(T(Gr.value.title),1)]),key:`0`}:void 0,L.value.table.useDialog?{name:`actions`,fn:D(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Ir(L.value.userOptions.callbacks.csv),style:b({cursor:U.value?`pointer`:`default`})},[Xe(E(Gt),{name:`fileCsv`,stroke:Gr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),w(e.$slots,`skeleton`,{},()=>[E(Mn)?(x(),f(Se,{key:0})):p(``,!0)],!0)],46,ot))}},[[`__scopeId`,`data-v-bf1fef0d`]]);export{at as n,Wt as t};
@@ -0,0 +1,4 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as s,Ht as c,J as l,Jt as ee,S as te,X as ne,Yt as re,Zt as ie,at as ae,b as u,i as oe,in as se,nn as ce,nt as le,pt as ue,t as de,tn as fe,vt as pe,w as me,wt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{n as ye,t as be}from"./useHints-C-TwxM0Y.js";import{t as xe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Se}from"./useNestedProp-DnGoh-XS.js";import{t as Ce}from"./useThemeCheck-BKNRbGeC.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"./userOptionsSlots-DYuo-E5m.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./useTransitions-ChGGrtrv.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./vue-ui-accordion-DFxSW8ET.js";import{t as Re}from"./BaseLegendToggle-BIzyyI1h.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./useUserOptionState-CXlFnwPv.js";import{t as Ve}from"./useChartAccessibility-DOMuYJfm.js";import{t as He}from"./useTableResponsive-uSz_qZOB.js";import{t as Ue}from"./Legend-DM0ClX3D.js";import{t as We}from"./vue_ui_horizontal_bar-C4ulIxeT.js";import{Fragment as d,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as Je,guardReactiveProps as Ye,mergeProps as Xe,nextTick as Ze,normalizeClass as _,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Qe,onMounted as $e,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as et,toDisplayString as w,toRefs as tt,unref as T,useCssVars as nt,useSlots as rt,watch as it,withCtx as E,withKeys as at}from"vue";var ot=/* @__PURE__ */ e({default:()=>Jt}),st=[`id`],ct=[`id`],lt=[`onClick`],ut={style:{position:`relative`}},dt=[`xmlns`,`viewBox`,`aria-describedby`],ft=[`width`,`height`],pt={key:1},mt=[`y`,`width`,`height`,`fill`,`rx`],ht=[`x`,`y`,`width`,`height`,`fill`,`rx`],gt=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],_t=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],vt=[`stroke`,`stroke-width`,`d`],yt=[`stroke`,`stroke-width`,`d`],bt=[`y`,`height`,`width`,`fill`],xt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],St=[`transform`,`font-size`,`fill`,`font-weight`],Ct=[`transform`,`font-size`,`font-weight`,`innerHTML`],wt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Tt=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Et=[`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Dt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ot={key:7,class:`vue-data-ui-watermark`},kt=[`onClick`],At={style:`width:100%;padding-top: 36px;position:relative`},jt={class:`vue-ui-data-table`},Mt={key:0},Nt={style:{width:`100%`}},Pt=[`data-cell`],Ft={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},It=[`data-cell`],Lt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Rt=[`data-cell`],zt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Bt=[`data-cell`],Vt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ht=[`data-cell`],Ut={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Wt=[`data-cell`],Gt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Kt=[`data-cell`],qt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Jt=/*#__PURE__*/ xe({__name:`vue-ui-horizontal-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`,`selectDatapoint`],setup(e,{expose:xe,emit:ot}){nt(e=>({v35bfb3fb:e.tdo}));let Jt=Je(()=>import(`./Tooltip-C1q0Qoh7.js`)),Yt=Je(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Xt=Je(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Zt=Je(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Qt=Je(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),$t=Je(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_vertical_bar:en}=i(),{isThemeValid:tn,warnInvalidTheme:nn}=Ce(),rn=rt(),D=e,an=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(ne()),on=x(!1),sn=x(``),cn=x(null),ln=x(0),k=x(null),un=x(null),dn=x(null),fn=x(null),pn=x(null),mn=x(0),hn=x(0),gn=x(null),_n=x(null),vn=x(null),yn=x(null),bn=x(null),A=x([]),xn=x({none:0,asc:1,desc:2}),Sn=x(0),Cn=x(0),wn=null,Tn=null,j=x(null),En=x({x:0,y:0}),Dn=x(`pointer`),On=ot,M=x(zn()),N=f(()=>M.value.style.chart.layout.bars),P=f(()=>M.value.style.chart.layout),F=f(()=>M.value.style.chart.tooltip),I=f(()=>M.value.style.chart);ye({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiHorizontalBar`,rules:[be.emptyArray,{test:e=>e.length>50||e.some(e=>e.children&&e.children.length>50),message:[`👀 There are > 50 series / bars, which will probably force users to scroll. Consider:`,``,`▶️ Grouping small values into an "Other" category.`,``,`▶️ Using filters, or several instances of the component with subsets of related series.`]}]});let{transitionEnabled:L}=Me({config:()=>M.value.transitions,dataset:()=>D.dataset}),kn=f(()=>M.value.userOptions.useCursorPointer),An=f(()=>D.config?.skeletonDataset??[{name:``,value:6,color:`#d9d9d9`},{name:``,value:5,color:`#d9d9d9`},{name:``,value:4,color:`#d9d9d9`},{name:``,value:3,color:`#d9d9d9`},{name:``,value:2,color:`#d9d9d9`},{name:``,value:1,color:`#d9d9d9`}]),jn=f(()=>se({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{bars:{offsetX:110,dataLabels:{color:`transparent`,value:{prefix:``,suffix:``,formatter:null}},nameLabels:{color:`transparent`}},separators:{color:`#7A7A7A`}},legend:{show:!0,backgroundColor:`transparent`,color:`transparent`,prefix:``,suffix:``,formatter:null},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:M.value.skeletonConfig??{}})),{loading:Mn,FINAL_DATASET:Nn,manualLoading:Pn}=_e({...tt(D),FINAL_CONFIG:M,prepareConfig:zn,callback:()=>{Promise.resolve().then(async()=>{H.value.showTable=M.value.table.show,Qn()})},skeletonDataset:An.value,skeletonConfig:se({defaultConfig:M.value,userConfig:jn.value})}),{userOptionsVisible:Fn,setUserOptionsVisibility:In,keepUserOptionState:Ln}=Be({config:M.value}),{svgRef:Rn}=Ve({config:I.value.title});function zn(){let e=Se({userConfig:D.config,defaultConfig:en}),t={},n=e.theme;if(n){if(!tn.value(e))nn(e),t=e;else{let r=Se({userConfig:We[n]||D.config,defaultConfig:e});t={...Se({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||c}}}else t=e;return D.config&&he(D.config,`events.datapointEnter`)?t.events.datapointEnter=D.config.events.datapointEnter:t.events.datapointEnter=null,D.config&&he(D.config,`events.datapointLeave`)?t.events.datapointLeave=D.config.events.datapointLeave:t.events.datapointLeave=null,D.config&&he(D.config,`events.datapointClick`)?t.events.datapointClick=D.config.events.datapointClick:t.events.datapointClick=null,t}let R=x(I.value.width),z=x(I.value.height),B=x(N.value.gap),Bn=ie(D.config);it(()=>D.config,(e,t)=>{let n=ie(e),r=n!==Bn;Bn=n;let i=zn();r?(Mn.value||(M.value=i),Fn.value=!M.value.userOptions.showOnChartHover,mn.value+=1,hn.value+=1,H.value.showTable=M.value.table.show,Sn.value=xn.value[N.value.sort]??0,H.value.showTooltip=F.value.show,R.value=I.value.width,z.value=I.value.height,B.value=N.value.gap):(M.value.style.chart.tooltip=i.style.chart.tooltip,H.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0}),it(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(Pn.value=!1)},{deep:!0});let{isPrinting:Vn,isImaging:Hn,generatePdf:Un,generateImage:Wn}=je({elementId:`vue-ui-vertical-bar_${O.value}`,fileName:I.value.title.text||`vue-ui-vertical-bar`,options:M.value.userOptions.print}),Gn=f(()=>M.value.userOptions.show&&!I.value.title.text),Kn=f(()=>me(M.value.customPalette)),qn=x(null),Jn=f(()=>M.value.table.responsiveBreakpoint),Yn=f(()=>M.value.debug),Xn=x(0),V=x(null),Zn=x(null);function Qn(){if(k.value&&(ge(D.dataset)&&(ae({componentName:`VueUiVerticalBar`,type:`dataset`,debug:Yn.value}),an.value=!1,Pn.value=!0),ge(D.dataset)||(Pn.value=M.value.loading),M.value.responsive)){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:k.value,title:I.value.title.text?un.value:null,legend:I.value.legend.show?dn.value:null,source:fn.value,noTitle:pn.value});Xn.value=t/3,requestAnimationFrame(async()=>{z.value=t,R.value=e})});V.value&&(Zn.value&&V.value.unobserve(Zn.value),V.value.disconnect()),V.value=new ResizeObserver(e),Ze(()=>{Zn.value=k.value?.parentNode,Zn.value&&V.value.observe(Zn.value)})}}Qe(()=>{V.value&&(Zn.value&&V.value.unobserve(Zn.value),V.value.disconnect())});let H=x({showTable:M.value.table.show,showTooltip:F.value.show}),$n=f(()=>Sn.value===0),er=f(()=>Sn.value===2),U=f(()=>(Nn.value.forEach((e,t)=>{!e.value&&!e.children&&ae({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`value (index ${t})`,debug:Yn.value}),e.children&&(ge(e.children)?ae({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`children (index ${t})`,debug:Yn.value}):e.children.forEach((e,t)=>{[null,void 0].includes(e.name)&&ae({componentName:`VueUiVerticalBar`,type:`datasetSerieAttribute`,property:`name`,key:`children`,index:t,debug:Yn.value})}))}),Nn.value.map((e,t)=>{let n=`vertical_parent_${t}_${O.value}`,r=e.children&&e.children.length>0,i=u(e.value?e.value:r?e.children.map(e=>e.value||0).reduce((e,t)=>e+t,0):0),a=i>=0?1:-1;return{...e,id:n,absoluteIndex:t,shape:`square`,opacity:A.value.includes(n)?.5:1,value:Math.abs(i),sign:a,hasChildren:r,isChild:!1,segregate:()=>mr(n),isSegregated:A.value.includes(n),color:te(e.color)||Kn.value[t]||c[t]||c[t%c.length],children:!e.children||!e.children.length?[]:e.children.toSorted($n.value?()=>0:(e,t)=>er.value?t.value-e.value:e.value-t.value).map((r,o)=>({...r,value:u(Math.abs(r.value)),absoluteIndex:t,sign:r.value>=0?1:-1,isChild:!0,parentId:n,parentName:e.name,parentValue:i,parentSign:a,id:`vertical_child_${t}_${o}_${O.value}`,childIndex:o,color:te(r.color)||te(e.color)||Kn.value[t]||c[t]||c[t%c.length]})).map((t,n)=>({...t,isFirstChild:n===0,isLastChild:n===e.children.length-1}))}}).toSorted($n.value?()=>0:(e,t)=>er.value?t.value-e.value:e.value-t.value))),W=f(()=>U.value.filter(e=>!A.value.includes(e.id))),G=f(()=>W.value.flatMap(e=>e.hasChildren?e.children:e)),tr=f(()=>U.value.flatMap(e=>e.hasChildren?e.children:e)),nr=f(()=>W.value.flatMap(e=>e.children&&e.children.length>0?e.children.length:1).reduce((e,t)=>e+t,0)),rr=f(()=>({cy:`vertical-bar-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),K=f(()=>N.value.parentLabels.show?N.value.parentLabels.fontSize*3+N.value.parentLabels.paddingBottom:0),q=f(()=>{let e=[],t=0;return G.value.forEach((n,r)=>{n.isChild&&n.childIndex===0&&N.value.parentLabels.show&&(t+=1),e[r]=t}),e}),J=f(()=>{let e=Math.max(0,...q.value)*K.value;return(z.value-24-(nr.value-1)*B.value-e)/nr.value}),Y=f(()=>({width:R.value,height:z.value,padding:{top:12,left:128+N.value.offsetX,right:64+N.value.paddingRight,bottom:12}})),ir=x(0);function ar(){Ze(()=>{if(!bn.value){ir.value=0;return}let e=Array.from(bn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getBBox?.().width??t.getComputedTextLength();return n>e?n:e},0);ir.value=e+12})}it(()=>[G.value,R.value,z.value,N.value.nameLabels,N.value.offsetX],()=>ar(),{deep:!0}),$e(()=>{ar()});function or(){return typeof document>`u`?null:(wn||(wn=document.createElement(`canvas`),Tn=wn.getContext(`2d`)),Tn)}function sr(e){let t=String(e??``),n=N.value,r=n.dataLabels.fontSize,i=n.dataLabels.bold?700:400,a=M.value.style.fontFamily,o=or();return o?(o.font=`${i} ${r}px ${a}`,o.measureText(t).width):t.length*r*.6}function cr(){let e=W.value.flatMap(e=>e.children&&e.children.length?e.children.map(e=>Math.abs(e.value)):Math.abs(e.value));return e.length?Math.max(...e):0}let lr=f(()=>{Cn.value;let e=N.value,t=ir.value+Math.abs(e.nameLabels.offsetX)+e.offsetX,n=Y.value.width-Y.value.padding.right,r=Math.max(0,n-t-e.offsetX),i=Y.value.width-40,a=cr(),o=G.value.map((e,t)=>({serie:e,textWidth:sr(Mr(e.value,e,t,e.sign))}));if(!o.length||r<=0)return{left:0,right:0};if(!o.some(({serie:e})=>e.sign===-1)){let n=o.reduce((n,{serie:o,textWidth:s})=>{let c=a?Math.abs(o.value)/a:0;if(c<=0||s<=0)return n;let l=(t+r*c+3+e.dataLabels.offsetX+s-i)/c;return Math.max(n,l)},0);return{left:0,right:Math.ceil(Math.min(r,Math.max(0,n)))}}let s=t+r/2,c=-1/0,l=1/0;o.forEach(({serie:t,textWidth:n})=>{if(t.sign===-1){let t=s+12+e.dataLabels.offsetX+n;l=Math.min(l,i-t);return}let r=s-12-e.dataLabels.offsetX-n;c=Math.max(c,40-r)});let ee=0;ee=c>l?(c+l)/2:Math.min(l,Math.max(c,0));let te=ee*2;return te>=0?{left:Math.ceil(Math.min(r,te)),right:0}:{left:0,right:Math.ceil(Math.min(r,-te))}}),ur=f(()=>lr.value.right),dr=f(()=>lr.value.left);function fr(){Cn.value+=1}$e(()=>{typeof document<`u`&&document.fonts&&(document.fonts.ready.then(fr),document.fonts.addEventListener?.(`loadingdone`,fr))}),Qe(()=>{typeof document<`u`&&document.fonts&&document.fonts.removeEventListener?.(`loadingdone`,fr),wn=null,Tn=null});let X=f(()=>{let e=ir.value+Math.abs(N.value.nameLabels.offsetX)+dr.value+N.value.offsetX,t=Y.value.width-Y.value.padding.right,n=Math.max(0,t-e-ur.value-N.value.offsetX);return{top:Y.value.padding.top,bottom:Y.value.padding.top+Y.value.height,left:e,right:t,width:n,fullHeight:Y.value.padding.top+Y.value.padding.bottom+Y.value.height}});function pr(){A.value.length?A.value=[]:U.value.forEach(e=>{A.value.push(e.id)}),On(`selectLegend`,W.value)}async function mr(e){if(A.value.includes(e))A.value=A.value.filter(t=>t!==e);else{if(A.value.length===U.value.length-1)return;A.value.push(e)}On(`selectLegend`,W.value)}function hr(e){return U.value.length?U.value.find(t=>t.name===e)||(Yn.value&&console.warn(`VueUiHorizontalBar - Series name not found "${e}"`),null):(Yn.value&&console.warn(`VueUiHorizontalBar - There are no series to show.`),null)}function gr(e){let t=hr(e);t!==null&&A.value.includes(t.id)&&mr(t.id)}function _r(e){let t=hr(e);t!==null&&(A.value.includes(t.id)||mr(t.id))}let Z=f(()=>W.value.map(e=>Math.abs(e.value)).reduce((e,t)=>e+t,0));function vr(e,t=!1,n=0){return t?a({v:u(Math.abs(e)/Z.value*100),s:`%`,r:n}):Math.abs(e)/Z.value}let yr=f(()=>G.value.map(e=>e.sign).includes(-1)),br=f(()=>Math.max(...W.value.flatMap(e=>e.children&&e.children.length?Math.max(...e.children.map(e=>e.value)):e.value)));function Q(e){let t=e/br.value;return u(X.value.width/(yr.value?2:1)*t)}function xr(e){return Q(e)+X.value.left}function Sr(e,t){let n=W.value.find(t=>t.id===e.parentId);return{y:X.value.top+(B.value+J.value)*t+q.value[t]*K.value-K.value+N.value.parentLabels.fontSize,name:n.name,value:[void 0,NaN,null].includes(n.value)?``:n.sign===1?n.value:-n.value,percentageToTotal:isNaN(n.value/Z.value)?``:vr(n.value,!0,N.value.dataLabels.percentage.roundingPercentage),sign:n.sign}}function Cr(){return W.value}function wr(e,t){return Sr(e,t).name}function Tr(e,t){let n=Sr(e,t);return Mr(n.value,n,t,e.parentSign||e.sign)}let Er=x(null),Dr=x(null);function Or({datapoint:e,seriesIndex:t}){On(`selectDatapoint`,e),M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t})}function kr({datapoint:e,seriesIndex:t}){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t}),cn.value=null,on.value=!1,Er.value=null,j.value===t&&(j.value=null)}function Ar(e,t,n=`pointer`){Dn.value=n,M.value.events.datapointEnter&&M.value.events.datapointEnter({datpoint:e,seriesIndex:t}),j.value=t,cn.value=e,Dr.value={datapoint:e,seriesIndex:t,series:U.value,config:M.value},on.value=!0,Er.value=e.id;let r=``,i=e.isChild?e.parentName:e.name,o=e.isChild?e.name:``,c=F.value.customFormat;s(c)&&ue(()=>c({datapoint:e,series:U.value,config:M.value,seriesIndex:t}))?sn.value=c({datapoint:e,series:U.value,config:M.value,seriesIndex:t}):(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
2
+ <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${e.color}"/>${rn.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${O.value}_${e.absoluteIndex})"/>`:``}</svg> ${i}</div>
3
+ ${o?`<div>${o}</div>`:``}
4
+ </div>`,F.value.showValue&&(r+=`<div>${M.value.translations.value}: <b>${oe(N.value.dataLabels.value.formatter,e.sign===1?e.value:-e.value,a({p:F.value.prefix,v:e.sign===1?e.value:-e.value,s:F.value.suffix,r:F.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`),F.value.showPercentage&&(r+=`<div>${M.value.translations.percentageToTotal} : <b>${a({v:Math.abs(e.value)/Z.value*100,s:`%`,r:F.value.roundingPercentage})}</b></div>`,e.isChild&&(r+=`<div>${M.value.translations.percentageToSerie}: <b>${a({v:Math.abs(e.value)/Math.abs(e.parentValue)*100,s:`%`,r:F.value.roundingPercentage})}</b></div>`)),sn.value=`<div style="text-align:left">${r}</div>`)}function jr({legend:e,index:t}){let n=I.value.legend;return n.showValue?`${e.name}: ${oe(N.value.dataLabels.value.formatter,e.value,a({p:n.prefix,v:e.value,s:n.suffix,r:n.roundingValue}),{datapoint:e,seriesIndex:t})}`:e.name}function Mr(e,t,n,r){if(!N.value.dataLabels.value.show)return``;let i=oe(N.value.dataLabels.value.formatter,u(r===-1&&e>=0?-e:e),a({p:N.value.dataLabels.value.prefix,v:u(r===-1&&e>=0?-e:e),s:N.value.dataLabels.value.suffix,r:N.value.dataLabels.value.roundingValue}),{datapoint:t,seriesIndex:n}),o=`(${vr(e,!0,N.value.dataLabels.percentage.roundingPercentage)})`;return`${i}${N.value.dataLabels.percentage.show?` ${o}`:``}`}let $=f(()=>({head:[M.value.translations.parentName,M.value.translations.value,M.value.translations.percentageToTotal,M.value.translations.childName,M.value.translations.value,M.value.translations.percentageToSerie,M.value.translations.percentageToTotal],body:G.value.map(e=>e.isChild?e.isFirstChild?{color:e.color,parentName:e.parentName,parentValue:e.parentValue,percentageToTotal:e.parentValue/Z.value,childName:e.name,childValue:e.sign===1?e.value:-e.value,childPercentageToParent:Math.abs(e.value)/Math.abs(e.parentValue),childPercentageToTotal:Math.abs(e.value)/Z.value}:{color:``,parentName:``,parentValue:``,percentageToTotal:``,childName:e.name,childValue:e.sign===1?e.value:-e.value,childPercentageToParent:Math.abs(e.value)/Math.abs(e.parentValue),childPercentageToTotal:Math.abs(e.value)/Z.value}:{color:e.color,parentName:e.name,parentValue:e.sign===1?e.value:-e.value,percentageToTotal:Math.abs(e.value)/Z.value,childName:``,childValue:``,childPercentageToParent:``,childPercentageToTotal:``})}));function Nr(e=null){let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=$.value.head,r=$.value.body.map(e=>[e.parentName,e.parentValue,e.percentageToTotal,e.childName,e.childValue,e.childPercentageToParent,e.childPercentageToTotal]),i=t.concat([n]).concat(r),a=o(i);e?e(a):le({csvContent:a,title:I.value.title.text||`vue-ui-vertical-bar`})}let Pr=x(!1);function Fr(e){Pr.value=e,ln.value+=1}function Ir(){H.value.showTable=!H.value.showTable}$e(()=>{[`none`,`asc`,`desc`].includes(N.value.sort)||ae({componentName:`VueUiVerticalBar`,type:`attributeWrongValue`,property:`style.chart.layout.bars.sort`,key:N.value.sort}),Sn.value=xn.value[N.value.sort]??0});function Lr(){Sn.value+=1,Sn.value>2&&(Sn.value=0)}function Rr(){Lr()}function zr(){H.value.showTooltip=!H.value.showTooltip}let Br=x(!1);function Vr(){Br.value=!Br.value}let Hr=we(k,()=>I.value.title.text),Ur=f(()=>Oe({config:M,style:I,mutableConfig:H,dialog:$t,accordion:Le,isFullscreen:Pr,parent:k,maxWidth:800,isCursorPointer:kn}));it(()=>H.value.showTable,e=>De(e,M,_n));let{isResponsive:Wr}=He(qn,Jn);function Gr(){H.value.showTable=!1,vn.value&&vn.value.setTableIconState(!1)}let Kr=f(()=>U.value.map((e,t)=>({...e,shape:`square`,display:`${e.name}: ${oe(N.value.dataLabels.value.formatter,e.value,a({p:I.value.legend.prefix,v:e.value,s:I.value.legend.suffix,r:I.value.legend.roundingValue}),{datapoint:e,seriesIndex:t})}`}))),qr=f(()=>I.value.backgroundColor),Jr=f(()=>I.value.legend),Yr=f(()=>I.value.title),Xr=f(()=>Kr.value.map(e=>({...e,name:e.display}))),{isCallbackImaging:Zr,isCallbackSvg:Qr,generateSvg:$r,onGenerateImage:ei}=Ee({svg:Rn,title:Yr,legend:Jr,legendItems:Xr,backgroundColor:qr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Wn});function ti(){console.warn(`[autoSize]: this legacy method can be safely removed as it has no impact.`)}async function ni(){On(`copyAlt`,{config:M.value,dataset:W.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ri=x(!1);function ii(){j.value=null,ri.value=!0}function ai(){j.value=null,on.value=!1,ri.value=!1}function oi(){if(j.value===null)return;let e=G.value[j.value];e&&kr({datapoint:e,seriesIndex:j.value}),j.value=null,Dn.value=`pointer`}function si(e){if(!Rn.value||Br.value||document.activeElement!==Rn.value)return;let t=e.key===`ArrowRight`||e.key===`ArrowDown`,n=e.key===`ArrowLeft`||e.key===`ArrowUp`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;let a=G.value.length;if(!a)return;if(e.preventDefault(),e.stopPropagation(),i){oi();return}if(r){if(j.value===null)return;let e=G.value[j.value];if(!e)return;Or({datapoint:e,seriesIndex:j.value});return}let o=j.value,s=cn.value?G.value.findIndex(e=>e.id===cn.value.id):null;o!==null&&o>=0&&o<a?t?(o+=1,o>=a&&(o=0)):n&&(--o,o<0&&(o=a-1)):s!==null&&s>=0&&s<a?(o=t?s+1:s-1,o>=a&&(o=0),o<0&&(o=a-1)):o=t?0:a-1;let c=G.value[o];c&&(j.value=o,ci(c),Ar(c,o,`keyboard`))}function ci(e){if(!e)return;let t=X.value.right,n=X.value.top+(B.value+J.value)*e.absoluteIndex+q.value[e.absoluteIndex]*K.value;if(!Number.isFinite(t)||!Number.isFinite(n))return;let r=fe(t,n,Rn.value);r&&(En.value=r)}let li=f(()=>({head:$.value.head,body:$.value.body.map(e=>[e.parentName,e.parentValue===``?``:a({v:e.parentValue,r:N.value.dataLabels.value.roundingValue,p:N.value.dataLabels.prefix,s:N.value.dataLabels.suffix}),e.percentageToTotal===``?``:a({v:e.percentageToTotal*100,r:N.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childName,e.childValue===``?``:a({v:e.childValue,r:N.value.dataLabels.value.roundingValue,p:N.value.dataLabels.prefix,s:N.value.dataLabels.suffix}),e.childPercentageToParent===``?``:a({v:e.childPercentageToParent*100,r:N.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childPercentageToTotal===``?``:a({v:e.childPercentageToTotal*100,r:N.value.dataLabels.percentage.roundingPercentage,s:`%`})]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return xe({autoSize:ti,getData:Cr,getImage:Hr,generatePdf:Un,generateCsv:Nr,generateImage:Wn,generateSvg:$r,hideSeries:_r,showSeries:gr,toggleTable:Ir,toggleSort:Rr,toggleTooltip:zr,toggleAnnotator:Vr,toggleFullscreen:Fr,copyAlt:ni}),(e,i)=>(b(),h(`div`,{class:_(`vue-data-ui-component vue-ui-vertical-bar ${Pr.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`} ${M.value.responsive?`vue-ui-vertical-bar-autosize`:``}`),ref_key:`verticalBarChart`,ref:k,id:`vue-ui-vertical-bar_${O.value}`,style:y(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor};height:100%`),onMouseenter:i[3]||=()=>T(In)(!0),onMouseleave:i[4]||=()=>T(In)(!1)},[g(`p`,{id:`chart-instructions-${O.value}`,class:`sr-only`},w(M.value.a11y.translations.keyboardNavigation),9,ct),li.value.body.length?(b(),p(ze,{key:0,uid:O.value,head:li.value.head,body:li.value.body,caption:li.value.caption,notice:li.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),M.value.userOptions.buttons.annotator?(b(),p(T(Xt),Xe({key:1},T(n)(M.value.userOptions.annotator),{svgRef:T(Rn),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Br.value,isCursorPointer:kn.value,palette:M.value.userOptions.annotatorPalette,onClose:Vr}),Ge({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,v(Ye(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Gn.value?(b(),h(`div`,{key:2,ref_key:`noTitle`,ref:pn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),I.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:un,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),p(Te,{key:`title_${mn.value}`,config:{title:{cy:`vertical-bar-div-title`,...I.value.title},subtitle:{cy:`vertical-bar-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),M.value.userOptions.show&&an.value&&(T(Ln)||T(Fn))?(b(),p(T(Zt),{ref_key:`userOptionsRef`,ref:vn,backgroundColor:I.value.backgroundColor,color:I.value.color,key:`user_options_${ln.value}`,isImaging:T(Hn),isPrinting:T(Vn),uid:O.value,hasTooltip:M.value.userOptions.buttons.tooltip&&F.value.show,hasPdf:M.value.userOptions.buttons.pdf,hasImg:M.value.userOptions.buttons.img,hasSvg:M.value.userOptions.buttons.svg,hasXls:M.value.userOptions.buttons.csv,hasTable:M.value.userOptions.buttons.table,hasSort:M.value.userOptions.buttons.sort,hasFullscreen:M.value.userOptions.buttons.fullscreen,hasAltCopy:M.value.userOptions.buttons.altCopy,isFullscreen:Pr.value,isTooltip:H.value.showTooltip,titles:{...M.value.userOptions.buttonTitles},chartElement:k.value,position:M.value.userOptions.position,hasAnnotator:M.value.userOptions.buttons.annotator,isAnnotation:Br.value,callbacks:M.value.userOptions.callbacks,printScale:M.value.userOptions.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:kn.value,onToggleFullscreen:Fr,onGeneratePdf:T(Un),onGenerateCsv:Nr,onGenerateImage:T(ei),onGenerateSvg:T($r),onToggleTable:Ir,onToggleSort:Rr,onToggleTooltip:zr,onToggleAnnotator:Vr,onCopyAlt:ni,style:y({visibility:T(Ln)?T(Fn)?`visible`:`hidden`:`visible`})},Ge({_:2},[S(T(ke)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionSort optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(Ye(T(Ae)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasSort.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),e.$slots.legend&&I.value.legend.show&&I.value.legend.position===`top`?C(e.$slots,`legend`,{legend:U.value},void 0,!0,5):m(``,!0),!e.$slots.legend&&I.value.legend.show&&I.value.legend.position===`top`?(b(),h(`div`,{key:6,ref_key:`chartLegend`,ref:dn},[(b(),p(Ue,{key:`legend_top_${hn.value}`,legendSet:U.value,config:rr.value,onClickMarker:i[0]||=({legend:e})=>mr(e.id)},Ge({item:E(({legend:e,index:t})=>[g(`div`,{onClick:t=>mr(e.id),style:y(`opacity:${A.value.includes(e.id)?.5:1}`)},w(jr({legend:e,index:t})),13,lt)]),legendToggle:E(()=>[U.value.length>2&&I.value.legend.selectAllToggle.show&&!T(Mn)?(b(),p(Re,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:A.value.length>0,onToggle:pr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):m(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:E(({legend:e,index:t})=>[qe(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`]))],512)):m(``,!0),g(`div`,ut,[(b(),h(`svg`,{ref_key:`svgRef`,ref:Rn,xmlns:T(de),class:_({"vue-data-ui-fullscreen--on":Pr.value,"vue-data-ui-fulscreen--off":!Pr.value,"vue-data-ui-no-transition":!T(L)}),viewBox:`0 0 ${R.value} ${z.value}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${I.value.color}`),tabindex:`0`,"aria-describedby":`chart-instructions-${O.value}`,onFocus:ii,onBlur:ai,onKeydown:si},[g(`g`,{ref_key:`G`,ref:gn,class:`vue-data-ui-g`},[qe(T(Qt)),C(e.$slots,`svg-underlayer`,{svg:{...Y.value,drawingArea:X.value,isPrintingImg:T(Vn)||T(Hn)||T(Zr),isPrintingSvg:T(Qr)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`foreignObject`,{key:0,x:0,y:0,width:R.value,height:z.value,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,ft)):m(``,!0),g(`defs`,null,[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),p(Ie,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`vertical_bar_gradient_${O.value}_${t}`,key:`vertical_bar_gradient_${O.value}_${t}`,stops:[[`0%`,e.color,1],[`100%`,T(ee)(T(re)(e.color,.03),100-N.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(b(),h(`g`,pt,[(b(!0),h(d,null,S(G.value,t=>(b(),h(`defs`,null,[C(e.$slots,`pattern`,Xe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${O.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):m(``,!0),N.value.rowColor?(b(!0),h(d,{key:2},S(G.value,(e,t)=>(b(),h(`g`,{key:`row_${e.id}`},[g(`rect`,{x:0,y:X.value.top+(B.value+J.value)*t+q.value[t]*K.value,width:R.value,height:J.value<=0?1e-4:J.value,fill:N.value.rowColor,rx:N.value.rowRadius,style:{pointerEvents:`none`},class:_({"vue-data-ui-transition":T(L)})},null,10,mt)]))),128)):m(``,!0),(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`underlayer_${e.id}`},[g(`rect`,{x:T(u)(yr.value?X.value.left+X.value.width/2-(e.sign===1?0:Q(e.value)<=0?1e-4:Q(e.value)):X.value.left),y:X.value.top+(B.value+J.value)*t+q.value[t]*K.value,width:T(u)(Q(e.value)<=0?1e-4:Q(e.value)),height:J.value<=0?1e-4:J.value,fill:N.value.underlayerColor,rx:N.value.borderRadius,class:_({"vue-data-ui-transition":T(L)})},null,10,ht)]))),128)),(b(!0),h(d,null,S(G.value,(t,n)=>(b(),h(`g`,{key:`barloop_${t.id}`},[g(`rect`,{x:T(u)(yr.value?X.value.left+X.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):X.value.left),y:X.value.top+(B.value+J.value)*n+q.value[n]*K.value,width:T(u)(Q(t.value)<=0?1e-4:Q(t.value)),height:J.value<=0?1e-4:J.value,fill:N.value.useGradient?`url(#vertical_bar_gradient_${O.value}_${n})`:T(ee)(t.color,N.value.fillOpacity),rx:N.value.borderRadius,stroke:N.value.useStroke?t.color:`none`,"stroke-width":N.value.useStroke?N.value.strokeWidth:0,class:_({"vue-data-ui-transition":T(L)})},null,10,gt),e.$slots.pattern?(b(),h(`rect`,{key:0,x:T(u)(yr.value?X.value.left+X.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):X.value.left),y:X.value.top+(B.value+J.value)*n+q.value[n]*K.value,width:T(u)(Q(t.value)<=0?1e-4:Q(t.value)),height:J.value<=0?1e-4:J.value,fill:`url(#pattern_${O.value}_${t.absoluteIndex})`,rx:N.value.borderRadius,stroke:N.value.useStroke?t.color:`none`,"stroke-width":N.value.useStroke?N.value.strokeWidth:0,class:_({"vue-data-ui-transition":T(L)})},null,10,_t)):m(``,!0),(!t.isChild||t.isLastChild)&&P.value.separators.show&&n!==G.value.length-1?(b(),h(`path`,{key:1,stroke:P.value.separators.color,"stroke-width":P.value.separators.strokeWidth,"stroke-linecap":`round`,class:_({"vue-data-ui-transition":T(L)}),d:`M${R.value}, ${J.value+B.value/2+X.value.top+(B.value+J.value)*n+q.value[n]*K.value} ${P.value.separators.fullWidth?0:X.value.left}, ${J.value+B.value/2+X.value.top+(B.value+J.value)*n+q.value[n]*K.value}`},null,10,vt)):m(``,!0),yr.value&&P.value.separators.show?(b(),h(`path`,{key:2,stroke:P.value.separators.color,"stroke-width":P.value.separators.strokeWidth,"stroke-linecap":`round`,class:_({"vue-data-ui-transition":T(L)}),d:`M${X.value.left+X.value.width/2}, ${X.value.top} ${X.value.left+X.value.width/2}, ${X.value.bottom}`},null,10,yt)):m(``,!0)]))),128)),g(`g`,{ref_key:`parentLabels`,ref:yn},[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`pn_${e.id}`,class:`vue-ui-horizontal-bar-parent-label`},[e.isChild&&e.childIndex===0&&N.value.parentLabels.show?(b(),h(`rect`,{key:0,class:_([`vue-ui-horizontal-bar-parent-marker`,{"vue-data-ui-transition":T(L)}]),x:2,y:Sr(e,t).y-N.value.parentLabels.fontSize/1.5,height:N.value.parentLabels.fontSize/1.5,width:N.value.parentLabels.fontSize/1.5,rx:1,fill:e.color},null,10,bt)):m(``,!0),e.isChild&&e.childIndex===0&&N.value.parentLabels.show?(b(),h(`text`,{key:1,class:_({"vue-data-ui-transition":T(L)}),transform:`translate(${N.value.parentLabels.offsetX+N.value.parentLabels.fontSize}, ${Sr(e,t).y})`,"font-size":N.value.parentLabels.fontSize,fill:N.value.parentLabels.color,"font-weight":N.value.parentLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:T(l)({content:`${wr(e,t)}`,fontSize:N.value.parentLabels.fontSize,fill:P.value.bars.parentLabels.color,x:0,y:0,translateY:!1})},null,10,xt)):m(``,!0),e.isChild&&e.childIndex===0&&N.value.parentLabels.show?(b(),h(`text`,{key:2,class:_({"vue-data-ui-transition":T(L)}),transform:`translate(${N.value.parentLabels.offsetX+N.value.parentLabels.fontSize}, ${Sr(e,t).y+T(pe)(wr(e,t))*N.value.parentLabels.fontSize*1.1})`,"font-size":N.value.parentLabels.fontSize,fill:N.value.parentLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`start`},w(Tr(e,t)),11,St)):m(``,!0)]))),128))],512),g(`g`,{ref_key:`childLabels`,ref:bn},[(b(!0),h(d,null,S(tr.value,(e,t)=>(b(),h(`g`,{key:`cl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&N.value.nameLabels.show?(b(),h(`text`,{key:0,"text-anchor":`start`,class:_({"vue-data-ui-transition":T(L)}),transform:`translate(${Math.abs(N.value.nameLabels.offsetX)}, ${T(u)(X.value.top+(B.value+J.value)*t+J.value/2+N.value.nameLabels.fontSize/2+q.value[t]*K.value)})`,"font-size":N.value.nameLabels.fontSize,fill:`transparent`,"font-weight":N.value.nameLabels.bold?`bold`:`normal`,style:{"user-select":`none`},innerHTML:T(l)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:`transparent`,x:0,y:0,translateY:!0})},null,10,Ct)):m(``,!0)]))),128))],512),g(`g`,null,[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`vislab_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&N.value.nameLabels.show?(b(),h(`text`,{key:0,class:_({"vue-data-ui-transition":T(L)}),"text-anchor":`end`,transform:`translate(${X.value.left+N.value.nameLabels.offsetX-6}, ${X.value.top+(B.value+J.value)*t+J.value/2+N.value.nameLabels.fontSize/3+q.value[t]*K.value})`,"font-size":N.value.nameLabels.fontSize,fill:N.value.nameLabels.color,"font-weight":N.value.nameLabels.bold?`bold`:`normal`,innerHTML:T(l)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:P.value.bars.nameLabels.color,x:0,y:0,translateY:!0})},null,10,wt)):m(``,!0)]))),128))]),g(`g`,null,[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`sdl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[g(`text`,{class:_({"vue-data-ui-transition":T(L)}),transform:`translate(${yr.value?X.value.left+X.value.width/2+(e.sign===1?-12:12)+(e.sign===1?-P.value.bars.dataLabels.offsetX:P.value.bars.dataLabels.offsetX):Math.min(xr(e.value)+3+I.value.layout.bars.dataLabels.offsetX,X.value.right-2)},${X.value.top+(B.value+J.value)*t+J.value/2+q.value[t]*K.value+N.value.dataLabels.fontSize/3})`,"text-anchor":!yr.value||e.sign===-1?`start`:`end`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`},w(Mr(e.value,e,t,e.sign)),11,Tt)]))),128))]),(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,null,[g(`rect`,{x:0,y:X.value.top+(B.value+J.value)*t-B.value/2+q.value[t]*K.value,width:R.value,height:J.value+B.value<=0?1e-4:J.value+B.value,fill:Er.value===e.id?T(ee)(P.value.highlighter.color,P.value.highlighter.opacity):`transparent`,onMouseenter:n=>Ar(e,t,`pointer`),onMouseleave:n=>kr({datapoint:e,seriesIndex:t}),onClick:n=>Or({datapoint:e,seriesIndex:t})},null,40,Et)]))),256)),C(e.$slots,`svg`,{svg:{...Y.value,drawingArea:X.value,isPrintingImg:T(Vn)||T(Hn)||T(Zr),isPrintingSvg:T(Qr)}},void 0,!0)],512)],46,dt)),e.$slots.hint?(b(),h(`div`,Dt,[C(e.$slots,`hint`,v(Ye({hint:M.value.a11y.translations.keyboardNavigation,isVisible:ri.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(b(),h(`div`,Ot,[C(e.$slots,`watermark`,v(Ye({isPrinting:T(Vn)||T(Hn)||T(Zr)||T(Qr)})),void 0,!0)])):m(``,!0),e.$slots.legend&&I.value.legend.show&&I.value.legend.position===`bottom`?C(e.$slots,`legend`,{legend:U.value},void 0,!0,8):m(``,!0),!e.$slots.legend&&I.value.legend.show&&I.value.legend.position===`bottom`?(b(),h(`div`,{key:9,ref_key:`chartLegend`,ref:dn},[(b(),p(Ue,{key:`legend_bottom_${hn.value}`,legendSet:U.value,config:rr.value,isCursorPointer:kn.value,onClickMarker:i[1]||=({legend:e})=>mr(e.id)},Ge({item:E(({legend:e,index:t})=>[g(`div`,{onClick:t=>mr(e.id),style:y(`opacity:${A.value.includes(e.id)?.5:1}`)},w(jr({legend:e,index:t})),13,kt)]),legendToggle:E(()=>[U.value.length>2&&I.value.legend.selectAllToggle.show&&!T(Mn)?(b(),p(Re,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:A.value.length>0,isCursorPointer:kn.value,onToggle:pr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):m(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:E(({legend:e,index:t})=>[qe(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`]))],512)):m(``,!0),e.$slots.source?(b(),h(`div`,{key:10,ref_key:`source`,ref:fn,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),qe(T(Jt),{teleportTo:F.value.teleportTo,show:H.value.showTooltip&&on.value&&A.value.length<D.dataset.length,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,fontSize:F.value.fontSize,backgroundOpacity:F.value.backgroundOpacity,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:k.value,content:sn.value,isFullscreen:Pr.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:Dn.value===`keyboard`,a11yPosition:En.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,v(Ye({...Dr.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,v(Ye({...Dr.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,v(Ye({...Dr.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`]),an.value&&M.value.userOptions.buttons.table?(b(),p(et(Ur.value.component),Xe({key:11},Ur.value.props,{ref_key:`tableUnit`,ref:_n,onClose:Gr}),Ge({content:E(()=>[g(`div`,{ref_key:`tableContainer`,ref:qn,class:`vue-ui-vertical-bar-table atom-data-table`,style:y(`${M.value.table.useDialog?``:`max-height: 300px; margin-top: 24px`}`)},[g(`div`,At,[M.value.table.useDialog?m(``,!0):(b(),h(`div`,{key:0,role:`button`,tabindex:`0`,style:y(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${kn.value?`pointer`:`default`}; background:${M.value.table.th.backgroundColor};`),onClick:Gr,onKeypress:at(Gr,[`enter`])},[qe(T(Yt),{name:`close`,stroke:M.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),g(`div`,{style:{width:`100%`,"container-type":`inline-size`},class:_({"vue-ui-responsive":T(Wr)})},[g(`table`,jt,[M.value.table.useDialog?m(``,!0):(b(),h(`caption`,{key:0,style:y({backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Ke(w(I.value.title.text)+` `,1),I.value.title.subtitle.text?(b(),h(`span`,Mt,w(I.value.title.subtitle.text),1)):m(``,!0)],4)),g(`thead`,null,[g(`tr`,{role:`row`,style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color}`)},[(b(!0),h(d,null,S($.value.head,e=>(b(),h(`th`,{style:y(`outline:${M.value.table.th.outline}`)},[g(`div`,Nt,w(e),1)],4))),256))],4),g(`tr`,null,[g(`th`,{style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color};outline:${M.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color};outline:${M.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` ∑ `+w(M.value.table.td.prefix)+w(isNaN(Z.value)?``:Z.value.toFixed(M.value.table.td.roundingValue))+w(M.value.table.td.suffix),5),g(`th`,{style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color};outline:${M.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` 100% `,4),g(`th`,{style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color};outline:${M.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color};outline:${M.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color};outline:${M.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${M.value.table.th.backgroundColor};color:${M.value.table.th.color};outline:${M.value.table.th.outline}`)},null,4)])]),g(`tbody`,null,[(b(!0),h(d,null,S($.value.body,(e,t)=>(b(),h(`tr`,{class:_({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:y(`background:${M.value.table.td.backgroundColor};color:${M.value.table.td.color}`)},[g(`td`,{class:`vue-ui-data-table__tbody__td`,style:y(`outline:${M.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":$.value.head[0]??``},[g(`div`,Ft,[e.color?(b(),h(`span`,{key:0,style:y(`color:${e.color};margin-right:3px`)},`⬤`,4)):m(``,!0),g(`span`,null,w(e.parentName),1)])],12,Pt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:y(`outline:${M.value.table.td.outline}`),"data-cell":$.value.head[1]??``},[g(`div`,Lt,w(M.value.table.td.prefix)+w([``,NaN,void 0].includes(e.parentValue)?``:e.parentValue.toFixed(M.value.table.td.roundingValue))+w(M.value.table.td.suffix),1)],12,It),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:y(`outline:${M.value.table.td.outline}`),"data-cell":$.value.head[2]??``},[g(`div`,zt,w([``,NaN,void 0].includes(e.percentageToTotal)?``:`${(e.percentageToTotal*100).toFixed(M.value.table.td.roundingPercentage)}%`),1)],12,Rt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:y(`outline:${M.value.table.td.outline}`),"data-cell":$.value.head[3]??``},[g(`div`,Vt,w(e.childName),1)],12,Bt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:y(`outline:${M.value.table.td.outline}`),"data-cell":$.value.head[4]??``},[g(`div`,Ut,w(M.value.table.td.prefix)+w([``,NaN,void 0].includes(e.childValue)?``:e.childValue.toFixed(M.value.table.td.roundingValue))+w(M.value.table.td.suffix),1)],12,Ht),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:y(`outline:${M.value.table.td.outline}`),"data-cell":$.value.head[5]??``},[g(`div`,Gt,w([``,NaN,void 0].includes(e.childPercentageToParent)?``:`${(e.childPercentageToParent*100).toFixed(M.value.table.td.roundingPercentage)}%`),1)],12,Wt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:y(`outline:${M.value.table.td.outline}`),"data-cell":$.value.head[6]??``},[g(`div`,qt,w([``,NaN,void 0].includes(e.childPercentageToTotal)?``:`${(e.childPercentageToTotal*100).toFixed(M.value.table.td.roundingPercentage)}%`),1)],12,Kt)],6))),256))])])],2)])],4)]),_:2},[M.value.table.useDialog?{name:`title`,fn:E(()=>[Ke(w(Ur.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:E(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[2]||=e=>Nr(M.value.userOptions.callbacks.csv),style:y({cursor:kn.value?`pointer`:`default`})},[qe(T(Yt),{name:`fileCsv`,stroke:Ur.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),C(e.$slots,`skeleton`,{},()=>[T(Mn)?(b(),p(ve,{key:0})):m(``,!0)],!0)],46,st))}},[[`__scopeId`,`data-v-c9f32a95`]]);export{ot as n,Jt as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,X as r,i}from"./lib-rPeBMZrn.js";import{n as a,t as o}from"./useHints-C-TwxM0Y.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{t as c}from"./usePrefersMotion-XLHwega2.js";import{Fragment as l,computed as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as h,defineAsyncComponent as g,normalizeClass as _,normalizeStyle as v,onMounted as y,openBlock as b,ref as x,renderSlot as S,toDisplayString as C,unref as w,useSlots as T,watch as E}from"vue";var D=/* @__PURE__ */ e({default:()=>j}),O=[`aria-labelledby`],k=[`id`],A=[`aria-label`],j={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(e){let D=g(()=>import(`./vue-ui-digits-DD5Ehw6Z.js`).then(e=>e.n)),{vue_ui_kpi:j}=t(),M=c(),N=e,P=u({get:()=>R(),set:e=>e});a({config:()=>P.value,dataset:()=>N.dataset,component:`VueUiKpi`,rules:[o.noHint]});let F=T(),I=u(()=>P.value.debug),L=x(r());y(()=>{F[`chart-background`]&&I.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function R(){return s({userConfig:N.config,defaultConfig:j})}E(()=>N.config,e=>{P.value=R(),H()},{deep:!0});let z=x((N.dataset,N.dataset)),B=x(P.value.useAnimation?P.value.animationValueStart:z.value),V=e=>{let t=P.value.animationFrames,n=Math.abs(e-B.value)/t;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()};y(()=>{H()});function H(){P.value.useAnimation&&!M.value?(B.value=P.value.animationValueStart,V(N.dataset)):B.value=N.dataset}return E(()=>N.dataset,e=>{P.value.useAnimation&&!M.value?V(e):B.value=e}),(t,r)=>(b(),f(`div`,{class:_(`vue-data-ui-component vue-ui-kpi ${P.value.layoutClass}`),style:v(`background:${P.value.backgroundColor}; ${P.value.layoutCss}`),"aria-labelledby":`kpi-title-${L.value}`},[P.value.title||t.$slots.title?(b(),f(`div`,{key:0,class:_(`vue-ui-kpi-title ${P.value.titleClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.titleFontSize}px; color:${P.value.titleColor}; font-weight:${P.value.titleBold?`bold`:`normal`}; ${P.value.titleCss}`),id:`kpi-title-${L.value}`},[S(t.$slots,`title`,{comment:e.dataset}),m(` `+C(P.value.title),1)],14,k)):d(``,!0),S(t.$slots,`comment-before`,{comment:e.dataset}),p(`div`,{class:_(`vue-ui-kpi-value ${P.value.valueClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.valueFontSize}px; color:${P.value.valueColor}; font-weight:${P.value.valueBold?`bold`:`normal`}; ${P.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":B.value.toFixed(P.value.valueRounding)},[S(t.$slots,`value`,{comment:e.dataset}),P.value.analogDigits.show?(b(),f(`div`,{key:0,style:v({height:P.value.analogDigits.height+`px`})},[h(w(D),{dataset:Number(B.value.toFixed(P.value.valueRounding)),config:{backgroundColor:P.value.backgroundColor,digits:{color:P.value.analogDigits.color,skeletonColor:P.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(b(),f(l,{key:1},[m(C(w(i)(P.value.formatter,B.value,w(n)({p:P.value.prefix,v:B.value,s:P.value.suffix,r:P.value.valueRounding}))),1)],64))],14,A),S(t.$slots,`comment-after`,{comment:e.dataset})],14,O))}};export{D as n,j as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{$ as n,X as r,i}from"./lib-rPeBMZrn.js";import{n as a,t as o}from"./useHints-C-TwxM0Y.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{t as c}from"./usePrefersMotion-XLHwega2.js";import{Fragment as l,computed as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as h,defineAsyncComponent as g,normalizeClass as _,normalizeStyle as v,onMounted as y,openBlock as b,ref as x,renderSlot as S,toDisplayString as C,unref as w,useSlots as T,watch as E}from"vue";var D=/* @__PURE__ */ e({default:()=>j}),O=[`aria-labelledby`],k=[`id`],A=[`aria-label`],j={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(e){let D=g(()=>import(`./vue-ui-digits-p2met3a2.js`).then(e=>e.n)),{vue_ui_kpi:j}=t(),M=c(),N=e,P=u({get:()=>R(),set:e=>e});a({config:()=>P.value,dataset:()=>N.dataset,component:`VueUiKpi`,rules:[o.noHint]});let F=T(),I=u(()=>P.value.debug),L=x(r());y(()=>{F[`chart-background`]&&I.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function R(){return s({userConfig:N.config,defaultConfig:j})}E(()=>N.config,e=>{P.value=R(),H()},{deep:!0});let z=x((N.dataset,N.dataset)),B=x(P.value.useAnimation?P.value.animationValueStart:z.value),V=e=>{let t=P.value.animationFrames,n=Math.abs(e-B.value)/t;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()};y(()=>{H()});function H(){P.value.useAnimation&&!M.value?(B.value=P.value.animationValueStart,V(N.dataset)):B.value=N.dataset}return E(()=>N.dataset,e=>{P.value.useAnimation&&!M.value?V(e):B.value=e}),(t,r)=>(b(),f(`div`,{class:_(`vue-data-ui-component vue-ui-kpi ${P.value.layoutClass}`),style:v(`background:${P.value.backgroundColor}; ${P.value.layoutCss}`),"aria-labelledby":`kpi-title-${L.value}`},[P.value.title||t.$slots.title?(b(),f(`div`,{key:0,class:_(`vue-ui-kpi-title ${P.value.titleClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.titleFontSize}px; color:${P.value.titleColor}; font-weight:${P.value.titleBold?`bold`:`normal`}; ${P.value.titleCss}`),id:`kpi-title-${L.value}`},[S(t.$slots,`title`,{comment:e.dataset}),m(` `+C(P.value.title),1)],14,k)):d(``,!0),S(t.$slots,`comment-before`,{comment:e.dataset}),p(`div`,{class:_(`vue-ui-kpi-value ${P.value.valueClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.valueFontSize}px; color:${P.value.valueColor}; font-weight:${P.value.valueBold?`bold`:`normal`}; ${P.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":B.value.toFixed(P.value.valueRounding)},[S(t.$slots,`value`,{comment:e.dataset}),P.value.analogDigits.show?(b(),f(`div`,{key:0,style:v({height:P.value.analogDigits.height+`px`})},[h(w(D),{dataset:Number(B.value.toFixed(P.value.valueRounding)),config:{backgroundColor:P.value.backgroundColor,digits:{color:P.value.analogDigits.color,skeletonColor:P.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(b(),f(l,{key:1},[m(C(w(i)(P.value.formatter,B.value,w(n)({p:P.value.prefix,v:B.value,s:P.value.suffix,r:P.value.valueRounding}))),1)],64))],14,A),S(t.$slots,`comment-after`,{comment:e.dataset})],14,O))}};export{D as n,j as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{X as n,kt as r,x as i}from"./lib-rPeBMZrn.js";import{t as a}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as o}from"./useNestedProp-DnGoh-XS.js";import{t as s}from"./useThemeCheck-BKNRbGeC.js";import{t as c}from"./Shape-CRe8woTu.js";import{t as l}from"./vue_ui_label-dtPqyFsj.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as ee,getCurrentInstance as te,guardReactiveProps as ne,nextTick as h,normalizeClass as re,normalizeProps as ie,normalizeStyle as ae,onBeforeUnmount as oe,onMounted as se,openBlock as g,ref as _,renderList as ce,renderSlot as le,toDisplayString as ue,unref as de,useTemplateRef as v,watch as fe,withModifiers as pe}from"vue";var me=/* @__PURE__ */ e({default:()=>D}),he=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ge=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],_e=[`id`,`data-position`,`data-overflow`,`data-overlap`,`data-target-x`,`data-target-y`,`data-box-position-x`,`data-box-position-y`,`data-link-length`,`data-box-show`,`data-box-max-width`,`data-box-padding-top`,`data-box-padding-right`,`data-box-padding-bottom`,`data-box-padding-left`,`data-drag-enabled`,`data-drag-handle-position`,`data-drag-handle-size`],ve=[`x`,`y`,`width`,`height`,`rx`,`fill`,`stroke`,`stroke-width`],ye=[`x`,`y`,`width`,`height`,`rx`,`aria-label`],be=[`font-size`,`font-weight`,`text-anchor`,`fill`],xe=[`x`,`y`],Se=[`font-size`,`font-weight`,`text-anchor`,`fill`],Ce=[`x`,`y`],we=[`aria-label`],Te=[`x`,`y`,`width`,`height`],Ee=[`x`,`y`,`width`,`height`,`rx`],De=[`d`,`stroke`,`stroke-width`],Oe=[`d`,`stroke`,`stroke-width`,`opacity`],ke=8,y=4,Ae=12,je=24,Me=1,Ne=10,b=`__vueUiLabelLayoutOrder`,Pe=`__vueUiLabelNextLayoutOrder`,x=`__vueUiLabelLayoutRaf`,Fe=`__vueUiLabelSetLayoutRect`,Ie=`__vueUiLabelMeasureElement`,Le=`__vueUiLabelEmitDragEnd`,S=`__vueUiLabelPersistedOffset`,C=`__vueUiLabelDragRequestedOffset`,w=`__vueUiLabelDragging`,Re=`__vueUiLabelDragPriority`,ze=`__vueUiLabelNextDragPriority`,Be=`__vueUiLabelLastLayoutRect`,T=`__vueUiLabelLastLayoutOffset`,E=`__vueUiLabelDisplacedLabels`,D=/*#__PURE__*/ a({__name:`vue-ui-label`,props:{dataset:{type:Object,default(){return{x:null,y:null,position:{x:null,y:null}}}},config:{type:Object,default(){return{}}}},emits:[`dragStart`,`drag`,`dragEnd`,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],setup(e,{expose:a,emit:me}){let D=e,O=me,{vue_ui_label:Ve}=t(),{isThemeValid:He,warnInvalidTheme:Ue}=s();function We(){let e=o({userConfig:D.config,defaultConfig:Ve}),t={},n=e.theme;return n?He.value(e)?t=o({userConfig:l[n]||D.config,defaultConfig:e}):(Ue(e),t=e):t=e,t}let k=d(()=>We()),Ge=te(),Ke=n(),qe=v(`wrapperRef`),A=v(`labelRef`),Je=v(`contentRef`),Ye=v(`boxRef`),Xe=v(`titleTextRef`),Ze=v(`contentTextRef`),j=_(null),M=_(null),N=_(null),P=_({x:0,y:0}),Qe=_(!1),F=_(!1),$e=_(`pointer`),et=d(()=>k.value.title.fontSize),tt=d(()=>k.value.title.lineHeight),nt=d(()=>k.value.content.fontSize),rt=d(()=>k.value.content.lineHeight),it=d(()=>k.value.title.gap),at=d(()=>k.value.drag.handleWidth),ot=d(()=>k.value.collisionGap),st=null,ct=null,I=null,L={inputType:null,touchId:null,startPointer:null,startOffset:null,lastRequestedOffset:null},lt=d(()=>({x:D.dataset?.x??null,y:D.dataset?.y??null})),R=d(()=>r(lt.value.x)&&r(lt.value.y)),z=d(()=>Number(lt.value.x)),B=d(()=>Number(lt.value.y)),V=d(()=>k.value.link),H=d(()=>k.value.box),ut=d(()=>k.value.drag),U=d(()=>k.value.title.marker),dt=d(()=>k.value.overlap===!0),W=d(()=>ut.value?.enable===!0),ft=d(()=>!!(Ge?.vnode?.props??{}).onClick),pt=d(()=>ft.value),mt=d(()=>[String(k.value.title?.text??``).trim(),String(k.value.content?.text??``).trim()].filter(Boolean).join(`, `)||`Label`),ht=d(()=>`Move ${mt.value}`),gt=`label_${Ke}_drag_instructions`,_t=d(()=>k.value.a11y.translations.keyboardNavigation),vt=d(()=>r(ut.value?.iconSize)?Math.max(0,Number(ut.value.iconSize)):0),yt=d(()=>vt.value*.15),bt=d(()=>{let e=ut.value?.handlePosition;return[`left`,`right`,`top`,`bottom`].includes(e)?e:`left`}),xt=d(()=>{let e=D.dataset?.position;return!e||!r(e.x)||!r(e.y)?null:{x:Number(e.x),y:Number(e.y)}}),St=d(()=>Qe.value?null:xt.value),Ct=d(()=>r(V.value.length)?Math.max(0,Number(V.value.length)):ke),wt=d(()=>Hn(k.value.title.textAlign)),Tt=d(()=>Hn(k.value.content.textAlign)),Et=d(()=>Un(wt.value)),Dt=d(()=>Un(Tt.value)),Ot=d(()=>U.value?.color!==null&&U.value?.color!==void 0&&String(k.value.title.text??``)!==``),kt=d(()=>Ot.value&&r(U.value?.size)?Math.max(0,Number(U.value.size)):0),At=d(()=>kt.value/2),jt=d(()=>U.value?.beforeText!==!1),Mt=d(()=>Ot.value&&kt.value>0?6:0),Nt=d(()=>kt.value>0?kt.value+Mt.value:0),G=d(()=>{let e=H.value.padding??{};return{top:r(e.top)?Math.max(0,Number(e.top)):0,right:r(e.right)?Math.max(0,Number(e.right)):0,bottom:r(e.bottom)?Math.max(0,Number(e.bottom)):0,left:r(e.left)?Math.max(0,Number(e.left)):0}}),Pt=d(()=>r(H.value.borderWidth)?Math.max(0,Number(H.value.borderWidth)):0),Ft=d(()=>r(H.value.borderRadius)?Math.max(0,Number(H.value.borderRadius)):0),K=d(()=>r(H.value.maxWidth)?Math.max(0,Number(H.value.maxWidth)):null),It=d(()=>W.value&&H.value.show?at.value:0),Lt=d(()=>[`left`,`right`].includes(bt.value)),Rt=d(()=>{if(!H.value.show||!r(K.value)||K.value<=0)return null;let e=Lt.value?It.value:0;return Math.max(1,K.value-G.value.left-G.value.right-e)}),zt=d(()=>Rt.value?Math.max(1,Rt.value-Nt.value):null),q=d(()=>{if(!H.value.show||!N.value)return null;let e=Pt.value/2,t=Math.max(0,N.value.width-Pt.value),n=Math.max(0,N.value.height-Pt.value);return{x:N.value.x+e,y:N.value.y+e,width:t,height:n,rx:Math.min(Ft.value,t/2,n/2)}}),Bt=d(()=>{if(!W.value||!q.value)return null;let e=bt.value,t=[`left`,`right`].includes(e),n=Math.min(at.value,Math.max(0,t?q.value.width:q.value.height));if(n<=0||q.value.width<=0||q.value.height<=0)return null;let r=q.value.x,i=q.value.y,a=q.value.width,o=q.value.height,s=``,c=``;if(e===`left`||e===`right`){a=n,r=e===`left`?q.value.x:q.value.x+q.value.width-n;let t=e===`left`?r+n:r,l=r+n/2,u=i+o/2;s=`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{X as n,kt as r,x as i}from"./lib-rPeBMZrn.js";import{t as a}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as o}from"./useNestedProp-DnGoh-XS.js";import{t as s}from"./useThemeCheck-BKNRbGeC.js";import{t as c}from"./Shape-CRe8woTu.js";import{t as l}from"./vue_ui_label-dtPqyFsj.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as ee,getCurrentInstance as te,guardReactiveProps as ne,nextTick as h,normalizeClass as re,normalizeProps as ie,normalizeStyle as ae,onBeforeUnmount as oe,onMounted as se,openBlock as g,ref as _,renderList as ce,renderSlot as le,toDisplayString as ue,unref as de,useTemplateRef as v,watch as fe,withModifiers as pe}from"vue";var me=/* @__PURE__ */ e({default:()=>D}),he=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ge=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],_e=[`id`,`data-position`,`data-overflow`,`data-overlap`,`data-target-x`,`data-target-y`,`data-box-position-x`,`data-box-position-y`,`data-link-length`,`data-box-show`,`data-box-max-width`,`data-box-padding-top`,`data-box-padding-right`,`data-box-padding-bottom`,`data-box-padding-left`,`data-drag-enabled`,`data-drag-handle-position`,`data-drag-handle-size`],ve=[`x`,`y`,`width`,`height`,`rx`,`fill`,`stroke`,`stroke-width`],ye=[`x`,`y`,`width`,`height`,`rx`,`aria-label`],be=[`font-size`,`font-weight`,`text-anchor`,`fill`],xe=[`x`,`y`],Se=[`font-size`,`font-weight`,`text-anchor`,`fill`],Ce=[`x`,`y`],we=[`aria-label`],Te=[`x`,`y`,`width`,`height`],Ee=[`x`,`y`,`width`,`height`,`rx`],De=[`d`,`stroke`,`stroke-width`],Oe=[`d`,`stroke`,`stroke-width`,`opacity`],ke=8,y=4,Ae=12,je=24,Me=1,Ne=10,b=`__vueUiLabelLayoutOrder`,Pe=`__vueUiLabelNextLayoutOrder`,x=`__vueUiLabelLayoutRaf`,Fe=`__vueUiLabelSetLayoutRect`,Ie=`__vueUiLabelMeasureElement`,Le=`__vueUiLabelEmitDragEnd`,S=`__vueUiLabelPersistedOffset`,C=`__vueUiLabelDragRequestedOffset`,w=`__vueUiLabelDragging`,Re=`__vueUiLabelDragPriority`,ze=`__vueUiLabelNextDragPriority`,Be=`__vueUiLabelLastLayoutRect`,T=`__vueUiLabelLastLayoutOffset`,E=`__vueUiLabelDisplacedLabels`,D=/*#__PURE__*/ a({__name:`vue-ui-label`,props:{dataset:{type:Object,default(){return{x:null,y:null,position:{x:null,y:null}}}},config:{type:Object,default(){return{}}}},emits:[`dragStart`,`drag`,`dragEnd`,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],setup(e,{expose:a,emit:me}){let D=e,O=me,{vue_ui_label:Ve}=t(),{isThemeValid:He,warnInvalidTheme:Ue}=s();function We(){let e=o({userConfig:D.config,defaultConfig:Ve}),t={},n=e.theme;return n?He.value(e)?t=o({userConfig:l[n]||D.config,defaultConfig:e}):(Ue(e),t=e):t=e,t}let k=d(()=>We()),Ge=te(),Ke=n(),qe=v(`wrapperRef`),A=v(`labelRef`),Je=v(`contentRef`),Ye=v(`boxRef`),Xe=v(`titleTextRef`),Ze=v(`contentTextRef`),j=_(null),M=_(null),N=_(null),P=_({x:0,y:0}),Qe=_(!1),F=_(!1),$e=_(`pointer`),et=d(()=>k.value.title.fontSize),tt=d(()=>k.value.title.lineHeight),nt=d(()=>k.value.content.fontSize),rt=d(()=>k.value.content.lineHeight),it=d(()=>k.value.title.gap),at=d(()=>k.value.drag.handleWidth),ot=d(()=>k.value.collisionGap),st=null,ct=null,I=null,L={inputType:null,touchId:null,startPointer:null,startOffset:null,lastRequestedOffset:null},lt=d(()=>({x:D.dataset?.x??null,y:D.dataset?.y??null})),R=d(()=>r(lt.value.x)&&r(lt.value.y)),z=d(()=>Number(lt.value.x)),B=d(()=>Number(lt.value.y)),V=d(()=>k.value.link),H=d(()=>k.value.box),ut=d(()=>k.value.drag),U=d(()=>k.value.title.marker),dt=d(()=>k.value.overlap===!0),W=d(()=>ut.value?.enable===!0),ft=d(()=>!!(Ge?.vnode?.props??{}).onClick),pt=d(()=>ft.value),mt=d(()=>[String(k.value.title?.text??``).trim(),String(k.value.content?.text??``).trim()].filter(Boolean).join(`, `)||`Label`),ht=d(()=>`Move ${mt.value}`),gt=`label_${Ke}_drag_instructions`,_t=d(()=>k.value.a11y.translations.keyboardNavigation),vt=d(()=>r(ut.value?.iconSize)?Math.max(0,Number(ut.value.iconSize)):0),yt=d(()=>vt.value*.15),bt=d(()=>{let e=ut.value?.handlePosition;return[`left`,`right`,`top`,`bottom`].includes(e)?e:`left`}),xt=d(()=>{let e=D.dataset?.position;return!e||!r(e.x)||!r(e.y)?null:{x:Number(e.x),y:Number(e.y)}}),St=d(()=>Qe.value?null:xt.value),Ct=d(()=>r(V.value.length)?Math.max(0,Number(V.value.length)):ke),wt=d(()=>Hn(k.value.title.textAlign)),Tt=d(()=>Hn(k.value.content.textAlign)),Et=d(()=>Un(wt.value)),Dt=d(()=>Un(Tt.value)),Ot=d(()=>U.value?.color!==null&&U.value?.color!==void 0&&String(k.value.title.text??``)!==``),kt=d(()=>Ot.value&&r(U.value?.size)?Math.max(0,Number(U.value.size)):0),At=d(()=>kt.value/2),jt=d(()=>U.value?.beforeText!==!1),Mt=d(()=>Ot.value&&kt.value>0?6:0),Nt=d(()=>kt.value>0?kt.value+Mt.value:0),G=d(()=>{let e=H.value.padding??{};return{top:r(e.top)?Math.max(0,Number(e.top)):0,right:r(e.right)?Math.max(0,Number(e.right)):0,bottom:r(e.bottom)?Math.max(0,Number(e.bottom)):0,left:r(e.left)?Math.max(0,Number(e.left)):0}}),Pt=d(()=>r(H.value.borderWidth)?Math.max(0,Number(H.value.borderWidth)):0),Ft=d(()=>r(H.value.borderRadius)?Math.max(0,Number(H.value.borderRadius)):0),K=d(()=>r(H.value.maxWidth)?Math.max(0,Number(H.value.maxWidth)):null),It=d(()=>W.value&&H.value.show?at.value:0),Lt=d(()=>[`left`,`right`].includes(bt.value)),Rt=d(()=>{if(!H.value.show||!r(K.value)||K.value<=0)return null;let e=Lt.value?It.value:0;return Math.max(1,K.value-G.value.left-G.value.right-e)}),zt=d(()=>Rt.value?Math.max(1,Rt.value-Nt.value):null),q=d(()=>{if(!H.value.show||!N.value)return null;let e=Pt.value/2,t=Math.max(0,N.value.width-Pt.value),n=Math.max(0,N.value.height-Pt.value);return{x:N.value.x+e,y:N.value.y+e,width:t,height:n,rx:Math.min(Ft.value,t/2,n/2)}}),Bt=d(()=>{if(!W.value||!q.value)return null;let e=bt.value,t=[`left`,`right`].includes(e),n=Math.min(at.value,Math.max(0,t?q.value.width:q.value.height));if(n<=0||q.value.width<=0||q.value.height<=0)return null;let r=q.value.x,i=q.value.y,a=q.value.width,o=q.value.height,s=``,c=``;if(e===`left`||e===`right`){a=n,r=e===`left`?q.value.x:q.value.x+q.value.width-n;let t=e===`left`?r+n:r,l=r+n/2,u=i+o/2;s=`
2
2
  M ${t} ${i}
3
3
  V ${i+o}
4
4
  `;let d=vt.value,f=yt.value/2,p=Math.max(0,d/2-f),m=d*.14;c=[-.7,0,.7].flatMap(e=>{let t=u+p*e;return[`M ${l-m} ${t} h 0`,`M ${l+m} ${t} h 0`]}).join(` `)}else{o=n,i=e===`top`?q.value.y:q.value.y+q.value.height-n;let t=e===`top`?i+n:i,l=r+a/2,u=i+n/2;s=`
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{t as n}from"./lib-rPeBMZrn.js";import{n as r,t as i}from"./useHints-C-TwxM0Y.js";import{t as a}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as o}from"./useNestedProp-DnGoh-XS.js";import{computed as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,normalizeStyle as d,openBlock as f,ref as p,unref as m,useCssVars as h}from"vue";var g=/* @__PURE__ */ e({default:()=>E}),_=[`xmlns`,`viewBox`],v={key:0},y=[`stroke`],b=[`stroke`],x=[`stroke`],S={key:1},C=[`stroke`],w={key:2},T=[`stroke`],E=/*#__PURE__*/ a({__name:`vue-ui-mini-loader`,props:{config:{type:Object,default(){return{}}}},setup(e){h(e=>({v5fadbcf2:j.value,v488061db:M.value,v2e2d4bba:N.value}));let{vue_ui_mini_loader:a}=t(),g=e,E=s(()=>o({userConfig:g.config,defaultConfig:a}));r({config:()=>E.value,dataset:()=>[],component:`VueUiMiniLoader`,rules:[i.noHint]});let D=p({onion:`-10 -10 84 84`,line:`-10 -10 112 84`,bar:`-10 -10 106 84`}),O=s(()=>({gutter:`stroke:${E.value.line.gutterColor};opacity:${E.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.line.gutterBlur}px);`})),k=s(()=>({gutter:`stroke:${E.value.bar.gutterColor};opacity:${E.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.bar.gutterBlur}px);`})),A=s(()=>({gutter:`stroke:${E.value.onion.gutterColor};opacity:${E.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.onion.gutterBlur}px);`})),j=s(()=>`blur(${E.value.onion.trackBlur}px) hue-rotate(${E.value.onion.trackHueRotate}deg)`),M=s(()=>`blur(${E.value.line.trackBlur}px) hue-rotate(${E.value.line.trackHueRotate}deg)`),N=s(()=>`blur(${E.value.bar.trackBlur}px) hue-rotate(${E.value.bar.trackHueRotate}deg)`);return(e,t)=>(f(),l(`svg`,{class:`vue-data-ui-component vue-ui-mini-loader`,xmlns:m(n),viewBox:D.value[E.value.type],style:{background:`transparent`},width:`100%`},[E.value.type===`onion`?(f(),l(`g`,v,[u(`path`,{d:`M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,y),u(`path`,{d:`M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,b),u(`path`,{d:`M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,x)])):c(``,!0),E.value.type===`line`?(f(),l(`g`,S,[u(`path`,{d:`M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(O.value.gutter+O.value.gutterBlur)},null,4),u(`path`,{d:`M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5`,stroke:E.value.line.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`line-animated`},null,8,C)])):c(``,!0),E.value.type===`bar`?(f(),l(`g`,w,[u(`path`,{d:`M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(k.value.gutter+k.value.gutterBlur)},null,4),u(`path`,{d:`M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5`,stroke:E.value.bar.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`bar-animated`},null,8,T)])):c(``,!0)],8,_))}},[[`__scopeId`,`data-v-5266752a`]]);export{g as n,E as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{t as n}from"./lib-rPeBMZrn.js";import{n as r,t as i}from"./useHints-C-TwxM0Y.js";import{t as a}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as o}from"./useNestedProp-DnGoh-XS.js";import{computed as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,normalizeStyle as d,openBlock as f,ref as p,unref as m,useCssVars as h}from"vue";var g=/* @__PURE__ */ e({default:()=>E}),_=[`xmlns`,`viewBox`],v={key:0},y=[`stroke`],b=[`stroke`],x=[`stroke`],S={key:1},C=[`stroke`],w={key:2},T=[`stroke`],E=/*#__PURE__*/ a({__name:`vue-ui-mini-loader`,props:{config:{type:Object,default(){return{}}}},setup(e){h(e=>({v5fadbcf2:j.value,v488061db:M.value,v2e2d4bba:N.value}));let{vue_ui_mini_loader:a}=t(),g=e,E=s(()=>o({userConfig:g.config,defaultConfig:a}));r({config:()=>E.value,dataset:()=>[],component:`VueUiMiniLoader`,rules:[i.noHint]});let D=p({onion:`-10 -10 84 84`,line:`-10 -10 112 84`,bar:`-10 -10 106 84`}),O=s(()=>({gutter:`stroke:${E.value.line.gutterColor};opacity:${E.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.line.gutterBlur}px);`})),k=s(()=>({gutter:`stroke:${E.value.bar.gutterColor};opacity:${E.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.bar.gutterBlur}px);`})),A=s(()=>({gutter:`stroke:${E.value.onion.gutterColor};opacity:${E.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.onion.gutterBlur}px);`})),j=s(()=>`blur(${E.value.onion.trackBlur}px) hue-rotate(${E.value.onion.trackHueRotate}deg)`),M=s(()=>`blur(${E.value.line.trackBlur}px) hue-rotate(${E.value.line.trackHueRotate}deg)`),N=s(()=>`blur(${E.value.bar.trackBlur}px) hue-rotate(${E.value.bar.trackHueRotate}deg)`);return(e,t)=>(f(),l(`svg`,{class:`vue-data-ui-component vue-ui-mini-loader`,xmlns:m(n),viewBox:D.value[E.value.type],style:{background:`transparent`},width:`100%`},[E.value.type===`onion`?(f(),l(`g`,v,[u(`path`,{d:`M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,y),u(`path`,{d:`M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,b),u(`path`,{d:`M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,x)])):c(``,!0),E.value.type===`line`?(f(),l(`g`,S,[u(`path`,{d:`M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(O.value.gutter+O.value.gutterBlur)},null,4),u(`path`,{d:`M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5`,stroke:E.value.line.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`line-animated`},null,8,C)])):c(``,!0),E.value.type===`bar`?(f(),l(`g`,w,[u(`path`,{d:`M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(k.value.gutter+k.value.gutterBlur)},null,4),u(`path`,{d:`M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5`,stroke:E.value.bar.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`bar-animated`},null,8,T)])):c(``,!0)],8,_))}},[[`__scopeId`,`data-v-5266752a`]]);export{g as n,E as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{D as a,Dt as o,Ft as s,Ht as ee,M as c,S as te,X as ne,Zt as re,at as ie,et as l,in as ae,nt as oe,pt as se,t as ce,w as le,zt as ue}from"./lib-rPeBMZrn.js";import{n as de,t as fe}from"./BaseScanner-8NdoBs7B.js";import{n as pe,t as me}from"./useHints-C-TwxM0Y.js";import{t as he}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ge}from"./resolveChartConfig-CIhClE5R.js";import{t as _e}from"./chartImage-DPGnEuYM.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.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"./DefGrad-DKMq1REY.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{n as De}from"./annotationViewport-X8fvs7pz.js";import{t as Oe}from"./vue_ui_molecule-Bw1UW1Na.js";import{t as ke}from"./usePanZoom-CE6Ofyy8.js";import{Fragment as Ae,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as je,createTextVNode as Me,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ne,nextTick as v,normalizeClass as Pe,normalizeProps as y,normalizeStyle as b,onMounted as Fe,openBlock as x,ref as S,renderList as Ie,renderSlot as C,resolveDynamicComponent as Le,toDisplayString as Re,toRefs as ze,unref as w,useCssVars as Be,watch as T,withCtx as E}from"vue";var Ve=/* @__PURE__ */ e({default:()=>Xe}),He=[`id`],Ue={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},We={key:2,style:`width:100%;background:transparent;`},Ge=[`xmlns`,`viewBox`],Ke=[`width`,`height`],qe={key:4,class:`vue-data-ui-watermark`},Je={key:5,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Ye={key:6,ref:`source`,dir:`auto`},Xe=/*#__PURE__*/ he({__name:`vue-ui-molecule`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectNode`,`copyAlt`],setup(e,{expose:he,emit:Ve}){Be(e=>({v5b86963f:cn.value}));let Xe=g(()=>import(`./Title-BliHuXfT.js`).then(e=>e.t)),Ze=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Qe=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),$e=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),et=g(()=>import(`./DataTable-Dof6yhO7.js`)),tt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),nt=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),rt=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),it=g(()=>import(`./RecursiveLinks-CZtG6uWg.js`)),at=g(()=>import(`./RecursiveLabels-B0d04xSj.js`)),ot=g(()=>import(`./RecursiveCircles-BftI1kwF.js`)),st=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_molecule:ct}=i(),D=e,lt=Ve,ut=u(()=>!!D.dataset&&D.dataset.length);Fe(()=>{ft()});let dt=u(()=>M.value.debug);function ft(){ue(D.dataset)&&ie({componentName:`VueUiMolecule`,type:`dataset`,debug:dt.value})}let O=S(ne()),k=S(!1),A=S(``),j=S(null),pt=S(0),mt=S(0),ht=S(0),gt=S(null),_t=S(null),M=S(xt()),N=u(()=>M.value.style.chart.tooltip),P=u(()=>M.value.style.chart),F=u(()=>M.value.userOptions);pe({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiMolecule`,rules:[me.emptyArray,{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length===0,message:[`👀 There are no children nodes attached to the root node. Consider:`,``,`▶️ Adding children nodes to the root node.`]},{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length>8,message:[`👀 The number of children nodes > 8, some nodes might overlap. Consider:`,``,`▶️ Grouping data into broader categories.`]}]});let I=u(()=>M.value.userOptions.useCursorPointer),vt=u(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#6A6A6A`},links:{stroke:`#6A6A6A80`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:L,FINAL_DATASET:R}=de({...ze(D),FINAL_CONFIG:M,prepareConfig:xt,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]}]}],skeletonConfig:ae({defaultConfig:M.value,userConfig:vt.value})}),{userOptionsVisible:z,setUserOptionsVisibility:yt,keepUserOptionState:bt}=Te({config:M.value}),{svgRef:B}=Ee({config:P.value.title});function xt(){return ge(D.config,ct,Oe)}let St=re(D.config);T(()=>D.config,e=>{let t=re(e),n=t!==St;St=t;let r=xt();n?(M.value=r,z.value=!M.value.userOptions.showOnChartHover,ft(),mt.value+=1,ht.value+=1,U.value.showTable=M.value.table.show,U.value.showTooltip=N.value.show,U.value.showZoom=P.value.zoom.show):(M.value.style.chart.tooltip=r.style.chart.tooltip,U.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let Ct=S(0),wt=()=>{Ct.value+=1};T([()=>L.value,()=>R.value],async([e])=>{e||(await v(),W.value=At(),await v(),wt(),await v(),Xt({x:0,y:0,width:400,height:400}),Jt(!1))},{flush:`post`,deep:!1});let{isPrinting:V,isImaging:H,generatePdf:Tt,generateImage:Et}=Ce({elementId:`cluster_${O.value}`,fileName:P.value.title.text||`vue-ui-molecule`,options:M.value.userOptions.print}),Dt=u(()=>M.value.userOptions.show&&!P.value.title.text),Ot=u(()=>le(M.value.customPalette)),U=S({showTable:M.value.table.show,showDataLabels:!0,showTooltip:N.value.show,showZoom:P.value.zoom.show});T(M,()=>{U.value={showTable:M.value.table.show,showDataLabels:!0,showTooltip:N.value.show,showZoom:P.value.zoom.show}},{immediate:!0});function kt(e,t=0){return Array.isArray(e)&&e.length>0&&e[0].nodes?kt(e[0].nodes,t+1):t}function At(){let e=kt(R.value),t=100,n=t;for(let r=0;r<e;r+=1)t/=1,n+=t;return{height:n,width:n}}let W=S(At());function jt(e,t={x:-W.value.width/2.43,y:W.value.height/2},n=W.value.width/1.1,r=24,i=0,a=0,o=`#BBBBBB`,s=0){if(!Array.isArray(e)||e.length===0)return e;let re=c({plot:t,radius:n,sides:e.length,rotation:i});return e.forEach((e,t)=>{let c=re.coordinates[t],ie=e.color?(()=>{let t=te(e.color);return t.startsWith(`#`)?t:`#${t}`})():null,l;ie?l=ie:s===0?l=o:s===1?(l=Ot.value[a]||ee[a]||o,a+=1):l=o,e.polygonPath={coordinates:[c]},e.circleRadius=r,e.color=l,e.strokeWidth=Math.min(P.value.links.strokeWidth/(s+1),r/2),e.uid=ne(),Array.isArray(e.nodes)&&e.nodes.length&&(e.nodes=jt(e.nodes,c,n/2.9,r/2.2,i+Math.PI*t/e.nodes.length,a,l,s+1))}),e}function Mt(e){let t=/* @__PURE__ */ new Set;function n(e){e.forEach(e=>{if(!e.color)return;let r=e.color;/^#?[0-9A-F]{6}$/i.test(r)||(r=te(r)),r.startsWith(`#`)||(r=`#${r}`),t.add(r),Array.isArray(e.nodes)&&e.nodes.length&&n(e.nodes)})}n(e);let r={};return Array.from(t).forEach(e=>{let t=e.slice(1);r[e]=`gradient_${t}`}),r}let Nt=u(()=>Mt(G.value)),G=u(()=>jt(l(R.value))),K=S(null);function Pt(e){K.value={datapoint:e,seriesIndex:-1,series:G.value,config:M.value};let t=N.value.customFormat;if(o(t)&&se(()=>t({seriesIndex:-1,datapoint:e,series:G.value,config:M.value})))A.value=t({seriesIndex:-1,datapoint:e,series:G.value,config:M.value});else{let t=``;t+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`,e.details&&(t+=`<div style="width:100%;border-top:1px solid ${N.value.borderColor};margin-top: 2px">${e.details}</div>`),A.value=`<div style="font-family:inherit">${t}</div>`}}let q=S(null),J=S(null),Ft=S(null);function It(e){Ft.value=q.value,q.value=e,e?M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:-1}):M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:Ft.value||q.value,seriesIndex:-1}),e?(k.value=!0,Pt(e),J.value=e.uid):(k.value=!1,A.value=``,J.value=null)}function Lt(e){let t=[];function n(e){e.forEach(e=>{let r={name:e.name,details:e.details||`-`,ancestor:e.ancestor&&e.ancestor.name||`-`,color:e.color||``};t.push(r),e.nodes&&e.nodes.length>0&&n(e.nodes,e.name)})}return n(e),t}let Rt=u(()=>Lt(G.value)),Y=u(()=>({head:[M.value.table.translations.nodeName,M.value.table.translations.details,M.value.table.translations.ancestor],body:Rt.value.map((e,t)=>[{color:e.color,name:e.name},e.details,e.ancestor||``]),config:{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},colNames:[M.value.table.translations.nodeName,M.value.table.translations.details,M.value.table.translations.ancestor]}));function zt(e=null){v(()=>{let t=Y.value.body.map((e,t)=>[[e[0].name],[e[1]],[e[2]]]),n=[[P.value.title.text],[P.value.title.subtitle.text],[[...Y.value.head]]].concat(t),r=a(n);e?e(r):oe({csvContent:r,title:P.value.title.text||`vue-ui-molecule`})})}function Bt(){return G.value}let X=S(!1);function Vt(e){X.value=e,pt.value+=1}function Ht(){U.value.showTable=!U.value.showTable}function Ut(){U.value.showDataLabels=!U.value.showDataLabels}function Wt(){U.value.showTooltip=!U.value.showTooltip}function Gt(){U.value.showZoom=!U.value.showZoom}let Z=S(!1);function Kt(){Z.value=!Z.value}let qt=u(()=>!Z.value&&U.value.showZoom),{viewBox:Q,resetZoom:Jt,isZoom:Yt,setInitialViewBox:Xt}=ke(B,{x:0,y:0,width:Math.max(10,W.value.width),height:Math.max(10,W.value.height)},P.value.zoom.speed,qt);function Zt(e){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:-1}),lt(`selectNode`,e)}let Qt=_e(j,()=>P.value.title.text),$=u(()=>be({config:M,style:P,mutableConfig:U,dialog:st,accordion:$e,isFullscreen:X,parent:j,maxWidth:800,isCursorPointer:I}));T(()=>U.value.showTable,e=>ye(e,M,gt));function $t(){U.value.showTable=!1,_t.value&&_t.value.setTableIconState(!1)}let en=u(()=>P.value.backgroundColor),tn=u(()=>P.value.title),{isCallbackImaging:nn,isCallbackSvg:rn,generateSvg:an,onGenerateImage:on}=ve({svg:B,title:tn,legend:null,legendItems:null,backgroundColor:en,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Et});async function sn(){lt(`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.")}let cn=u(()=>P.value.color);he({getData:Bt,getImage:Qt,generatePdf:Tt,generateCsv:zt,generateImage:Et,generateSvg:an,toggleTable:Ht,toggleLabels:Ut,toggleTooltip:Wt,toggleAnnotator:Kt,toggleFullscreen:Vt,toggleZoom:Gt,copyAlt:sn});let ln=u(()=>De(M.value.userOptions?.annotator?.followZoom,Q.value));return(e,i)=>(x(),p(`div`,{ref_key:`moleculeChart`,ref:j,class:Pe(`vue-data-ui-component vue-ui-molecule ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:b(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),id:`cluster_${O.value}`,onMouseleave:i[2]||=e=>{q.value=null,J.value=null,w(yt)(!1)},onMouseenter:i[3]||=()=>w(yt)(!0)},[F.value.buttons.annotator&&w(B)?(x(),d(w(tt),Ne({key:0},w(n)(F.value.annotator),{svgRef:w(B),followZoom:M.value.userOptions?.annotator?.followZoom,annotationViewport:ln.value,backgroundColor:P.value.backgroundColor,color:P.value.color,active:Z.value,isCursorPointer:I.value,onClose:Kt}),je({_:2},[Ie(w(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,y(_(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):f(``,!0),Dt.value?(x(),p(`div`,Ue,null,512)):f(``,!0),P.value.title.text?(x(),p(`div`,We,[(x(),d(w(Xe),{key:`title_${mt.value}`,config:{title:{cy:`molecule-div-title`,...P.value.title},subtitle:{cy:`molecule-div-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))])):f(``,!0),F.value.show&&ut.value&&(w(bt)||w(z))?(x(),d(w(nt),{ref_key:`userOptionsRef`,ref:_t,key:`user_options_${pt.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:w(V),isImaging:w(H),uid:O.value,hasTooltip:F.value.buttons.tooltip&&N.value.show,hasPdf:F.value.buttons.pdf,hasXls:F.value.buttons.csv,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasTable:F.value.buttons.table,hasLabel:F.value.buttons.labels,hasFullscreen:F.value.buttons.fullscreen,hasAltCopy:F.value.buttons.altCopy,isTooltip:U.value.showTooltip,titles:{...F.value.buttonTitles},isFullscreen:X.value,chartElement:j.value,position:F.value.position,hasAnnotator:F.value.buttons.annotator,isAnnotation:Z.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,tableDialog:M.value.table.useDialog,hasZoom:F.value.buttons.zoom,isZoom:U.value.showZoom,isCursorPointer:I.value,onToggleFullscreen:Vt,onGeneratePdf:w(Tt),onGenerateCsv:zt,onGenerateImage:w(on),onGenerateSvg:w(an),onToggleTable:Ht,onToggleLabels:Ut,onToggleTooltip:Wt,onToggleAnnotator:Kt,onToggleZoom:Gt,onCopyAlt:sn,style:b({visibility:w(bt)?w(z)?`visible`:`hidden`:`visible`})},je({_:2},[Ie(w(xe)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,y(_(w(Se)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.titles.isFullscreen.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.hasZoom.isZoom.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),(x(),p(`svg`,{ref_key:`svgRef`,ref:B,key:`svg_${Ct.value}`,xmlns:w(ce),viewBox:`${w(Q).x} ${w(Q).y} ${w(Q).width} ${w(Q).height}`,class:Pe({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),style:b(`overflow: hidden; background:transparent;color:${P.value.color}`)},[h(w(rt)),C(e.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:{...w(Q)},isPrintingImg:w(V)||w(H)||w(nn),isPrintingSvg:w(rn)}},void 0,!0),e.$slots[`chart-background`]?(x(),p(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):f(``,!0),m(`defs`,null,[(x(!0),p(Ae,null,Ie(Object.keys(Nt.value),(e,t)=>(x(),d(we,{t:`radial`,id:`gradient_${e}`,key:`gradient_${e}_${t}`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,w(s)(e,.5),1],[`100%`,e,1]]},null,8,[`id`,`stops`]))),128))]),h(w(it),{dataset:G.value,color:P.value.links.stroke,backgroundColor:P.value.backgroundColor,useChildColor:P.value.links.useChildColor},null,8,[`dataset`,`color`,`backgroundColor`,`useChildColor`]),h(w(ot),{dataset:G.value,hoveredUid:J.value,stroke:P.value.nodes.stroke,strokeHovered:P.value.nodes.strokeHovered,onClick:Zt,onHover:It},{node:E(({node:t})=>[C(e.$slots,`node`,y(_({node:t})),void 0,!0)]),"node-svg":E(({nodeSvg:t})=>[C(e.$slots,`node-svg`,y(_({nodeSvg:t})),void 0,!0)]),_:3},8,[`dataset`,`hoveredUid`,`stroke`,`strokeHovered`]),U.value.showDataLabels&&!w(L)?(x(),d(w(at),{key:1,dataset:G.value,color:P.value.color,hoveredUid:J.value},null,8,[`dataset`,`color`,`hoveredUid`])):f(``,!0),C(e.$slots,`svg`,{svg:{...W.value,drawingArea:{...w(Q)},isPrintingImg:w(V)||w(H)||w(nn),isPrintingSvg:w(rn)}},void 0,!0)],14,Ge)),e.$slots.watermark?(x(),p(`div`,qe,[C(e.$slots,`watermark`,y(_({isPrinting:w(V)||w(H)||w(nn)||w(rn)})),void 0,!0)])):f(``,!0),w(Yt)?(x(),p(`div`,Je,[C(e.$slots,`reset-action`,{reset:w(Jt)},()=>[m(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:b({background:P.value.backgroundColor,cursor:I.value?`pointer`:`default`}),onClick:i[0]||=e=>w(Jt)(!0)},[h(w(Qe),{name:`refresh`,stroke:P.value.color},null,8,[`stroke`])],4)],!0)])):f(``,!0),e.$slots.source?(x(),p(`div`,Ye,[C(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(w(Ze),{teleportTo:N.value.teleportTo,show:U.value.showTooltip&&k.value,backgroundColor:N.value.backgroundColor,color:N.value.color,borderRadius:N.value.borderRadius,borderColor:N.value.borderColor,borderWidth:N.value.borderWidth,fontSize:N.value.fontSize,backgroundOpacity:N.value.backgroundOpacity,position:N.value.position,offsetX:N.value.offsetX,offsetY:N.value.offsetY,parent:j.value,content:A.value,isFullscreen:X.value,isCustom:N.value.customFormat&&typeof N.value.customFormat==`function`,smooth:N.value.smooth,backdropFilter:N.value.backdropFilter,smoothForce:N.value.smoothForce,smoothSnapThreshold:N.value.smoothSnapThreshold},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,y(_({...K.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,y(_({...K.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,y(_({...K.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`]),ut.value&&F.value.buttons.table?(x(),d(Le($.value.component),Ne({key:7},$.value.props,{ref_key:`tableUnit`,ref:gt,onClose:$t}),je({content:E(()=>[(x(),d(w(et),{key:`table_${ht.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:M.value.table.useDialog?``:$.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:I.value,onClose:$t},{th:E(({th:e})=>[m(`div`,null,Re(e),1)]),td:E(({td:e})=>[Me(Re(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:E(()=>[Me(Re($.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:E(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>zt(F.value.callbacks.csv),style:b({cursor:I.value?`pointer`:`default`})},[h(w(Qe),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),C(e.$slots,`skeleton`,{},()=>[w(L)?(x(),d(fe,{key:0})):f(``,!0)],!0)],46,He))}},[[`__scopeId`,`data-v-9e920e07`]]);export{Ve as n,Xe as t};