vue-data-ui 3.28.3 → 3.28.4

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 (137) hide show
  1. package/dist/{PackageVersion-CXT-eAuk.js → PackageVersion-DhptF5oD.js} +1 -1
  2. package/dist/components/vue-ui-3d-bar.js +1 -1
  3. package/dist/components/vue-ui-age-pyramid.js +1 -1
  4. package/dist/components/vue-ui-bullet.js +1 -1
  5. package/dist/components/vue-ui-bump.js +1 -1
  6. package/dist/components/vue-ui-candlestick.js +1 -1
  7. package/dist/components/vue-ui-carousel-table.js +1 -1
  8. package/dist/components/vue-ui-chestnut.js +1 -1
  9. package/dist/components/vue-ui-chord.js +1 -1
  10. package/dist/components/vue-ui-circle-pack.js +1 -1
  11. package/dist/components/vue-ui-cursor.js +1 -1
  12. package/dist/components/vue-ui-dag.js +1 -1
  13. package/dist/components/vue-ui-dashboard.js +1 -1
  14. package/dist/components/vue-ui-digits.js +1 -1
  15. package/dist/components/vue-ui-donut-evolution.js +1 -1
  16. package/dist/components/vue-ui-donut.js +1 -1
  17. package/dist/components/vue-ui-dumbbell.js +1 -1
  18. package/dist/components/vue-ui-flow.js +1 -1
  19. package/dist/components/vue-ui-funnel.js +1 -1
  20. package/dist/components/vue-ui-galaxy.js +1 -1
  21. package/dist/components/vue-ui-gauge.js +1 -1
  22. package/dist/components/vue-ui-geo.js +1 -1
  23. package/dist/components/vue-ui-gizmo.js +1 -1
  24. package/dist/components/vue-ui-graph.js +1 -1
  25. package/dist/components/vue-ui-heatmap.js +1 -1
  26. package/dist/components/vue-ui-hill.js +1 -1
  27. package/dist/components/vue-ui-history-plot.js +1 -1
  28. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  29. package/dist/components/vue-ui-kpi.js +1 -1
  30. package/dist/components/vue-ui-molecule.js +1 -1
  31. package/dist/components/vue-ui-mood-radar.js +1 -1
  32. package/dist/components/vue-ui-nested-donuts.js +1 -1
  33. package/dist/components/vue-ui-onion.js +1 -1
  34. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  35. package/dist/components/vue-ui-quadrant.js +1 -1
  36. package/dist/components/vue-ui-quick-chart.js +1 -1
  37. package/dist/components/vue-ui-radar.js +1 -1
  38. package/dist/components/vue-ui-relation-circle.js +1 -1
  39. package/dist/components/vue-ui-ridgeline.js +1 -1
  40. package/dist/components/vue-ui-rings.js +1 -1
  41. package/dist/components/vue-ui-scatter.js +1 -1
  42. package/dist/components/vue-ui-skeleton.js +1 -1
  43. package/dist/components/vue-ui-spark-trend.js +1 -1
  44. package/dist/components/vue-ui-sparkbar.js +1 -1
  45. package/dist/components/vue-ui-sparkgauge.js +1 -1
  46. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  47. package/dist/components/vue-ui-sparkline.js +1 -1
  48. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  49. package/dist/components/vue-ui-stackbar.js +1 -1
  50. package/dist/components/vue-ui-stackline.js +1 -1
  51. package/dist/components/vue-ui-strip-plot.js +1 -1
  52. package/dist/components/vue-ui-table-sparkline.js +1 -1
  53. package/dist/components/vue-ui-table.js +1 -1
  54. package/dist/components/vue-ui-thermometer.js +1 -1
  55. package/dist/components/vue-ui-timer.js +1 -1
  56. package/dist/components/vue-ui-tiremarks.js +1 -1
  57. package/dist/components/vue-ui-treemap.js +1 -1
  58. package/dist/components/vue-ui-vertical-bar.js +1 -1
  59. package/dist/components/vue-ui-waffle.js +1 -1
  60. package/dist/components/vue-ui-wheel.js +1 -1
  61. package/dist/components/vue-ui-word-cloud.js +1 -1
  62. package/dist/components/vue-ui-world.js +1 -1
  63. package/dist/components/vue-ui-xy.js +1 -1
  64. package/dist/package-CX7pZToh.js +1 -0
  65. package/dist/{render-common-C70bnUVe.js → render-common-DwEiRIJ0.js} +1 -1
  66. package/dist/ssr/vue-ui-donut.js +1 -1
  67. package/dist/ssr/vue-ui-xy.js +1 -1
  68. package/dist/ssr.js +1 -1
  69. package/dist/vue-data-ui-CORn0LF6.js +1 -0
  70. package/dist/vue-data-ui.js +1 -1
  71. package/dist/{vue-ui-3d-bar-ljsy2rX6.js → vue-ui-3d-bar-CJTKyv3A.js} +1 -1
  72. package/dist/{vue-ui-age-pyramid-a6CK7z3a.js → vue-ui-age-pyramid-6uZzf1w6.js} +1 -1
  73. package/dist/{vue-ui-bullet-DX4A2Qwo.js → vue-ui-bullet-CsJcLhmV.js} +1 -1
  74. package/dist/{vue-ui-bump-IvRdB6MD.js → vue-ui-bump-DXpxBWp_.js} +1 -1
  75. package/dist/{vue-ui-candlestick-BgyUo13S.js → vue-ui-candlestick-Bn_RSZ0k.js} +1 -1
  76. package/dist/{vue-ui-carousel-table-D01DGfA0.js → vue-ui-carousel-table-ChNykS-r.js} +1 -1
  77. package/dist/{vue-ui-chestnut-DYrMSzmQ.js → vue-ui-chestnut-DMYQTkxM.js} +1 -1
  78. package/dist/{vue-ui-chord-CwzQ7QbP.js → vue-ui-chord-Pp0U0-zV.js} +1 -1
  79. package/dist/{vue-ui-circle-pack-DQHNM9sC.js → vue-ui-circle-pack-We23fOaF.js} +1 -1
  80. package/dist/{vue-ui-cursor-CTFfbDX8.js → vue-ui-cursor-3-RTIIl-.js} +1 -1
  81. package/dist/{vue-ui-dag-DF29_9Gg.js → vue-ui-dag-5fVnwEXd.js} +1 -1
  82. package/dist/{vue-ui-dashboard-D98rMHjI.js → vue-ui-dashboard-Dlwnintv.js} +1 -1
  83. package/dist/{vue-ui-digits-AoPCgSfP.js → vue-ui-digits-ZMK0aBxE.js} +1 -1
  84. package/dist/{vue-ui-donut-BYUkblpv.js → vue-ui-donut-CmLo1r4-.js} +1 -1
  85. package/dist/{vue-ui-donut-evolution-wxHDTKlg.js → vue-ui-donut-evolution-CYvo7Cww.js} +1 -1
  86. package/dist/vue-ui-donut-j1bv0KyD.js +22 -0
  87. package/dist/{vue-ui-dumbbell-DR7rjMt0.js → vue-ui-dumbbell-DigrSGwq.js} +1 -1
  88. package/dist/{vue-ui-flow-DtQlRSK_.js → vue-ui-flow-D9cc9yXD.js} +1 -1
  89. package/dist/{vue-ui-funnel-BP3chlZy.js → vue-ui-funnel-U88Hs0nL.js} +1 -1
  90. package/dist/{vue-ui-galaxy-B7ogrJ6f.js → vue-ui-galaxy-B1Vuz8CA.js} +1 -1
  91. package/dist/{vue-ui-gauge-CrmzNkjT.js → vue-ui-gauge-1MgZSPXt.js} +1 -1
  92. package/dist/{vue-ui-geo-BbTvWbfX.js → vue-ui-geo-BV8ARcaX.js} +1 -1
  93. package/dist/{vue-ui-gizmo-C3wgMKwb.js → vue-ui-gizmo-DtsERB-E.js} +1 -1
  94. package/dist/{vue-ui-graph-CzUVEiO-.js → vue-ui-graph-BVTPTDl5.js} +1 -1
  95. package/dist/{vue-ui-heatmap-BxR2ccwd.js → vue-ui-heatmap-6YwaVr3F.js} +1 -1
  96. package/dist/{vue-ui-hill-BDOd7LrC.js → vue-ui-hill-BvrNT8KZ.js} +1 -1
  97. package/dist/{vue-ui-history-plot-0-vs_CVn.js → vue-ui-history-plot-CJIILQPt.js} +1 -1
  98. package/dist/{vue-ui-horizontal-bar-C5pNTRKB.js → vue-ui-horizontal-bar-Dfo-kTqg.js} +1 -1
  99. package/dist/{vue-ui-kpi-Dfhsk0U1.js → vue-ui-kpi-DHfExr9d.js} +1 -1
  100. package/dist/{vue-ui-molecule-DUX1NUIY.js → vue-ui-molecule-C8e5IeHG.js} +1 -1
  101. package/dist/{vue-ui-mood-radar-B1N5AwX_.js → vue-ui-mood-radar-DsnT2U65.js} +1 -1
  102. package/dist/{vue-ui-nested-donuts-CfHH-cU6.js → vue-ui-nested-donuts-JkpqMhuL.js} +1 -1
  103. package/dist/{vue-ui-onion-DRN-jIvq.js → vue-ui-onion-CIA2tlff.js} +1 -1
  104. package/dist/{vue-ui-parallel-coordinate-plot-UUPjQABF.js → vue-ui-parallel-coordinate-plot-Bcr3B3NI.js} +1 -1
  105. package/dist/{vue-ui-quadrant-zmtzn0lM.js → vue-ui-quadrant-DKVFawhC.js} +1 -1
  106. package/dist/{vue-ui-quick-chart-DgU_IhKY.js → vue-ui-quick-chart-Bk2N8Hmd.js} +1 -1
  107. package/dist/{vue-ui-radar-BGSoxRaK.js → vue-ui-radar-CdH-BFKA.js} +1 -1
  108. package/dist/{vue-ui-relation-circle-XUw5UMrt.js → vue-ui-relation-circle-COZpOybS.js} +1 -1
  109. package/dist/{vue-ui-ridgeline-B5RJcFyA.js → vue-ui-ridgeline-MLknaTUO.js} +1 -1
  110. package/dist/{vue-ui-rings-BJaCLH2Q.js → vue-ui-rings-ARqLCM_P.js} +1 -1
  111. package/dist/{vue-ui-scatter-BA0hk_Tf.js → vue-ui-scatter-CX2wsXdE.js} +1 -1
  112. package/dist/{vue-ui-skeleton-DpzaXPO3.js → vue-ui-skeleton-wyvAru88.js} +1 -1
  113. package/dist/{vue-ui-spark-trend-DJ63XtgQ.js → vue-ui-spark-trend-C02PmIq_.js} +1 -1
  114. package/dist/{vue-ui-sparkbar-C5wP9R67.js → vue-ui-sparkbar-CjD57-Xi.js} +1 -1
  115. package/dist/{vue-ui-sparkgauge-DQcAOGuG.js → vue-ui-sparkgauge-8Eia8T2W.js} +1 -1
  116. package/dist/{vue-ui-sparkhistogram-BBiCxX6W.js → vue-ui-sparkhistogram-C-0f7XCl.js} +1 -1
  117. package/dist/{vue-ui-sparkline-B_GkB9V_.js → vue-ui-sparkline-BMMrpUPR.js} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-DSRXhqhJ.js → vue-ui-sparkstackbar-BmgCVCKG.js} +1 -1
  119. package/dist/{vue-ui-stackbar-QjOQHbld.js → vue-ui-stackbar-G_zZRAa9.js} +1 -1
  120. package/dist/{vue-ui-stackline-CoII13bc.js → vue-ui-stackline-DchZoEAg.js} +1 -1
  121. package/dist/{vue-ui-strip-plot-d3UoFFrf.js → vue-ui-strip-plot-DVyPa3sp.js} +1 -1
  122. package/dist/{vue-ui-table-CHFjZzW7.js → vue-ui-table-qTF_q-Qu.js} +1 -1
  123. package/dist/{vue-ui-table-sparkline-BkZ7sn4X.js → vue-ui-table-sparkline-B2Q-7-GQ.js} +1 -1
  124. package/dist/{vue-ui-thermometer-B--g_Lkt.js → vue-ui-thermometer-CxNoxslq.js} +1 -1
  125. package/dist/{vue-ui-timer-DmwEWrDh.js → vue-ui-timer-DRjoRidI.js} +1 -1
  126. package/dist/{vue-ui-tiremarks-160Gx7-3.js → vue-ui-tiremarks-BC_YGp3T.js} +1 -1
  127. package/dist/{vue-ui-treemap-B-Yjtob0.js → vue-ui-treemap-CNM5ohoO.js} +1 -1
  128. package/dist/{vue-ui-waffle-BhzLg5ip.js → vue-ui-waffle-BiJshI4O.js} +1 -1
  129. package/dist/{vue-ui-wheel-DHb4G42X.js → vue-ui-wheel-BxR0_iNZ.js} +1 -1
  130. package/dist/{vue-ui-word-cloud-BcpreM7A.js → vue-ui-word-cloud-CZzC3R1K.js} +1 -1
  131. package/dist/{vue-ui-world-BD9acchj.js → vue-ui-world-CJgt0ESz.js} +1 -1
  132. package/dist/{vue-ui-xy-C-2Phexw.js → vue-ui-xy-B6XNUCzQ.js} +1 -1
  133. package/dist/{vue-ui-xy-CB3lQs2m.js → vue-ui-xy-DrKVPSg7.js} +1 -1
  134. package/package.json +1 -1
  135. package/dist/package-CgIKu3rP.js +0 -1
  136. package/dist/vue-data-ui-CrOhFey9.js +0 -1
  137. package/dist/vue-ui-donut-BQGnUso2.js +0 -22
