vue-data-ui 3.28.4 → 3.28.6

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 (197) hide show
  1. package/dist/{BaseDraggableDialog-DHgIPVmz.js → BaseDraggableDialog-9d30Yx8c.js} +1 -1
  2. package/dist/{BaseIcon-Cm-IJ179.js → BaseIcon-fYK0iID8.js} +1 -1
  3. package/dist/{BaseLegendToggle-Q3TiW9u1.js → BaseLegendToggle-aT9fOoGO.js} +1 -1
  4. package/dist/{BaseZoomControls-ByS_7fmI.js → BaseZoomControls-1OdFWrHW.js} +1 -1
  5. package/dist/ColorPicker-DEJOjcmD.js +1 -0
  6. package/dist/{DataTable-0Vv-aGHD.js → DataTable-5Ug6gMAX.js} +1 -1
  7. package/dist/{HillActions-qz6J_uK7.js → HillActions-C8am4I5c.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-Do6RcwEr.js → NonSvgPenAndPaper-CawVDtNj.js} +1 -1
  9. package/dist/{PackageVersion-DhptF5oD.js → PackageVersion-u-p5bCcj.js} +1 -1
  10. package/dist/PenAndPaper-r50tK3S4.js +1 -0
  11. package/dist/{SlicerPreview-CFFUOlQr.js → SlicerPreview-DYuyE9u9.js} +1 -1
  12. package/dist/{UserOptions-uWHV_zPB.js → UserOptions-Em_JgDXM.js} +1 -1
  13. package/dist/annotationSlots-RvQBEO9-.js +1 -0
  14. package/dist/annotationViewport-X8fvs7pz.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/composables.js +1 -1
  87. package/dist/package-BdTnZDoM.js +1 -0
  88. package/dist/{render-common-DwEiRIJ0.js → render-common-CTaC-_Nw.js} +1 -1
  89. package/dist/ssr/vue-ui-donut.js +1 -1
  90. package/dist/ssr/vue-ui-xy.js +1 -1
  91. package/dist/ssr.js +1 -1
  92. package/dist/style.css +1 -1
  93. package/dist/types/composables.d.ts +51 -0
  94. package/dist/types/vue-data-ui.d.ts +77 -1
  95. package/dist/types/vue-ui-xy.d.ts +3 -0
  96. package/dist/useConfig-D3ZfFSE5.js +1 -0
  97. package/dist/{useObjectBindings-C15PEyQD.js → useObjectBindings-BCi3Az41.js} +1 -1
  98. package/dist/useParentSize-DGkyQ711.js +1 -0
  99. package/dist/utils.js +1 -1
  100. package/dist/vue-data-ui-DRkivgOZ.js +1 -0
  101. package/dist/vue-data-ui.js +1 -1
  102. package/dist/{vue-ui-3d-bar-CJTKyv3A.js → vue-ui-3d-bar-BeM22sZn.js} +2 -2
  103. package/dist/{vue-ui-accordion-S3nRtTU-.js → vue-ui-accordion-D4FHxzsL.js} +1 -1
  104. package/dist/{vue-ui-age-pyramid-6uZzf1w6.js → vue-ui-age-pyramid-BpkEVmpT.js} +1 -1
  105. package/dist/{vue-ui-annotator-DCJdieNC.js → vue-ui-annotator-DuAQovkf.js} +1 -1
  106. package/dist/{vue-ui-bullet-CsJcLhmV.js → vue-ui-bullet-Cx9Noxp_.js} +2 -2
  107. package/dist/{vue-ui-bump-DXpxBWp_.js → vue-ui-bump-DIjSKk8F.js} +2 -2
  108. package/dist/vue-ui-candlestick-Cfd63wqQ.js +22 -0
  109. package/dist/{vue-ui-carousel-table-ChNykS-r.js → vue-ui-carousel-table-CDgmtbuI.js} +1 -1
  110. package/dist/vue-ui-chestnut-24bmc5Rq.js +1 -0
  111. package/dist/{vue-ui-chord-Pp0U0-zV.js → vue-ui-chord-fQZQ9hjU.js} +3 -3
  112. package/dist/vue-ui-circle-pack-C1CbpBNe.js +13 -0
  113. package/dist/{vue-ui-cursor-3-RTIIl-.js → vue-ui-cursor-9khzj4l-.js} +1 -1
  114. package/dist/vue-ui-dag-B6QkUUCe.js +9 -0
  115. package/dist/{vue-ui-dashboard-Dlwnintv.js → vue-ui-dashboard-BBaAZBSj.js} +1 -1
  116. package/dist/{vue-ui-digits-ZMK0aBxE.js → vue-ui-digits-DdrPl8eP.js} +1 -1
  117. package/dist/{vue-ui-donut-j1bv0KyD.js → vue-ui-donut-BbJFmKZh.js} +1 -1
  118. package/dist/{vue-ui-donut-CmLo1r4-.js → vue-ui-donut-H65cwWN-.js} +2 -2
  119. package/dist/vue-ui-donut-evolution-DeHbG9Rx.js +2 -0
  120. package/dist/{vue-ui-dumbbell-DigrSGwq.js → vue-ui-dumbbell-ClCVHsrR.js} +2 -2
  121. package/dist/{vue-ui-flow-D9cc9yXD.js → vue-ui-flow-DyrpRWOP.js} +2 -2
  122. package/dist/{vue-ui-funnel-U88Hs0nL.js → vue-ui-funnel-bjH_hFeX.js} +1 -1
  123. package/dist/{vue-ui-galaxy-B1Vuz8CA.js → vue-ui-galaxy-BTgZs4Le.js} +1 -1
  124. package/dist/{vue-ui-gauge-1MgZSPXt.js → vue-ui-gauge-CXZklQPg.js} +1 -1
  125. package/dist/vue-ui-geo-0_HimFX5.js +1 -0
  126. package/dist/{vue-ui-gizmo-DtsERB-E.js → vue-ui-gizmo-kebiFGRl.js} +1 -1
  127. package/dist/{vue-ui-graph-BVTPTDl5.js → vue-ui-graph-NTeJASbv.js} +2 -2
  128. package/dist/vue-ui-heatmap-aiEMlbZm.js +1 -0
  129. package/dist/{vue-ui-hill-BvrNT8KZ.js → vue-ui-hill-ZpLv0IMP.js} +1 -1
  130. package/dist/{vue-ui-history-plot-CJIILQPt.js → vue-ui-history-plot-4xG3oQtO.js} +2 -2
  131. package/dist/vue-ui-horizontal-bar-DMyL8GM6.js +4 -0
  132. package/dist/{vue-ui-kpi-DHfExr9d.js → vue-ui-kpi-D4q8R7Uq.js} +1 -1
  133. package/dist/{vue-ui-label-B_1kM28r.js → vue-ui-label-0lSeoxvv.js} +1 -1
  134. package/dist/{vue-ui-mini-loader-Bbupx66Y.js → vue-ui-mini-loader-C6vhrfx3.js} +1 -1
  135. package/dist/vue-ui-molecule-4t84pqvx.js +1 -0
  136. package/dist/{vue-ui-mood-radar-DsnT2U65.js → vue-ui-mood-radar-BGuw0U8y.js} +1 -1
  137. package/dist/{vue-ui-nested-donuts-JkpqMhuL.js → vue-ui-nested-donuts-BTTJ6KAx.js} +2 -2
  138. package/dist/{vue-ui-onion-CIA2tlff.js → vue-ui-onion-BUbI3uaY.js} +2 -2
  139. package/dist/{vue-ui-parallel-coordinate-plot-Bcr3B3NI.js → vue-ui-parallel-coordinate-plot-Bn3Y28ZQ.js} +3 -3
  140. package/dist/{vue-ui-quadrant-DKVFawhC.js → vue-ui-quadrant-CVKEUWqI.js} +2 -2
  141. package/dist/vue-ui-quick-chart-BgH0Arb4.js +17 -0
  142. package/dist/{vue-ui-radar-CdH-BFKA.js → vue-ui-radar-Bb0u6tqk.js} +1 -1
  143. package/dist/{vue-ui-rating-ChWXrWNJ.js → vue-ui-rating-7RAJA7I4.js} +1 -1
  144. package/dist/{vue-ui-relation-circle-COZpOybS.js → vue-ui-relation-circle-Csx30ROI.js} +1 -1
  145. package/dist/{vue-ui-ridgeline-MLknaTUO.js → vue-ui-ridgeline-Ce1ZrE0B.js} +2 -2
  146. package/dist/{vue-ui-rings-ARqLCM_P.js → vue-ui-rings-DgILqhz8.js} +1 -1
  147. package/dist/{vue-ui-scatter-CX2wsXdE.js → vue-ui-scatter-CX_rE0cU.js} +2 -2
  148. package/dist/{vue-ui-skeleton-wyvAru88.js → vue-ui-skeleton-C0oElPXz.js} +1 -1
  149. package/dist/{vue-ui-smiley--VTlUAdp.js → vue-ui-smiley-BdhxsPGW.js} +1 -1
  150. package/dist/{vue-ui-spark-trend-C02PmIq_.js → vue-ui-spark-trend-CRQ5JfVc.js} +1 -1
  151. package/dist/{vue-ui-sparkbar-CjD57-Xi.js → vue-ui-sparkbar-BTclK0-F.js} +1 -1
  152. package/dist/{vue-ui-sparkgauge-8Eia8T2W.js → vue-ui-sparkgauge-zNl9Xmt3.js} +1 -1
  153. package/dist/{vue-ui-sparkhistogram-C-0f7XCl.js → vue-ui-sparkhistogram-ynyE3DOc.js} +1 -1
  154. package/dist/{vue-ui-sparkline-BMMrpUPR.js → vue-ui-sparkline-CtsijvdW.js} +1 -1
  155. package/dist/{vue-ui-sparkstackbar-BmgCVCKG.js → vue-ui-sparkstackbar-RHlqUD-0.js} +1 -1
  156. package/dist/vue-ui-stackbar-Zhl3to0r.js +29 -0
  157. package/dist/vue-ui-stackline-8JRhuHTg.js +39 -0
  158. package/dist/{vue-ui-strip-plot-DVyPa3sp.js → vue-ui-strip-plot-DL7Ulgpz.js} +2 -2
  159. package/dist/{vue-ui-table-qTF_q-Qu.js → vue-ui-table-BetuN-ZS.js} +1 -1
  160. package/dist/{vue-ui-table-heatmap-DzvPQnY9.js → vue-ui-table-heatmap-IYPQ7LMg.js} +1 -1
  161. package/dist/{vue-ui-table-sparkline-B2Q-7-GQ.js → vue-ui-table-sparkline-Fdjb-U1P.js} +1 -1
  162. package/dist/vue-ui-thermometer-6kfYImU-.js +1 -0
  163. package/dist/{vue-ui-timer-DRjoRidI.js → vue-ui-timer-BKqG5HxS.js} +2 -2
  164. package/dist/{vue-ui-tiremarks-BC_YGp3T.js → vue-ui-tiremarks-D_ps9th8.js} +1 -1
  165. package/dist/vue-ui-treemap-BfOdhGl7.js +1 -0
  166. package/dist/{vue-ui-waffle-BiJshI4O.js → vue-ui-waffle-BL0zzw6B.js} +1 -1
  167. package/dist/vue-ui-wheel-v1o2eN3I.js +1 -0
  168. package/dist/vue-ui-word-cloud-HUnuPCyQ.js +4 -0
  169. package/dist/{vue-ui-world-CJgt0ESz.js → vue-ui-world-BagJihbJ.js} +2 -2
  170. package/dist/vue-ui-xy-D948j7de.js +24 -0
  171. package/dist/{vue-ui-xy-DrKVPSg7.js → vue-ui-xy-Y_rIBQj0.js} +1 -1
  172. package/dist/{vue-ui-xy-canvas-Do4P4ajB.js → vue-ui-xy-canvas-CjrbWdJJ.js} +1 -1
  173. package/package.json +1 -1
  174. package/dist/ColorPicker-Dmus34hN.js +0 -1
  175. package/dist/PenAndPaper-BGEp-TUm.js +0 -1
  176. package/dist/annotationSlots-BRR85CqJ.js +0 -1
  177. package/dist/package-CX7pZToh.js +0 -1
  178. package/dist/useConfig-6jO1fkp5.js +0 -1
  179. package/dist/useTooltipPosition-aoV8pZZ9.js +0 -1
  180. package/dist/vue-data-ui-CORn0LF6.js +0 -1
  181. package/dist/vue-ui-candlestick-Bn_RSZ0k.js +0 -22
  182. package/dist/vue-ui-chestnut-DMYQTkxM.js +0 -1
  183. package/dist/vue-ui-circle-pack-We23fOaF.js +0 -13
  184. package/dist/vue-ui-dag-5fVnwEXd.js +0 -9
  185. package/dist/vue-ui-donut-evolution-CYvo7Cww.js +0 -2
  186. package/dist/vue-ui-geo-BV8ARcaX.js +0 -1
  187. package/dist/vue-ui-heatmap-6YwaVr3F.js +0 -1
  188. package/dist/vue-ui-horizontal-bar-Dfo-kTqg.js +0 -4
  189. package/dist/vue-ui-molecule-C8e5IeHG.js +0 -1
  190. package/dist/vue-ui-quick-chart-Bk2N8Hmd.js +0 -17
  191. package/dist/vue-ui-stackbar-G_zZRAa9.js +0 -29
  192. package/dist/vue-ui-stackline-DchZoEAg.js +0 -39
  193. package/dist/vue-ui-thermometer-CxNoxslq.js +0 -1
  194. package/dist/vue-ui-treemap-CNM5ohoO.js +0 -1
  195. package/dist/vue-ui-wheel-BxR0_iNZ.js +0 -1
  196. package/dist/vue-ui-word-cloud-CZzC3R1K.js +0 -4
  197. package/dist/vue-ui-xy-B6XNUCzQ.js +0 -24
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ft as r,It as i,X as a,Yt as o,at as s,b as c,i as l,in as u,t as d,zt as f}from"./lib-rPeBMZrn.js";import{n as p,t as m}from"./BaseScanner-8NdoBs7B.js";import{n as h,t as g}from"./useHints-C-TwxM0Y.js";import{t as _}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as v}from"./resolveChartConfig-CIhClE5R.js";import{t as y}from"./chartImage-DPGnEuYM.js";import{n as b}from"./Title-BliHuXfT.js";import{t as x}from"./useChartExport-BZts4KFb.js";import{n as ee,t as te}from"./annotationSlots-BRR85CqJ.js";import{n as S,t as ne}from"./userOptionsSlots-DYuo-E5m.js";import{t as re}from"./usePrinter-DVf3YcG5.js";import{c as ie}from"./canvas-lib-22VpOI4_.js";import{t as ae}from"./useResponsive-CENUxfEL.js";import{t as oe}from"./useUserOptionState-CXlFnwPv.js";import{t as se}from"./useChartAccessibility-DOMuYJfm.js";import{t as ce}from"./usePrefersMotion-XLHwega2.js";import{t as le}from"./vue_ui_wheel-C-479bvJ.js";import{Fragment as C,computed as w,createBlock as T,createCommentVNode as E,createElementBlock as D,createElementVNode as ue,createSlots as de,createVNode as fe,defineAsyncComponent as pe,guardReactiveProps as me,normalizeClass as O,normalizeProps as he,normalizeStyle as ge,onBeforeUnmount as _e,onMounted as ve,openBlock as k,ref as A,renderList as j,renderSlot as M,shallowRef as ye,toDisplayString as be,toRefs as xe,unref as N,useCssVars as Se,watch as Ce,withCtx as we}from"vue";var Te=/* @__PURE__ */ e({default:()=>Ke}),Ee=[`id`],De=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Oe=[`id`],ke=[`id`],Ae=[`x`,`y`,`width`,`height`],je=[`d`,`stroke`,`stroke-width`],Me=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Ne={key:0},Pe=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-linecap`],Fe=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-linecap`],Ie={key:1},Le=[`d`,`fill`,`stroke`,`stroke-width`],Re=[`d`,`fill`,`stroke`,`stroke-width`],ze=[`d`,`fill`,`stroke`,`stroke-width`],Be=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-linecap`],Ve=[`d`,`fill`,`stroke`,`stroke-width`],He=[`aria-label`],Ue=[`x`,`y`,`height`],We=[`x`,`y`,`font-size`,`fill`,`font-weight`,`stroke`,`stroke-width`],Ge={key:4,class:`vue-data-ui-watermark`},Ke=/*#__PURE__*/ _({__name:`vue-ui-wheel`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:_,emit:Te}){Se(e=>({v230c4a60:zt.value,baeed874:Bt.value,baef134e:Vt.value}));let Ke=pe(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),qe=pe(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Je=pe(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),{vue_ui_wheel:Ye}=t(),P=ce(),F=e,Xe=Te,Ze=w(()=>!!F.dataset&&Object.keys(F.dataset).length),I=A(a()),Qe=A(null),$e=A(0),L=A(null),et=A(null),tt=A(null),nt=A(null),rt=A(0),R=A(dt()),z=w(()=>R.value.userOptions),B=w(()=>R.value.style.chart.layout.wheel.ticks),V=w(()=>R.value.style.chart.layout.wheel),H=w(()=>R.value.style.chart);h({config:()=>R.value,dataset:()=>F.dataset,component:`VueUiWheel`,rules:[g.noHint]});let it=w(()=>R.value.userOptions.useCursorPointer),at=w(()=>u({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,animation:{use:!1},layout:{wheel:{ticks:{activeColor:`#6A6A6A80`,inactiveColor:`#CACACA80`}},innerCircle:{stroke:`#CACACA80`}}}}},userConfig:R.value.skeletonConfig??{}})),{loading:ot,FINAL_DATASET:U}=p({...xe(F),FINAL_CONFIG:R,prepareConfig:dt,skeletonDataset:F.config?.skeletonDataset??{percentage:50},skeletonConfig:u({defaultConfig:R.value,userConfig:at.value})}),{userOptionsVisible:st,setUserOptionsVisibility:ct,keepUserOptionState:lt}=oe({config:R.value}),{svgRef:ut}=se({config:H.value.title});function dt(){return v(F.config,Ye,le)}Ce(()=>F.config,e=>{R.value=dt(),st.value=!R.value.userOptions.showOnChartHover,yt(),rt.value+=1},{deep:!0});let{isPrinting:ft,isImaging:pt,generatePdf:mt,generateImage:ht}=re({elementId:I.value,fileName:H.value.title.text||`vue-ui-wheel`,options:R.value.userOptions.print}),gt=w(()=>R.value.userOptions.show&&!H.value.title.text),W=A({size:360,height:360,width:360}),G=A(H.value.layout.percentage.fontSize),K=w(()=>({radius:Math.min(W.value.width,W.value.height)*.9/2*V.value.radiusRatio,centerX:W.value.width/2,centerY:W.value.height/2}));function _t(e,t=1){let n=29.85;return{x:K.value.centerX+K.value.radius*Math.cos(n+e*Math.PI/180)*t,y:K.value.centerY+K.value.radius*Math.sin(n+e*Math.PI/180)*t}}let q=A(H.value.animation.use&&!P.value?0:U.value.percentage||0);Ce(()=>U.value,e=>{H.value.animation.use&&!P.value?jt(e.percentage):q.value=e.percentage||0},{deep:!0});let J=ye(null),Y=ye(null);ve(()=>{yt()});let vt=w(()=>R.value.debug);function yt(){if(f(F.dataset)&&s({componentName:`VueUiWheel`,type:`dataset`,debug:vt.value}),R.value.responsive){let e=ie(()=>{let{width:e,height:t}=ae({chart:L.value,title:H.value.title.text?et.value:null,source:tt.value,noTitle:nt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,G.value=H.value.layout.percentage.fontSize/360*Math.min(e,t)})});J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect()),J.value=new ResizeObserver(e),Y.value=L.value.parentNode,J.value.observe(Y.value)}jt(U.value.percentage||0),H.value.animation.use&&!P.value||(q.value=U.value.percentage||0)}_e(()=>{J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect())});function bt([e,t,n],r){let i=Math.cos(r),a=Math.sin(r);return[e,t*i-n*a,t*a+n*i]}function xt([e,t,n],r){let i=r/(r-n);return[e*i,t*i,n,i]}function St(e,t){let n=e.replace(`#`,``),r=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),a=parseInt(n.substring(4,6),16),o=1-Math.min(1,Math.max(0,B.value.shadeColorRatio3d))*t,s=Math.max(0,Math.min(255,Math.round(r*o))),c=Math.max(0,Math.min(255,Math.round(i*o))),l=Math.max(0,Math.min(255,Math.round(a*o)));return`#${s.toString(16).padStart(2,`0`)}${c.toString(16).padStart(2,`0`)}${l.toString(16).padStart(2,`0`)}`}function Ct({cx:e,cy:t,radius:n,innerRatio:r=.8,count:i=120,startDeg:a=0,axDeg:s=50,f:c=520,baseStroke:l=5,activeColor:u,inactiveColor:d,getActive:f}){let p=s*Math.PI/180,m=n,h=n*r,g=[];for(let n=0;n<i;n+=1){let r=(n/i*360+a)*Math.PI/180,s=e+m*Math.cos(r),_=t+m*Math.sin(r),v=e+h*Math.cos(r),y=t+h*Math.sin(r),b=[s-e,_-t,0],x=[v-e,y-t,0],[ee,te,S]=bt(b,p),[ne,re,ie]=bt(x,p),[ae,oe,,se]=xt([ee,te,S],c),[ce,le,,C]=xt([ne,re,ie],c),w=e+ae,T=t+oe,E=e+ce,D=t+le,ue=(Math.max(S,ie)- -m*Math.sin(p))/(2*m*Math.sin(p)||1),de=!f||f(n),fe=B.value.gradient.show?o(u,n*Q.value/Z.value*(B.value.gradient.shiftHueIntensity/100)):u,pe=St(de?fe:d,ue),me=Math.max(1.25,l*se*(Math.min(W.value.width,W.value.height)/360));g.push({i:n,x1:w,y1:T,x2:E,y2:D,stroke:me,color:pe,z:Math.max(S,ie)})}return g.sort((e,t)=>e.z-t.z),g}let wt=w(()=>{if(!R.value.layout===`3d`)return null;let e=Z.value,t=B.value.gradient.show?o(B.value.activeColor,0):B.value.activeColor,n=B.value.inactiveColor,r=B.value.strokeWidth;return Ct({cx:K.value.centerX,cy:K.value.centerY,radius:K.value.radius,innerRatio:B.value.sizeRatio,count:e,startDeg:-90,axDeg:V.value.tiltAngle3d,f:Math.min(W.value.width,W.value.height)*1.45,baseStroke:r,activeColor:t,inactiveColor:n,getActive:e=>q.value>e*Q.value})});function Tt({cx:e,cy:t,r:n,count:r=180,startDeg:i=-90,axDeg:a=50,f:o}){let s=a*Math.PI/180,c=[],l=0;for(let a=0;a<r;a+=1){let u=(a/r*360+i)*Math.PI/180,[d,f,p]=bt([n*Math.cos(u),n*Math.sin(u),0],s),[m,h,,g]=xt([d,f,p],o);l+=g,c.push([e+m,t+h])}let u=`M ${c[0][0]} ${c[0][1]}`;for(let e=1;e<c.length;e+=1)u+=` L ${c[e][0]} ${c[e][1]}`;u+=` Z`;let d=l/r;return{d:u,avgScale:d,pts:c}}let X=w(()=>{if(R.value.layout!==`3d`)return null;let e=Math.min(W.value.width,W.value.height)*1.45,t=V.value.tiltAngle3d,n=K.value.radius,{pts:r,avgScale:i}=(()=>{let r=n,i=t,{d:a,avgScale:o,pts:s}=Tt({cx:K.value.centerX,cy:K.value.centerY,r,startDeg:-90,axDeg:i,f:e});return{pts:s,avgScale:o}})(),a=1/0,o=1/0,s=-1/0,c=-1/0;for(let[e,t]of r)e<a&&(a=e),t<o&&(o=t),e>s&&(s=e),t>c&&(c=t);let l=B.value.strokeWidth/360*Math.min(W.value.width,W.value.height),u=H.value.layout.innerCircle.strokeWidth||0,d=.5*Math.max(l,u*(i||1)),f=Math.max(0,Number(B.value.depth3d)||0),p=d;return{x:a-p,y:o-f-p,w:s-a+2*p,h:c-(o-f)+2*p}});function Et(e){let t=Math.min(W.value.width,W.value.height)*1.45,{d:n,avgScale:r}=Tt({cx:K.value.centerX,cy:K.value.centerY,r:e,startDeg:-90,axDeg:V.value.tiltAngle3d,f:t}),i=(H.value.layout.innerCircle.strokeWidth||1)*r;return{d:n,stroke:H.value.layout.innerCircle.stroke,strokeWidth:i}}let Dt=w(()=>Et(Math.max(0,K.value.radius*.8*H.value.layout.innerCircle.radiusRatio)));function Ot({cx:e,cy:t,r:n,aRad:r,ax:i,f:a}){let[o,s,c]=bt([n*Math.cos(r),n*Math.sin(r),0],i),[l,u,,d]=xt([o,s,c],a);return{x:e+l,y:t+u,z:c,s:d}}function kt({cx:e,cy:t,radius:n,innerRatio:r=.8,count:i=120,startDeg:a=-87,axDeg:s=45,f:c=600,activeColor:l,inactiveColor:u,getActive:d,Y:f=0}){let p=s*Math.PI/180,m=n,h=n*r,g=2*Math.PI/i,_=[];for(let n=0;n<i;n+=1){let r=a*Math.PI/180+g*n,s=r+g*Math.min(1,B.value.spacingRatio3d),v=Ot({cx:e,cy:t+f,r:m,aRad:r,ax:p,f:c}),y=Ot({cx:e,cy:t+f,r:m,aRad:s,ax:p,f:c}),b=Ot({cx:e,cy:t+f,r:h,aRad:s,ax:p,f:c}),x=Ot({cx:e,cy:t+f,r:h,aRad:r,ax:p,f:c}),ee=(v.z+y.z+x.z+b.z)/4,te=St(!d||d(n)?B.value.gradient.show?o(B.value.activeColor,100/i*n/100*(B.value.gradient.shiftHueIntensity/100)):l:u,(()=>{let e=m*Math.sin(p)||1;return(ee- -e)/(2*e)})()),S=`M ${v.x} ${v.y} L ${y.x} ${y.y} L ${b.x} ${b.y} L ${x.x} ${x.y} Z`;_.push({i:n,d:S,fill:te,z:ee})}return _.sort((e,t)=>e.z-t.z),_}let At=w(()=>{if(R.value.layout!==`3d`)return null;let e=Z.value;return t=>kt({cx:K.value.centerX,cy:K.value.centerY,radius:K.value.radius,innerRatio:B.value.sizeRatio,count:e,startDeg:-90,axDeg:V.value.tiltAngle3d,f:Math.min(W.value.width,W.value.height)*1.45,activeColor:B.value.activeColor,inactiveColor:B.value.inactiveColor,getActive:t=>q.value>100/e*t,Y:t})});function jt(e){let t=H.value.animation.speed,n=Math.abs(e-q.value)/(t*120);function r(){q.value<e?q.value=Math.min(q.value+n,e):q.value>e&&(q.value=Math.max(q.value-n,e)),q.value!==e&&requestAnimationFrame(r)}r()}let Z=w(()=>(vt.value&&B.value.quantity<12&&console.warn(`VueUiWheel - The min number of ticks is 12`),vt.value&&B.value.quantity>200&&console.warn(`VueUiWheel - The max number of ticks is 200`),Math.max(12,Math.min(B.value.quantity,200)))),Q=w(()=>100/Z.value),Mt=w(()=>{let e=[];for(let t=0;t<Z.value;t+=1){let n=q.value>t*Q.value?B.value.activeColor:B.value.inactiveColor,{x:r,y:i}=_t(W.value.size/Z.value*t),{x:a,y:s}=_t(W.value.size/Z.value*t,B.value.sizeRatio);e.push({x1:r,y1:i,x2:a,y2:s,color:B.value.gradient.show?o(n,t*Q.value/Z.value*(B.value.gradient.shiftHueIntensity/100)):n})}return e}),Nt=w(()=>i({series:Mt.value.map(e=>({name:``,value:1,color:e.color}))},K.value.centerX,K.value.centerY,K.value.radius,K.value.radius,1.99999,2,1,360,105.25,K.value.radius*(1-B.value.sizeRatio))),Pt=A(!1);function Ft(e){Pt.value=e,$e.value+=1}let It=A(!1);function Lt(){It.value=!It.value}let Rt=y(L,()=>H.value.title.text),zt=w(()=>B.value.strokeWidth*2),Bt=w(()=>B.value.strokeWidth*2*.75),Vt=w(()=>B.value.strokeWidth),$=w(()=>Math.max(1,Math.min(20,B.value.depth3d))),Ht=w(()=>H.value.backgroundColor),Ut=w(()=>H.value.title),{isCallbackImaging:Wt,isCallbackSvg:Gt,generateSvg:Kt,onGenerateImage:qt}=x({svg:ut,title:Ut,legend:null,legendItems:null,backgroundColor:Ht,stretchTitle:!0,getSvgCallback:()=>R.value.userOptions.callbacks.svg,generateImage:ht});async function Jt(){Xe(`copyAlt`,{config:R.value,dataset:U.value}),R.value.userOptions.callbacks.altCopy?await Promise.resolve(R.value.userOptions.callbacks.altCopy({config:R.value,dataset:U.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Yt=w(()=>`${I.value}-title`),Xt=w(()=>`${I.value}-desc`),Zt=w(()=>l(H.value.layout.percentage.formatter,c(q.value),n({v:c(q.value),s:`%`,r:H.value.layout.percentage.rounding}))),Qt=w(()=>H.value.title.text||``),$t=w(()=>ot.value?`...`:`${Zt.value}`);return _({getImage:Rt,generatePdf:mt,generateImage:ht,generateSvg:Kt,toggleAnnotator:Lt,toggleFullscreen:Ft,copyAlt:Jt}),(e,t)=>(k(),D(`div`,{class:O([`vue-ui-wheel`,{"vue-data-ui-component":!0,"vue-ui-wheel-3d-wrap":R.value.layout===`3d`}]),ref_key:`wheelChart`,ref:L,id:I.value,style:ge(`font-family:${R.value.style.fontFamily};width:100%; text-align:center;background:${H.value.backgroundColor};${R.value.responsive?`height:100%`:``}`),onMouseenter:t[0]||=()=>N(ct)(!0),onMouseleave:t[1]||=()=>N(ct)(!1)},[z.value.buttons.annotator?(k(),T(N(Ke),{key:0,svgRef:N(ut),backgroundColor:H.value.backgroundColor,color:H.value.color,active:It.value,isCursorPointer:it.value,palette:z.value.annotatorPalette,onClose:Lt},de({_:2},[j(N(te),t=>({name:t,fn:we(n=>[M(e.$slots,t,he(me(N(ee)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):E(``,!0),gt.value?(k(),D(`div`,{key:1,ref_key:`noTitle`,ref:nt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):E(``,!0),H.value.title.text?(k(),D(`div`,{key:2,ref_key:`chartTitle`,ref:et,style:`width:100%;background:transparent;padding-bottom:12px`},[(k(),T(b,{key:`title_${rt.value}`,config:{title:{cy:`wheel-title`,...H.value.title},subtitle:{cy:`wheel-subtitle`,...H.value.title.subtitle}}},null,8,[`config`]))],512)):E(``,!0),z.value.show&&Ze.value&&(N(lt)||N(st))?(k(),T(N(qe),{ref_key:`details`,ref:Qe,key:`user_options_${$e.value}`,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:N(ft),isImaging:N(pt),uid:I.value,hasPdf:z.value.buttons.pdf,hasImg:z.value.buttons.img,hasSvg:z.value.buttons.svg,hasFullscreen:z.value.buttons.fullscreen,hasAltCopy:z.value.buttons.altCopy,hasXls:!1,isFullscreen:Pt.value,position:z.value.position,titles:{...z.value.buttonTitles},hasAnnotator:z.value.buttons.annotator,isAnnotation:It.value,chartElement:L.value,callbacks:z.value.callbacks,printScale:z.value.print.scale,isCursorPointer:it.value,onToggleFullscreen:Ft,onGeneratePdf:N(mt),onGenerateImage:N(qt),onGenerateSvg:N(Kt),onToggleAnnotator:Lt,onCopyAlt:Jt,style:ge({visibility:N(lt)?N(st)?`visible`:`hidden`:`visible`})},de({_:2},[j(N(S)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:we(n=>[M(e.$slots,t,he(me(N(ne)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`position`,`titles`,`hasAnnotator`,`isAnnotation`,`chartElement`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):E(``,!0),(k(),D(`svg`,{ref_key:`svgRef`,ref:ut,xmlns:N(d),class:O({"vue-data-ui-fullscreen--on":Pt.value,"vue-data-ui-fulscreen--off":!Pt.value,"vue-ui-wheel-3d-svg":R.value.layout===`3d`}),viewBox:R.value.layout===`3d`&&!R.value.responsive?`${X.value?.x-10} ${X.value?.y??0} ${X.value?.w+20??Math.max(10,W.value.width)} ${X.value?.h??Math.max(10,W.value.height)}`:`0 0 ${Math.max(10,W.value.width)} ${Math.max(10,W.value.height)}`,style:ge(`max-width:100%;overflow:visible;background:transparent;color:${H.value.color}`),role:`img`,"aria-labelledby":Yt.value,"aria-describedby":Xt.value},[ue(`title`,{id:Yt.value},be(Qt.value),9,Oe),ue(`desc`,{id:Xt.value},be($t.value),9,ke),fe(N(Je)),M(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:N(ft)||N(pt)||N(Wt),isPrintingSvg:N(Gt)}},void 0,!0),e.$slots[`chart-background`]?(k(),D(`foreignObject`,{key:0,x:R.value.layout===`3d`&&!R.value.responsive?X.value?.x-10:0,y:R.value.layout===`3d`&&!R.value.responsive?X.value?.y??0:0,width:R.value.layout===`3d`&&!R.value.responsive?X.value?.w+20??Math.max(10,W.value.width):Math.max(10,W.value.width),height:R.value.layout===`3d`&&!R.value.responsive?X.value?.h??Math.max(10,W.value.height):Math.max(10,W.value.height),style:{pointerEvents:`none`}},[M(e.$slots,`chart-background`,{},void 0,!0)],8,Ae)):E(``,!0),R.value.layout===`3d`&&Dt.value?(k(),D(`path`,{key:1,class:`vue-ui-wheel-inner-circle`,d:Dt.value.d,stroke:H.value.layout.innerCircle.stroke,"stroke-width":H.value.layout.innerCircle.strokeWidth,fill:`none`},null,8,je)):H.value.layout.innerCircle.show?(k(),D(`circle`,{key:2,class:`vue-ui-wheel-inner-circle`,cx:K.value.centerX,cy:K.value.centerY,r:Math.max(0,K.value.radius*H.value.layout.innerCircle.radiusRatio*.8),stroke:H.value.layout.innerCircle.stroke,"stroke-width":H.value.layout.innerCircle.strokeWidth,fill:`none`},null,8,Me)):E(``,!0),R.value.layout===`3d`?(k(),D(C,{key:3},[B.value.type===`classic`?(k(),D(`g`,Ne,[(k(!0),D(C,null,j($.value,e=>(k(),D(`g`,null,[(k(!0),D(C,null,j(wt.value||[],t=>(k(),D(`line`,{key:t.i,x1:t.x1,y1:t.y1-e,x2:t.x2,y2:t.y2-e,stroke:N(r)(t.color,.25*e/5),"stroke-width":B.value.strokeWidth/360*Math.min(W.value.width,W.value.height),"stroke-linecap":B.value.rounded?`round`:`butt`,class:O({"vue-ui-wheel-tick":!0,"vue-ui-tick-animated":H.value.animation.use&&!N(P)&&t.i*Q.value<=q.value})},null,10,Pe))),128))]))),256)),(k(!0),D(C,null,j(wt.value||[],e=>(k(),D(`line`,{key:e.i,x1:e.x1,y1:e.y1-$.value,x2:e.x2,y2:e.y2-$.value,stroke:e.color,"stroke-width":B.value.strokeWidth/360*Math.min(W.value.width,W.value.height),"stroke-linecap":B.value.rounded?`round`:`butt`,class:O({"vue-ui-wheel-tick":!0,"vue-ui-tick-animated":H.value.animation.use&&!N(P)&&e.i*Q.value<=q.value})},null,10,Fe))),128))])):(k(),D(`g`,Ie,[(k(!0),D(C,null,j($.value,e=>(k(),D(`g`,null,[(k(!0),D(C,null,j(At.value(-e)||[],e=>(k(),D(`path`,{key:e.i,d:e.d,fill:B.value.inactiveColor,stroke:B.value.stroke,"stroke-width":B.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`vue-ui-wheel-tick`},null,8,Le))),128)),(k(!0),D(C,null,j(At.value(-e)||[],t=>(k(),D(`path`,{key:t.i,d:t.d,fill:N(r)(t.fill,.5*e/$.value),stroke:B.value.stroke,"stroke-width":B.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:O({"vue-ui-wheel-tick":!0,"vue-ui-tick-animated-3d":H.value.animation.use&&!N(P)&&t.i*Q.value<=q.value})},null,10,Re))),128))]))),256)),ue(`g`,null,[(k(!0),D(C,null,j(At.value(-$.value)||[],e=>(k(),D(`path`,{key:e.i,d:e.d,fill:e.fill,stroke:B.value.stroke,"stroke-width":B.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:O({"vue-ui-wheel-tick":!0,"vue-ui-tick-animated-3d":H.value.animation.use&&!N(P)&&e.i*Q.value<=q.value})},null,10,ze))),128))])]))],64)):(k(),D(C,{key:4},[B.value.type===`classic`?(k(!0),D(C,{key:0},j(Mt.value,(e,t)=>(k(),D(`line`,{x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,stroke:e.color,"stroke-width":B.value.strokeWidth/360*Math.min(W.value.width,W.value.height),"stroke-linecap":B.value.rounded?`round`:`butt`,class:O({"vue-ui-wheel-tick":!0,"vue-ui-tick-animated":H.value.animation.use&&!N(P)&&t*Q.value<=q.value})},null,10,Be))),256)):(k(!0),D(C,{key:1},j(Nt.value,(e,t)=>(k(),D(`path`,{d:e.arcSlice,fill:e.color,class:O({"vue-ui-wheel-tick":!0,"vue-ui-tick-animated":H.value.animation.use&&!N(P)&&t*Q.value<=q.value}),stroke:B.value.stroke,"stroke-width":B.value.strokeWidth},null,10,Ve))),256))],64)),H.value.layout.percentage.show?(k(),D(`g`,{key:5,role:`status`,"aria-live":`polite`,"aria-label":N(ot)?`...`:Zt.value},[N(ot)?(k(),D(`rect`,{key:0,x:K.value.centerX-40,y:K.value.centerY-G.value/2,width:80,height:G.value,fill:`#6A6A6A80`,rx:`3`},null,8,Ue)):(k(),D(`text`,{key:1,"aria-hidden":`true`,x:K.value.centerX+H.value.layout.percentage.offsetX,y:K.value.centerY+G.value/3+H.value.layout.percentage.offsetY,"font-size":G.value,fill:B.value.gradient.show?N(o)(B.value.activeColor,q.value/100*(B.value.gradient.shiftHueIntensity/100)):B.value.activeColor,"text-anchor":`middle`,"font-weight":H.value.layout.percentage.bold?`bold`:`normal`,style:{"font-variant-numeric":`tabluar-nums`},stroke:H.value.layout.percentage.stroke,"stroke-width":H.value.layout.percentage.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,class:O({"vue-ui-wheel-label":R.value.layout===`3d`})},be(Zt.value),11,We))],8,He)):E(``,!0),M(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:N(ft)||N(pt)||N(Wt),isPrintingSvg:N(Gt)}},void 0,!0)],14,De)),e.$slots.watermark?(k(),D(`div`,Ge,[M(e.$slots,`watermark`,he(me({isPrinting:N(ft)||N(pt)||N(Wt)||N(Gt)})),void 0,!0)])):E(``,!0),e.$slots.source?(k(),D(`div`,{key:5,ref_key:`source`,ref:tt,dir:`auto`},[M(e.$slots,`source`,{},void 0,!0)],512)):E(``,!0),M(e.$slots,`skeleton`,{},()=>[N(ot)?(k(),T(m,{key:0})):E(``,!0)],!0)],46,Ee))}},[[`__scopeId`,`data-v-ec0d9e1d`]]);export{Te as n,Ke as t};
@@ -1,4 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Dt as i,Ht as a,S as o,X as s,Z as c,Zt as l,at as u,b as d,in as f,nt as p,t as m,yt as h,zt as g}from"./lib-rPeBMZrn.js";import{n as _,t as v}from"./BaseScanner-8NdoBs7B.js";import{n as y,t as ee}from"./useHints-C-TwxM0Y.js";import{t as te}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as b}from"./resolveChartConfig-CIhClE5R.js";import{t as x}from"./chartImage-DPGnEuYM.js";import{t as S}from"./BaseZoomControls-ByS_7fmI.js";import{n as C}from"./Title-BliHuXfT.js";import{t as w}from"./useChartExport-BZts4KFb.js";import{n as T,t as ne}from"./tableIntegration-CNoJ1CIY.js";import{n as re,t as ie}from"./annotationSlots-BRR85CqJ.js";import{n as E,t as ae}from"./userOptionsSlots-DYuo-E5m.js";import{t as oe}from"./usePrinter-DVf3YcG5.js";import{r as se}from"./canvas-lib-22VpOI4_.js";import{t as ce}from"./useResponsive-CENUxfEL.js";import{t as le}from"./A11yDataTable-DWNlWXzs.js";import{t as ue}from"./useUserOptionState-CXlFnwPv.js";import{t as de}from"./useChartAccessibility-DOMuYJfm.js";import{t as fe}from"./usePanZoom-BdjP5Suc.js";import{t as pe}from"./vue_ui_word_cloud-DBiJtSyL.js";import{Fragment as me,computed as D,createBlock as O,createCommentVNode as k,createElementBlock as A,createElementVNode as he,createSlots as ge,createTextVNode as _e,createVNode as ve,defineAsyncComponent as j,guardReactiveProps as M,mergeProps as ye,nextTick as be,normalizeClass as xe,normalizeProps as N,normalizeStyle as Se,onBeforeUnmount as Ce,onMounted as we,openBlock as P,ref as F,renderList as Te,renderSlot as I,resolveDynamicComponent as Ee,shallowRef as De,toDisplayString as Oe,toRefs as ke,unref as L,watch as Ae,withCtx as R}from"vue";var je={fast:{spiralStep:6,fallbackSpiralStep:2,spiralRadiusStep:2,fallbackSpiralRadiusStep:1,primaryAttempts:1e4,fallbackAttempts:25e3,minimumVisualPadding:2,scaleStep:.9},balanced:{spiralStep:4,fallbackSpiralStep:1,spiralRadiusStep:1.5,fallbackSpiralRadiusStep:1,primaryAttempts:2e4,fallbackAttempts:5e4,minimumVisualPadding:3,scaleStep:.92},precise:{spiralStep:2,fallbackSpiralStep:1,spiralRadiusStep:1,fallbackSpiralRadiusStep:.75,primaryAttempts:5e4,fallbackAttempts:1e5,minimumVisualPadding:4,scaleStep:.95}},Me=`fast`;function Ne(e){return je[e]||je[Me]}var Pe=/* @__PURE__ */ new Map;function Fe(e){let t=String(e),n=Pe.get(t);if(n)return n;let r=Math.PI/180,i=[],a=[];for(let t=0;t<360;t+=e){let e=t*r;i.push(Math.cos(e)),a.push(Math.sin(e))}let o={cosineArray:i,sineArray:a};return Pe.set(t,o),o}function Ie({word:e,fontSize:t,pad:n,canvas:r,ctx:i,svg:a}){let o=a.style&&a.style.bold,s=a.style&&a.style.fontFamily||`Arial, "Noto Sans Arabic", Tahoma, sans-serif`,c=`${o?`bold `:``}${t}px ${s}`,l=String(e.name||``),u=/[\u0600-\u06FF]/.test(l);i.font=c,i.direction=u?`rtl`:`ltr`,i.textAlign=`left`,i.textBaseline=`alphabetic`;let d=i.measureText(l),f=Math.ceil(Math.abs(d.actualBoundingBoxLeft||0)),p=Math.ceil(Math.abs(d.actualBoundingBoxRight||d.width)),m=Math.ceil(d.actualBoundingBoxAscent||t),h=Math.ceil(d.actualBoundingBoxDescent||t*.25),g=Math.max(0,Math.round(n||0))+Math.ceil(t*(u?.22:.12)),_=Math.max(1,f+p+g*2),v=Math.max(1,m+h+g*2);r.width=_,r.height=v,i.font=c,i.direction=u?`rtl`:`ltr`,i.textAlign=`left`,i.textBaseline=`alphabetic`,i.fillStyle=`black`;let y=g+f,ee=g+m;i.fillText(l,y,ee);let te=i.getImageData(0,0,_,v).data,b=[],x=[],S=_,C=v,w=0,T=0,ne=!1;for(let e=0;e<v;e+=1){let t=e*_*4,n=-1,r=!1;for(let i=0;i<_;i+=1)te[t+i*4+3]>1?(b.push([i,e]),ne=!0,i<S&&(S=i),i>w&&(w=i),e<C&&(C=e),e>T&&(T=e),r||(r=!0,n=i)):r&&(x.push([e,n,i-1]),r=!1,n=-1);r&&x.push([e,n,_-1])}return ne||(S=0,C=0,w=0,T=0),{w:_,h:v,wordMask:b,runs:x,minX:S,minY:C,maxX:w,maxY:T}}function Le(e){let t=[];if(!e.length)return t;let n=e[0][1],r=e[0][0],i=r;for(let a=1;a<e.length;a+=1){let o=e[a][0],s=e[a][1];s===n?(o===i+1||(t.push([n,r,i]),r=o),i=o):(t.push([n,r,i]),n=s,r=o,i=o)}return t.push([n,r,i]),t}function Re(e,t){return 4294967295>>>32-(t-e+1)<<e>>>0}function ze(e){return 4294967295<<e>>>0}function Be(e){return 4294967295>>>31-e>>>0}function z({maskBits:e,maskRowStride:t,maskW:n,maskH:r,wx:i,wy:a,runs:o}){for(let s=0;s<o.length;s+=1){let c=o[s][0],l=o[s][1],u=o[s][2],d=a+c;if(d<0||d>=r)return!1;let f=i+l,p=i+u;if(f<0||p>=n)return!1;let m=d*t,h=f>>>5,g=p>>>5,_=f&31,v=p&31;if(h===g){if(e[m+h]&Re(_,v))return!1}else{if(e[m+h]&ze(_))return!1;for(let t=h+1;t<g;t+=1)if(e[m+t])return!1;if(e[m+g]&Be(v))return!1}}return!0}function Ve({maskBits:e,maskRowStride:t,maskW:n,maskH:r,wx:i,wy:a,runs:o}){for(let s=0;s<o.length;s+=1){let c=o[s][0],l=o[s][1],u=o[s][2],d=a+c;if(d<0||d>=r)continue;let f=i+l,p=i+u;if(p<0||f>=n)continue;let m=d*t,h=f>>>5,g=p>>>5,_=f&31,v=p&31;if(h===g){let t=Re(_,v);e[m+h]|=t}else{{let t=ze(_);e[m+h]|=t}for(let t=h+1;t<g;t+=1)e[m+t]=4294967295;{let t=Be(v);e[m+g]|=t}}}}function He({wordMask:e,w:t,h:n,dilation:r}){let i=new Uint8Array(t*n),a=[];for(let n=0;n<e.length;n+=1){let r=e[n][0],o=e[n][1]*t+r;i[o]||(i[o]=1,a.push(o))}for(let e=0;e<a.length;e+=1){let o=a[e],s=o/t|0,c=o-s*t;for(let e=-r;e<=r;e+=1){let a=s+e;if(a<0||a>=n)continue;let o=a*t;for(let n=-r;n<=r;n+=1){if(n===0&&e===0)continue;let r=c+n;r<0||r>=t||(i[o+r]=1)}}}let o=[];for(let e=0;e<i.length;e+=1)if(i[e]){let n=e/t|0,r=e-n*t;o.push([r,n])}return o}function B(e,t){let n=[];for(let r=0;r<t;r+=1){let t=e[r];if(!t||t.length===0)continue;t.sort((e,t)=>e[0]-t[0]);let i=t[0][0],a=t[0][1];for(let e=1;e<t.length;e+=1){let o=t[e][0],s=t[e][1];o<=a+1?s>a&&(a=s):(n.push([r,i,a]),i=o,a=s)}n.push([r,i,a])}return n}function Ue({runs:e,w:t,h:n,dilation:r}){if(!e.length||r<=0)return e;let i=Array(n);for(let a=0;a<e.length;a+=1){let o=e[a],s=o[0],c=Math.max(0,o[1]-r),l=Math.min(t-1,o[2]+r),u=Math.max(0,s-r),d=Math.min(n-1,s+r);for(let e=u;e<=d;e+=1){let t=i[e];t||(t=[],i[e]=t),t.push([c,l])}}return B(i,n)}function V(e,t){let n=e.runs,r=e.w,i=e.h,a=Math.max(1,Math.round(r*t)),o=Math.max(1,Math.round(i*t)),s=Array(o),c=a,l=o,u=0,d=0,f=!1;for(let e=0;e<n.length;e+=1){let r=n[e],i=r[0],a=r[1],p=r[2],m=Math.round(i*t);if(m<0||m>=o)continue;let h=Math.round(a*t),g=Math.round((p+1)*t)-1;if(g<h)continue;let _=s[m];_||(_=[],s[m]=_),_.push([h,g]),f=!0,h<c&&(c=h),g>u&&(u=g),m<l&&(l=m),m>d&&(d=m)}if(!f)return{w:a,h:o,runs:[],minX:0,minY:0,maxX:0,maxY:0};let p=[];for(let e=0;e<o;e+=1){let t=s[e];if(!t||t.length===0)continue;t.sort((e,t)=>e[0]-t[0]);let n=t[0][0],r=t[0][1];for(let i=1;i<t.length;i+=1){let a=t[i][0],o=t[i][1];a<=r+1?o>r&&(r=o):(p.push([e,n,r]),n=a,r=o)}p.push([e,n,r])}return{w:a,h:o,runs:p,minX:c,minY:l,maxX:u,maxY:d}}var We=/* @__PURE__ */ new Map,Ge=/* @__PURE__ */ new Map;function Ke({word:e,fontSize:t,pad:n,svg:r}){let i=r.style&&r.style.bold?1:0,a=n||0;return`${e.name}::${t}::${a}::${i}`}function qe({word:e,fontSize:t,pad:n,canvas:r,ctx:i,svg:a}){let o=Ke({word:e,fontSize:t,pad:n,svg:a}),s=We.get(o);if(s)return{key:o,bitmap:s};let c=Ie({word:e,fontSize:t,pad:n,canvas:r,ctx:i,svg:a});return We.set(o,c),{key:o,bitmap:c}}function Je({bitmapKey:e,wordMask:t,w:n,h:r,dilation:i}){let a=`${e}::d${i}`,o=Ge.get(a);if(o)return o;let s=He({wordMask:t,w:n,h:r,dilation:i}),c={wordMask:s,runs:Le(s)};return Ge.set(a,c),c}function Ye(e,t,n){if(!e.length)return;let r=1/0,i=-1/0,a=1/0,o=-1/0;for(let t=0;t<e.length;t+=1){let n=e[t],s=n.x+n.minX,c=n.x+n.maxX,l=n.y+n.minY,u=n.y+n.maxY;s<r&&(r=s),c>i&&(i=c),l<a&&(a=l),u>o&&(o=u)}if(!isFinite(r)||!isFinite(i)||!isFinite(a)||!isFinite(o))return;let s=Math.max(Math.abs(r),Math.abs(i)),c=Math.max(Math.abs(a),Math.abs(o));if(s===0||c===0)return;let l=.9,u=t*.5*l/s,d=n*.5*l/c,f=Math.min(u,d);if(!(f<=1)){f>4&&(f=4);for(let t=0;t<e.length;t+=1){let n=e[t];n.x*=f,n.y*=f,n.width*=f,n.height*=f,n.fontSize*=f,n.minX*=f,n.maxX*=f,n.minY*=f,n.maxY*=f}}}function Xe(){return typeof performance<`u`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now()}function Ze({value:e,minimumValue:t,maximumValue:n,configuredMinimumFontSize:r,maximumFontSize:i}){if(n===t)return i;let a=(e-t)/(n-t)*(i-r)+r;return Math.max(r,Math.min(i,a))}function Qe({bitmapHeight:e,proximity:t,strictPixelPadding:n,minimumVisualPadding:r}){let i=Math.max(0,Math.round(t||0)),a=Math.ceil(e*.035)+2;return Math.max(i,a,n?3:0,r)}function $e({currentBitmap:e,strictPixelPadding:t,scaleFactor:n,baseBitmap:r,bitmapKey:i,proximity:a,minimumVisualPadding:o}){let s=e.runs,c=e.w,l=e.h,u=e.minX,d=e.minY,f=e.maxX,p=e.maxY;if(!s.length)return{runs:s,bitmapWidth:c,bitmapHeight:l,bitmapMinimumX:u,bitmapMinimumY:d,bitmapMaximumX:f,bitmapMaximumY:p};let m=Qe({bitmapHeight:l,proximity:a,strictPixelPadding:t,minimumVisualPadding:o});return m<=0?{runs:s,bitmapWidth:c,bitmapHeight:l,bitmapMinimumX:u,bitmapMinimumY:d,bitmapMaximumX:f,bitmapMaximumY:p}:n===1&&m===2&&t?{runs:Je({bitmapKey:i,wordMask:r.wordMask,w:r.w,h:r.h,dilation:m}).runs,bitmapWidth:c,bitmapHeight:l,bitmapMinimumX:u,bitmapMinimumY:d,bitmapMaximumX:f,bitmapMaximumY:p}:{runs:Ue({runs:s,w:c,h:l,dilation:m}),bitmapWidth:c,bitmapHeight:l,bitmapMinimumX:u,bitmapMinimumY:d,bitmapMaximumX:f,bitmapMaximumY:p}}async function H({baseBitmap:e,baseFontSize:t,minimumScaleFactor:n,maskBits:r,maskRowStride:i,maskWidth:a,maskHeight:o,centerX:s,centerY:c,maximumRadius:l,scaleStep:u,strictPixelPadding:d,bitmapKey:f,minimumFontSize:p,rawWord:m,cosineArray:h,sineArray:g,radiusStep:_,maximumAttempts:v,maybeYield:y,proximity:ee,minimumVisualPadding:te}){let b=1;for(;b>=n;){let{runs:n,bitmapWidth:x,bitmapHeight:S,bitmapMinimumX:C,bitmapMinimumY:w,bitmapMaximumX:T,bitmapMaximumY:ne}=$e({currentBitmap:b===1?e:V(e,b),strictPixelPadding:d,scaleFactor:b,baseBitmap:e,bitmapKey:f,proximity:ee,minimumVisualPadding:te}),re=0,ie=0;for(;re<l&&ie<v;){for(let e=0;e<h.length;e+=1){ie+=1;let l=Math.round(s+re*h[e]-x/2),u=Math.round(c+re*g[e]-S/2);if(!(l<0||u<0||l+x>a||u+S>o)&&z({maskBits:r,maskRowStride:i,maskW:a,maskH:o,wx:l,wy:u,runs:n})){let{__wcIndex:e,...s}=m,c=Math.max(p,Math.round(t*b)),d={...s,x:l-a/2,y:u-o/2,fontSize:c,width:x,height:S,angle:0,minX:C,minY:w,maxX:T,maxY:ne};return Ve({maskBits:r,maskRowStride:i,maskW:a,maskH:o,wx:l,wy:u,runs:n}),d}}re+=_,ie&1023||await y()}b*=u,await y()}return null}async function et({baseBitmap:e,baseFontSize:t,minimumScaleFactor:n,maskBits:r,maskRowStride:i,maskWidth:a,maskHeight:o,centerX:s,centerY:c,maximumRadius:l,scaleStep:u,strictPixelPadding:d,bitmapKey:f,minimumFontSize:p,rawWord:m,maybeYield:h,proximity:g,qualityPreset:_,primarySpiral:v,fallbackSpiral:y}){return await H({baseBitmap:e,baseFontSize:t,minimumScaleFactor:n,maskBits:r,maskRowStride:i,maskWidth:a,maskHeight:o,centerX:s,centerY:c,maximumRadius:l,scaleStep:u,strictPixelPadding:d,bitmapKey:f,minimumFontSize:p,rawWord:m,cosineArray:v.cosineArray,sineArray:v.sineArray,radiusStep:_.spiralRadiusStep,maximumAttempts:_.primaryAttempts,maybeYield:h,proximity:g,minimumVisualPadding:_.minimumVisualPadding})||await H({baseBitmap:e,baseFontSize:t,minimumScaleFactor:n,maskBits:r,maskRowStride:i,maskWidth:a,maskHeight:o,centerX:s,centerY:c,maximumRadius:l,scaleStep:u,strictPixelPadding:d,bitmapKey:f,minimumFontSize:p,rawWord:m,cosineArray:y.cosineArray,sineArray:y.sineArray,radiusStep:_.fallbackSpiralRadiusStep,maximumAttempts:_.fallbackAttempts,maybeYield:h,proximity:g,minimumVisualPadding:_.minimumVisualPadding})}async function tt({words:e,proximity:t=0,svg:n,strictPixelPadding:r,quality:i=Me,onProgress:a,debugTiming:o=!1}){let s=Xe(),c=s(),l=c;async function u(){s()-l>=12&&(await new Promise(e=>setTimeout(e,0)),l=s())}let d=n.width,f=n.height,p=Math.round(d),m=Math.round(f),h=Ne(i),g=Fe(h.spiralStep),_=Fe(h.fallbackSpiralStep),v=n.minFontSize,y=Math.min(n.maxFontSize,100),ee=e.map(e=>e.value),te=Math.min(...ee),b=Math.max(...ee);if(p<=0||m<=0)return[];let x=p+31>>>5,S=new Uint32Array(x*m),C=document.createElement(`canvas`),w=C.getContext(`2d`,{willReadFrequently:!0});C.width=p,C.height=m;let T=Math.max(p,m),ne=Math.floor(p/2),re=Math.floor(m/2),ie=[...e.map((e,t)=>({...e,__wcIndex:t,id:e.id==null?`${e.name}__${t}`:e.id}))].sort((e,t)=>t.value-e.value),E=[],ae=h.scaleStep;for(let e=0;e<ie.length;e+=1){let i=ie[e],o=E.length,s=Ze({value:i.value,minimumValue:te,maximumValue:b,configuredMinimumFontSize:v,maximumFontSize:y}),c=qe({word:i,fontSize:s,pad:t,canvas:C,ctx:w,svg:n}),l=c.key,d=c.bitmap,f=d.w,ee=d.h;if(f<=0||ee<=0){await u();continue}let oe=await et({baseBitmap:d,baseFontSize:s,minimumScaleFactor:Math.max(1/s,.1),maskBits:S,maskRowStride:x,maskWidth:p,maskHeight:m,centerX:ne,centerY:re,maximumRadius:T,scaleStep:ae,strictPixelPadding:r,bitmapKey:l,minimumFontSize:1,rawWord:i,maybeYield:u,proximity:t,qualityPreset:h,primarySpiral:g,fallbackSpiral:_});if(oe&&(E.push(oe),a&&E.length>o)){let e=E[E.length-1];a({word:e,all:E})}await u()}if(!E.length)return[];Ye(E,p,m);let oe=s()-c;return o&&typeof console<`u`&&console.log&&console.log(`[vue-data-ui][word-cloud] positionWordsAsync:`,`${oe.toFixed(2)} ms for ${e.length} words`),E.sort((e,t)=>t.fontSize-e.fontSize)}var nt=/* @__PURE__ */ e({default:()=>gt}),rt=[`id`,`data-resizing`,`data-relayout`],it=[`id`],at={style:{position:`relative`}},ot=[`aria-describedby`,`xmlns`,`viewBox`],st=[`width`,`height`],ct=[`transform`],lt=[`transform`],ut=[`data-a11y-word-index`,`x`,`y`,`width`,`height`,`aria-label`,`onMouseover`,`onMouseleave`,`onClick`],dt=[`fill`,`font-weight`,`font-size`,`transform`,`stroke`,`stroke-width`],ft={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},pt={key:5,class:`vue-data-ui-watermark`},mt={key:6,"data-dom-to-png-ignore":``,class:`reset-wrapper`},ht={style:{display:`flex`,"align-items":`center`}},gt=/*#__PURE__*/ te({__name:`vue-ui-word-cloud`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:te,emit:je}){let Me=j(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ne=j(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Pe=j(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Fe=j(()=>import(`./DataTable-0Vv-aGHD.js`)),Ie=j(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Le=j(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Re=j(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),ze=j(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_word_cloud:Be}=t(),z=e,Ve=je,He=D({get(){return!!z.dataset&&z.dataset.length},set(e){return e}}),B=F(s()),Ue=F(0),V=F(null),We=F(null),Ge=F(null),Ke=F(0),qe=F(0),Je=F(!1),Ye=F(null),Xe=F(null),Ze=F(!1),Qe=F(!1),$e=F(null),H=F(null),et=F({x:0,y:0}),nt=F(`pointer`),gt=F(!1),U=F(Ot()),W=D(()=>U.value.userOptions),G=D(()=>U.value.style.chart.tooltip),_t=D(()=>U.value.style.chart.controls),K=D(()=>U.value.style.chart.words),q=D(()=>U.value.style.chart);y({config:()=>U.value,dataset:()=>z.dataset,component:`VueUiWordCloud`,rules:[ee.noHint]});let vt=D(()=>U.value.userOptions.useCursorPointer),yt=D(()=>f({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,animationDelayMs:0,nodeCategories:{},nodeCategoryColors:{},style:{chart:{backgroundColor:`#99999930`,words:{color:`#6A6A6A`,usePalette:!1,selectedStroke:`#CCCCCC`}}}},userConfig:U.value.skeletonConfig??{}})),{loading:bt,FINAL_DATASET:xt,manualLoading:St}=_({...ke(z),FINAL_CONFIG:U,prepareConfig:Ot,callback:()=>{Promise.resolve().then(()=>{Z.value.showTable=U.value.table.show,Z.value.showTooltip=G.value.show,Z.value.showZoom=q.value.zoom.show})},skeletonDataset:z.config?.skeletonDataset??[{name:`Lorem`,value:6},{name:`ipsum`,value:3},{name:`dolor`,value:1},{name:`sit`,value:3},{name:`amet`,value:3},{name:`consectetur`,value:2},{name:`adipiscing`,value:1},{name:`elit`,value:2},{name:`Vivamus`,value:2},{name:`pulvinar`,value:1},{name:`pretium`,value:1},{name:`venenatis`,value:2},{name:`Donec`,value:1},{name:`imperdiet`,value:3},{name:`id`,value:1},{name:`porttitor`,value:2},{name:`tristique`,value:1},{name:`Aenean`,value:2},{name:`ac`,value:5},{name:`commodo`,value:2},{name:`justo`,value:2},{name:`Vestibulum`,value:2},{name:`placerat`,value:1},{name:`molestie`,value:1},{name:`nisl`,value:1},{name:`lacinia`,value:2},{name:`nulla`,value:1},{name:`posuere`,value:2},{name:`quis`,value:3},{name:`ullamcorper`,value:1},{name:`eu`,value:1},{name:`ex`,value:1},{name:`vitae`,value:3},{name:`facilisis`,value:1},{name:`Aliquam`,value:1},{name:`erat`,value:1},{name:`volutpat`,value:1},{name:`Proin`,value:1},{name:`nunc`,value:1},{name:`felis`,value:1},{name:`gravida`,value:3},{name:`sed`,value:1},{name:`orci`,value:1},{name:`Interdum`,value:1},{name:`et`,value:1},{name:`malesuada`,value:1},{name:`fames`,value:1},{name:`ante`,value:1}],skeletonConfig:f({defaultConfig:U.value,userConfig:yt.value})}),Ct=F(wt());function wt(){return typeof xt.value==`string`?c(xt.value):xt.value.map((e,t)=>({...e,value:d(e.value)}))}let{userOptionsVisible:Tt,setUserOptionsVisibility:Et,keepUserOptionState:Dt}=ue({config:U.value}),{svgRef:J}=de({config:q.value.title});function Ot(){return b(z.config,Be,pe)}let kt=F({x:0,y:0});function At(){let e={x:0,y:0,width:Math.max(10,Y.value.width),height:Math.max(10,Y.value.height)};sn(e),kt.value={x:e.x+e.width/2,y:e.y+e.height/2},an()}let jt=se(()=>{Gt()},100),Mt=F(!1);Ae(()=>Mt.value,e=>{e===!1&&(Qe.value=!0,jt(),At())});let Nt=l(z.config);Ae(()=>z.config,(e,t)=>{let n=l(e),r=n!==Nt;Nt=n;let i=Ot();r?(U.value=i,Tt.value=!U.value.userOptions.showOnChartHover,Rt(),Ke.value+=1,qe.value+=1,Z.value.showTable=U.value.table.show,Z.value.showTooltip=G.value.show,Z.value.showZoom=q.value.zoom.show):(U.value.style.chart.tooltip=i.style.chart.tooltip,Z.value.showTooltip=U.value.style.chart.tooltip.show)},{deep:!0});let Y=F({width:q.value.width,height:q.value.height,maxFontSize:K.value.maxFontSize,minFontSize:K.value.minFontSize,bold:K.value.bold}),Pt=se(()=>{let{width:e,height:t}=ce({chart:V.value,title:q.value.title.text?We.value:null,legend:_t.value.show?$e.value?.$el:null,source:Ge.value});requestAnimationFrame(async()=>{Y.value.width=Math.max(10,e),Y.value.height=Math.max(10,t-12),await be(),Mt.value=!1})},100),Ft=()=>{Mt.value=!0,Pt()},X=De(null),It=De(null);we(Rt);let Lt=D(()=>U.value.debug);function Rt(){g(z.dataset)?u({componentName:`VueUiWordCloud`,type:`dataset`,debug:Lt.value}):Ct.value.forEach((e,t)=>{h({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{He.value=!1,u({componentName:`VueUiWordCloud`,type:`datasetSerieAttribute`,property:e,index:t,debug:Lt.value})})}),g(z.dataset)||(St.value=U.value.loading),U.value.responsive&&(X.value&&(It.value&&X.value.unobserve(It.value),X.value.disconnect()),X.value=new ResizeObserver(Ft),It.value=V.value.parentNode,X.value.observe(It.value)),At()}Ce(()=>{X.value&&(It.value&&X.value.unobserve(It.value),X.value.disconnect())});let{isPrinting:zt,isImaging:Bt,generatePdf:Vt,generateImage:Ht}=oe({elementId:`wordCloud_${B.value}`,fileName:q.value.title.text||`vue-ui-word-cloud`,options:U.value.userOptions.print}),Z=F({showTable:U.value.table.show,showTooltip:G.value.show,showZoom:q.value.zoom.show});Ae(U,()=>{Z.value.showTable=U.value.table.show,Z.value.showTooltip=G.value.show,Z.value.showZoom=q.value.zoom.show},{immediate:!0});function Ut(e,t,n=`Arial`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${t}px ${K.value.bold?`bold`:`normal`} ${n}`,{width:r.measureText(e).width+K.value.proximity,height:t}}let Q=F([]),Wt=/* @__PURE__ */ new Map;function Gt(){let e=[...Ct.value].map(e=>e.value),t=Math.max(...e),n=Math.min(...e),r=[...Ct.value].map((e,r)=>{let i=(e.value-n)/(t-n)*(Y.value.maxFontSize-Y.value.minFontSize)+Y.value.minFontSize;i=isNaN(i)?Y.value.minFontSize:i;let s=Ut(e.name,i);return{...e,id:e.id??`${e.name}__${r}`,fontSize:i,width:s.width,height:s.height,color:e.color?o(e.color):K.value.usePalette?U.value.customPalette[r]||U.value.customPalette[r%U.value.customPalette.length]||a[r]||a[r%a.length]:K.value.color}});Q.value.length=0,Wt.clear(),tt({debugTiming:Lt.value,words:r,svg:Y.value,proximity:K.value.proximity,strictPixelPadding:U.value.strictPixelPadding,quality:U.value.quality,onProgress:({all:e})=>{for(let t of e){let e=t.id,n=Wt.get(e);if(n===void 0)n=Q.value.length,Wt.set(e,n),Q.value.push({...t});else{let e=Q.value[n];e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e.fontSize=t.fontSize,e.minX=t.minX,e.minY=t.minY,e.maxX=t.maxX,e.maxY=t.maxY}}}}),Q.value.sort((e,t)=>t.fontSize-e.fontSize),Wt.clear(),Q.value.forEach((e,t)=>{Wt.set(e.id,t)}),Ze.value=!0,Qe.value=!1}let Kt=D(()=>({head:Q.value.map(e=>({name:e.name,color:e.color})),body:Q.value.map(e=>e.value)}));function qt(e=null){be(()=>{let t=Kt.value.head.map((e,t)=>[[e.name],[Kt.value.body[t]]]),n=[[q.value.title.text],[q.value.title.subtitle.text],[[``],[U.value.table.columnNames.value]]].concat(t),i=r(n);e?e(i):p({csvContent:i,title:q.value.title.text||`vue-ui-word-cloud`})})}let Jt=D(()=>{let e=[U.value.table.columnNames.series,U.value.table.columnNames.value],t=Kt.value.head.map((e,t)=>{let r=n({p:U.value.table.td.prefix,v:Kt.value.body[t],s:U.value.table.td.suffix,r:U.value.table.td.roundingValue});return[{color:e.color,name:e.name},r]}),r=t.map(e=>e.map((e,t)=>t===0?e.name:e)),i={th:{backgroundColor:U.value.table.th.backgroundColor,color:U.value.table.th.color,outline:U.value.table.th.outline},td:{backgroundColor:U.value.table.td.backgroundColor,color:U.value.table.td.color,outline:U.value.table.td.outline},breakpoint:U.value.table.responsiveBreakpoint};return{colNames:[U.value.table.columnNames.series,U.value.table.columnNames.value],head:e,body:t,a11yBody:r,config:i}}),$=F(!1);function Yt(e){$.value=e,Ue.value+=1}function Xt(){return Q.value}function Zt(){Z.value.showTable=!Z.value.showTable}function Qt(){Z.value.showTooltip=!Z.value.showTooltip}let $t=F(!1);function en(){$t.value=!$t.value}function tn(){Z.value.showZoom=!Z.value.showZoom}let nn=D(()=>!$t.value&&Z.value.showZoom),{viewBox:rn,resetZoom:an,isZoom:on,setInitialViewBox:sn,zoomByFactor:cn,scale:ln}=fe(J,{x:0,y:0,width:Y.value.width<=0?10:Y.value.width,height:Y.value.height<=0?10:Y.value.height},1,nn);Ae(()=>z.dataset,()=>{Ct.value=wt(),U.value.responsive||(Gt(),At())},{immediate:!0});let un=x(V,()=>q.value.title.text),dn=D(()=>ne({config:U,style:q,mutableConfig:Z,dialog:ze,accordion:Pe,isFullscreen:$,parent:V,maxWidth:500,isCursorPointer:vt}));Ae(()=>Z.value.showTable,e=>T(e,U,Ye));function fn(){Z.value.showTable=!1,Xe.value&&Xe.value.setTableIconState(!1)}let pn=D(()=>q.value.backgroundColor),mn=D(()=>q.value.title),{isCallbackImaging:hn,isCallbackSvg:gn,generateSvg:_n,onGenerateImage:vn}=w({svg:J,title:mn,legend:null,legendItems:null,backgroundColor:pn,getSvgCallback:()=>U.value.userOptions.callbacks.svg,generateImage:Ht});function yn(){cn(1.5,!0)}function bn(){cn(1/1.5,!0)}let xn=F(null),Sn=F(!1),Cn=F(``),wn=F(null);function Tn(){xn.value=null,H.value=null,Je.value=!1}function En(e,t){U.value.events.datapointLeave&&U.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(H.value!==t||nt.value!==`keyboard`)&&(xn.value=null,Je.value=!1)}function Dn(e,t){U.value.events.datapointClick&&U.value.events.datapointClick({datapoint:e,seriesIndex:t})}function On(e){if(!J.value||e==null)return;let t=J.value.querySelector(`[data-a11y-word-index="${e}-${B.value}"]`);if(!t)return;let n=t.getBoundingClientRect();et.value={x:n.left+n.width/2,y:n.top+n.height/2}}function kn(e,t,n=`pointer`){if(U.value.events.datapointEnter&&U.value.events.datapointEnter({datapoint:e,seriesIndex:t}),!Z.value.showTooltip)return;nt.value=n,H.value=t,xn.value=e.id,wn.value={datapoint:e,config:U.value,seriesIndex:t};let r=G.value.customFormat;if(Sn.value=!1,i(r))try{let t=r({datapoint:e,config:U.value});typeof t==`string`&&(Cn.value=t,Sn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),Sn.value=!1}if(!Sn.value){let t=`<svg viewBox="0 0 10 10" height="${G.value.fontSize}"><circle cx="5" cy="5" r="5" fill="${e.color}"/></svg><span>${e.name}:</span><b>${(e.value||0).toFixed(G.value.roundingValue)}</b>`;Cn.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${t}</div>`}n===`keyboard`&&be(()=>{On(t)}),Je.value=!0}async function An(){Ve(`copyAlt`,{config:U.value,dataset:Q.value}),U.value.userOptions.callbacks.altCopy?await Promise.resolve(U.value.userOptions.callbacks.altCopy({config:U.value,dataset:Q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function jn(){H.value=null,gt.value=!0}function Mn(){Tn(),gt.value=!1}function Nn(e){if(!J.value||$t.value||document.activeElement!==J.value||!Q.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){Tn();return}if(r){if(H.value===null)return;let e=Q.value[H.value];if(!e)return;Dn(e,H.value);return}let a=H.value;a===null||a<0||a>=Q.value.length?a=n?0:Q.value.length-1:(a+=n?1:-1,a<0&&(a=Q.value.length-1),a>=Q.value.length&&(a=0));let o=Q.value[a];o&&kn(o,a,`keyboard`)}let Pn=D(()=>({headers:Jt.value?.colNames??[],rows:Jt.value?.a11yBody??[]}));return te({getData:Xt,getImage:un,generateCsv:qt,generatePdf:Vt,generateImage:Ht,generateSvg:_n,resetZoom:an,toggleTable:Zt,toggleTooltip:Qt,toggleAnnotator:en,toggleFullscreen:Yt,toggleZoom:tn,copyAlt:An}),(e,t)=>(P(),A(`div`,{class:`vue-data-ui-component vue-ui-word-cloud`,ref_key:`wordCloudChart`,ref:V,id:`wordCloud_${B.value}`,"data-resizing":Mt.value,"data-relayout":Qe.value,style:Se(`width: 100%; font-family:${U.value.style.fontFamily};background:${q.value.backgroundColor};${U.value.responsive?`height:100%`:``}`),onMouseenter:t[3]||=()=>L(Et)(!0),onMouseleave:t[4]||=()=>{L(Et)(!1),gt.value||Tn()}},[he(`div`,{id:`chart-instructions-${B.value}`,class:`sr-only`},[he(`p`,null,Oe(U.value.a11y.translations.keyboardNavigation),1)],8,it),Pn.value?.rows?.length?(P(),O(le,{key:0,uid:B.value,head:Pn.value.headers,body:Pn.value.rows,notice:U.value.a11y.translations.tableAvailable,caption:U.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):k(``,!0),W.value.buttons.annotator?(P(),O(L(Ie),{key:1,svgRef:L(J),backgroundColor:q.value.backgroundColor,color:q.value.color,active:$t.value,isCursorPointer:vt.value,palette:W.value.annotatorPalette,onClose:en},ge({_:2},[Te(L(ie),t=>({name:t,fn:R(n=>[I(e.$slots,t,N(M(L(re)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):k(``,!0),q.value.title.text?(P(),A(`div`,{key:2,ref_key:`chartTitle`,ref:We,style:`width:100%;background:transparent;padding-bottom:24px`},[(P(),O(C,{key:`title_${Ke.value}`,config:{title:{...q.value.title},subtitle:{...q.value.title.subtitle}}},null,8,[`config`]))],512)):k(``,!0),W.value.show&&He.value&&(L(Dt)||L(Tt))?(P(),O(L(Le),{ref_key:`userOptionsRef`,ref:Xe,key:`user_option_${Ue.value}`,backgroundColor:q.value.backgroundColor,color:q.value.color,isPrinting:L(zt),isImaging:L(Bt),uid:B.value,hasPdf:W.value.buttons.pdf,hasXls:W.value.buttons.csv,hasImg:W.value.buttons.img,hasSvg:W.value.buttons.svg,hasTable:W.value.buttons.table,hasFullscreen:W.value.buttons.fullscreen,hasAltCopy:W.value.buttons.altCopy,isFullscreen:$.value,titles:{...W.value.buttonTitles},chartElement:V.value,position:W.value.position,hasTooltip:G.value.show&&W.value.buttons.tooltip,isTooltip:Z.value.showTooltip,hasAnnotator:W.value.buttons.annotator,isAnnotation:$t.value,callbacks:W.value.callbacks,printScale:W.value.print.scale,tableDialog:U.value.table.useDialog,hasZoom:W.value.buttons.zoom,isZoom:Z.value.showZoom,isCursorPointer:vt.value,onToggleFullscreen:Yt,onGeneratePdf:L(Vt),onGenerateCsv:qt,onGenerateImage:L(vn),onGenerateSvg:L(_n),onToggleTable:Zt,onToggleTooltip:Qt,onToggleAnnotator:en,onToggleZoom:tn,onCopyAlt:An,style:Se({visibility:L(Dt)?L(Tt)?`visible`:`hidden`:`visible`})},ge({_:2},[Te(L(E)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:R(n=>[I(e.$slots,t,N(M(L(ae)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasTooltip.isTooltip.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.hasZoom.isZoom.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):k(``,!0),_t.value.position===`top`&&_t.value.show&&!L(bt)?(P(),O(S,{key:4,ref_key:`zoomControls`,ref:$e,config:U.value,scale:L(ln),isFullscreen:$.value,isCursorPointer:vt.value,onZoomIn:yn,onZoomOut:bn,onResetZoom:t[0]||=e=>L(an)(!0)},null,8,[`config`,`scale`,`isFullscreen`,`isCursorPointer`])):k(``,!0),he(`div`,at,[(P(),A(`svg`,{ref_key:`svgRef`,ref:J,class:xe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),"aria-describedby":`chart-instructions-${B.value}`,xmlns:L(m),viewBox:`${L(rn).x} ${L(rn).y} ${L(rn).width} ${L(rn).height}`,style:`overflow:hidden;background:transparent;display:block`,tabindex:`0`,onFocus:jn,onBlur:Mn,onKeydown:Nn},[ve(L(Re)),I(e.$slots,`svg-underlayer`,{svg:{...Y.value,isPrintingImg:L(zt)||L(Bt)||L(hn),isPrintingSvg:L(gn)}},void 0,!0),e.$slots[`chart-background`]?(P(),A(`foreignObject`,{key:0,x:0,y:0,width:Y.value.width<=0?10:Y.value.width,height:Y.value.height<=0?10:Y.value.height,style:{pointerEvents:`none`}},[I(e.$slots,`chart-background`,{},void 0,!0)],8,st)):k(``,!0),he(`g`,{transform:`translate(${kt.value.x}, ${kt.value.y})`,class:xe({"wc-finalized":Ze.value})},[(P(!0),A(me,null,Te(Q.value,(e,t)=>(P(),A(`g`,{key:e.id,class:`vue-ui-word-cloud-word`,transform:`translate(${e.x}, ${e.y})`},[e.minX===void 0?k(``,!0):(P(),A(`rect`,{key:0,"data-a11y-word-index":`${t}-${B.value}`,x:e.minX,y:e.minY*1.25,width:e.maxX-e.minX,height:e.maxY-e.minY,fill:`transparent`,"pointer-events":`visiblePainted`,"aria-label":`${e.name}: ${(e.value||0).toFixed(G.value.roundingValue)}`,onMouseover:n=>kn(e,t),onMouseleave:n=>En(e,t),onClick:n=>Dn(e,t)},null,40,ut)),he(`text`,{fill:e.color,"font-weight":K.value.bold?`bold`:`normal`,x:0,y:0,"font-size":e.fontSize,transform:`translate(${e.width/2}, ${e.height/2})`,"text-anchor":`middle`,"dominant-baseline":`central`,"paint-order":`stroke fill`,stroke:!xn.value||xn.value===e.id?K.value.selectedStroke:void 0,"stroke-width":e.height*.05,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:Se(`
2
- pointer-events:none;
3
- fill-opacity:${!xn.value||xn.value===e.id||!Ze.value?1:K.value.hoverOpacity} !important;
4
- `)},Oe(e.name),13,dt)],8,lt))),128))],10,ct),I(e.$slots,`svg`,{svg:{...Y.value,isPrintingImg:L(zt)||L(Bt)||L(hn),isPrintingSvg:L(gn)}},void 0,!0)],42,ot)),e.$slots.hint?(P(),A(`div`,ft,[I(e.$slots,`hint`,N(M({hint:U.value.a11y.translations.keyboardNavigation,isVisible:gt.value})),void 0,!0)])):k(``,!0)]),e.$slots.watermark?(P(),A(`div`,pt,[I(e.$slots,`watermark`,N(M({isPrinting:L(zt)||L(Bt)||L(hn)||L(gn)})),void 0,!0)])):k(``,!0),L(on)?(P(),A(`div`,mt,[I(e.$slots,`reset-action`,{reset:L(an)},void 0,!0)])):k(``,!0),_t.value.position===`bottom`&&_t.value.show&&!L(bt)?(P(),O(S,{key:7,ref_key:`zoomControls`,ref:$e,config:U.value,scale:L(ln),isFullscreen:$.value,isCursorPointer:vt.value,onZoomIn:yn,onZoomOut:bn,onResetZoom:t[1]||=e=>L(an)(!0)},null,8,[`config`,`scale`,`isFullscreen`,`isCursorPointer`])):k(``,!0),ve(L(Me),{teleportTo:G.value.teleportTo,show:Z.value.showTooltip&&Je.value,backgroundColor:G.value.backgroundColor,color:G.value.color,fontSize:G.value.fontSize,borderRadius:G.value.borderRadius,borderColor:G.value.borderColor,borderWidth:G.value.borderWidth,backgroundOpacity:G.value.backgroundOpacity,position:G.value.position,offsetX:G.value.offsetX,offsetY:G.value.offsetY,parent:V.value,content:Cn.value,isCustom:Sn.value,isFullscreen:$.value,smooth:G.value.smooth,backdropFilter:G.value.backdropFilter,smoothForce:G.value.smoothForce,smoothSnapThreshold:G.value.smoothSnapThreshold,isA11yMode:nt.value===`keyboard`,a11yPosition:et.value},{"tooltip-before":R(()=>[I(e.$slots,`tooltip-before`,N(M({...wn.value})),void 0,!0)]),tooltip:R(()=>[I(e.$slots,`tooltip`,N(M({...wn.value})),void 0,!0)]),"tooltip-after":R(()=>[I(e.$slots,`tooltip-after`,N(M({...wn.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`]),e.$slots.source?(P(),A(`div`,{key:8,ref_key:`source`,ref:Ge,dir:`auto`},[I(e.$slots,`source`,{},void 0,!0)],512)):k(``,!0),He.value&&W.value.buttons.table?(P(),O(Ee(dn.value.component),ye({key:9},dn.value.props,{ref_key:`tableUnit`,ref:Ye,onClose:fn}),ge({content:R(()=>[(P(),O(L(Fe),{key:`table_${qe.value}`,colNames:Jt.value.colNames,head:Jt.value.head,body:Jt.value.body,config:Jt.value.config,title:U.value.table.useDialog?``:dn.value.title,withCloseButton:!U.value.table.useDialog,isCursorPointer:vt.value,onClose:fn},{th:R(({th:e})=>[he(`div`,ht,Oe(e),1)]),td:R(({td:e})=>[_e(Oe(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[U.value.table.useDialog?{name:`title`,fn:R(()=>[_e(Oe(dn.value.title),1)]),key:`0`}:void 0,U.value.table.useDialog?{name:`actions`,fn:R(()=>[he(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[2]||=e=>qt(W.value.callbacks.csv),style:Se({cursor:vt.value?`pointer`:`default`})},[ve(L(Ne),{name:`fileCsv`,stroke:dn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):k(``,!0),I(e.$slots,`skeleton`,{},()=>[L(bt)?(P(),O(v,{key:0})):k(``,!0)],!0)],44,rt))}},[[`__scopeId`,`data-v-626a8f04`]]);export{nt as n,gt as t};
@@ -1,24 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,A as r,B as i,D as a,Dt as o,G as s,Gt as c,H as l,Ht as u,I as ee,J as te,Jt as d,K as ne,L as re,M as f,Mt as ie,N as ae,Ot as oe,P as se,R as ce,Rt as le,S as ue,U as de,V as fe,W as pe,X as me,Yt as he,_ as ge,_t as _e,at as ve,b as p,c as ye,d as m,dt as h,et as be,gt as xe,i as g,in as Se,kt as Ce,l as we,n as Te,nn as Ee,nt as De,o as Oe,q as ke,qt as Ae,r as je,rn as Me,tn as Ne,v as Pe,w as Fe,wt as Ie,zt as Le}from"./lib-rPeBMZrn.js";import{n as Re,t as ze}from"./BaseScanner-8NdoBs7B.js";import{n as Be,t as Ve}from"./useHints-C-TwxM0Y.js";import{t as He}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Ue}from"./useNestedProp-DnGoh-XS.js";import{t as We}from"./useThemeCheck-BKNRbGeC.js";import{t as Ge}from"./img-D4RQwASc.js";import{n as Ke}from"./Title-BliHuXfT.js";import{t as qe}from"./useChartExport-BZts4KFb.js";import{t as Je}from"./tableIntegration-CNoJ1CIY.js";import{n as Ye,t as Xe}from"./annotationSlots-BRR85CqJ.js";import{n as Ze,t as Qe}from"./userOptionsSlots-DYuo-E5m.js";import{n as $e,r as et,t as tt}from"./useTimeLabels-Das5O74F.js";import{t as nt}from"./usePrinter-DVf3YcG5.js";import{t as rt}from"./useTransitions-ChGGrtrv.js";import{t as it}from"./useStableElementSize-CegFbRlF.js";import{t as at}from"./useSvgLabelLayout-42Kats14.js";import{t as ot}from"./useTimeLabelCollider-BTybMUFi.js";import{t as st}from"./vue_ui_xy-CJBM9F6W.js";import{t as ct}from"./Shape-CRe8woTu.js";import{t as lt}from"./DefGrad-DKMq1REY.js";import{t as ut}from"./SlicerPreview-CFFUOlQr.js";import{t as dt}from"./vue-ui-accordion-S3nRtTU-.js";import{t as ft}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as pt}from"./A11yDataTable-DWNlWXzs.js";import{Fragment as _,Teleport as mt,computed as v,createBlock as ht,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as gt,createTextVNode as _t,createVNode as vt,defineAsyncComponent as yt,getCurrentInstance as bt,guardReactiveProps as xt,mergeProps as St,nextTick as Ct,normalizeClass as S,normalizeProps as wt,normalizeStyle as C,onBeforeUnmount as Tt,onMounted as Et,openBlock as w,ref as T,renderList as E,renderSlot as D,resolveDynamicComponent as Dt,shallowRef as O,toDisplayString as Ot,toRefs as kt,unref as k,useSlots as At,vModelCheckbox as jt,watch as Mt,watchEffect as Nt,withCtx as Pt,withDirectives as Ft}from"vue";function It(e){return![null,void 0,NaN,1/0,-1/0].includes(e)}function Lt(e,t){let n=Wt(e),r=Array(n).fill(0);for(let e=0;e<t.length&&e<n;e+=1)r[e]=t[e]??null;return r}function Rt(e,t){let n=Object.create(null);for(let r=0;r<e.length;r+=1){let i=e[r],a=String(t(i));n[a]||(n[a]=[]),n[a].push(i)}return n}function zt(e){return e&&typeof e==`object`&&Number.isFinite(Number(e.x))&&Number.isFinite(Number(e.y))}function Bt(e,t){let n=Number(e),r=Number(t);return!Number.isFinite(n)||!Number.isFinite(r)?!1:!Object.is(n,r)}function Vt(e){let t=/* @__PURE__ */ new WeakMap;return(n,...r)=>{let i=t.get(n),a=JSON.stringify(r);if(i&&i.has(a))return i.get(a);let o=e(n,...r);return i||(i=/* @__PURE__ */ new Map,t.set(n,i)),i.set(a,o),o}}function Ht(e,t){let n=Number.isFinite(e)?e:0,r=Number.isFinite(t)?t:1;return n===r?r=n+1:n>r&&([n,r]=[r,n]),{min:n,max:r}}function Ut(e,t,n=0){return Number.isFinite(e)&&Number.isFinite(t)&&Math.abs(t)>1e-9?e/t:n}function Wt(e){return Number.isFinite(e)?Math.max(0,Math.floor(e)):0}var Gt=/* @__PURE__ */ e({default:()=>A}),Kt=[`id`],qt=[`id`],Jt=[`id`],Yt={style:{position:`relative`}},Xt=[`viewBox`,`aria-label`,`aria-describedby`],Zt=[`id`],Qt=[`x`,`y`,`width`,`height`],$t=[`x`,`y`,`width`,`height`],en={key:1},tn={class:`vue-ui-xy-grid`},nn=[`stroke`,`x1`,`x2`,`y1`,`y2`],rn=[`stroke`,`x1`,`x2`,`y1`,`y2`],an={key:1},on=[`x1`,`x2`,`y1`,`y2`,`stroke`],sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],cn=[`x1`,`x2`,`y1`,`y2`,`stroke`],ln={key:3},un=[`d`,`stroke`],dn={key:4},fn=[`d`,`stroke`],pn={key:0},mn=[`id`],hn=[`stop-color`,`offset`],gn=[`x`,`y`,`height`,`width`,`fill`],_n=[`x`,`y`,`width`],vn={key:0},yn=[`x`,`y`,`height`,`width`,`fill`],bn=[`clip-path`],xn=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],Sn=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],Cn=[`width`,`x`,`y`],wn=[`stroke`,`x1`,`x2`,`y1`,`y2`],Tn={key:2},En=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Dn={key:3,class:`vue-ui-xy-crosshair-selection`},On=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],kn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],An=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],jn=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-dasharray`],Mn=[`opacity`],Nn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pn=[`fill`,`font-size`,`transform`],Fn=[`x1`,`x2`,`y1`,`y2`,`stroke`],In=[`transform`,`text-anchor`,`font-size`,`fill`],Ln=[`x1`,`x2`,`y1`,`y2`,`stroke`],Rn=[`transform`,`font-size`,`text-anchor`,`fill`],zn={key:6,class:`vue-ui-xy-crosshair-selection`},Bn=[`transform`,`font-size`,`text-anchor`,`fill`],Vn={key:7,class:`vue-ui-xy-crosshair-selection`},Hn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Un=[`clip-path`],Wn=[`width`,`x`,`y`],Gn={style:{width:`100%`}},Kn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],qn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Jn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Yn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Xn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Zn={key:0},Qn={key:1},$n=[`d`,`fill`,`fill-opacity`],er={key:0},tr=[`d`,`fill`],nr=[`d`,`fill`],rr=[`d`,`fill`],ir=[`d`,`fill`],ar=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],or=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],sr=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],cr=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],lr=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ur={class:`vue-ui-xy-line-markers`},dr=[`width`,`x`,`y`],fr={style:{width:`100%`}},pr={key:8},mr=[`text-anchor`,`font-size`,`transform`,`fill`,`stroke`,`innerHTML`],hr=[`transform`,`font-size`,`fill`,`font-weight`],gr={key:9},_r=[`transform`,`text-anchor`,`font-size`,`fill`,`stroke`,`innerHTML`],vr={key:10},yr=[`x`,`y`],br=[`innerHTML`],xr=[`x`,`y`],Sr=[`innerHTML`],Cr=[`x1`,`x2`,`y1`,`y2`,`stroke`],wr={key:11},Tr=[`transform`,`text-anchor`,`font-size`,`fill`,`stroke`,`innerHTML`],Er={key:12},Dr=[`x`,`y`],Or=[`innerHTML`],kr=[`x`,`y`],Ar=[`innerHTML`],jr=[`x1`,`x2`,`y1`,`y2`,`stroke`],Mr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Nr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Pr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Fr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Ir={key:0},Lr=[`id`],Rr=[`fill`,`stroke`],zr=[`x1`,`x2`,`y1`,`y2`,`stroke`,`marker-end`],Br=[`x1`,`x2`,`y1`,`y2`,`stroke`,`marker-end`],Vr=[`transform`,`font-size`,`fill`,`stroke`],Hr=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`],Ur=[`font-size`,`fill`,`transform`],Wr=[`x`,`y`,`font-size`,`fill`],Gr=[`opacity`],Kr=[`text-anchor`,`font-size`,`fill`,`stroke`,`transform`,`onClick`],qr=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`,`onClick`],Jr={key:15},Yr=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Xr={key:16},Zr=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Qr=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],$r=[`y`,`x`,`width`,`height`,`fill`],ei=[`id`,`transform`,`font-size`,`fill`,`text-anchor`],ti={key:17,style:{"pointer-events":`none`}},ni=[`x`,`y`],ri=[`innerHTML`],ii=[`cx`,`cy`,`r`,`fill`],ai=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],oi=[`data-start`,`data-end`],si={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},ci={key:5,class:`vue-data-ui-watermark`},li={class:`vue-ui-xy-tag-arrow`,height:`20`,viewBox:`0 0 10 20`,style:{position:`absolute`,right:`100%`,top:`50%`,transform:`translateY(-50%)`}},ui=[`fill`],di=[`innerHTML`],fi={class:`vue-ui-xy-tag-arrow`,height:`100%`,viewBox:`0 0 10 20`,style:{position:`absolute`,left:`100%`,top:`50%`,transform:`translateY(-50%)`}},pi=[`fill`],mi=[`innerHTML`],hi={class:`vue-ui-xy-tag-arrow`,height:`20`,viewBox:`0 0 10 20`,style:{position:`absolute`,right:`100%`,top:`50%`,transform:`translateY(-50%)`}},gi=[`fill`],_i=[`innerHTML`],vi={class:`vue-ui-xy-tag-arrow`,height:`100%`,viewBox:`0 0 10 20`,style:{position:`absolute`,left:`100%`,top:`50%`,transform:`translateY(-50%)`}},yi=[`fill`],bi=[`innerHTML`],xi=[`id`],Si=[`onClick`,`onKeydown`],Ci={key:0,viewBox:`0 0 20 12`,height:`1em`,width:`1.43em`,"aria-hidden":`true`},wi=[`stroke`,`fill`],Ti={key:1,viewBox:`0 0 40 40`,height:`1em`,width:`1em`,"aria-hidden":`true`},Ei=[`fill`],Di=[`fill`],Oi={key:2,viewBox:`0 0 12 12`,height:`1em`,width:`1em`,"aria-hidden":`true`},ki={style:{display:`flex`,"flex-direction":`row`,gap:`6px`,"align-items":`center`,"padding-left":`6px`},"data-dom-to-png-ignore":``},Ai={key:0},ji={key:1},Mi=280,A=/*#__PURE__*/ He({__name:`vue-ui-xy`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},selectedXIndex:{type:Number,default:void 0},zoomState:{type:Object,default:null}},emits:[`selectTimeLabel`,`selectX`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:He,emit:Gt}){let A=e,Ni=yt(()=>import(`./DataTable-0Vv-aGHD.js`)),Pi=yt(()=>import(`./Tooltip-C1q0Qoh7.js`)),Fi=yt(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Ii=yt(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Li=yt(()=>import(`./vue-ui-table-sparkline-B2Q-7-GQ.js`).then(e=>e.n)),Ri=yt(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),zi=yt(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Bi=yt(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),Vi=Gt,Hi=At(),Ui=bt(),{vue_ui_xy:Wi}=t(),{isThemeValid:Gi,warnInvalidTheme:Ki}=We(),qi=O(null),Ji=O(null),Yi=O(null),Xi=O(null),Zi=O(null),Qi=O(null),$i=O(null),ea=O(null),ta=O(null),na=O(null),ra=O(null),ia=O(null),aa=O(null),oa=O(null),sa=T(0),j=T(null),ca=T(!0),la=T(600),M=T(1e3),ua=T(`0 0 1000 600`),da=O({x:0,y:0}),fa=O({line:`line`,bar:`bar`,plot:`plot`}),pa=T(!1),ma=T(!1),ha=T(!1),ga=T(null),_a=T([]),va=v(()=>new Set(_a.value)),N=T(me()),ya=T(0),ba=T(0),xa=T(0),Sa=T(!0),Ca=T(0),P=T(null),wa=T(!1),Ta=T(!0),Ea=T(!0),F=O(null),Da=T({}),Oa=O(null),ka=T(!1),Aa=O(null),ja=T(null),I=T(null),Ma=T(null),Na=O({x:0,y:0}),Pa=O(null),Fa=O(null),Ia=O(null),La=O(null),Ra=T(null),za=T(null),Ba=O(null),Va=T(!1),Ha=T(0),Ua=T(0),Wa=it({elementRef:Ba,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{qa()}});function Ga(){Ba.value=qi.value?.parentNode??null}function Ka(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function qa(){let e=++Ua.value;Va.value=!1,await Ct(),await Ka(),await Ka(),e===Ua.value&&(Ha.value+=1,Va.value=!0)}let Ja=T(!1);function Ya(){Ja.value||(Ja.value=!0,Ct(()=>{Ja.value=!1,Ga(),qa()}))}let Xa=v(()=>({height:la.value,width:M.value})),Za=T(!1),Qa=T(null),$a=T(null),L=T({xAxis:18,yAxis:12,dataLabels:20,plotLabels:10}),eo=T({plot:3,line:3,selectedLine:3}),to=T(1);function no(){let e=F.value;if(!e)return null;let t=e.getScreenCTM?.();if(t){let e=Math.hypot(Number(t.a),Number(t.b)),n=Math.hypot(Number(t.c),Number(t.d));if(Number.isFinite(e)&&e>0&&Number.isFinite(n)&&n>0)return(e+n)/2}let n=e.getBoundingClientRect?.(),r=e.viewBox?.baseVal;if(n&&r&&Number(n.width)>0&&Number(n.height)>0&&Number(r.width)>0&&Number(r.height)>0){let e=Math.min(Number(n.width)/Number(r.width),Number(n.height)/Number(r.height));if(Number.isFinite(e)&&e>0)return e}return null}function ro(){let e=no();!Number.isFinite(e)||e<=0||(to.value=e)}function R(e){let t=Number(e);return Number.isFinite(t)?t*to.value:e}let io=v(()=>Math.max(eo.value.line*1.5,eo.value.selectedLine));Et(()=>{ro(),typeof ResizeObserver<`u`&&F.value&&(Fa.value=new ResizeObserver(()=>{ro()}),Fa.value.observe(F.value)),ka.value=!0,A.dataset.length&&fo.value&&A.dataset.forEach((e,t)=>{[null,void 0].includes(e.series)&&ve({componentName:`VueUiXy`,type:`datasetSerieAttribute`,property:`series (number[])`,index:t})}),Ga(),Wa.start(),qa()}),Mt([M,la,ma],async()=>{await Ct(),ro()},{flush:`post`}),Tt(()=>{Fa.value&&=(Fa.value.disconnect(),null)});function ao(){if(!Object.keys(A.config||{}).length)return Wi;let e=Ue({userConfig:A.config,defaultConfig:Wi});A.config&&Ie(A.config,`chart.highlightArea`)&&(Array.isArray(A.config.chart.highlightArea)?e.chart.highlightArea=A.config.chart.highlightArea:e.chart.highlightArea=[A.config.chart.highlightArea]),A.config&&Ie(A.config,`chart.annotations`)&&Array.isArray(A.config.chart.annotations)&&A.config.chart.annotations.length?e.chart.annotations=A.config.chart.annotations.map(e=>Ue({defaultConfig:Wi.chart.annotations[0],userConfig:e})):e.chart.annotations=[],A.config&&Ie(A.config,`chart.grid.position`)&&A.config.chart.grid.position===`start`&&A.dataset.length&&A.dataset.some(e=>e.type===`bar`)&&(e.chart.grid.position=`middle`,Ie(A.config,`debug`)&&console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")),A.config&&Ie(A.config,`chart.highlightArea`)&&(Array.isArray(A.config.chart.highlightArea)?e.chart.highlightArea=A.config.chart.highlightArea.map(e=>oo({defaultConfig:Wi.chart.highlightArea,userConfig:e})):e.chart.highlightArea=oo({defaultConfig:Wi.chart.highlightArea,userConfig:A.config.chart.highlightArea})),A.config&&Ie(A.config,`chart.grid.labels.xAxisLabels.showFirstAndLast`)&&(e.chart.grid.labels.xAxisLabels.showFirstAndLast=!!A.config.chart.grid.labels.xAxisLabels.showFirstAndLast);let t=e.theme;if(!t)return e;if(!Gi.value(e))return Ki(e),e;let n=Ue({userConfig:st[t]||A.config,defaultConfig:e}),r=Ue({userConfig:A.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:Ee[t]||u}}function oo({defaultConfig:e,userConfig:t}){return Ue({defaultConfig:e,userConfig:t})}let so=v({get(){return!!A.dataset&&A.dataset.length},set(e){return e}}),z=T(ao()),B=v(()=>z.value.chart),V=v(()=>z.value.chart.grid),H=v(()=>z.value.chart.grid.labels);Be({config:()=>z.value,dataset:()=>A.dataset,component:`VueUiXy`,rules:[Ve.emptyArray,{test:e=>e.some(e=>e.series.length>365),message:[`👀 One or more series have more than 365 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.some(e=>e.series.length>1095),message:[`👀 One or more series have more than 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]},{test:e=>e.length>6,message:[`👀 The number of series is greater than 6. If your chart is hard to read, you might consider other ways of charting the data:`,``,`▶️ A summary table with sparklines (custom, with VueUiSparkline), or VueUiTableSparkline.`,``,`▶️ Individual charts for individual series, or fewer series with comparable scopes.`,``,`▶️ Add filters to reduce the number of visible series on the chart, to reduce cognitive load.`]}]});let{transitionEnabled:co}=rt({config:()=>z.value.transitions,dataset:()=>A.dataset}),lo=v(()=>B.value.userOptions.useCursorPointer),U=T({dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1});function uo(){let e=H.value.yAxis.stacked,t=H.value.yAxis.useIndividualScale;Za.value?(U.value.showTooltip=B.value.tooltip.show===!0,e!==Qa.value&&(U.value.isStacked=e,Qa.value=e),t!==$a.value&&(U.value.useIndividualScale=t,$a.value=t),U.value.isStacked&&(U.value.useIndividualScale=!0)):(U.value={dataLabels:{show:!0},showTooltip:B.value.tooltip.show===!0,showTable:z.value.showTable===!0,isStacked:e,useIndividualScale:t},Qa.value=e,$a.value=t,Za.value=!0)}let fo=v(()=>z.value.debug),po=v(()=>Se({defaultConfig:{useCssAnimation:!1,showTable:!1,chart:{annotations:[],highlightArea:[],backgroundColor:`#99999930`,grid:{stroke:`#6A6A6A`,labels:{show:!1,axis:{yLabel:``,xLabel:``},xAxisLabels:{show:!1},yAxis:{commonScaleSteps:10,useNiceScale:!0,scaleMin:0,scaleMax:134},zeroLine:{show:!0}}},padding:{top:12,bottom:24,left:24,right:24},userOptions:{show:!1},zoom:{show:!1,startIndex:null,endIndex:null}},bar:{serieName:{show:!1},labels:{show:!1},border:{useSerieColor:!1,stroke:`#999999`}},line:{dot:{useSerieColor:!1,fill:`#8A8A8A`},labels:{show:!1}}},userConfig:z.value.skeletonConfig??{}})),mo=v(()=>A.config?.skeletonDataset??[{name:``,series:[0,1,2,3,5,8,13,21,34,55,89,134],type:`line`,smooth:!0,color:`#BABABA`},{name:``,series:[0,.5,1,1.5,2.5,4,6.5,10.5,17,27.5,44.5,67],type:`bar`,color:`#CACACA`}]),{loading:ho,FINAL_DATASET:go,manualLoading:_o}=Re({...kt(A),FINAL_CONFIG:z,prepareConfig:ao,callback:()=>{Promise.resolve().then(async()=>{(!B.value.zoom.keepState||!mc.value||W.value.start===0&&W.value.end===0)&&await _c(),U.value.showTable=z.value.showTable})},skeletonDataset:mo.value,skeletonConfig:Se({defaultConfig:z.value,userConfig:po.value})}),vo=Vt((e,t)=>ie({data:e,threshold:t})),yo=e=>vo(e,z.value.downsample.threshold),bo=v(()=>{let e=z.value.downsample.threshold;return go.value.map(t=>vo(t.series,e).length)}),xo=v(()=>{let e=-1/0;for(let t=0;t<bo.value.length;t+=1){let n=bo.value[t];n>e&&(e=n)}return e}),So=v(()=>{let e=0;for(let t=0;t<bo.value.length;t+=1){let n=bo.value[t];n>e&&(e=n)}return e}),Co=v(()=>xo.value),W=T({start:0,end:Co.value}),G=T({start:0,end:Co.value}),wo=T(!1),To=T(!1),Eo=T(!1),Do=T(`matrix(1, 0, 0, 1, 0, 0)`),Oo=T(!1),ko=0,Ao=0,jo=0,Mo=0,No=T(null),Po=T(null),Fo=T(null),Io=T(!1),Lo=O({time:0,x:0,y:0,pointerType:null}),Ro=v(()=>B.value.zoom.dragToZoom),zo=v(()=>Ro.value.show&&so.value&&mc.value&&!ho.value),Bo=v(()=>B.value.zoom.preview.enable&&(G.value.start!==W.value.start||G.value.end!==W.value.end));function Vo(e,t){G.value[e]=t}function Ho(e,t){Yi.value&&(q.value&&Lc.value?Yi.value.setRangeValues(-Number(t),-Number(e)):Yi.value.setRangeValues(e,t))}function Uo(e,t){if(!q.value||!Lc.value){Vo(e,t);return}let n=Number(t);Number.isFinite(n)&&Vo(e===`start`?`end`:`start`,-n)}function Wo(e,t=W.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function Go(e){let t=Wo(e);t&&Vi(`update:zoomState`,t)}function Ko(e=W.value){return{start:Number(e.start),end:Number(e.end)}}function qo(e,t){let n=Number(X.value?.left)||0,r=Math.max(0,Number(X.value?.width)||0),i=Number(t?.start),a=Number(t?.end)-i;if(!Number.isFinite(e)||!Number.isFinite(a)||a<=0)return n;if(q.value){let t=(e-i)/a;return t=Lc.value?1-t:t,n+r*t}let o=Math.max(1,a),s=e-i;if(V.value.position===`middle`){let e=r/o;return n+e/2+s*e}return o<=1?n:n+r/(o-1)*s}function Jo(){if(U.value.useIndividualScale)return null;let e=Number(K.value?.min),t=Number(K.value?.max),n=Number(X.value?.bottom)||0,r=Math.max(0,Number(X.value?.height)||0);return!Number.isFinite(e)||!Number.isFinite(t)||t===e||r<=0?null:{min:e,max:t,bottom:n,height:r,reversed:Nc.value}}function Yo(e,t){if(!t)return Number(X.value?.bottom)||0;let n=t.max-t.min;if(!Number.isFinite(e)||!Number.isFinite(n)||n===0)return t.bottom;let r=(e-t.min)/n;return t.reversed&&(r=1-r),t.bottom-t.height*r}function Xo({previousRange:e,targetRange:t,previousYScale:n,targetYScale:r}){let i=Number(t.end)-Number(t.start),a=Number(t.start),o=q.value?Number(t.end):Number(t.end)-1,s=1,c=0;if(Number.isFinite(a)&&Number.isFinite(o)&&(q.value||i>1)){let n=qo(a,t),r=qo(o,t),i=qo(a,e),l=qo(o,e),u=r-n;Number.isFinite(u)&&Math.abs(u)>1e-9&&(s=(l-i)/u,c=i-s*n)}let l=1,u=0;if(n&&r){let e=r.min,t=r.max,i=Yo(e,r),a=Yo(t,r),o=Yo(e,n),s=Yo(t,n),c=a-i;Number.isFinite(c)&&Math.abs(c)>1e-9&&(l=(s-o)/c,u=o-l*i)}return[s,c,l,u].every(Number.isFinite)?`matrix(${s}, 0, 0, ${l}, ${c}, ${u})`:`matrix(1, 0, 0, 1, 0, 0)`}function Zo({resetTransform:e=!0}={}){Mo+=1,ko&&=(cancelAnimationFrame(ko),0),Ao&&=(cancelAnimationFrame(Ao),0),jo&&=(clearTimeout(jo),0),Oo.value=!1,Eo.value=!1,e&&(Do.value=`matrix(1, 0, 0, 1, 0, 0)`)}function Qo(e,t){return!F.value||ho.value||!so.value||!e||!t||typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches?!1:Number.isFinite(e.start)&&Number.isFinite(e.end)&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e.end>e.start&&t.end>t.start}function $o(e,t){let n=Ko();if(!Qo(e,n))return Zo(),!1;let r=Xo({previousRange:e,targetRange:n,previousYScale:t,targetYScale:Jo()});if(r===`matrix(1, 0, 0, 1, 0, 0)`)return Zo(),!1;Zo();let i=++Mo;return yc.value=!0,Eo.value=!0,Oo.value=!1,Do.value=r,ko=requestAnimationFrame(()=>{ko=0,Ao=requestAnimationFrame(()=>{Ao=0,i===Mo&&(Oo.value=!0,Do.value=`matrix(1, 0, 0, 1, 0, 0)`,jo=setTimeout(()=>{jo=0,i===Mo&&(Oo.value=!1,Eo.value=!1,yc.value=!1)},Mi))})}),!0}let es=v(()=>({transform:Do.value,transformOrigin:`0 0`,transformBox:`view-box`,transition:Oo.value?`transform ${Mi}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:Eo.value?`transform`:void 0}));function ts(e){if(!Eo.value||!e)return;let t=Do.value.match(/matrix\(\s*([^,]+),\s*([^,]+),\s*([^,]+),\s*([^,]+),\s*([^,]+),\s*([^\)]+)\s*\)/);if(!t)return;let n=Number(t[1]),r=Number(t[4]),i=Number(t[5]),a=Number(t[6]),o=Number(e.x),s=Number(e.y);if([n,r,i,a,o,s].every(Number.isFinite))return{transform:`matrix(1, 0, 0, 1, ${n*o+i-o}, ${r*s+a-s})`,transformOrigin:`0 0`,transformBox:`view-box`,transition:Oo.value?`transform ${Mi}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:`transform`}}let ns=v(()=>Eo.value?`url(#vue_ui_xy_zoom_clip_${N.value})`:void 0);function rs(e,{transition:t=!1}={}){let n=Wo(e);if(!n)return null;let{start:r,end:i}=n;if(r!==Number(W.value.start)||i!==Number(W.value.end)){let e=t?Ko():null,n=t?Jo():null;wc(),Sc={},W.value={start:r,end:i},G.value={start:r,end:i},as(),t&&$o(e,n)}return{start:Number(W.value.start),end:Number(W.value.end)}}function is(e,{transition:t=!0}={}){let n=rs(e,{transition:t});return n?(Vi(`update:zoomState`,n),n):null}function as(){if(q.value){let e=zu.value.min,t=zu.value.max,n=Number(W.value.start),r=Number(W.value.end);Number.isFinite(n)||(n=e),Number.isFinite(r)||(r=t),n=Math.max(e,Math.min(n,t)),r=Math.max(n,Math.min(r,t)),r<=n&&(n=e,r=t),W.value={start:n,end:r},G.value.start=n,G.value.end=r,Ho(n,r);return}let e=Math.max(1,...go.value.map(e=>yo(e.series).length)),t=Math.max(0,Math.min(W.value.start??0,e-1)),n=Math.max(t+1,Math.min(W.value.end??e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),W.value={start:t,end:n},G.value.start=t,G.value.end=n,Ho(t,n)}let os=v(()=>{let{left:e,top:t,width:n,height:r}=X.value,i=W.value.start,a=W.value.end,o=a-i,s=n/o,c=q.value&&Lc.value,l=c?a-G.value.end:G.value.start-i,u=c?a-G.value.start:G.value.end-i,ee=Math.max(0,Math.min(o,l)),te=Math.max(0,Math.min(o,u));return{x:e+ee*s,y:t,width:(te-ee)*s,height:r,fill:B.value.zoom.preview.fill,stroke:B.value.zoom.preview.stroke,"stroke-width":B.value.zoom.preview.strokeWidth,"stroke-dasharray":B.value.zoom.preview.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:{pointerEvents:`none`,transition:`none !important`,animation:`none !important`}}});Mt(()=>A.selectedXIndex,e=>{if([null,void 0].includes(A.selectedXIndex)){I.value=null;return}let t=e-W.value.start;t<0||e>=W.value.end?I.value=null:I.value=t??null},{immediate:!0});let{isPrinting:ss,isImaging:cs,generatePdf:ls,generateImage:us}=nt({elementId:`vue-ui-xy_${N.value}`,fileName:B.value.title.text||`vue-ui-xy`,options:B.value.userOptions.print}),ds=T(!1),fs=v(()=>Fe(z.value.customPalette)),ps=v(()=>{let e=H.value.yAxis.scaleMin;if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}),ms=v(()=>{let e=K.value.min,t=K.value.max;return Ic({value:e<=0&&t>=0?0:e>0?e:t,scaleMin:e,scaleMax:t,individualHeight:X.value.height})}),hs=v(()=>{let e=H.value.yAxis.scaleMax;if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}),gs=v(()=>ps.value!==null||hs.value!==null),_s=v(()=>Ou(Es.value.filter(e=>!va.value.has(e.id)),0,1)),vs=v(()=>{let{min:e,max:t}=_s.value;if(!gs.value){let t=e;return t>0?0:t}let n=ps.value===null?e>0?0:e:ps.value,r=hs.value===null?t:hs.value;return Ht(e<n?e:n,t>r?t:r).min}),ys=v(()=>{let{min:e,max:t}=_s.value;if(!gs.value){let e=t;return vs.value===e?e+1:e}let n=ps.value===null?e>0?0:e:ps.value,r=hs.value===null?t:hs.value;return Ht(e<n?e:n,t>r?t:r).max}),K=v(()=>H.value.yAxis.useNiceScale?ge(vs.value,ys.value<0?0:ys.value,H.value.yAxis.commonScaleSteps):Pe(vs.value,ys.value<0?0:ys.value,H.value.yAxis.commonScaleSteps)),bs=v(()=>[null,void 0].includes(H.value.yAxis.scaleMin)?K.value.min>=0?0:Math.abs(K.value.min):-K.value.min),q=v(()=>go.value.some(e=>Array.isArray(e.series)&&e.series.some(zt)));Nt(()=>{q.value&&go.value.some(e=>!Cs(e))&&console.warn(`Vue Data UI - VueUiXy: mixed continuous and non-continuous series are not supported in the same chart.
2
-
3
- Continuous mode requires all visible 'line' and 'plot' series to use coordinate-based datasets:
4
- [{ x: number, y: number }]
5
-
6
- Series of type 'bar' and standard numeric series are ignored in continuous mode to prevent runtime errors.
7
-
8
- If you need to mix 'bar', 'line', and 'plot' series in the same chart, all series must use the standard [number, number, number...] format.`)});function xs(e){return e&&typeof e==`object`&&e.x===null&&e.y===null}function Ss(e){return Array.isArray(e)&&e.some(e=>zt(e)||xs(e))}function Cs(e){return!q.value||[`line`,`plot`].includes(e.type)&&Ss(e.series)}function ws(e,t){return xs(e)?{x:null,y:null,index:t,raw:e,isNull:!0}:!e||typeof e!=`object`?{x:null,y:null,index:t,raw:e,isNull:!0,isInvalid:!0}:{x:Number(e.x),y:oe(e.y)?Number(e.y):null,index:t,raw:e,isNull:!1,isInvalid:!1}}function Ts(e){return q.value?e&&typeof e==`object`?e.y:null:e}let Es=v(()=>!ca.value&&!q.value?go.value:go.value.map((e,t)=>{let n=`uniqueId_${t}`,r=Cs(e),i=q.value?r?e.series:[]:yo(e.series),a=q.value?[]:le(e.series,i);return{...e,slotAbsoluteIndex:t,sourceIndices:q.value?void 0:a.slice(W.value.start,W.value.end),series:q.value?i.map((e,t)=>ws(e,t)).filter(e=>e.isInvalid?!1:e.x===null&&e.y===null?W.value.start<=0&&W.value.end>=0:e.x>=W.value.start&&e.x<=W.value.end):i.map(e=>oe(e)?e:null).slice(W.value.start,W.value.end),color:ue(e.color?e.color:fs.value[t]?fs.value[t]:u[t]),id:n,scaleLabel:e.scaleLabel||n}})),Ds=v(()=>Es.value.map((e,t)=>({absoluteIndex:t,...e,series:q.value?e.series.map(e=>({...e,y:e.y===null?null:e.y+bs.value})):e.series.map(e=>e+bs.value),absoluteValues:q.value?e.series.map(e=>e.y):e.series,segregate:()=>kl(e),isSegregated:va.value.has(e.id)}))),J=v(()=>Es.value.map(e=>({...e,series:q.value?e.series.map(e=>({...e,y:e.y===null?null:e.y+bs.value})):e.series.map(e=>e+bs.value),absoluteValues:q.value?e.series.map(e=>e.y):e.series})).filter(e=>!va.value.has(e.id))),Os=v(()=>_a.value.length===Ds.value.length),Y=v(()=>H.value.yAxis.position===`right`);function ks(){let e=Ms.value.scaleLabelsWidth,t=ta.value?Ms.value.yAxisLabelWidth+H.value.axis.yLabelOffsetX+L.value.yAxis:0,n=e+H.value.yAxis.scaleValueOffsetX+H.value.yAxis.crosshairSize;return{left:Y.value?0:n+t,right:Y.value?n+t:0,scaleLabelsOffset:n,yAxisLabelWidth:t}}function As(e){let t=el(e);if(!t){Zc.value=[],Qc.value=null,ja.value=null;return}let n=Number(t.point.x),r=$c.value.matchingPointsByXValue.get(n)||[];Zc.value=r.map(e=>({...e,distance:0})),Qc.value=Ru({x:n}),ja.value=n}function js(e){if(!Number.isFinite(Number(e))){Zc.value=[],Qc.value=null;return}let t=Ru({x:Number(e)});As(t),Qc.value=t}let{metrics:Ms,ready:Ns,settling:Ps,update:Fs}=at({svgRef:F,canMeasure:()=>(!z.value.responsive||Va.value)&&(!H.value.xAxisLabels.show||Zs.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,bottom:0,leftOverhang:0},measure:e=>H.value.xAxisLabels.autoRotate.enable&&Fd()?null:{scaleLabelsWidth:e(ra.value).textWidth,yAxisLabelWidth:e(ta.value).rotatedWidth,xAxisLabelHeight:e(ea.value).height,bottom:e(na.value).height,leftOverhang:e(na.value).leftOverhang}});async function Is(){await Ct(),Fs()}let Ls=v(()=>Ms.value.xAxisLabelHeight+Ms.value.bottom+L.value.xAxis),Rs=v(()=>go.value.some(e=>e.useProgression));function zs(){return H.value.yAxis.crosshairSize+H.value.yAxis.scaleValueOffsetX+5+H.value.yAxis.labelWidth+H.value.axis.yLabelOffsetX+L.value.dataLabels*.8}let X=v(()=>{let e=0,t=0,n=0,r=0;if(H.value.show){if(U.value.useIndividualScale&&!U.value.isStacked)Y.value?t=(go.value.length-_a.value.length)*zs():e=(go.value.length-_a.value.length)*(H.value.yAxis.labelWidth+36);else if(U.value.useIndividualScale&&U.value.isStacked){let n=H.value.yAxis.labelWidth+36;Y.value?t=n:e=n}else{let i=ks();e=i.left,t=i.right,n=i.scaleLabelsOffset,r=i.yAxisLabelWidth}}let i=B.value.labels.fontSize*1.1,a=Rs.value?24:6;e=Math.max(e,Ms.value.leftOverhang-B.value.padding.left-(Y.value?0:H.value.yAxis.crosshairSize));let o=M.value-e-t-a-B.value.padding?.left-B.value.padding?.right;return{top:B.value.padding?.top+i,right:e+(Y.value?0:H.value.yAxis.crosshairSize)+B.value.padding?.left+o,bottom:la.value-Ls.value-B.value.padding?.bottom-H.value.axis.xLabelOffsetY,left:e+(Y.value?0:H.value.yAxis.crosshairSize)+B.value.padding?.left,height:la.value-Ls.value-B.value.padding?.top-B.value.padding?.bottom-i-H.value.axis.xLabelOffsetY,width:o,scaleLabelX:e,rightScaleLabelX:t,scaleLabelsOffset:n,yAxisLabelWidth:r,individualOffsetX:36}}),Bs=v(()=>{let e=+(V.value.position===`middle`),t=Q.value+e,n=h(X.value?.top),r=h(X.value?.bottom);return q.value?V.value.position===`middle`?Iu.value.map((e,t,i)=>{if(t===0)return null;let a=i[t-1],o=a.x+(e.x-a.x)/2;return`M${o},${n} L${o},${r}`}).filter(Boolean).join(` `):Iu.value.map(e=>`M${e.x},${n} L${e.x},${r}`).join(` `):Array.from({length:t}).map((e,t)=>{let i=V.value.position===`middle`?Ul(t):Hl(t);return`M${i},${n} L${i},${r}`}).join(` `)}),Vs=v(()=>{if(!H.value.xAxis.showCrosshairs)return``;let e=H.value.xAxis.crosshairSize,t=H.value.xAxis.crosshairsAlwaysAtZero;return(q.value?Iu.value:rc.value).map((n,r)=>{if(!n||!n.text)return null;let i=q.value?n.x:Hl(r);return`M${i},${t?zc.value-(zc.value===X.value?.bottom?0:e/2):X.value?.bottom} L${i},${t?zc.value+e/(zc.value===X.value?.bottom?1:2):X.value?.bottom+e}`}).filter(Boolean).join(` `)});function Hs(){return!!Ui?.vnode.props?.onSelectTimeLabel}function Us(e,t,n){if(!Oa.value){let e=document.createElement(`canvas`);Oa.value=e.getContext(`2d`)}return Oa.value.font=`${n||`normal`} ${e}px ${t||`sans-serif`}`,Oa.value}function Ws(){let e=qi.value.querySelectorAll(`.vue-ui-xy-tag`);e.length&&Array.from(e).forEach(e=>e.style.opacity=`0`)}function Gs(e,t,n,r,i){n&&(Da.value[`${e}_${t}_${r}_${i}`]=n)}let Ks=T(!1);async function qs(e=!1){await Ct(),Ks.value=e,wa.value&&(Ea.value=e)}function Js(){qs(!0)}function Ys(){qs(!1)}function Xs(){pa.value=!pa.value}let Z=O([]),Zs=T(!1),Qs=O([]),$s=0;Nt(()=>{let e=++$s;(async()=>{let t=xo.value,n=await tt({values:H.value.xAxisLabels.values,maxDatapoints:t,formatter:H.value.xAxisLabels.datetimeFormatter,start:W.value.start,end:W.value.end});e===$s&&(Z.value=n,Zs.value=!0)})()});let ec=0;Nt(()=>{let e=++ec;(async()=>{let t=xo.value,n=await tt({values:H.value.xAxisLabels.values,maxDatapoints:t,formatter:H.value.xAxisLabels.datetimeFormatter,start:0,end:Co.value});e===ec&&(Qs.value=n)})()});let tc=v(()=>{let e=Math.max(1,Math.floor(Number(H.value.xAxisLabels.modulo)||1)),t=(Z.value||[]).map(e=>e?.text??``),n=(Qs.value||[]).map(e=>e?.text??``),r=W.value.start??0,i=r>0||t.length<n.length;return xe({configuredModulo:e,visibleTexts:t,allTexts:n,startAbs:r,isZoomed:i})});function nc(e=null){let t=H.value.xAxisLabels,n=Z.value||[],r=Qs.value||[],i=W.value.start??0,a=Q.value,o=n.map(e=>e?.text??``),s=r.map(e=>e?.text??``),c=ye(!!t.showOnlyFirstAndLast,!!t.showOnlyAtModulo,tc.value,o,s,i,e,a);if(!t.showFirstAndLast||t.showOnlyFirstAndLast||!c.length)return c;let l=c.length-1;return c.map((e,t)=>t!==0&&t!==l?e:{...e,text:o[t]??``})}let rc=v(()=>nc(I.value)),ic=v(()=>nc(null)),ac=v(()=>(ic.value||[]).map(e=>e?.text??``).join(`|`));Tt(()=>{Wa.stop(),Pa.value&&=(Pa.value.disconnect(),null)});function oc(e,t){let n=J.value.map(e=>({shape:e.shape??e.type===`bar`?`square`:`circle`,name:e.name,color:e.color,type:e.type,value:e.absoluteValues.find((e,n)=>n===t),comments:e.comments||[],prefix:e.prefix||B.value.labels.prefix,suffix:e.suffix||B.value.labels.suffix}));Vi(`selectTimeLabel`,{datapoint:n,absoluteIndex:e.absoluteIndex,label:e.text})}let Q=v(()=>{let e=Wt((W.value.end??0)-(W.value.start??0));return Math.max(1,e)});function sc(e){q.value||(P.value=e)}function cc(e){if(!q.value||!Ce(e)){ja.value=null,Zc.value=[],Qc.value=null;return}let t=Number(e),n=Lc.value?-t:t;ja.value=n,js(n)}let lc=v(()=>q.value?Ce(ja.value)||Ce(Qc.value):![null,void 0].includes(I.value)||![null,void 0].includes(P.value));function uc(){U.value.isStacked=!U.value.isStacked,U.value.isStacked?U.value.useIndividualScale=!0:U.value.useIndividualScale=H.value.yAxis.useIndividualScale}function dc(e){fo.value&&e.autoScaling&&(H.value.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${e.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`),H.value.yAxis.stacked||console.warn(`VueUiXy (datapoint: ${e.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))}function fc(e){let t=xo.value;return e>t?t:e<0||B.value.zoom.startIndex!==null&&e<B.value.zoom.startIndex?B.value.zoom.startIndex===null?1:B.value.zoom.startIndex+1:e}let pc=T(!1),mc=T(!1),hc=T(0),gc=T(0);function _c(e=!0){if(!pc.value){pc.value=!0;try{if(q.value){let t=zu.value.min,n=zu.value.max;hc.value=t,gc.value=n,W.value.start=t,W.value.end=n,G.value.start=t,G.value.end=n,mc.value=!0,e&&A.zoomState?rs(A.zoomState):Ho(t,n);return}let{startIndex:t,endIndex:n}=B.value.zoom,r=B.value.zoom.keepState?So.value:xo.value;if(B.value.zoom.keepState&&r<=0)return;hc.value=0,gc.value=r;let i=t??0,a=n==null?r:Math.min(fc(n+1),r);vc.value=!0,W.value.start=i,W.value.end=a,G.value.start=i,G.value.end=a,as(),mc.value=!0,e&&A.zoomState&&rs(A.zoomState)}finally{queueMicrotask(()=>{vc.value=!1}),pc.value=!1}}}let vc=T(!1);Mt([()=>A.zoomState,mc],([e,t])=>{t&&e&&rs(e,{transition:!0})},{deep:!0,immediate:!0});let yc=T(!1),bc=null,xc=null,Sc={};function Cc(e=W.value){return Number(e.end)-Number(e.start)}function wc(){bc&&=(cancelAnimationFrame(bc),null),xc&&=(cancelAnimationFrame(xc),null)}function Tc(e){Sc={...Sc,...e},bc&&cancelAnimationFrame(bc),bc=requestAnimationFrame(()=>{let e=Cc(),t={...W.value,...Sc},n=Cc(t);yc.value=n!==e,W.value=t,G.value={...t},Sc={},bc=null,as(),Go({start:Number(W.value.start),end:Number(W.value.end)}),xc&&cancelAnimationFrame(xc),xc=requestAnimationFrame(()=>{yc.value=!1,xc=null})})}function Ec(e){if(q.value&&Lc.value){let t=Number(e);if(!Number.isFinite(t))return;kc(-t)}else Oc(e)}function Dc(e){if(q.value&&Lc.value){let t=Number(e);if(!Number.isFinite(t))return;Oc(-t)}else kc(e)}function Oc(e){if(pc.value||vc.value)return;let t=Number(e);Vi(`zoomStart`,{index:t,isZoom:Bt(t,hc.value)}),Number.isFinite(t)&&t!==W.value.start&&Tc({start:t})}function kc(e){if(pc.value||vc.value)return;if(q.value){let t=Number(e);if(!Number.isFinite(t))return;let n=Math.max(Number(W.value.start)+1/10**H.value.xAxis.rounding,Math.min(t,zu.value.max));if(Vi(`zoomEnd`,{index:n,isZoom:Bt(n,gc.value)}),n===W.value.end)return;Tc({end:n});return}let t=fc(e);Vi(`zoomEnd`,{index:t,isZoom:Bt(t,gc.value)}),t!==W.value.end&&Tc({end:t})}async function Ac(){let e=Ko(),t=Jo();yc.value=!0,_c(!1),$o(e,t)||(await Ct(),yc.value=!1),Go({start:Number(W.value.start),end:Number(W.value.end)}),Vi(`zoomReset`)}let jc=v(()=>K.value.max+bs.value);function Mc(e){return e/(It(jc.value)?jc.value:1)}let Nc=v(()=>H.value.yAxis.reverse);function Pc(e){return Nc.value?1-e:e}function Fc({ratio:e,yOffset:t=0,individualHeight:n}){let r=Pc(e);return X.value?.bottom-t-n*r}function Ic({value:e,scaleMin:t,scaleMax:n,yOffset:r=0,individualHeight:i}){return Fc({ratio:(e-t)/(n-t||1),yOffset:r,individualHeight:i})}let Lc=v(()=>H.value.xAxis.reverse);function Rc(e){return Lc.value?1-e:e}let zc=v(()=>isNaN(Mc(bs.value))?X.value?.bottom:X.value?.bottom-X.value.height*Mc(bs.value));function Bc(e){let t=K.value.min,n=K.value.max-t;return!Number.isFinite(e)||!Number.isFinite(n)||n===0?X.value?.bottom:X.value?.bottom-X.value.height*((e-t)/n)}let Vc=v(()=>K.value.min<=0&&K.value.max>=0?Bc(0):K.value.min>0?Bc(K.value.min):Bc(K.value.max));function Hc(e){let t=![null,void 0].includes(H.value.yAxis.scaleMin)&&H.value.yAxis.scaleMin>0&&vs.value>=0?X.value?.bottom:zc.value;return e.value>=0?p(t-e.y<=0?1e-5:t-e.y):p(e.y-zc.value<=0?1e-5:e.y-zc.value)}function Uc(e){return e.value>=0?p(e.zeroPosition-e.y<=0?1e-5:e.zeroPosition-e.y):p(e.y-e.zeroPosition<=0?1e-5:e.zeroPosition-e.y)}let Wc=v(()=>{let e=Math.max(1,Q.value);return{bar:Ut(Math.max(1,X.value.width),e*iu.value,1),plot:Bl.value,line:Bl.value}});function Gc(){return U.value.useIndividualScale&&U.value.isStacked?Wc.value.line-X.value.width/Q.value*.1:Wc.value.bar}function Kc(e){return U.value.useIndividualScale&&U.value.isStacked?e.x+X.value.width/Q.value*.05:e.x+Wc.value.bar/2}function qc(e){return U.value.useIndividualScale&&U.value.isStacked?e.x+Wc.value.line/2:Kc(e)+Gc()/2-lu.value/2}function Jc(e){return e.value>=0?e.y:[null,void 0,NaN,1/0,-1/0].includes(zc.value)?X?.bottom.value:zc.value}function Yc(e){return e.value>=0?e.y:[null,void 0,NaN,1/0,-1/0].includes(e.zeroPosition)?0:e.zeroPosition}let Xc=T(null),Zc=T([]),Qc=T(null),$c=v(()=>{if(!q.value)return{sortedPoints:[],matchingPointsByXValue:/* @__PURE__ */ new Map};let e=[],t=/* @__PURE__ */ new Map,n=0;for(let r=0;r<J.value.length;r+=1){let i=J.value[r];if([`line`,`plot`].includes(i.type)&&Array.isArray(i.series))for(let r=0;r<i.series.length;r+=1){let a=i.series[r];if(!Ce(a?.x)||!Ce(a?.y))continue;let o=Number(a.x),s=Ru(a),c={datapoint:i,point:a,index:r,x:s,y:a.y,distance:0,sourceOrder:n};e.push({...c,xValue:o}),t.has(o)||t.set(o,[]),t.get(o).push(c),n+=1}}return e.sort((e,t)=>e.x===t.x?e.sourceOrder-t.sourceOrder:e.x-t.x),{sortedPoints:e,matchingPointsByXValue:t}});function el(e){let t=$c.value.sortedPoints;if(!t.length)return null;let n=0,r=t.length-1;for(;n<=r;){let i=Math.floor((n+r)/2);t[i].x<e?n=i+1:r=i-1}let i=/* @__PURE__ */ new Set;n>=0&&n<t.length&&i.add(n),n-1>=0&&n-1<t.length&&i.add(n-1),n+1>=0&&n+1<t.length&&i.add(n+1);let a=null;return i.forEach(n=>{let r=t[n],i=Math.abs(r.x-e);(!a||i<a.distance||i===a.distance&&r.sourceOrder<a.sourceOrder)&&(a={...r,distance:i})}),a}let tl=v(()=>q.value?Array.from($c.value.matchingPointsByXValue.keys()).sort((e,t)=>Ru({x:e})-Ru({x:t})):[]);function nl(e){let t=tl.value[e];if(!Ce(t)){Zc.value=[],Qc.value=null,ja.value=null,ha.value=!1;return}js(Number(t));let n=Ru({x:Number(t)}),r=X.value.top+X.value.height/2,i=Ne(n,r,F.value);i&&(Na.value=i),I.value=e,Ma.value=e,ha.value=!0}function rl(e){let t=F.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y,ok:!0}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height),a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n?.left-s)/i+r.x,y:(e.clientY-n?.top-c)/i+r.y,ok:!0}}let il=v(()=>{if(!wo.value||No.value==null||Po.value==null)return null;let e=Math.min(No.value,Po.value),t=Math.abs(Po.value-No.value);return{x:e,y:X.value.top,width:t,height:X.value.height}}),al=v(()=>mc.value?Bt(Number(W.value.start),Number(hc.value))||Bt(Number(W.value.end),Number(gc.value)):!1);function ol(e){return Math.min(Math.max(e,X.value.left),X.value.right)}function sl(){yl&&=(cancelAnimationFrame(yl),0),Xc.value=null,P.value=null,ja.value=null,Zc.value=[],Qc.value=null,Dd(!1,null)}function cl(e){let t=e?.pointerId==null?Fo.value:e.pointerId;t!=null&&F.value?.hasPointerCapture?.(t)&&F.value.releasePointerCapture(t),wo.value=!1,No.value=null,Po.value=null,Fo.value=null}function ll(){Io.value=!0,setTimeout(()=>{Io.value=!1},0)}function ul(e){if(!zo.value||!al.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=Lo.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(Lo.value={time:0,x:0,y:0,pointerType:null},ll(),cl(e),Ac(),!0):(Lo.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function dl(e){let t=Math.max(1,X.value.width),n=Rc(Math.max(0,Math.min(1,(e-X.value.left)/t))),r=Number(Fu.value.min),i=r+n*(Number(Fu.value.max)-r||1);return Math.max(Number(W.value.start),Math.min(i,Number(W.value.end)))}function fl(e,t){if(q.value){let n=dl(e),r=dl(t),i=Math.min(n,r),a=Math.max(n,r);return!Number.isFinite(i)||!Number.isFinite(a)||a<=i?null:{start:i,end:a}}let n=Kl(e),r=Kl(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(W.value.start)+i,end:Number(W.value.start)+a+1}}function pl(e){let t=is(e,{transition:!0});return t?(Vi(`zoomStart`,{index:t.start,isZoom:Bt(t.start,hc.value)}),Vi(`zoomEnd`,{index:t.end,isZoom:Bt(t.end,gc.value)}),t):null}function ml(){To.value=!0,F.value?.classList?.add(`vue-ui-xy-chart-zoom-pointer-focus`)}function hl(){To.value=!1,F.value?.classList?.remove(`vue-ui-xy-chart-zoom-pointer-focus`)}function gl(e){if(!zo.value||pa.value||e.button!==void 0&&e.button!==0||Fo.value!=null&&e.pointerId!==Fo.value)return;let t=rl(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=X.value;if(t.x<n||t.x>r||t.y<i||t.y>a)return;let o=Number(W.value.end)-Number(W.value.start);!Number.isFinite(o)||o<=0||(ml(),F.value?.focus?.({preventScroll:!0}),sl(),Fo.value=e.pointerId,wo.value=!0,No.value=ol(t.x),Po.value=ol(t.x))}function _l(e){if(!zo.value||!wo.value||Fo.value!=null&&e.pointerId!==Fo.value)return;let t=rl(e);t&&(Po.value=ol(t.x),No.value!=null&&Math.abs(Po.value-No.value)>=2&&!F.value?.hasPointerCapture?.(e.pointerId)&&F.value?.setPointerCapture?.(e.pointerId))}function vl(e){if(!zo.value||!wo.value||Fo.value!=null&&e.pointerId!==Fo.value)return;let t=rl(e);t&&(Po.value=ol(t.x));let n=No.value,r=Po.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,X.value.width*.01)){if(ul(e))return;cl(e);return}let i=fl(Math.min(n,r),Math.max(n,r));i?(cl(e),pl(i)&&(Lo.value={time:0,x:0,y:0,pointerType:null},sl(),ll())):cl(e)}let yl=0;function bl(e){Ma.value=null,!(pa.value||wo.value)&&(yl&&cancelAnimationFrame(yl),yl=requestAnimationFrame(()=>{yl=0;let t=rl(e);if(!t||!F.value){xl();return}let{left:n,right:r,top:i,bottom:a}=X.value;if(t.x<n||t.x>r||t.y<i||t.y>a){xl();return}if(q.value){As(t.x),Dd(!0,I.value??0);return}let o=Kl(t.x);o==null?xl():Xc.value!==o&&(Xc.value=o,Dd(!0,o))}))}function xl(){yl&&=(cancelAnimationFrame(yl),0),Xc.value=null,P.value=null,ja.value=null,Dd(!1,null),Zc.value=[],Qc.value=null}function Sl(e){if(Io.value){Io.value=!1;return}let t=rl(e);if(t&&F.value){let{left:e,right:n,top:r,bottom:i}=X.value;if(t.x>=e&&t.x<=n&&t.y>=r&&t.y<=i){let e=Kl(t.x);if(e!=null){Cl(e);return}}}Xc.value!=null&&Cl(Xc.value)}function Cl(e){let t=J.value.map(t=>({...t,name:t.name,value:[null,void 0,NaN].includes(t.absoluteValues[e])?null:t.absoluteValues[e],color:t.color,type:t.type}));Vi(`selectX`,{datapoint:t,index:e,indexLabel:H.value.xAxisLabels.values[e]}),z.value.events.datapointClick&&z.value.events.datapointClick({datapoint:t,seriesIndex:e+W.value.start})}function wl(){return Ds.value.map(e=>({values:e.absoluteValues,color:e.color,name:e.name,type:e.type}))}async function Tl({scale:e=2}={}){if(!qi.value)return;let{imageUri:t,base64:n}=await Ge({domElement:qi.value,base64:!0,img:!0,scale:e}),r=qi.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await _e(t,e)??i;return{imageUri:t,base64:n,title:B.value.title.text,...a}}function El(){_a.value.length?_a.value=[]:Ds.value.forEach(e=>{_a.value.push(e.id)}),Ol()}function Dl(e,t){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),kl(t))}function Ol(){Vi(`selectLegend`,J.value.map(e=>({name:e.name,values:e.absoluteValues,color:e.color,type:e.type})))}function kl(e){if(yc.value=!1,xc&&=(cancelAnimationFrame(xc),null),va.value.has(e.id))_a.value=_a.value.filter(t=>t!==e.id);else{if(_a.value.length+1===Es.value.length)return;_a.value.push(e.id)}Ol(),Ca.value+=1}function Al(e){return Ds.value.length?Ds.value.find(t=>t.name===e)||(fo.value&&console.warn(`VueUiXy - Series name not found "${e}"`),null):(fo.value&&console.warn(`VueUiXy - There are no series to show.`),null)}function jl(e){let t=Al(e);t!==null&&va.value.has(t.id)&&kl({id:t.id})}function Ml(e){let t=Al(e);t!==null&&(va.value.has(t.id)||kl({id:t.id}))}let Nl=v(()=>`${B.value.title.text||`Chart visualization`}. ${B.value.title.subtitle.text||``}`),Pl=v(()=>({linePlot:Q.value>z.value.line.dot.hideAboveMaxSerieLength})),Fl=v(()=>B.value.userOptions.show&&(!B.value.title.show||!B.value.title.text)),Il=v(()=>{if(Array.isArray(B.value.highlightArea))return B.value.highlightArea.map(e=>{let t=Math.min(e.to,Co.value-1);return{...e,span:e.from===t?1:t<e.from?0:t-e.from+1}});let e={...B.value.highlightArea,to:Math.min(B.value.highlightArea.to,Co.value-1)};return[{...e,span:e.from===e.to?1:e.to<e.from?0:e.to-e.from+1}]}),Ll=v(()=>ca.value?go.value.map((e,t)=>({...e,series:yo(e.series),id:`uniqueId_${t}`,color:ue(e.color?e.color:fs.value[t]?fs.value[t]:u[t])})):go.value),Rl=v(()=>J.value.map(e=>{let t=e.absoluteValues.map(e=>[void 0,null].includes(e)?null:e);return{id:e.id,name:e.name,color:e.color,values:Lt(Q.value,t)}})),zl=v(()=>({responsiveBreakpoint:z.value.table.responsiveBreakpoint,roundingValues:z.value.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:B.value.fontFamily,prefix:B.value.labels.prefix,suffix:B.value.labels.suffix,colNames:Z.value.map((e,t)=>z.value.table.useDefaultTimeFormat?e.text:ld.value(t+W.value.start,z.value.table.timeFormat)),thead:{backgroundColor:z.value.table.th.backgroundColor,color:z.value.table.th.color,outline:z.value.table.th.outline},tbody:{backgroundColor:z.value.table.td.backgroundColor,color:z.value.table.td.color,outline:z.value.table.td.outline},userOptions:{show:!1},sparkline:{animation:{show:!1},cutNullValues:z.value.line.cutNullValues}})),Bl=v(()=>{let e=Math.max(0,X.value?.width||0);return V.value.position===`middle`?Ut(e,Math.max(1,Q.value),1):Ut(e,Math.max(1,Q.value-1),0)}),Vl=v(()=>V.value.position===`middle`?Bl.value:Q.value<=1?Math.max(0,X.value?.width||0):Bl.value);function Hl(e){let t=X.value?.left||0;return V.value.position===`middle`?t+Bl.value/2+Bl.value*e:t+Bl.value*e}function Ul(e){let t=X.value?.left||0;return V.value.position===`middle`?t+Bl.value*e:Q.value<=1?t:t+Bl.value*e-Bl.value/2}function Wl(e){return Math.max(X.value?.left||0,Ul(e))}function Gl(e){let t=X.value?.left||0,n=X.value?.right||0,r=Ul(e),i=r+Vl.value;return Math.max(1e-5,Math.min(n,i)-Math.max(t,r))}function Kl(e){let t=X.value?.left||0,n=X.value?.right||0,r=Q.value;if(r<=0||e<t||e>n)return null;let i=Bl.value;if(i<=0)return 0;let a;return a=V.value.position===`middle`?Math.ceil((e-t)/i)-1:r<=1?0:Math.ceil((e-t)/i-.5),a<0?0:a>=r?r-1:a}function ql(e){let t=X.value?.left||0,n=X.value?.right||0,r=Ul(e),i=r+Vl.value;return Math.max(1e-5,Math.min(n,i)-Math.max(t,r))}function Jl(e){return Math.max(1e-5,Vl.value*e)}let Yl=v(()=>Oe(Ds.value.filter(e=>!va.value.has(e.id)))),Xl=[`bar`,`line`,`plot`],Zl=v(()=>Yl.value.filter(e=>Xl.includes(e.type))),Ql=v(()=>Zl.value.length),$l=v(()=>Zl.value.filter(e=>e.type===`bar`)),eu=v(()=>Zl.value.filter(e=>e.type===`line`)),tu=v(()=>Zl.value.filter(e=>e.type===`plot`)),nu=v(()=>Es.value.filter(e=>e.type===`bar`&&!va.value.has(e.id))),ru=v(()=>nu.value.length),iu=v(()=>Math.max(1,ru.value)),au=v(()=>{let e=Rt(Yl.value,e=>e.scaleLabel),t={};for(let[n,r]of Object.entries(e)){let e=1/0,i=-1/0,a=!1;for(let t=0;t<r.length;t+=1){let n=r[t].absoluteValues||[];for(let t=0;t<n.length;t+=1){let r=n[t],o=r===null?0:Number(r);if(Number.isNaN(o)){e=NaN,i=NaN,a=!0;break}a=!0,o<e&&(e=o),o>i&&(i=o)}if(Number.isNaN(e)||Number.isNaN(i))break}t[n]={min:a?e:0,max:a?i:1,groupId:Mu(`scale_group`,[n])}}return t}),ou=v(()=>Yl.value.reduce((e,t)=>{let n=t.scaleLabel||``;return e[n]=(e[n]||0)+1,e},{}));function su({datapoint:e,scaleYLabels:t,autoScaleYLabels:n,zeroPosition:r,autoScaleZeroPosition:i,individualMax:a,autoScaleMax:o,yOffset:s,individualHeight:c}){let l=e.scaleLabel||``;return{...au.value[l]||{},name:e.name,groupName:l,groupColor:H.value.yAxis.groupColor||e.color,color:e.color,scaleYLabels:e.autoScaling?n:t,zeroPosition:e.autoScaling?i:r,individualMax:e.autoScaling?o:a,scaleLabel:l,id:e.id,yOffset:s,individualHeight:c,autoScaleYLabels:n,unique:ou.value[l]===1}}let cu=v(()=>X.value.width/Q.value/ru.value-lu.value*ru.value),lu=v(()=>Wc.value.line*z.value.bar.periodGap),uu=v(()=>Math.max(1e-5,Gc()-(U.value.useIndividualScale&&U.value.isStacked?0:lu.value))),du=v(()=>uu.value*Math.min(Math.abs(z.value.bar.innerGap),.95)),fu=v(()=>{if(!B.value.zoom.minimap.show)return[];let e=Ll.value.filter(e=>!va.value.has(e.id)),t=0;for(let n=0;n<e.length;n+=1){let r=e[n].series.length;r>t&&(t=r)}let n=[];for(let r=0;r<t;r+=1){let t=0;for(let n=0;n<e.length;n+=1)t+=e[n].series[r]||0;n.push(t)}let r=Au(n,0,1).min;return n.map(e=>e+(r<0?Math.abs(r):0))});function pu(e){if([null,void 0].includes(e))return e;let t=Number(e);return Number.isFinite(t)?-t:e}let mu=v(()=>{if(!B.value.zoom.minimap.show)return[];let e=q.value&&Lc.value,t=q.value&&Nc.value;return Ll.value.map(n=>{let r=t?{scaleMin:pu(n.scaleMax),scaleMax:pu(n.scaleMin)}:{};return{...n,...r,series:e||t?n.series.map(n=>zt(n)?{...n,x:e?-n.x:n.x,y:t?-n.y:n.y}:n):n.series,isVisible:!va.value.has(n.id)}})}),hu=v(()=>!q.value||!Lc.value?Bu.value:-Vu.value),gu=v(()=>!q.value||!Lc.value?Vu.value:-Bu.value),_u=v(()=>!q.value||!Lc.value?W.value.start:-Number(W.value.end)),vu=v(()=>!q.value||!Lc.value?W.value.end:-Number(W.value.start)),yu=v(()=>!q.value||!Ce(ja.value)?ja.value:Lc.value?-Number(ja.value):Number(ja.value)),bu=v(()=>{let e=H.value.yAxis.scaleMin,t=H.value.yAxis.scaleMax;return!q.value||!Nc.value?e:pu(t)}),xu=v(()=>{let e=H.value.yAxis.scaleMin,t=H.value.yAxis.scaleMax;return!q.value||!Nc.value?t:pu(e)}),Su=v(()=>Z.value.length?q.value&&Lc.value?Z.value.at(-1)?.text||``:Z.value[0]?.text||``:``),Cu=v(()=>Z.value.length?q.value&&Lc.value?Z.value[0]?.text||``:Z.value.at(-1)?.text||``:``),wu=v(()=>q.value?Zc.value.map(e=>({slotAbsoluteIndex:e.datapoint.slotAbsoluteIndex,shape:e.datapoint.shape||e.datapoint.type===`bar`?`square`:`circle`,name:e.datapoint.name,color:e.datapoint.color,type:e.datapoint.type,value:e.point.raw?.y??e.point.y,x:e.point.raw?.x??e.point.x,comments:e.datapoint.comments||[],prefix:e.datapoint.prefix||B.value.labels.prefix,suffix:e.datapoint.suffix||B.value.labels.suffix})):J.value.map(e=>({slotAbsoluteIndex:e.slotAbsoluteIndex,shape:e.shape||e.type===`bar`?`square`:`circle`,name:e.name,color:e.color,type:e.type,value:e.absoluteValues.find((e,t)=>t===I.value),comments:e.comments||[],prefix:e.prefix||B.value.labels.prefix,suffix:e.suffix||B.value.labels.suffix}))),Tu=v(()=>K.value.ticks.map(e=>{let t=e>=0?zc.value-X.value.height*Mc(e):zc.value+X.value.height*Mc(Math.abs(e));return{y:Nc.value?X.value.top+X.value.bottom-t:t,value:e,prefix:B.value.labels.prefix,suffix:B.value.labels.suffix}})),Eu=v(()=>{let e=B.value.annotations;if(!e||!Array.isArray(e)||e.every(e=>!e.show))return[];let t=e.filter(e=>e.show&&(e.yAxis.yTop!=null||e.yAxis.yBottom!=null));if(!t.length)return[];let{left:n,right:r}=X.value,i=zc.value,a=X.value.height,o=K.value.min,s=K.value.max-o,c=e=>{let t=(e-0)/s;return i-t*a};return t.map((e,t)=>{let{yAxis:{yTop:i,yBottom:a,label:o}}=e,s=i!=null&&a!=null&&i!==a,l=i==null?null:c(i),u=a==null?null:c(a),ee=Us(o.fontSize);ee.font=`${o.fontSize}px sans-serif`;let te=ee.measureText(o.text).width,d=o.fontSize,ne=(o.position===`start`?n+o.padding?.left:r-o.padding?.right)+o.offsetX,re=(l!=null&&u!=null?Math.min(l,u):l??u)-o.fontSize/3+o.offsetY-o.padding?.top,f;f=o.textAnchor===`middle`?ne-te/2-o.padding?.left:o.textAnchor===`end`?ne-te-o.padding?.right:ne-o.padding?.left;let ie=re-d*.75-o.padding?.top;return{show:![l,u,ie].includes(NaN),id:Mu(`annotation_y`,[t,i,a,o.text]),hasArea:s,areaHeight:s?Math.abs(l-u):0,yTop:l,yBottom:u,config:e.yAxis,x1:n,x2:r,_text:{x:ne,y:re},_box:{x:f,y:ie,width:te+o.padding?.left+o.padding?.right,height:d+o.padding?.top+o.padding?.bottom,fill:o.backgroundColor,stroke:o.border.stroke,rx:o.border.rx,ry:o.border.ry,strokeWidth:o.border.strokeWidth}}})});function Du(e,t){let n=e[t-1],r=e[t+1],i=!!n&&!!r&&n.value==null&&r.value==null||!n&&!!r&&r.value==null||!!n&&!r&&n.value==null;return It(e[t].value)&&i&&z.value.line.cutNullValues}function Ou(e,t=0,n=1){let r=1/0,i=-1/0,a=!1;for(let t=0;t<e.length;t+=1){let n=e[t];if(Array.isArray(n.series))for(let e=0;e<n.series.length;e+=1){let t=Ts(n.series[e]);Number.isFinite(t)&&(a=!0,t<r&&(r=t),t>i&&(i=t))}}return a?{min:r,max:i}:{min:t,max:n}}function ku(e,t=0,n=1){let r=1/0,i=-1/0,a=!1;for(let t=0;t<e.length;t+=1){let n=e[t];if(Array.isArray(n.series))for(let e=0;e<n.series.length;e+=1){let t=n.series[e];if(!zt(t))continue;let o=Number(t.x);Number.isFinite(o)&&(a=!0,o<r&&(r=o),o>i&&(i=o))}}return a?{min:r,max:r===i?i+1:i}:{min:t,max:n}}function Au(e,t=0,n=1){if(!Array.isArray(e)||e.length===0)return{min:t,max:n};let r=1/0,i=-1/0;for(let t=0;t<e.length;t+=1){let n=e[t],a=n===null?0:Number(n);if(Number.isNaN(a))return{min:NaN,max:NaN};a<r&&(r=a),a>i&&(i=a)}return{min:r,max:i}}function ju(e){let t=String(e??``),n=0;for(let e=0;e<t.length;e+=1)n=(n<<5)-n+t.charCodeAt(e),n|=0;return Math.abs(n).toString(36)}function Mu(e,t){return`${e}_${ju(t.join(`|`))}`}function Nu(){return ho.value||Eo.value||yc.value||!z.value.line.showTransition?void 0:`all ${z.value.line.transitionDurationMs}ms ease-in-out`}let Pu=v(()=>ku(Es.value,0,1)),Fu=v(()=>{let e=H.value.xAxis.commonScaleSteps,t=H.value.xAxis.scaleMin,n=H.value.xAxis.scaleMax,r=t!==null&&Number.isFinite(Number(t))?Number(t):Pu.value.min,i=n!==null&&Number.isFinite(Number(n))?Number(n):Pu.value.max,a=H.value.xAxis.useNiceScale?ge(r,i,e):Pe(r,i,e);if(V.value.position!==`start`)return a;let o=a.ticks.length>1?a.ticks[1]-a.ticks[0]:1;return{...a,max:a.max+o}}),Iu=v(()=>q.value?(Lc.value?[...Fu.value.ticks].reverse():[...Fu.value.ticks]).map((e,t)=>({id:`continuous_x_label_${t}`,text:g(H.value.xAxis.formatter,e,n({v:e,s:B.value.labels.prefix,p:B.value.labels.suffix,r:H.value.xAxis.rounding}),{datapoint:e,seriesIndex:t}),value:e,x:Ru({x:e}),index:t})):rc.value);function Lu(e,t){return q.value?e.x:Hl(t)}function Ru({x:e}){let t=Fu.value.max-Fu.value.min||1,n=Rc((e-Fu.value.min)/t);return X.value.left+X.value.width*n}let zu=v(()=>ku(go.value,0,1)),Bu=v(()=>q.value?zu.value.min:0),Vu=v(()=>q.value?zu.value.max:Co.value);function Hu(e,t){return q.value?e.x==null||e.y==null?null:Ru(e):Hl(t)}function Uu(e){return!q.value||!e?null:e.x??null}function Wu({datapoint:e,totalSeries:t,gap:n,usableHeight:r,autoScaleValueMin:i,autoScaleValueMax:a,individualExtremes:o,forceExactScale:s=!1}){let c=e.scaleSteps||H.value.yAxis.commonScaleSteps,l=1.0000001,u=s||!H.value.yAxis.useNiceScale?Pe:ge,ee=o.max===o.min?o.max*l:o.max,te=a===i?a*l:a,d=u(o.min,ee,c),ne=u(i,te,c),re=d.min>=0?0:Math.abs(d.min),f=d.max+Math.abs(re),ie=ne.max+0,ae=e.stackIndex,oe=t-1-ae,se=U.value.isStacked?1-e.cumulatedStackRatio:0,ce=U.value.isStacked?r*se+n*oe:0,le=U.value.isStacked?r*e.stackRatio:X.value.height;return{scaleSteps:c,individualScale:d,autoScaleSteps:ne,individualZero:re,autoScaleZero:0,individualMax:f,autoScaleMax:ie,yOffset:ce,individualHeight:le,zeroPosition:X.value?.bottom-ce-le*re/f,autoScaleZeroPosition:X.value?.bottom-ce-le*0/ie}}function Gu({datapoint:e,clampNegativeAutoScaleMaximum:t=!1}){let n=au.value[e.scaleLabel],r=n.min,i=n.max;return{ratios:e.absoluteValues.filter(e=>![null,void 0].includes(e)).map(e=>(e-r)/(i-r)),valueMin:r,valueMax:t&&i<0?0:i}}function Ku({datapoint:e,filterMinimumValues:t=!1,preserveLooseMinimumExpression:n=!1}){let r=Au(e.absoluteValues,0,1),i=Au(t?e.absoluteValues.filter(e=>![null,void 0].includes(e)):e.absoluteValues,0,1).min;return{max:e.scaleMax||r.max||1,min:n?e.scaleMin||i>0?0:i:e.scaleMin||(i>0?0:i)}}function qu({values:e,autoScaleSteps:t}){return e.map(e=>t.min>=0?(e-Math.abs(t.min))/(t.max-Math.abs(t.min)):(e+Math.abs(t.min))/(t.max+Math.abs(t.min)))}function Ju({datapoint:e,individualScale:t,yOffset:n,individualHeight:r}){return t.ticks.map(i=>({y:Ic({value:i,scaleMin:t.min,scaleMax:t.max,yOffset:n,individualHeight:r}),value:i,prefix:e.prefix||B.value.labels.prefix,suffix:e.suffix||B.value.labels.suffix,datapoint:e}))}function Yu({datapoint:e,autoScaleSteps:t,yOffset:n,individualHeight:r}){return t.ticks.map(i=>({y:Fc({ratio:(i-t.min)/(t.max-t.min||1),yOffset:n,individualHeight:r}),value:i,prefix:e.prefix||B.value.labels.prefix,suffix:e.suffix||B.value.labels.suffix,datapoint:e}))}function Xu({datapoint:e,totalSeries:t,gap:n,usableHeight:r,forceExactScale:i=!1,clampNegativeAutoScaleMaximum:a=!1,filterMinimumValues:o=!1,preserveLooseMinimumExpression:s=!1}){dc(e);let c=Gu({datapoint:e,clampNegativeAutoScaleMaximum:a}),l=Ku({datapoint:e,filterMinimumValues:o,preserveLooseMinimumExpression:s}),u=Wu({datapoint:e,totalSeries:t,gap:n,usableHeight:r,autoScaleValueMin:c.valueMin,autoScaleValueMax:c.valueMax,individualExtremes:l,forceExactScale:i});return{autoScale:c,individualExtremes:l,scaleYLabels:Ju({datapoint:e,individualScale:u.individualScale,yOffset:u.yOffset,individualHeight:u.individualHeight}),autoScaleYLabels:Yu({datapoint:e,autoScaleSteps:u.autoScaleSteps,yOffset:u.yOffset,individualHeight:u.individualHeight}),autoScaleRatiosToNiceScale:qu({values:e.absoluteValues,autoScaleSteps:u.autoScaleSteps}),...u}}function Zu(e){return Array.isArray(e)?e.slice(W.value.start,W.value.end):[]}function Qu(e,t){return Array.isArray(e)&&e[t+W.value.start]||``}let $u=v(()=>{let e=Ql.value,t=H.value.yAxis.gap,n=U.value.isStacked?t*(e-1):0,r=X.value.height-n;return $l.value.map((n,i)=>{let{individualScale:a,autoScaleSteps:o,individualZero:s,individualMax:c,autoScaleMax:l,yOffset:u,individualHeight:ee,zeroPosition:te,autoScaleZeroPosition:d,scaleYLabels:ne,autoScaleYLabels:re,autoScaleRatiosToNiceScale:f}=Xu({datapoint:n,totalSeries:e,gap:t,usableHeight:r,clampNegativeAutoScaleMaximum:!0,filterMinimumValues:!0,preserveLooseMinimumExpression:!0}),ie=ru.value,ae=Zu(n.comments),oe=n.series.map((e,t)=>{let r=U.value.useIndividualScale?(n.absoluteValues[t]+s)/c:Mc(e),a=U.value.useIndividualScale&&U.value.isStacked?X.value?.left+X.value.width/Q.value*t:X.value?.left+Wc.value.bar*i+Wc.value.bar*t*ie-cu.value/2-i*lu.value;return{yOffset:p(u),individualHeight:p(ee),x:p(a),y:Fc({ratio:r,yOffset:u,individualHeight:ee}),value:n.absoluteValues[t],zeroPosition:p(te),individualMax:p(c),comment:ae[t]||``}}),se=n.series.map((e,t)=>{let r=U.value.useIndividualScale&&U.value.isStacked?X.value?.left+X.value.width/Q.value*t:X.value?.left-Wc.value.bar/2+Wc.value.bar*i+Wc.value.bar*t*Ds.value.filter(e=>e.type===`bar`).filter(e=>!va.value.has(e.id)).length;return{yOffset:p(u),individualHeight:p(ee),x:p(r),y:p(Fc({ratio:f[t]||0,yOffset:p(u),individualHeight:p(ee)})),value:n.absoluteValues[t],zeroPosition:p(te),individualMax:p(c),comment:ae[t]||``}}),ce=su({datapoint:n,scaleYLabels:ne,autoScaleYLabels:re,zeroPosition:te,autoScaleZeroPosition:d,individualMax:c,autoScaleMax:l,yOffset:u,individualHeight:ee});return{...n,yOffset:u,autoScaleYLabels:re,individualHeight:ee,scaleYLabels:n.autoScaling?re:ne,individualScale:n.autoScaling?o:a,individualMax:n.autoScaling?l:c,zeroPosition:n.autoScaling?d:te,plots:n.autoScaling?se:oe,scaleGroup:ce,groupId:ce.groupId}})});function ed(e){return String(e||``).split(`;`).filter(Boolean).join(` M`)}let $=v(()=>{let e=Ql.value,t=H.value.yAxis.gap,n=U.value.isStacked?t*(e-1):0,i=X.value.height-n;return eu.value.map((n,a)=>{let{individualScale:o,autoScaleSteps:c,individualZero:u,individualMax:te,autoScaleMax:d,yOffset:f,individualHeight:ie,zeroPosition:oe,autoScaleZeroPosition:le,scaleYLabels:me,autoScaleYLabels:he,autoScaleRatiosToNiceScale:ge}=Xu({datapoint:n,totalSeries:e,gap:t,usableHeight:i}),_e=Zu(n.comments),ve=(e,t)=>{if(q.value&&Number.isFinite(e?.index))return e.index;let r=n.sourceIndices?.[t];if(Number.isFinite(r)&&r>=0)return r;let i=Number(W.value.start);return Number.isFinite(i)?Math.trunc(i)+t:t},ye=n.series.map((e,t)=>{if(q.value&&(e.x==null||e.y==null))return{index:t,sourceIndex:ve(e,t),x:null,y:null,value:null,datasetXValue:Uu(e),comment:n.comments&&n.comments.slice(W.value.start,W.value.end)[t]||``};let r=U.value.useIndividualScale?(n.absoluteValues[t]+Math.abs(u))/te:Mc(Ts(e));return{index:t,sourceIndex:ve(e,t),x:p(Hu(e,t)),datasetXValue:Uu(e),y:p(Fc({ratio:r,yOffset:f,individualHeight:ie})),value:n.absoluteValues[t],comment:_e[t]||``}}),m=n.series.map((e,t)=>q.value&&(e.x===null||e.y===null)?{index:t,sourceIndex:ve(e,t),x:null,y:null,datasetXValue:Uu(e),value:null,comment:_e[t]||``}:[void 0,null].includes(n.absoluteValues[t])?{index:t,sourceIndex:ve(e,t),x:p(Hu(e,t)),y:oe,value:n.absoluteValues[t],comment:_e[t]||``}:{index:t,sourceIndex:ve(e,t),x:p(Hu(e,t)),datasetXValue:Uu(e),y:p(Fc({ratio:ge[t]||0,yOffset:f,individualHeight:ie})),value:n.absoluteValues[t],comment:_e[t]||``}),h=z.value.line.cutNullValues,be=!h&&z.value.line.nullDashes?.show===!0,xe=h?ye:ye.filter(e=>e.value!==null),g=h?m:m.filter(e=>e.value!==null),Se=Array.isArray(n.dashIndices)?n.dashIndices.map(e=>Math.trunc(Number(e))).filter(Number.isFinite):[],Ce=new Set(Se),we=n.autoScaling?g:xe,Te=(n.autoScaling?m:ye).reduce((e,t,n)=>(Ce.has(t.sourceIndex)&&e.push(n),e),[]);function Ee(e,t){let n=e?.sourceIndex,r=t?.sourceIndex;if(!Number.isFinite(n)||!Number.isFinite(r))return!1;let i=Math.min(n,r),a=Math.max(n,r);for(let e of Se)if(e>=i&&e<=a)return!0;return!1}function De(e){let t=/* @__PURE__ */ new Set;for(let n=1;n<e.length;n+=1)Ee(e[n-1],e[n])&&t.add(n-1);return t}function Oe(e){let t=/* @__PURE__ */ new Set;if(!be)return t;for(let n=1;n<e.length;n+=1){let r=e[n-1]?.sourceIndex,i=e[n]?.sourceIndex;Number.isFinite(r)&&Number.isFinite(i)&&Math.abs(i-r)>1&&t.add(n-1)}return t}let ke=De(we),Ae=Oe(we),je=/* @__PURE__ */ new Set([...ke,...Ae]),Me=h?Te.length>0:ke.size>0,Ne=be&&Ae.size>0,Pe=Me||Ne,Fe=h?ee(ye):se(xe),Ie=h?ee(m):se(g),Le=h?pe(ye):de(xe),Re=h?pe(m):de(g),ze=ed(fe(xe)),Be=ed(fe(g)),Ve=Pe?h?s(we,Te):ne(we,je):[],He=Pe?h?re(we,Te):ce(we,je):[],Ue=n.useStepper&&Pe?l(we,je):[],We=su({datapoint:n,scaleYLabels:me,autoScaleYLabels:he,zeroPosition:oe,autoScaleZeroPosition:le,individualMax:te,autoScaleMax:d,yOffset:f,individualHeight:ie}),Ge=U.value.useIndividualScale?n.autoScaling?le:oe:ms.value,Ke=Math.max(Math.max(n.autoScaling?le:me.at(-1)?me.at(-1).y:0,X.value?.top),Ge),qe=n.autoScaling?m:ye,Je=n.absoluteValues.filter(e=>![null,void 0,NaN].includes(e)),Ye=!!n.temperatureColors&&new Set(Je).size<=1;return{...n,isFlatTemperatureLine:Ye,temperatureColors:n.temperatureColors?n.temperatureColors.map(e=>ue(e)):null,yOffset:f,autoScaleYLabels:he,individualHeight:ie,scaleYLabels:n.autoScaling?he:me,individualScale:n.autoScaling?c:o,individualMax:n.autoScaling?d:te,zeroPosition:n.autoScaling?le:oe,curve:n.useStepper?n.autoScaling?Be:ze:n.autoScaling?Ie:Fe,plots:n.autoScaling?m:ye,dashedStraight:Ve,dashedSmooth:He,dashedStepper:Ue,hasDashedSegments:Pe,area:n.useArea?n.useStepper?fe(qe,Ke):U.value.useIndividualScale?r(n.autoScaling?m:ye,Ke):r(ye,Ke):``,curveAreas:n.useArea?n.useStepper?fe(qe,Ke).split(`;`).filter(Boolean).map(e=>`M${e}Z`):ae(n.autoScaling?m:ye,Ke,!0):[],straight:n.useStepper?n.autoScaling?Be:ze:n.autoScaling?Re:Le,scaleGroup:We,groupId:We.groupId}})}),td=v(()=>{let e=Ql.value,t=H.value.yAxis.gap,n=U.value.isStacked?t*(e-1):0,r=X.value.height-n;return tu.value.map(n=>{let{individualScale:i,autoScaleSteps:a,individualZero:o,individualMax:s,autoScaleMax:c,yOffset:l,individualHeight:u,zeroPosition:ee,autoScaleZeroPosition:te,scaleYLabels:d,autoScaleYLabels:ne,autoScaleRatiosToNiceScale:re}=Xu({datapoint:n,totalSeries:e,gap:t,usableHeight:r,forceExactScale:!0,preserveLooseMinimumExpression:!0}),f=Zu(n.comments),ie=n.series.map((e,t)=>{if(q.value&&(e.x==null||e.y==null))return{index:t,x:null,datasetXValue:Uu(e),y:null,value:null,comment:f[t]||``};let r=U.value.useIndividualScale?(n.absoluteValues[t]+Math.abs(o))/s:Mc(Ts(e));return{index:t,x:p(Hu(e,t)),datasetXValue:Uu(e),y:p(Fc({ratio:r,yOffset:l,individualHeight:u})),value:n.absoluteValues[t],comment:f[t]||``}}),ae=n.series.map((e,t)=>q.value&&(e.x===null||e.y===null)?{index:t,x:null,datasetXValue:Uu(e),y:null,value:null,comment:f[t]||``}:{index:t,x:p(Hu(e,t)),datasetXValue:Uu(e),y:p(Fc({ratio:re[t]||0,yOffset:l,individualHeight:u})),value:n.absoluteValues[t],comment:f[t]||``}),oe=su({datapoint:n,scaleYLabels:d,autoScaleYLabels:ne,zeroPosition:ee,autoScaleZeroPosition:te,individualMax:s,autoScaleMax:c,yOffset:l,individualHeight:u});return{...n,yOffset:l,autoScaleYLabels:ne,individualHeight:u,scaleYLabels:n.autoScaling?ne:d,individualScale:n.autoScaling?a:i,individualMax:n.autoScaling?c:s,zeroPosition:n.autoScaling?te:ee,plots:n.autoScaling?ae:ie,scaleGroup:oe,groupId:oe.groupId}})}),nd=v(()=>[...$.value,...$u.value.map(e=>({...e,plots:e.plots.map(e=>({...e,x:p(qc(e)),y:p(e.y)}))})),...td.value]),rd=v(()=>{let e=Object.entries(au.value).reduce((e,[t,n])=>(e[t]={...n,scaleLabel:t},e),{});return[...$.value,...$u.value,...td.value].forEach(t=>{t.scaleGroup&&(e[t.scaleLabel||``]={...e[t.scaleLabel||``],...t.scaleGroup})}),e}),id=v(()=>{let e=$.value.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||``,id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||X.value.height,autoScaleYLabels:e.autoScaleYLabels})),t=$u.value.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||``,id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||X.value.height})),n=td.value.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||``,id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||X.value.height})),r=U.value.useIndividualScale&&!U.value.isStacked?Object.values(rd.value):[...e,...t,...n],i=r.flatMap(e=>e).length;return r.flatMap((e,t)=>{let n=0;n=U.value.isStacked?Y.value?X.value?.right:X.value?.left:Y.value?X.value?.right+zs()*t:X.value?.left/i*(t+1);let r=U.value.useIndividualScale&&!U.value.isStacked?e.unique?e.name:e.groupName:e.name;return{unique:e.unique,id:e.id,groupId:e.groupId,scaleLabel:e.scaleLabel,name:g(H.value.yAxis.serieNameFormatter,r,r,e),color:U.value.useIndividualScale&&!U.value.isStacked?e.unique?e.color:e.groupColor:e.color,scale:e.scale,yOffset:e.yOffset,individualHeight:e.individualHeight,x:n,yLabels:e.scaleYLabels||e.scale.ticks.map(t=>({y:Ic({value:t,scaleMin:e.scale.min,scaleMax:e.scale.max,yOffset:e.yOffset||0,individualHeight:e.individualHeight}),value:t}))}})}),ad=v(()=>{let e=z.value.line.interLine||{},t=e.pairs||[],n=e.colors||[];if(!t.length)return[];let r=[];return t.forEach((e,t)=>{let[i,a]=Array.isArray(e)?e:[e.a,e.b];if(!i||!a)return;let o=$.value.find(e=>e.name===i),s=$.value.find(e=>e.name===a);if(!o||!s||o.type!==`line`||s.type!==`line`)return;let c=n?.[t]?.[0]??o.color,l=n?.[t]?.[1]??s.color;we({lineA:o.plots,lineB:s.plots,smoothA:!!o.smooth,smoothB:!!s.smooth,stepperA:!!o.useStepper,stepperB:!!s.useStepper,colorLineA:c,colorLineB:l,sampleStepPx:2,cutNullValues:!0}).forEach((e,n)=>{r.push({...e,key:`inter_${i}_${a}_${t}_${n}`})})}),r}),od=v(()=>{let e=Zc.value[0]?.index??null,t=q.value?e:I.value;return{timeLabel:q.value?{text:String(Zc.value[0]?.point.raw?.x??Zc.value[0]?.point.x),absoluteIndex:e}:Z.value[I.value],datapoint:wu.value,seriesIndex:I.value,selectedIndex:t,absoluteIndex:q.value?e:I.value+W.value.start,series:Ds.value,bars:$u.value,lines:$.value,plots:td.value,config:z.value}}),sd=O({months:[],shortMonths:[],days:[],shortDays:[]}),cd=0;Nt(()=>{let e=++cd,t=H.value.xAxisLabels.datetimeFormatter;(async()=>{let n=await et(t.locale).catch(()=>et(`en`));e===cd&&(sd.value=n.data)})()});let ld=v(()=>{let e=H.value.xAxisLabels.datetimeFormatter,t=$e({useUTC:e.useUTC,locale:sd.value,januaryAsYear:e.januaryAsYear});return(e,n)=>{let r=H.value.xAxisLabels.values?.[e];return r==null?``:t.formatDate(new Date(r),n)}}),ud=v(()=>(H.value.xAxisLabels.values||[]).map((e,t)=>({text:ld.value(t,B.value.zoom.timeFormat),absoluteIndex:t}))),dd=/* @__PURE__ */ new Map;function fd(e){return{absoluteIndex:I.value+W.value.start,seriesIndex:I.value,datapoint:wu.value,series:Ds.value,bars:$u.value,lines:$.value,plots:td.value,config:z.value,dateLabel:e}}function pd(e){return[fa.value[e.type],e.shape||``,e.color,B.value.tooltip.backgroundColor,!!Hi.pattern,N.value,e.slotAbsoluteIndex].join(`|`)}function md(e){let t=pd(e);if(dd.has(t))return dd.get(t);let n=B.value.tooltip.backgroundColor,r=``,a=``;switch(fa.value[e.type]){case`bar`:r=`<svg viewBox="0 0 40 40" height="14" width="14">${Hi.pattern?`<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${e.color}" />`:``}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${Hi.pattern?`url(#pattern_${N.value}_${e.slotAbsoluteIndex})`:e.color}" /></svg>`;break;case`line`:!e.shape||![`star`,`triangle`,`square`,`diamond`,`pentagon`,`hexagon`].includes(e.shape)?a=`<circle cx="10" cy="8" r="4" stroke="${n}" stroke-width="0.5" fill="${e.color}" />`:e.shape===`triangle`?a=`<path d="${f({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`square`?a=`<path d="${f({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`diamond`?a=`<path d="${f({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`pentagon`?a=`<path d="${f({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`hexagon`?a=`<path d="${f({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`star`&&(a=`<polygon stroke="${n}" stroke-width="0.5" fill="${e.color}" points="${i({plot:{x:10,y:8},radius:4})}" />`),r=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${n}" stroke-width="0.5" height="3" width="20" fill="${e.color}" />${a}</svg>`;break;case`plot`:if(!e.shape||![`star`,`triangle`,`square`,`diamond`,`pentagon`,`hexagon`].includes(e.shape)){r=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${n}" stroke-width="1" fill="${e.color}" /></svg>`;break}if(e.shape===`star`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${n}" stroke-width="1" fill="${e.color}" points="${i({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(e.shape===`triangle`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${f({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`square`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${f({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`diamond`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${f({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`pentagon`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${f({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`hexagon`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${f({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}}return dd.set(t,r),r}let hd=v(()=>{let e=``,t=wu.value.map(e=>e.value).filter(e=>oe(e)&&e!==null).reduce((e,t)=>Math.abs(e)+Math.abs(t),0),r=q.value?{text:g(H.value.xAxis.formatter,Zc.value[0]?.point.raw?.x??Zc.value[0]?.point.x,n({v:Zc.value[0]?.point.raw?.x??Zc.value[0]?.point.x,r:B.value.tooltip.roundingValue}),{datapoint:null,serriesIndex:null})}:Z.value[I.value],i=B.value.tooltip.customFormat;if(o(i))try{let e=i(fd(r));if(typeof e==`string`)return e}catch(e){console.warn(`Vue Data UI - VueUiXy: custom tooltip formatter failed.`,e)}if(r&&r.text&&B.value.tooltip.showTimeLabel){let t=ld.value(I.value+W.value.start,B.value.tooltip.timeFormat);q.value||(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.tooltip.borderColor}; width:100%">${H.value.xAxisLabels.datetimeFormatter.enable&&!B.value.tooltip.useDefaultTimeFormat?t:r.text}</div>`)}return wu.value.forEach(i=>{if(oe(i.value)){let a=md(i),o=B.value.tooltip.showValue?g(i.type===`line`?z.value.line.labels.formatter:i.type===`bar`?z.value.bar.labels.formatter:z.value.plot.labels.formatter,i.value,n({p:i.prefix,v:i.value,s:i.suffix,r:B.value.tooltip.roundingValue}),{datapoint:i}):``,s=B.value.tooltip.showValue?r?.text??``:``,c=q.value?`
9
- <span>${H.value.axis.xLabel||`X`}: </span>
10
- <span>${s}</span>,
11
- <span>${H.value.axis.yLabel||`Y`}: </span>
12
- <span>${o}</span>
13
- `:o;q.value?e+=`
14
- <div style="display:flex;flex-direction:column;">
15
- <div style="display:flex; flex-direction:row; gap:3px;">
16
- <div style="width:20px">${a}</div>
17
- <div style="display:flex;flex-direction:column;">
18
- <div>${i.name}</div>
19
- <div>${c}</div>
20
- </div>
21
- </div>
22
- </div>
23
- `:e+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;white-space:nowrap;"><div style="width:20px">${a}</div> ${i.name}: <b>${c}</b> ${B.value.tooltip.showPercentage?`(${n({v:p(Math.abs(i.value)/t*100),s:`%`,r:B.value.tooltip.roundingPercentage})})`:``}</div>`;let l=Qu(i.comments,I.value);B.value.comments.showInTooltip&&l&&(e+=`<div class="vue-data-ui-tooltip-comment" style="background:${d(i.color,12.5)}; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${i.color}">${l}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${B.value.tooltip.color}">${e}</div>`}),gd=v(()=>{if(!q.value)return[];let e=/* @__PURE__ */ new Set,t=[];return J.value.forEach(n=>{n.series.forEach(n=>{let r=Number(n?.x);if(!Number.isFinite(r))return;let i=String(r);e.has(i)||(e.add(i),t.push(r))})}),t.sort((e,t)=>Lc.value?t-e:e-t)});function _d(e){let t=Number(e);return Number.isFinite(t)?g(H.value.xAxis.formatter,t,n({v:t,r:z.value.table.rounding}),{datapoint:t,seriesIndex:null}):`-`}function vd(e){return q.value?_d(e):z.value.table.useDefaultTimeFormat?Z.value[e]?.text??`-`:ld.value(e+W.value.start,z.value.table.timeFormat)}function yd(e,t){if(q.value){let n=Number(t);return Number.isFinite(n)?e.series.find(e=>Number(e?.x)===n)?.y??null:null}return e.absoluteValues[t]}function bd(e,t){let n=yd(e,t);return It(n)?Number(n.toFixed(z.value.table.rounding)):``}function xd(e,t){let r=yd(e,t);return It(r)?g(e.type===`line`?z.value.line.labels.formatter:e.type===`bar`?z.value.bar.labels.formatter:z.value.plot.labels.formatter,r,n({p:e.prefix||B.value.labels.prefix,v:r,s:e.suffix||B.value.labels.suffix,r:z.value.table.rounding})):``}function Sd(e){return J.value.map(t=>yd(t,e)??0).reduce((e,t)=>e+t,0)}let Cd=v(()=>{if(q.value)return gd.value.map(e=>{let t=Sd(e);return{period:vd(e),csvValues:J.value.map(t=>bd(t,e)),formattedValues:J.value.map(t=>xd(t,e)),sum:t,formattedSum:t.toFixed(z.value.table.rounding)}});let e=[];for(let t=0;t<Q.value;t+=1){let n=Sd(t);e.push({period:vd(t),csvValues:J.value.map(e=>bd(e,t)),formattedValues:J.value.map(e=>xd(e,t)),sum:n,formattedSum:n.toFixed(z.value.table.rounding)})}return e}),wd=v(()=>Es.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:J.value.map(e=>({label:e.name,color:e.color,type:e.type})),body:Cd.value.map(e=>[e.period].concat(e.csvValues))}),Td=v(()=>{let e=z.value.table.showSum,t=[q.value?H.value.axis.xLabel||`X`:``].concat(J.value.map(e=>e.name));e&&(t=t.concat(`__SUM__`));let n=Cd.value.map(t=>[t.period].concat(t.formattedValues,e?t.formattedSum:[])),r={th:{backgroundColor:z.value.table.th.backgroundColor,color:z.value.table.th.color,outline:z.value.table.th.outline},td:{backgroundColor:z.value.table.td.backgroundColor,color:z.value.table.td.color,outline:z.value.table.td.outline},breakpoint:z.value.table.responsiveBreakpoint},i=[q.value?H.value.axis.xLabel||`X`:z.value.table.columnNames.period].concat(J.value.map(e=>e.name),z.value.table.columnNames.total);return{head:t,body:n,config:r,colNames:i}});function Ed(e=null){let t=[[B.value.title.text],[B.value.title.subtitle.text],[``]],n=[q.value?H.value.axis.xLabel||`X`:z.value.table.columnNames.period,...wd.value.head.map(e=>e.label)],r=wd.value.body,i=t.concat([n]).concat(r),o=a(i);e?e(o):De({csvContent:o,title:B.value.title.text||`vue-ui-xy`})}function Dd(e,t=null){if(Os.value)return;ha.value=e;let n=J.value.map(e=>({...e,name:e.name,value:[null,void 0,NaN].includes(e.absoluteValues[t])?null:e.absoluteValues[t],color:e.color,type:e.type}));e?(I.value=t,z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:n,seriesIndex:t+W.value.start})):(I.value=null,z.value.events.datapointLeave&&z.value.events.datapointLeave({datapoint:n,seriesIndex:t+W.value.start}))}function Od(){U.value.showTable=!U.value.showTable}function kd(){U.value.dataLabels.show=!U.value.dataLabels.show}function Ad(){U.value.showTooltip=!U.value.showTooltip}function jd(e){ma.value=e,ya.value+=1}function Md(){z.value.responsiveProportionalSizing?(L.value.dataLabels=Me({relator:la.value,adjuster:400,source:H.value.fontSize,threshold:10,fallback:10}),L.value.yAxis=Me({relator:M.value,adjuster:1e3,source:H.value.axis.fontSize,threshold:10,fallback:10}),L.value.xAxis=Me({relator:M.value,adjuster:1e3,source:H.value.xAxisLabels.fontSize,threshold:10,fallback:10}),L.value.plotLabels=Me({relator:M.value,adjuster:800,source:B.value.labels.fontSize,threshold:10,fallback:10}),eo.value.plot=Me({relator:M.value,adjuster:800,source:z.value.plot.radius,threshold:1,fallback:1}),eo.value.line=Me({relator:M.value,adjuster:800,source:z.value.line.radius,threshold:1,fallback:0}),eo.value.selectedLine=Me({relator:M.value,adjuster:800,source:z.value.line.dot.selectedRadius,threshold:1,fallback:0})):(L.value.dataLabels=H.value.fontSize,L.value.yAxis=H.value.axis.fontSize,L.value.xAxis=H.value.xAxisLabels.fontSize,L.value.plotLabels=B.value.labels.fontSize,eo.value.plot=z.value.plot.radius,eo.value.line=z.value.line.radius,eo.value.selectedLine=z.value.line.dot.selectedRadius)}function Nd(){if(Le(A.dataset)?(ve({componentName:`VueUiXy`,type:`dataset`,debug:fo.value}),_o.value=!0):A.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&(ve({componentName:`VueUiXy`,type:`datasetSerieAttribute`,property:`name (string)`,index:t,debug:fo.value}),_o.value=!0)}),fo.value&&A.dataset.forEach(e=>{e.series.forEach((t,n)=>{oe(t)||console.warn(`VueUiXy has detected an unsafe value in your dataset:\n-----> The serie '${e.name}' contains the value '${t}' at index ${n}.\n'${t}' was converted to null to allow the chart to display.`)})}),Le(A.dataset)||(_o.value=z.value.loading),wa.value=B.value.userOptions.showOnChartHover,Ta.value=B.value.userOptions.keepStateOnChartLeave,Ea.value=!B.value.userOptions.showOnChartHover,uo(),z.value.responsive){let e=qi.value.parentNode;aa.value&&(oa.value&&aa.value.unobserve(oa.value),aa.value.disconnect(),aa.value=null,oa.value=null);let{height:t,width:n}=e.getBoundingClientRect(),r=null,i=0;B.value.title.show&&Ji.value&&(r=Ji.value,i=r.getBoundingClientRect().height);let a=null,o=0;B.value.zoom.show&&Co.value>6&&so.value&&Yi.value&&Yi.value.$el&&(a=Yi.value.$el,o=a.getBoundingClientRect().height);let s=null,c=0;B.value.legend.show&&Xi.value&&(s=Xi.value,c=s.getBoundingClientRect().height);let l=0;Zi.value&&(l=Zi.value.getBoundingClientRect().height);let u=0;Qi.value&&(u=Qi.value.getBoundingClientRect().height),la.value=t-i-c-o-l-u-12,M.value=n,ua.value=`0 0 ${M.value<0?10:M.value} ${la.value<0?10:la.value}`,Md();let ee=new ResizeObserver(e=>{for(let t of e)i=B.value.title.show&&Ji.value?Ji.value.getBoundingClientRect().height:0,o=Yi.value&&Yi.value.$el?Yi.value.$el.getBoundingClientRect().height:0,c=Xi.value?Xi.value.getBoundingClientRect().height:0,l=Zi.value?Zi.value.getBoundingClientRect().height:0,u=Qi.value?Qi.value.getBoundingClientRect().height:0,requestAnimationFrame(()=>{la.value=t.contentRect.height-i-c-o-l-u-12,M.value=t.contentBoxSize[0].inlineSize??t.contentRect.width,ua.value=`0 0 ${M.value<0?10:M.value} ${la.value<0?10:la.value}`,Md(),Ya()})});aa.value=ee,oa.value=e,ee.observe(e)}else la.value=B.value.height,M.value=B.value.width,L.value.dataLabels=H.value.fontSize,L.value.yAxis=H.value.axis.fontSize,L.value.xAxis=H.value.xAxisLabels.fontSize,L.value.plotLabels=B.value.labels.fontSize,eo.value.plot=z.value.plot.radius,eo.value.line=z.value.line.radius,eo.value.selectedLine=z.value.line.dot.selectedRadius,ua.value=`0 0 ${M.value} ${la.value}`;Ya()}function Pd(e){da.value={x:e.clientX,y:e.clientY}}Et(()=>{Nd(),_c(),document.addEventListener(`mousemove`,Pd,{passive:!0}),document.addEventListener(`scroll`,Ws,{passive:!0})}),Tt(()=>{document.removeEventListener(`scroll`,Ws,{passive:!0}),document.removeEventListener(`mousemove`,Pd,{passive:!0}),aa.value&&(oa.value&&aa.value.unobserve(oa.value),aa.value.disconnect(),aa.value=null,oa.value=null),Ud(),cl(),wc(),Zo()});let{detectTimeLabelCollisionNow:Fd}=ot({timeLabelsEls:na,timeLabels:Z,slicer:W,configRef:z,rotationPath:[`chart`,`grid`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`chart`,`grid`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:ds,height:la,width:M,rotation:H.value.xAxisLabels.autoRotate.angle,resizeDebounceMs:0}),Id=T(!1),Ld=O(null),Rd=T(200),zd=v(()=>I.value??P.value??0),Bd=v(()=>{if(!q.value)return null;if(Ce(ja.value))return Number(ja.value);let e=Zc.value[0];return Ce(e?.point?.x)?Number(e.point.x):null});function Vd(){let e=Math.ceil(Rd.value||200);return Math.min(Math.max(e,1),200)}function Hd(){let e=Vd(),t=(q.value&&Ce(Bd.value)?Ru({x:Bd.value}):Hl(zd.value))-e/2-(200-e)/2,n=X.value?.left-(200-e)/2,r=X.value?.right-(200+e)/2;return p(Math.max(n,Math.min(t,r)))}function Ud(){Ra.value!==null&&(cancelAnimationFrame(Ra.value),Ra.value=null),Ia.value&&La.value&&Ia.value.unobserve(La.value),Ia.value&&=(Ia.value.disconnect(),null),za.value&&=(za.value(),null),La.value=null}function Wd(e){Ra.value!==null&&cancelAnimationFrame(Ra.value),Ra.value=requestAnimationFrame(()=>{Rd.value=Math.min(Math.max(Math.ceil(e||0),1),200),Ra.value=null})}function Gd(e){Ia.value&&e&&(La.value&&La.value!==e&&(Ia.value.unobserve(La.value),La.value=null),e!==La.value&&(Ct(()=>{e.offsetParent!==null&&Wd(e.offsetWidth||e.getBoundingClientRect().width||200)}),Ia.value.observe(e),La.value=e))}Et(()=>{Ia.value=new ResizeObserver(e=>{let t=e.find(e=>e.target===La.value)||e[0];t&&Wd(t.contentRect.width||200)}),za.value=Nt(e=>{let t=Ld.value;t?(Gd(t),e(()=>{Ia.value&&La.value&&La.value!==Ld.value&&(Ia.value.unobserve(La.value),La.value=null)})):Ia.value&&La.value&&(Ia.value.unobserve(La.value),La.value=null)})});let Kd=v(()=>{if(q.value){if(!Number.isFinite(Number(Bd.value)))return``}else if([null,void 0].includes(I.value)&&[null,void 0].includes(P.value))return``;let e=(I.value==null?0:I.value)||(P.value==null?0:P.value),t=B.value.timeTag.customFormat;if(Id.value=!1,q.value){let e=Bd.value;if(o(t))try{let n=t({absoluteIndex:e,seriesIndex:e,datapoint:wu.value,bars:$u.value,lines:$.value,plots:td.value,config:z.value});if(typeof n==`string`)return Id.value=!0,n}catch{console.warn(`Custom format cannot be applied on timeTag.`),Id.value=!1}return n({v:e,r:H.value.xAxis.rounding})}if(o(t))try{let n=t({absoluteIndex:e+W.value.start,seriesIndex:e,datapoint:wu.value,bars:$u.value,lines:$.value,plots:td.value,config:z.value});if(typeof n==`string`)return Id.value=!0,n}catch{console.warn(`Custom format cannot be applied on timeTag.`),Id.value=!1}if(!Id.value)return[null,void 0].includes(Z.value[e])?``:H.value.xAxisLabels.datetimeFormatter.enable&&!B.value.timeTag.useDefaultFormat?ld.value(e+W.value.start,B.value.timeTag.timeFormat):Z.value[e].text});function qd({serie:e,plot:t,type:r}){if(!It(t.value))return``;let i=n({p:e.prefix||B.value.labels.prefix,v:t.value,s:e.suffix||B.value.labels.suffix,r:z.value[r].labels.rounding}),a=t.datasetXValue,o=q.value&&Ce(a)?`x: ${n({v:a,r:H.value.xAxis.rounding})}\ny: ${i}`:g(z.value[r].labels.formatter,t.value,i,{datapoint:t,serie:e});return te({content:o,fontSize:L.value.plotLabels,fill:z.value[r].labels.color,x:0,y:0})}function Jd({plot:e}){let t=z.value.bar.labels.offsetY,n=Math.abs(Uc(e)),r=e.value<0,i={x:qc(e)+z.value.bar.labels.offsetX,y:p(e.y)+(z.value.bar.labels.alwaysOnTop?t-(r?n:0):e.value>=0?t:-t*3)};return`translate(${i.x}, ${i.y}) rotate(${z.value.bar.labels.rotation})`}function Yd({plot:e,type:t}){let n=z.value[t].labels.offsetY,r={x:e.x+z.value[t].labels.offsetX,y:p(e.y)+(z.value[t].labels.alwaysOnTop||e.value>=0?n:-n*3)};return`translate(${r.x}, ${r.y}) rotate(${z.value[t].labels.rotation})`}function Xd({plot:e,type:t}){if(z.value[t].labels.textAnchor!=null)return z.value[t].labels.textAnchor;let n=e.value>=0;return z.value[t].labels.rotation===0?`middle`:z.value[t].labels.alwaysOnTop||n?`start`:`end`}let Zd=v(()=>q.value?Ce(ja.value)?Ru({x:Number(ja.value)}):Ce(Qc.value)?Qc.value:null:Hl(I.value??P.value??0)),Qd=v(()=>B.value.highlighter.crosshairs.show&&lc.value),$d=v(()=>[...$.value,...td.value,...$u.value].flatMap(e=>(e.plots||[]).map((e,t)=>({plot:e,index:t})).filter(({plot:t,index:n})=>nf(e,t,n)).filter(({plot:e})=>It(e.value)).map(({plot:t,index:n})=>({...t,index:t.index??n,serie:e,x:p(e.type===`bar`?qc(t):t.x),y:p(t.y)})))),ef=v(()=>{if(!Qd.value)return null;if(q.value){let e=Zc.value[0],t=e?.point?.raw?.x??e?.point?.x;return Ce(t)?{x:Zd.value,text:g(H.value.xAxis.formatter,t,n({v:t,r:B.value.tooltip.roundingValue}))}:null}let e=I.value===null?P.value:I.value;return e==null?null:{x:Hl(e),text:Z.value[e]?.text??``}});function tf(e){return H.value.yAxis.position===`right`?X.value.right:X.value.left}function nf(e,t,n){return q.value?Zc.value.some(n=>n.datapoint.id===e.id&&n.index===t.index):I.value!==null&&I.value===n||P.value!==null&&P.value===n}function rf({serie:e,plot:t,index:n,type:r}){return!t||!It(t.value)||!z.value[r].labels.show||!U.value.dataLabels.show?!1:!Object.hasOwn(e,`dataLabels`)||e.dataLabels===!0||nf(e,t,n)}function af(e,t){let n=[];return e.forEach((e,r)=>{(Array.isArray(e.plots)?e.plots:[]).forEach((i,a)=>{rf({serie:e,plot:i,index:a,type:t})&&n.push({key:`data_label_${t}_${e.id}_${(i.index??a)+W.value.start}`,serie:e,serieIndex:r,plot:i,plotIndex:a})})}),n}let of=v(()=>af($u.value,`bar`)),sf=v(()=>af(td.value,`plot`)),cf=v(()=>af($.value,`line`));Mt(()=>A.dataset,e=>{if(Array.isArray(e)&&e.length>0&&(_o.value=!1),B.value.zoom.keepState){let e=Co.value;if(e>0){let t=W.value.start,n=W.value.end;if(!mc.value||t===0&&n===0)_c();else{let r=Math.max(0,Math.min(t,e-1)),i=Math.max(r+1,Math.min(n,e));W.value={start:r,end:i},G.value={start:r,end:i},hc.value=0,gc.value=e}}}else W.value={start:0,end:Co.value};sa.value+=1,Ca.value+=1,Ya(),as()},{deep:!0});function lf(e){let t=be(e);return t?.chart&&delete t.chart.tooltip,JSON.stringify(t)}let uf=lf(A.config);Mt(()=>A.config,(e,t)=>{let n=lf(e),r=n!==uf;uf=n;let i=ao();r?(ho.value||(z.value=i),Nd(),xa.value+=1,ba.value+=1,uo(),B.value.zoom.keepState&&Co.value>0&&(!mc.value||W.value.start===0&&W.value.end===0)&&_c(),as()):(z.value.chart.tooltip=i.chart.tooltip,U.value.showTooltip=z.value.chart.tooltip.show)},{deep:!0});let df=T(!1),ff=T(!1);function pf(){let e=qi.value?.parentNode;if(!e){ff.value=df.value,df.value=!1;return}let t=e.getBoundingClientRect();ff.value=df.value,df.value=t.width>0&&t.height>0}function mf(){return!df.value||ff.value||mc.value?!1:W.value.start===0&&W.value.end===0}Et(()=>{pf(),Pa.value=new ResizeObserver(()=>{if(pf(),!df.value)return;let e=!ff.value;Nd(),as(),mf()&&_c(),e&&Is()}),qi.value?.parentNode&&Pa.value.observe(qi.value.parentNode)}),Mt(z,()=>{uo()},{immediate:!0});let hf=v(()=>Je({config:z,style:B,mutableConfig:U,dialog:Bi,accordion:dt,isFullscreen:ma,parent:qi,maxWidth:800,showTable:()=>z.value.showTable}));Mt(()=>U.value.showTable,e=>{z.value.showTable||(e&&z.value.table.useDialog&&Aa.value?Aa.value.open():Aa.value&&Aa.value.close&&Aa.value.close())});function gf(){U.value.showTable=!1,ia.value&&ia.value.setTableIconState(!1)}let _f=v(()=>Ds.value.map(e=>({shape:e.type===`bar`?`square`:e.shape??`circle`,color:e.color,name:e.name}))),vf=v(()=>z.value.chart.backgroundColor),yf=v(()=>z.value.chart.legend),bf=v(()=>z.value.chart.title),{isCallbackImaging:xf,isCallbackSvg:Sf,generateSvg:Cf,onGenerateImage:wf}=qe({svg:F,title:bf,legend:yf,legendItems:_f,backgroundColor:vf,getSvgCallback:()=>B.value.userOptions.callbacks.svg,generateImage:us});async function Tf(){Vi(`copyAlt`,{config:{...z.value,formattedDates:Z.value},dataset:{lines:$.value,bars:$u.value,plots:td.value}}),B.value.userOptions.callbacks.altCopy?await Promise.resolve(B.value.userOptions.callbacks.altCopy({config:{...z.value,formattedDates:Z.value},dataset:{lines:$.value,bars:$u.value,plots:td.value}})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Ef=T(!1);function Df(){W.value.end>W.value.start&&(Ma.value=null),Ks.value=!0,Ef.value=!0}function Of(){hl(),Ma.value=null,xl(),Ef.value=!1,Ks.value=!1}function kf(e){if(!F.value||pa.value||document.activeElement!==F.value)return;if(hl(),e.key===`Escape`){zo.value&&(al.value||wo.value)&&(e.preventDefault(),e.stopPropagation(),cl(),Ac());return}let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`;if(!t&&!n||!W.value.end&&W.value.end!==0)return;let r=W.value.end-W.value.start;if(r<=0)return;if(e.preventDefault(),e.stopPropagation(),q.value){let e=tl.value.length;if(!e)return;let r=Ma.value;r!==null&&r>=0&&r<e?n?(r+=1,r>=e&&(r=0)):t&&(--r,r<0&&(r=e-1)):r=n?0:e-1,nl(r);return}let i=Ma.value,a=Xc.value;i!==null&&i>=0&&i<r?n?(i+=1,i>=r&&(i=0)):t&&(--i,i<0&&(i=r-1)):a!==null&&a>=0&&a<r?(i=n?a+1:a-1,i>=r&&(i=0),i<0&&(i=r-1)):i=n?0:r-1,Ma.value=i,Af(i),Dd(!0,i)}function Af(e){let t=W.value.end-W.value.start;if(t<=0)return;let n=X.value.width/t,r=X.value.left+n*e+n/2,i=X.value.top+X.value.height/2,a=Ne(r,i,F.value);a&&(Na.value=a)}let jf=v(()=>{if(!Td.value)return null;let e=z.value.table.showSum,t=[z.value.table.columnNames.period].concat(J.value.map(e=>e.name));return e&&(t=t.concat(z.value.table.columnNames.total)),{headers:t,rows:Td.value.body}});return He({getData:wl,getImage:Tl,generatePdf:ls,generateImage:us,generateSvg:Cf,generateCsv:Ed,hideSeries:Ml,showSeries:jl,toggleStack:uc,toggleTable:Od,toggleLabels:kd,toggleTooltip:Ad,toggleAnnotator:Xs,toggleFullscreen:jd,copyAlt:Tf,resetZoom:Ac,setZoomState:is}),Mt(()=>[M.value,la.value,L.value,H.value,B.value.padding,z.value.chart.fontFamily,ac.value,Zs.value,Ha.value,A.dataset,_a.value,U.value.useIndividualScale,U.value.isStacked,ra.value,ea.value,ta.value,na.value],Fs,{flush:`post`,deep:!0}),(t,r)=>(w(),b(`div`,{id:`vue-ui-xy_${N.value}`,class:S(`vue-data-ui-component vue-ui-xy ${ma.value?`vue-data-ui-wrapper-fullscreen`:``} ${z.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`chart`,ref:qi,style:C(`background:${B.value.backgroundColor}; color:${B.value.color};width:100%;font-family:${B.value.fontFamily};${z.value.responsive?`height: 100%`:``}`),onMouseenter:Js,onMouseleave:Ys},[x(`div`,{id:`chart-instructions-${N.value}`,class:`sr-only`},[x(`p`,null,Ot(z.value.a11y.translations.keyboardNavigation),1)],8,qt),jf.value?.rows?.length?(w(),ht(pt,{key:0,uid:N.value,head:jf.value.headers,body:jf.value.rows,notice:z.value.a11y.translations.tableAvailable,caption:z.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):y(``,!0),B.value.userOptions.buttons.annotator&&F.value?(w(),ht(k(zi),{key:1,svgRef:F.value,backgroundColor:B.value.backgroundColor,color:B.value.color,active:pa.value,isCursorPointer:lo.value,palette:B.value.userOptions.annotatorPalette,onClose:Xs},gt({_:2},[E(k(Xe),e=>({name:e,fn:Pt(n=>[D(t.$slots,e,wt(xt(k(Ye)(e,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):y(``,!0),Fl.value?(w(),b(`div`,{key:2,ref_key:`noTitle`,ref:Qi,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%; background:transparent`},null,512)):y(``,!0),B.value.title.show?(w(),b(`div`,{key:3,ref_key:`chartTitle`,ref:Ji,class:`vue-ui-xy-title`,style:C(`font-family:${B.value.fontFamily}`)},[(w(),ht(Ke,{key:`title_${xa.value}`,config:{title:{cy:`xy-div-title`,...B.value.title},subtitle:{cy:`xy-div-subtitle`,...B.value.title.subtitle}}},null,8,[`config`]))],4)):y(``,!0),x(`div`,{id:`legend-top-${N.value}`},null,8,Jt),B.value.userOptions.show&&(Ta.value||Ea.value)?(w(),ht(k(Fi),{ref_key:`userOptionsRef`,ref:ia,key:`user_options_${ya.value}`,backgroundColor:B.value.backgroundColor,color:B.value.color,isPrinting:k(ss),isImaging:k(cs),uid:N.value,hasTooltip:B.value.userOptions.buttons.tooltip&&B.value.tooltip.show,hasPdf:B.value.userOptions.buttons.pdf,hasXls:B.value.userOptions.buttons.csv,hasImg:B.value.userOptions.buttons.img,hasSvg:B.value.userOptions.buttons.svg,hasLabel:B.value.userOptions.buttons.labels,hasTable:B.value.userOptions.buttons.table,hasStack:e.dataset.length>1&&B.value.userOptions.buttons.stack,hasFullscreen:B.value.userOptions.buttons.fullscreen,hasAltCopy:B.value.userOptions.buttons.altCopy,isStacked:U.value.isStacked,isFullscreen:ma.value,chartElement:t.$refs.chart,position:B.value.userOptions.position,isTooltip:U.value.showTooltip,titles:{...B.value.userOptions.buttonTitles},hasAnnotator:B.value.userOptions.buttons.annotator,isAnnotation:pa.value,callbacks:B.value.userOptions.callbacks,tableDialog:z.value.table.useDialog,printScale:B.value.userOptions.print.scale,isCursorPointer:lo.value,onToggleFullscreen:jd,onGeneratePdf:k(ls),onGenerateCsv:Ed,onGenerateImage:k(wf),onGenerateSvg:k(Cf),onToggleTable:Od,onToggleLabels:kd,onToggleStack:uc,onToggleTooltip:Ad,onToggleAnnotator:Xs,onCopyAlt:Tf,style:C({visibility:Ta.value?Ea.value?`visible`:`hidden`:`visible`})},gt({_:2},[E(k(Ze)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:Pt(n=>[D(t.$slots,e,wt(xt(k(Qe)(e,n))),void 0,!0)])})),t.$slots.optionStack?{name:`optionStack`,fn:Pt(({isStack:e})=>[D(t.$slots,`optionStack`,wt(xt({isStack:e})),void 0,!0)]),key:`0`}:void 0]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasLabel.hasTable.hasStack.hasFullscreen.hasAltCopy.isStacked.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.tableDialog.printScale.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):y(``,!0),x(`div`,Yt,[(w(),b(`svg`,{ref_key:`svgRef`,ref:F,xmlns:`http://www.w3.org/2000/svg`,class:S([{"vue-data-ui-fullscreen--on":ma.value,"vue-data-ui-fulscreen--off":!ma.value,"vue-data-ui-no-transition":!k(co)||k(Ps),"vue-ui-xy-chart-zoom-pointer-focus":zo.value&&To.value},`vue-ui-xy-svg vue-data-ui-svg`]),width:`100%`,viewBox:ua.value,style:C({visibility:k(Ns)?`visible`:`hidden`,background:`transparent`,color:B.value.color,fontFamily:B.value.fontFamily,cursor:zo.value?wo.value?`col-resize`:`crosshair`:void 0,touchAction:zo.value?`pan-y`:void 0,userSelect:zo.value?`none`:void 0,overflow:`visible`}),"aria-label":Nl.value,"aria-describedby":`chart-instructions-${N.value}`,"aria-live":`polite`,role:`img`,tabindex:`0`,preserveAspectRatio:`xMidYMid`,onMousemove:bl,onMouseleave:xl,onClick:Sl,onPointerdown:gl,onPointermove:_l,onPointerup:vl,onPointercancel:cl,onFocus:Df,onBlur:Of,onKeydown:kf},[x(`g`,{ref_key:`G`,ref:$i,class:`vue-data-ui-g`},[vt(k(Ri)),D(t.$slots,`svg-underlayer`,{svg:{...Xa.value,slicer:W.value,isPrintingImg:k(ss)||k(cs)||k(xf),isPrintingSvg:k(Sf),data:nd.value,drawingArea:X.value}},void 0,!0),x(`defs`,null,[x(`clipPath`,{id:`vue_ui_xy_zoom_clip_${N.value}`},[x(`rect`,{x:X.value.left,y:X.value.top,width:Math.max(0,X.value.width),height:Math.max(0,X.value.height)},null,8,Qt)],8,Zt)]),t.$slots[`chart-background`]?(w(),b(`foreignObject`,{key:0,x:Math.max(0,X.value?.left),y:X.value?.top,width:Math.max(0,X.value?.width),height:Math.max(0,X.value?.height),style:{pointerEvents:`none`}},[D(t.$slots,`chart-background`,{},void 0,!0)],8,$t)):y(``,!0),Q.value>0?(w(),b(`g`,en,[x(`g`,tn,[H.value.xAxis.showBaseline?(w(),b(`line`,{key:0,stroke:V.value.stroke,"stroke-width":`1`,x1:X.value?.left,x2:X.value?.right,y1:k(h)(X.value?.bottom),y2:k(h)(X.value?.bottom),"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,nn)):y(``,!0),U.value.useIndividualScale?V.value.showHorizontalLines?(w(!0),b(_,{key:2},E(id.value,e=>(w(),b(`g`,{key:`individual_grid_${e.groupId||e.id}`},[e.id===j.value&&e.yLabels.length?(w(!0),b(_,{key:0},E(e.yLabels,t=>(w(),b(`line`,{key:`selected_individual_grid_line_${e.groupId||e.id}_${t.value}_${t.y}`,x1:X.value?.left,x2:X.value?.right,y1:k(h)(t.y),y2:k(h)(t.y),stroke:e.color,"stroke-width":.5,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,sn))),128)):e.yLabels.length?(w(!0),b(_,{key:1},E(e.yLabels,t=>(w(),b(`line`,{key:`individual_grid_line_${e.groupId||e.id}_${t.value}_${t.y}`,x1:X.value?.left,x2:X.value?.right,y1:k(h)(t.y),y2:k(h)(t.y),stroke:e.stroke,"stroke-width":.5,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,cn))),128)):y(``,!0)]))),128)):y(``,!0):(w(),b(_,{key:1},[H.value.yAxis.showBaseline?(w(),b(`line`,{key:0,class:`vue-ui-xy-y-axis`,stroke:V.value.stroke,"stroke-width":`1`,x1:Y.value?X.value?.right:X.value?.left,x2:Y.value?X.value?.right:X.value?.left,y1:k(h)(X.value?.top),y2:k(h)(X.value?.bottom),"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,rn)):y(``,!0),V.value.showHorizontalLines?(w(),b(`g`,an,[(w(!0),b(_,null,E(Tu.value,e=>(w(),b(`line`,{key:`horizontal_grid_line_${e.value}_${e.y}`,x1:X.value?.left,x2:X.value?.right,y1:k(h)(e.y),y2:k(h)(e.y),stroke:V.value.stroke,"stroke-width":.5,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,on))),128))])):y(``,!0)],64)),V.value.showVerticalLines?(w(),b(`g`,ln,[x(`path`,{d:Bs.value,"stroke-width":.5,stroke:V.value.stroke,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,un)])):y(``,!0),H.value.xAxisLabels.show?(w(),b(`g`,dn,[x(`path`,{d:Vs.value,stroke:V.value.stroke,"stroke-width":1,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,fn)])):y(``,!0)]),(w(!0),b(_,null,E($u.value,(e,n)=>(w(),b(`defs`,{key:`def_rect_${n}`},[t.$slots[`bar-gradient`]?D(t.$slots,`bar-gradient`,St({ref_for:!0},{series:e,positiveId:`rectGradient_pos_${n}_${N.value}`,negativeId:`rectGradient_neg_${n}_${N.value}`}),void 0,!0,0):(w(),b(_,{key:1},[vt(lt,{t:`linear`,id:`rectGradient_pos_${n}_${N.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,e.color,1],[`62%`,k(he)(e.color,.02),1],[`100%`,k(he)(e.color,.05),1]]},null,8,[`id`,`stops`]),vt(lt,{t:`linear`,id:`rectGradient_neg_${n}_${N.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,k(he)(e.color,.05),1],[`38%`,k(he)(e.color,.02),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`])],64))]))),128)),(w(!0),b(_,null,E(td.value,(e,t)=>(w(),b(`defs`,{key:`def_plot_${t}`},[vt(lt,{t:`radial`,id:`plotGradient_${t}_${N.value}`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,k(he)(e.color,.05),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`])]))),128)),(w(!0),b(_,null,E($.value,(e,n)=>(w(),b(_,{key:`def_line_${e.id}`},[x(`defs`,null,[vt(lt,{t:`radial`,id:`lineGradient_${n}_${N.value}`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,k(he)(e.color,.05),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]),t.$slots[`area-gradient`]?D(t.$slots,`area-gradient`,St({ref_for:!0},{series:e,id:`areaGradient_${n}_${N.value}`}),void 0,!0,0):(w(),ht(lt,{key:1,t:`linear`,id:`areaGradient_${n}_${N.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,k(d)(k(he)(e.color,.03),z.value.line.area.opacity),1],[`100%`,k(d)(e.color,z.value.line.area.opacity),1]]},null,8,[`id`,`stops`]))]),e.temperatureColors&&!e.isFlatTemperatureLine?(w(),b(`defs`,pn,[x(`linearGradient`,{id:`temperature_grad_line_${n}_${N.value}`,gradientTransform:`rotate(90)`},[(w(!0),b(_,null,E(e.temperatureColors,(t,r)=>(w(),b(`stop`,{key:`temperature_grad_stop_${n}_${r}_${N.value}`,"stop-color":t,offset:k(Ae)(r,e.temperatureColors.length)},null,8,hn))),128))],8,mn)])):y(``,!0)],64))),128)),(w(!0),b(_,null,E(Il.value,e=>(w(),b(`g`,{key:`highlight_area_${e.from}_${e.span}_${e.color}`},[e.show?(w(),b(_,{key:0},[(w(!0),b(_,null,E(e.span,(t,n)=>(w(),b(`g`,{key:`highlight_area_rect_${e.from}_${n}`},[x(`rect`,{style:C({transition:`none`,opacity:+(e.from+n>=W.value.start&&e.from+n<=W.value.end-1)}),x:Wl(e.from+n-W.value.start),y:X.value?.top,height:X.value.height<0?10:X.value.height,width:Gl(e.from+n-W.value.start),fill:k(d)(e.color,e.opacity)},null,12,gn)]))),128)),(w(!0),b(_,null,E(e.span,(t,n)=>(w(),b(`g`,{key:`highlight_area_caption_${e.from}_${n}`},[e.caption.text&&n===0?(w(),b(`foreignObject`,{key:0,x:Wl(e.from+n-W.value.start)-(e.caption.width===`auto`?0:e.caption.width/2-Jl(e.span)/2),y:X.value?.top+e.caption.offsetY,style:C({overflow:`visible`,opacity:+(e.to>=W.value.start&&e.from<W.value.end)}),height:`1`,width:e.caption.width===`auto`?Jl(e.span):e.caption.width},[x(`div`,{style:C(`padding:${e.caption.padding}px;text-align:${e.caption.textAlign};font-size:${e.caption.fontSize}px;color:${e.caption.color};font-weight:${e.caption.bold?`bold`:`normal`}`)},Ot(e.caption.text),5)],12,_n)):y(``,!0)]))),128))],64)):y(``,!0)]))),128)),Ks.value&&!q.value?(w(),b(`g`,vn,[(w(!0),b(_,null,E(Q.value,(e,t)=>(w(),b(`g`,{key:`tooltip_trap_highlighter_${t}`},[x(`rect`,{x:Wl(t),y:X.value?.top,height:X.value.height<0?10:X.value.height,width:ql(t),fill:[P.value,I.value,ga.value].includes(t)?k(d)(B.value.highlighter.color,B.value.highlighter.crosshairs.show?0:B.value.highlighter.opacity):`transparent`,style:{transition:`none !important`,animation:`none !important`}},null,8,yn)]))),128))])):y(``,!0),x(`g`,{"clip-path":ns.value},[x(`g`,{class:S([`vue-ui-xy-zoom-geometry`,{"vue-ui-xy-zoom-geometry--transitioning":Eo.value}]),style:C(es.value)},[$u.value.length?(w(!0),b(_,{key:0},E($u.value,(e,n)=>(w(),b(`g`,{key:`serie_bar_${e.id}`,class:S(`serie_bar_${n}`),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(w(!0),b(_,null,E(e.plots,(r,i)=>(w(),b(`g`,{key:`bar_plot_${n}_${i}`},[k(It)(r.value)?(w(),b(`rect`,{key:0,x:Kc(r)+du.value/2,y:U.value.useIndividualScale?Yc(r):Jc(r),height:U.value.useIndividualScale?Math.abs(Uc(r)):Math.abs(Hc(r)),width:uu.value-du.value,rx:z.value.bar.borderRadius,fill:z.value.bar.useGradient?r.value>=0?`url(#rectGradient_pos_${n}_${N.value})`:`url(#rectGradient_neg_${n}_${N.value})`:e.color,stroke:z.value.bar.border.useSerieColor?e.color:z.value.bar.border.stroke,"stroke-width":z.value.bar.border.strokeWidth,style:C({transition:k(ho)||Eo.value||!z.value.bar.showTransition?void 0:`all ${z.value.bar.transitionDurationMs}ms ease-in-out`})},null,12,xn)):y(``,!0),k(It)(r.value)&&t.$slots.pattern?(w(),b(`rect`,{key:1,x:Kc(r)-du.value/2,y:U.value.useIndividualScale?Yc(r):Jc(r),height:U.value.useIndividualScale?Math.abs(Uc(r)):Math.abs(Hc(r)),width:uu.value-du.value,rx:z.value.bar.borderRadius,fill:`url(#pattern_${N.value}_${e.slotAbsoluteIndex})`,stroke:z.value.bar.border.useSerieColor?e.color:z.value.bar.border.stroke,"stroke-width":z.value.bar.border.strokeWidth,style:C({transition:k(ho)||Eo.value||!z.value.bar.showTransition?void 0:`all ${z.value.bar.transitionDurationMs}ms ease-in-out`})},null,12,Sn)):y(``,!0),r.comment&&B.value.comments.show?(w(),b(`foreignObject`,{key:2,style:{overflow:`visible`},height:`12`,width:uu.value+B.value.comments.width,x:Kc(r)-B.value.comments.width/2+B.value.comments.offsetX,y:k(p)(r.y)+B.value.comments.offsetY+6},[D(t.$slots,`plot-comment`,{plot:{...r,color:e.color,seriesIndex:n,datapointIndex:i}},void 0,!0)],8,Cn)):y(``,!0)]))),128))],6))),128)):y(``,!0)],6)],8,bn),!U.value.useIndividualScale&&H.value.zeroLine.show?(w(),b(`line`,{key:1,stroke:V.value.stroke,"stroke-width":`1`,x1:X.value?.left,x2:X.value?.right,y1:k(h)(Vc.value),y2:k(h)(Vc.value),"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,wn)):y(``,!0),!B.value.highlighter.crosshairs.show&&(B.value.highlighter.useLine||q.value)&&lc.value?(w(),b(`g`,Tn,[x(`line`,{x1:Zd.value,x2:Zd.value,y1:k(h)(X.value?.top),y2:k(h)(X.value?.bottom),stroke:B.value.highlighter.color,"stroke-width":B.value.highlighter.lineWidth,"stroke-dasharray":B.value.highlighter.lineDasharray,"stroke-linecap":`round`,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},null,8,En)])):y(``,!0),Qd.value?(w(),b(`g`,Dn,[(w(!0),b(_,null,E($d.value,e=>(w(),b(`g`,{key:`crosshair_${e.serie.id}_${e.index}`},[x(`line`,{x1:B.value.highlighter.crosshairs.stopOnPoint?k(h)(e.x):X.value.left,x2:B.value.highlighter.crosshairs.stopOnPoint?k(h)(tf(e.x)):X.value.right,y1:k(h)(e.y),y2:k(h)(e.y),stroke:B.value.highlighter.crosshairs.stroke,"stroke-width":B.value.highlighter.crosshairs.strokeWidth,"stroke-dasharray":B.value.highlighter.crosshairs.strokeDasharray,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,On),x(`line`,{x1:k(h)(e.x),x2:k(h)(e.x),y1:B.value.highlighter.crosshairs.stopOnPoint?k(h)(e.y):X.value.top,y2:B.value.highlighter.crosshairs.stopOnPoint?k(h)(X.value.bottom):X.value.bottom,stroke:B.value.highlighter.crosshairs.stroke,"stroke-width":B.value.highlighter.crosshairs.strokeWidth,"stroke-dasharray":B.value.highlighter.crosshairs.strokeDasharray,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,kn),x(`circle`,{cx:k(h)(tf(e.x)),cy:k(h)(e.y),r:B.value.highlighter.crosshairs.dot.radius,fill:B.value.highlighter.crosshairs.dot.fill,stroke:B.value.highlighter.crosshairs.dot.stroke,"stroke-width":B.value.highlighter.crosshairs.dot.strokeWidth,style:{"pointer-events":`none`}},null,8,An)]))),128))])):y(``,!0),V.value.frame.show?(w(),b(`rect`,{key:4,style:{pointerEvents:`none`,transition:`none`,animation:`none !important`},x:Math.max(0,X.value?.left),y:X.value?.top,width:Math.max(0,X.value?.width),height:X.value.height<0?0:X.value.height,fill:`transparent`,stroke:V.value.frame.stroke,"stroke-width":V.value.frame.strokeWidth,"stroke-linecap":V.value.frame.strokeLinecap,"stroke-linejoin":V.value.frame.strokeLinejoin,"stroke-dasharray":V.value.frame.strokeDasharray},null,8,jn)):y(``,!0),H.value.show?(w(),b(`g`,{key:5,ref_key:`scaleLabels`,ref:ra,opacity:Qd.value?.2:1,style:{transition:`opacity 0.2s`}},[U.value.useIndividualScale?(w(),b(_,{key:0},[(w(!0),b(_,null,E(id.value,e=>(w(),b(`g`,{key:`individual_scale_axis_${e.groupId||e.id}`},[x(`line`,{x1:U.value.isStacked?Y.value?X.value.right:X.value.left:Y.value?e.x:e.x-X.value.individualOffsetX,x2:U.value.isStacked?Y.value?X.value.right:X.value.left:Y.value?e.x:e.x-X.value.individualOffsetX,y1:U.value.isStacked?k(h)(X.value?.bottom-e.yOffset-e.individualHeight):k(h)(X.value?.top),y2:U.value.isStacked?k(h)(X.value?.bottom-e.yOffset):k(h)(X.value?.bottom),stroke:e.color,"stroke-width":V.value.stroke,"stroke-linecap":`round`,style:C(`opacity:${j.value?j.value===e.groupId?1:.3:1};transition:opacity 0.2s ease-in-out; animation: none !important`)},null,12,Nn)]))),128)),(w(!0),b(_,null,E(id.value,e=>(w(),b(`g`,{key:`individual_scale_label_${e.groupId||e.id}`,style:C(`opacity:${j.value?j.value===e.groupId?1:.3:1};transition:opacity 0.2s ease-in-out`)},[x(`text`,{class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),fill:e.color,"font-size":L.value.dataLabels*.8,"text-anchor":`middle`,transform:`translate(${U.value.isStacked?Y.value?X.value.right+V.value.labels.yAxis.crosshairSize+V.value.labels.yAxis.scaleValueOffsetX+5+V.value.labels.yAxis.labelWidth+X.value.individualOffsetX+V.value.labels.axis.yLabelOffsetX:X.value.left-V.value.labels.yAxis.crosshairSize-V.value.labels.yAxis.scaleValueOffsetX-V.value.labels.yAxis.labelWidth-V.value.labels.axis.yLabelOffsetX:Y.value?e.x+V.value.labels.yAxis.crosshairSize+V.value.labels.yAxis.scaleValueOffsetX+5+V.value.labels.yAxis.labelWidth+V.value.labels.axis.yLabelOffsetX:e.x-L.value.dataLabels*.8/2}, ${U.value.isStacked?X.value?.bottom-e.yOffset-e.individualHeight/2:X.value?.top+X.value.height/2}) rotate(-90)`},Ot(e.name)+` `+Ot(e.scaleLabel&&e.unique&&e.scaleLabel!==e.id?`- ${e.scaleLabel}`:``),11,Pn),(w(!0),b(_,null,E(e.yLabels,(t,n)=>(w(),b(_,{key:`individual_scale_y_crosshair_${e.groupId||e.id}_${t.value}_${n}`},[H.value.yAxis.showCrosshairs?(w(),b(`line`,{key:0,x1:U.value.isStacked?Y.value?X.value.right:X.value.left:Y.value?e.x:e.x+3-V.value.labels.yAxis.crosshairSize-X.value.individualOffsetX,x2:U.value.isStacked?Y.value?X.value.right+B.value.grid.labels.yAxis.crosshairSize:X.value.left-B.value.grid.labels.yAxis.crosshairSize:Y.value?e.x+V.value.labels.yAxis.crosshairSize:e.x-X.value.individualOffsetX,y1:k(h)(t.y),y2:k(h)(t.y),stroke:e.color,"stroke-width":1,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Fn)):y(``,!0)],64))),128)),(w(!0),b(_,null,E(e.yLabels,(t,r)=>(w(),b(`text`,{class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),key:`individual_scale_y_label_${e.groupId||e.id}_${t.value}_${r}`,transform:`translate(${U.value.isStacked?Y.value?X.value.right+V.value.labels.yAxis.crosshairSize+V.value.labels.yAxis.scaleValueOffsetX+5:X.value.left-V.value.labels.yAxis.crosshairSize-V.value.labels.yAxis.scaleValueOffsetX-5:Y.value?e.x+V.value.labels.yAxis.crosshairSize+V.value.labels.yAxis.scaleValueOffsetX+5:e.x-5-X.value.individualOffsetX}, ${k(h)(t.y)+L.value.dataLabels/3})`,"text-anchor":Y.value?`start`:`end`,"font-size":L.value.dataLabels,fill:e.color},Ot(k(g)(H.value.yAxis.formatter,t.value,k(n)({p:t.prefix,v:t.value,s:t.suffix,r:V.value.labels.yAxis.rounding}),{datapoint:t.datapoint,seriesIndex:r})),11,In))),128))],4))),128))],64)):(w(!0),b(_,{key:1},E(Tu.value,(e,t)=>(w(),b(`g`,{key:`yLabel_${t}`},[k(It)(e)&&e.value>=K.value.min&&e.value<=K.value.max&&H.value.yAxis.showCrosshairs?(w(),b(`line`,{key:0,x1:Y.value?X.value?.right:X.value?.left,x2:Y.value?X.value?.right+H.value.yAxis.crosshairSize:X.value?.left-H.value.yAxis.crosshairSize,y1:k(h)(e.y),y2:k(h)(e.y),stroke:V.value.stroke,"stroke-width":`1`,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Ln)):y(``,!0),e.value>=K.value.min&&e.value<=K.value.max?(w(),b(`text`,{key:1,class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),transform:`translate(${Y.value?X.value.right+H.value.yAxis.crosshairSize+H.value.yAxis.scaleValueOffsetX+5:X.value.scaleLabelX-H.value.yAxis.crosshairSize}, ${k(p)(e.y+L.value.dataLabels/3)})`,"font-size":L.value.dataLabels,"text-anchor":Y.value?`start`:`end`,fill:H.value.color},Ot(k(It)(e.value)?k(g)(V.value.labels.yAxis.formatter,e.value,k(n)({p:e.prefix,v:e.value,s:e.suffix,r:B.value.grid.labels.yAxis.rounding})):``),11,Rn)):y(``,!0)]))),128))],8,Mn)):y(``,!0),Qd.value?(w(),b(`g`,zn,[(w(!0),b(_,null,E($d.value,e=>(w(),b(`text`,{class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),key:`crosshair_y_label_${e.serie.id}_${e.index}`,transform:`translate(${Y.value?X.value.right+H.value.yAxis.crosshairSize+H.value.yAxis.scaleValueOffsetX+5:X.value.scaleLabelX-H.value.yAxis.crosshairSize}, ${k(h)(e.y)+L.value.dataLabels/3})`,"font-size":L.value.dataLabels,"text-anchor":Y.value?`start`:`end`,fill:H.value.color,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},Ot(k(g)(H.value.yAxis.formatter,e.value,k(n)({p:e.serie.prefix||B.value.labels.prefix,v:e.value,s:e.serie.suffix||B.value.labels.suffix,r:H.value.yAxis.rounding}),{datapoint:e.serie,seriesIndex:e.index})),11,Bn))),128))])):y(``,!0),ef.value?(w(),b(`g`,Vn,[x(`circle`,{cx:Zd.value,cy:k(h)(X.value?.bottom),r:B.value.highlighter.crosshairs.dot.radius,fill:B.value.highlighter.crosshairs.dot.fill,stroke:B.value.highlighter.crosshairs.dot.stroke,"stroke-width":B.value.highlighter.crosshairs.dot.strokeWidth,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},null,8,Hn)])):y(``,!0),x(`g`,{"clip-path":ns.value},[(w(!0),b(_,null,E(td.value,(e,n)=>(w(),b(`g`,{key:`serie_plot_${e.id}`,class:S(`serie_plot_${n}`),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(w(!0),b(_,null,E(e.plots,(r,i)=>(w(),b(`g`,{key:`circle_plot_${e.id}_${i}`,style:C(ts(r))},[r&&k(It)(r.value)?(w(),ht(ct,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:z.value.plot.useGradient?`url(#plotGradient_${n}_${N.value})`:z.value.plot.dot.useSerieColor?e.color:z.value.plot.dot.fill,plot:{x:k(p)(r.x),y:k(p)(r.y)},radius:nf(e,r,i)?(eo.value.plot||6)*1.5:(Du(e.plots,i),eo.value.plot||6),stroke:z.value.plot.dot.useSerieColor?B.value.backgroundColor:e.color,strokeWidth:z.value.plot.dot.strokeWidth,transition:k(ho)||Eo.value||yc.value||!z.value.plot.showTransition?void 0:`all ${z.value.plot.transitionDurationMs}ms ease-in-out`,still:yc.value||Eo.value},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`transition`,`still`])):y(``,!0),r.comment&&B.value.comments.show?(w(),b(`foreignObject`,{key:1,style:{overflow:`visible`},height:`12`,width:B.value.comments.width,x:r.x-B.value.comments.width/2+B.value.comments.offsetX,y:r.y+B.value.comments.offsetY+6},[x(`div`,Gn,[D(t.$slots,`plot-comment`,{plot:{...r,color:e.color,seriesIndex:n,datapointIndex:i}},void 0,!0)])],8,Wn)):y(``,!0)],4))),128))],6))),128)),x(`g`,{class:S([`vue-ui-xy-zoom-geometry`,{"vue-ui-xy-zoom-geometry--transitioning":Eo.value}]),style:C(es.value)},[(w(!0),b(_,null,E($.value,(e,t)=>(w(),b(`g`,{key:`serie_line_${e.id}`,class:S(`serie_line_${t}`),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[e.hasDashedSegments?(w(),b(_,{key:0},[e.useStepper?(w(!0),b(_,{key:0},E(e.dashedStepper,(t,n)=>(w(),b(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_coating_stepper_segment_${e.id}_${n}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:B.value.backgroundColor,"stroke-width":R(z.value.line.strokeWidth+1),"stroke-dasharray":e.dashed||t.dashed?R(z.value.line.strokeWidth*2):0,style:C({transition:Nu()})},null,12,Kn))),128)):e.smooth?(w(!0),b(_,{key:1},E(e.dashedSmooth,(t,n)=>(w(),b(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_coating_smooth_segment_${e.id}_${n}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:B.value.backgroundColor,"stroke-width":R(z.value.line.strokeWidth+1),"stroke-dasharray":e.dashed||t.dashed?R(z.value.line.strokeWidth*2):0,style:C({transition:Nu()})},null,12,qn))),128)):(w(!0),b(_,{key:2},E(e.dashedStraight,(t,n)=>(w(),b(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_coating_straight_segment_${e.id}_${n}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:B.value.backgroundColor,"stroke-width":R(z.value.line.strokeWidth+1),"stroke-dasharray":e.dashed||t.dashed?R(z.value.line.strokeWidth*2):0,style:C({transition:Nu()})},null,12,Jn))),128))],64)):e.smooth&&e.plots.length>1&&e.curve?(w(),b(`path`,{key:1,"vector-effect":`non-scaling-stroke`,d:`M${e.curve}`,stroke:B.value.backgroundColor,"stroke-width":R(z.value.line.strokeWidth+1),"stroke-dasharray":e.dashed?R(z.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:C({transition:Nu()})},null,12,Yn)):e.plots.length>1&&e.straight?(w(),b(`path`,{key:2,"vector-effect":`non-scaling-stroke`,d:`M${e.straight}`,stroke:B.value.backgroundColor,"stroke-width":R(z.value.line.strokeWidth+1),"stroke-dasharray":e.dashed?R(z.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:C({transition:Nu()})},null,12,Xn)):y(``,!0)],6))),128)),t.$slots.pattern?(w(),b(`defs`,Zn,[(w(!0),b(_,null,E(Es.value,(e,n)=>D(t.$slots,`pattern`,St({key:`serie_pattern_slot_${e.id}`},{ref_for:!0},{...e,seriesIndex:e.slotAbsoluteIndex,patternId:`pattern_${N.value}_${n}`}),void 0,!0)),128))])):y(``,!0),ad.value.length&&!U.value.isStacked?(w(),b(`g`,Qn,[(w(!0),b(_,null,E(ad.value,e=>(w(),b(`path`,{key:e.key,d:e.d,fill:e.color,"fill-opacity":z.value.line.interLine.fillOpacity,stroke:`none`,"pointer-events":`none`,style:C({transition:Nu()})},null,12,$n))),128))])):y(``,!0),(w(!0),b(_,null,E($.value,(e,n)=>(w(),b(`g`,{key:`serie_line_above_${e.id}`,class:S(`serie_line_${n}`),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[e.useArea&&e.plots.length>1?(w(),b(`g`,er,[e.smooth?(w(!0),b(_,{key:0},E(e.curveAreas,(r,i)=>(w(),b(_,{key:i},[r?(w(),b(`path`,{key:0,d:r,fill:z.value.line.area.useGradient?`url(#areaGradient_${n}_${N.value})`:k(d)(e.color,z.value.line.area.opacity),style:C({transition:Nu()})},null,12,tr)):y(``,!0),t.$slots.pattern&&r?(w(),b(`path`,{key:1,d:r,fill:`url(#pattern_${N.value}_${e.slotAbsoluteIndex})`,style:C({transition:Nu()})},null,12,nr)):y(``,!0)],64))),128)):(w(!0),b(_,{key:1},E(e.area.split(`;`),(r,i)=>(w(),b(_,{key:i},[r?(w(),b(`path`,{key:0,d:`M${r}Z`,fill:z.value.line.area.useGradient?`url(#areaGradient_${n}_${N.value})`:k(d)(e.color,z.value.line.area.opacity),style:C({transition:Nu()})},null,12,rr)):y(``,!0),t.$slots.pattern&&r?(w(),b(`path`,{key:1,d:`M${r}Z`,fill:`url(#pattern_${N.value}_${e.slotAbsoluteIndex})`,style:C({transition:Nu()})},null,12,ir)):y(``,!0)],64))),128))])):y(``,!0),!e.hasDashedSegments&&e.smooth&&e.plots.length>1&&e.curve?(w(),b(`path`,{key:1,"vector-effect":`non-scaling-stroke`,d:`M${e.curve}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${N.value})`:e.color,"stroke-width":R(z.value.line.strokeWidth),"stroke-dasharray":e.dashed?R(z.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,style:C({transition:Nu()})},null,12,ar)):e.hasDashedSegments?(w(),b(_,{key:2},[e.useStepper?(w(!0),b(_,{key:0},E(e.dashedStepper,(t,r)=>(w(),b(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_stepper_segment_${e.id}_${r}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${N.value})`:e.color,"stroke-width":R(z.value.line.strokeWidth),"stroke-dasharray":e.dashed||t.dashed?R(z.value.line.strokeWidth*2):0,style:C({transition:Nu()})},null,12,or))),128)):e.smooth?(w(!0),b(_,{key:1},E(e.dashedSmooth,(t,r)=>(w(),b(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_smooth_segment_${e.id}_${r}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${N.value})`:e.color,"stroke-width":R(z.value.line.strokeWidth),"stroke-dasharray":e.dashed||t.dashed?R(z.value.line.strokeWidth*2):0,style:C({transition:Nu()})},null,12,sr))),128)):(w(!0),b(_,{key:2},E(e.dashedStraight,(t,r)=>(w(),b(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_straight_segment_${e.id}_${r}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${N.value})`:e.color,"stroke-width":R(z.value.line.strokeWidth),"stroke-dasharray":e.dashed||t.dashed?R(z.value.line.strokeWidth*2):0,style:C({transition:Nu()})},null,12,cr))),128))],64)):e.plots.length>1&&e.straight?(w(),b(`path`,{key:3,"vector-effect":`non-scaling-stroke`,d:`M${e.straight}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${N.value})`:e.color,"stroke-width":R(z.value.line.strokeWidth),"stroke-dasharray":e.dashed?R(z.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:C({transition:Nu()})},null,12,lr)):y(``,!0)],6))),128))],6),x(`g`,ur,[(w(!0),b(_,null,E($.value,(e,n)=>(w(),b(`g`,{key:`serie_line_markers_${e.id}`,style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(w(!0),b(_,null,E(e.plots,(r,i)=>(w(),b(`g`,{key:`circle_line_${e.id}_${i}`,class:`vue-ui-xy-line-marker`,style:C(ts(r))},[!Pl.value.linePlot&&r&&k(It)(r.value)||Pl.value.linePlot&&r&&k(It)(r.value)&&(I.value!==null&&I.value===i||P.value!==null&&P.value===i)||Du(e.plots,i)?(w(),ht(ct,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:z.value.line.useGradient?`url(#lineGradient_${n}_${N.value})`:z.value.line.dot.useSerieColor?e.color:z.value.line.dot.fill,plot:{x:k(p)(r.x),y:k(p)(r.y)},radius:nf(e,r,i)?io.value||0:(Du(e.plots,i),eo.value.line||0),stroke:z.value.line.dot.useSerieColor?B.value.backgroundColor:e.color,strokeWidth:z.value.line.dot.strokeWidth,transition:k(ho)||Eo.value||yc.value||!z.value.line.showTransition?void 0:`all ${z.value.line.transitionDurationMs}ms ease-in-out`,still:yc.value||Eo.value},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`transition`,`still`])):y(``,!0),r.comment&&B.value.comments.show?(w(),b(`foreignObject`,{key:1,style:{overflow:`visible`},height:`12`,width:B.value.comments.width,x:r.x-B.value.comments.width/2+B.value.comments.offsetX,y:r.y+B.value.comments.offsetY+6},[x(`div`,fr,[D(t.$slots,`plot-comment`,{plot:{...r,color:e.color,seriesIndex:n,datapointIndex:i}},void 0,!0)])],8,dr)):y(``,!0)],4))),128))],4))),128))])],8,Un),(z.value.bar.labels.show||z.value.bar.serieName.show)&&U.value.dataLabels.show?(w(),b(`g`,pr,[(w(!0),b(_,null,E(of.value,e=>(w(),b(`text`,{key:e.key,class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),"text-anchor":Xd({plot:e.plot,type:`bar`}),"font-size":L.value.plotLabels,transform:Jd({plot:e.plot}),fill:z.value.bar.labels.color,stroke:B.value.backgroundColor,"paint-order":`stroke`,style:C(`opacity:${j.value?j.value===e.serie.groupId?1:.2:1};`),innerHTML:qd({serie:e.serie,plot:e.plot,type:`bar`})},null,14,mr))),128)),(w(!0),b(_,null,E($u.value,(e,t)=>(w(),b(_,{key:`xLabel_bar_${e.id}`},[(w(!0),b(_,null,E(e.plots,(n,r)=>(w(),b(_,{key:`xLabel_bar_${t}_${r}`},[n&&z.value.bar.serieName.show?(w(),b(`text`,{key:0,class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),transform:`translate(${U.value.useIndividualScale&&U.value.isStacked?n.x+Wc.value.line/2:n.x+Gc()*1.1}, ${n.y+(n.value>0?z.value.bar.serieName.offsetY:-z.value.bar.serieName.offsetY*3)})`,"text-anchor":`middle`,"font-size":L.value.plotLabels,fill:z.value.bar.serieName.useSerieColor?e.color:z.value.bar.serieName.color,"font-weight":z.value.bar.serieName.bold?`bold`:`normal`,style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},Ot(z.value.bar.serieName.useAbbreviation?k(Te)({source:e.name,length:z.value.bar.serieName.abbreviationSize}):e.name),15,hr)):y(``,!0)],64))),128))],64))),128))])):y(``,!0),z.value.plot.labels.show&&U.value.dataLabels.show?(w(),b(`g`,gr,[(w(!0),b(_,null,E(sf.value,e=>(w(),b(`text`,{key:e.key,class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),transform:Yd({plot:e.plot,type:`plot`}),"text-anchor":Xd({plot:e.plot,type:`plot`}),"font-size":L.value.plotLabels,fill:z.value.plot.labels.color,stroke:B.value.backgroundColor,"paint-order":`stroke`,style:C(`opacity:${j.value?j.value===e.serie.groupId?1:.2:1}`),innerHTML:qd({serie:e.serie,plot:e.plot,type:`plot`})},null,14,_r))),128))])):(w(),b(`g`,vr,[(w(!0),b(_,null,E(td.value,(e,t)=>(w(),b(_,{key:`xLabel_plot_${e.id}`},[(w(!0),b(_,null,E(e.plots,(n,r)=>(w(),b(_,{key:`xLabel_plot_${t}_${r}`},[z.value.plot.tag.followValue?(w(),b(_,{key:1},[[P.value,I.value,ga.value].includes(r)&&e.useTag?(w(),b(`line`,{key:0,class:`vue-ui-xy-tag-plot`,x1:X.value?.left,x2:X.value?.right,y1:n.y,y2:n.y,"stroke-width":1,"stroke-linecap":`round`,"stroke-dasharray":`2`,stroke:e.color},null,8,Cr)):y(``,!0)],64)):(w(),b(_,{key:0},[n&&r===0&&e.useTag&&e.useTag===`start`?(w(),b(`foreignObject`,{key:0,x:n.x,y:n.y-20,height:24,width:`150`,style:C(`overflow: visible; opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[x(`div`,{style:C(`padding: 3px; background:${k(d)(e.color,80)};color:${k(je)(e.color)};width:fit-content;font-size:${L.value.plotLabels}px;border-radius: 2px;`),innerHTML:k(g)(z.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,br)],12,yr)):y(``,!0),n&&r===e.plots.length-1&&e.useTag&&e.useTag===`end`?(w(),b(`foreignObject`,{key:1,x:n.x-e.name.length*(L.value.plotLabels/2),y:n.y-20,height:24,width:`150`,style:C(`overflow: visible; opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[x(`div`,{style:C(`padding: 3px; background:${k(d)(e.color,80)};color:${k(je)(e.color)};width:fit-content;font-size:${L.value.plotLabels}px;border-radius: 2px;`),innerHTML:k(g)(z.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,Sr)],12,xr)):y(``,!0)],64))],64))),128))],64))),128))])),z.value.line.labels.show&&U.value.dataLabels.show?(w(),b(`g`,wr,[(w(!0),b(_,null,E(cf.value,e=>(w(),b(`text`,{key:e.key,class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),transform:Yd({plot:e.plot,type:`line`}),"text-anchor":Xd({plot:e.plot,type:`line`}),"font-size":L.value.plotLabels,fill:z.value.line.labels.color,stroke:B.value.backgroundColor,"paint-order":`stroke`,style:C(`opacity:${j.value?j.value===e.serie.groupId?1:.2:1};`),innerHTML:qd({serie:e.serie,plot:e.plot,type:`line`})},null,14,Tr))),128))])):(w(),b(`g`,Er,[(w(!0),b(_,null,E($.value,(e,t)=>(w(),b(_,{key:`xLabel_line_${e.id}`},[(w(!0),b(_,null,E(e.plots,(n,r)=>(w(),b(_,{key:`xLabel_line_${t}_${r}`},[z.value.line.tag.followValue?(w(),b(_,{key:1},[[P.value,I.value,ga.value].includes(r)&&e.useTag?(w(),b(`line`,{key:0,class:`vue-ui-xy-tag-line`,x1:X.value?.left,x2:X.value?.right,y1:n.y,y2:n.y,"stroke-width":1,"stroke-linecap":`round`,"stroke-dasharray":`2`,stroke:e.color},null,8,jr)):y(``,!0)],64)):(w(),b(_,{key:0},[n&&r===0&&e.useTag&&e.useTag===`start`?(w(),b(`foreignObject`,{key:0,x:n.x,y:n.y-20,height:24,width:`150`,style:C(`overflow: visible; opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[x(`div`,{style:C(`padding: 3px; background:${k(d)(e.color,80)};color:${k(je)(e.color)};width:fit-content;font-size:${L.value.plotLabels}px;border-radius: 2px;`),innerHTML:k(g)(z.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,Or)],12,Dr)):y(``,!0),n&&r===e.plots.length-1&&e.useTag&&e.useTag===`end`?(w(),b(`foreignObject`,{key:1,x:n.x,y:n.y-20,height:24,width:`150`,style:C(`overflow: visible; opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[x(`div`,{style:C(`padding: 3px; background:${k(d)(e.color,80)};color:${k(je)(e.color)};width:fit-content;font-size:${L.value.plotLabels}px;border-radius: 2px;`),innerHTML:k(g)(z.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,Ar)],12,kr)):y(``,!0)],64))],64))),128))],64))),128))])),(w(!0),b(_,null,E($.value,(e,t)=>(w(),b(_,{key:`xLabel_line_${e.id}`},[(w(!0),b(_,null,E(e.plots,(n,r)=>(w(),b(_,{key:`xLabel_line_${t}_${r}`},[n&&r===0&&e.showSerieName&&e.showSerieName===`start`?(w(),b(`text`,{key:0,x:n.x-L.value.plotLabels,y:n.y,"font-size":L.value.plotLabels,"text-anchor":`end`,fill:e.color,innerHTML:k(ke)({content:e.name,fontSize:L.value.plotLabels,fill:e.color,x:n.x-L.value.plotLabels,y:n.y,maxWords:2}),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Mr)):y(``,!0),n&&r===e.plots.length-1&&e.showSerieName&&e.showSerieName===`end`?(w(),b(`text`,{key:1,x:n.x+L.value.plotLabels,y:n.y,"font-size":L.value.plotLabels,"text-anchor":`start`,fill:e.color,innerHTML:k(ke)({content:e.name,fontSize:L.value.plotLabels,fill:e.color,x:n.x+L.value.plotLabels,y:n.y,maxWords:2}),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Nr)):y(``,!0)],64))),128))],64))),128)),(w(!0),b(_,null,E(td.value,(e,t)=>(w(),b(_,{key:`xLabel_plot_${e.id}`},[(w(!0),b(_,null,E(e.plots,(n,r)=>(w(),b(_,{key:`xLabel_plot_${t}_${r}`},[n&&r===0&&e.showSerieName&&e.showSerieName===`start`?(w(),b(`text`,{key:0,x:n.x-L.value.plotLabels,y:n.y,"font-size":L.value.plotLabels,"text-anchor":`end`,fill:e.color,innerHTML:k(ke)({content:e.name,fontSize:L.value.plotLabels,fill:e.color,x:n.x-L.value.plotLabels,y:n.y,maxWords:2}),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Pr)):y(``,!0),n&&r===e.plots.length-1&&e.showSerieName&&e.showSerieName===`end`?(w(),b(`text`,{key:1,x:n.x+L.value.plotLabels,y:n.y,"font-size":L.value.plotLabels,"text-anchor":`start`,fill:e.color,innerHTML:k(ke)({content:e.name,fontSize:L.value.plotLabels,fill:e.color,x:n.x+L.value.plotLabels,y:n.y,maxWords:2}),style:C(`opacity:${j.value?j.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Fr)):y(``,!0)],64))),128))],64))),128)),(w(!0),b(_,null,E([...td.value,...$.value,...$u.value],(e,t)=>(w(),b(_,{key:`progression-${t}`},[Object.hasOwn(e,`useProgression`)&&e.useProgression===!0&&!isNaN(k(m)(e.plots).trend)?(w(),b(`g`,Ir,[x(`defs`,null,[x(`marker`,{id:`progression_arrow_${t}`,markerWidth:`9`,markerHeight:`9`,viewBox:`-1 -1 9 9`,markerUnits:`userSpaceOnUse`,refX:`7`,refY:7/2,orient:`auto`,overflow:`visible`},[x(`polygon`,{points:`0,0 7,3.5 0,7`,fill:e.color,stroke:B.value.backgroundColor,"stroke-width":`1`,"stroke-linejoin":`round`},null,8,Rr)],8,Lr)]),e.plots.length>1?(w(),b(`line`,{key:0,x1:k(m)(e.plots).x1+(e.type===`bar`?Gc():0),x2:k(m)(e.plots).x2+(e.type===`bar`?Gc():0),y1:k(h)(k(m)(e.plots).y1),y2:k(h)(k(m)(e.plots).y2),"stroke-width":1,stroke:B.value.backgroundColor,"stroke-dasharray":2,"stroke-linecap":`round`,"stroke-linejoin":`round`,"marker-end":`url(#progression_arrow_${t})`},null,8,zr)):y(``,!0),e.plots.length>1?(w(),b(`line`,{key:1,x1:k(m)(e.plots).x1+(e.type===`bar`?Gc():0),x2:k(m)(e.plots).x2+(e.type===`bar`?Gc():0),y1:k(h)(k(m)(e.plots).y1),y2:k(h)(k(m)(e.plots).y2),"stroke-width":1,stroke:e.color,"stroke-dasharray":2,"stroke-linecap":`round`,"stroke-linejoin":`round`,"marker-end":`url(#progression_arrow_${t})`},null,8,Br)):y(``,!0),e.plots.length>1?(w(),b(`text`,{key:2,class:S({"vue-data-ui-transition":k(co)&&!k(Ps)}),"text-anchor":`middle`,transform:`translate(${k(m)(e.plots).x2+(e.type===`bar`?Gc():0)}, ${k(m)(e.plots).y2-12})`,"font-size":L.value.plotLabels,fill:e.color,stroke:B.value.backgroundColor,"stroke-width":4,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`},Ot(k(n)({v:k(m)(e.plots).trend*100,s:`%`,r:2})),11,Vr)):y(``,!0)])):y(``,!0)],64))),128)),U.value.useIndividualScale&&!U.value.isStacked?(w(),b(_,{key:13},[x(`defs`,null,[(w(!0),b(_,null,E(id.value,(e,t)=>(w(),ht(lt,{t:`linear`,key:`individual_scale_gradient_${e.groupId||e.id||t}`,id:`individual_scale_gradient_${N.value}_${t}`,x1:Y.value?`100%`:`0%`,x2:Y.value?`0%`:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,B.value.backgroundColor,0],[`100%`,e.color,.2]]},null,8,[`id`,`x1`,`x2`,`stops`]))),128))]),(w(!0),b(_,null,E(id.value,(e,t)=>(w(),b(`rect`,{key:`individual_scale_background_${e.groupId||e.id||t}`,x:Y.value?e.x:e.x-H.value.yAxis.labelWidth-X.value.individualOffsetX,y:X.value?.top,width:(Y.value,H.value.yAxis.labelWidth+X.value.individualOffsetX),height:X.value.height<0?10:X.value.height,fill:j.value===e.groupId?`url(#individual_scale_gradient_${N.value}_${t})`:`transparent`,onMouseenter:t=>j.value=e.groupId,onMouseleave:r[0]||=e=>j.value=null},null,40,Hr))),128))],64)):y(``,!0),x(`g`,null,[H.value.axis.yLabel&&!U.value.useIndividualScale?(w(),b(`text`,{key:0,ref_key:`yAxisLabel`,ref:ta,"font-size":L.value.yAxis,fill:H.value.color,transform:`translate(${Y.value?X.value.right+X.value.scaleLabelsOffset+H.value.axis.yLabelOffsetX+L.value.yAxis:H.value.axis.fontSize+H.value.axis.yLabelOffsetX}, ${X.value?.top+X.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},Ot(H.value.axis.yLabel),9,Ur)):y(``,!0),H.value.axis.xLabel?(w(),b(`text`,{key:1,ref_key:`xAxisLabel`,ref:ea,"text-anchor":`middle`,x:M.value/2,y:la.value-3,"font-size":L.value.yAxis,fill:H.value.color},Ot(H.value.axis.xLabel),9,Wr)):y(``,!0)]),H.value.xAxisLabels.show?(w(),b(`g`,{key:14,ref_key:`timeLabelsEls`,ref:na,opacity:Qd.value?.1:1,style:{transition:`opacity 0.2s`}},[t.$slots[`time-label`]?(w(!0),b(_,{key:0},E(Iu.value,(e,n)=>D(t.$slots,`time-label`,St({ref_for:!0},{x:Lu(e,n),y:X.value?.bottom,fontSize:L.value.xAxis,fill:H.value.xAxisLabels.color,transform:`translate(${Lu(e,n)}, ${X.value?.bottom+L.value.xAxis*1.3+H.value.xAxisLabels.yOffset}), rotate(${H.value.xAxisLabels.rotation})`,absoluteIndex:e.absoluteIndex,content:e.text,textAnchor:H.value.xAxisLabels.rotation>0?`start`:V.value.labels.xAxisLabels.rotation<0?`end`:`middle`,show:e&&e.text}),void 0,!0,`time_label_${e.id}`)),128)):(w(!0),b(_,{key:1},E(Iu.value,(e,t)=>(w(),b(`g`,{key:`time_label_${t}`},[e&&e.text?(w(),b(_,{key:0},[String(e.text).includes(`
24
- `)?(w(),b(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":H.value.xAxisLabels.rotation>0?`start`:V.value.labels.xAxisLabels.rotation<0?`end`:`middle`,"font-size":L.value.xAxis,fill:H.value.xAxisLabels.color,transform:`translate(${Lu(e,t)}, ${X.value?.bottom+L.value.xAxis*1.5}), rotate(${H.value.xAxisLabels.rotation})`,style:C({cursor:Hs()&&lo.value?`pointer`:`default`}),innerHTML:k(te)({content:String(e.text),fontSize:L.value.xAxis,fill:B.value.grid.labels.xAxisLabels.color,stroke:B.value.backgroundColor,x:0,y:0}),onClick:n=>oc(e,t)},null,12,qr)):(w(),b(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":H.value.xAxisLabels.rotation>0?`start`:V.value.labels.xAxisLabels.rotation<0?`end`:`middle`,"font-size":L.value.xAxis,fill:H.value.xAxisLabels.color,stroke:B.value.backgroundColor,"stroke-width":`3`,"stroke-linejoin":`round`,"stroke-linecap":`round`,"paint-order":`stroke fill`,transform:`translate(${Lu(e,t)}, ${X.value?.bottom+L.value.xAxis*1.5}), rotate(${H.value.xAxisLabels.rotation})`,style:C({cursor:Hs()&&lo.value?`pointer`:`default`}),onClick:n=>oc(e,t)},Ot(e.text||``),13,Kr))],64)):y(``,!0)]))),128))],8,Gr)):y(``,!0),ef.value?(w(),b(`g`,Jr,[x(`text`,{class:`vue-data-ui-time-label`,"text-anchor":H.value.xAxisLabels.rotation>0?`start`:H.value.xAxisLabels.rotation<0?`end`:`middle`,"font-size":L.value.xAxis,fill:H.value.xAxisLabels.color,transform:`translate(${ef.value.x}, ${X.value?.bottom+L.value.xAxis*1.5}), rotate(${H.value.xAxisLabels.rotation})`,"font-weight":`bold`,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`},innerHTML:k(te)({content:String(ef.value.text),fontSize:L.value.xAxis,fill:H.value.xAxisLabels.color,x:0,y:0})},null,8,Yr)])):y(``,!0),Eu.value.length&&!U.value.isStacked?(w(),b(`g`,Xr,[(w(!0),b(_,null,E(Eu.value,e=>(w(),b(`g`,{key:e.id},[e.yTop&&e.show&&isFinite(e.yTop)?(w(),b(`line`,{key:0,x1:e.x1,y1:e.yTop,x2:e.x2,y2:e.yTop,stroke:e.config.line.stroke,"stroke-width":e.config.line.strokeWidth,"stroke-dasharray":e.config.line.strokeDasharray,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Zr)):y(``,!0),e.yBottom&&e.show&&isFinite(e.yBottom)?(w(),b(`line`,{key:1,x1:e.x1,y1:e.yBottom,x2:e.x2,y2:e.yBottom,stroke:e.config.line.stroke,"stroke-width":e.config.line.strokeWidth,"stroke-dasharray":e.config.line.strokeDasharray,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Qr)):y(``,!0),e.hasArea&&e.show&&isFinite(e.yTop)&&isFinite(e.yBottom)?(w(),b(`rect`,{key:2,y:Math.min(e.yTop,e.yBottom),x:e.x1,width:X.value.width,height:k(p)(e.areaHeight,0),fill:k(d)(e.config.area.fill,e.config.area.opacity),style:{animation:`none !important`}},null,8,$r)):y(``,!0),e.config.label.text&&e.show&&isFinite(e._box.y)?(w(),b(`rect`,St({key:3,class:`vue-ui-xy-annotation-label-box`},{ref_for:!0},e._box,{style:{animation:`none !important`,transition:`none !important`}}),null,16)):y(``,!0),e.config.label.text&&e.show&&isFinite(e._text.y)?(w(),b(`text`,{key:4,id:e.id,class:S([`vue-ui-xy-annotation-label`,{"vue-data-ui-transition":k(co)&&!k(Ps)}]),transform:`translate(${e._text.x}, ${e._text.y})`,"font-size":e.config.label.fontSize,fill:e.config.label.color,"text-anchor":e.config.label.textAnchor},Ot(e.config.label.text),11,ei)):y(``,!0)]))),128))])):y(``,!0),!Qd.value&&B.value.timeTag.show&&(q.value?k(Ce)(Bd.value):![null,void 0].includes(I.value)||![null,void 0].includes(P.value))?(w(),b(`g`,ti,[(w(),b(`foreignObject`,{x:Hd(),y:X.value?.bottom,width:`200`,height:`40`,style:{overflow:`visible !important`}},[x(`div`,{ref_key:`timeTagEl`,ref:Ld,class:`vue-ui-xy-time-tag`,style:C(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${B.value.timeTag.backgroundColor};color:${B.value.timeTag.color};font-size:${B.value.timeTag.fontSize}px`),innerHTML:Kd.value},null,12,ri)],8,ni)),x(`circle`,{cx:q.value&&k(Ce)(Bd.value)?Ru({x:Bd.value}):Hl((I.value===null?0:I.value)||(P.value===null?0:P.value)),cy:X.value?.bottom,r:B.value.timeTag.circleMarker.radius,fill:B.value.timeTag.circleMarker.color},null,8,ii)])):y(``,!0)])):y(``,!0),il.value?(w(),b(`rect`,{key:2,x:il.value.x,y:il.value.y,width:il.value.width,height:il.value.height,fill:Ro.value.selection.fill,"fill-opacity":Ro.value.selection.fillOpacity,stroke:Ro.value.selection.stroke,"stroke-opacity":Ro.value.selection.strokeOpacity,"stroke-width":Ro.value.selection.strokeWidth,"stroke-dasharray":Ro.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,ai)):y(``,!0),Bo.value?(w(),b(`rect`,St({key:3},os.value,{"data-start":W.value.start,"data-end":W.value.end}),null,16,oi)):y(``,!0),D(t.$slots,`svg`,{svg:{...Xa.value,slicer:W.value,isPrintingImg:k(ss)||k(cs)||k(xf),isPrintingSvg:k(Sf),data:nd.value,drawingArea:X.value}},void 0,!0)],512)],46,Xt)),t.$slots.hint?(w(),b(`div`,si,[D(t.$slots,`hint`,wt(xt({hint:z.value.a11y.translations.keyboardNavigation,isVisible:Ef.value})),void 0,!0)])):y(``,!0)]),t.$slots.watermark?(w(),b(`div`,ci,[D(t.$slots,`watermark`,wt(xt({isPrinting:k(ss)||k(cs)||k(xf)||k(Sf)})),void 0,!0)])):y(``,!0),(w(!0),b(_,null,E($.value,(e,t)=>(w(),b(_,{key:`tag_line_${e.id}`},[(w(!0),b(_,null,E(e.plots,(n,r)=>(w(),b(_,{key:`tag_line_${t}_${r}`},[[P.value,I.value,ga.value].includes(r)&&e.useTag&&e.useTag===`end`&&z.value.line.tag.followValue?(w(),b(`div`,{key:0,ref_for:!0,ref:e=>Gs(t,r,e,`right`,`line`),class:`vue-ui-xy-tag`,"data-tag":`right`,style:C({position:`fixed`,top:k(c)({svgElement:F.value,x:X.value?.right+z.value.line.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_right_line`],position:`right`})?.top+`px`,left:k(c)({svgElement:F.value,x:X.value?.right+z.value.line.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_right_line`],position:`right`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:k(je)(e.color),padding:`0 6px`,fontSize:z.value.line.tag.fontSize+`px`,opacity:1})},[(w(),b(`svg`,li,[x(`path`,{d:`M 0,10 10,0 10,20 Z`,fill:e.color,stroke:`none`},null,8,ui)])),x(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:k(g)(z.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,di)],4)):y(``,!0),[P.value,I.value,ga.value].includes(r)&&e.useTag&&e.useTag===`start`&&z.value.line.tag.followValue?(w(),b(`div`,{key:1,ref_for:!0,ref:e=>Gs(t,r,e,`left`,`line`),class:`vue-ui-xy-tag`,"data-tag":`left`,style:C({position:`fixed`,top:k(c)({svgElement:F.value,x:X.value?.left-z.value.line.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_left_line`],position:`left`})?.top+`px`,left:k(c)({svgElement:F.value,x:X.value?.left-z.value.line.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_left_line`],position:`left`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:k(je)(e.color),padding:`0 6px`,fontSize:z.value.line.tag.fontSize+`px`,opacity:1})},[(w(),b(`svg`,fi,[x(`path`,{d:`M 0,0 10,10 0,20 Z`,fill:e.color,stroke:`none`},null,8,pi)])),x(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:k(g)(z.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,mi)],4)):y(``,!0)],64))),128))],64))),128)),(w(!0),b(_,null,E(td.value,(e,t)=>(w(),b(_,{key:`tag_plot_${e.id}`},[(w(!0),b(_,null,E(e.plots,(n,r)=>(w(),b(_,{key:`tag_plot_${t}_${r}`},[[P.value,I.value,ga.value].includes(r)&&e.useTag&&e.useTag===`end`&&z.value.plot.tag.followValue?(w(),b(`div`,{key:0,ref_for:!0,ref:e=>Gs(t,r,e,`right`,`plot`),class:`vue-ui-xy-tag`,"data-tag":`right`,style:C({position:`fixed`,top:k(c)({svgElement:F.value,x:X.value?.right+z.value.plot.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_right_plot`],position:`right`})?.top+`px`,left:k(c)({svgElement:F.value,x:X.value?.right+z.value.plot.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_right_plot`],position:`right`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:k(je)(e.color),padding:`0 6px`,fontSize:z.value.plot.tag.fontSize+`px`,opacity:1})},[(w(),b(`svg`,hi,[x(`path`,{d:`M 0,10 10,0 10,20 Z`,fill:e.color,stroke:`none`},null,8,gi)])),x(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:k(g)(z.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,_i)],4)):y(``,!0),[P.value,I.value,ga.value].includes(r)&&e.useTag&&e.useTag===`start`&&z.value.plot.tag.followValue?(w(),b(`div`,{key:1,ref_for:!0,ref:e=>Gs(t,r,e,`left`,`plot`),class:`vue-ui-xy-tag`,"data-tag":`left`,style:C({position:`fixed`,top:k(c)({svgElement:F.value,x:X.value?.left-z.value.plot.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_left_plot`],position:`left`})?.top+`px`,left:k(c)({svgElement:F.value,x:X.value?.left-z.value.plot.tag.fontSize/1.5,y:n.y,element:Da.value[`${t}_${r}_left_plot`],position:`left`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:k(je)(e.color),padding:`0 6px`,fontSize:z.value.plot.tag.fontSize+`px`,opacity:1})},[(w(),b(`svg`,vi,[x(`path`,{d:`M 0,0 10,10 0,20 Z`,fill:e.color,stroke:`none`},null,8,yi)])),x(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:k(g)(z.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,bi)],4)):y(``,!0)],64))),128))],64))),128)),B.value.zoom.show&&Co.value>6&&so.value&&mc.value?(w(),ht(ut,{key:6,ref_key:`chartSlicer`,ref:Yi,uuid:N.value,allMinimaps:mu.value,background:B.value.zoom.color,borderColor:B.value.backgroundColor,customFormat:B.value.zoom.customFormat,cutNullValues:z.value.line.cutNullValues,enableRangeHandles:B.value.zoom.enableRangeHandles,enableSelectionDrag:B.value.zoom.enableSelectionDrag,end:vu.value,focusOnDrag:B.value.zoom.focusOnDrag,focusRangeRatio:B.value.zoom.focusRangeRatio,fontSize:B.value.zoom.fontSize,useResetSlot:B.value.zoom.useResetSlot,immediate:!B.value.zoom.preview.enable,inputColor:B.value.zoom.color,isPreview:Bo.value,labelLeft:Su.value,labelRight:Cu.value,max:gu.value,min:hu.value,precision:q.value?H.value.xAxis.rounding:0,useValueRange:q.value,minimap:fu.value,minimapCompact:B.value.zoom.minimap.compact,minimapFrameColor:B.value.zoom.minimap.frameColor,minimapIndicatorColor:B.value.zoom.minimap.indicatorColor,minimapLineColor:B.value.zoom.minimap.lineColor,minimapMerged:B.value.zoom.minimap.merged,minimapSelectedColor:B.value.zoom.minimap.selectedColor,minimapSelectedColorOpacity:B.value.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:q.value?yu.value:I.value??P.value,minimapSelectionRadius:B.value.zoom.minimap.selectionRadius,preciseLabels:ud.value.length?ud.value:Qs.value,refreshStartPoint:q.value?hu.value:B.value.zoom.startIndex===null?0:B.value.zoom.startIndex,refreshEndPoint:q.value?gu.value:B.value.zoom.endIndex===null?Math.max(...e.dataset.map(e=>yo(e.series).length)):B.value.zoom.endIndex+1,selectColor:B.value.zoom.highlightColor,selectedSeries:wu.value,smoothMinimap:B.value.zoom.minimap.smooth,start:_u.value,textColor:B.value.color,timeLabels:Qs.value,usePreciseLabels:H.value.xAxisLabels.datetimeFormatter.enable&&!B.value.zoom.useDefaultFormat,valueEnd:vu.value,valueStart:_u.value,verticalHandles:B.value.zoom.minimap.verticalHandles,minScale:bu.value,maxScale:xu.value,maxWidth:B.value.zoom.maxWidth,minimapLeftInsetRatio:M.value>0&&B.value.zoom.autoFit?X.value.left/M.value:null,minimapRightInsetRatio:M.value>0&&B.value.zoom.autoFit?(M.value-X.value.right)/M.value:null,additionalMinimapHeight:B.value.zoom.minimap.additionalHeight,handleType:B.value.zoom.minimap.handleType,handleIconColor:B.value.zoom.minimap.handleIconColor,handleBorderWidth:B.value.zoom.minimap.handleBorderWidth,handleBorderColor:B.value.zoom.minimap.handleBorderColor,handleFill:B.value.zoom.minimap.handleFill,handleWidth:B.value.zoom.minimap.handleWidth,isCursorPointer:lo.value,onFutureEnd:r[1]||=e=>Uo(`end`,e),onFutureStart:r[2]||=e=>Uo(`start`,e),onReset:Ac,onTrapMouse:sc,onTrapMouseValue:cc,"onUpdate:end":Dc,"onUpdate:start":Ec},{"reset-action":Pt(({reset:e})=>[D(t.$slots,`reset-action`,wt(xt({reset:e})),void 0,!0)]),_:3},8,/* @__PURE__ */ `uuid.allMinimaps.background.borderColor.customFormat.cutNullValues.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.useResetSlot.immediate.inputColor.isPreview.labelLeft.labelRight.max.min.precision.useValueRange.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapLineColor.minimapMerged.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.minimapSelectionRadius.preciseLabels.refreshStartPoint.refreshEndPoint.selectColor.selectedSeries.smoothMinimap.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.minScale.maxScale.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth.isCursorPointer`.split(`.`))):y(``,!0),x(`div`,{id:`legend-bottom-${N.value}`},null,8,xi),ka.value&&(B.value.legend.show||t.$slots.legend)?(w(),ht(mt,{key:7,to:B.value.legend.position===`top`?`#legend-top-${N.value}`:`#legend-bottom-${N.value}`},[x(`div`,{ref_key:`chartLegend`,ref:Xi},[D(t.$slots,`legend`,{legend:Ds.value},()=>[B.value.legend.show?(w(),b(`div`,{key:0,class:`vue-ui-xy-legend`,style:C({fontSize:`var(--legend-font-size, ${B.value.legend.fontSize??14}px)`})},[B.value.legend.selectAllToggle.show&&Ds.value.length>2&&!k(ho)?(w(),ht(ft,{key:0,backgroundColor:B.value.legend.selectAllToggle.backgroundColor,color:B.value.legend.selectAllToggle.color,fontSize:B.value.legend.fontSize,checked:_a.value.length>0,onToggle:El},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):y(``,!0),(w(!0),b(_,null,E(Ds.value,(e,n)=>(w(),b(`div`,{key:`div_legend_item_${n}`,onClick:t=>kl(e),onKeydown:t=>Dl(t,e),role:`button`,tabindex:`0`,class:S({"vue-ui-xy-legend-item-alone":Ds.value.length===1,"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":va.value.has(e.id)}),style:C({cursor:lo.value?`pointer`:`default`})},[fa.value[e.type]===`line`?(w(),b(`svg`,Ci,[x(`rect`,{x:`0`,y:`7.5`,rx:`1.5`,stroke:B.value.backgroundColor,"stroke-width":.5,height:`3`,width:`20`,fill:e.color},null,8,wi),vt(ct,{plot:{x:10,y:9},radius:4,color:e.color,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,stroke:B.value.backgroundColor,strokeWidth:.5},null,8,[`color`,`shape`,`stroke`])])):fa.value[e.type]===`bar`?(w(),b(`svg`,Ti,[fa.value[e.type]===`bar`&&t.$slots.pattern?(w(),b(`rect`,{key:0,x:`4`,y:`4`,rx:`1`,height:`32`,width:`32`,stroke:`none`,fill:e.color},null,8,Ei)):y(``,!0),fa.value[e.type]===`bar`?(w(),b(`rect`,{key:1,x:`4`,y:`4`,rx:`1`,height:`32`,width:`32`,stroke:`none`,fill:t.$slots.pattern?`url(#pattern_${N.value}_${e.slotAbsoluteIndex})`:e.color},null,8,Di)):y(``,!0)])):(w(),b(`svg`,Oi,[vt(ct,{plot:{x:6,y:6},radius:5,color:e.color,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`},null,8,[`color`,`shape`])])),x(`span`,{style:C(`color:${B.value.legend.color}`)},Ot(e.name),5)],46,Si))),128))],4)):y(``,!0)],!0)],512)],8,[`to`])):y(``,!0),t.$slots.source?(w(),b(`div`,{key:8,ref_key:`source`,ref:Zi,dir:`auto`},[D(t.$slots,`source`,{},void 0,!0)],512)):y(``,!0),vt(k(Pi),{teleportTo:B.value.tooltip.teleportTo,show:U.value.showTooltip&&ha.value,backgroundColor:B.value.tooltip.backgroundColor,color:B.value.tooltip.color,fontSize:B.value.tooltip.fontSize,borderRadius:B.value.tooltip.borderRadius,borderColor:B.value.tooltip.borderColor,borderWidth:B.value.tooltip.borderWidth,backgroundOpacity:B.value.tooltip.backgroundOpacity,position:B.value.tooltip.position,offsetX:B.value.tooltip.offsetX,offsetY:B.value.tooltip.offsetY,parent:t.$refs.chart,content:hd.value,isFullscreen:ma.value,isCustom:B.value.tooltip.customFormat&&typeof B.value.tooltip.customFormat==`function`,smooth:B.value.tooltip.smooth,backdropFilter:B.value.tooltip.backdropFilter,smoothForce:B.value.tooltip.smoothForce,smoothSnapThreshold:B.value.tooltip.smoothSnapThreshold,isA11yMode:Ma.value!=null,a11yPosition:Na.value},{"tooltip-before":Pt(()=>[D(t.$slots,`tooltip-before`,wt(xt({...od.value})),void 0,!0)]),tooltip:Pt(()=>[D(t.$slots,`tooltip`,wt(xt({...od.value})),void 0,!0)]),"tooltip-after":Pt(()=>[D(t.$slots,`tooltip-after`,wt(xt({...od.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),so.value&&B.value.userOptions.buttons.table?(w(),ht(Dt(hf.value.component),St({key:9},hf.value.props,{ref_key:`tableUnit`,ref:Aa,onClose:gf}),gt({content:Pt(()=>[x(`div`,{style:C(`${k(ss)||z.value.table.useDialog?``:`max-height:400px`};${z.value.table.useDialog?`height: fit-content; `:``};overflow:auto;width:100%;${z.value.table.useDialog?``:`margin-top:48px`}`)},[x(`div`,ki,[Ft(x(`input`,{type:`checkbox`,"onUpdate:modelValue":r[4]||=e=>Sa.value=e},null,512),[[jt,Sa.value]]),x(`div`,{onClick:r[5]||=e=>Sa.value=!Sa.value,style:C({cursor:lo.value?`pointer`:`default`})},[vt(k(Ii),{name:`chartLine`,size:20,stroke:B.value.color},null,8,[`stroke`])],4)]),Sa.value?(w(),ht(k(Li),{key:`sparkline_${Ca.value}`,dataset:Rl.value,config:zl.value},null,8,[`dataset`,`config`])):(w(),ht(k(Ni),{key:`table_${ba.value}`,colNames:Td.value.colNames,head:Td.value.head,body:Td.value.body,config:Td.value.config,title:z.value.table.useDialog?``:hf.value.title,withCloseButton:!z.value.table.useDialog,onClose:gf},{th:Pt(({th:e})=>[e===`__SUM__`?(w(),b(`div`,Ai,[vt(k(Ii),{name:`sigma`,stroke:Td.value.config.th.color,size:16},null,8,[`stroke`])])):(w(),b(`div`,ji,Ot(e),1))]),td:Pt(({td:e})=>[_t(Ot(isNaN(Number(e))?e:k(n)({p:B.value.labels.prefix,v:e,s:B.value.labels.suffix,r:z.value.table.rounding})),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`]))],4)]),_:2},[z.value.table.useDialog?{name:`title`,fn:Pt(()=>[_t(Ot(hf.value.title),1)]),key:`0`}:void 0,z.value.table.useDialog?{name:`actions`,fn:Pt(()=>[x(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:r[3]||=e=>Ed(B.value.userOptions.callbacks.csv)},[vt(k(Ii),{name:`fileCsv`,stroke:hf.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):y(``,!0),D(t.$slots,`skeleton`,{},()=>[k(ho)?(w(),ht(ze,{key:0})):y(``,!0)],!0)],46,Kt))}},[[`__scopeId`,`data-v-095c23df`]]);export{Gt as n,A as t};