@@ -1,2 +1,2 @@
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,Et as a,Ft as o,Ht as s,J as c,Q as ee,S as te,T as ne,X as re,Zt as ie,_ as ae,at as oe,i as l,in as se,nn as ce,nt as le,qt as ue,r as de,rn as u,t as fe,tn as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{n as ye,t as be}from"./useHints-C-TwxM0Y.js";import{t as xe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Se}from"./useNestedProp-DnGoh-XS.js";import{t as Ce}from"./useThemeCheck-BKNRbGeC.js";import{t as we}from"./chartImage-DPGnEuYM.js";import{n as Te}from"./Title-BliHuXfT.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{n as De,t as Oe}from"./tableIntegration-CNoJ1CIY.js";import{n as ke,t as Ae}from"./annotationSlots-BRR85CqJ.js";import{n as je,t as Me}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ne}from"./usePrinter-DVf3YcG5.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useSvgLabelLayout-42Kats14.js";import{t as Ie}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Le}from"./useResponsive-CENUxfEL.js";import{t as Re}from"./DefGrad-DKMq1REY.js";import{t as ze}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./useUserOptionState-CXlFnwPv.js";import{t as He}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ue}from"./Legend-DM0ClX3D.js";import{t as We}from"./vue_ui_history_plot-soyqUW4Y.js";import{Fragment as d,Teleport as Ge,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ye,nextTick as Xe,normalizeClass as y,normalizeProps as b,normalizeStyle as x,onBeforeUnmount as Ze,onMounted as Qe,openBlock as S,ref as C,renderList as w,renderSlot as T,resolveDynamicComponent as $e,shallowRef as et,toDisplayString as E,toRefs as tt,unref as D,watch as nt,withCtx as O}from"vue";var rt=/* @__PURE__ */ e({default:()=>Ht}),it=[`id`],at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`viewBox`,`aria-describedby`],lt=[`x`,`y`,`width`,`height`],ut={key:1},dt=[`id`,`x1`,`y1`,`x2`,`y2`],ft=[`stop-color`,`offset`],pt={key:2},mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ht={key:3},gt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],_t=[`x`,`y`,`fill`,`font-size`],vt=[`transform`,`font-size`,`fill`,`font-weight`],yt={key:6},bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],xt={key:7},St=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],Ct=[`transform`,`fill`,`font-size`,`text-anchor`],wt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Dt=[`d`,`stroke`,`stroke-width`],Ot=[`d`,`stroke`,`stroke-width`],kt=[`cx`,`cy`,`fill`,`r`],At=[`cx`,`cy`,`fill`,`r`,`stroke`,`stroke-width`],jt={key:1},Mt=[`transform`,`font-size`,`fill`,`font-weight`],Nt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Pt={key:2},Ft=[`transform`,`font-size`,`font-weight`,`fill`],It=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],Lt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Rt={key:5,class:`vue-data-ui-watermark`},zt=[`id`],Bt=[`onClick`],Vt={style:{display:`flex`,"align-items":`center`}},Ht=/*#__PURE__*/ xe({__name:`vue-ui-history-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:xe,emit:rt}){let Ht=_(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ut=_(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Wt=_(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Gt=_(()=>import(`./DataTable-0Vv-aGHD.js`)),Kt=_(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),qt=_(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Jt=_(()=>import(`./PackageVersion-CXT-eAuk.js`).then(e=>e.t)),Yt=_(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_history_plot:Xt}=t(),{isThemeValid:Zt,warnInvalidTheme:Qt}=Ce(),k=e,A=C(null),$t=C(null),en=C(0),tn=C(null),nn=C(0),rn=C(0),an=C(0),j=et(null),M=et(null),on=C(null),N=C(re()),sn=C(!1),cn=C(``),P=C([]),ln=C(!1),F=C(null),un=C(!1),dn=C(null),fn=C(!1),pn=C(null),mn=C(null),hn=C(null),gn=C(null),_n=C(null),vn=C(null),I=C(null),L=C(null),yn=C({x:0,y:0}),bn=C(`pointer`),xn=C(!1),Sn=f({get:()=>!!k.dataset&&k.dataset.length,set:e=>e}),Cn=rt,wn=C(!1),Tn=0;Qe(()=>{fn.value=!0,Dn()});let En=f(()=>R.value.debug);function Dn(){ge(k.dataset)?(oe({componentName:`VueUiHistoryPlot`,type:`dataset`,debug:En.value}),Mn.value=!0):k.dataset.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Sn.value=!1,oe({componentName:`VueUiHistoryPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:En.value})})}),ge(k.dataset)||(Mn.value=R.value.loading),R.value.responsive&&(j.value&&(M.value&&j.value.unobserve(M.value),j.value.disconnect()),j.value=new ResizeObserver(()=>{let{width:e,height:t}=Le({chart:A.value,title:H.value.title.text?$t.value:null,noTitle:on.value,legend:H.value.legend.show?tn.value:null,source:dn.value});cancelAnimationFrame(Tn),Tn=requestAnimationFrame(()=>{q.value.width=e,q.value.height=t,wn.value=!0,R.value.responsiveProportionalSizing?(X.value.plots=u({relator:Math.min(e,t),adjuster:600,source:z.value.radius,threshold:3,fallback:3}),X.value.indexLabels=u({relator:Math.min(e,t),adjuster:600,source:z.value.indexLabels.fontSize,threshold:6,fallback:6}),X.value.labels=u({relator:Math.min(e,t),adjuster:600,source:z.value.labels.fontSize,threshold:6,fallback:6}),X.value.xAxisLabels=u({relator:Math.min(e,t),adjuster:600,source:V.value.x.labels.fontSize,threshold:6,fallback:6}),X.value.xAxisName=u({relator:Math.min(e,t),adjuster:600,source:V.value.x.name.fontSize,threshold:6,fallback:6}),X.value.yAxisLabels=u({relator:Math.min(e,t),adjuster:600,source:V.value.y.labels.fontSize,threshold:6,fallback:6}),X.value.yAxisName=u({relator:Math.min(e,t),adjuster:600,source:V.value.y.name.fontSize,threshold:6,fallback:6})):(X.value.plots=z.value.radius,X.value.indexLabels=z.value.indexLabels.fontSize,X.value.labels=z.value.labels.fontSize,X.value.xAxisLabels=V.value.x.labels.fontSize,X.value.xAxisName=V.value.x.name.fontSize,X.value.yAxisLabels=V.value.y.labels.fontSize,X.value.yAxisName=V.value.y.name.fontSize)})}),M.value=A.value.parentNode,j.value.observe(M.value))}Ze(()=>{cancelAnimationFrame(Tn),j.value&&(M.value&&j.value.unobserve(M.value),j.value.disconnect())});function On(){let e=Se({userConfig:k.config,defaultConfig:Xt}),t={},n=e.theme;if(n){if(!Zt.value(e))Qt(e),t=e;else{let r=Se({userConfig:We[n]||k.config,defaultConfig:e});t={...Se({userConfig:k.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||s}}}else t=e;return t}let R=C(On()),z=f(()=>R.value.style.chart.plots),B=f(()=>R.value.style.chart.grid),V=f(()=>R.value.style.chart.axes),H=f(()=>R.value.style.chart);ye({config:()=>R.value,dataset:()=>k.dataset,component:`VueUiHistoryPlot`,rules:[be.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]}]});let{transitionEnabled:U}=Pe({config:()=>R.value.transitions,dataset:()=>k.dataset}),W=f(()=>R.value.userOptions.useCursorPointer),kn=f(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,axes:{x:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}},y:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}}},grid:{xAxis:{stroke:`#6A6A6A`},horizontalLines:{stroke:`#6A6A6A50`},yAxis:{stroke:`#6A6A6A`},verticalLines:{stroke:`#6A6A6A50`}},legend:{backgroundColor:`transparent`},paths:{useSerieColor:!1,stroke:`#6A6A6A`},plots:{stroke:`#6A6A6A`,indexLabels:{show:!1},labels:{show:!1}}}}},userConfig:R.value.skeletonConfig??{}})),{loading:An,FINAL_DATASET:jn,manualLoading:Mn}=_e({...tt(k),FINAL_CONFIG:R,prepareConfig:On,skeletonDataset:k.config?.skeletonDataset??[{name:``,color:`#CACACA`,values:[{label:``,x:1,y:9},{label:``,x:4,y:1},{label:``,x:7,y:9},{label:``,x:9,y:4}]}],skeletonConfig:se({defaultConfig:R.value,userConfig:kn.value})}),{userOptionsVisible:Nn,setUserOptionsVisibility:Pn,keepUserOptionState:Fn}=Ve({config:R.value}),{svgRef:G}=He({config:H.value.title}),In=ie(k.config);nt(()=>k.config,(e,t)=>{let n=ie(e),r=n!==In;In=n;let i=On();r?(An.value||(R.value=i),Nn.value=!R.value.userOptions.showOnChartHover,Dn(),en.value+=1,rn.value+=1,nn.value+=1,q.value.height=H.value.height,q.value.width=H.value.width,X.value.plots=z.value.radius,X.value.indexLabels=z.value.indexLabels.fontSize,X.value.labels=z.value.labels.fontSize,X.value.xAxisLabels=V.value.x.labels.fontSize,X.value.xAxisName=V.value.x.name.fontSize,X.value.yAxisLabels=V.value.y.labels.fontSize,X.value.yAxisName=V.value.y.name.fontSize,K.value.showTable=R.value.table.show,K.value.showTooltip=H.value.tooltip.show):(R.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=R.value.style.chart.tooltip.show)},{deep:!0}),nt(()=>k.dataset,e=>{Array.isArray(e)&&e.length>0&&(Mn.value=!1)},{deep:!0});let{isPrinting:Ln,isImaging:Rn,generatePdf:zn,generateImage:Bn}=Ne({elementId:`history_plot_${N.value}`,fileName:H.value.title.text||`vue-ui-history-plot`,options:R.value.userOptions.print}),Vn=f(()=>R.value.userOptions.show&&!H.value.title.text),Hn=f(()=>me(R.value.customPalette)),K=C({showTable:R.value.table.show,showTooltip:H.value.tooltip.show});nt(R,()=>{K.value={showTable:R.value.table.show,showTooltip:H.value.tooltip.show}},{immediate:!0});let q=C({height:H.value.height,width:H.value.width}),Un=f(()=>q.value.width),Wn=f(()=>q.value.height),{metrics:Gn,ready:Kn,settling:J,update:qn}=Fe({svgRef:G,canMeasure:()=>!R.value.responsive||wn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(vn.value).textWidth,yAxisLabelWidth:e(gn.value).rotatedWidth,xAxisLabelHeight:e(hn.value).height,timeLabelsHeight:e(_n.value).height})});function Jn(){let e=Gn.value.scaleLabelsWidth,t=Gn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Yn=f(()=>Gn.value.xAxisLabelHeight+Gn.value.timeLabelsHeight+(hn.value?X.value.xAxisName/2:0)),Y=f(()=>{let e=H.value.padding.left,t=H.value.padding.top,n=Jn(),r=z.value.radius;return{left:e+n+V.value.y.name.offsetX,top:t+r,right:q.value.width-H.value.padding.right-r-V.value.y.name.offsetX,bottom:q.value.height-H.value.padding.bottom-Yn.value-r-V.value.x.name.offsetY,width:q.value.width-e-H.value.padding.right-n-r-V.value.y.name.offsetX,height:q.value.height-t-H.value.padding.bottom-Yn.value-r*2-V.value.x.name.offsetY}}),X=C({plots:z.value.radius,indexLabels:z.value.indexLabels.fontSize,labels:z.value.labels.fontSize,xAxisLabels:V.value.x.labels.fontSize,xAxisName:V.value.x.name.fontSize,yAxisLabels:V.value.y.labels.fontSize,yAxisName:V.value.y.name.fontSize}),Z=f(()=>jn.value.map((e,t)=>{let n=Array.isArray(e.temperatureColors)&&e.temperatureColors.length?e.temperatureColors.map(e=>te(e)):void 0;return{...e,color:e.color?te(e.color):Hn.value[t]||s[t]||s[t%s.length],temperatureColors:n,temperatureAngle:Xn(e.temperatureAngle),temperatureIndependant:e.temperatureIndependant===!0,usePlotTemperatureColors:e.usePlotTemperatureColors!==!1,seriesIndex:t}}));function Xn(e=0){let t=Number(e);return Number.isFinite(t)?(t%360+360)%360:0}let Zn=f(()=>Math.max(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)))),Qn=f(()=>{let e=Math.min(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)));return e<0?e:0}),$n=f(()=>Math.max(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)))),er=f(()=>{let e=Math.min(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)));return e<0?e:0}),Q=f(()=>{let e=ae(V.value.x.scaleMin??Qn.value,V.value.x.scaleMax??Zn.value,V.value.x.ticks),t=ae(V.value.y.scaleMin??er.value,V.value.y.scaleMax??$n.value,V.value.y.ticks);return{x:e,y:t,tickX:e.ticks.map(t=>({x:Y.value.left+(t-e.min)/(e.max-e.min)*Y.value.width,y1:Y.value.top,y2:Y.value.bottom,value:t})),tickY:t.ticks.map(e=>({y:Y.value.bottom-(e-t.min)/(t.max-t.min)*Y.value.height,x1:Y.value.left,x2:Y.value.right,value:e}))}});function tr(e){let t=Q.value.x.min<0?Math.abs(Q.value.x.min):Q.value.x.min>0?-Q.value.x.min:0;return Y.value.left+((e||0)+t)/(Q.value.x.max+t)*Y.value.width}function nr(e){let t=Q.value.y.min<0?Math.abs(Q.value.y.min):Q.value.y.min>0?-Q.value.y.min:0;return Y.value.bottom-((e||0)+t)/(Q.value.y.max+t)*Y.value.height}let $=f(()=>Z.value.filter(e=>!P.value.includes(e.seriesIndex)).map((e,t)=>{let n=e.values.map((t,n)=>({valueX:t.x,valueY:t.y,label:t.label,x:tr(t.x),y:nr(t.y),color:e.color,seriesName:e.name,id:re()})),r=e.smooth?ne(n):n.map(e=>`${e.x},${e.y} `).join(``).trim();return{...e,gradientIndex:t,plots:n,path:`M${r}`}})),rr=f(()=>{if(F.value===null||I.value===null)return $.value;let e=$.value.findIndex(e=>e.seriesIndex===I.value);if(e===-1)return $.value;let t=$.value[e];return[...$.value.slice(0,e),...$.value.slice(e+1),t]}),ir=f(()=>$.value.some(e=>ar(e)));function ar(e){return Array.isArray(e?.temperatureColors)&&e.temperatureColors.length}function or(e){return ar(e)&&e.usePlotTemperatureColors}function sr(e){let t=Array.isArray(e?.plots)?e.plots:[];if(!t.length)return{minX:0,maxX:0,minY:0,maxY:0,width:0,height:0};let n=t.map(e=>e.x),r=t.map(e=>e.y),i=Math.min(...n),a=Math.max(...n),o=Math.min(...r),s=Math.max(...r);return{minX:i,maxX:a,minY:o,maxY:s,width:a-i,height:s-o}}function cr(){let e=Y.value;return{minX:e.left,maxX:e.right,minY:e.top,maxY:e.bottom,width:e.width,height:e.height}}function lr(e){return e?.temperatureIndependant?sr(e):cr()}function ur(e){let t=Xn(e?.temperatureAngle)*Math.PI/180,n=Math.sin(t),r=Math.cos(t),i=lr(e),a=i.minX+i.width/2,o=i.minY+i.height/2,s=(Math.abs(n)*i.width+Math.abs(r)*i.height)/2||1;return{x1:a-n*s,y1:o-r*s,x2:a+n*s,y2:o+r*s}}function dr(e,t){let{x1:n,y1:r,x2:i,y2:a}=ur(e),o=i-n,s=a-r,c=o*o+s*s;if(!c)return 0;let ee=((t.x-n)*o+(t.y-r)*s)/c;return Math.min(1,Math.max(0,ee))}function fr(e,t){return a({colors:e.temperatureColors,ratio:dr(e,t)})}function pr(e,t){return`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${N.value}`}function mr(e,t,n){return or(e)?z.value.gradient.show?`url(#${pr(e,t)})`:fr(e,t):z.value.gradient.show?`url(#gradient_${n}_${N.value})`:t.color}function hr(e,t){return or(e)?fr(e,t):e.color}function gr(e,t){return z.value.indexLabels.adaptColorToBackground?de(hr(e,t)):z.value.indexLabels.color}function _r(e,t){let n=$.value.find(t=>t.seriesIndex===e);return n&&or(n)?fr(n,t):t.color}function vr(e){return ar(e)?`url(#temperature_grad_history_${e.seriesIndex}_${N.value})`:H.value.paths.useSerieColor?e.color:H.value.paths.stroke}function yr(e){return F.value===null||I.value===e?1:Math.min(1,z.value.unselectedOpacity)}f(()=>F.value!==null&&I.value!==null);let br=C(!1);function xr(){P.value.length?P.value=[]:Er.value.forEach(e=>{P.value.push(e.seriesIndex)}),Cn(`selectLegend`,$.value)}function Sr(e){P.value.includes(e)?P.value=P.value.filter(t=>t!==e):P.value.push(e),Cn(`selectLegend`,$.value)}function Cr(e){return Z.value.length?Z.value.find(t=>t.name===e)||(En.value&&console.warn(`VueUiHistoryPlot - Series name not found "${e}"`),null):(En.value&&console.warn(`VueUiHistoryPlot - There are no series to show.`),null)}function wr(e){let t=Cr(e);t!==null&&P.value.includes(t.seriesIndex)&&Sr(t.seriesIndex)}function Tr(e){let t=Cr(e);t!==null&&(P.value.includes(t.seriesIndex)||Sr(t.seriesIndex))}let Er=f(()=>Z.value.map(e=>{let t=ar(e)?e.temperatureColors:null;return{...e,gradientColors:t,opacity:P.value.includes(e.seriesIndex)?.5:1,segregate:()=>Sr(e.seriesIndex),isSegregated:P.value.includes(e.seriesIndex),shape:t?`gradient`:`circle`}})),Dr=f(()=>({cy:`history-plot-div-legend`,backgroundColor:H.value.legend.backgroundColor,color:H.value.legend.color,fontSize:H.value.legend.fontSize,paddingBottom:12,fontWeight:H.value.legend.bold?`bold`:``}));function Or({datapoint:e,plotIndex:t,seriesIndex:n}){R.value.events.datapointClick&&R.value.events.datapointClick({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),Cn(`selectDatapoint`,e)}function kr(e){ln.value=e,an.value+=1}let Ar=C(null);function jr({datapoint:e,plotIndex:t,seriesIndex:n}){R.value.events.datapointLeave&&R.value.events.datapointLeave({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),(bn.value!==`keyboard`||I.value!==n||L.value!==t)&&(sn.value=!1,F.value=null)}function Mr(e,t){if(!G.value)return;let n=$.value.find(t=>t.seriesIndex===e);if(!n)return;let r=n.plots[t];if(!r)return;let i=pe(r.x,r.y,G.value);i&&(yn.value=i)}function Nr({datapoint:e,plotIndex:t,seriesIndex:r,triggerMode:a=`pointer`}){R.value.events.datapointEnter&&R.value.events.datapointEnter({datapoint:{...e,plotIndex:t,seriesIndex:r},seriesIndex:r}),I.value=r,L.value=t,bn.value=a,br.value=!0;let o=_r(r,e),s={...e,color:o};Ar.value={datapoint:s,color:o,seriesIndex:r,plotIndex:t,config:R.value,series:Z.value},F.value=e;let c=H.value.tooltip.customFormat;if(un.value=!1,i(c))try{let e=c({seriesIndex:r,datapoint:s,color:o,plotIndex:t,series:Z.value,config:R.value});typeof e==`string`&&(cn.value=e,un.value=!0)}catch{console.warn(`Custom format cannot be applied.`),un.value=!1}if(!un.value){let t=``;t+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${H.value.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o}"/></svg><span>${e.seriesName}</span></div>`,t+=`<div>${e.label}</div>`,t+=`<div>${V.value.x.name.text||`x`}: ${l(V.value.x.labels.formatter,e.valueX,n({p:V.value.x.labels.prefix,v:e.valueX,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding}))}</div>`,t+=`<div>${V.value.y.name.text||`y`}: ${l(V.value.y.labels.formatter,e.valueY,n({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))}</div>`,cn.value=`<div>${t}</div>`}sn.value=!0,a===`keyboard`&&Xe(()=>{Mr(r,t)})}f(()=>({head:$.value.map(e=>({name:e.name,color:e.color}))}));let Pr=f(()=>{let e=[R.value.table.columnNames.series,R.value.table.columnNames.datapoint,R.value.table.columnNames.x,R.value.table.columnNames.y];return{head:e,body:$.value.flatMap(e=>e.plots.map(e=>[{color:e.color,name:e.seriesName},e.label,l(V.value.x.labels.formatter,e.valueX,n({p:V.value.x.labels.prefix,v:e.valueX,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding})),l(V.value.y.labels.formatter,e.valueY,n({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))])),config:{th:{backgroundColor:R.value.table.th.backgroundColor,color:R.value.table.th.color,outline:R.value.table.th.outline},td:{backgroundColor:R.value.table.td.backgroundColor,color:R.value.table.td.color,outline:R.value.table.td.outline},breakpoint:R.value.table.responsiveBreakpoint},colNames:e}});function Fr(e=null){Xe(()=>{let t=[[R.value.table.columnNames.series],[R.value.table.columnNames.datapoint],[R.value.table.columnNames.x],[R.value.table.columnNames.y]],n=$.value.flatMap(e=>e.plots.map(e=>[[e.seriesName],[e.label],[e.valueX],[e.valueY]])),i=[[H.value.title.text],[H.value.title.subtitle.text],t].concat(n),a=r(i);e?e(a):le({csvContent:a,title:H.value.title.text||`vue-ui-history-plot`})})}let Ir=C(!1);function Lr(){Ir.value=!Ir.value}function Rr(){K.value.showTable=!K.value.showTable}function zr(){K.value.showTooltip=!K.value.showTooltip}function Br(){return $.value}let Vr=we(A,()=>H.value.title.text),Hr=f(()=>Q.value.tickX),Ur=f(()=>({start:0,end:Q.value.tickX.length}));Ie({timeLabelsEls:_n,timeLabels:Hr,slicer:Ur,configRef:R,rotationPath:[`style`,`chart`,`axes`,`x`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`axes`,`x`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Un,height:Wn,targetClass:`.vue-ui-history-plot-x-axis-scale`,rotation:V.value.x.labels.autoRotate.angle});let Wr=f(()=>Oe({config:R,style:H,mutableConfig:K,dialog:Yt,accordion:Wt,isFullscreen:ln,parent:A,maxWidth:800}));nt(()=>K.value.showTable,e=>De(e,R,pn));function Gr(){K.value.showTable=!1,mn.value&&mn.value.setTableIconState(!1)}let Kr=f(()=>H.value.backgroundColor),qr=f(()=>H.value.legend),Jr=f(()=>H.value.title),{isCallbackImaging:Yr,isCallbackSvg:Xr,generateSvg:Zr,onGenerateImage:Qr}=Ee({svg:G,title:Jr,legend:qr,legendItems:Er,backgroundColor:Kr,getSvgCallback:()=>R.value.userOptions.callbacks.svg,generateImage:Bn});async function $r(){Cn(`copyAlt`,{config:R.value,dataset:$.value}),R.value.userOptions.callbacks.altCopy?await Promise.resolve(R.value.userOptions.callbacks.altCopy({config:R.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ei=f(()=>({head:Pr.value.head,body:Pr.value.body.map(e=>[e[0]?.name||``,e[1],e[2],e[3]]),caption:R.value.a11y.translations.tableCaption,notice:R.value.a11y.translations.tableAvailable}));function ti(e){return $.value.findIndex(t=>t.seriesIndex===e)}function ni(){if(I.value!==null&&L.value!==null){let e=$.value.find(e=>e.seriesIndex===I.value)?.plots?.[L.value];e&&jr({datapoint:e,plotIndex:L.value,seriesIndex:I.value})}I.value=null,L.value=null,bn.value=`pointer`,sn.value=!1,F.value=null}function ri(){I.value=null,L.value=null,xn.value=!0}function ii(){ni(),xn.value=!1}function ai(e,t){if(!e?.plots?.length)return null;let n=e.plots.length;return(t%n+n)%n}function oi({seriesIndex:e,plotIndex:t,direction:n}){if(!$.value.length)return null;let r=ti(e);if(r===-1)return null;if(n===`up`||n===`down`){let e=$.value[r];if(!e?.plots?.length)return null;let i=ai(e,t+(n===`up`?-1:1));return{seriesIndex:e.seriesIndex,plotIndex:i}}if(n===`left`||n===`right`){let e=((r+(n===`left`?-1:1))%$.value.length+$.value.length)%$.value.length,i=$.value[e];if(!i?.plots?.length)return null;let a=Math.min(t,i.plots.length-1);return{seriesIndex:i.seriesIndex,plotIndex:a}}return null}function si(e){if(!G.value||Ir.value||document.activeElement!==G.value||!$.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){ni();return}if(a){if(I.value===null||L.value===null)return;let e=$.value.find(e=>e.seriesIndex===I.value)?.plots?.[L.value];if(!e)return;Or({datapoint:e,plotIndex:L.value,seriesIndex:I.value});return}let s=null;if(I.value===null||L.value===null){let e=$.value[0];if(!e?.plots?.length)return;s={seriesIndex:e.seriesIndex,plotIndex:0}}else r?s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`up`}):i?s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`down`}):t?s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`left`}):n&&(s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`right`}));if(!s)return;let c=$.value.find(e=>e.seriesIndex===s.seriesIndex)?.plots?.[s.plotIndex];c&&Nr({datapoint:c,plotIndex:s.plotIndex,seriesIndex:s.seriesIndex,triggerMode:`keyboard`})}return xe({getData:Br,getImage:Vr,generatePdf:zn,generateCsv:Fr,generateImage:Bn,generateSvg:Zr,hideSeries:Tr,showSeries:wr,toggleTable:Rr,toggleTooltip:zr,toggleAnnotator:Lr,toggleFullscreen:kr,copyAlt:$r}),nt(()=>[q.value,X.value,V.value,H.value,R.value.style.fontFamily,k.dataset,wn.value,vn.value,_n.value,hn.value,gn.value],qn,{flush:`post`,deep:!0}),(e,t)=>(S(),h(`div`,{id:`history_plot_${N.value}`,ref_key:`historyPlotChart`,ref:A,class:y({"vue-data-ui-component":!0,"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":ln.value}),style:x(`background:${H.value.backgroundColor};color:${H.value.color};font-family:${R.value.style.fontFamily}; position: relative; ${R.value.responsive?`height: 100%`:``}`),onMouseenter:t[2]||=()=>D(Pn)(!0),onMouseleave:t[3]||=()=>D(Pn)(!1)},[g(`div`,{id:`chart-instructions-${N.value}`,class:`sr-only`},[g(`p`,null,E(R.value.a11y.translations.keyboardNavigation),1)],8,at),ei.value.body.length?(S(),p(Be,{key:0,uid:N.value,head:ei.value.head,body:ei.value.body,caption:ei.value.caption,notice:ei.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),T(e.$slots,`userConfig`,{},void 0,!0),R.value.userOptions.buttons.annotator?(S(),p(D(Kt),{key:1,svgRef:D(G),backgroundColor:H.value.backgroundColor,color:H.value.color,active:Ir.value,isCursorPointer:W.value,palette:R.value.userOptions.annotatorPalette,onClose:Lr},Ke({_:2},[w(D(Ae),t=>({name:t,fn:O(n=>[T(e.$slots,t,b(v(D(ke)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Vn.value?(S(),h(`div`,{key:2,ref_key:`noTitle`,ref:on,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),H.value.title.text?(S(),h(`div`,{key:3,ref_key:`chartTitle`,ref:$t,class:`vue-ui-xy-title`,style:x(`font-family:${R.value.style.fontFamily}`)},[(S(),p(Te,{key:`title_${en.value}`,config:{title:{cy:`history-plot-div-title`,...H.value.title},subtitle:{cy:`history-plot-div-subtitle`,...H.value.title.subtitle}}},null,8,[`config`]))],4)):m(``,!0),g(`div`,{id:`legend-top-${N.value}`},null,8,ot),R.value.userOptions.show&&Sn.value&&(D(Fn)||D(Nn))?(S(),p(D(qt),{ref_key:`userOptionsRef`,ref:mn,key:`user_option_${an.value}`,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:D(Ln),isImaging:D(Rn),uid:N.value,hasTooltip:H.value.tooltip.show&&R.value.userOptions.buttons.tooltip,hasPdf:R.value.userOptions.buttons.pdf,hasImg:R.value.userOptions.buttons.img,hasSvg:R.value.userOptions.buttons.svg,hasXls:R.value.userOptions.buttons.csv,hasTable:R.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:R.value.userOptions.buttons.fullscreen,hasAltCopy:R.value.userOptions.buttons.altCopy,isFullscreen:ln.value,chartElement:A.value,position:R.value.userOptions.position,isTooltip:K.value.showTooltip,titles:{...R.value.userOptions.buttonTitles},hasAnnotator:R.value.userOptions.buttons.annotator,isAnnotation:Ir.value,callbacks:R.value.userOptions.callbacks,printScale:R.value.userOptions.print.scale,tableDialog:R.value.table.useDialog,isCursorPointer:W.value,onToggleFullscreen:kr,onGeneratePdf:D(zn),onGenerateCsv:Fr,onGenerateImage:D(Qr),onGenerateSvg:D(Zr),onToggleTable:Rr,onToggleTooltip:zr,onToggleAnnotator:Lr,onCopyAlt:$r,style:x({visibility:D(Fn)?D(Nn)?`visible`:`hidden`:`visible`})},Ke({_:2},[w(D(je)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:O(n=>[T(e.$slots,t,b(v(D(Me)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,st,[(S(),h(`svg`,{ref_key:`svgRef`,ref:G,xmlns:D(fe),viewBox:`0 0 ${q.value.width<0?.1:q.value.width} ${q.value.height<0?.1:q.value.height}`,style:x(`max-width:100%;overflow:visible;background:transparent;color:${H.value.color};visibility:${D(Kn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${N.value}`,tabindex:`0`,onFocus:ri,onBlur:ii,onKeydown:si},[Je(D(Jt)),T(e.$slots,`svg-underlayer`,{svg:{...q.value,drawingArea:Y.value,isPrintingImg:D(Ln)||D(Rn)||D(Yr),isPrintingSvg:D(Xr)}},void 0,!0),e.$slots[`chart-background`]?(S(),h(`foreignObject`,{key:0,x:Y.value.left,y:Y.value.top,width:Y.value.width<=0?10:Y.value.width,height:Y.value.height<=0?10:Y.value.height,style:{pointerEvents:`none`}},[T(e.$slots,`chart-background`,{},void 0,!0)],8,lt)):m(``,!0),z.value.gradient.show||ir.value?(S(),h(`defs`,ut,[z.value.gradient.show?(S(!0),h(d,{key:0},w($.value,(e,t)=>(S(),p(Re,{t:`radial`,key:`gradient_${t}_${N.value}`,id:`gradient_${t}_${N.value}`,fy:`30%`,stops:[[`10%`,D(o)(e.color,z.value.gradient.intensity/100),1],[`90%`,D(ee)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)):m(``,!0),(S(!0),h(d,null,w($.value,e=>(S(),h(d,{key:`temperature_grad_history_template_${e.seriesIndex}_${N.value}`},[z.value.gradient.show&&or(e)?(S(!0),h(d,{key:0},w(e.plots,t=>(S(),p(Re,{t:`radial`,key:`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${N.value}`,id:pr(e,t),fy:`30%`,stops:[[`10%`,D(o)(fr(e,t),z.value.gradient.intensity/100),1],[`90%`,D(ee)(fr(e,t),.1),1],[`100%`,fr(e,t),1]]},null,8,[`id`,`stops`]))),128)):m(``,!0),ar(e)?(S(),h(`linearGradient`,{key:1,id:`temperature_grad_history_${e.seriesIndex}_${N.value}`,gradientUnits:`userSpaceOnUse`,x1:ur(e).x1,y1:ur(e).y1,x2:ur(e).x2,y2:ur(e).y2},[(S(!0),h(d,null,w(e.temperatureColors,(t,n)=>(S(),h(`stop`,{key:`temperature_grad_history_stop_${e.seriesIndex}_${n}_${N.value}`,"stop-color":t,offset:e.temperatureColors.length===1?`0%`:D(ue)(n,e.temperatureColors.length)},null,8,ft))),128))],8,dt)):m(``,!0)],64))),128))])):m(``,!0),B.value.verticalLines.show?(S(),h(`g`,pt,[(S(!0),h(d,null,w(Q.value.tickX,e=>(S(),h(`line`,{x1:e.x,x2:e.x,y1:e.y1,y2:e.y2,stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,mt))),256))])):m(``,!0),V.value.y.labels.show?(S(),h(`g`,ht,[(S(!0),h(d,null,w(Q.value.tickY,e=>(S(),h(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:Y.value.left-5,x2:Y.value.left,y1:e.y,y2:e.y},null,8,gt))),256))])):m(``,!0),V.value.y.labels.show?(S(),h(`g`,{key:4,ref_key:`yAxisScales`,ref:vn},[(S(!0),h(d,null,w(Q.value.tickY,e=>(S(),h(`text`,{x:Y.value.left+V.value.y.labels.offsetX-4-z.value.radius,y:e.y+X.value.yAxisLabels/3,fill:V.value.y.labels.color,"font-size":X.value.yAxisLabels,"text-anchor":`end`},E(D(l)(V.value.y.labels.formatter,e.value,D(n)({p:V.value.y.labels.prefix,v:e.value,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))),9,_t))),256))],512)):m(``,!0),V.value.y.name.text?(S(),h(`text`,{key:5,ref_key:`yAxisLabel`,ref:gn,transform:`translate(${X.value.yAxisName}, ${q.value.height/2+V.value.y.name.offsetY}), rotate(-90)`,"font-size":X.value.yAxisName,fill:V.value.y.name.color,"font-weight":V.value.y.name.bold?`bold`:`normal`,"text-anchor":`middle`},E(V.value.y.name.text),9,vt)):m(``,!0),B.value.horizontalLines.show?(S(),h(`g`,yt,[(S(!0),h(d,null,w(Q.value.tickY,e=>(S(),h(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:B.value.horizontalLines.stroke,"stroke-width":B.value.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,bt))),256))])):m(``,!0),V.value.x.labels.show?(S(),h(`g`,xt,[(S(!0),h(d,null,w(Q.value.tickX,e=>(S(),h(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:e.x,x2:e.x,y1:Y.value.bottom,y2:Y.value.bottom+5},null,8,St))),256))])):m(``,!0),V.value.x.labels.show?(S(),h(`g`,{key:8,ref_key:`xAxisScales`,ref:_n},[(S(!0),h(d,null,w(Q.value.tickX,e=>(S(),h(`text`,{class:`vue-ui-history-plot-x-axis-scale`,transform:`translate(${e.x}, ${Y.value.bottom+V.value.x.labels.offsetY+X.value.xAxisLabels+z.value.radius}), rotate(${V.value.x.labels.rotation})`,fill:V.value.x.labels.color,"font-size":X.value.xAxisLabels,"text-anchor":V.value.x.labels.rotation>0?`start`:V.value.x.labels.rotation<0?`end`:`middle`},E(D(l)(V.value.x.labels.formatter,e.value,D(n)({p:V.value.x.labels.prefix,v:e.value,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding}))),9,Ct))),256))],512)):m(``,!0),V.value.x.name.text?(S(),h(`text`,{key:9,ref_key:`xAxisLabel`,ref:hn,x:q.value.width/2+V.value.x.name.offsetX,y:q.value.height,"font-size":X.value.xAxisName,fill:V.value.x.name.color,"font-weight":V.value.x.name.bold?`bold`:`normal`,"text-anchor":`middle`},E(V.value.x.name.text),9,wt)):m(``,!0),B.value.xAxis.show?(S(),h(`line`,{key:10,x1:Y.value.left,x2:Y.value.left+Y.value.width,y1:Y.value.bottom,y2:Y.value.bottom,stroke:B.value.xAxis.stroke,"stroke-width":B.value.xAxis.strokeWidth,"stroke-linecap":`round`},null,8,Tt)):m(``,!0),B.value.yAxis.show?(S(),h(`line`,{key:11,x1:Y.value.left,x2:Y.value.left,y1:Y.value.top,y2:Y.value.bottom,stroke:B.value.yAxis.stroke,"stroke-width":B.value.yAxis.strokeWidth,"stroke-linecap":`round`},null,8,Et)):m(``,!0),(S(!0),h(d,null,w(rr.value,e=>(S(),h(`g`,{key:`history_plot_serie_${e.seriesIndex}_${N.value}`},[H.value.paths.show?(S(),h(`g`,{key:0,style:x({opacity:yr(e.seriesIndex)})},[g(`path`,{class:y({"vue-data-ui-transition":D(U)&&!D(J)}),d:e.path,stroke:H.value.backgroundColor,"stroke-width":H.value.paths.strokeWidth+4,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Dt),g(`path`,{class:y({"vue-data-ui-transition":D(U)&&!D(J)}),d:e.path,stroke:vr(e),"stroke-width":H.value.paths.strokeWidth,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Ot)],4)):m(``,!0),(S(!0),h(d,null,w(e.plots,e=>(S(),h(`circle`,{cx:e.x,cy:e.y,fill:H.value.backgroundColor,r:X.value.plots,stroke:`none`,class:y({"vue-data-ui-transition":D(U)&&!D(J)})},null,10,kt))),256)),(S(!0),h(d,null,w(e.plots,t=>(S(),h(`circle`,{cx:t.x,cy:t.y,fill:mr(e,t,e.gradientIndex),r:X.value.plots,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,class:y({"vue-data-ui-transition":D(U)&&!D(J)}),style:x({opacity:yr(e.seriesIndex)})},null,14,At))),256)),z.value.labels.show?(S(),h(`g`,jt,[(S(!0),h(d,null,w(e.plots,(t,n)=>(S(),h(`g`,{key:`plab_${n}`},[String(t.label).includes(`
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,Et as a,Ft as o,Ht as s,J as c,Q as ee,S as te,T as ne,X as re,Zt as ie,_ as ae,at as oe,i as l,in as se,nn as ce,nt as le,qt as ue,r as de,rn as u,t as fe,tn as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{n as ye,t as be}from"./useHints-C-TwxM0Y.js";import{t as xe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Se}from"./useNestedProp-DnGoh-XS.js";import{t as Ce}from"./useThemeCheck-BKNRbGeC.js";import{t as we}from"./chartImage-DPGnEuYM.js";import{n as Te}from"./Title-BliHuXfT.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{n as De,t as Oe}from"./tableIntegration-CNoJ1CIY.js";import{n as ke,t as Ae}from"./annotationSlots-BRR85CqJ.js";import{n as je,t as Me}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ne}from"./usePrinter-DVf3YcG5.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useSvgLabelLayout-42Kats14.js";import{t as Ie}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Le}from"./useResponsive-CENUxfEL.js";import{t as Re}from"./DefGrad-DKMq1REY.js";import{t as ze}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./useUserOptionState-CXlFnwPv.js";import{t as He}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ue}from"./Legend-DM0ClX3D.js";import{t as We}from"./vue_ui_history_plot-soyqUW4Y.js";import{Fragment as d,Teleport as Ge,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ye,nextTick as Xe,normalizeClass as y,normalizeProps as b,normalizeStyle as x,onBeforeUnmount as Ze,onMounted as Qe,openBlock as S,ref as C,renderList as w,renderSlot as T,resolveDynamicComponent as $e,shallowRef as et,toDisplayString as E,toRefs as tt,unref as D,watch as nt,withCtx as O}from"vue";var rt=/* @__PURE__ */ e({default:()=>Ht}),it=[`id`],at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`viewBox`,`aria-describedby`],lt=[`x`,`y`,`width`,`height`],ut={key:1},dt=[`id`,`x1`,`y1`,`x2`,`y2`],ft=[`stop-color`,`offset`],pt={key:2},mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ht={key:3},gt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],_t=[`x`,`y`,`fill`,`font-size`],vt=[`transform`,`font-size`,`fill`,`font-weight`],yt={key:6},bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],xt={key:7},St=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],Ct=[`transform`,`fill`,`font-size`,`text-anchor`],wt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Dt=[`d`,`stroke`,`stroke-width`],Ot=[`d`,`stroke`,`stroke-width`],kt=[`cx`,`cy`,`fill`,`r`],At=[`cx`,`cy`,`fill`,`r`,`stroke`,`stroke-width`],jt={key:1},Mt=[`transform`,`font-size`,`fill`,`font-weight`],Nt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Pt={key:2},Ft=[`transform`,`font-size`,`font-weight`,`fill`],It=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],Lt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Rt={key:5,class:`vue-data-ui-watermark`},zt=[`id`],Bt=[`onClick`],Vt={style:{display:`flex`,"align-items":`center`}},Ht=/*#__PURE__*/ xe({__name:`vue-ui-history-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:xe,emit:rt}){let Ht=_(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ut=_(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Wt=_(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Gt=_(()=>import(`./DataTable-0Vv-aGHD.js`)),Kt=_(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),qt=_(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Jt=_(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),Yt=_(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_history_plot:Xt}=t(),{isThemeValid:Zt,warnInvalidTheme:Qt}=Ce(),k=e,A=C(null),$t=C(null),en=C(0),tn=C(null),nn=C(0),rn=C(0),an=C(0),j=et(null),M=et(null),on=C(null),N=C(re()),sn=C(!1),cn=C(``),P=C([]),ln=C(!1),F=C(null),un=C(!1),dn=C(null),fn=C(!1),pn=C(null),mn=C(null),hn=C(null),gn=C(null),_n=C(null),vn=C(null),I=C(null),L=C(null),yn=C({x:0,y:0}),bn=C(`pointer`),xn=C(!1),Sn=f({get:()=>!!k.dataset&&k.dataset.length,set:e=>e}),Cn=rt,wn=C(!1),Tn=0;Qe(()=>{fn.value=!0,Dn()});let En=f(()=>R.value.debug);function Dn(){ge(k.dataset)?(oe({componentName:`VueUiHistoryPlot`,type:`dataset`,debug:En.value}),Mn.value=!0):k.dataset.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Sn.value=!1,oe({componentName:`VueUiHistoryPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:En.value})})}),ge(k.dataset)||(Mn.value=R.value.loading),R.value.responsive&&(j.value&&(M.value&&j.value.unobserve(M.value),j.value.disconnect()),j.value=new ResizeObserver(()=>{let{width:e,height:t}=Le({chart:A.value,title:H.value.title.text?$t.value:null,noTitle:on.value,legend:H.value.legend.show?tn.value:null,source:dn.value});cancelAnimationFrame(Tn),Tn=requestAnimationFrame(()=>{q.value.width=e,q.value.height=t,wn.value=!0,R.value.responsiveProportionalSizing?(X.value.plots=u({relator:Math.min(e,t),adjuster:600,source:z.value.radius,threshold:3,fallback:3}),X.value.indexLabels=u({relator:Math.min(e,t),adjuster:600,source:z.value.indexLabels.fontSize,threshold:6,fallback:6}),X.value.labels=u({relator:Math.min(e,t),adjuster:600,source:z.value.labels.fontSize,threshold:6,fallback:6}),X.value.xAxisLabels=u({relator:Math.min(e,t),adjuster:600,source:V.value.x.labels.fontSize,threshold:6,fallback:6}),X.value.xAxisName=u({relator:Math.min(e,t),adjuster:600,source:V.value.x.name.fontSize,threshold:6,fallback:6}),X.value.yAxisLabels=u({relator:Math.min(e,t),adjuster:600,source:V.value.y.labels.fontSize,threshold:6,fallback:6}),X.value.yAxisName=u({relator:Math.min(e,t),adjuster:600,source:V.value.y.name.fontSize,threshold:6,fallback:6})):(X.value.plots=z.value.radius,X.value.indexLabels=z.value.indexLabels.fontSize,X.value.labels=z.value.labels.fontSize,X.value.xAxisLabels=V.value.x.labels.fontSize,X.value.xAxisName=V.value.x.name.fontSize,X.value.yAxisLabels=V.value.y.labels.fontSize,X.value.yAxisName=V.value.y.name.fontSize)})}),M.value=A.value.parentNode,j.value.observe(M.value))}Ze(()=>{cancelAnimationFrame(Tn),j.value&&(M.value&&j.value.unobserve(M.value),j.value.disconnect())});function On(){let e=Se({userConfig:k.config,defaultConfig:Xt}),t={},n=e.theme;if(n){if(!Zt.value(e))Qt(e),t=e;else{let r=Se({userConfig:We[n]||k.config,defaultConfig:e});t={...Se({userConfig:k.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||s}}}else t=e;return t}let R=C(On()),z=f(()=>R.value.style.chart.plots),B=f(()=>R.value.style.chart.grid),V=f(()=>R.value.style.chart.axes),H=f(()=>R.value.style.chart);ye({config:()=>R.value,dataset:()=>k.dataset,component:`VueUiHistoryPlot`,rules:[be.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]}]});let{transitionEnabled:U}=Pe({config:()=>R.value.transitions,dataset:()=>k.dataset}),W=f(()=>R.value.userOptions.useCursorPointer),kn=f(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,axes:{x:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}},y:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}}},grid:{xAxis:{stroke:`#6A6A6A`},horizontalLines:{stroke:`#6A6A6A50`},yAxis:{stroke:`#6A6A6A`},verticalLines:{stroke:`#6A6A6A50`}},legend:{backgroundColor:`transparent`},paths:{useSerieColor:!1,stroke:`#6A6A6A`},plots:{stroke:`#6A6A6A`,indexLabels:{show:!1},labels:{show:!1}}}}},userConfig:R.value.skeletonConfig??{}})),{loading:An,FINAL_DATASET:jn,manualLoading:Mn}=_e({...tt(k),FINAL_CONFIG:R,prepareConfig:On,skeletonDataset:k.config?.skeletonDataset??[{name:``,color:`#CACACA`,values:[{label:``,x:1,y:9},{label:``,x:4,y:1},{label:``,x:7,y:9},{label:``,x:9,y:4}]}],skeletonConfig:se({defaultConfig:R.value,userConfig:kn.value})}),{userOptionsVisible:Nn,setUserOptionsVisibility:Pn,keepUserOptionState:Fn}=Ve({config:R.value}),{svgRef:G}=He({config:H.value.title}),In=ie(k.config);nt(()=>k.config,(e,t)=>{let n=ie(e),r=n!==In;In=n;let i=On();r?(An.value||(R.value=i),Nn.value=!R.value.userOptions.showOnChartHover,Dn(),en.value+=1,rn.value+=1,nn.value+=1,q.value.height=H.value.height,q.value.width=H.value.width,X.value.plots=z.value.radius,X.value.indexLabels=z.value.indexLabels.fontSize,X.value.labels=z.value.labels.fontSize,X.value.xAxisLabels=V.value.x.labels.fontSize,X.value.xAxisName=V.value.x.name.fontSize,X.value.yAxisLabels=V.value.y.labels.fontSize,X.value.yAxisName=V.value.y.name.fontSize,K.value.showTable=R.value.table.show,K.value.showTooltip=H.value.tooltip.show):(R.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=R.value.style.chart.tooltip.show)},{deep:!0}),nt(()=>k.dataset,e=>{Array.isArray(e)&&e.length>0&&(Mn.value=!1)},{deep:!0});let{isPrinting:Ln,isImaging:Rn,generatePdf:zn,generateImage:Bn}=Ne({elementId:`history_plot_${N.value}`,fileName:H.value.title.text||`vue-ui-history-plot`,options:R.value.userOptions.print}),Vn=f(()=>R.value.userOptions.show&&!H.value.title.text),Hn=f(()=>me(R.value.customPalette)),K=C({showTable:R.value.table.show,showTooltip:H.value.tooltip.show});nt(R,()=>{K.value={showTable:R.value.table.show,showTooltip:H.value.tooltip.show}},{immediate:!0});let q=C({height:H.value.height,width:H.value.width}),Un=f(()=>q.value.width),Wn=f(()=>q.value.height),{metrics:Gn,ready:Kn,settling:J,update:qn}=Fe({svgRef:G,canMeasure:()=>!R.value.responsive||wn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(vn.value).textWidth,yAxisLabelWidth:e(gn.value).rotatedWidth,xAxisLabelHeight:e(hn.value).height,timeLabelsHeight:e(_n.value).height})});function Jn(){let e=Gn.value.scaleLabelsWidth,t=Gn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Yn=f(()=>Gn.value.xAxisLabelHeight+Gn.value.timeLabelsHeight+(hn.value?X.value.xAxisName/2:0)),Y=f(()=>{let e=H.value.padding.left,t=H.value.padding.top,n=Jn(),r=z.value.radius;return{left:e+n+V.value.y.name.offsetX,top:t+r,right:q.value.width-H.value.padding.right-r-V.value.y.name.offsetX,bottom:q.value.height-H.value.padding.bottom-Yn.value-r-V.value.x.name.offsetY,width:q.value.width-e-H.value.padding.right-n-r-V.value.y.name.offsetX,height:q.value.height-t-H.value.padding.bottom-Yn.value-r*2-V.value.x.name.offsetY}}),X=C({plots:z.value.radius,indexLabels:z.value.indexLabels.fontSize,labels:z.value.labels.fontSize,xAxisLabels:V.value.x.labels.fontSize,xAxisName:V.value.x.name.fontSize,yAxisLabels:V.value.y.labels.fontSize,yAxisName:V.value.y.name.fontSize}),Z=f(()=>jn.value.map((e,t)=>{let n=Array.isArray(e.temperatureColors)&&e.temperatureColors.length?e.temperatureColors.map(e=>te(e)):void 0;return{...e,color:e.color?te(e.color):Hn.value[t]||s[t]||s[t%s.length],temperatureColors:n,temperatureAngle:Xn(e.temperatureAngle),temperatureIndependant:e.temperatureIndependant===!0,usePlotTemperatureColors:e.usePlotTemperatureColors!==!1,seriesIndex:t}}));function Xn(e=0){let t=Number(e);return Number.isFinite(t)?(t%360+360)%360:0}let Zn=f(()=>Math.max(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)))),Qn=f(()=>{let e=Math.min(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)));return e<0?e:0}),$n=f(()=>Math.max(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)))),er=f(()=>{let e=Math.min(...Z.value.filter(e=>!P.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)));return e<0?e:0}),Q=f(()=>{let e=ae(V.value.x.scaleMin??Qn.value,V.value.x.scaleMax??Zn.value,V.value.x.ticks),t=ae(V.value.y.scaleMin??er.value,V.value.y.scaleMax??$n.value,V.value.y.ticks);return{x:e,y:t,tickX:e.ticks.map(t=>({x:Y.value.left+(t-e.min)/(e.max-e.min)*Y.value.width,y1:Y.value.top,y2:Y.value.bottom,value:t})),tickY:t.ticks.map(e=>({y:Y.value.bottom-(e-t.min)/(t.max-t.min)*Y.value.height,x1:Y.value.left,x2:Y.value.right,value:e}))}});function tr(e){let t=Q.value.x.min<0?Math.abs(Q.value.x.min):Q.value.x.min>0?-Q.value.x.min:0;return Y.value.left+((e||0)+t)/(Q.value.x.max+t)*Y.value.width}function nr(e){let t=Q.value.y.min<0?Math.abs(Q.value.y.min):Q.value.y.min>0?-Q.value.y.min:0;return Y.value.bottom-((e||0)+t)/(Q.value.y.max+t)*Y.value.height}let $=f(()=>Z.value.filter(e=>!P.value.includes(e.seriesIndex)).map((e,t)=>{let n=e.values.map((t,n)=>({valueX:t.x,valueY:t.y,label:t.label,x:tr(t.x),y:nr(t.y),color:e.color,seriesName:e.name,id:re()})),r=e.smooth?ne(n):n.map(e=>`${e.x},${e.y} `).join(``).trim();return{...e,gradientIndex:t,plots:n,path:`M${r}`}})),rr=f(()=>{if(F.value===null||I.value===null)return $.value;let e=$.value.findIndex(e=>e.seriesIndex===I.value);if(e===-1)return $.value;let t=$.value[e];return[...$.value.slice(0,e),...$.value.slice(e+1),t]}),ir=f(()=>$.value.some(e=>ar(e)));function ar(e){return Array.isArray(e?.temperatureColors)&&e.temperatureColors.length}function or(e){return ar(e)&&e.usePlotTemperatureColors}function sr(e){let t=Array.isArray(e?.plots)?e.plots:[];if(!t.length)return{minX:0,maxX:0,minY:0,maxY:0,width:0,height:0};let n=t.map(e=>e.x),r=t.map(e=>e.y),i=Math.min(...n),a=Math.max(...n),o=Math.min(...r),s=Math.max(...r);return{minX:i,maxX:a,minY:o,maxY:s,width:a-i,height:s-o}}function cr(){let e=Y.value;return{minX:e.left,maxX:e.right,minY:e.top,maxY:e.bottom,width:e.width,height:e.height}}function lr(e){return e?.temperatureIndependant?sr(e):cr()}function ur(e){let t=Xn(e?.temperatureAngle)*Math.PI/180,n=Math.sin(t),r=Math.cos(t),i=lr(e),a=i.minX+i.width/2,o=i.minY+i.height/2,s=(Math.abs(n)*i.width+Math.abs(r)*i.height)/2||1;return{x1:a-n*s,y1:o-r*s,x2:a+n*s,y2:o+r*s}}function dr(e,t){let{x1:n,y1:r,x2:i,y2:a}=ur(e),o=i-n,s=a-r,c=o*o+s*s;if(!c)return 0;let ee=((t.x-n)*o+(t.y-r)*s)/c;return Math.min(1,Math.max(0,ee))}function fr(e,t){return a({colors:e.temperatureColors,ratio:dr(e,t)})}function pr(e,t){return`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${N.value}`}function mr(e,t,n){return or(e)?z.value.gradient.show?`url(#${pr(e,t)})`:fr(e,t):z.value.gradient.show?`url(#gradient_${n}_${N.value})`:t.color}function hr(e,t){return or(e)?fr(e,t):e.color}function gr(e,t){return z.value.indexLabels.adaptColorToBackground?de(hr(e,t)):z.value.indexLabels.color}function _r(e,t){let n=$.value.find(t=>t.seriesIndex===e);return n&&or(n)?fr(n,t):t.color}function vr(e){return ar(e)?`url(#temperature_grad_history_${e.seriesIndex}_${N.value})`:H.value.paths.useSerieColor?e.color:H.value.paths.stroke}function yr(e){return F.value===null||I.value===e?1:Math.min(1,z.value.unselectedOpacity)}f(()=>F.value!==null&&I.value!==null);let br=C(!1);function xr(){P.value.length?P.value=[]:Er.value.forEach(e=>{P.value.push(e.seriesIndex)}),Cn(`selectLegend`,$.value)}function Sr(e){P.value.includes(e)?P.value=P.value.filter(t=>t!==e):P.value.push(e),Cn(`selectLegend`,$.value)}function Cr(e){return Z.value.length?Z.value.find(t=>t.name===e)||(En.value&&console.warn(`VueUiHistoryPlot - Series name not found "${e}"`),null):(En.value&&console.warn(`VueUiHistoryPlot - There are no series to show.`),null)}function wr(e){let t=Cr(e);t!==null&&P.value.includes(t.seriesIndex)&&Sr(t.seriesIndex)}function Tr(e){let t=Cr(e);t!==null&&(P.value.includes(t.seriesIndex)||Sr(t.seriesIndex))}let Er=f(()=>Z.value.map(e=>{let t=ar(e)?e.temperatureColors:null;return{...e,gradientColors:t,opacity:P.value.includes(e.seriesIndex)?.5:1,segregate:()=>Sr(e.seriesIndex),isSegregated:P.value.includes(e.seriesIndex),shape:t?`gradient`:`circle`}})),Dr=f(()=>({cy:`history-plot-div-legend`,backgroundColor:H.value.legend.backgroundColor,color:H.value.legend.color,fontSize:H.value.legend.fontSize,paddingBottom:12,fontWeight:H.value.legend.bold?`bold`:``}));function Or({datapoint:e,plotIndex:t,seriesIndex:n}){R.value.events.datapointClick&&R.value.events.datapointClick({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),Cn(`selectDatapoint`,e)}function kr(e){ln.value=e,an.value+=1}let Ar=C(null);function jr({datapoint:e,plotIndex:t,seriesIndex:n}){R.value.events.datapointLeave&&R.value.events.datapointLeave({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),(bn.value!==`keyboard`||I.value!==n||L.value!==t)&&(sn.value=!1,F.value=null)}function Mr(e,t){if(!G.value)return;let n=$.value.find(t=>t.seriesIndex===e);if(!n)return;let r=n.plots[t];if(!r)return;let i=pe(r.x,r.y,G.value);i&&(yn.value=i)}function Nr({datapoint:e,plotIndex:t,seriesIndex:r,triggerMode:a=`pointer`}){R.value.events.datapointEnter&&R.value.events.datapointEnter({datapoint:{...e,plotIndex:t,seriesIndex:r},seriesIndex:r}),I.value=r,L.value=t,bn.value=a,br.value=!0;let o=_r(r,e),s={...e,color:o};Ar.value={datapoint:s,color:o,seriesIndex:r,plotIndex:t,config:R.value,series:Z.value},F.value=e;let c=H.value.tooltip.customFormat;if(un.value=!1,i(c))try{let e=c({seriesIndex:r,datapoint:s,color:o,plotIndex:t,series:Z.value,config:R.value});typeof e==`string`&&(cn.value=e,un.value=!0)}catch{console.warn(`Custom format cannot be applied.`),un.value=!1}if(!un.value){let t=``;t+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${H.value.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o}"/></svg><span>${e.seriesName}</span></div>`,t+=`<div>${e.label}</div>`,t+=`<div>${V.value.x.name.text||`x`}: ${l(V.value.x.labels.formatter,e.valueX,n({p:V.value.x.labels.prefix,v:e.valueX,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding}))}</div>`,t+=`<div>${V.value.y.name.text||`y`}: ${l(V.value.y.labels.formatter,e.valueY,n({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))}</div>`,cn.value=`<div>${t}</div>`}sn.value=!0,a===`keyboard`&&Xe(()=>{Mr(r,t)})}f(()=>({head:$.value.map(e=>({name:e.name,color:e.color}))}));let Pr=f(()=>{let e=[R.value.table.columnNames.series,R.value.table.columnNames.datapoint,R.value.table.columnNames.x,R.value.table.columnNames.y];return{head:e,body:$.value.flatMap(e=>e.plots.map(e=>[{color:e.color,name:e.seriesName},e.label,l(V.value.x.labels.formatter,e.valueX,n({p:V.value.x.labels.prefix,v:e.valueX,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding})),l(V.value.y.labels.formatter,e.valueY,n({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))])),config:{th:{backgroundColor:R.value.table.th.backgroundColor,color:R.value.table.th.color,outline:R.value.table.th.outline},td:{backgroundColor:R.value.table.td.backgroundColor,color:R.value.table.td.color,outline:R.value.table.td.outline},breakpoint:R.value.table.responsiveBreakpoint},colNames:e}});function Fr(e=null){Xe(()=>{let t=[[R.value.table.columnNames.series],[R.value.table.columnNames.datapoint],[R.value.table.columnNames.x],[R.value.table.columnNames.y]],n=$.value.flatMap(e=>e.plots.map(e=>[[e.seriesName],[e.label],[e.valueX],[e.valueY]])),i=[[H.value.title.text],[H.value.title.subtitle.text],t].concat(n),a=r(i);e?e(a):le({csvContent:a,title:H.value.title.text||`vue-ui-history-plot`})})}let Ir=C(!1);function Lr(){Ir.value=!Ir.value}function Rr(){K.value.showTable=!K.value.showTable}function zr(){K.value.showTooltip=!K.value.showTooltip}function Br(){return $.value}let Vr=we(A,()=>H.value.title.text),Hr=f(()=>Q.value.tickX),Ur=f(()=>({start:0,end:Q.value.tickX.length}));Ie({timeLabelsEls:_n,timeLabels:Hr,slicer:Ur,configRef:R,rotationPath:[`style`,`chart`,`axes`,`x`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`axes`,`x`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Un,height:Wn,targetClass:`.vue-ui-history-plot-x-axis-scale`,rotation:V.value.x.labels.autoRotate.angle});let Wr=f(()=>Oe({config:R,style:H,mutableConfig:K,dialog:Yt,accordion:Wt,isFullscreen:ln,parent:A,maxWidth:800}));nt(()=>K.value.showTable,e=>De(e,R,pn));function Gr(){K.value.showTable=!1,mn.value&&mn.value.setTableIconState(!1)}let Kr=f(()=>H.value.backgroundColor),qr=f(()=>H.value.legend),Jr=f(()=>H.value.title),{isCallbackImaging:Yr,isCallbackSvg:Xr,generateSvg:Zr,onGenerateImage:Qr}=Ee({svg:G,title:Jr,legend:qr,legendItems:Er,backgroundColor:Kr,getSvgCallback:()=>R.value.userOptions.callbacks.svg,generateImage:Bn});async function $r(){Cn(`copyAlt`,{config:R.value,dataset:$.value}),R.value.userOptions.callbacks.altCopy?await Promise.resolve(R.value.userOptions.callbacks.altCopy({config:R.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ei=f(()=>({head:Pr.value.head,body:Pr.value.body.map(e=>[e[0]?.name||``,e[1],e[2],e[3]]),caption:R.value.a11y.translations.tableCaption,notice:R.value.a11y.translations.tableAvailable}));function ti(e){return $.value.findIndex(t=>t.seriesIndex===e)}function ni(){if(I.value!==null&&L.value!==null){let e=$.value.find(e=>e.seriesIndex===I.value)?.plots?.[L.value];e&&jr({datapoint:e,plotIndex:L.value,seriesIndex:I.value})}I.value=null,L.value=null,bn.value=`pointer`,sn.value=!1,F.value=null}function ri(){I.value=null,L.value=null,xn.value=!0}function ii(){ni(),xn.value=!1}function ai(e,t){if(!e?.plots?.length)return null;let n=e.plots.length;return(t%n+n)%n}function oi({seriesIndex:e,plotIndex:t,direction:n}){if(!$.value.length)return null;let r=ti(e);if(r===-1)return null;if(n===`up`||n===`down`){let e=$.value[r];if(!e?.plots?.length)return null;let i=ai(e,t+(n===`up`?-1:1));return{seriesIndex:e.seriesIndex,plotIndex:i}}if(n===`left`||n===`right`){let e=((r+(n===`left`?-1:1))%$.value.length+$.value.length)%$.value.length,i=$.value[e];if(!i?.plots?.length)return null;let a=Math.min(t,i.plots.length-1);return{seriesIndex:i.seriesIndex,plotIndex:a}}return null}function si(e){if(!G.value||Ir.value||document.activeElement!==G.value||!$.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){ni();return}if(a){if(I.value===null||L.value===null)return;let e=$.value.find(e=>e.seriesIndex===I.value)?.plots?.[L.value];if(!e)return;Or({datapoint:e,plotIndex:L.value,seriesIndex:I.value});return}let s=null;if(I.value===null||L.value===null){let e=$.value[0];if(!e?.plots?.length)return;s={seriesIndex:e.seriesIndex,plotIndex:0}}else r?s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`up`}):i?s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`down`}):t?s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`left`}):n&&(s=oi({seriesIndex:I.value,plotIndex:L.value,direction:`right`}));if(!s)return;let c=$.value.find(e=>e.seriesIndex===s.seriesIndex)?.plots?.[s.plotIndex];c&&Nr({datapoint:c,plotIndex:s.plotIndex,seriesIndex:s.seriesIndex,triggerMode:`keyboard`})}return xe({getData:Br,getImage:Vr,generatePdf:zn,generateCsv:Fr,generateImage:Bn,generateSvg:Zr,hideSeries:Tr,showSeries:wr,toggleTable:Rr,toggleTooltip:zr,toggleAnnotator:Lr,toggleFullscreen:kr,copyAlt:$r}),nt(()=>[q.value,X.value,V.value,H.value,R.value.style.fontFamily,k.dataset,wn.value,vn.value,_n.value,hn.value,gn.value],qn,{flush:`post`,deep:!0}),(e,t)=>(S(),h(`div`,{id:`history_plot_${N.value}`,ref_key:`historyPlotChart`,ref:A,class:y({"vue-data-ui-component":!0,"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":ln.value}),style:x(`background:${H.value.backgroundColor};color:${H.value.color};font-family:${R.value.style.fontFamily}; position: relative; ${R.value.responsive?`height: 100%`:``}`),onMouseenter:t[2]||=()=>D(Pn)(!0),onMouseleave:t[3]||=()=>D(Pn)(!1)},[g(`div`,{id:`chart-instructions-${N.value}`,class:`sr-only`},[g(`p`,null,E(R.value.a11y.translations.keyboardNavigation),1)],8,at),ei.value.body.length?(S(),p(Be,{key:0,uid:N.value,head:ei.value.head,body:ei.value.body,caption:ei.value.caption,notice:ei.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),T(e.$slots,`userConfig`,{},void 0,!0),R.value.userOptions.buttons.annotator?(S(),p(D(Kt),{key:1,svgRef:D(G),backgroundColor:H.value.backgroundColor,color:H.value.color,active:Ir.value,isCursorPointer:W.value,palette:R.value.userOptions.annotatorPalette,onClose:Lr},Ke({_:2},[w(D(Ae),t=>({name:t,fn:O(n=>[T(e.$slots,t,b(v(D(ke)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Vn.value?(S(),h(`div`,{key:2,ref_key:`noTitle`,ref:on,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),H.value.title.text?(S(),h(`div`,{key:3,ref_key:`chartTitle`,ref:$t,class:`vue-ui-xy-title`,style:x(`font-family:${R.value.style.fontFamily}`)},[(S(),p(Te,{key:`title_${en.value}`,config:{title:{cy:`history-plot-div-title`,...H.value.title},subtitle:{cy:`history-plot-div-subtitle`,...H.value.title.subtitle}}},null,8,[`config`]))],4)):m(``,!0),g(`div`,{id:`legend-top-${N.value}`},null,8,ot),R.value.userOptions.show&&Sn.value&&(D(Fn)||D(Nn))?(S(),p(D(qt),{ref_key:`userOptionsRef`,ref:mn,key:`user_option_${an.value}`,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:D(Ln),isImaging:D(Rn),uid:N.value,hasTooltip:H.value.tooltip.show&&R.value.userOptions.buttons.tooltip,hasPdf:R.value.userOptions.buttons.pdf,hasImg:R.value.userOptions.buttons.img,hasSvg:R.value.userOptions.buttons.svg,hasXls:R.value.userOptions.buttons.csv,hasTable:R.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:R.value.userOptions.buttons.fullscreen,hasAltCopy:R.value.userOptions.buttons.altCopy,isFullscreen:ln.value,chartElement:A.value,position:R.value.userOptions.position,isTooltip:K.value.showTooltip,titles:{...R.value.userOptions.buttonTitles},hasAnnotator:R.value.userOptions.buttons.annotator,isAnnotation:Ir.value,callbacks:R.value.userOptions.callbacks,printScale:R.value.userOptions.print.scale,tableDialog:R.value.table.useDialog,isCursorPointer:W.value,onToggleFullscreen:kr,onGeneratePdf:D(zn),onGenerateCsv:Fr,onGenerateImage:D(Qr),onGenerateSvg:D(Zr),onToggleTable:Rr,onToggleTooltip:zr,onToggleAnnotator:Lr,onCopyAlt:$r,style:x({visibility:D(Fn)?D(Nn)?`visible`:`hidden`:`visible`})},Ke({_:2},[w(D(je)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:O(n=>[T(e.$slots,t,b(v(D(Me)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,st,[(S(),h(`svg`,{ref_key:`svgRef`,ref:G,xmlns:D(fe),viewBox:`0 0 ${q.value.width<0?.1:q.value.width} ${q.value.height<0?.1:q.value.height}`,style:x(`max-width:100%;overflow:visible;background:transparent;color:${H.value.color};visibility:${D(Kn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${N.value}`,tabindex:`0`,onFocus:ri,onBlur:ii,onKeydown:si},[Je(D(Jt)),T(e.$slots,`svg-underlayer`,{svg:{...q.value,drawingArea:Y.value,isPrintingImg:D(Ln)||D(Rn)||D(Yr),isPrintingSvg:D(Xr)}},void 0,!0),e.$slots[`chart-background`]?(S(),h(`foreignObject`,{key:0,x:Y.value.left,y:Y.value.top,width:Y.value.width<=0?10:Y.value.width,height:Y.value.height<=0?10:Y.value.height,style:{pointerEvents:`none`}},[T(e.$slots,`chart-background`,{},void 0,!0)],8,lt)):m(``,!0),z.value.gradient.show||ir.value?(S(),h(`defs`,ut,[z.value.gradient.show?(S(!0),h(d,{key:0},w($.value,(e,t)=>(S(),p(Re,{t:`radial`,key:`gradient_${t}_${N.value}`,id:`gradient_${t}_${N.value}`,fy:`30%`,stops:[[`10%`,D(o)(e.color,z.value.gradient.intensity/100),1],[`90%`,D(ee)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)):m(``,!0),(S(!0),h(d,null,w($.value,e=>(S(),h(d,{key:`temperature_grad_history_template_${e.seriesIndex}_${N.value}`},[z.value.gradient.show&&or(e)?(S(!0),h(d,{key:0},w(e.plots,t=>(S(),p(Re,{t:`radial`,key:`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${N.value}`,id:pr(e,t),fy:`30%`,stops:[[`10%`,D(o)(fr(e,t),z.value.gradient.intensity/100),1],[`90%`,D(ee)(fr(e,t),.1),1],[`100%`,fr(e,t),1]]},null,8,[`id`,`stops`]))),128)):m(``,!0),ar(e)?(S(),h(`linearGradient`,{key:1,id:`temperature_grad_history_${e.seriesIndex}_${N.value}`,gradientUnits:`userSpaceOnUse`,x1:ur(e).x1,y1:ur(e).y1,x2:ur(e).x2,y2:ur(e).y2},[(S(!0),h(d,null,w(e.temperatureColors,(t,n)=>(S(),h(`stop`,{key:`temperature_grad_history_stop_${e.seriesIndex}_${n}_${N.value}`,"stop-color":t,offset:e.temperatureColors.length===1?`0%`:D(ue)(n,e.temperatureColors.length)},null,8,ft))),128))],8,dt)):m(``,!0)],64))),128))])):m(``,!0),B.value.verticalLines.show?(S(),h(`g`,pt,[(S(!0),h(d,null,w(Q.value.tickX,e=>(S(),h(`line`,{x1:e.x,x2:e.x,y1:e.y1,y2:e.y2,stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,mt))),256))])):m(``,!0),V.value.y.labels.show?(S(),h(`g`,ht,[(S(!0),h(d,null,w(Q.value.tickY,e=>(S(),h(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:Y.value.left-5,x2:Y.value.left,y1:e.y,y2:e.y},null,8,gt))),256))])):m(``,!0),V.value.y.labels.show?(S(),h(`g`,{key:4,ref_key:`yAxisScales`,ref:vn},[(S(!0),h(d,null,w(Q.value.tickY,e=>(S(),h(`text`,{x:Y.value.left+V.value.y.labels.offsetX-4-z.value.radius,y:e.y+X.value.yAxisLabels/3,fill:V.value.y.labels.color,"font-size":X.value.yAxisLabels,"text-anchor":`end`},E(D(l)(V.value.y.labels.formatter,e.value,D(n)({p:V.value.y.labels.prefix,v:e.value,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))),9,_t))),256))],512)):m(``,!0),V.value.y.name.text?(S(),h(`text`,{key:5,ref_key:`yAxisLabel`,ref:gn,transform:`translate(${X.value.yAxisName}, ${q.value.height/2+V.value.y.name.offsetY}), rotate(-90)`,"font-size":X.value.yAxisName,fill:V.value.y.name.color,"font-weight":V.value.y.name.bold?`bold`:`normal`,"text-anchor":`middle`},E(V.value.y.name.text),9,vt)):m(``,!0),B.value.horizontalLines.show?(S(),h(`g`,yt,[(S(!0),h(d,null,w(Q.value.tickY,e=>(S(),h(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:B.value.horizontalLines.stroke,"stroke-width":B.value.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,bt))),256))])):m(``,!0),V.value.x.labels.show?(S(),h(`g`,xt,[(S(!0),h(d,null,w(Q.value.tickX,e=>(S(),h(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:e.x,x2:e.x,y1:Y.value.bottom,y2:Y.value.bottom+5},null,8,St))),256))])):m(``,!0),V.value.x.labels.show?(S(),h(`g`,{key:8,ref_key:`xAxisScales`,ref:_n},[(S(!0),h(d,null,w(Q.value.tickX,e=>(S(),h(`text`,{class:`vue-ui-history-plot-x-axis-scale`,transform:`translate(${e.x}, ${Y.value.bottom+V.value.x.labels.offsetY+X.value.xAxisLabels+z.value.radius}), rotate(${V.value.x.labels.rotation})`,fill:V.value.x.labels.color,"font-size":X.value.xAxisLabels,"text-anchor":V.value.x.labels.rotation>0?`start`:V.value.x.labels.rotation<0?`end`:`middle`},E(D(l)(V.value.x.labels.formatter,e.value,D(n)({p:V.value.x.labels.prefix,v:e.value,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding}))),9,Ct))),256))],512)):m(``,!0),V.value.x.name.text?(S(),h(`text`,{key:9,ref_key:`xAxisLabel`,ref:hn,x:q.value.width/2+V.value.x.name.offsetX,y:q.value.height,"font-size":X.value.xAxisName,fill:V.value.x.name.color,"font-weight":V.value.x.name.bold?`bold`:`normal`,"text-anchor":`middle`},E(V.value.x.name.text),9,wt)):m(``,!0),B.value.xAxis.show?(S(),h(`line`,{key:10,x1:Y.value.left,x2:Y.value.left+Y.value.width,y1:Y.value.bottom,y2:Y.value.bottom,stroke:B.value.xAxis.stroke,"stroke-width":B.value.xAxis.strokeWidth,"stroke-linecap":`round`},null,8,Tt)):m(``,!0),B.value.yAxis.show?(S(),h(`line`,{key:11,x1:Y.value.left,x2:Y.value.left,y1:Y.value.top,y2:Y.value.bottom,stroke:B.value.yAxis.stroke,"stroke-width":B.value.yAxis.strokeWidth,"stroke-linecap":`round`},null,8,Et)):m(``,!0),(S(!0),h(d,null,w(rr.value,e=>(S(),h(`g`,{key:`history_plot_serie_${e.seriesIndex}_${N.value}`},[H.value.paths.show?(S(),h(`g`,{key:0,style:x({opacity:yr(e.seriesIndex)})},[g(`path`,{class:y({"vue-data-ui-transition":D(U)&&!D(J)}),d:e.path,stroke:H.value.backgroundColor,"stroke-width":H.value.paths.strokeWidth+4,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Dt),g(`path`,{class:y({"vue-data-ui-transition":D(U)&&!D(J)}),d:e.path,stroke:vr(e),"stroke-width":H.value.paths.strokeWidth,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Ot)],4)):m(``,!0),(S(!0),h(d,null,w(e.plots,e=>(S(),h(`circle`,{cx:e.x,cy:e.y,fill:H.value.backgroundColor,r:X.value.plots,stroke:`none`,class:y({"vue-data-ui-transition":D(U)&&!D(J)})},null,10,kt))),256)),(S(!0),h(d,null,w(e.plots,t=>(S(),h(`circle`,{cx:t.x,cy:t.y,fill:mr(e,t,e.gradientIndex),r:X.value.plots,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,class:y({"vue-data-ui-transition":D(U)&&!D(J)}),style:x({opacity:yr(e.seriesIndex)})},null,14,At))),256)),z.value.labels.show?(S(),h(`g`,jt,[(S(!0),h(d,null,w(e.plots,(t,n)=>(S(),h(`g`,{key:`plab_${n}`},[String(t.label).includes(`
2
2
  `)?(S(),h(`text`,{key:1,class:y({"vue-data-ui-transition":D(U)&&!D(J)}),transform:`translate(${t.x+z.value.labels.offsetX}, ${t.y+z.value.labels.offsetY+X.value.plots+X.value.labels})`,"font-size":X.value.labels,fill:z.value.labels.color,"font-weight":z.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:x({opacity:yr(e.seriesIndex)}),innerHTML:D(c)({content:String(t.label),fontSize:X.value.labels,fill:z.value.labels.color,x:0,y:0})},null,14,Nt)):(S(),h(`text`,{key:0,class:y({"vue-data-ui-transition":D(U)&&!D(J)}),transform:`translate(${t.x+z.value.labels.offsetX}, ${t.y+z.value.labels.offsetY+X.value.plots+X.value.labels})`,"font-size":X.value.labels,fill:z.value.labels.color,"font-weight":z.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:x({opacity:yr(e.seriesIndex)})},E(t.label),15,Mt))]))),128))])):m(``,!0),z.value.indexLabels.show?(S(),h(`g`,Pt,[(S(!0),h(d,null,w(e.plots,(t,n)=>(S(),h(`text`,{key:`lab_${n}`,class:y({"vue-data-ui-transition":D(U)&&!D(J)}),transform:`translate(${t.x+z.value.indexLabels.offsetX}, ${t.y+z.value.indexLabels.offsetY+X.value.indexLabels/3})`,"font-size":X.value.indexLabels,"font-weight":z.value.indexLabels.bold?`bold`:`normal`,fill:gr(e,t),"text-anchor":`middle`,style:x({opacity:yr(e.seriesIndex)})},E(z.value.indexLabels.startAtZero?n:n+1),15,Ft))),128))])):m(``,!0)]))),128)),(S(!0),h(d,null,w(rr.value,e=>(S(),h(`g`,{key:`history_plot_trap_serie_${e.seriesIndex}_${N.value}`},[(S(!0),h(d,null,w(e.plots,(t,n)=>(S(),h(`circle`,{cx:t.x,cy:t.y,fill:`transparent`,r:X.value.plots,stroke:`none`,onMouseenter:r=>Nr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex,triggerMode:`pointer`}),onMouseleave:r=>jr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex}),onClick:r=>Or({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex})},null,40,It))),256))]))),128)),T(e.$slots,`svg`,{svg:{...q.value,drawingArea:Y.value,isPrintingImg:D(Ln)||D(Rn)||D(Yr),isPrintingSvg:D(Xr)}},void 0,!0)],44,ct)),e.$slots.hint?(S(),h(`div`,Lt,[T(e.$slots,`hint`,b(v({hint:R.value.a11y.translations.keyboardNavigation,isVisible:xn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(S(),h(`div`,Rt,[T(e.$slots,`watermark`,b(v({isPrinting:D(Ln)||D(Rn)||D(Yr)||D(Xr)})),void 0,!0)])):m(``,!0),g(`div`,{id:`legend-bottom-${N.value}`},null,8,zt),fn.value&&(H.value.legend.show||e.$slots.legend)?(S(),p(Ge,{key:6,to:H.value.legend.position===`top`?`#legend-top-${N.value}`:`#legend-bottom-${N.value}`},[g(`div`,{ref_key:`chartLegend`,ref:tn},[T(e.$slots,`legend`,{legend:Er.value},()=>[H.value.legend.show&&Sn.value?(S(),p(Ue,{key:`legend_${nn.value}`,legendSet:Er.value,config:Dr.value,isCursorPointer:W.value,onClickMarker:t[0]||=({legend:e})=>{Sr(e.seriesIndex)}},{item:O(({legend:e,index:t})=>[g(`div`,{onClick:t=>e.segregate(),style:x(`opacity:${P.value.includes(e.seriesIndex)?.5:1}`)},E(e.name),13,Bt)]),legendToggle:O(()=>[Er.value.length>2&&H.value.legend.selectAllToggle.show&&!D(An)?(S(),p(ze,{key:0,backgroundColor:H.value.legend.selectAllToggle.backgroundColor,color:H.value.legend.selectAllToggle.color,fontSize:H.value.legend.fontSize,checked:P.value.length>0,isCursorPointer:W.value,onToggle:xr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):m(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):m(``,!0)],!0)],512)],8,[`to`])):m(``,!0),e.$slots.source?(S(),h(`div`,{key:7,ref_key:`source`,ref:dn,dir:`auto`},[T(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Je(D(Ht),{teleportTo:H.value.tooltip.teleportTo,show:K.value.showTooltip&&sn.value,backgroundColor:H.value.tooltip.backgroundColor,color:H.value.tooltip.color,fontSize:H.value.tooltip.fontSize,borderRadius:H.value.tooltip.borderRadius,borderColor:H.value.tooltip.borderColor,borderWidth:H.value.tooltip.borderWidth,backgroundOpacity:H.value.tooltip.backgroundOpacity,position:H.value.tooltip.position,offsetX:H.value.tooltip.offsetX,offsetY:H.value.tooltip.offsetY,parent:A.value,content:cn.value,isCustom:un.value,isFullscreen:ln.value,smooth:H.value.tooltip.smooth,backdropFilter:H.value.tooltip.backdropFilter,smoothForce:H.value.tooltip.smoothForce,smoothSnapThreshold:H.value.tooltip.smoothSnapThreshold,isA11yMode:bn.value===`keyboard`,a11yPosition:yn.value},{"tooltip-before":O(()=>[T(e.$slots,`tooltip-before`,b(v({...Ar.value})),void 0,!0)]),tooltip:O(()=>[T(e.$slots,`tooltip`,b(v({...Ar.value})),void 0,!0)]),"tooltip-after":O(()=>[T(e.$slots,`tooltip-after`,b(v({...Ar.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`]),Sn.value&&R.value.userOptions.buttons.table?(S(),p($e(Wr.value.component),Ye({key:8},Wr.value.props,{ref_key:`tableUnit`,ref:pn,onClose:Gr}),Ke({content:O(()=>[(S(),p(D(Gt),{key:`table_${rn.value}`,colNames:Pr.value.colNames,head:Pr.value.head,body:Pr.value.body,config:Pr.value.config,title:R.value.table.useDialog?``:Wr.value.title,withCloseButton:!R.value.table.useDialog,isCursorPointer:W.value,onClose:Gr},{th:O(({th:e})=>[g(`div`,Vt,E(e),1)]),td:O(({td:e})=>[qe(E(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[R.value.table.useDialog?{name:`title`,fn:O(()=>[qe(E(Wr.value.title),1)]),key:`0`}:void 0,R.value.table.useDialog?{name:`actions`,fn:O(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Fr(R.value.userOptions.callbacks.csv),style:x({cursor:W.value?`pointer`:`default`})},[Je(D(Ut),{name:`fileCsv`,stroke:Wr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),T(e.$slots,`skeleton`,{},()=>[D(An)?(S(),p(ve,{key:0})):m(``,!0)],!0)],46,it))}},[[`__scopeId`,`data-v-badd351c`]]);export{rt as n,Ht as t};
@@ -1,4 +1,4 @@
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,J as o,Jt as s,S as c,X as ee,Yt as te,Zt as ne,at as re,b as l,i as ie,in as ae,nn as oe,nt as se,pt as ce,t as le,tn as ue,vt as de,w as fe,wt as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./annotationSlots-BRR85CqJ.js";import{n as ke,t as Ae}from"./userOptionsSlots-DYuo-E5m.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./useTransitions-ChGGrtrv.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./vue-ui-accordion-S3nRtTU-.js";import{t as Re}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./useUserOptionState-CXlFnwPv.js";import{t as Ve}from"./useChartAccessibility-DOMuYJfm.js";import{t as He}from"./useTableResponsive-uSz_qZOB.js";import{t as Ue}from"./Legend-DM0ClX3D.js";import{t as We}from"./vue_ui_horizontal_bar-C4ulIxeT.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as Je,guardReactiveProps as Ye,mergeProps as Xe,nextTick as Ze,normalizeClass as g,normalizeProps as Qe,normalizeStyle as _,onBeforeUnmount as $e,onMounted as et,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as tt,toDisplayString as S,toRefs as nt,unref as C,useCssVars as rt,useSlots as it,watch as at,withCtx as w,withKeys as ot}from"vue";var st=/* @__PURE__ */ e({default:()=>Yt}),ct=[`id`],lt=[`id`],ut=[`onClick`],dt={style:{position:`relative`}},ft=[`xmlns`,`viewBox`,`aria-describedby`],pt=[`width`,`height`],mt={key:1},ht=[`y`,`width`,`height`,`fill`,`rx`],gt=[`x`,`y`,`width`,`height`,`fill`,`rx`],_t=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],vt=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],yt=[`stroke`,`stroke-width`,`d`],bt=[`stroke`,`stroke-width`,`d`],xt=[`y`,`height`,`width`,`fill`],St=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Ct=[`transform`,`font-size`,`fill`,`font-weight`],wt=[`transform`,`font-size`,`font-weight`,`innerHTML`],Tt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Et=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Dt=[`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Ot={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},kt={key:7,class:`vue-data-ui-watermark`},At=[`onClick`],jt={style:`width:100%;padding-top: 36px;position:relative`},Mt={class:`vue-ui-data-table`},Nt={key:0},Pt={style:{width:`100%`}},Ft=[`data-cell`],It={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Lt=[`data-cell`],Rt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},zt=[`data-cell`],Bt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Vt=[`data-cell`],Ht={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ut=[`data-cell`],Wt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Gt=[`data-cell`],Kt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},qt=[`data-cell`],Jt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Yt=/*#__PURE__*/ ye({__name:`vue-ui-horizontal-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`,`selectDatapoint`],setup(e,{expose:ye,emit:st}){rt(e=>({fba7ca8e:e.tdo}));let Yt=Je(()=>import(`./Tooltip-C1q0Qoh7.js`)),Xt=Je(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Zt=Je(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Qt=Je(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),$t=Je(()=>import(`./PackageVersion-CXT-eAuk.js`).then(e=>e.t)),en=Je(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_vertical_bar:tn}=t(),{isThemeValid:nn,warnInvalidTheme:rn}=xe(),an=it(),T=e,on=d({get(){return!!T.dataset&&T.dataset.length},set(e){return e}}),E=y(ee()),sn=y(!1),cn=y(``),ln=y(null),un=y(0),D=y(null),dn=y(null),fn=y(null),pn=y(null),mn=y(null),hn=y(0),gn=y(0),_n=y(null),vn=y(null),yn=y(null),bn=y(null),xn=y(null),O=y([]),Sn=y({none:0,asc:1,desc:2}),Cn=y(0),wn=y(0),Tn=null,En=null,k=y(null),Dn=y({x:0,y:0}),On=y(`pointer`),kn=st,A=y(zn()),j=d(()=>A.value.style.chart.layout.bars),M=d(()=>A.value.style.chart.layout),N=d(()=>A.value.style.chart.tooltip),P=d(()=>A.value.style.chart);_e({config:()=>A.value,dataset:()=>T.dataset,component:`VueUiHorizontalBar`,rules:[ve.emptyArray,{test:e=>e.length>50||e.some(e=>e.children&&e.children.length>50),message:[`👀 There are > 50 series / bars, which will probably force users to scroll. Consider:`,``,`▶️ Grouping small values into an "Other" category.`,``,`▶️ Using filters, or several instances of the component with subsets of related series.`]}]});let{transitionEnabled:F}=Me({config:()=>A.value.transitions,dataset:()=>T.dataset}),I=d(()=>A.value.userOptions.useCursorPointer),An=d(()=>T.config?.skeletonDataset??[{name:``,value:6,color:`#d9d9d9`},{name:``,value:5,color:`#d9d9d9`},{name:``,value:4,color:`#d9d9d9`},{name:``,value:3,color:`#d9d9d9`},{name:``,value:2,color:`#d9d9d9`},{name:``,value:1,color:`#d9d9d9`}]),jn=d(()=>ae({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{bars:{offsetX:110,dataLabels:{color:`transparent`,value:{prefix:``,suffix:``,formatter:null}},nameLabels:{color:`transparent`}},separators:{color:`#7A7A7A`}},legend:{show:!0,backgroundColor:`transparent`,color:`transparent`,prefix:``,suffix:``,formatter:null},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:A.value.skeletonConfig??{}})),{loading:Mn,FINAL_DATASET:Nn,manualLoading:Pn}=he({...nt(T),FINAL_CONFIG:A,prepareConfig:zn,callback:()=>{Promise.resolve().then(async()=>{H.value.showTable=A.value.table.show,Zn()})},skeletonDataset:An.value,skeletonConfig:ae({defaultConfig:A.value,userConfig:jn.value})}),{userOptionsVisible:Fn,setUserOptionsVisibility:In,keepUserOptionState:Ln}=Be({config:A.value}),{svgRef:Rn}=Ve({config:P.value.title});function zn(){let e=be({userConfig:T.config,defaultConfig:tn}),t={},n=e.theme;if(n){if(!nn.value(e))rn(e),t=e;else{let r=be({userConfig:We[n]||T.config,defaultConfig:e});t={...be({userConfig:T.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:oe[n]||a}}}else t=e;return T.config&&pe(T.config,`events.datapointEnter`)?t.events.datapointEnter=T.config.events.datapointEnter:t.events.datapointEnter=null,T.config&&pe(T.config,`events.datapointLeave`)?t.events.datapointLeave=T.config.events.datapointLeave:t.events.datapointLeave=null,T.config&&pe(T.config,`events.datapointClick`)?t.events.datapointClick=T.config.events.datapointClick:t.events.datapointClick=null,t}let L=y(P.value.width),R=y(P.value.height),z=y(j.value.gap),Bn=ne(T.config);at(()=>T.config,(e,t)=>{let n=ne(e),r=n!==Bn;Bn=n;let i=zn();r?(Mn.value||(A.value=i),Fn.value=!A.value.userOptions.showOnChartHover,hn.value+=1,gn.value+=1,H.value.showTable=A.value.table.show,Cn.value=Sn.value[j.value.sort]??0,H.value.showTooltip=N.value.show,L.value=P.value.width,R.value=P.value.height,z.value=j.value.gap):(A.value.style.chart.tooltip=i.style.chart.tooltip,H.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0}),at(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(Pn.value=!1)},{deep:!0});let{isPrinting:Vn,isImaging:Hn,generatePdf:Un,generateImage:Wn}=je({elementId:`vue-ui-vertical-bar_${E.value}`,fileName:P.value.title.text||`vue-ui-vertical-bar`,options:A.value.userOptions.print}),Gn=d(()=>A.value.userOptions.show&&!P.value.title.text),Kn=d(()=>fe(A.value.customPalette)),qn=y(null),Jn=d(()=>A.value.table.responsiveBreakpoint),Yn=d(()=>A.value.debug),Xn=y(0),B=y(null),V=y(null);function Zn(){if(D.value&&(me(T.dataset)&&(re({componentName:`VueUiVerticalBar`,type:`dataset`,debug:Yn.value}),on.value=!1,Pn.value=!0),me(T.dataset)||(Pn.value=A.value.loading),A.value.responsive)){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:D.value,title:P.value.title.text?dn.value:null,legend:P.value.legend.show?fn.value:null,source:pn.value,noTitle:mn.value});Xn.value=t/3,requestAnimationFrame(async()=>{R.value=t,L.value=e})});B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(e),Ze(()=>{V.value=D.value?.parentNode,V.value&&B.value.observe(V.value)})}}$e(()=>{B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let H=y({showTable:A.value.table.show,showTooltip:N.value.show}),Qn=d(()=>Cn.value===0),$n=d(()=>Cn.value===2),U=d(()=>(Nn.value.forEach((e,t)=>{!e.value&&!e.children&&re({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`value (index ${t})`,debug:Yn.value}),e.children&&(me(e.children)?re({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`children (index ${t})`,debug:Yn.value}):e.children.forEach((e,t)=>{[null,void 0].includes(e.name)&&re({componentName:`VueUiVerticalBar`,type:`datasetSerieAttribute`,property:`name`,key:`children`,index:t,debug:Yn.value})}))}),Nn.value.map((e,t)=>{let n=`vertical_parent_${t}_${E.value}`,r=e.children&&e.children.length>0,i=l(e.value?e.value:r?e.children.map(e=>e.value||0).reduce((e,t)=>e+t,0):0),o=i>=0?1:-1;return{...e,id:n,absoluteIndex:t,shape:`square`,opacity:O.value.includes(n)?.5:1,value:Math.abs(i),sign:o,hasChildren:r,isChild:!1,segregate:()=>pr(n),isSegregated:O.value.includes(n),color:c(e.color)||Kn.value[t]||a[t]||a[t%a.length],children:!e.children||!e.children.length?[]:e.children.toSorted(Qn.value?()=>0:(e,t)=>$n.value?t.value-e.value:e.value-t.value).map((r,s)=>({...r,value:l(Math.abs(r.value)),absoluteIndex:t,sign:r.value>=0?1:-1,isChild:!0,parentId:n,parentName:e.name,parentValue:i,parentSign:o,id:`vertical_child_${t}_${s}_${E.value}`,childIndex:s,color:c(r.color)||c(e.color)||Kn.value[t]||a[t]||a[t%a.length]})).map((t,n)=>({...t,isFirstChild:n===0,isLastChild:n===e.children.length-1}))}}).toSorted(Qn.value?()=>0:(e,t)=>$n.value?t.value-e.value:e.value-t.value))),W=d(()=>U.value.filter(e=>!O.value.includes(e.id))),G=d(()=>W.value.flatMap(e=>e.hasChildren?e.children:e)),er=d(()=>U.value.flatMap(e=>e.hasChildren?e.children:e)),tr=d(()=>W.value.flatMap(e=>e.children&&e.children.length>0?e.children.length:1).reduce((e,t)=>e+t,0)),nr=d(()=>({cy:`vertical-bar-div-legend`,backgroundColor:P.value.legend.backgroundColor,color:P.value.legend.color,fontSize:P.value.legend.fontSize,paddingBottom:12,fontWeight:P.value.legend.bold?`bold`:``})),K=d(()=>j.value.parentLabels.show?j.value.parentLabels.fontSize*3+j.value.parentLabels.paddingBottom:0),q=d(()=>{let e=[],t=0;return G.value.forEach((n,r)=>{n.isChild&&n.childIndex===0&&j.value.parentLabels.show&&(t+=1),e[r]=t}),e}),J=d(()=>{let e=Math.max(0,...q.value)*K.value;return(R.value-24-(tr.value-1)*z.value-e)/tr.value}),Y=d(()=>({width:L.value,height:R.value,padding:{top:12,left:128+j.value.offsetX,right:64+j.value.paddingRight,bottom:12}})),rr=y(0);function ir(){Ze(()=>{if(!xn.value){rr.value=0;return}let e=Array.from(xn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getBBox?.().width??t.getComputedTextLength();return n>e?n:e},0);rr.value=e+12})}at(()=>[G.value,L.value,R.value,j.value.nameLabels,j.value.offsetX],()=>ir(),{deep:!0}),et(()=>{ir()});function ar(){return typeof document>`u`?null:(Tn||(Tn=document.createElement(`canvas`),En=Tn.getContext(`2d`)),En)}function or(e){let t=String(e??``),n=j.value,r=n.dataLabels.fontSize,i=n.dataLabels.bold?700:400,a=A.value.style.fontFamily,o=ar();return o?(o.font=`${i} ${r}px ${a}`,o.measureText(t).width):t.length*r*.6}function sr(){let e=W.value.flatMap(e=>e.children&&e.children.length?e.children.map(e=>Math.abs(e.value)):Math.abs(e.value));return e.length?Math.max(...e):0}let cr=d(()=>{wn.value;let e=j.value,t=rr.value+Math.abs(e.nameLabels.offsetX)+e.offsetX,n=Y.value.width-Y.value.padding.right,r=Math.max(0,n-t-e.offsetX),i=Y.value.width-40,a=sr(),o=G.value.map((e,t)=>({serie:e,textWidth:or(jr(e.value,e,t,e.sign))}));if(!o.length||r<=0)return{left:0,right:0};if(!o.some(({serie:e})=>e.sign===-1)){let n=o.reduce((n,{serie:o,textWidth:s})=>{let c=a?Math.abs(o.value)/a:0;if(c<=0||s<=0)return n;let ee=(t+r*c+3+e.dataLabels.offsetX+s-i)/c;return Math.max(n,ee)},0);return{left:0,right:Math.ceil(Math.min(r,Math.max(0,n)))}}let s=t+r/2,c=-1/0,ee=1/0;o.forEach(({serie:t,textWidth:n})=>{if(t.sign===-1){let t=s+12+e.dataLabels.offsetX+n;ee=Math.min(ee,i-t);return}let r=s-12-e.dataLabels.offsetX-n;c=Math.max(c,40-r)});let te=0;te=c>ee?(c+ee)/2:Math.min(ee,Math.max(c,0));let ne=te*2;return ne>=0?{left:Math.ceil(Math.min(r,ne)),right:0}:{left:0,right:Math.ceil(Math.min(r,-ne))}}),lr=d(()=>cr.value.right),ur=d(()=>cr.value.left);function dr(){wn.value+=1}et(()=>{typeof document<`u`&&document.fonts&&(document.fonts.ready.then(dr),document.fonts.addEventListener?.(`loadingdone`,dr))}),$e(()=>{typeof document<`u`&&document.fonts&&document.fonts.removeEventListener?.(`loadingdone`,dr),Tn=null,En=null});let X=d(()=>{let e=rr.value+Math.abs(j.value.nameLabels.offsetX)+ur.value+j.value.offsetX,t=Y.value.width-Y.value.padding.right,n=Math.max(0,t-e-lr.value-j.value.offsetX);return{top:Y.value.padding.top,bottom:Y.value.padding.top+Y.value.height,left:e,right:t,width:n,fullHeight:Y.value.padding.top+Y.value.padding.bottom+Y.value.height}});function fr(){O.value.length?O.value=[]:U.value.forEach(e=>{O.value.push(e.id)}),kn(`selectLegend`,W.value)}async function pr(e){if(O.value.includes(e))O.value=O.value.filter(t=>t!==e);else{if(O.value.length===U.value.length-1)return;O.value.push(e)}kn(`selectLegend`,W.value)}function mr(e){return U.value.length?U.value.find(t=>t.name===e)||(Yn.value&&console.warn(`VueUiHorizontalBar - Series name not found "${e}"`),null):(Yn.value&&console.warn(`VueUiHorizontalBar - There are no series to show.`),null)}function hr(e){let t=mr(e);t!==null&&O.value.includes(t.id)&&pr(t.id)}function gr(e){let t=mr(e);t!==null&&(O.value.includes(t.id)||pr(t.id))}let Z=d(()=>W.value.map(e=>Math.abs(e.value)).reduce((e,t)=>e+t,0));function _r(e,t=!1,r=0){return t?n({v:l(Math.abs(e)/Z.value*100),s:`%`,r}):Math.abs(e)/Z.value}let vr=d(()=>G.value.map(e=>e.sign).includes(-1)),yr=d(()=>Math.max(...W.value.flatMap(e=>e.children&&e.children.length?Math.max(...e.children.map(e=>e.value)):e.value)));function Q(e){let t=e/yr.value;return l(X.value.width/(vr.value?2:1)*t)}function br(e){return Q(e)+X.value.left}function xr(e,t){let n=W.value.find(t=>t.id===e.parentId);return{y:X.value.top+(z.value+J.value)*t+q.value[t]*K.value-K.value+j.value.parentLabels.fontSize,name:n.name,value:[void 0,NaN,null].includes(n.value)?``:n.sign===1?n.value:-n.value,percentageToTotal:isNaN(n.value/Z.value)?``:_r(n.value,!0,j.value.dataLabels.percentage.roundingPercentage),sign:n.sign}}function Sr(){return W.value}function Cr(e,t){return xr(e,t).name}function wr(e,t){let n=xr(e,t);return jr(n.value,n,t,e.parentSign||e.sign)}let Tr=y(null),Er=y(null);function Dr({datapoint:e,seriesIndex:t}){kn(`selectDatapoint`,e),A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Or({datapoint:e,seriesIndex:t}){A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}),ln.value=null,sn.value=!1,Tr.value=null,k.value===t&&(k.value=null)}function kr(e,t,r=`pointer`){On.value=r,A.value.events.datapointEnter&&A.value.events.datapointEnter({datpoint:e,seriesIndex:t}),k.value=t,ln.value=e,Er.value={datapoint:e,seriesIndex:t,series:U.value,config:A.value},sn.value=!0,Tr.value=e.id;let a=``,o=e.isChild?e.parentName:e.name,s=e.isChild?e.name:``,c=N.value.customFormat;i(c)&&ce(()=>c({datapoint:e,series:U.value,config:A.value,seriesIndex:t}))?cn.value=c({datapoint:e,series:U.value,config:A.value,seriesIndex:t}):(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${N.value.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
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,J as o,Jt as s,S as c,X as ee,Yt as te,Zt as ne,at as re,b as l,i as ie,in as ae,nn as oe,nt as se,pt as ce,t as le,tn as ue,vt as de,w as fe,wt as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./annotationSlots-BRR85CqJ.js";import{n as ke,t as Ae}from"./userOptionsSlots-DYuo-E5m.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./useTransitions-ChGGrtrv.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./vue-ui-accordion-S3nRtTU-.js";import{t as Re}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./useUserOptionState-CXlFnwPv.js";import{t as Ve}from"./useChartAccessibility-DOMuYJfm.js";import{t as He}from"./useTableResponsive-uSz_qZOB.js";import{t as Ue}from"./Legend-DM0ClX3D.js";import{t as We}from"./vue_ui_horizontal_bar-C4ulIxeT.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as Je,guardReactiveProps as Ye,mergeProps as Xe,nextTick as Ze,normalizeClass as g,normalizeProps as Qe,normalizeStyle as _,onBeforeUnmount as $e,onMounted as et,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as tt,toDisplayString as S,toRefs as nt,unref as C,useCssVars as rt,useSlots as it,watch as at,withCtx as w,withKeys as ot}from"vue";var st=/* @__PURE__ */ e({default:()=>Yt}),ct=[`id`],lt=[`id`],ut=[`onClick`],dt={style:{position:`relative`}},ft=[`xmlns`,`viewBox`,`aria-describedby`],pt=[`width`,`height`],mt={key:1},ht=[`y`,`width`,`height`,`fill`,`rx`],gt=[`x`,`y`,`width`,`height`,`fill`,`rx`],_t=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],vt=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],yt=[`stroke`,`stroke-width`,`d`],bt=[`stroke`,`stroke-width`,`d`],xt=[`y`,`height`,`width`,`fill`],St=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Ct=[`transform`,`font-size`,`fill`,`font-weight`],wt=[`transform`,`font-size`,`font-weight`,`innerHTML`],Tt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Et=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Dt=[`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Ot={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},kt={key:7,class:`vue-data-ui-watermark`},At=[`onClick`],jt={style:`width:100%;padding-top: 36px;position:relative`},Mt={class:`vue-ui-data-table`},Nt={key:0},Pt={style:{width:`100%`}},Ft=[`data-cell`],It={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Lt=[`data-cell`],Rt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},zt=[`data-cell`],Bt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Vt=[`data-cell`],Ht={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ut=[`data-cell`],Wt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Gt=[`data-cell`],Kt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},qt=[`data-cell`],Jt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Yt=/*#__PURE__*/ ye({__name:`vue-ui-horizontal-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`,`selectDatapoint`],setup(e,{expose:ye,emit:st}){rt(e=>({fba7ca8e:e.tdo}));let Yt=Je(()=>import(`./Tooltip-C1q0Qoh7.js`)),Xt=Je(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Zt=Je(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Qt=Je(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),$t=Je(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),en=Je(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_vertical_bar:tn}=t(),{isThemeValid:nn,warnInvalidTheme:rn}=xe(),an=it(),T=e,on=d({get(){return!!T.dataset&&T.dataset.length},set(e){return e}}),E=y(ee()),sn=y(!1),cn=y(``),ln=y(null),un=y(0),D=y(null),dn=y(null),fn=y(null),pn=y(null),mn=y(null),hn=y(0),gn=y(0),_n=y(null),vn=y(null),yn=y(null),bn=y(null),xn=y(null),O=y([]),Sn=y({none:0,asc:1,desc:2}),Cn=y(0),wn=y(0),Tn=null,En=null,k=y(null),Dn=y({x:0,y:0}),On=y(`pointer`),kn=st,A=y(zn()),j=d(()=>A.value.style.chart.layout.bars),M=d(()=>A.value.style.chart.layout),N=d(()=>A.value.style.chart.tooltip),P=d(()=>A.value.style.chart);_e({config:()=>A.value,dataset:()=>T.dataset,component:`VueUiHorizontalBar`,rules:[ve.emptyArray,{test:e=>e.length>50||e.some(e=>e.children&&e.children.length>50),message:[`👀 There are > 50 series / bars, which will probably force users to scroll. Consider:`,``,`▶️ Grouping small values into an "Other" category.`,``,`▶️ Using filters, or several instances of the component with subsets of related series.`]}]});let{transitionEnabled:F}=Me({config:()=>A.value.transitions,dataset:()=>T.dataset}),I=d(()=>A.value.userOptions.useCursorPointer),An=d(()=>T.config?.skeletonDataset??[{name:``,value:6,color:`#d9d9d9`},{name:``,value:5,color:`#d9d9d9`},{name:``,value:4,color:`#d9d9d9`},{name:``,value:3,color:`#d9d9d9`},{name:``,value:2,color:`#d9d9d9`},{name:``,value:1,color:`#d9d9d9`}]),jn=d(()=>ae({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{bars:{offsetX:110,dataLabels:{color:`transparent`,value:{prefix:``,suffix:``,formatter:null}},nameLabels:{color:`transparent`}},separators:{color:`#7A7A7A`}},legend:{show:!0,backgroundColor:`transparent`,color:`transparent`,prefix:``,suffix:``,formatter:null},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:A.value.skeletonConfig??{}})),{loading:Mn,FINAL_DATASET:Nn,manualLoading:Pn}=he({...nt(T),FINAL_CONFIG:A,prepareConfig:zn,callback:()=>{Promise.resolve().then(async()=>{H.value.showTable=A.value.table.show,Zn()})},skeletonDataset:An.value,skeletonConfig:ae({defaultConfig:A.value,userConfig:jn.value})}),{userOptionsVisible:Fn,setUserOptionsVisibility:In,keepUserOptionState:Ln}=Be({config:A.value}),{svgRef:Rn}=Ve({config:P.value.title});function zn(){let e=be({userConfig:T.config,defaultConfig:tn}),t={},n=e.theme;if(n){if(!nn.value(e))rn(e),t=e;else{let r=be({userConfig:We[n]||T.config,defaultConfig:e});t={...be({userConfig:T.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:oe[n]||a}}}else t=e;return T.config&&pe(T.config,`events.datapointEnter`)?t.events.datapointEnter=T.config.events.datapointEnter:t.events.datapointEnter=null,T.config&&pe(T.config,`events.datapointLeave`)?t.events.datapointLeave=T.config.events.datapointLeave:t.events.datapointLeave=null,T.config&&pe(T.config,`events.datapointClick`)?t.events.datapointClick=T.config.events.datapointClick:t.events.datapointClick=null,t}let L=y(P.value.width),R=y(P.value.height),z=y(j.value.gap),Bn=ne(T.config);at(()=>T.config,(e,t)=>{let n=ne(e),r=n!==Bn;Bn=n;let i=zn();r?(Mn.value||(A.value=i),Fn.value=!A.value.userOptions.showOnChartHover,hn.value+=1,gn.value+=1,H.value.showTable=A.value.table.show,Cn.value=Sn.value[j.value.sort]??0,H.value.showTooltip=N.value.show,L.value=P.value.width,R.value=P.value.height,z.value=j.value.gap):(A.value.style.chart.tooltip=i.style.chart.tooltip,H.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0}),at(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(Pn.value=!1)},{deep:!0});let{isPrinting:Vn,isImaging:Hn,generatePdf:Un,generateImage:Wn}=je({elementId:`vue-ui-vertical-bar_${E.value}`,fileName:P.value.title.text||`vue-ui-vertical-bar`,options:A.value.userOptions.print}),Gn=d(()=>A.value.userOptions.show&&!P.value.title.text),Kn=d(()=>fe(A.value.customPalette)),qn=y(null),Jn=d(()=>A.value.table.responsiveBreakpoint),Yn=d(()=>A.value.debug),Xn=y(0),B=y(null),V=y(null);function Zn(){if(D.value&&(me(T.dataset)&&(re({componentName:`VueUiVerticalBar`,type:`dataset`,debug:Yn.value}),on.value=!1,Pn.value=!0),me(T.dataset)||(Pn.value=A.value.loading),A.value.responsive)){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:D.value,title:P.value.title.text?dn.value:null,legend:P.value.legend.show?fn.value:null,source:pn.value,noTitle:mn.value});Xn.value=t/3,requestAnimationFrame(async()=>{R.value=t,L.value=e})});B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(e),Ze(()=>{V.value=D.value?.parentNode,V.value&&B.value.observe(V.value)})}}$e(()=>{B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let H=y({showTable:A.value.table.show,showTooltip:N.value.show}),Qn=d(()=>Cn.value===0),$n=d(()=>Cn.value===2),U=d(()=>(Nn.value.forEach((e,t)=>{!e.value&&!e.children&&re({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`value (index ${t})`,debug:Yn.value}),e.children&&(me(e.children)?re({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`children (index ${t})`,debug:Yn.value}):e.children.forEach((e,t)=>{[null,void 0].includes(e.name)&&re({componentName:`VueUiVerticalBar`,type:`datasetSerieAttribute`,property:`name`,key:`children`,index:t,debug:Yn.value})}))}),Nn.value.map((e,t)=>{let n=`vertical_parent_${t}_${E.value}`,r=e.children&&e.children.length>0,i=l(e.value?e.value:r?e.children.map(e=>e.value||0).reduce((e,t)=>e+t,0):0),o=i>=0?1:-1;return{...e,id:n,absoluteIndex:t,shape:`square`,opacity:O.value.includes(n)?.5:1,value:Math.abs(i),sign:o,hasChildren:r,isChild:!1,segregate:()=>pr(n),isSegregated:O.value.includes(n),color:c(e.color)||Kn.value[t]||a[t]||a[t%a.length],children:!e.children||!e.children.length?[]:e.children.toSorted(Qn.value?()=>0:(e,t)=>$n.value?t.value-e.value:e.value-t.value).map((r,s)=>({...r,value:l(Math.abs(r.value)),absoluteIndex:t,sign:r.value>=0?1:-1,isChild:!0,parentId:n,parentName:e.name,parentValue:i,parentSign:o,id:`vertical_child_${t}_${s}_${E.value}`,childIndex:s,color:c(r.color)||c(e.color)||Kn.value[t]||a[t]||a[t%a.length]})).map((t,n)=>({...t,isFirstChild:n===0,isLastChild:n===e.children.length-1}))}}).toSorted(Qn.value?()=>0:(e,t)=>$n.value?t.value-e.value:e.value-t.value))),W=d(()=>U.value.filter(e=>!O.value.includes(e.id))),G=d(()=>W.value.flatMap(e=>e.hasChildren?e.children:e)),er=d(()=>U.value.flatMap(e=>e.hasChildren?e.children:e)),tr=d(()=>W.value.flatMap(e=>e.children&&e.children.length>0?e.children.length:1).reduce((e,t)=>e+t,0)),nr=d(()=>({cy:`vertical-bar-div-legend`,backgroundColor:P.value.legend.backgroundColor,color:P.value.legend.color,fontSize:P.value.legend.fontSize,paddingBottom:12,fontWeight:P.value.legend.bold?`bold`:``})),K=d(()=>j.value.parentLabels.show?j.value.parentLabels.fontSize*3+j.value.parentLabels.paddingBottom:0),q=d(()=>{let e=[],t=0;return G.value.forEach((n,r)=>{n.isChild&&n.childIndex===0&&j.value.parentLabels.show&&(t+=1),e[r]=t}),e}),J=d(()=>{let e=Math.max(0,...q.value)*K.value;return(R.value-24-(tr.value-1)*z.value-e)/tr.value}),Y=d(()=>({width:L.value,height:R.value,padding:{top:12,left:128+j.value.offsetX,right:64+j.value.paddingRight,bottom:12}})),rr=y(0);function ir(){Ze(()=>{if(!xn.value){rr.value=0;return}let e=Array.from(xn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getBBox?.().width??t.getComputedTextLength();return n>e?n:e},0);rr.value=e+12})}at(()=>[G.value,L.value,R.value,j.value.nameLabels,j.value.offsetX],()=>ir(),{deep:!0}),et(()=>{ir()});function ar(){return typeof document>`u`?null:(Tn||(Tn=document.createElement(`canvas`),En=Tn.getContext(`2d`)),En)}function or(e){let t=String(e??``),n=j.value,r=n.dataLabels.fontSize,i=n.dataLabels.bold?700:400,a=A.value.style.fontFamily,o=ar();return o?(o.font=`${i} ${r}px ${a}`,o.measureText(t).width):t.length*r*.6}function sr(){let e=W.value.flatMap(e=>e.children&&e.children.length?e.children.map(e=>Math.abs(e.value)):Math.abs(e.value));return e.length?Math.max(...e):0}let cr=d(()=>{wn.value;let e=j.value,t=rr.value+Math.abs(e.nameLabels.offsetX)+e.offsetX,n=Y.value.width-Y.value.padding.right,r=Math.max(0,n-t-e.offsetX),i=Y.value.width-40,a=sr(),o=G.value.map((e,t)=>({serie:e,textWidth:or(jr(e.value,e,t,e.sign))}));if(!o.length||r<=0)return{left:0,right:0};if(!o.some(({serie:e})=>e.sign===-1)){let n=o.reduce((n,{serie:o,textWidth:s})=>{let c=a?Math.abs(o.value)/a:0;if(c<=0||s<=0)return n;let ee=(t+r*c+3+e.dataLabels.offsetX+s-i)/c;return Math.max(n,ee)},0);return{left:0,right:Math.ceil(Math.min(r,Math.max(0,n)))}}let s=t+r/2,c=-1/0,ee=1/0;o.forEach(({serie:t,textWidth:n})=>{if(t.sign===-1){let t=s+12+e.dataLabels.offsetX+n;ee=Math.min(ee,i-t);return}let r=s-12-e.dataLabels.offsetX-n;c=Math.max(c,40-r)});let te=0;te=c>ee?(c+ee)/2:Math.min(ee,Math.max(c,0));let ne=te*2;return ne>=0?{left:Math.ceil(Math.min(r,ne)),right:0}:{left:0,right:Math.ceil(Math.min(r,-ne))}}),lr=d(()=>cr.value.right),ur=d(()=>cr.value.left);function dr(){wn.value+=1}et(()=>{typeof document<`u`&&document.fonts&&(document.fonts.ready.then(dr),document.fonts.addEventListener?.(`loadingdone`,dr))}),$e(()=>{typeof document<`u`&&document.fonts&&document.fonts.removeEventListener?.(`loadingdone`,dr),Tn=null,En=null});let X=d(()=>{let e=rr.value+Math.abs(j.value.nameLabels.offsetX)+ur.value+j.value.offsetX,t=Y.value.width-Y.value.padding.right,n=Math.max(0,t-e-lr.value-j.value.offsetX);return{top:Y.value.padding.top,bottom:Y.value.padding.top+Y.value.height,left:e,right:t,width:n,fullHeight:Y.value.padding.top+Y.value.padding.bottom+Y.value.height}});function fr(){O.value.length?O.value=[]:U.value.forEach(e=>{O.value.push(e.id)}),kn(`selectLegend`,W.value)}async function pr(e){if(O.value.includes(e))O.value=O.value.filter(t=>t!==e);else{if(O.value.length===U.value.length-1)return;O.value.push(e)}kn(`selectLegend`,W.value)}function mr(e){return U.value.length?U.value.find(t=>t.name===e)||(Yn.value&&console.warn(`VueUiHorizontalBar - Series name not found "${e}"`),null):(Yn.value&&console.warn(`VueUiHorizontalBar - There are no series to show.`),null)}function hr(e){let t=mr(e);t!==null&&O.value.includes(t.id)&&pr(t.id)}function gr(e){let t=mr(e);t!==null&&(O.value.includes(t.id)||pr(t.id))}let Z=d(()=>W.value.map(e=>Math.abs(e.value)).reduce((e,t)=>e+t,0));function _r(e,t=!1,r=0){return t?n({v:l(Math.abs(e)/Z.value*100),s:`%`,r}):Math.abs(e)/Z.value}let vr=d(()=>G.value.map(e=>e.sign).includes(-1)),yr=d(()=>Math.max(...W.value.flatMap(e=>e.children&&e.children.length?Math.max(...e.children.map(e=>e.value)):e.value)));function Q(e){let t=e/yr.value;return l(X.value.width/(vr.value?2:1)*t)}function br(e){return Q(e)+X.value.left}function xr(e,t){let n=W.value.find(t=>t.id===e.parentId);return{y:X.value.top+(z.value+J.value)*t+q.value[t]*K.value-K.value+j.value.parentLabels.fontSize,name:n.name,value:[void 0,NaN,null].includes(n.value)?``:n.sign===1?n.value:-n.value,percentageToTotal:isNaN(n.value/Z.value)?``:_r(n.value,!0,j.value.dataLabels.percentage.roundingPercentage),sign:n.sign}}function Sr(){return W.value}function Cr(e,t){return xr(e,t).name}function wr(e,t){let n=xr(e,t);return jr(n.value,n,t,e.parentSign||e.sign)}let Tr=y(null),Er=y(null);function Dr({datapoint:e,seriesIndex:t}){kn(`selectDatapoint`,e),A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Or({datapoint:e,seriesIndex:t}){A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}),ln.value=null,sn.value=!1,Tr.value=null,k.value===t&&(k.value=null)}function kr(e,t,r=`pointer`){On.value=r,A.value.events.datapointEnter&&A.value.events.datapointEnter({datpoint:e,seriesIndex:t}),k.value=t,ln.value=e,Er.value={datapoint:e,seriesIndex:t,series:U.value,config:A.value},sn.value=!0,Tr.value=e.id;let a=``,o=e.isChild?e.parentName:e.name,s=e.isChild?e.name:``,c=N.value.customFormat;i(c)&&ce(()=>c({datapoint:e,series:U.value,config:A.value,seriesIndex:t}))?cn.value=c({datapoint:e,series:U.value,config:A.value,seriesIndex:t}):(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${N.value.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
2
2
  <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${e.color}"/>${an.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${E.value}_${e.absoluteIndex})"/>`:``}</svg> ${o}</div>
3
3
  ${s?`<div>${s}</div>`:``}
4
4
  </div>`,N.value.showValue&&(a+=`<div>${A.value.translations.value}: <b>${ie(j.value.dataLabels.value.formatter,e.sign===1?e.value:-e.value,n({p:N.value.prefix,v:e.sign===1?e.value:-e.value,s:N.value.suffix,r:N.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`),N.value.showPercentage&&(a+=`<div>${A.value.translations.percentageToTotal} : <b>${n({v:Math.abs(e.value)/Z.value*100,s:`%`,r:N.value.roundingPercentage})}</b></div>`,e.isChild&&(a+=`<div>${A.value.translations.percentageToSerie}: <b>${n({v:Math.abs(e.value)/Math.abs(e.parentValue)*100,s:`%`,r:N.value.roundingPercentage})}</b></div>`)),cn.value=`<div style="text-align:left">${a}</div>`)}function Ar({legend:e,index:t}){let r=P.value.legend;return r.showValue?`${e.name}: ${ie(j.value.dataLabels.value.formatter,e.value,n({p:r.prefix,v:e.value,s:r.suffix,r:r.roundingValue}),{datapoint:e,seriesIndex:t})}`:e.name}function jr(e,t,r,i){if(!j.value.dataLabels.value.show)return``;let a=ie(j.value.dataLabels.value.formatter,l(i===-1&&e>=0?-e:e),n({p:j.value.dataLabels.value.prefix,v:l(i===-1&&e>=0?-e:e),s:j.value.dataLabels.value.suffix,r:j.value.dataLabels.value.roundingValue}),{datapoint:t,seriesIndex:r}),o=`(${_r(e,!0,j.value.dataLabels.percentage.roundingPercentage)})`;return`${a}${j.value.dataLabels.percentage.show?` ${o}`:``}`}let $=d(()=>({head:[A.value.translations.parentName,A.value.translations.value,A.value.translations.percentageToTotal,A.value.translations.childName,A.value.translations.value,A.value.translations.percentageToSerie,A.value.translations.percentageToTotal],body:G.value.map(e=>e.isChild?e.isFirstChild?{color:e.color,parentName:e.parentName,parentValue:e.parentValue,percentageToTotal:e.parentValue/Z.value,childName:e.name,childValue:e.sign===1?e.value:-e.value,childPercentageToParent:Math.abs(e.value)/Math.abs(e.parentValue),childPercentageToTotal:Math.abs(e.value)/Z.value}:{color:``,parentName:``,parentValue:``,percentageToTotal:``,childName:e.name,childValue:e.sign===1?e.value:-e.value,childPercentageToParent:Math.abs(e.value)/Math.abs(e.parentValue),childPercentageToTotal:Math.abs(e.value)/Z.value}:{color:e.color,parentName:e.name,parentValue:e.sign===1?e.value:-e.value,percentageToTotal:Math.abs(e.value)/Z.value,childName:``,childValue:``,childPercentageToParent:``,childPercentageToTotal:``})}));function Mr(e=null){let t=[[P.value.title.text],[P.value.title.subtitle.text],[``]],n=$.value.head,i=$.value.body.map(e=>[e.parentName,e.parentValue,e.percentageToTotal,e.childName,e.childValue,e.childPercentageToParent,e.childPercentageToTotal]),a=t.concat([n]).concat(i),o=r(a);e?e(o):se({csvContent:o,title:P.value.title.text||`vue-ui-vertical-bar`})}let Nr=y(!1);function Pr(e){Nr.value=e,un.value+=1}function Fr(){H.value.showTable=!H.value.showTable}et(()=>{[`none`,`asc`,`desc`].includes(j.value.sort)||re({componentName:`VueUiVerticalBar`,type:`attributeWrongValue`,property:`style.chart.layout.bars.sort`,key:j.value.sort}),Cn.value=Sn.value[j.value.sort]??0});function Ir(){Cn.value+=1,Cn.value>2&&(Cn.value=0)}function Lr(){Ir()}function Rr(){H.value.showTooltip=!H.value.showTooltip}let zr=y(!1);function Br(){zr.value=!zr.value}let Vr=Se(D,()=>P.value.title.text),Hr=d(()=>Ee({config:A,style:P,mutableConfig:H,dialog:en,accordion:Le,isFullscreen:Nr,parent:D,maxWidth:800,isCursorPointer:I}));at(()=>H.value.showTable,e=>Te(e,A,vn));let{isResponsive:Ur}=He(qn,Jn);function Wr(){H.value.showTable=!1,yn.value&&yn.value.setTableIconState(!1)}let Gr=d(()=>U.value.map((e,t)=>({...e,shape:`square`,display:`${e.name}: ${ie(j.value.dataLabels.value.formatter,e.value,n({p:P.value.legend.prefix,v:e.value,s:P.value.legend.suffix,r:P.value.legend.roundingValue}),{datapoint:e,seriesIndex:t})}`}))),Kr=d(()=>P.value.backgroundColor),qr=d(()=>P.value.legend),Jr=d(()=>P.value.title),Yr=d(()=>Gr.value.map(e=>({...e,name:e.display}))),{isCallbackImaging:Xr,isCallbackSvg:Zr,generateSvg:Qr,onGenerateImage:$r}=we({svg:Rn,title:Jr,legend:qr,legendItems:Yr,backgroundColor:Kr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Wn});function ei(){console.warn(`[autoSize]: this legacy method can be safely removed as it has no impact.`)}async function ti(){kn(`copyAlt`,{config:A.value,dataset:W.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ni=y(!1);function ri(){k.value=null,ni.value=!0}function ii(){k.value=null,sn.value=!1,ni.value=!1}function ai(){if(k.value===null)return;let e=G.value[k.value];e&&Or({datapoint:e,seriesIndex:k.value}),k.value=null,On.value=`pointer`}function oi(e){if(!Rn.value||zr.value||document.activeElement!==Rn.value)return;let t=e.key===`ArrowRight`||e.key===`ArrowDown`,n=e.key===`ArrowLeft`||e.key===`ArrowUp`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;let a=G.value.length;if(!a)return;if(e.preventDefault(),e.stopPropagation(),i){ai();return}if(r){if(k.value===null)return;let e=G.value[k.value];if(!e)return;Dr({datapoint:e,seriesIndex:k.value});return}let o=k.value,s=ln.value?G.value.findIndex(e=>e.id===ln.value.id):null;o!==null&&o>=0&&o<a?t?(o+=1,o>=a&&(o=0)):n&&(--o,o<0&&(o=a-1)):s!==null&&s>=0&&s<a?(o=t?s+1:s-1,o>=a&&(o=0),o<0&&(o=a-1)):o=t?0:a-1;let c=G.value[o];c&&(k.value=o,si(c),kr(c,o,`keyboard`))}function si(e){if(!e)return;let t=X.value.right,n=X.value.top+(z.value+J.value)*e.absoluteIndex+q.value[e.absoluteIndex]*K.value;if(!Number.isFinite(t)||!Number.isFinite(n))return;let r=ue(t,n,Rn.value);r&&(Dn.value=r)}let ci=d(()=>({head:$.value.head,body:$.value.body.map(e=>[e.parentName,e.parentValue===``?``:n({v:e.parentValue,r:j.value.dataLabels.value.roundingValue,p:j.value.dataLabels.prefix,s:j.value.dataLabels.suffix}),e.percentageToTotal===``?``:n({v:e.percentageToTotal*100,r:j.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childName,e.childValue===``?``:n({v:e.childValue,r:j.value.dataLabels.value.roundingValue,p:j.value.dataLabels.prefix,s:j.value.dataLabels.suffix}),e.childPercentageToParent===``?``:n({v:e.childPercentageToParent*100,r:j.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childPercentageToTotal===``?``:n({v:e.childPercentageToTotal*100,r:j.value.dataLabels.percentage.roundingPercentage,s:`%`})]),caption:A.value.a11y.translations.tableCaption,notice:A.value.a11y.translations.tableAvailable}));return ye({autoSize:ei,getData:Sr,getImage:Vr,generatePdf:Un,generateCsv:Mr,generateImage:Wn,generateSvg:Qr,hideSeries:gr,showSeries:hr,toggleTable:Fr,toggleSort:Lr,toggleTooltip:Rr,toggleAnnotator:Br,toggleFullscreen:Pr,copyAlt:ti}),(e,t)=>(v(),m(`div`,{class:g(`vue-data-ui-component vue-ui-vertical-bar ${Nr.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`} ${A.value.responsive?`vue-ui-vertical-bar-autosize`:``}`),ref_key:`verticalBarChart`,ref:D,id:`vue-ui-vertical-bar_${E.value}`,style:_(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor};height:100%`),onMouseenter:t[3]||=()=>C(In)(!0),onMouseleave:t[4]||=()=>C(In)(!1)},[h(`p`,{id:`chart-instructions-${E.value}`,class:`sr-only`},S(A.value.a11y.translations.keyboardNavigation),9,lt),ci.value.body.length?(v(),f(ze,{key:0,uid:E.value,head:ci.value.head,body:ci.value.body,caption:ci.value.caption,notice:ci.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),A.value.userOptions.buttons.annotator?(v(),f(C(Zt),{key:1,svgRef:C(Rn),backgroundColor:P.value.backgroundColor,color:P.value.color,active:zr.value,isCursorPointer:I.value,palette:A.value.userOptions.annotatorPalette,onClose:Br},Ge({_:2},[b(C(Oe),t=>({name:t,fn:w(n=>[x(e.$slots,t,Qe(Ye(C(De)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Gn.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:mn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),P.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:dn,style:`width:100%;background:transparent;padding-bottom:12px`},[(v(),f(Ce,{key:`title_${hn.value}`,config:{title:{cy:`vertical-bar-div-title`,...P.value.title},subtitle:{cy:`vertical-bar-div-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),A.value.userOptions.show&&on.value&&(C(Ln)||C(Fn))?(v(),f(C(Qt),{ref_key:`userOptionsRef`,ref:yn,backgroundColor:P.value.backgroundColor,color:P.value.color,key:`user_options_${un.value}`,isImaging:C(Hn),isPrinting:C(Vn),uid:E.value,hasTooltip:A.value.userOptions.buttons.tooltip&&N.value.show,hasPdf:A.value.userOptions.buttons.pdf,hasImg:A.value.userOptions.buttons.img,hasSvg:A.value.userOptions.buttons.svg,hasXls:A.value.userOptions.buttons.csv,hasTable:A.value.userOptions.buttons.table,hasSort:A.value.userOptions.buttons.sort,hasFullscreen:A.value.userOptions.buttons.fullscreen,hasAltCopy:A.value.userOptions.buttons.altCopy,isFullscreen:Nr.value,isTooltip:H.value.showTooltip,titles:{...A.value.userOptions.buttonTitles},chartElement:D.value,position:A.value.userOptions.position,hasAnnotator:A.value.userOptions.buttons.annotator,isAnnotation:zr.value,callbacks:A.value.userOptions.callbacks,printScale:A.value.userOptions.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Pr,onGeneratePdf:C(Un),onGenerateCsv:Mr,onGenerateImage:C($r),onGenerateSvg:C(Qr),onToggleTable:Fr,onToggleSort:Lr,onToggleTooltip:Rr,onToggleAnnotator:Br,onCopyAlt:ti,style:_({visibility:C(Ln)?C(Fn)?`visible`:`hidden`:`visible`})},Ge({_:2},[b(C(ke)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionSort optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[x(e.$slots,t,Qe(Ye(C(Ae)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasSort.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),e.$slots.legend&&P.value.legend.show&&P.value.legend.position===`top`?x(e.$slots,`legend`,{legend:U.value},void 0,!0,5):p(``,!0),!e.$slots.legend&&P.value.legend.show&&P.value.legend.position===`top`?(v(),m(`div`,{key:6,ref_key:`chartLegend`,ref:fn},[(v(),f(Ue,{key:`legend_top_${gn.value}`,legendSet:U.value,config:nr.value,onClickMarker:t[0]||=({legend:e})=>pr(e.id)},Ge({item:w(({legend:e,index:t})=>[h(`div`,{onClick:t=>pr(e.id),style:_(`opacity:${O.value.includes(e.id)?.5:1}`)},S(Ar({legend:e,index:t})),13,ut)]),legendToggle:w(()=>[U.value.length>2&&P.value.legend.selectAllToggle.show&&!C(Mn)?(v(),f(Re,{key:0,backgroundColor:P.value.legend.selectAllToggle.backgroundColor,color:P.value.legend.selectAllToggle.color,fontSize:P.value.legend.fontSize,checked:O.value.length>0,onToggle:fr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):p(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:w(({legend:e,index:t})=>[qe(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${E.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`]))],512)):p(``,!0),h(`div`,dt,[(v(),m(`svg`,{ref_key:`svgRef`,ref:Rn,xmlns:C(le),class:g({"vue-data-ui-fullscreen--on":Nr.value,"vue-data-ui-fulscreen--off":!Nr.value,"vue-data-ui-no-transition":!C(F)}),viewBox:`0 0 ${L.value} ${R.value}`,style:_(`max-width:100%;overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,"aria-describedby":`chart-instructions-${E.value}`,onFocus:ri,onBlur:ii,onKeydown:oi},[h(`g`,{ref_key:`G`,ref:_n,class:`vue-data-ui-g`},[qe(C($t)),x(e.$slots,`svg-underlayer`,{svg:{...Y.value,drawingArea:X.value,isPrintingImg:C(Vn)||C(Hn)||C(Xr),isPrintingSvg:C(Zr)}},void 0,!0),e.$slots[`chart-background`]?(v(),m(`foreignObject`,{key:0,x:0,y:0,width:L.value,height:R.value,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,pt)):p(``,!0),h(`defs`,null,[(v(!0),m(u,null,b(G.value,(e,t)=>(v(),f(Ie,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`vertical_bar_gradient_${E.value}_${t}`,key:`vertical_bar_gradient_${E.value}_${t}`,stops:[[`0%`,e.color,1],[`100%`,C(s)(C(te)(e.color,.03),100-j.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(v(),m(`g`,mt,[(v(!0),m(u,null,b(G.value,t=>(v(),m(`defs`,null,[x(e.$slots,`pattern`,Xe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${E.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):p(``,!0),j.value.rowColor?(v(!0),m(u,{key:2},b(G.value,(e,t)=>(v(),m(`g`,{key:`row_${e.id}`},[h(`rect`,{x:0,y:X.value.top+(z.value+J.value)*t+q.value[t]*K.value,width:L.value,height:J.value<=0?1e-4:J.value,fill:j.value.rowColor,rx:j.value.rowRadius,style:{pointerEvents:`none`},class:g({"vue-data-ui-transition":C(F)})},null,10,ht)]))),128)):p(``,!0),(v(!0),m(u,null,b(G.value,(e,t)=>(v(),m(`g`,{key:`underlayer_${e.id}`},[h(`rect`,{x:C(l)(vr.value?X.value.left+X.value.width/2-(e.sign===1?0:Q(e.value)<=0?1e-4:Q(e.value)):X.value.left),y:X.value.top+(z.value+J.value)*t+q.value[t]*K.value,width:C(l)(Q(e.value)<=0?1e-4:Q(e.value)),height:J.value<=0?1e-4:J.value,fill:j.value.underlayerColor,rx:j.value.borderRadius,class:g({"vue-data-ui-transition":C(F)})},null,10,gt)]))),128)),(v(!0),m(u,null,b(G.value,(t,n)=>(v(),m(`g`,{key:`barloop_${t.id}`},[h(`rect`,{x:C(l)(vr.value?X.value.left+X.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):X.value.left),y:X.value.top+(z.value+J.value)*n+q.value[n]*K.value,width:C(l)(Q(t.value)<=0?1e-4:Q(t.value)),height:J.value<=0?1e-4:J.value,fill:j.value.useGradient?`url(#vertical_bar_gradient_${E.value}_${n})`:C(s)(t.color,j.value.fillOpacity),rx:j.value.borderRadius,stroke:j.value.useStroke?t.color:`none`,"stroke-width":j.value.useStroke?j.value.strokeWidth:0,class:g({"vue-data-ui-transition":C(F)})},null,10,_t),e.$slots.pattern?(v(),m(`rect`,{key:0,x:C(l)(vr.value?X.value.left+X.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):X.value.left),y:X.value.top+(z.value+J.value)*n+q.value[n]*K.value,width:C(l)(Q(t.value)<=0?1e-4:Q(t.value)),height:J.value<=0?1e-4:J.value,fill:`url(#pattern_${E.value}_${t.absoluteIndex})`,rx:j.value.borderRadius,stroke:j.value.useStroke?t.color:`none`,"stroke-width":j.value.useStroke?j.value.strokeWidth:0,class:g({"vue-data-ui-transition":C(F)})},null,10,vt)):p(``,!0),(!t.isChild||t.isLastChild)&&M.value.separators.show&&n!==G.value.length-1?(v(),m(`path`,{key:1,stroke:M.value.separators.color,"stroke-width":M.value.separators.strokeWidth,"stroke-linecap":`round`,class:g({"vue-data-ui-transition":C(F)}),d:`M${L.value}, ${J.value+z.value/2+X.value.top+(z.value+J.value)*n+q.value[n]*K.value} ${M.value.separators.fullWidth?0:X.value.left}, ${J.value+z.value/2+X.value.top+(z.value+J.value)*n+q.value[n]*K.value}`},null,10,yt)):p(``,!0),vr.value&&M.value.separators.show?(v(),m(`path`,{key:2,stroke:M.value.separators.color,"stroke-width":M.value.separators.strokeWidth,"stroke-linecap":`round`,class:g({"vue-data-ui-transition":C(F)}),d:`M${X.value.left+X.value.width/2}, ${X.value.top} ${X.value.left+X.value.width/2}, ${X.value.bottom}`},null,10,bt)):p(``,!0)]))),128)),h(`g`,{ref_key:`parentLabels`,ref:bn},[(v(!0),m(u,null,b(G.value,(e,t)=>(v(),m(`g`,{key:`pn_${e.id}`,class:`vue-ui-horizontal-bar-parent-label`},[e.isChild&&e.childIndex===0&&j.value.parentLabels.show?(v(),m(`rect`,{key:0,class:g([`vue-ui-horizontal-bar-parent-marker`,{"vue-data-ui-transition":C(F)}]),x:2,y:xr(e,t).y-j.value.parentLabels.fontSize/1.5,height:j.value.parentLabels.fontSize/1.5,width:j.value.parentLabels.fontSize/1.5,rx:1,fill:e.color},null,10,xt)):p(``,!0),e.isChild&&e.childIndex===0&&j.value.parentLabels.show?(v(),m(`text`,{key:1,class:g({"vue-data-ui-transition":C(F)}),transform:`translate(${j.value.parentLabels.offsetX+j.value.parentLabels.fontSize}, ${xr(e,t).y})`,"font-size":j.value.parentLabels.fontSize,fill:j.value.parentLabels.color,"font-weight":j.value.parentLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:C(o)({content:`${Cr(e,t)}`,fontSize:j.value.parentLabels.fontSize,fill:M.value.bars.parentLabels.color,x:0,y:0,translateY:!1})},null,10,St)):p(``,!0),e.isChild&&e.childIndex===0&&j.value.parentLabels.show?(v(),m(`text`,{key:2,class:g({"vue-data-ui-transition":C(F)}),transform:`translate(${j.value.parentLabels.offsetX+j.value.parentLabels.fontSize}, ${xr(e,t).y+C(de)(Cr(e,t))*j.value.parentLabels.fontSize*1.1})`,"font-size":j.value.parentLabels.fontSize,fill:j.value.parentLabels.color,"font-weight":j.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`start`},S(wr(e,t)),11,Ct)):p(``,!0)]))),128))],512),h(`g`,{ref_key:`childLabels`,ref:xn},[(v(!0),m(u,null,b(er.value,(e,t)=>(v(),m(`g`,{key:`cl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&j.value.nameLabels.show?(v(),m(`text`,{key:0,"text-anchor":`start`,class:g({"vue-data-ui-transition":C(F)}),transform:`translate(${Math.abs(j.value.nameLabels.offsetX)}, ${C(l)(X.value.top+(z.value+J.value)*t+J.value/2+j.value.nameLabels.fontSize/2+q.value[t]*K.value)})`,"font-size":j.value.nameLabels.fontSize,fill:`transparent`,"font-weight":j.value.nameLabels.bold?`bold`:`normal`,style:{"user-select":`none`},innerHTML:C(o)({content:e.name,fontSize:j.value.nameLabels.fontSize,fill:`transparent`,x:0,y:0,translateY:!0})},null,10,wt)):p(``,!0)]))),128))],512),h(`g`,null,[(v(!0),m(u,null,b(G.value,(e,t)=>(v(),m(`g`,{key:`vislab_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&j.value.nameLabels.show?(v(),m(`text`,{key:0,class:g({"vue-data-ui-transition":C(F)}),"text-anchor":`end`,transform:`translate(${X.value.left+j.value.nameLabels.offsetX-6}, ${X.value.top+(z.value+J.value)*t+J.value/2+j.value.nameLabels.fontSize/3+q.value[t]*K.value})`,"font-size":j.value.nameLabels.fontSize,fill:j.value.nameLabels.color,"font-weight":j.value.nameLabels.bold?`bold`:`normal`,innerHTML:C(o)({content:e.name,fontSize:j.value.nameLabels.fontSize,fill:M.value.bars.nameLabels.color,x:0,y:0,translateY:!0})},null,10,Tt)):p(``,!0)]))),128))]),h(`g`,null,[(v(!0),m(u,null,b(G.value,(e,t)=>(v(),m(`g`,{key:`sdl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[h(`text`,{class:g({"vue-data-ui-transition":C(F)}),transform:`translate(${vr.value?X.value.left+X.value.width/2+(e.sign===1?-12:12)+(e.sign===1?-M.value.bars.dataLabels.offsetX:M.value.bars.dataLabels.offsetX):Math.min(br(e.value)+3+P.value.layout.bars.dataLabels.offsetX,X.value.right-2)},${X.value.top+(z.value+J.value)*t+J.value/2+q.value[t]*K.value+j.value.dataLabels.fontSize/3})`,"text-anchor":!vr.value||e.sign===-1?`start`:`end`,"font-size":j.value.dataLabels.fontSize,fill:j.value.dataLabels.color,"font-weight":j.value.dataLabels.bold?`bold`:`normal`},S(jr(e.value,e,t,e.sign)),11,Et)]))),128))]),(v(!0),m(u,null,b(G.value,(e,t)=>(v(),m(`g`,null,[h(`rect`,{x:0,y:X.value.top+(z.value+J.value)*t-z.value/2+q.value[t]*K.value,width:L.value,height:J.value+z.value<=0?1e-4:J.value+z.value,fill:Tr.value===e.id?C(s)(M.value.highlighter.color,M.value.highlighter.opacity):`transparent`,onMouseenter:n=>kr(e,t,`pointer`),onMouseleave:n=>Or({datapoint:e,seriesIndex:t}),onClick:n=>Dr({datapoint:e,seriesIndex:t})},null,40,Dt)]))),256)),x(e.$slots,`svg`,{svg:{...Y.value,drawingArea:X.value,isPrintingImg:C(Vn)||C(Hn)||C(Xr),isPrintingSvg:C(Zr)}},void 0,!0)],512)],46,ft)),e.$slots.hint?(v(),m(`div`,Ot,[x(e.$slots,`hint`,Qe(Ye({hint:A.value.a11y.translations.keyboardNavigation,isVisible:ni.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,kt,[x(e.$slots,`watermark`,Qe(Ye({isPrinting:C(Vn)||C(Hn)||C(Xr)||C(Zr)})),void 0,!0)])):p(``,!0),e.$slots.legend&&P.value.legend.show&&P.value.legend.position===`bottom`?x(e.$slots,`legend`,{legend:U.value},void 0,!0,8):p(``,!0),!e.$slots.legend&&P.value.legend.show&&P.value.legend.position===`bottom`?(v(),m(`div`,{key:9,ref_key:`chartLegend`,ref:fn},[(v(),f(Ue,{key:`legend_bottom_${gn.value}`,legendSet:U.value,config:nr.value,isCursorPointer:I.value,onClickMarker:t[1]||=({legend:e})=>pr(e.id)},Ge({item:w(({legend:e,index:t})=>[h(`div`,{onClick:t=>pr(e.id),style:_(`opacity:${O.value.includes(e.id)?.5:1}`)},S(Ar({legend:e,index:t})),13,At)]),legendToggle:w(()=>[U.value.length>2&&P.value.legend.selectAllToggle.show&&!C(Mn)?(v(),f(Re,{key:0,backgroundColor:P.value.legend.selectAllToggle.backgroundColor,color:P.value.legend.selectAllToggle.color,fontSize:P.value.legend.fontSize,checked:O.value.length>0,isCursorPointer:I.value,onToggle:fr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:w(({legend:e,index:t})=>[qe(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${E.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`]))],512)):p(``,!0),e.$slots.source?(v(),m(`div`,{key:10,ref_key:`source`,ref:pn,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),qe(C(Yt),{teleportTo:N.value.teleportTo,show:H.value.showTooltip&&sn.value&&O.value.length<T.dataset.length,backgroundColor:N.value.backgroundColor,color:N.value.color,borderRadius:N.value.borderRadius,borderColor:N.value.borderColor,borderWidth:N.value.borderWidth,fontSize:N.value.fontSize,backgroundOpacity:N.value.backgroundOpacity,position:N.value.position,offsetX:N.value.offsetX,offsetY:N.value.offsetY,parent:D.value,content:cn.value,isFullscreen:Nr.value,isCustom:N.value.customFormat&&typeof N.value.customFormat==`function`,smooth:N.value.smooth,backdropFilter:N.value.backdropFilter,smoothForce:N.value.smoothForce,smoothSnapThreshold:N.value.smoothSnapThreshold,isA11yMode:On.value===`keyboard`,a11yPosition:Dn.value},{"tooltip-before":w(()=>[x(e.$slots,`tooltip-before`,Qe(Ye({...Er.value})),void 0,!0)]),tooltip:w(()=>[x(e.$slots,`tooltip`,Qe(Ye({...Er.value})),void 0,!0)]),"tooltip-after":w(()=>[x(e.$slots,`tooltip-after`,Qe(Ye({...Er.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),on.value&&A.value.userOptions.buttons.table?(v(),f(tt(Hr.value.component),Xe({key:11},Hr.value.props,{ref_key:`tableUnit`,ref:vn,onClose:Wr}),Ge({content:w(()=>[h(`div`,{ref_key:`tableContainer`,ref:qn,class:`vue-ui-vertical-bar-table atom-data-table`,style:_(`${A.value.table.useDialog?``:`max-height: 300px; margin-top: 24px`}`)},[h(`div`,jt,[A.value.table.useDialog?p(``,!0):(v(),m(`div`,{key:0,role:`button`,tabindex:`0`,style:_(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${I.value?`pointer`:`default`}; background:${A.value.table.th.backgroundColor};`),onClick:Wr,onKeypress:ot(Wr,[`enter`])},[qe(C(Xt),{name:`close`,stroke:A.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),h(`div`,{style:{width:`100%`,"container-type":`inline-size`},class:g({"vue-ui-responsive":C(Ur)})},[h(`table`,Mt,[A.value.table.useDialog?p(``,!0):(v(),m(`caption`,{key:0,style:_({backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Ke(S(P.value.title.text)+` `,1),P.value.title.subtitle.text?(v(),m(`span`,Nt,S(P.value.title.subtitle.text),1)):p(``,!0)],4)),h(`thead`,null,[h(`tr`,{role:`row`,style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color}`)},[(v(!0),m(u,null,b($.value.head,e=>(v(),m(`th`,{style:_(`outline:${A.value.table.th.outline}`)},[h(`div`,Pt,S(e),1)],4))),256))],4),h(`tr`,null,[h(`th`,{style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color};outline:${A.value.table.th.outline}`)},null,4),h(`th`,{style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color};outline:${A.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` ∑ `+S(A.value.table.td.prefix)+S(isNaN(Z.value)?``:Z.value.toFixed(A.value.table.td.roundingValue))+S(A.value.table.td.suffix),5),h(`th`,{style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color};outline:${A.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` 100% `,4),h(`th`,{style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color};outline:${A.value.table.th.outline}`)},null,4),h(`th`,{style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color};outline:${A.value.table.th.outline}`)},null,4),h(`th`,{style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color};outline:${A.value.table.th.outline}`)},null,4),h(`th`,{style:_(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color};outline:${A.value.table.th.outline}`)},null,4)])]),h(`tbody`,null,[(v(!0),m(u,null,b($.value.body,(e,t)=>(v(),m(`tr`,{class:g({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:_(`background:${A.value.table.td.backgroundColor};color:${A.value.table.td.color}`)},[h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${A.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":$.value.head[0]??``},[h(`div`,It,[e.color?(v(),m(`span`,{key:0,style:_(`color:${e.color};margin-right:3px`)},`⬤`,4)):p(``,!0),h(`span`,null,S(e.parentName),1)])],12,Ft),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${A.value.table.td.outline}`),"data-cell":$.value.head[1]??``},[h(`div`,Rt,S(A.value.table.td.prefix)+S([``,NaN,void 0].includes(e.parentValue)?``:e.parentValue.toFixed(A.value.table.td.roundingValue))+S(A.value.table.td.suffix),1)],12,Lt),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${A.value.table.td.outline}`),"data-cell":$.value.head[2]??``},[h(`div`,Bt,S([``,NaN,void 0].includes(e.percentageToTotal)?``:`${(e.percentageToTotal*100).toFixed(A.value.table.td.roundingPercentage)}%`),1)],12,zt),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${A.value.table.td.outline}`),"data-cell":$.value.head[3]??``},[h(`div`,Ht,S(e.childName),1)],12,Vt),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${A.value.table.td.outline}`),"data-cell":$.value.head[4]??``},[h(`div`,Wt,S(A.value.table.td.prefix)+S([``,NaN,void 0].includes(e.childValue)?``:e.childValue.toFixed(A.value.table.td.roundingValue))+S(A.value.table.td.suffix),1)],12,Ut),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${A.value.table.td.outline}`),"data-cell":$.value.head[5]??``},[h(`div`,Kt,S([``,NaN,void 0].includes(e.childPercentageToParent)?``:`${(e.childPercentageToParent*100).toFixed(A.value.table.td.roundingPercentage)}%`),1)],12,Gt),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${A.value.table.td.outline}`),"data-cell":$.value.head[6]??``},[h(`div`,Jt,S([``,NaN,void 0].includes(e.childPercentageToTotal)?``:`${(e.childPercentageToTotal*100).toFixed(A.value.table.td.roundingPercentage)}%`),1)],12,qt)],6))),256))])])],2)])],4)]),_:2},[A.value.table.useDialog?{name:`title`,fn:w(()=>[Ke(S(Hr.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:w(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[2]||=e=>Mr(A.value.userOptions.callbacks.csv),style:_({cursor:I.value?`pointer`:`default`})},[qe(C(Xt),{name:`fileCsv`,stroke:Hr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(Mn)?(v(),f(ge,{key:0})):p(``,!0)],!0)],46,ct))}},[[`__scopeId`,`data-v-355fab40`]]);export{st as n,Yt as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,X as r,i}from"./lib-rPeBMZrn.js";import{n as a,t as o}from"./useHints-C-TwxM0Y.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{t as c}from"./usePrefersMotion-XLHwega2.js";import{Fragment as l,computed as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as h,defineAsyncComponent as g,normalizeClass as _,normalizeStyle as v,onMounted as y,openBlock as b,ref as x,renderSlot as S,toDisplayString as C,unref as w,useSlots as T,watch as E}from"vue";var D=/* @__PURE__ */ e({default:()=>j}),O=[`aria-labelledby`],k=[`id`],A=[`aria-label`],j={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(e){let D=g(()=>import(`./vue-ui-digits-AoPCgSfP.js`).then(e=>e.n)),{vue_ui_kpi:j}=t(),M=c(),N=e,P=u({get:()=>R(),set:e=>e});a({config:()=>P.value,dataset:()=>N.dataset,component:`VueUiKpi`,rules:[o.noHint]});let F=T(),I=u(()=>P.value.debug),L=x(r());y(()=>{F[`chart-background`]&&I.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function R(){return s({userConfig:N.config,defaultConfig:j})}E(()=>N.config,e=>{P.value=R(),H()},{deep:!0});let z=x((N.dataset,N.dataset)),B=x(P.value.useAnimation?P.value.animationValueStart:z.value),V=e=>{let t=P.value.animationFrames,n=Math.abs(e-B.value)/t;function r(){B.value<e?B.value=Math.min(B.value+n,e):B.value>e&&(B.value=Math.max(B.value-n,e)),B.value!==e&&requestAnimationFrame(r)}r()};y(()=>{H()});function H(){P.value.useAnimation&&!M.value?(B.value=P.value.animationValueStart,V(N.dataset)):B.value=N.dataset}return E(()=>N.dataset,e=>{P.value.useAnimation&&!M.value?V(e):B.value=e}),(t,r)=>(b(),f(`div`,{class:_(`vue-data-ui-component vue-ui-kpi ${P.value.layoutClass}`),style:v(`background:${P.value.backgroundColor}; ${P.value.layoutCss}`),"aria-labelledby":`kpi-title-${L.value}`},[P.value.title||t.$slots.title?(b(),f(`div`,{key:0,class:_(`vue-ui-kpi-title ${P.value.titleClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.titleFontSize}px; color:${P.value.titleColor}; font-weight:${P.value.titleBold?`bold`:`normal`}; ${P.value.titleCss}`),id:`kpi-title-${L.value}`},[S(t.$slots,`title`,{comment:e.dataset}),m(` `+C(P.value.title),1)],14,k)):d(``,!0),S(t.$slots,`comment-before`,{comment:e.dataset}),p(`div`,{class:_(`vue-ui-kpi-value ${P.value.valueClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.valueFontSize}px; color:${P.value.valueColor}; font-weight:${P.value.valueBold?`bold`:`normal`}; ${P.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":B.value.toFixed(P.value.valueRounding)},[S(t.$slots,`value`,{comment:e.dataset}),P.value.analogDigits.show?(b(),f(`div`,{key:0,style:v({height:P.value.analogDigits.height+`px`})},[h(w(D),{dataset:Number(B.value.toFixed(P.value.valueRounding)),config:{backgroundColor:P.value.backgroundColor,digits:{color:P.value.analogDigits.color,skeletonColor:P.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(b(),f(l,{key:1},[m(C(w(i)(P.value.formatter,B.value,w(n)({p:P.value.prefix,v:B.value,s:P.value.suffix,r:P.value.valueRounding}))),1)],64))],14,A),S(t.$slots,`comment-after`,{comment:e.dataset})],14,O))}};export{D as n,j as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,X as r,i}from"./lib-rPeBMZrn.js";import{n as a,t as o}from"./useHints-C-TwxM0Y.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{t as c}from"./usePrefersMotion-XLHwega2.js";import{Fragment as l,computed as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as h,defineAsyncComponent as g,normalizeClass as _,normalizeStyle as v,onMounted as y,openBlock as b,ref as x,renderSlot as S,toDisplayString as C,unref as w,useSlots as T,watch as E}from"vue";var D=/* @__PURE__ */ e({default:()=>j}),O=[`aria-labelledby`],k=[`id`],A=[`aria-label`],j={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(e){let D=g(()=>import(`./vue-ui-digits-ZMK0aBxE.js`).then(e=>e.n)),{vue_ui_kpi:j}=t(),M=c(),N=e,P=u({get:()=>R(),set:e=>e});a({config:()=>P.value,dataset:()=>N.dataset,component:`VueUiKpi`,rules:[o.noHint]});let F=T(),I=u(()=>P.value.debug),L=x(r());y(()=>{F[`chart-background`]&&I.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function R(){return s({userConfig:N.config,defaultConfig:j})}E(()=>N.config,e=>{P.value=R(),H()},{deep:!0});let z=x((N.dataset,N.dataset)),B=x(P.value.useAnimation?P.value.animationValueStart:z.value),V=e=>{let t=P.value.animationFrames,n=Math.abs(e-B.value)/t;function r(){B.value<e?B.value=Math.min(B.value+n,e):B.value>e&&(B.value=Math.max(B.value-n,e)),B.value!==e&&requestAnimationFrame(r)}r()};y(()=>{H()});function H(){P.value.useAnimation&&!M.value?(B.value=P.value.animationValueStart,V(N.dataset)):B.value=N.dataset}return E(()=>N.dataset,e=>{P.value.useAnimation&&!M.value?V(e):B.value=e}),(t,r)=>(b(),f(`div`,{class:_(`vue-data-ui-component vue-ui-kpi ${P.value.layoutClass}`),style:v(`background:${P.value.backgroundColor}; ${P.value.layoutCss}`),"aria-labelledby":`kpi-title-${L.value}`},[P.value.title||t.$slots.title?(b(),f(`div`,{key:0,class:_(`vue-ui-kpi-title ${P.value.titleClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.titleFontSize}px; color:${P.value.titleColor}; font-weight:${P.value.titleBold?`bold`:`normal`}; ${P.value.titleCss}`),id:`kpi-title-${L.value}`},[S(t.$slots,`title`,{comment:e.dataset}),m(` `+C(P.value.title),1)],14,k)):d(``,!0),S(t.$slots,`comment-before`,{comment:e.dataset}),p(`div`,{class:_(`vue-ui-kpi-value ${P.value.valueClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.valueFontSize}px; color:${P.value.valueColor}; font-weight:${P.value.valueBold?`bold`:`normal`}; ${P.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":B.value.toFixed(P.value.valueRounding)},[S(t.$slots,`value`,{comment:e.dataset}),P.value.analogDigits.show?(b(),f(`div`,{key:0,style:v({height:P.value.analogDigits.height+`px`})},[h(w(D),{dataset:Number(B.value.toFixed(P.value.valueRounding)),config:{backgroundColor:P.value.backgroundColor,digits:{color:P.value.analogDigits.color,skeletonColor:P.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(b(),f(l,{key:1},[m(C(w(i)(P.value.formatter,B.value,w(n)({p:P.value.prefix,v:B.value,s:P.value.suffix,r:P.value.valueRounding}))),1)],64))],14,A),S(t.$slots,`comment-after`,{comment:e.dataset})],14,O))}};export{D as n,j as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{D as n,Dt as r,Ft as i,Ht as ee,M as te,S as ne,X as re,Zt as a,at as o,et as s,in as c,nt as ie,pt as l,t as ae,w as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as pe}from"./resolveChartConfig-CIhClE5R.js";import{t as me}from"./chartImage-DPGnEuYM.js";import{t as he}from"./useChartExport-BZts4KFb.js";import{n as ge,t as _e}from"./tableIntegration-CNoJ1CIY.js";import{n as ve,t as ye}from"./annotationSlots-BRR85CqJ.js";import{n as be,t as xe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./DefGrad-DKMq1REY.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./vue_ui_molecule-Bw1UW1Na.js";import{t as De}from"./usePanZoom-BdjP5Suc.js";import{Fragment as Oe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as ke,createTextVNode as Ae,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as je,nextTick as v,normalizeClass as Me,normalizeProps as y,normalizeStyle as b,onMounted as Ne,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as Pe,toDisplayString as T,toRefs as Fe,unref as E,useCssVars as Ie,watch as D,withCtx as O}from"vue";var Le=/* @__PURE__ */ e({default:()=>Ke}),Re=[`id`],ze={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Be={key:2,style:`width:100%;background:transparent;`},Ve=[`xmlns`,`viewBox`],He=[`width`,`height`],Ue={key:4,class:`vue-data-ui-watermark`},We={key:5,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Ge={key:6,ref:`source`,dir:`auto`},Ke=/*#__PURE__*/ fe({__name:`vue-ui-molecule`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectNode`,`copyAlt`],setup(e,{expose:fe,emit:Le}){Ie(e=>({v005507f3:on.value}));let Ke=g(()=>import(`./Title-BliHuXfT.js`).then(e=>e.t)),qe=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Je=g(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Ye=g(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Xe=g(()=>import(`./DataTable-0Vv-aGHD.js`)),Ze=g(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Qe=g(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),$e=g(()=>import(`./PackageVersion-CXT-eAuk.js`).then(e=>e.t)),et=g(()=>import(`./RecursiveLinks-CZtG6uWg.js`)),tt=g(()=>import(`./RecursiveLabels-B0d04xSj.js`)),nt=g(()=>import(`./RecursiveCircles-BftI1kwF.js`)),rt=g(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_molecule:it}=t(),k=e,at=Le,ot=u(()=>!!k.dataset&&k.dataset.length);Ne(()=>{ct()});let st=u(()=>P.value.debug);function ct(){se(k.dataset)&&o({componentName:`VueUiMolecule`,type:`dataset`,debug:st.value})}let A=S(re()),lt=S(!1),j=S(``),M=S(null),ut=S(0),dt=S(0),ft=S(0),pt=S(null),N=S(null),P=S(B()),F=u(()=>P.value.style.chart.tooltip),I=u(()=>P.value.style.chart),L=u(()=>P.value.userOptions);ue({config:()=>P.value,dataset:()=>k.dataset,component:`VueUiMolecule`,rules:[de.emptyArray,{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length===0,message:[`👀 There are no children nodes attached to the root node. Consider:`,``,`▶️ Adding children nodes to the root node.`]},{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length>8,message:[`👀 The number of children nodes > 8, some nodes might overlap. Consider:`,``,`▶️ Grouping data into broader categories.`]}]});let R=u(()=>P.value.userOptions.useCursorPointer),mt=u(()=>c({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#6A6A6A`},links:{stroke:`#6A6A6A80`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:ht,FINAL_DATASET:gt}=ce({...Fe(k),FINAL_CONFIG:P,prepareConfig:B,skeletonDataset:k.config?.skeletonDataset??[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]}]}],skeletonConfig:c({defaultConfig:P.value,userConfig:mt.value})}),{userOptionsVisible:_t,setUserOptionsVisibility:vt,keepUserOptionState:yt}=we({config:P.value}),{svgRef:z}=Te({config:I.value.title});function B(){return pe(k.config,it,Ee)}let bt=a(k.config);D((e,t)=>k.config,e=>{let t=a(newConfig),n=t!==bt;bt=t;let r=B();n?(P.value=r,_t.value=!P.value.userOptions.showOnChartHover,ct(),dt.value+=1,ft.value+=1,U.value.showTable=P.value.table.show,U.value.showTooltip=F.value.show,U.value.showZoom=I.value.zoom.show):(P.value.style.chart.tooltip=r.style.chart.tooltip,U.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let xt=S(0),St=()=>{xt.value+=1};D([()=>ht.value,()=>gt.value],async([e])=>{e||(await v(),W.value=Ot(),await v(),St(),await v(),Jt({x:0,y:0,width:400,height:400}),Kt(!1))},{flush:`post`,deep:!1});let{isPrinting:V,isImaging:H,generatePdf:Ct,generateImage:wt}=Se({elementId:`cluster_${A.value}`,fileName:I.value.title.text||`vue-ui-molecule`,options:P.value.userOptions.print}),Tt=u(()=>P.value.userOptions.show&&!I.value.title.text),Et=u(()=>oe(P.value.customPalette)),U=S({showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show});D(P,()=>{U.value={showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show}},{immediate:!0});function Dt(e,t=0){return Array.isArray(e)&&e.length>0&&e[0].nodes?Dt(e[0].nodes,t+1):t}function Ot(){let e=Dt(gt.value),t=100,n=t;for(let r=0;r<e;r+=1)t/=1,n+=t;return{height:n,width:n}}let W=S(Ot());function kt(e,t={x:-W.value.width/2.43,y:W.value.height/2},n=W.value.width/1.1,r=24,i=0,a=0,o=`#BBBBBB`,s=0){if(!Array.isArray(e)||e.length===0)return e;let c=te({plot:t,radius:n,sides:e.length,rotation:i});return e.forEach((e,t)=>{let te=c.coordinates[t],ie=e.color?(()=>{let t=ne(e.color);return t.startsWith(`#`)?t:`#${t}`})():null,l;ie?l=ie:s===0?l=o:s===1?(l=Et.value[a]||ee[a]||o,a+=1):l=o,e.polygonPath={coordinates:[te]},e.circleRadius=r,e.color=l,e.strokeWidth=Math.min(I.value.links.strokeWidth/(s+1),r/2),e.uid=re(),Array.isArray(e.nodes)&&e.nodes.length&&(e.nodes=kt(e.nodes,te,n/2.9,r/2.2,i+Math.PI*t/e.nodes.length,a,l,s+1))}),e}function At(e){let t=/* @__PURE__ */ new Set;function n(e){e.forEach(e=>{if(!e.color)return;let r=e.color;/^#?[0-9A-F]{6}$/i.test(r)||(r=ne(r)),r.startsWith(`#`)||(r=`#${r}`),t.add(r),Array.isArray(e.nodes)&&e.nodes.length&&n(e.nodes)})}n(e);let r={};return Array.from(t).forEach(e=>{let t=e.slice(1);r[e]=`gradient_${t}`}),r}let jt=u(()=>At(G.value)),G=u(()=>kt(s(gt.value))),K=S(null);function Mt(e){K.value={datapoint:e,seriesIndex:-1,series:G.value,config:P.value};let t=F.value.customFormat;if(r(t)&&l(()=>t({seriesIndex:-1,datapoint:e,series:G.value,config:P.value})))j.value=t({seriesIndex:-1,datapoint:e,series:G.value,config:P.value});else{let t=``;t+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`,e.details&&(t+=`<div style="width:100%;border-top:1px solid ${F.value.borderColor};margin-top: 2px">${e.details}</div>`),j.value=`<div style="font-family:inherit">${t}</div>`}}let q=S(null),J=S(null),Nt=S(null);function Pt(e){Nt.value=q.value,q.value=e,e?P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:-1}):P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:Nt.value||q.value,seriesIndex:-1}),e?(lt.value=!0,Mt(e),J.value=e.uid):(lt.value=!1,j.value=``,J.value=null)}function Ft(e){let t=[];function n(e){e.forEach(e=>{let r={name:e.name,details:e.details||`-`,ancestor:e.ancestor&&e.ancestor.name||`-`,color:e.color||``};t.push(r),e.nodes&&e.nodes.length>0&&n(e.nodes,e.name)})}return n(e),t}let It=u(()=>Ft(G.value)),Y=u(()=>({head:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor],body:It.value.map((e,t)=>[{color:e.color,name:e.name},e.details,e.ancestor||``]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor]}));function Lt(e=null){v(()=>{let t=Y.value.body.map((e,t)=>[[e[0].name],[e[1]],[e[2]]]),r=[[I.value.title.text],[I.value.title.subtitle.text],[[...Y.value.head]]].concat(t),i=n(r);e?e(i):ie({csvContent:i,title:I.value.title.text||`vue-ui-molecule`})})}function Rt(){return G.value}let X=S(!1);function zt(e){X.value=e,ut.value+=1}function Bt(){U.value.showTable=!U.value.showTable}function Vt(){U.value.showDataLabels=!U.value.showDataLabels}function Ht(){U.value.showTooltip=!U.value.showTooltip}function Ut(){U.value.showZoom=!U.value.showZoom}let Z=S(!1);function Wt(){Z.value=!Z.value}let Gt=u(()=>!Z.value&&U.value.showZoom),{viewBox:Q,resetZoom:Kt,isZoom:qt,setInitialViewBox:Jt}=De(z,{x:0,y:0,width:Math.max(10,W.value.width),height:Math.max(10,W.value.height)},I.value.zoom.speed,Gt);function Yt(e){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:-1}),at(`selectNode`,e)}let Xt=me(M,()=>I.value.title.text),$=u(()=>_e({config:P,style:I,mutableConfig:U,dialog:rt,accordion:Ye,isFullscreen:X,parent:M,maxWidth:800,isCursorPointer:R}));D(()=>U.value.showTable,e=>ge(e,P,pt));function Zt(){U.value.showTable=!1,N.value&&N.value.setTableIconState(!1)}let Qt=u(()=>I.value.backgroundColor),$t=u(()=>I.value.title),{isCallbackImaging:en,isCallbackSvg:tn,generateSvg:nn,onGenerateImage:rn}=he({svg:z,title:$t,legend:null,legendItems:null,backgroundColor:Qt,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:wt});async function an(){at(`copyAlt`,{config:P.value,dataset:G.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:G.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let on=u(()=>I.value.color);return fe({getData:Rt,getImage:Xt,generatePdf:Ct,generateCsv:Lt,generateImage:wt,generateSvg:nn,toggleTable:Bt,toggleLabels:Vt,toggleTooltip:Ht,toggleAnnotator:Wt,toggleFullscreen:zt,toggleZoom:Ut,copyAlt:an}),(e,t)=>(x(),p(`div`,{ref_key:`moleculeChart`,ref:M,class:Me(`vue-data-ui-component vue-ui-molecule ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:b(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor}`),id:`cluster_${A.value}`,onMouseleave:t[2]||=e=>{q.value=null,J.value=null,E(vt)(!1)},onMouseenter:t[3]||=()=>E(vt)(!0)},[L.value.buttons.annotator&&E(z)?(x(),d(E(Ze),{key:0,svgRef:E(z),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Z.value,isCursorPointer:R.value,onClose:Wt},ke({_:2},[C(E(ye),t=>({name:t,fn:O(n=>[w(e.$slots,t,y(_(E(ve)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):f(``,!0),Tt.value?(x(),p(`div`,ze,null,512)):f(``,!0),I.value.title.text?(x(),p(`div`,Be,[(x(),d(E(Ke),{key:`title_${dt.value}`,config:{title:{cy:`molecule-div-title`,...I.value.title},subtitle:{cy:`molecule-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))])):f(``,!0),L.value.show&&ot.value&&(E(yt)||E(_t))?(x(),d(E(Qe),{ref_key:`userOptionsRef`,ref:N,key:`user_options_${ut.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:E(V),isImaging:E(H),uid:A.value,hasTooltip:L.value.buttons.tooltip&&F.value.show,hasPdf:L.value.buttons.pdf,hasXls:L.value.buttons.csv,hasImg:L.value.buttons.img,hasSvg:L.value.buttons.svg,hasTable:L.value.buttons.table,hasLabel:L.value.buttons.labels,hasFullscreen:L.value.buttons.fullscreen,hasAltCopy:L.value.buttons.altCopy,isTooltip:U.value.showTooltip,titles:{...L.value.buttonTitles},chartElement:M.value,position:L.value.position,hasAnnotator:L.value.buttons.annotator,isAnnotation:Z.value,callbacks:L.value.callbacks,printScale:L.value.print.scale,tableDialog:P.value.table.useDialog,hasZoom:L.value.buttons.zoom,isZoom:U.value.showZoom,isCursorPointer:R.value,onToggleFullscreen:zt,onGeneratePdf:E(Ct),onGenerateCsv:Lt,onGenerateImage:E(rn),onGenerateSvg:E(nn),onToggleTable:Bt,onToggleLabels:Vt,onToggleTooltip:Ht,onToggleAnnotator:Wt,onToggleZoom:Ut,onCopyAlt:an,style:b({visibility:E(yt)?E(_t)?`visible`:`hidden`:`visible`})},ke({_:2},[C(E(be)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:O(n=>[w(e.$slots,t,y(_(E(xe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.hasZoom.isZoom.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),(x(),p(`svg`,{ref_key:`svgRef`,ref:z,key:`svg_${xt.value}`,xmlns:E(ae),viewBox:`${E(Q).x} ${E(Q).y} ${E(Q).width} ${E(Q).height}`,class:Me({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),style:b(`overflow: hidden; background:transparent;color:${I.value.color}`)},[h(E($e)),w(e.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:{...E(Q)},isPrintingImg:E(V)||E(H)||E(en),isPrintingSvg:E(tn)}},void 0,!0),e.$slots[`chart-background`]?(x(),p(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,He)):f(``,!0),m(`defs`,null,[(x(!0),p(Oe,null,C(Object.keys(jt.value),(e,t)=>(x(),d(Ce,{t:`radial`,id:`gradient_${e}`,key:`gradient_${e}_${t}`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(i)(e,.5),1],[`100%`,e,1]]},null,8,[`id`,`stops`]))),128))]),h(E(et),{dataset:G.value,color:I.value.links.stroke,backgroundColor:I.value.backgroundColor,useChildColor:I.value.links.useChildColor},null,8,[`dataset`,`color`,`backgroundColor`,`useChildColor`]),h(E(nt),{dataset:G.value,hoveredUid:J.value,stroke:I.value.nodes.stroke,strokeHovered:I.value.nodes.strokeHovered,onClick:Yt,onHover:Pt},{node:O(({node:t})=>[w(e.$slots,`node`,y(_({node:t})),void 0,!0)]),"node-svg":O(({nodeSvg:t})=>[w(e.$slots,`node-svg`,y(_({nodeSvg:t})),void 0,!0)]),_:3},8,[`dataset`,`hoveredUid`,`stroke`,`strokeHovered`]),U.value.showDataLabels&&!E(ht)?(x(),d(E(tt),{key:1,dataset:G.value,color:I.value.color,hoveredUid:J.value},null,8,[`dataset`,`color`,`hoveredUid`])):f(``,!0),w(e.$slots,`svg`,{svg:{...W.value,drawingArea:{...E(Q)},isPrintingImg:E(V)||E(H)||E(en),isPrintingSvg:E(tn)}},void 0,!0)],14,Ve)),e.$slots.watermark?(x(),p(`div`,Ue,[w(e.$slots,`watermark`,y(_({isPrinting:E(V)||E(H)||E(en)||E(tn)})),void 0,!0)])):f(``,!0),E(qt)?(x(),p(`div`,We,[w(e.$slots,`reset-action`,{reset:E(Kt)},()=>[m(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:b({background:I.value.backgroundColor,cursor:R.value?`pointer`:`default`}),onClick:t[0]||=e=>E(Kt)(!0)},[h(E(Je),{name:`refresh`,stroke:I.value.color},null,8,[`stroke`])],4)],!0)])):f(``,!0),e.$slots.source?(x(),p(`div`,Ge,[w(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(E(qe),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&lt.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,fontSize:F.value.fontSize,backgroundOpacity:F.value.backgroundOpacity,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:M.value,content:j.value,isFullscreen:X.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold},{"tooltip-before":O(()=>[w(e.$slots,`tooltip-before`,y(_({...K.value})),void 0,!0)]),tooltip:O(()=>[w(e.$slots,`tooltip`,y(_({...K.value})),void 0,!0)]),"tooltip-after":O(()=>[w(e.$slots,`tooltip-after`,y(_({...K.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`]),ot.value&&L.value.buttons.table?(x(),d(Pe($.value.component),je({key:7},$.value.props,{ref_key:`tableUnit`,ref:pt,onClose:Zt}),ke({content:O(()=>[(x(),d(E(Xe),{key:`table_${ft.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:P.value.table.useDialog?``:$.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:R.value,onClose:Zt},{th:O(({th:e})=>[m(`div`,null,T(e),1)]),td:O(({td:e})=>[Ae(T(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:O(()=>[Ae(T($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:O(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Lt(L.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[h(E(Je),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),w(e.$slots,`skeleton`,{},()=>[E(ht)?(x(),d(le,{key:0})):f(``,!0)],!0)],46,Re))}},[[`__scopeId`,`data-v-e7a3ebe1`]]);export{Le as n,Ke as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{D as n,Dt as r,Ft as i,Ht as ee,M as te,S as ne,X as re,Zt as a,at as o,et as s,in as c,nt as ie,pt as l,t as ae,w as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as pe}from"./resolveChartConfig-CIhClE5R.js";import{t as me}from"./chartImage-DPGnEuYM.js";import{t as he}from"./useChartExport-BZts4KFb.js";import{n as ge,t as _e}from"./tableIntegration-CNoJ1CIY.js";import{n as ve,t as ye}from"./annotationSlots-BRR85CqJ.js";import{n as be,t as xe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./DefGrad-DKMq1REY.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./vue_ui_molecule-Bw1UW1Na.js";import{t as De}from"./usePanZoom-BdjP5Suc.js";import{Fragment as Oe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as ke,createTextVNode as Ae,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as je,nextTick as v,normalizeClass as Me,normalizeProps as y,normalizeStyle as b,onMounted as Ne,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as Pe,toDisplayString as T,toRefs as Fe,unref as E,useCssVars as Ie,watch as D,withCtx as O}from"vue";var Le=/* @__PURE__ */ e({default:()=>Ke}),Re=[`id`],ze={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Be={key:2,style:`width:100%;background:transparent;`},Ve=[`xmlns`,`viewBox`],He=[`width`,`height`],Ue={key:4,class:`vue-data-ui-watermark`},We={key:5,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Ge={key:6,ref:`source`,dir:`auto`},Ke=/*#__PURE__*/ fe({__name:`vue-ui-molecule`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectNode`,`copyAlt`],setup(e,{expose:fe,emit:Le}){Ie(e=>({v005507f3:on.value}));let Ke=g(()=>import(`./Title-BliHuXfT.js`).then(e=>e.t)),qe=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Je=g(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Ye=g(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Xe=g(()=>import(`./DataTable-0Vv-aGHD.js`)),Ze=g(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Qe=g(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),$e=g(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),et=g(()=>import(`./RecursiveLinks-CZtG6uWg.js`)),tt=g(()=>import(`./RecursiveLabels-B0d04xSj.js`)),nt=g(()=>import(`./RecursiveCircles-BftI1kwF.js`)),rt=g(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_molecule:it}=t(),k=e,at=Le,ot=u(()=>!!k.dataset&&k.dataset.length);Ne(()=>{ct()});let st=u(()=>P.value.debug);function ct(){se(k.dataset)&&o({componentName:`VueUiMolecule`,type:`dataset`,debug:st.value})}let A=S(re()),lt=S(!1),j=S(``),M=S(null),ut=S(0),dt=S(0),ft=S(0),pt=S(null),N=S(null),P=S(B()),F=u(()=>P.value.style.chart.tooltip),I=u(()=>P.value.style.chart),L=u(()=>P.value.userOptions);ue({config:()=>P.value,dataset:()=>k.dataset,component:`VueUiMolecule`,rules:[de.emptyArray,{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length===0,message:[`👀 There are no children nodes attached to the root node. Consider:`,``,`▶️ Adding children nodes to the root node.`]},{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length>8,message:[`👀 The number of children nodes > 8, some nodes might overlap. Consider:`,``,`▶️ Grouping data into broader categories.`]}]});let R=u(()=>P.value.userOptions.useCursorPointer),mt=u(()=>c({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#6A6A6A`},links:{stroke:`#6A6A6A80`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:ht,FINAL_DATASET:gt}=ce({...Fe(k),FINAL_CONFIG:P,prepareConfig:B,skeletonDataset:k.config?.skeletonDataset??[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]}]}],skeletonConfig:c({defaultConfig:P.value,userConfig:mt.value})}),{userOptionsVisible:_t,setUserOptionsVisibility:vt,keepUserOptionState:yt}=we({config:P.value}),{svgRef:z}=Te({config:I.value.title});function B(){return pe(k.config,it,Ee)}let bt=a(k.config);D((e,t)=>k.config,e=>{let t=a(newConfig),n=t!==bt;bt=t;let r=B();n?(P.value=r,_t.value=!P.value.userOptions.showOnChartHover,ct(),dt.value+=1,ft.value+=1,U.value.showTable=P.value.table.show,U.value.showTooltip=F.value.show,U.value.showZoom=I.value.zoom.show):(P.value.style.chart.tooltip=r.style.chart.tooltip,U.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let xt=S(0),St=()=>{xt.value+=1};D([()=>ht.value,()=>gt.value],async([e])=>{e||(await v(),W.value=Ot(),await v(),St(),await v(),Jt({x:0,y:0,width:400,height:400}),Kt(!1))},{flush:`post`,deep:!1});let{isPrinting:V,isImaging:H,generatePdf:Ct,generateImage:wt}=Se({elementId:`cluster_${A.value}`,fileName:I.value.title.text||`vue-ui-molecule`,options:P.value.userOptions.print}),Tt=u(()=>P.value.userOptions.show&&!I.value.title.text),Et=u(()=>oe(P.value.customPalette)),U=S({showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show});D(P,()=>{U.value={showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show}},{immediate:!0});function Dt(e,t=0){return Array.isArray(e)&&e.length>0&&e[0].nodes?Dt(e[0].nodes,t+1):t}function Ot(){let e=Dt(gt.value),t=100,n=t;for(let r=0;r<e;r+=1)t/=1,n+=t;return{height:n,width:n}}let W=S(Ot());function kt(e,t={x:-W.value.width/2.43,y:W.value.height/2},n=W.value.width/1.1,r=24,i=0,a=0,o=`#BBBBBB`,s=0){if(!Array.isArray(e)||e.length===0)return e;let c=te({plot:t,radius:n,sides:e.length,rotation:i});return e.forEach((e,t)=>{let te=c.coordinates[t],ie=e.color?(()=>{let t=ne(e.color);return t.startsWith(`#`)?t:`#${t}`})():null,l;ie?l=ie:s===0?l=o:s===1?(l=Et.value[a]||ee[a]||o,a+=1):l=o,e.polygonPath={coordinates:[te]},e.circleRadius=r,e.color=l,e.strokeWidth=Math.min(I.value.links.strokeWidth/(s+1),r/2),e.uid=re(),Array.isArray(e.nodes)&&e.nodes.length&&(e.nodes=kt(e.nodes,te,n/2.9,r/2.2,i+Math.PI*t/e.nodes.length,a,l,s+1))}),e}function At(e){let t=/* @__PURE__ */ new Set;function n(e){e.forEach(e=>{if(!e.color)return;let r=e.color;/^#?[0-9A-F]{6}$/i.test(r)||(r=ne(r)),r.startsWith(`#`)||(r=`#${r}`),t.add(r),Array.isArray(e.nodes)&&e.nodes.length&&n(e.nodes)})}n(e);let r={};return Array.from(t).forEach(e=>{let t=e.slice(1);r[e]=`gradient_${t}`}),r}let jt=u(()=>At(G.value)),G=u(()=>kt(s(gt.value))),K=S(null);function Mt(e){K.value={datapoint:e,seriesIndex:-1,series:G.value,config:P.value};let t=F.value.customFormat;if(r(t)&&l(()=>t({seriesIndex:-1,datapoint:e,series:G.value,config:P.value})))j.value=t({seriesIndex:-1,datapoint:e,series:G.value,config:P.value});else{let t=``;t+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`,e.details&&(t+=`<div style="width:100%;border-top:1px solid ${F.value.borderColor};margin-top: 2px">${e.details}</div>`),j.value=`<div style="font-family:inherit">${t}</div>`}}let q=S(null),J=S(null),Nt=S(null);function Pt(e){Nt.value=q.value,q.value=e,e?P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:-1}):P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:Nt.value||q.value,seriesIndex:-1}),e?(lt.value=!0,Mt(e),J.value=e.uid):(lt.value=!1,j.value=``,J.value=null)}function Ft(e){let t=[];function n(e){e.forEach(e=>{let r={name:e.name,details:e.details||`-`,ancestor:e.ancestor&&e.ancestor.name||`-`,color:e.color||``};t.push(r),e.nodes&&e.nodes.length>0&&n(e.nodes,e.name)})}return n(e),t}let It=u(()=>Ft(G.value)),Y=u(()=>({head:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor],body:It.value.map((e,t)=>[{color:e.color,name:e.name},e.details,e.ancestor||``]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor]}));function Lt(e=null){v(()=>{let t=Y.value.body.map((e,t)=>[[e[0].name],[e[1]],[e[2]]]),r=[[I.value.title.text],[I.value.title.subtitle.text],[[...Y.value.head]]].concat(t),i=n(r);e?e(i):ie({csvContent:i,title:I.value.title.text||`vue-ui-molecule`})})}function Rt(){return G.value}let X=S(!1);function zt(e){X.value=e,ut.value+=1}function Bt(){U.value.showTable=!U.value.showTable}function Vt(){U.value.showDataLabels=!U.value.showDataLabels}function Ht(){U.value.showTooltip=!U.value.showTooltip}function Ut(){U.value.showZoom=!U.value.showZoom}let Z=S(!1);function Wt(){Z.value=!Z.value}let Gt=u(()=>!Z.value&&U.value.showZoom),{viewBox:Q,resetZoom:Kt,isZoom:qt,setInitialViewBox:Jt}=De(z,{x:0,y:0,width:Math.max(10,W.value.width),height:Math.max(10,W.value.height)},I.value.zoom.speed,Gt);function Yt(e){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:-1}),at(`selectNode`,e)}let Xt=me(M,()=>I.value.title.text),$=u(()=>_e({config:P,style:I,mutableConfig:U,dialog:rt,accordion:Ye,isFullscreen:X,parent:M,maxWidth:800,isCursorPointer:R}));D(()=>U.value.showTable,e=>ge(e,P,pt));function Zt(){U.value.showTable=!1,N.value&&N.value.setTableIconState(!1)}let Qt=u(()=>I.value.backgroundColor),$t=u(()=>I.value.title),{isCallbackImaging:en,isCallbackSvg:tn,generateSvg:nn,onGenerateImage:rn}=he({svg:z,title:$t,legend:null,legendItems:null,backgroundColor:Qt,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:wt});async function an(){at(`copyAlt`,{config:P.value,dataset:G.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:G.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let on=u(()=>I.value.color);return fe({getData:Rt,getImage:Xt,generatePdf:Ct,generateCsv:Lt,generateImage:wt,generateSvg:nn,toggleTable:Bt,toggleLabels:Vt,toggleTooltip:Ht,toggleAnnotator:Wt,toggleFullscreen:zt,toggleZoom:Ut,copyAlt:an}),(e,t)=>(x(),p(`div`,{ref_key:`moleculeChart`,ref:M,class:Me(`vue-data-ui-component vue-ui-molecule ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:b(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor}`),id:`cluster_${A.value}`,onMouseleave:t[2]||=e=>{q.value=null,J.value=null,E(vt)(!1)},onMouseenter:t[3]||=()=>E(vt)(!0)},[L.value.buttons.annotator&&E(z)?(x(),d(E(Ze),{key:0,svgRef:E(z),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Z.value,isCursorPointer:R.value,onClose:Wt},ke({_:2},[C(E(ye),t=>({name:t,fn:O(n=>[w(e.$slots,t,y(_(E(ve)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):f(``,!0),Tt.value?(x(),p(`div`,ze,null,512)):f(``,!0),I.value.title.text?(x(),p(`div`,Be,[(x(),d(E(Ke),{key:`title_${dt.value}`,config:{title:{cy:`molecule-div-title`,...I.value.title},subtitle:{cy:`molecule-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))])):f(``,!0),L.value.show&&ot.value&&(E(yt)||E(_t))?(x(),d(E(Qe),{ref_key:`userOptionsRef`,ref:N,key:`user_options_${ut.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:E(V),isImaging:E(H),uid:A.value,hasTooltip:L.value.buttons.tooltip&&F.value.show,hasPdf:L.value.buttons.pdf,hasXls:L.value.buttons.csv,hasImg:L.value.buttons.img,hasSvg:L.value.buttons.svg,hasTable:L.value.buttons.table,hasLabel:L.value.buttons.labels,hasFullscreen:L.value.buttons.fullscreen,hasAltCopy:L.value.buttons.altCopy,isTooltip:U.value.showTooltip,titles:{...L.value.buttonTitles},chartElement:M.value,position:L.value.position,hasAnnotator:L.value.buttons.annotator,isAnnotation:Z.value,callbacks:L.value.callbacks,printScale:L.value.print.scale,tableDialog:P.value.table.useDialog,hasZoom:L.value.buttons.zoom,isZoom:U.value.showZoom,isCursorPointer:R.value,onToggleFullscreen:zt,onGeneratePdf:E(Ct),onGenerateCsv:Lt,onGenerateImage:E(rn),onGenerateSvg:E(nn),onToggleTable:Bt,onToggleLabels:Vt,onToggleTooltip:Ht,onToggleAnnotator:Wt,onToggleZoom:Ut,onCopyAlt:an,style:b({visibility:E(yt)?E(_t)?`visible`:`hidden`:`visible`})},ke({_:2},[C(E(be)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:O(n=>[w(e.$slots,t,y(_(E(xe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.hasZoom.isZoom.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),(x(),p(`svg`,{ref_key:`svgRef`,ref:z,key:`svg_${xt.value}`,xmlns:E(ae),viewBox:`${E(Q).x} ${E(Q).y} ${E(Q).width} ${E(Q).height}`,class:Me({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),style:b(`overflow: hidden; background:transparent;color:${I.value.color}`)},[h(E($e)),w(e.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:{...E(Q)},isPrintingImg:E(V)||E(H)||E(en),isPrintingSvg:E(tn)}},void 0,!0),e.$slots[`chart-background`]?(x(),p(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,He)):f(``,!0),m(`defs`,null,[(x(!0),p(Oe,null,C(Object.keys(jt.value),(e,t)=>(x(),d(Ce,{t:`radial`,id:`gradient_${e}`,key:`gradient_${e}_${t}`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(i)(e,.5),1],[`100%`,e,1]]},null,8,[`id`,`stops`]))),128))]),h(E(et),{dataset:G.value,color:I.value.links.stroke,backgroundColor:I.value.backgroundColor,useChildColor:I.value.links.useChildColor},null,8,[`dataset`,`color`,`backgroundColor`,`useChildColor`]),h(E(nt),{dataset:G.value,hoveredUid:J.value,stroke:I.value.nodes.stroke,strokeHovered:I.value.nodes.strokeHovered,onClick:Yt,onHover:Pt},{node:O(({node:t})=>[w(e.$slots,`node`,y(_({node:t})),void 0,!0)]),"node-svg":O(({nodeSvg:t})=>[w(e.$slots,`node-svg`,y(_({nodeSvg:t})),void 0,!0)]),_:3},8,[`dataset`,`hoveredUid`,`stroke`,`strokeHovered`]),U.value.showDataLabels&&!E(ht)?(x(),d(E(tt),{key:1,dataset:G.value,color:I.value.color,hoveredUid:J.value},null,8,[`dataset`,`color`,`hoveredUid`])):f(``,!0),w(e.$slots,`svg`,{svg:{...W.value,drawingArea:{...E(Q)},isPrintingImg:E(V)||E(H)||E(en),isPrintingSvg:E(tn)}},void 0,!0)],14,Ve)),e.$slots.watermark?(x(),p(`div`,Ue,[w(e.$slots,`watermark`,y(_({isPrinting:E(V)||E(H)||E(en)||E(tn)})),void 0,!0)])):f(``,!0),E(qt)?(x(),p(`div`,We,[w(e.$slots,`reset-action`,{reset:E(Kt)},()=>[m(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:b({background:I.value.backgroundColor,cursor:R.value?`pointer`:`default`}),onClick:t[0]||=e=>E(Kt)(!0)},[h(E(Je),{name:`refresh`,stroke:I.value.color},null,8,[`stroke`])],4)],!0)])):f(``,!0),e.$slots.source?(x(),p(`div`,Ge,[w(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(E(qe),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&lt.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,fontSize:F.value.fontSize,backgroundOpacity:F.value.backgroundOpacity,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:M.value,content:j.value,isFullscreen:X.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold},{"tooltip-before":O(()=>[w(e.$slots,`tooltip-before`,y(_({...K.value})),void 0,!0)]),tooltip:O(()=>[w(e.$slots,`tooltip`,y(_({...K.value})),void 0,!0)]),"tooltip-after":O(()=>[w(e.$slots,`tooltip-after`,y(_({...K.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`]),ot.value&&L.value.buttons.table?(x(),d(Pe($.value.component),je({key:7},$.value.props,{ref_key:`tableUnit`,ref:pt,onClose:Zt}),ke({content:O(()=>[(x(),d(E(Xe),{key:`table_${ft.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:P.value.table.useDialog?``:$.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:R.value,onClose:Zt},{th:O(({th:e})=>[m(`div`,null,T(e),1)]),td:O(({td:e})=>[Ae(T(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:O(()=>[Ae(T($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:O(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Lt(L.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[h(E(Je),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),w(e.$slots,`skeleton`,{},()=>[E(ht)?(x(),d(le,{key:0})):f(``,!0)],!0)],46,Re))}},[[`__scopeId`,`data-v-e7a3ebe1`]]);export{Le as n,Ke as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Jt as i,Lt as a,M as ee,X as te,Yt as ne,at as re,i as ie,in as ae,nt as oe,t as se,zt as ce}from"./lib-rPeBMZrn.js";import{n as le,t as ue}from"./BaseScanner-8NdoBs7B.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./chartImage-DPGnEuYM.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,t as xe}from"./annotationSlots-BRR85CqJ.js";import{n as Se,t as Ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{c as Te}from"./canvas-lib-22VpOI4_.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./Legend-DM0ClX3D.js";import{t as Me}from"./vue_ui_mood_radar-CXaBdJnv.js";import{Fragment as Ne,Teleport as Pe,computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,createSlots as Fe,createTextVNode as Ie,createVNode as d,defineAsyncComponent as f,guardReactiveProps as p,mergeProps as Le,nextTick as Re,normalizeClass as ze,normalizeProps as m,normalizeStyle as h,onMounted as Be,openBlock as g,ref as _,renderList as Ve,renderSlot as v,resolveDynamicComponent as He,toDisplayString as y,toRefs as Ue,unref as b,watch as We,withCtx as x}from"vue";var Ge=/* @__PURE__ */ e({default:()=>S}),Ke=[`id`],qe=[`id`],Je=[`id`],Ye={style:{position:`relative`}},Xe=[`xmlns`,`aria-describedby`,`viewBox`],Ze=[`width`,`height`],Qe=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],$e=[`d`,`stroke`,`stroke-width`],et=[`transform`],tt=[`stroke`],nt=[`aria-label`,`fill`],rt=[`transform`],it=[`stroke`],at=[`aria-label`,`fill`],ot=[`transform`],st=[`stroke`],ct=[`aria-label`,`fill`],lt=[`transform`],ut=[`stroke`],dt=[`aria-label`,`fill`],ft=[`transform`],pt=[`stroke`],mt=[`aria-label`,`fill`],ht=[`d`,`stroke`,`stroke-width`,`fill`],gt=[`x1`,`y1`,`x2`,`y2`,`stroke`],_t=[`cx`,`cy`,`fill`,`stroke`],vt=[`cx`,`cy`,`fill`,`stroke`],yt=[`x`,`y`,`fill`,`font-weight`],bt=[`x`,`y`,`fill`],xt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},St={key:5,class:`vue-data-ui-watermark`},Ct=[`id`],wt=[`onClick`,`onKeydown`],Tt={key:0},Et={key:1},S=/*#__PURE__*/ pe({__name:`vue-ui-mood-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:Ge}){let S=f(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Dt=f(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Ot=f(()=>import(`./DataTable-0Vv-aGHD.js`)),kt=f(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),At=f(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),jt=f(()=>import(`./PackageVersion-CXT-eAuk.js`).then(e=>e.t)),Mt=f(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_mood_radar:Nt}=t(),C=e,Pt=Ge,w=_(te()),T=_(null),E=_(null),Ft=_(null),It=_(0),Lt=_(0),Rt=_(0),zt=_(null),Bt=_(null),D=_(null),Vt=_(null),Ht=_(null),Ut=_(!1),Wt=_(null),Gt=_(null),O=_(null),Kt=_(!1),qt=o(()=>!!C.dataset&&Object.keys(C.dataset).length),k=_(tn()),A=o(()=>k.value.userOptions),j=o(()=>k.value.style.chart.layout.smileys),M=o(()=>k.value.style.chart.layout),N=o(()=>k.value.style.chart);de({config:()=>k.value,dataset:()=>C.dataset,component:`VueUiMoodRadar`,rules:[fe.noHint]});let P=o(()=>k.value.userOptions.useCursorPointer),Jt=o(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`},outerPolygon:{stroke:`#6A6A6A`},dataPolygon:{color:`#6A6A6A`,opacity:30,stroke:`#6A6A6A`},smileys:{colors:{1:`#DBDBDB`,2:`#C4C4C4`,3:`#ADADAD`,4:`#969696`,5:`#808080`}},dataLabel:{color:`transparent`}},legend:{backgroundColor:`transparent`}}}},userConfig:k.value.skeletonConfig??{}})),{loading:Yt,FINAL_DATASET:F}=le({...Ue(C),FINAL_CONFIG:k,prepareConfig:tn,callback:()=>{Promise.resolve().then(async()=>{await Re(),R.value.showTable=k.value.table.show})},skeletonDataset:C.config?.skeletonDataset??{1:1,2:1,3:1,4:1,5:1},skeletonConfig:ae({defaultConfig:k.value,userConfig:Jt.value})});Be(()=>{Ut.value=!0,Zt()});let Xt=o(()=>k.value.debug);function Zt(){if(ce(C.dataset)&&re({componentName:`VueUiMoodRadar`,type:`dataset`,debug:Xt.value}),k.value.responsive){let e=Te(()=>{let{width:e,height:t}=Ee({chart:T.value,title:N.value.title.text?zt.value:null,legend:N.value.legend.show?Bt.value:null,noTitle:Ft.value,source:Ht.value});requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12})});D.value&&(Vt.value&&D.value.unobserve(Vt.value),D.value.disconnect()),D.value=new ResizeObserver(e),Vt.value=T.value.parentNode,D.value.observe(Vt.value)}}let{userOptionsVisible:Qt,setUserOptionsVisibility:$t,keepUserOptionState:en}=ke({config:k.value}),{svgRef:I}=Ae({config:N.value.title});function tn(){return me(C.config,Nt,Me)}We(()=>C.config,e=>{k.value=tn(),Qt.value=!k.value.userOptions.showOnChartHover,Zt(),It.value+=1,Lt.value+=1,Rt.value+=1,R.value.showTable=k.value.table.show},{deep:!0});let{isPrinting:nn,isImaging:L,generatePdf:rn,generateImage:an}=we({elementId:w.value,fileName:N.value.title.text||`vue-ui-mood-radar`,options:k.value.userOptions.print}),on=o(()=>k.value.userOptions.show&&!N.value.title.text),R=_({showTable:k.value.table.show}),z=_({height:256,width:256}),sn={5:{x:128,y:35},4:{x:218,y:98.5},3:{x:185,y:204},2:{x:70,y:204},1:{x:38.5,y:98.5}},cn=o(()=>{let e={};return pn.value.forEach(t=>{e[t.key]={x:t.x,y:t.y}}),e});function B(e){let t=sn[e],n=cn.value[e]||t;return`translate(${n.x-t.x}, ${n.y-t.y})`}let ln=o(()=>ee({plot:{x:z.value.width/2,y:z.value.height/2},radius:Math.min(z.value.height,z.value.width)*.35,sides:5,rotation:11}));function un({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i,key:a,value:ee}){return{x:e+(n-e)*i,y:t+(r-t)*i,key:a,value:ee}}let dn=o(()=>Math.max(...Object.values(F.value).map(e=>isNaN(e)?0:e))),V=o(()=>Object.values(F.value).reduce((e,t)=>(isNaN(e)?0:e)+(isNaN(t)?0:t),0)),H=o(()=>Object.keys(F.value).map((e,t)=>{let n=typeof F.value[e]!=`number`||isNaN(F.value[e])?0:F.value[e];return{index:t,key:e,value:n,proportion:n/V.value,color:j.value.colors[e]}}).map(e=>({...e,onSelect:()=>U(e.key)})).sort((e,t)=>t.key-e.key)),fn=o(()=>H.value.map((e,t)=>({...e,display:`${ie(M.value.dataLabel.formatter,e.value,n({p:M.value.dataLabel.prefix,v:e.value,s:M.value.dataLabel.suffix,r:M.value.dataLabel.roundingValue}))}${Yt.value?``:` (${n({v:e.proportion*100,s:`%`,r:N.value.legend.roundingPercentage})})`}`}))),pn=o(()=>([`1`,`2`,`3`,`4`,`5`].forEach(e=>{[null,void 0].includes(F.value[e])&&re({componentName:`VueUiMoodRadar`,type:`datasetAttribute`,property:e,debug:Xt.value})}),ln.value.coordinates.map((e,t)=>{let n=un({centerX:z.value.width/2,centerY:z.value.height/2,apexX:e.x,apexY:e.y,proportion:H.value[t].value/dn.value,key:H.value[t].key,value:H.value[t].value});return{...e,plots:n,key:H.value[t].key}}))),mn=o(()=>({cy:`mood-radar-legend`,backgroundColor:N.value.legend.backgroundColor,color:N.value.legend.color,fontSize:N.value.legend.fontSize,paddingBottom:12,fontWeight:N.value.legend.bold?`bold`:``}));function U(e){e===E.value?E.value=null:(E.value=e,K(e))}function W(e){E.value=e;let t=H.value.find(t=>t.key===e);k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:t,seriesIndex:t.index})}function G(e){E.value=null;let t=H.value.find(t=>t.key===e);k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:t,seriesIndex:t.index})}function K(e){let t=H.value.find(t=>t.key===e);k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:t,seriesIndex:t.index})}let q=o(()=>({head:H.value.map(e=>({name:e.key,color:e.color})),body:H.value.map(e=>isNaN(e.value)?0:e.value)}));function hn(e=null){Re(()=>{let t=q.value.head.map((e,t)=>[[e.name],[q.value.body[t]],[isNaN(q.value.body[t]/V.value)?`-`:q.value.body[t]/V.value*100]]),n=[[N.value.title.text],[N.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),i=r(n);e?e(i):oe({csvContent:i,title:N.value.title.text||`vue-ui-mood-radar`})})}let J=o(()=>({head:[`__SUM__`,Number(V.value.toFixed(k.value.table.td.roundingValue)).toLocaleString(),`100%`],body:q.value.head.map((e,t)=>[{color:e.color,name:e.name},q.value.body[t].toFixed(k.value.table.td.roundingValue),isNaN(q.value.body[t]/V.value)?`-`:(q.value.body[t]/V.value*100).toFixed(k.value.table.td.roundingPercentage)+`%`]),config:{th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint},colNames:[k.value.table.columnNames.series,k.value.table.columnNames.value,k.value.table.columnNames.percentage]}));function gn(){return H.value}function _n(){R.value.showTable=!R.value.showTable}let Y=_(!1);function vn(e){Y.value=e}let X=_(!1);function yn(){X.value=!X.value}let bn=he(T,()=>N.value.title.text),Z=o(()=>ye({config:k,style:N,mutableConfig:R,dialog:Mt,accordion:Dt,isFullscreen:Y,parent:T,maxWidth:800,isCursorPointer:P}));We(()=>R.value.showTable,e=>ve(e,k,Wt));function xn(){R.value.showTable=!1,Gt.value&&Gt.value.setTableIconState(!1)}let Sn=o(()=>fn.value.map(e=>({...e,name:e.display,shape:`circle`}))),Cn=o(()=>N.value.backgroundColor),wn=o(()=>N.value.legend),Tn=o(()=>N.value.title),{isCallbackImaging:En,isCallbackSvg:Dn,generateSvg:On,onGenerateImage:kn}=_e({svg:I,title:Tn,legend:wn,legendItems:Sn,backgroundColor:Cn,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:an});async function An(){Pt(`copyAlt`,{config:k.value,dataset:H.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:H.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Q=o(()=>H.value.map(e=>String(e.key)));function jn(){$t(!0)}function Mn(){$t(!1)}function Nn(e){return H.value.find(t=>String(t.key)===String(e))}function Pn(e,t,r){return ie(M.value.dataLabel.formatter,e,n({p:M.value.dataLabel.prefix,v:e,s:M.value.dataLabel.suffix,r:M.value.dataLabel.roundingValue}),{datapoint:r,seriesIndex:t})}function Fn(e){return n({v:V.value?e/V.value*100:0,s:`%`,r:M.value.dataLabel.roundingPercentage})}function $(e){let t=Nn(e);return t?`${e}, ${Pn(t.value,t.index,t)}, ${Fn(t.value)}`:`${e}`}function In(e){let t=Q.value[e];t&&(O.value=e,E.value=t)}function Ln(){Kt.value=!0}function Rn(){O.value=null,E.value=null,Kt.value=!1}function zn(e){if(!I.value||!Q.value.length||X.value||document.activeElement!==I.value)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){O.value=null,E.value=null;return}if(r){if(O.value===null)return;let e=Q.value[O.value];if(!e)return;U(e);return}let a=O.value;a===null||a<0||a>=Q.value.length?a=n?0:Q.value.length-1:n?(a+=1,a>=Q.value.length&&(a=0)):t&&(--a,a<0&&(a=Q.value.length-1)),In(a)}function Bn(e,t){let n=e.key===`Enter`||e.key===` `,r=e.key===`Escape`;(n||r)&&(e.preventDefault(),e.stopPropagation(),r?(O.value=null,E.value=null):U(String(t)))}let Vn=o(()=>({headers:J.value?.colNames??[],rows:H.value.map(e=>[String(e.key),Pn(e.value,e.index,e),Fn(e.value)])}));return pe({getData:gn,getImage:bn,generatePdf:rn,generateCsv:hn,generateImage:an,generateSvg:On,toggleTable:_n,toggleAnnotator:yn,toggleFullscreen:vn,copyAlt:An}),(e,t)=>(g(),l(`div`,{class:ze(`vue-data-ui-component vue-ui-mood-radar ${Y.value?`vue-data-ui-wrapper-fullscreen`:``} ${k.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`moodRadarChart`,ref:T,id:`${w.value}`,style:h(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${N.value.backgroundColor}`),onMouseenter:jn,onMouseleave:Mn},[u(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[u(`p`,null,y(k.value.a11y.translations.keyboardNavigation),1)],8,qe),Vn.value?.rows?.length?(g(),s(Oe,{key:0,uid:w.value,head:Vn.value.headers,body:Vn.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):c(``,!0),A.value.buttons.annotator?(g(),s(b(kt),{key:1,svgRef:b(I),backgroundColor:N.value.backgroundColor,color:N.value.color,active:X.value,isCursorPointer:P.value,palette:A.value.annotatorPalette,onClose:yn},Fe({_:2},[Ve(b(xe),t=>({name:t,fn:x(n=>[v(e.$slots,t,m(p(b(be)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):c(``,!0),on.value?(g(),l(`div`,{key:2,ref_key:`noTitle`,ref:Ft,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):c(``,!0),N.value.title.text?(g(),l(`div`,{key:3,ref_key:`chartTitle`,ref:zt,style:`width:100%;background:transparent`},[d(ge,{config:{title:{cy:`mood-radar-title`,...N.value.title},subtitle:{cy:`mood-radar-subtitle`,...N.value.title.subtitle}}},null,8,[`config`])],512)):c(``,!0),u(`div`,{id:`legend-top-${w.value}`},null,8,Je),A.value.show&&qt.value&&(b(en)||b(Qt))?(g(),s(b(At),{key:4,ref_key:`userOptionsRef`,ref:Gt,backgroundColor:N.value.backgroundColor,color:N.value.color,isPrinting:b(nn),isImaging:b(L),uid:w.value,hasPdf:A.value.buttons.pdf,hasXls:A.value.buttons.csv,hasImg:A.value.buttons.img,hasSvg:A.value.buttons.svg,hasTable:A.value.buttons.table,hasFullscreen:A.value.buttons.fullscreen,hasAltCopy:A.value.buttons.altCopy,isFullscreen:Y.value,titles:{...A.value.buttonTitles},chartElement:T.value,position:A.value.position,hasAnnotator:A.value.buttons.annotator,isAnnotation:X.value,callbacks:A.value.callbacks,printScale:A.value.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:P.value,onToggleFullscreen:vn,onGeneratePdf:b(rn),onGenerateCsv:hn,onGenerateImage:b(kn),onGenerateSvg:b(On),onToggleTable:_n,onToggleAnnotator:yn,onCopyAlt:An,style:h({visibility:b(en)?b(Qt)?`visible`:`hidden`:`visible`})},Fe({_:2},[Ve(b(Se)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:x(n=>[v(e.$slots,t,m(p(b(Ce)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):c(``,!0),u(`div`,Ye,[(g(),l(`svg`,{ref_key:`svgRef`,ref:I,xmlns:b(se),"aria-describedby":`chart-instructions-${w.value}`,viewBox:`0 0 ${z.value.width} ${z.value.height}`,class:ze({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),style:h(`overflow:visible;background:transparent;color:${N.value.color}`),tabindex:`0`,onFocus:Ln,onBlur:Rn,onKeydown:zn},[d(b(jt)),v(e.$slots,`svg-underlayer`,{svg:{...z.value,isPrintingImg:b(nn)||b(L)||b(En),isPrintingSvg:b(Dn)}},void 0,!0),e.$slots[`chart-background`]?(g(),l(`foreignObject`,{key:0,x:0,y:0,width:z.value.width,height:z.value.height,style:{pointerEvents:`none`}},[v(e.$slots,`chart-background`,{},void 0,!0)],8,Ze)):c(``,!0),u(`defs`,null,[d(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`mood_radar_gradient_${w.value}`,stops:[[`0%`,b(i)(M.value.dataPolygon.color,M.value.dataPolygon.opacity),1],[`100%`,b(i)(b(ne)(M.value.dataPolygon.color,M.value.dataPolygon.gradient.intensity/100),M.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`])]),(g(!0),l(Ne,null,Ve(ln.value.coordinates,e=>(g(),l(`line`,{x1:z.value.width/2,y1:z.value.height/2,x2:e.x,y2:e.y,stroke:M.value.grid.stroke,"stroke-width":M.value.grid.strokeWidth},null,8,Qe))),256)),u(`path`,{d:ln.value.path,fill:`none`,stroke:M.value.outerPolygon.stroke,"stroke-width":M.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,$e),u(`g`,{transform:B(`5`)},[u(`path`,{fill:`none`,stroke:j.value.colors[5],"stroke-width":`1`,"stroke-linecap":`round`,d:`M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22`},null,8,tt),u(`circle`,{role:`button`,class:`vue-ui-mood-radar-trap`,cx:`128`,cy:`25`,r:`20`,"aria-label":$(`5`),fill:E.value===`5`?b(i)(j.value.colors[5],20):`transparent`,onMouseenter:t[0]||=e=>W(`5`),onMouseleave:t[1]||=e=>G(`5`),onClick:t[2]||=e=>K(`5`)},null,40,nt)],8,et),u(`g`,{transform:B(`4`)},[u(`path`,{fill:`none`,stroke:j.value.colors[4],"stroke-width":`1`,"stroke-linecap":`round`,d:`M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92`},null,8,it),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`227`,cy:`95.5`,r:`20`,"aria-label":$(`4`),fill:E.value===`4`?b(i)(j.value.colors[4],20):`transparent`,onMouseenter:t[3]||=e=>W(`4`),onMouseleave:t[4]||=e=>G(`4`),onClick:t[5]||=e=>K(`4`)},null,40,at)],8,rt),u(`g`,{transform:B(`3`)},[u(`path`,{fill:`none`,stroke:j.value.colors[3],"stroke-width":`1`,"stroke-linecap":`round`,d:`M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215`},null,8,st),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`190`,cy:`213.5`,r:`20`,"aria-label":$(`3`),fill:E.value===`3`?b(i)(j.value.colors[3],20):`transparent`,onMouseenter:t[6]||=e=>W(`3`),onMouseleave:t[7]||=e=>G(`3`),onClick:t[8]||=e=>K(`3`)},null,40,ct)],8,ot),u(`g`,{transform:B(`2`)},[u(`path`,{fill:`none`,stroke:j.value.colors[2],"stroke-width":`1`,"stroke-linecap":`round`,d:`M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210`},null,8,ut),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`65`,cy:`213.5`,r:`20`,"aria-label":$(`2`),fill:E.value===`2`?b(i)(j.value.colors[2],20):`transparent`,onMouseenter:t[9]||=e=>W(`2`),onMouseleave:t[10]||=e=>G(`2`),onClick:t[11]||=e=>K(`2`)},null,40,dt)],8,lt),u(`g`,{transform:B(`1`)},[u(`path`,{fill:`none`,stroke:j.value.colors[1],"stroke-width":`1`,"stroke-linecap":`round`,d:`M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93`},null,8,pt),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`29`,cy:`95.5`,r:`20`,"aria-label":$(`1`),fill:E.value===`1`?b(i)(j.value.colors[1],20):`transparent`,onMouseenter:t[12]||=e=>W(`1`),onMouseleave:t[13]||=e=>G(`1`),onClick:t[14]||=e=>K(`1`)},null,40,mt)],8,ft),u(`path`,{d:b(a)(pn.value.map(e=>e.plots)),stroke:M.value.dataPolygon.stroke,"stroke-width":M.value.dataPolygon.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:M.value.dataPolygon.gradient.show?`url(#mood_radar_gradient_${w.value})`:b(i)(M.value.dataPolygon.color,M.value.dataPolygon.opacity)},null,8,ht),(g(!0),l(Ne,null,Ve(pn.value.map(e=>e.plots),(e,t)=>(g(),l(`g`,{class:`vue-ui-mood-radar-trap`,style:h(`opacity:${E.value==e.key?`1`:`0`}`)},[u(`line`,{x1:e.x,y1:e.y,x2:z.value.width/2,y2:z.value.height/2,stroke:j.value.colors[e.key]},null,8,gt),u(`circle`,{cx:e.x,cy:e.y,fill:j.value.colors[e.key],r:`3`,stroke:N.value.backgroundColor,"stroke-width":.5},null,8,_t),u(`circle`,{cx:z.value.width/2,cy:z.value.height/2,fill:j.value.colors[e.key],r:`3`,stroke:N.value.backgroundColor,"stroke-width":.5},null,8,vt),u(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.13:z.value.height/2*.9375,fill:M.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`,"font-weight":M.value.dataLabel.bold?`bold`:`normal`},y(b(ie)(M.value.dataLabel.formatter,e.value,b(n)({p:M.value.dataLabel.prefix,v:e.value,s:M.value.dataLabel.suffix,r:M.value.dataLabel.roundingValue}),{datapoint:e,seriesIndex:t})),9,yt),u(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.273:z.value.height/2*.7968,fill:M.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`},` (`+y(b(n)({v:e.value/V.value*100,s:`%`,r:M.value.dataLabel.roundingPercentage}))+`) `,9,bt)],4))),256)),v(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:b(nn)||b(L)||b(En),isPrintingSvg:b(Dn)}},void 0,!0)],46,Xe)),e.$slots.hint?(g(),l(`div`,xt,[v(e.$slots,`hint`,m(p({hint:k.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):c(``,!0)]),e.$slots.watermark?(g(),l(`div`,St,[v(e.$slots,`watermark`,m(p({isPrinting:b(nn)||b(L)||b(En)||b(Dn)})),void 0,!0)])):c(``,!0),u(`div`,{id:`legend-bottom-${w.value}`},null,8,Ct),Ut.value&&(N.value.legend.show||e.$slots.legend)?(g(),s(Pe,{key:6,to:N.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[u(`div`,{ref_key:`chartLegend`,ref:Bt},[v(e.$slots,`legend`,{legend:H.value},()=>[N.value.legend.show?(g(),s(je,{legendSet:fn.value,config:mn.value,key:`legend_${Rt.value}`,isCursorPointer:P.value,style:{display:`flex`,"row-gap":`6px`},onFocusMarker:t[15]||=({legend:e})=>U(e.key)},{item:x(({legend:e,index:t})=>[u(`div`,{role:`button`,onClick:()=>U(e.key),style:{display:`flex`,"flex-direction":`row`,gap:`3px`,"align-items":`center`,margin:`3px 0`},onKeydown:t=>Bn(t,String(e.key))},[e.key==1?(g(),s(b(S),{key:0,strokeWidth:1,name:`moodSad`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==2?(g(),s(b(S),{key:1,strokeWidth:1,name:`moodFlat`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==3?(g(),s(b(S),{key:2,strokeWidth:1,name:`moodNeutral`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==4?(g(),s(b(S),{key:3,strokeWidth:1,name:`smiley`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==5?(g(),s(b(S),{key:4,strokeWidth:1,name:`moodHappy`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),b(Yt)?c(``,!0):(g(),l(`span`,{key:5,style:h({fontWeight:N.value.legend.bold?`bold`:`normal`})},y(e.display),5))],40,wt)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):c(``,!0)],!0)],512)],8,[`to`])):c(``,!0),e.$slots.source?(g(),l(`div`,{key:7,ref_key:`source`,ref:Ht,dir:`auto`},[v(e.$slots,`source`,{},void 0,!0)],512)):c(``,!0),qt.value&&A.value.buttons.table?(g(),s(He(Z.value.component),Le({key:8},Z.value.props,{ref_key:`tableUnit`,ref:Wt,onClose:xn}),Fe({content:x(()=>[d(b(Ot),{colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:k.value.table.useDialog?``:Z.value.title,withCloseButton:!k.value.table.useDialog,isCursorPointer:P.value,onClose:xn},{th:x(({th:e})=>[e===`__SUM__`?(g(),l(`div`,Tt,[d(b(S),{name:`sigma`,stroke:J.value.config.th.color,size:16},null,8,[`stroke`])])):(g(),l(`div`,Et,y(e),1))]),td:x(({td:e})=>[Ie(y(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[k.value.table.useDialog?{name:`title`,fn:x(()=>[Ie(y(Z.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:x(()=>[u(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[16]||=e=>hn(A.value.callbacks.csv),style:h({cursor:P.value?`pointer`:`default`})},[d(b(S),{name:`fileCsv`,stroke:Z.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):c(``,!0),v(e.$slots,`skeleton`,{},()=>[b(Yt)?(g(),s(ue,{key:0})):c(``,!0)],!0)],46,Ke))}},[[`__scopeId`,`data-v-450be64a`]]);export{Ge as n,S as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Jt as i,Lt as a,M as ee,X as te,Yt as ne,at as re,i as ie,in as ae,nt as oe,t as se,zt as ce}from"./lib-rPeBMZrn.js";import{n as le,t as ue}from"./BaseScanner-8NdoBs7B.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./chartImage-DPGnEuYM.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,t as xe}from"./annotationSlots-BRR85CqJ.js";import{n as Se,t as Ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{c as Te}from"./canvas-lib-22VpOI4_.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./Legend-DM0ClX3D.js";import{t as Me}from"./vue_ui_mood_radar-CXaBdJnv.js";import{Fragment as Ne,Teleport as Pe,computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,createSlots as Fe,createTextVNode as Ie,createVNode as d,defineAsyncComponent as f,guardReactiveProps as p,mergeProps as Le,nextTick as Re,normalizeClass as ze,normalizeProps as m,normalizeStyle as h,onMounted as Be,openBlock as g,ref as _,renderList as Ve,renderSlot as v,resolveDynamicComponent as He,toDisplayString as y,toRefs as Ue,unref as b,watch as We,withCtx as x}from"vue";var Ge=/* @__PURE__ */ e({default:()=>S}),Ke=[`id`],qe=[`id`],Je=[`id`],Ye={style:{position:`relative`}},Xe=[`xmlns`,`aria-describedby`,`viewBox`],Ze=[`width`,`height`],Qe=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],$e=[`d`,`stroke`,`stroke-width`],et=[`transform`],tt=[`stroke`],nt=[`aria-label`,`fill`],rt=[`transform`],it=[`stroke`],at=[`aria-label`,`fill`],ot=[`transform`],st=[`stroke`],ct=[`aria-label`,`fill`],lt=[`transform`],ut=[`stroke`],dt=[`aria-label`,`fill`],ft=[`transform`],pt=[`stroke`],mt=[`aria-label`,`fill`],ht=[`d`,`stroke`,`stroke-width`,`fill`],gt=[`x1`,`y1`,`x2`,`y2`,`stroke`],_t=[`cx`,`cy`,`fill`,`stroke`],vt=[`cx`,`cy`,`fill`,`stroke`],yt=[`x`,`y`,`fill`,`font-weight`],bt=[`x`,`y`,`fill`],xt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},St={key:5,class:`vue-data-ui-watermark`},Ct=[`id`],wt=[`onClick`,`onKeydown`],Tt={key:0},Et={key:1},S=/*#__PURE__*/ pe({__name:`vue-ui-mood-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:Ge}){let S=f(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Dt=f(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Ot=f(()=>import(`./DataTable-0Vv-aGHD.js`)),kt=f(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),At=f(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),jt=f(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),Mt=f(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_mood_radar:Nt}=t(),C=e,Pt=Ge,w=_(te()),T=_(null),E=_(null),Ft=_(null),It=_(0),Lt=_(0),Rt=_(0),zt=_(null),Bt=_(null),D=_(null),Vt=_(null),Ht=_(null),Ut=_(!1),Wt=_(null),Gt=_(null),O=_(null),Kt=_(!1),qt=o(()=>!!C.dataset&&Object.keys(C.dataset).length),k=_(tn()),A=o(()=>k.value.userOptions),j=o(()=>k.value.style.chart.layout.smileys),M=o(()=>k.value.style.chart.layout),N=o(()=>k.value.style.chart);de({config:()=>k.value,dataset:()=>C.dataset,component:`VueUiMoodRadar`,rules:[fe.noHint]});let P=o(()=>k.value.userOptions.useCursorPointer),Jt=o(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`},outerPolygon:{stroke:`#6A6A6A`},dataPolygon:{color:`#6A6A6A`,opacity:30,stroke:`#6A6A6A`},smileys:{colors:{1:`#DBDBDB`,2:`#C4C4C4`,3:`#ADADAD`,4:`#969696`,5:`#808080`}},dataLabel:{color:`transparent`}},legend:{backgroundColor:`transparent`}}}},userConfig:k.value.skeletonConfig??{}})),{loading:Yt,FINAL_DATASET:F}=le({...Ue(C),FINAL_CONFIG:k,prepareConfig:tn,callback:()=>{Promise.resolve().then(async()=>{await Re(),R.value.showTable=k.value.table.show})},skeletonDataset:C.config?.skeletonDataset??{1:1,2:1,3:1,4:1,5:1},skeletonConfig:ae({defaultConfig:k.value,userConfig:Jt.value})});Be(()=>{Ut.value=!0,Zt()});let Xt=o(()=>k.value.debug);function Zt(){if(ce(C.dataset)&&re({componentName:`VueUiMoodRadar`,type:`dataset`,debug:Xt.value}),k.value.responsive){let e=Te(()=>{let{width:e,height:t}=Ee({chart:T.value,title:N.value.title.text?zt.value:null,legend:N.value.legend.show?Bt.value:null,noTitle:Ft.value,source:Ht.value});requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12})});D.value&&(Vt.value&&D.value.unobserve(Vt.value),D.value.disconnect()),D.value=new ResizeObserver(e),Vt.value=T.value.parentNode,D.value.observe(Vt.value)}}let{userOptionsVisible:Qt,setUserOptionsVisibility:$t,keepUserOptionState:en}=ke({config:k.value}),{svgRef:I}=Ae({config:N.value.title});function tn(){return me(C.config,Nt,Me)}We(()=>C.config,e=>{k.value=tn(),Qt.value=!k.value.userOptions.showOnChartHover,Zt(),It.value+=1,Lt.value+=1,Rt.value+=1,R.value.showTable=k.value.table.show},{deep:!0});let{isPrinting:nn,isImaging:L,generatePdf:rn,generateImage:an}=we({elementId:w.value,fileName:N.value.title.text||`vue-ui-mood-radar`,options:k.value.userOptions.print}),on=o(()=>k.value.userOptions.show&&!N.value.title.text),R=_({showTable:k.value.table.show}),z=_({height:256,width:256}),sn={5:{x:128,y:35},4:{x:218,y:98.5},3:{x:185,y:204},2:{x:70,y:204},1:{x:38.5,y:98.5}},cn=o(()=>{let e={};return pn.value.forEach(t=>{e[t.key]={x:t.x,y:t.y}}),e});function B(e){let t=sn[e],n=cn.value[e]||t;return`translate(${n.x-t.x}, ${n.y-t.y})`}let ln=o(()=>ee({plot:{x:z.value.width/2,y:z.value.height/2},radius:Math.min(z.value.height,z.value.width)*.35,sides:5,rotation:11}));function un({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i,key:a,value:ee}){return{x:e+(n-e)*i,y:t+(r-t)*i,key:a,value:ee}}let dn=o(()=>Math.max(...Object.values(F.value).map(e=>isNaN(e)?0:e))),V=o(()=>Object.values(F.value).reduce((e,t)=>(isNaN(e)?0:e)+(isNaN(t)?0:t),0)),H=o(()=>Object.keys(F.value).map((e,t)=>{let n=typeof F.value[e]!=`number`||isNaN(F.value[e])?0:F.value[e];return{index:t,key:e,value:n,proportion:n/V.value,color:j.value.colors[e]}}).map(e=>({...e,onSelect:()=>U(e.key)})).sort((e,t)=>t.key-e.key)),fn=o(()=>H.value.map((e,t)=>({...e,display:`${ie(M.value.dataLabel.formatter,e.value,n({p:M.value.dataLabel.prefix,v:e.value,s:M.value.dataLabel.suffix,r:M.value.dataLabel.roundingValue}))}${Yt.value?``:` (${n({v:e.proportion*100,s:`%`,r:N.value.legend.roundingPercentage})})`}`}))),pn=o(()=>([`1`,`2`,`3`,`4`,`5`].forEach(e=>{[null,void 0].includes(F.value[e])&&re({componentName:`VueUiMoodRadar`,type:`datasetAttribute`,property:e,debug:Xt.value})}),ln.value.coordinates.map((e,t)=>{let n=un({centerX:z.value.width/2,centerY:z.value.height/2,apexX:e.x,apexY:e.y,proportion:H.value[t].value/dn.value,key:H.value[t].key,value:H.value[t].value});return{...e,plots:n,key:H.value[t].key}}))),mn=o(()=>({cy:`mood-radar-legend`,backgroundColor:N.value.legend.backgroundColor,color:N.value.legend.color,fontSize:N.value.legend.fontSize,paddingBottom:12,fontWeight:N.value.legend.bold?`bold`:``}));function U(e){e===E.value?E.value=null:(E.value=e,K(e))}function W(e){E.value=e;let t=H.value.find(t=>t.key===e);k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:t,seriesIndex:t.index})}function G(e){E.value=null;let t=H.value.find(t=>t.key===e);k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:t,seriesIndex:t.index})}function K(e){let t=H.value.find(t=>t.key===e);k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:t,seriesIndex:t.index})}let q=o(()=>({head:H.value.map(e=>({name:e.key,color:e.color})),body:H.value.map(e=>isNaN(e.value)?0:e.value)}));function hn(e=null){Re(()=>{let t=q.value.head.map((e,t)=>[[e.name],[q.value.body[t]],[isNaN(q.value.body[t]/V.value)?`-`:q.value.body[t]/V.value*100]]),n=[[N.value.title.text],[N.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),i=r(n);e?e(i):oe({csvContent:i,title:N.value.title.text||`vue-ui-mood-radar`})})}let J=o(()=>({head:[`__SUM__`,Number(V.value.toFixed(k.value.table.td.roundingValue)).toLocaleString(),`100%`],body:q.value.head.map((e,t)=>[{color:e.color,name:e.name},q.value.body[t].toFixed(k.value.table.td.roundingValue),isNaN(q.value.body[t]/V.value)?`-`:(q.value.body[t]/V.value*100).toFixed(k.value.table.td.roundingPercentage)+`%`]),config:{th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint},colNames:[k.value.table.columnNames.series,k.value.table.columnNames.value,k.value.table.columnNames.percentage]}));function gn(){return H.value}function _n(){R.value.showTable=!R.value.showTable}let Y=_(!1);function vn(e){Y.value=e}let X=_(!1);function yn(){X.value=!X.value}let bn=he(T,()=>N.value.title.text),Z=o(()=>ye({config:k,style:N,mutableConfig:R,dialog:Mt,accordion:Dt,isFullscreen:Y,parent:T,maxWidth:800,isCursorPointer:P}));We(()=>R.value.showTable,e=>ve(e,k,Wt));function xn(){R.value.showTable=!1,Gt.value&&Gt.value.setTableIconState(!1)}let Sn=o(()=>fn.value.map(e=>({...e,name:e.display,shape:`circle`}))),Cn=o(()=>N.value.backgroundColor),wn=o(()=>N.value.legend),Tn=o(()=>N.value.title),{isCallbackImaging:En,isCallbackSvg:Dn,generateSvg:On,onGenerateImage:kn}=_e({svg:I,title:Tn,legend:wn,legendItems:Sn,backgroundColor:Cn,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:an});async function An(){Pt(`copyAlt`,{config:k.value,dataset:H.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:H.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Q=o(()=>H.value.map(e=>String(e.key)));function jn(){$t(!0)}function Mn(){$t(!1)}function Nn(e){return H.value.find(t=>String(t.key)===String(e))}function Pn(e,t,r){return ie(M.value.dataLabel.formatter,e,n({p:M.value.dataLabel.prefix,v:e,s:M.value.dataLabel.suffix,r:M.value.dataLabel.roundingValue}),{datapoint:r,seriesIndex:t})}function Fn(e){return n({v:V.value?e/V.value*100:0,s:`%`,r:M.value.dataLabel.roundingPercentage})}function $(e){let t=Nn(e);return t?`${e}, ${Pn(t.value,t.index,t)}, ${Fn(t.value)}`:`${e}`}function In(e){let t=Q.value[e];t&&(O.value=e,E.value=t)}function Ln(){Kt.value=!0}function Rn(){O.value=null,E.value=null,Kt.value=!1}function zn(e){if(!I.value||!Q.value.length||X.value||document.activeElement!==I.value)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){O.value=null,E.value=null;return}if(r){if(O.value===null)return;let e=Q.value[O.value];if(!e)return;U(e);return}let a=O.value;a===null||a<0||a>=Q.value.length?a=n?0:Q.value.length-1:n?(a+=1,a>=Q.value.length&&(a=0)):t&&(--a,a<0&&(a=Q.value.length-1)),In(a)}function Bn(e,t){let n=e.key===`Enter`||e.key===` `,r=e.key===`Escape`;(n||r)&&(e.preventDefault(),e.stopPropagation(),r?(O.value=null,E.value=null):U(String(t)))}let Vn=o(()=>({headers:J.value?.colNames??[],rows:H.value.map(e=>[String(e.key),Pn(e.value,e.index,e),Fn(e.value)])}));return pe({getData:gn,getImage:bn,generatePdf:rn,generateCsv:hn,generateImage:an,generateSvg:On,toggleTable:_n,toggleAnnotator:yn,toggleFullscreen:vn,copyAlt:An}),(e,t)=>(g(),l(`div`,{class:ze(`vue-data-ui-component vue-ui-mood-radar ${Y.value?`vue-data-ui-wrapper-fullscreen`:``} ${k.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`moodRadarChart`,ref:T,id:`${w.value}`,style:h(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${N.value.backgroundColor}`),onMouseenter:jn,onMouseleave:Mn},[u(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[u(`p`,null,y(k.value.a11y.translations.keyboardNavigation),1)],8,qe),Vn.value?.rows?.length?(g(),s(Oe,{key:0,uid:w.value,head:Vn.value.headers,body:Vn.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):c(``,!0),A.value.buttons.annotator?(g(),s(b(kt),{key:1,svgRef:b(I),backgroundColor:N.value.backgroundColor,color:N.value.color,active:X.value,isCursorPointer:P.value,palette:A.value.annotatorPalette,onClose:yn},Fe({_:2},[Ve(b(xe),t=>({name:t,fn:x(n=>[v(e.$slots,t,m(p(b(be)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):c(``,!0),on.value?(g(),l(`div`,{key:2,ref_key:`noTitle`,ref:Ft,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):c(``,!0),N.value.title.text?(g(),l(`div`,{key:3,ref_key:`chartTitle`,ref:zt,style:`width:100%;background:transparent`},[d(ge,{config:{title:{cy:`mood-radar-title`,...N.value.title},subtitle:{cy:`mood-radar-subtitle`,...N.value.title.subtitle}}},null,8,[`config`])],512)):c(``,!0),u(`div`,{id:`legend-top-${w.value}`},null,8,Je),A.value.show&&qt.value&&(b(en)||b(Qt))?(g(),s(b(At),{key:4,ref_key:`userOptionsRef`,ref:Gt,backgroundColor:N.value.backgroundColor,color:N.value.color,isPrinting:b(nn),isImaging:b(L),uid:w.value,hasPdf:A.value.buttons.pdf,hasXls:A.value.buttons.csv,hasImg:A.value.buttons.img,hasSvg:A.value.buttons.svg,hasTable:A.value.buttons.table,hasFullscreen:A.value.buttons.fullscreen,hasAltCopy:A.value.buttons.altCopy,isFullscreen:Y.value,titles:{...A.value.buttonTitles},chartElement:T.value,position:A.value.position,hasAnnotator:A.value.buttons.annotator,isAnnotation:X.value,callbacks:A.value.callbacks,printScale:A.value.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:P.value,onToggleFullscreen:vn,onGeneratePdf:b(rn),onGenerateCsv:hn,onGenerateImage:b(kn),onGenerateSvg:b(On),onToggleTable:_n,onToggleAnnotator:yn,onCopyAlt:An,style:h({visibility:b(en)?b(Qt)?`visible`:`hidden`:`visible`})},Fe({_:2},[Ve(b(Se)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:x(n=>[v(e.$slots,t,m(p(b(Ce)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):c(``,!0),u(`div`,Ye,[(g(),l(`svg`,{ref_key:`svgRef`,ref:I,xmlns:b(se),"aria-describedby":`chart-instructions-${w.value}`,viewBox:`0 0 ${z.value.width} ${z.value.height}`,class:ze({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),style:h(`overflow:visible;background:transparent;color:${N.value.color}`),tabindex:`0`,onFocus:Ln,onBlur:Rn,onKeydown:zn},[d(b(jt)),v(e.$slots,`svg-underlayer`,{svg:{...z.value,isPrintingImg:b(nn)||b(L)||b(En),isPrintingSvg:b(Dn)}},void 0,!0),e.$slots[`chart-background`]?(g(),l(`foreignObject`,{key:0,x:0,y:0,width:z.value.width,height:z.value.height,style:{pointerEvents:`none`}},[v(e.$slots,`chart-background`,{},void 0,!0)],8,Ze)):c(``,!0),u(`defs`,null,[d(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`mood_radar_gradient_${w.value}`,stops:[[`0%`,b(i)(M.value.dataPolygon.color,M.value.dataPolygon.opacity),1],[`100%`,b(i)(b(ne)(M.value.dataPolygon.color,M.value.dataPolygon.gradient.intensity/100),M.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`])]),(g(!0),l(Ne,null,Ve(ln.value.coordinates,e=>(g(),l(`line`,{x1:z.value.width/2,y1:z.value.height/2,x2:e.x,y2:e.y,stroke:M.value.grid.stroke,"stroke-width":M.value.grid.strokeWidth},null,8,Qe))),256)),u(`path`,{d:ln.value.path,fill:`none`,stroke:M.value.outerPolygon.stroke,"stroke-width":M.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,$e),u(`g`,{transform:B(`5`)},[u(`path`,{fill:`none`,stroke:j.value.colors[5],"stroke-width":`1`,"stroke-linecap":`round`,d:`M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22`},null,8,tt),u(`circle`,{role:`button`,class:`vue-ui-mood-radar-trap`,cx:`128`,cy:`25`,r:`20`,"aria-label":$(`5`),fill:E.value===`5`?b(i)(j.value.colors[5],20):`transparent`,onMouseenter:t[0]||=e=>W(`5`),onMouseleave:t[1]||=e=>G(`5`),onClick:t[2]||=e=>K(`5`)},null,40,nt)],8,et),u(`g`,{transform:B(`4`)},[u(`path`,{fill:`none`,stroke:j.value.colors[4],"stroke-width":`1`,"stroke-linecap":`round`,d:`M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92`},null,8,it),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`227`,cy:`95.5`,r:`20`,"aria-label":$(`4`),fill:E.value===`4`?b(i)(j.value.colors[4],20):`transparent`,onMouseenter:t[3]||=e=>W(`4`),onMouseleave:t[4]||=e=>G(`4`),onClick:t[5]||=e=>K(`4`)},null,40,at)],8,rt),u(`g`,{transform:B(`3`)},[u(`path`,{fill:`none`,stroke:j.value.colors[3],"stroke-width":`1`,"stroke-linecap":`round`,d:`M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215`},null,8,st),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`190`,cy:`213.5`,r:`20`,"aria-label":$(`3`),fill:E.value===`3`?b(i)(j.value.colors[3],20):`transparent`,onMouseenter:t[6]||=e=>W(`3`),onMouseleave:t[7]||=e=>G(`3`),onClick:t[8]||=e=>K(`3`)},null,40,ct)],8,ot),u(`g`,{transform:B(`2`)},[u(`path`,{fill:`none`,stroke:j.value.colors[2],"stroke-width":`1`,"stroke-linecap":`round`,d:`M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210`},null,8,ut),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`65`,cy:`213.5`,r:`20`,"aria-label":$(`2`),fill:E.value===`2`?b(i)(j.value.colors[2],20):`transparent`,onMouseenter:t[9]||=e=>W(`2`),onMouseleave:t[10]||=e=>G(`2`),onClick:t[11]||=e=>K(`2`)},null,40,dt)],8,lt),u(`g`,{transform:B(`1`)},[u(`path`,{fill:`none`,stroke:j.value.colors[1],"stroke-width":`1`,"stroke-linecap":`round`,d:`M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93`},null,8,pt),u(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`29`,cy:`95.5`,r:`20`,"aria-label":$(`1`),fill:E.value===`1`?b(i)(j.value.colors[1],20):`transparent`,onMouseenter:t[12]||=e=>W(`1`),onMouseleave:t[13]||=e=>G(`1`),onClick:t[14]||=e=>K(`1`)},null,40,mt)],8,ft),u(`path`,{d:b(a)(pn.value.map(e=>e.plots)),stroke:M.value.dataPolygon.stroke,"stroke-width":M.value.dataPolygon.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:M.value.dataPolygon.gradient.show?`url(#mood_radar_gradient_${w.value})`:b(i)(M.value.dataPolygon.color,M.value.dataPolygon.opacity)},null,8,ht),(g(!0),l(Ne,null,Ve(pn.value.map(e=>e.plots),(e,t)=>(g(),l(`g`,{class:`vue-ui-mood-radar-trap`,style:h(`opacity:${E.value==e.key?`1`:`0`}`)},[u(`line`,{x1:e.x,y1:e.y,x2:z.value.width/2,y2:z.value.height/2,stroke:j.value.colors[e.key]},null,8,gt),u(`circle`,{cx:e.x,cy:e.y,fill:j.value.colors[e.key],r:`3`,stroke:N.value.backgroundColor,"stroke-width":.5},null,8,_t),u(`circle`,{cx:z.value.width/2,cy:z.value.height/2,fill:j.value.colors[e.key],r:`3`,stroke:N.value.backgroundColor,"stroke-width":.5},null,8,vt),u(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.13:z.value.height/2*.9375,fill:M.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`,"font-weight":M.value.dataLabel.bold?`bold`:`normal`},y(b(ie)(M.value.dataLabel.formatter,e.value,b(n)({p:M.value.dataLabel.prefix,v:e.value,s:M.value.dataLabel.suffix,r:M.value.dataLabel.roundingValue}),{datapoint:e,seriesIndex:t})),9,yt),u(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.273:z.value.height/2*.7968,fill:M.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`},` (`+y(b(n)({v:e.value/V.value*100,s:`%`,r:M.value.dataLabel.roundingPercentage}))+`) `,9,bt)],4))),256)),v(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:b(nn)||b(L)||b(En),isPrintingSvg:b(Dn)}},void 0,!0)],46,Xe)),e.$slots.hint?(g(),l(`div`,xt,[v(e.$slots,`hint`,m(p({hint:k.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):c(``,!0)]),e.$slots.watermark?(g(),l(`div`,St,[v(e.$slots,`watermark`,m(p({isPrinting:b(nn)||b(L)||b(En)||b(Dn)})),void 0,!0)])):c(``,!0),u(`div`,{id:`legend-bottom-${w.value}`},null,8,Ct),Ut.value&&(N.value.legend.show||e.$slots.legend)?(g(),s(Pe,{key:6,to:N.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[u(`div`,{ref_key:`chartLegend`,ref:Bt},[v(e.$slots,`legend`,{legend:H.value},()=>[N.value.legend.show?(g(),s(je,{legendSet:fn.value,config:mn.value,key:`legend_${Rt.value}`,isCursorPointer:P.value,style:{display:`flex`,"row-gap":`6px`},onFocusMarker:t[15]||=({legend:e})=>U(e.key)},{item:x(({legend:e,index:t})=>[u(`div`,{role:`button`,onClick:()=>U(e.key),style:{display:`flex`,"flex-direction":`row`,gap:`3px`,"align-items":`center`,margin:`3px 0`},onKeydown:t=>Bn(t,String(e.key))},[e.key==1?(g(),s(b(S),{key:0,strokeWidth:1,name:`moodSad`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==2?(g(),s(b(S),{key:1,strokeWidth:1,name:`moodFlat`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==3?(g(),s(b(S),{key:2,strokeWidth:1,name:`moodNeutral`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==4?(g(),s(b(S),{key:3,strokeWidth:1,name:`smiley`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),e.key==5?(g(),s(b(S),{key:4,strokeWidth:1,name:`moodHappy`,stroke:j.value.colors[e.key]},null,8,[`stroke`])):c(``,!0),b(Yt)?c(``,!0):(g(),l(`span`,{key:5,style:h({fontWeight:N.value.legend.bold?`bold`:`normal`})},y(e.display),5))],40,wt)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):c(``,!0)],!0)],512)],8,[`to`])):c(``,!0),e.$slots.source?(g(),l(`div`,{key:7,ref_key:`source`,ref:Ht,dir:`auto`},[v(e.$slots,`source`,{},void 0,!0)],512)):c(``,!0),qt.value&&A.value.buttons.table?(g(),s(He(Z.value.component),Le({key:8},Z.value.props,{ref_key:`tableUnit`,ref:Wt,onClose:xn}),Fe({content:x(()=>[d(b(Ot),{colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:k.value.table.useDialog?``:Z.value.title,withCloseButton:!k.value.table.useDialog,isCursorPointer:P.value,onClose:xn},{th:x(({th:e})=>[e===`__SUM__`?(g(),l(`div`,Tt,[d(b(S),{name:`sigma`,stroke:J.value.config.th.color,size:16},null,8,[`stroke`])])):(g(),l(`div`,Et,y(e),1))]),td:x(({td:e})=>[Ie(y(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[k.value.table.useDialog?{name:`title`,fn:x(()=>[Ie(y(Z.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:x(()=>[u(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[16]||=e=>hn(A.value.callbacks.csv),style:h({cursor:P.value?`pointer`:`default`})},[d(b(S),{name:`fileCsv`,stroke:Z.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):c(``,!0),v(e.$slots,`skeleton`,{},()=>[b(Yt)?(g(),s(ue,{key:0})):c(``,!0)],!0)],46,Ke))}},[[`__scopeId`,`data-v-450be64a`]]);export{Ge as n,S as t};