vue-data-ui 3.29.2-beta.0 → 3.29.2

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 (136) hide show
  1. package/dist/{PackageVersion-D8aPzzvh.js → PackageVersion-C1vtZkKc.js} +1 -1
  2. package/dist/{XyAnalysisOptions-TrM-d1cV.js → XyAnalysisOptions-CD0cCtt5.js} +1 -1
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-age-pyramid.js +1 -1
  5. package/dist/components/vue-ui-bullet.js +1 -1
  6. package/dist/components/vue-ui-bump.js +1 -1
  7. package/dist/components/vue-ui-candlestick.js +1 -1
  8. package/dist/components/vue-ui-carousel-table.js +1 -1
  9. package/dist/components/vue-ui-chestnut.js +1 -1
  10. package/dist/components/vue-ui-chord.js +1 -1
  11. package/dist/components/vue-ui-circle-pack.js +1 -1
  12. package/dist/components/vue-ui-cursor.js +1 -1
  13. package/dist/components/vue-ui-dag.js +1 -1
  14. package/dist/components/vue-ui-dashboard.js +1 -1
  15. package/dist/components/vue-ui-digits.js +1 -1
  16. package/dist/components/vue-ui-donut-evolution.js +1 -1
  17. package/dist/components/vue-ui-donut.js +1 -1
  18. package/dist/components/vue-ui-dumbbell.js +1 -1
  19. package/dist/components/vue-ui-flow.js +1 -1
  20. package/dist/components/vue-ui-funnel.js +1 -1
  21. package/dist/components/vue-ui-galaxy.js +1 -1
  22. package/dist/components/vue-ui-gauge.js +1 -1
  23. package/dist/components/vue-ui-geo.js +1 -1
  24. package/dist/components/vue-ui-gizmo.js +1 -1
  25. package/dist/components/vue-ui-graph.js +1 -1
  26. package/dist/components/vue-ui-heatmap.js +1 -1
  27. package/dist/components/vue-ui-hill.js +1 -1
  28. package/dist/components/vue-ui-history-plot.js +1 -1
  29. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  30. package/dist/components/vue-ui-kpi.js +1 -1
  31. package/dist/components/vue-ui-molecule.js +1 -1
  32. package/dist/components/vue-ui-mood-radar.js +1 -1
  33. package/dist/components/vue-ui-nested-donuts.js +1 -1
  34. package/dist/components/vue-ui-onion.js +1 -1
  35. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  36. package/dist/components/vue-ui-quadrant.js +1 -1
  37. package/dist/components/vue-ui-quick-chart.js +1 -1
  38. package/dist/components/vue-ui-radar.js +1 -1
  39. package/dist/components/vue-ui-relation-circle.js +1 -1
  40. package/dist/components/vue-ui-ridgeline.js +1 -1
  41. package/dist/components/vue-ui-rings.js +1 -1
  42. package/dist/components/vue-ui-scatter.js +1 -1
  43. package/dist/components/vue-ui-skeleton.js +1 -1
  44. package/dist/components/vue-ui-spark-trend.js +1 -1
  45. package/dist/components/vue-ui-sparkbar.js +1 -1
  46. package/dist/components/vue-ui-sparkgauge.js +1 -1
  47. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  48. package/dist/components/vue-ui-sparkline.js +1 -1
  49. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  50. package/dist/components/vue-ui-stackbar.js +1 -1
  51. package/dist/components/vue-ui-stackline.js +1 -1
  52. package/dist/components/vue-ui-strip-plot.js +1 -1
  53. package/dist/components/vue-ui-table-sparkline.js +1 -1
  54. package/dist/components/vue-ui-table.js +1 -1
  55. package/dist/components/vue-ui-thermometer.js +1 -1
  56. package/dist/components/vue-ui-timer.js +1 -1
  57. package/dist/components/vue-ui-tiremarks.js +1 -1
  58. package/dist/components/vue-ui-treemap.js +1 -1
  59. package/dist/components/vue-ui-vertical-bar.js +1 -1
  60. package/dist/components/vue-ui-waffle.js +1 -1
  61. package/dist/components/vue-ui-wheel.js +1 -1
  62. package/dist/components/vue-ui-word-cloud.js +1 -1
  63. package/dist/components/vue-ui-world.js +1 -1
  64. package/dist/components/vue-ui-xy.js +1 -1
  65. package/dist/package-BPQ4kSL9.js +1 -0
  66. package/dist/{render-common-D_b9nsiP.js → render-common-DNKT42_W.js} +1 -1
  67. package/dist/ssr/vue-ui-donut.js +1 -1
  68. package/dist/ssr/vue-ui-xy.js +1 -1
  69. package/dist/ssr.js +1 -1
  70. package/dist/{vue-data-ui-KUM8DuFn.js → vue-data-ui-CeZQZazG.js} +1 -1
  71. package/dist/vue-data-ui.js +1 -1
  72. package/dist/{vue-ui-3d-bar-Qk10B6Cd.js → vue-ui-3d-bar-CNym5PLY.js} +1 -1
  73. package/dist/{vue-ui-age-pyramid-DrI34mhm.js → vue-ui-age-pyramid-zD6anIub.js} +1 -1
  74. package/dist/{vue-ui-bullet-CKFpHbob.js → vue-ui-bullet-CxhIb-XU.js} +1 -1
  75. package/dist/{vue-ui-bump-3DZDFqlN.js → vue-ui-bump-B8WYM1RE.js} +1 -1
  76. package/dist/{vue-ui-candlestick-D-pcBKMb.js → vue-ui-candlestick-CwG1H80q.js} +1 -1
  77. package/dist/{vue-ui-carousel-table-jc4H5Csu.js → vue-ui-carousel-table-CdrxVrHZ.js} +1 -1
  78. package/dist/{vue-ui-chestnut-DuY5XkX5.js → vue-ui-chestnut-CZG6Ep36.js} +1 -1
  79. package/dist/{vue-ui-chord-B7OK3qHh.js → vue-ui-chord-DQS4tBWQ.js} +1 -1
  80. package/dist/{vue-ui-circle-pack-B8jc9sHP.js → vue-ui-circle-pack-BGbhvnE5.js} +1 -1
  81. package/dist/{vue-ui-cursor-IwoqyrxC.js → vue-ui-cursor-DTRAPWBW.js} +1 -1
  82. package/dist/{vue-ui-dag-Ji8-v6L0.js → vue-ui-dag-BGNC8uRQ.js} +1 -1
  83. package/dist/{vue-ui-dashboard-WIwFoyCz.js → vue-ui-dashboard-DtPlz7y-.js} +1 -1
  84. package/dist/{vue-ui-digits-DG2jj43S.js → vue-ui-digits-gtQiZcOT.js} +1 -1
  85. package/dist/{vue-ui-donut-Cp_rDJUY.js → vue-ui-donut-COELw22T.js} +1 -1
  86. package/dist/{vue-ui-donut-BZHm9bc7.js → vue-ui-donut-_wqSXunY.js} +1 -1
  87. package/dist/{vue-ui-donut-evolution-_Kdf1mvb.js → vue-ui-donut-evolution-CdztIQSl.js} +1 -1
  88. package/dist/{vue-ui-dumbbell-7IaXl-8-.js → vue-ui-dumbbell-CpLMoEet.js} +1 -1
  89. package/dist/{vue-ui-flow-DR_wI1D2.js → vue-ui-flow-DwG1MX2V.js} +1 -1
  90. package/dist/{vue-ui-funnel-BN1pctHJ.js → vue-ui-funnel-CisiLlR9.js} +1 -1
  91. package/dist/{vue-ui-galaxy-Hh7hGC7B.js → vue-ui-galaxy-HndquOs-.js} +1 -1
  92. package/dist/{vue-ui-gauge-BLRxKref.js → vue-ui-gauge-CVxKlU2U.js} +1 -1
  93. package/dist/{vue-ui-geo-CCgF74O9.js → vue-ui-geo-0PDP2JjE.js} +1 -1
  94. package/dist/{vue-ui-gizmo-Crc_ZyI6.js → vue-ui-gizmo-mFeK8xP1.js} +1 -1
  95. package/dist/{vue-ui-graph-BKP_eWfb.js → vue-ui-graph-Duw5qG0a.js} +1 -1
  96. package/dist/{vue-ui-heatmap-ClwqkUxt.js → vue-ui-heatmap-DZM9MvfE.js} +1 -1
  97. package/dist/{vue-ui-hill-GDmqAoJ5.js → vue-ui-hill-BGQSrcHM.js} +1 -1
  98. package/dist/{vue-ui-history-plot-ApFEePsd.js → vue-ui-history-plot-EGeDhkdS.js} +1 -1
  99. package/dist/{vue-ui-horizontal-bar-ny2bvg06.js → vue-ui-horizontal-bar-CtONqcjG.js} +1 -1
  100. package/dist/{vue-ui-kpi-Bp1e999m.js → vue-ui-kpi-BSRfwYk9.js} +1 -1
  101. package/dist/{vue-ui-molecule-DxtTUaLQ.js → vue-ui-molecule-DOQ8dsme.js} +1 -1
  102. package/dist/{vue-ui-mood-radar-j0d3TK6F.js → vue-ui-mood-radar-BJeSC-Op.js} +1 -1
  103. package/dist/{vue-ui-nested-donuts-B5uZ3ysI.js → vue-ui-nested-donuts-DUUmc8K7.js} +1 -1
  104. package/dist/{vue-ui-onion-CNh69F7R.js → vue-ui-onion-B8M1x8Jc.js} +1 -1
  105. package/dist/{vue-ui-parallel-coordinate-plot-2SQJp8f0.js → vue-ui-parallel-coordinate-plot-Dv0eO4ZI.js} +1 -1
  106. package/dist/{vue-ui-quadrant-Bhgpb3cX.js → vue-ui-quadrant-_QcgE234.js} +1 -1
  107. package/dist/{vue-ui-quick-chart-Bfe2UmN_.js → vue-ui-quick-chart-DzJx0LBu.js} +1 -1
  108. package/dist/{vue-ui-radar-3dYXgEMZ.js → vue-ui-radar-C-idGMCp.js} +1 -1
  109. package/dist/{vue-ui-relation-circle-BG6-M08A.js → vue-ui-relation-circle-Dl2XO5DU.js} +1 -1
  110. package/dist/{vue-ui-ridgeline-C0iY3yTj.js → vue-ui-ridgeline-SG44P21X.js} +1 -1
  111. package/dist/{vue-ui-rings-B_J_Gfrt.js → vue-ui-rings-b8Ms_mTp.js} +1 -1
  112. package/dist/{vue-ui-scatter-Cehkxo2z.js → vue-ui-scatter-KPiaTVuv.js} +1 -1
  113. package/dist/{vue-ui-skeleton-D-hfKRUc.js → vue-ui-skeleton-Dg0tACvE.js} +1 -1
  114. package/dist/{vue-ui-spark-trend--Dt7macD.js → vue-ui-spark-trend-C3EXOm2F.js} +1 -1
  115. package/dist/{vue-ui-sparkbar-DzGe_dfJ.js → vue-ui-sparkbar-CCjgG6pR.js} +1 -1
  116. package/dist/{vue-ui-sparkgauge-BqcV18vm.js → vue-ui-sparkgauge-DnxHmWiH.js} +1 -1
  117. package/dist/{vue-ui-sparkhistogram-TdoHtGYT.js → vue-ui-sparkhistogram--QcZmUje.js} +1 -1
  118. package/dist/{vue-ui-sparkline-Eet_Atf1.js → vue-ui-sparkline-D1BPdZdr.js} +1 -1
  119. package/dist/{vue-ui-sparkstackbar-B1SX-oPW.js → vue-ui-sparkstackbar-CxF1OSDL.js} +1 -1
  120. package/dist/{vue-ui-stackbar-BsEWtYRO.js → vue-ui-stackbar-yKTDxwXp.js} +1 -1
  121. package/dist/{vue-ui-stackline-B5hG3Qg4.js → vue-ui-stackline-BPdR_8x0.js} +1 -1
  122. package/dist/{vue-ui-strip-plot-eWnUp_6Y.js → vue-ui-strip-plot-CAmBydR2.js} +1 -1
  123. package/dist/{vue-ui-table-G7KEKsPH.js → vue-ui-table-BKfGLJgN.js} +1 -1
  124. package/dist/{vue-ui-table-sparkline-BDS0VE4_.js → vue-ui-table-sparkline-CVomhgHC.js} +1 -1
  125. package/dist/{vue-ui-thermometer-C-jpJjJ8.js → vue-ui-thermometer-DNRR87NF.js} +1 -1
  126. package/dist/{vue-ui-timer-DNAmPraQ.js → vue-ui-timer-Bx5D4QsO.js} +1 -1
  127. package/dist/{vue-ui-tiremarks-9om1K_xI.js → vue-ui-tiremarks-CnZqIcFq.js} +1 -1
  128. package/dist/{vue-ui-treemap-DjpsD5YK.js → vue-ui-treemap-D7k9vWC9.js} +1 -1
  129. package/dist/{vue-ui-waffle-C7i07E9j.js → vue-ui-waffle-BHcDq09N.js} +1 -1
  130. package/dist/{vue-ui-wheel-DagrJGMA.js → vue-ui-wheel-Cd3P9Nq4.js} +1 -1
  131. package/dist/{vue-ui-word-cloud-DEa-Eg43.js → vue-ui-word-cloud-B7iGPkGe.js} +1 -1
  132. package/dist/{vue-ui-world-UE0OI7Nw.js → vue-ui-world-bZ7gOrS1.js} +1 -1
  133. package/dist/{vue-ui-xy-BlxUkwlc.js → vue-ui-xy-BTGZ1NSt.js} +2 -2
  134. package/dist/{vue-ui-xy-D7jTqz17.js → vue-ui-xy-Y_MKCMGp.js} +1 -1
  135. package/package.json +1 -1
  136. package/dist/package-C5OjoKoX.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as re,D as ie,Dt as ae,Et as oe,Ft as se,Ht as ce,J as le,Q as ue,S as de,T as fe,X as pe,_ as me,at as he,i as ge,in as _e,nt as ve,qt as ye,r as be,rn as xe,t as Se,tn as Ce,w as we}from"./lib-rPeBMZrn.js";import{n as Te,t as Ee}from"./useHints-C-TwxM0Y.js";import{t as De}from"./useConfig-CXhXxWjB.js";import{t as Oe}from"./useSvgLabelLayout-42Kats14.js";import{t as ke}from"./usePrinter-DVf3YcG5.js";import{t as Ae}from"./useResponsive-CENUxfEL.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{t as Me}from"./useTransitions-ChGGrtrv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./useTimeLabelCollider-BTybMUFi.js";import{n as Fe}from"./Title-BliHuXfT.js";import{t as Ie}from"./vue_ui_history_plot-BZ5TtPPB.js";import{t as Le}from"./Legend-W9YVYVX-.js";import{t as Re}from"./BaseScanner-m6QR9rwD.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ve}from"./DefGrad-DKMq1REY.js";import{t as He}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,Teleport as Ue,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as qe,nextTick as Je,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Ye,onMounted as Xe,openBlock as y,reactive as Ze,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Qe,shallowRef as $e,toDisplayString as C,unref as w,watch as T,withCtx as E}from"vue";var et=/* @__PURE__ */ e({default:()=>zt}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`viewBox`,`aria-describedby`],ot=[`x`,`y`,`width`,`height`],st={key:1},ct=[`id`,`x1`,`y1`,`x2`,`y2`],lt=[`stop-color`,`offset`],ut={key:2},dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft={key:3},pt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],mt=[`x`,`y`,`fill`,`font-size`],ht=[`transform`,`font-size`,`fill`,`font-weight`],gt={key:6},_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vt={key:7},yt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],bt=[`transform`,`fill`,`font-size`,`text-anchor`],xt=[`x`,`y`,`font-size`,`fill`,`font-weight`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt=[`d`,`stroke`,`stroke-width`],Tt=[`d`,`stroke`,`stroke-width`],Et=[`cx`,`cy`,`fill`,`r`],Dt=[`cx`,`cy`,`fill`,`r`,`stroke`,`stroke-width`],Ot={key:1},kt=[`transform`,`font-size`,`fill`,`font-weight`],At=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],jt={key:2},Mt=[`transform`,`font-size`,`font-weight`,`fill`],Nt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],Pt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ft={key:5,class:`vue-data-ui-watermark`},It=[`id`],Lt=[`onClick`],Rt={style:{display:`flex`,"align-items":`center`}},zt=/*#__PURE__*/ He({__name:`vue-ui-history-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:He,emit:et}){let zt=m(()=>import(`./Tooltip-B432XpvC.js`)),Bt=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Vt=m(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Ht=m(()=>import(`./DataTable-KeuZB1JM.js`)),Ut=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Wt=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Gt=m(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),Kt=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_history_plot:qt}=De(),D=e,O=b(null),Jt=b(null),Yt=b(null),Xt=b(0),Zt=$e(null),Qt=b(null),k=b(pe()),$t=b(!1),en=b(``),A=b([]),tn=b(!1),j=b(null),M=b(!1),nn=b(null),rn=b(!1),an=b(null),on=b(null),sn=b(null),cn=b(null),ln=b(null),un=b(null),N=b(null),P=b(null),dn=b({x:0,y:0}),fn=b(`pointer`),pn=b(!1),mn=l(()=>Array.from(D.dataset,e=>{let t=e&&typeof e==`object`?Object.keys(e):[],n=[`name`,`values`].filter(e=>!t.includes(e)),r=Array.isArray(e?.values),i=r?Array.from(e.values,e=>({x:Number.isFinite(e?.x),y:Number.isFinite(e?.y)})):[];return{missing:n,array:r,points:i,valid:!n.length&&r&&i.every(e=>e.x&&e.y)}})),hn=l(()=>D.dataset.length>0&&mn.value.every(e=>e.valid)),gn=et,_n=b(!1),F=null,vn=!1,yn=$e(null);function bn(){Zt.value?.disconnect(),Zt.value=null,F!==null&&cancelAnimationFrame(F),F=null}function xn(){if(bn(),yn.value=null,_n.value=!1,!L.value.responsive||!O.value?.parentNode)return;let e=new ResizeObserver(t);function t(){vn||Zt.value!==e||(F!==null&&cancelAnimationFrame(F),F=requestAnimationFrame(()=>{if(vn||Zt.value!==e)return;F=null;let{width:t,height:n}=Ae({chart:O.value,title:H.value.title.text?Jt.value:null,noTitle:Qt.value,legend:H.value.legend.show?Yt.value:null,source:nn.value});yn.value={width:Math.max(.1,t),height:Math.max(.1,n)},_n.value=!0}))}Zt.value=e,e.observe(O.value.parentNode);for(let t of[Jt.value,Yt.value,nn.value,Qt.value])t&&e.observe(t);t()}Xe(()=>{rn.value=!0,xn()}),Ye(()=>{vn=!0,bn()});function Sn(){return ne(D.config,qt,Ie)}let Cn=l(()=>Ze(Sn())),I=l(()=>!!D.config.loading||!hn.value),wn=l(()=>_e({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:Cn.value.skeletonConfig??{}})),L=l(()=>I.value?Ze(_e({defaultConfig:Cn.value,userConfig:wn.value})):Cn.value),Tn=l(()=>I.value?D.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}]}]:D.dataset),R=l(()=>Cn.value.debug),z=l(()=>L.value.style.chart.plots),B=l(()=>L.value.style.chart.grid),V=l(()=>L.value.style.chart.axes),H=l(()=>L.value.style.chart);Te({config:()=>L.value,dataset:()=>D.dataset,component:`VueUiHistoryPlot`,rules:[Ee.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}=Me({config:()=>L.value.transitions,dataset:()=>D.dataset}),En=l(()=>L.value.userOptions.useCursorPointer),Dn=b(!L.value.userOptions.showOnChartHover),On=l(()=>L.value.userOptions.keepStateOnChartLeave);function kn(e=!1){L.value.userOptions.showOnChartHover&&(Dn.value=e)}T(()=>L.value.userOptions.showOnChartHover,e=>{Dn.value=!e});let{svgRef:W}=Ne({config:H.value.title});T([mn,R],()=>{D.dataset.length||he({componentName:`VueUiHistoryPlot`,type:`dataset`,debug:R.value}),mn.value.forEach((e,t)=>{e.missing.forEach(e=>he({componentName:`VueUiHistoryPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:R.value})),R.value&&(!e.missing.includes(`values`)&&!e.array&&console.warn(`VueUiHistoryPlot: dataset[${t}].values must be an array.`),e.points.forEach((e,n)=>{for(let r of[`x`,`y`])e[r]||console.warn(`VueUiHistoryPlot: dataset[${t}].values[${n}].${r} must be a finite number.`)}))})},{immediate:!0}),T([()=>L.value.responsive,()=>H.value.title.text,()=>H.value.legend.show,()=>H.value.legend.position,Jt,Yt,nn,Qt],xn,{flush:`post`});let{isPrinting:An,isImaging:jn,generatePdf:Mn,generateImage:Nn}=ke({elementId:`history_plot_${k.value}`,fileName:H.value.title.text||`vue-ui-history-plot`,options:L.value.userOptions.print}),Pn=l(()=>L.value.userOptions.show&&!H.value.title.text),Fn=l(()=>we(L.value.customPalette)),G=b({showTable:L.value.table.show,showTooltip:H.value.tooltip.show});T(()=>L.value.table.show,e=>{G.value.showTable=e}),T(()=>H.value.tooltip.show,e=>{G.value.showTooltip=e});let K=l(()=>yn.value||{width:H.value.width,height:H.value.height}),In=l(()=>K.value.width),Ln=l(()=>K.value.height),{metrics:Rn,ready:zn,settling:q,update:Bn}=Oe({svgRef:W,canMeasure:()=>!L.value.responsive||_n.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(un.value).textWidth,yAxisLabelWidth:e(cn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(ln.value).height})});function Vn(){let e=Rn.value.scaleLabelsWidth,t=Rn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Hn=l(()=>Rn.value.xAxisLabelHeight+Rn.value.timeLabelsHeight+(sn.value?Y.value.xAxisName/2:0)),J=l(()=>{let e=z.value.radius,t=H.value.padding.left+Vn()+V.value.y.name.offsetX,n=H.value.padding.top+e,r=K.value.width-H.value.padding.right-e-V.value.y.name.offsetX,i=K.value.height-H.value.padding.bottom-Hn.value-e-V.value.x.name.offsetY;return{left:t,top:n,right:r,bottom:i,width:r-t,height:i-n}}),Y=l(()=>{let e=(e,t)=>L.value.responsive&&L.value.responsiveProportionalSizing&&yn.value?xe({relator:Math.min(K.value.width,K.value.height),adjuster:600,source:e,threshold:t,fallback:t}):e;return{plots:e(z.value.radius,3),indexLabels:e(z.value.indexLabels.fontSize,6),labels:e(z.value.labels.fontSize,6),xAxisLabels:e(V.value.x.labels.fontSize,6),xAxisName:e(V.value.x.name.fontSize,6),yAxisLabels:e(V.value.y.labels.fontSize,6),yAxisName:e(V.value.y.name.fontSize,6)}}),Un=/* @__PURE__ */ new Map;function Wn(e){return Un.has(e)||Un.set(e,pe()),Un.get(e)}let Gn=/* @__PURE__ */ new Map,Kn=l(()=>{let e=/* @__PURE__ */ new Set;function t(t){return e.add(t),Wn(t)}let n=/* @__PURE__ */ new Map,r=Tn.value.map((e,r)=>{let i=e?.id==null?e?.name==null?`index:${r}`:`name:${e.name}`:`id:${typeof e.id}:${e.id}`,a=n.get(i)||0;return n.set(i,a+1),t(`${I.value?`skeleton`:`data`}:${i}:${a}`)}),i=Tn.value.map((e,n)=>{let i=/* @__PURE__ */ new Map;return(Array.isArray(e?.values)?e.values:[]).map((e,a)=>{let o=e?.id==null?e?.label?`label:${e.label}`:`index:${a}`:`id:${typeof e.id}:${e.id}`,s=i.get(o)||0;return i.set(o,s+1),t(`${r[n]}:${o}:${s}`)})});for(let t of Gn.get(I.value)||[])e.has(t)||Un.delete(t);return Gn.set(I.value,e),{series:r,plots:i}}),qn=l(()=>Kn.value.series),Jn=l(()=>Kn.value.plots),X=l(()=>qn.value.flatMap((e,t)=>A.value.includes(e)?[t]:[])),Yn=l(()=>Tn.value.map((e,t)=>{let n=Array.isArray(e.temperatureColors)&&e.temperatureColors.length?e.temperatureColors.map(e=>de(e)):void 0;return{...e,color:e.color?de(e.color):Fn.value[t]||ce[t]||ce[t%ce.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=l(()=>Yn.value.filter(e=>!X.value.includes(e.seriesIndex))),Qn=l(()=>{let e=1/0,t=-1/0,n=1/0,r=-1/0;for(let i of Zn.value)for(let a of i.values)e=Math.min(e,a.x),t=Math.max(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.y);return{minX:Math.min(0,Number.isFinite(e)?e:0),maxX:Number.isFinite(t)?t:1,minY:Math.min(0,Number.isFinite(n)?n:0),maxY:Number.isFinite(r)?r:1}});function $n(e,t,n){let r=Number.isFinite(e.scaleMin)?e.scaleMin:t,i=Number.isFinite(e.scaleMax)?e.scaleMax:n,a=Math.min(r,i),o=Math.max(r,i);return me(a===o?a-(a?Math.abs(a)*.1:0):a,a===o?o+(o?Math.abs(o)*.1:1):o,Math.max(2,e.ticks||2))}let Z=l(()=>{let e=$n(V.value.x,Qn.value.minX,Qn.value.maxX),t=$n(V.value.y,Qn.value.minY,Qn.value.maxY);return{x:e,y:t,tickX:e.ticks.map(t=>({x:J.value.left+(t-e.min)/(e.max-e.min)*J.value.width,y1:J.value.top,y2:J.value.bottom,value:t})),tickY:t.ticks.map(e=>({y:J.value.bottom-(e-t.min)/(t.max-t.min)*J.value.height,x1:J.value.left,x2:J.value.right,value:e}))}});function er(e){let t=Z.value.x.min<0?Math.abs(Z.value.x.min):Z.value.x.min>0?-Z.value.x.min:0;return J.value.left+((e||0)+t)/(Z.value.x.max+t)*J.value.width}function tr(e){let t=Z.value.y.min<0?Math.abs(Z.value.y.min):Z.value.y.min>0?-Z.value.y.min:0;return J.value.bottom-((e||0)+t)/(Z.value.y.max+t)*J.value.height}let Q=l(()=>Zn.value.map((e,t)=>{let n=e.values.map((t,n)=>({valueX:t.x,valueY:t.y,label:t.label,x:er(t.x),y:tr(t.y),color:e.color,seriesName:e.name,id:Jn.value[e.seriesIndex][n]})),r=e.smooth?fe(n):n.map(e=>`${e.x},${e.y} `).join(``).trim();return{...e,gradientIndex:t,plots:n,path:n.length?`M${r}`:``}})),nr=l(()=>{if(j.value===null||N.value===null)return Q.value;let e=Q.value.findIndex(e=>e.seriesIndex===N.value);if(e===-1)return Q.value;let t=Q.value[e];return[...Q.value.slice(0,e),...Q.value.slice(e+1),t]}),rr=l(()=>Q.value.some(e=>ir(e)));function ir(e){return Array.isArray(e?.temperatureColors)&&e.temperatureColors.length}function ar(e){return ir(e)&&e.usePlotTemperatureColors}function or(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=1/0,r=-1/0,i=1/0,a=-1/0;for(let e of t)n=Math.min(n,e.x),r=Math.max(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.y);return{minX:n,maxX:r,minY:i,maxY:a,width:r-n,height:a-i}}function sr(){let e=J.value;return{minX:e.left,maxX:e.right,minY:e.top,maxY:e.bottom,width:e.width,height:e.height}}function cr(e){return e?.temperatureIndependant?or(e):sr()}function lr(e){let t=Xn(e?.temperatureAngle)*Math.PI/180,n=Math.sin(t),r=Math.cos(t),i=cr(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}}let ur=l(()=>{let e=/* @__PURE__ */ new Map;for(let t of Q.value){if(!ir(t))continue;let n=lr(t),{x1:r,y1:i,x2:a,y2:o}=n,s=a-r,ee=o-i,te=s*s+ee*ee,ne=/* @__PURE__ */ new Map;if(ar(t))for(let e of t.plots){let n=te?Math.min(1,Math.max(0,((e.x-r)*s+(e.y-i)*ee)/te)):0;ne.set(e.id,oe({colors:t.temperatureColors,ratio:n}))}e.set(t.seriesIndex,{coordinates:n,colors:ne})}return e});function dr(e){return ur.value.get(e.seriesIndex)?.coordinates}function fr(e,t){return ur.value.get(e.seriesIndex)?.colors.get(t.id)??e.color}function pr(e,t){return`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${k.value}`}function mr(e,t,n){return ar(e)?z.value.gradient.show?`url(#${pr(e,t)})`:fr(e,t):z.value.gradient.show?`url(#gradient_${n}_${k.value})`:t.color}function hr(e,t){return ar(e)?fr(e,t):e.color}function gr(e,t){return z.value.indexLabels.adaptColorToBackground?be(hr(e,t)):z.value.indexLabels.color}function _r(e,t){let n=Q.value.find(t=>t.seriesIndex===e);return n&&ar(n)?fr(n,t):t.color}function vr(e){return ir(e)?`url(#temperature_grad_history_${e.seriesIndex}_${k.value})`:H.value.paths.useSerieColor?e.color:H.value.paths.stroke}function yr(e){return j.value===null||N.value===e?1:Math.min(1,z.value.unselectedOpacity)}function br(){X.value.length?A.value=[]:Dr.value.forEach(e=>{A.value.push(qn.value[e.seriesIndex])}),gn(`selectLegend`,Q.value)}function xr(e){X.value.includes(e)?A.value=A.value.filter(t=>t!==qn.value[e]):A.value.push(qn.value[e]),gn(`selectLegend`,Q.value)}function Sr(e){return Yn.value.length?Yn.value.find(t=>t.name===e)||(R.value&&console.warn(`VueUiHistoryPlot - Series name not found "${e}"`),null):(R.value&&console.warn(`VueUiHistoryPlot - There are no series to show.`),null)}function Cr(e){let t=Sr(e);t!==null&&X.value.includes(t.seriesIndex)&&xr(t.seriesIndex)}function wr(e){let t=Sr(e);t!==null&&(X.value.includes(t.seriesIndex)||xr(t.seriesIndex))}T(qn,e=>{I.value||(A.value=A.value.filter(t=>e.includes(t)))});let $=l(()=>Q.value.filter(e=>e.plots.length)),Tr=l(()=>{let e=/* @__PURE__ */ new Map;for(let t of Q.value)t.plots.forEach((n,r)=>e.set(n.id,{serie:t,plot:n,plotIndex:r}));return e}),Er=b(null),Dr=l(()=>Yn.value.map(e=>{let t=ir(e)?e.temperatureColors:null;return{...e,gradientColors:t,opacity:X.value.includes(e.seriesIndex)?.5:1,segregate:()=>xr(e.seriesIndex),isSegregated:X.value.includes(e.seriesIndex),shape:t?`gradient`:`circle`}})),Or=l(()=>({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 kr({datapoint:e,plotIndex:t,seriesIndex:n}){I.value||(L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),gn(`selectDatapoint`,e))}function Ar(e){tn.value=e,Xt.value+=1}let jr=b(null);function Mr({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),(fn.value!==`keyboard`||N.value!==n||P.value!==t)&&ii()}function Nr(e,t){if(vn||!W.value)return;let n=Q.value.find(t=>t.seriesIndex===e);if(!n)return;let r=n.plots[t];if(!r)return;let i=Ce(r.x,r.y,W.value);i&&(dn.value=i)}function Pr({datapoint:e,plotIndex:t,seriesIndex:n,triggerMode:r=`pointer`}){I.value||(L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),Er.value=e.id,N.value=n,P.value=t,fn.value=r,j.value=e,Fr({datapoint:e,plotIndex:t,seriesIndex:n}),$t.value=!0,r===`keyboard`&&Je(()=>{Er.value===e.id&&Nr(n,t)}))}function Fr({datapoint:e,plotIndex:t,seriesIndex:n}){let r=_r(n,e),i={...e,color:r};jr.value={datapoint:i,color:r,seriesIndex:n,plotIndex:t,config:L.value,series:Yn.value},j.value=e;let a=H.value.tooltip.customFormat;if(M.value=!1,ae(a))try{let e=a({seriesIndex:n,datapoint:i,color:r,plotIndex:t,series:Yn.value,config:L.value});typeof e==`string`&&(en.value=e,M.value=!0)}catch{console.warn(`Custom format cannot be applied.`),M.value=!1}if(!M.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="${r}"/></svg><span>${e.seriesName}</span></div>`,t+=`<div>${e.label}</div>`,t+=`<div>${V.value.x.name.text||`x`}: ${ge(V.value.x.labels.formatter,e.valueX,re({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`}: ${ge(V.value.y.labels.formatter,e.valueY,re({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))}</div>`,en.value=`<div>${t}</div>`}}T([Q,()=>H.value.tooltip,I],()=>{if(!Er.value)return;let e=Tr.value.get(Er.value);if(!e||I.value){ii();return}let{plot:t,serie:n,plotIndex:r}=e;j.value=t,N.value=n.seriesIndex,P.value=r,Fr({datapoint:t,seriesIndex:n.seriesIndex,plotIndex:r}),fn.value===`keyboard`&&Nr(n.seriesIndex,r)},{flush:`post`});let Ir=l(()=>{let e=[L.value.table.columnNames.series,L.value.table.columnNames.datapoint,L.value.table.columnNames.x,L.value.table.columnNames.y];return{head:e,body:Q.value.flatMap(e=>e.plots.map(e=>[{color:e.color,name:e.seriesName},e.label,ge(V.value.x.labels.formatter,e.valueX,re({p:V.value.x.labels.prefix,v:e.valueX,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding})),ge(V.value.y.labels.formatter,e.valueY,re({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))])),config:{th:{backgroundColor:L.value.table.th.backgroundColor,color:L.value.table.th.color,outline:L.value.table.th.outline},td:{backgroundColor:L.value.table.td.backgroundColor,color:L.value.table.td.color,outline:L.value.table.td.outline},breakpoint:L.value.table.responsiveBreakpoint},colNames:e}});function Lr(e=null){Je(()=>{let t=[[L.value.table.columnNames.series],[L.value.table.columnNames.datapoint],[L.value.table.columnNames.x],[L.value.table.columnNames.y]],n=Q.value.flatMap(e=>e.plots.map(e=>[[e.seriesName],[e.label],[e.valueX],[e.valueY]])),r=[[H.value.title.text],[H.value.title.subtitle.text],t].concat(n),i=ie(r);e?e(i):ve({csvContent:i,title:H.value.title.text||`vue-ui-history-plot`})})}let Rr=b(!1);function zr(){Rr.value=!Rr.value}function Br(){G.value.showTable=!G.value.showTable}function Vr(){G.value.showTooltip=!G.value.showTooltip}function Hr(){return Q.value}let Ur=te(O,()=>H.value.title.text),Wr=l(()=>Z.value.tickX),Gr=l(()=>({start:0,end:Z.value.tickX.length}));Pe({timeLabelsEls:ln,timeLabels:Wr,slicer:Gr,configRef:L,rotationPath:[`style`,`chart`,`axes`,`x`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`axes`,`x`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:In,height:Ln,targetClass:`.vue-ui-history-plot-x-axis-scale`,rotation:V.value.x.labels.autoRotate.angle});let Kr=l(()=>ee({config:L,style:H,mutableConfig:G,dialog:Kt,accordion:Vt,isFullscreen:tn,parent:O,maxWidth:800}));T([()=>G.value.showTable,an],([e])=>{an.value&&s(e,L,an)},{flush:`post`});function qr(){G.value.showTable=!1,on.value&&on.value.setTableIconState(!1)}let Jr=l(()=>H.value.backgroundColor),Yr=l(()=>H.value.legend),Xr=l(()=>H.value.title),{isCallbackImaging:Zr,isCallbackSvg:Qr,generateSvg:$r,onGenerateImage:ei}=je({svg:W,title:Xr,legend:Yr,legendItems:Dr,backgroundColor:Jr,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:Nn});async function ti(){gn(`copyAlt`,{config:L.value,dataset:Q.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:Q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ni=l(()=>({head:Ir.value.head,body:Ir.value.body.map(e=>[e[0]?.name||``,e[1],e[2],e[3]]),caption:L.value.a11y.translations.tableCaption,notice:L.value.a11y.translations.tableAvailable}));function ri(e){return $.value.findIndex(t=>t.seriesIndex===e)}function ii(e=!1){e&&j.value&&L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:{...j.value,plotIndex:P.value,seriesIndex:N.value},seriesIndex:N.value}),Er.value=null,N.value=null,P.value=null,fn.value=`pointer`,$t.value=!1,j.value=null,jr.value=null,en.value=``,M.value=!1}function ai(){ii(!0)}function oi(){ii(),pn.value=!0}function si(){ai(),pn.value=!1}function ci(e,t){if(!e?.plots?.length)return null;let n=e.plots.length;return(t%n+n)%n}function li({seriesIndex:e,plotIndex:t,direction:n}){if(!$.value.length)return null;let r=ri(e);if(r===-1)return null;if(n===`up`||n===`down`){let e=$.value[r];if(!e?.plots?.length)return null;let i=ci(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 ui(e){if(!W.value||Rr.value||I.value||document.activeElement!==W.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){ai();return}if(a){if(N.value===null||P.value===null)return;let e=$.value.find(e=>e.seriesIndex===N.value)?.plots?.[P.value];if(!e)return;kr({datapoint:e,plotIndex:P.value,seriesIndex:N.value});return}let s=null;if(N.value===null||P.value===null){let e=$.value[0];if(!e?.plots?.length)return;s={seriesIndex:e.seriesIndex,plotIndex:0}}else r?s=li({seriesIndex:N.value,plotIndex:P.value,direction:`up`}):i?s=li({seriesIndex:N.value,plotIndex:P.value,direction:`down`}):t?s=li({seriesIndex:N.value,plotIndex:P.value,direction:`left`}):n&&(s=li({seriesIndex:N.value,plotIndex:P.value,direction:`right`}));if(!s)return;let ee=$.value.find(e=>e.seriesIndex===s.seriesIndex)?.plots?.[s.plotIndex];ee&&Pr({datapoint:ee,plotIndex:s.plotIndex,seriesIndex:s.seriesIndex,triggerMode:`keyboard`})}return He({getData:Hr,getImage:Ur,generatePdf:Mn,generateCsv:Lr,generateImage:Nn,generateSvg:$r,hideSeries:wr,showSeries:Cr,toggleTable:Br,toggleTooltip:Vr,toggleAnnotator:zr,toggleFullscreen:Ar,copyAlt:ti}),T(()=>[K.value,Y.value,V.value,H.value,L.value.style.fontFamily,D.dataset,_n.value,un.value,ln.value,sn.value,cn.value],Bn,{flush:`post`,deep:!0}),(e,s)=>(y(),f(`div`,{id:`history_plot_${k.value}`,ref_key:`historyPlotChart`,ref:O,class:g({"vue-data-ui-component":!0,"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":tn.value}),style:v(`background:${H.value.backgroundColor};color:${H.value.color};font-family:${L.value.style.fontFamily}; position: relative; ${L.value.responsive?`height: 100%`:``}`),onMouseenter:s[2]||=()=>kn(!0),onMouseleave:s[3]||=()=>kn(!1)},[p(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[p(`p`,null,C(L.value.a11y.translations.keyboardNavigation),1)],8,nt),L.value.a11y.includeTable&&ni.value.body.length?(y(),u(ze,{key:0,uid:k.value,head:ni.value.head,body:ni.value.body,caption:ni.value.caption,notice:ni.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):d(``,!0),S(e.$slots,`userConfig`,{},void 0,!0),L.value.userOptions.buttons.annotator?(y(),u(w(Ut),qe({key:1},w(a)(L.value.userOptions.annotator),{svgRef:w(W),backgroundColor:H.value.backgroundColor,color:H.value.color,active:Rr.value,isCursorPointer:En.value,palette:L.value.userOptions.annotatorPalette,onClose:zr}),We({_:2},[x(w(o),t=>({name:t,fn:E(n=>[S(e.$slots,t,_(h(w(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),Pn.value?(y(),f(`div`,{key:2,ref_key:`noTitle`,ref:Qt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),H.value.title.text?(y(),f(`div`,{key:3,ref_key:`chartTitle`,ref:Jt,class:`vue-ui-xy-title`,style:v(`font-family:${L.value.style.fontFamily}`)},[Ke(Fe,{config:{title:{cy:`history-plot-div-title`,...H.value.title},subtitle:{cy:`history-plot-div-subtitle`,...H.value.title.subtitle}}},null,8,[`config`])],4)):d(``,!0),p(`div`,{id:`legend-top-${k.value}`},null,8,rt),L.value.userOptions.show&&hn.value&&(On.value||Dn.value)?(y(),u(w(Wt),qe({ref_key:`userOptionsRef`,ref:on,key:`user_option_${Xt.value}`,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:w(An),isImaging:w(jn),uid:k.value,hasTooltip:H.value.tooltip.show&&L.value.userOptions.buttons.tooltip,hasLabel:!1,isFullscreen:tn.value,chartElement:O.value},w(n)(L.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:G.value.showTooltip,isAnnotation:Rr.value,tableDialog:L.value.table.useDialog,isCursorPointer:En.value,onToggleFullscreen:Ar,onGeneratePdf:w(Mn),onGenerateCsv:Lr,onGenerateImage:w(ei),onGenerateSvg:w($r),onToggleTable:Br,onToggleTooltip:Vr,onToggleAnnotator:zr,onCopyAlt:ti,style:{visibility:On.value?Dn.value?`visible`:`hidden`:`visible`}}),We({_:2},[x(w(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[S(e.$slots,t,_(h(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isFullscreen`,`chartElement`,`isTooltip`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),p(`div`,it,[(y(),f(`svg`,{ref_key:`svgRef`,ref:W,xmlns:w(Se),viewBox:`0 0 ${K.value.width<0?.1:K.value.width} ${K.value.height<0?.1:K.value.height}`,style:v(`max-width:100%;overflow:visible;background:transparent;color:${H.value.color};visibility:${w(zn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${k.value}`,tabindex:`0`,onFocus:oi,onBlur:si,onKeydown:ui},[Ke(w(Gt)),S(e.$slots,`svg-underlayer`,{svg:{...K.value,drawingArea:J.value,isPrintingImg:w(An)||w(jn)||w(Zr),isPrintingSvg:w(Qr)}},void 0,!0),e.$slots[`chart-background`]?(y(),f(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:J.value.width<=0?10:J.value.width,height:J.value.height<=0?10:J.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):d(``,!0),z.value.gradient.show||rr.value?(y(),f(`defs`,st,[z.value.gradient.show?(y(!0),f(c,{key:0},x(Q.value,(e,t)=>(y(),u(Ve,{t:`radial`,key:`gradient_${t}_${k.value}`,id:`gradient_${t}_${k.value}`,fy:`30%`,stops:[[`10%`,w(se)(e.color,z.value.gradient.intensity/100),1],[`90%`,w(ue)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)):d(``,!0),(y(!0),f(c,null,x(Q.value,e=>(y(),f(c,{key:`temperature_grad_history_template_${e.seriesIndex}_${k.value}`},[z.value.gradient.show&&ar(e)?(y(!0),f(c,{key:0},x(e.plots,t=>(y(),u(Ve,{t:`radial`,key:`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${k.value}`,id:pr(e,t),fy:`30%`,stops:[[`10%`,w(se)(fr(e,t),z.value.gradient.intensity/100),1],[`90%`,w(ue)(fr(e,t),.1),1],[`100%`,fr(e,t),1]]},null,8,[`id`,`stops`]))),128)):d(``,!0),ir(e)?(y(),f(`linearGradient`,{key:1,id:`temperature_grad_history_${e.seriesIndex}_${k.value}`,gradientUnits:`userSpaceOnUse`,x1:dr(e).x1,y1:dr(e).y1,x2:dr(e).x2,y2:dr(e).y2},[(y(!0),f(c,null,x(e.temperatureColors,(t,n)=>(y(),f(`stop`,{key:`temperature_grad_history_stop_${e.seriesIndex}_${n}_${k.value}`,"stop-color":t,offset:e.temperatureColors.length===1?`0%`:w(ye)(n,e.temperatureColors.length)},null,8,lt))),128))],8,ct)):d(``,!0)],64))),128))])):d(``,!0),B.value.verticalLines.show?(y(),f(`g`,ut,[(y(!0),f(c,null,x(Z.value.tickX,e=>(y(),f(`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,dt))),256))])):d(``,!0),V.value.y.labels.show?(y(),f(`g`,ft,[(y(!0),f(c,null,x(Z.value.tickY,e=>(y(),f(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:J.value.left-5,x2:J.value.left,y1:e.y,y2:e.y},null,8,pt))),256))])):d(``,!0),V.value.y.labels.show?(y(),f(`g`,{key:4,ref_key:`yAxisScales`,ref:un},[(y(!0),f(c,null,x(Z.value.tickY,e=>(y(),f(`text`,{x:J.value.left+V.value.y.labels.offsetX-4-z.value.radius,y:e.y+Y.value.yAxisLabels/3,fill:V.value.y.labels.color,"font-size":Y.value.yAxisLabels,"text-anchor":`end`},C(w(ge)(V.value.y.labels.formatter,e.value,w(re)({p:V.value.y.labels.prefix,v:e.value,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))),9,mt))),256))],512)):d(``,!0),V.value.y.name.text?(y(),f(`text`,{key:5,ref_key:`yAxisLabel`,ref:cn,transform:`translate(${Y.value.yAxisName}, ${K.value.height/2+V.value.y.name.offsetY}), rotate(-90)`,"font-size":Y.value.yAxisName,fill:V.value.y.name.color,"font-weight":V.value.y.name.bold?`bold`:`normal`,"text-anchor":`middle`},C(V.value.y.name.text),9,ht)):d(``,!0),B.value.horizontalLines.show?(y(),f(`g`,gt,[(y(!0),f(c,null,x(Z.value.tickY,e=>(y(),f(`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,_t))),256))])):d(``,!0),V.value.x.labels.show?(y(),f(`g`,vt,[(y(!0),f(c,null,x(Z.value.tickX,e=>(y(),f(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:e.x,x2:e.x,y1:J.value.bottom,y2:J.value.bottom+5},null,8,yt))),256))])):d(``,!0),V.value.x.labels.show?(y(),f(`g`,{key:8,ref_key:`xAxisScales`,ref:ln},[(y(!0),f(c,null,x(Z.value.tickX,e=>(y(),f(`text`,{class:`vue-ui-history-plot-x-axis-scale`,transform:`translate(${e.x}, ${J.value.bottom+V.value.x.labels.offsetY+Y.value.xAxisLabels+z.value.radius}), rotate(${V.value.x.labels.rotation})`,fill:V.value.x.labels.color,"font-size":Y.value.xAxisLabels,"text-anchor":V.value.x.labels.rotation>0?`start`:V.value.x.labels.rotation<0?`end`:`middle`},C(w(ge)(V.value.x.labels.formatter,e.value,w(re)({p:V.value.x.labels.prefix,v:e.value,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding}))),9,bt))),256))],512)):d(``,!0),V.value.x.name.text?(y(),f(`text`,{key:9,ref_key:`xAxisLabel`,ref:sn,x:K.value.width/2+V.value.x.name.offsetX,y:K.value.height,"font-size":Y.value.xAxisName,fill:V.value.x.name.color,"font-weight":V.value.x.name.bold?`bold`:`normal`,"text-anchor":`middle`},C(V.value.x.name.text),9,xt)):d(``,!0),B.value.xAxis.show?(y(),f(`line`,{key:10,x1:J.value.left,x2:J.value.left+J.value.width,y1:J.value.bottom,y2:J.value.bottom,stroke:B.value.xAxis.stroke,"stroke-width":B.value.xAxis.strokeWidth,"stroke-linecap":`round`},null,8,St)):d(``,!0),B.value.yAxis.show?(y(),f(`line`,{key:11,x1:J.value.left,x2:J.value.left,y1:J.value.top,y2:J.value.bottom,stroke:B.value.yAxis.stroke,"stroke-width":B.value.yAxis.strokeWidth,"stroke-linecap":`round`},null,8,Ct)):d(``,!0),(y(!0),f(c,null,x(nr.value,e=>(y(),f(`g`,{key:`history_plot_serie_${e.seriesIndex}_${k.value}`},[H.value.paths.show?(y(),f(`g`,{key:0,style:v({opacity:yr(e.seriesIndex)})},[p(`path`,{class:g({"vue-data-ui-transition":w(U)&&!w(q)}),d:e.path,stroke:H.value.backgroundColor,"stroke-width":H.value.paths.strokeWidth+4,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,wt),p(`path`,{class:g({"vue-data-ui-transition":w(U)&&!w(q)}),d:e.path,stroke:vr(e),"stroke-width":H.value.paths.strokeWidth,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Tt)],4)):d(``,!0),(y(!0),f(c,null,x(e.plots,e=>(y(),f(`circle`,{cx:e.x,cy:e.y,fill:H.value.backgroundColor,r:Y.value.plots,stroke:`none`,class:g({"vue-data-ui-transition":w(U)&&!w(q)})},null,10,Et))),256)),(y(!0),f(c,null,x(e.plots,t=>(y(),f(`circle`,{cx:t.x,cy:t.y,fill:mr(e,t,e.gradientIndex),r:Y.value.plots,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,class:g({"vue-data-ui-transition":w(U)&&!w(q)}),style:v({opacity:yr(e.seriesIndex)})},null,14,Dt))),256)),z.value.labels.show?(y(),f(`g`,Ot,[(y(!0),f(c,null,x(e.plots,(t,n)=>(y(),f(`g`,{key:`plab_${n}`},[String(t.label).includes(`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as re,D as ie,Dt as ae,Et as oe,Ft as se,Ht as ce,J as le,Q as ue,S as de,T as fe,X as pe,_ as me,at as he,i as ge,in as _e,nt as ve,qt as ye,r as be,rn as xe,t as Se,tn as Ce,w as we}from"./lib-rPeBMZrn.js";import{n as Te,t as Ee}from"./useHints-C-TwxM0Y.js";import{t as De}from"./useConfig-CXhXxWjB.js";import{t as Oe}from"./useSvgLabelLayout-42Kats14.js";import{t as ke}from"./usePrinter-DVf3YcG5.js";import{t as Ae}from"./useResponsive-CENUxfEL.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{t as Me}from"./useTransitions-ChGGrtrv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./useTimeLabelCollider-BTybMUFi.js";import{n as Fe}from"./Title-BliHuXfT.js";import{t as Ie}from"./vue_ui_history_plot-BZ5TtPPB.js";import{t as Le}from"./Legend-W9YVYVX-.js";import{t as Re}from"./BaseScanner-m6QR9rwD.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ve}from"./DefGrad-DKMq1REY.js";import{t as He}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,Teleport as Ue,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as qe,nextTick as Je,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Ye,onMounted as Xe,openBlock as y,reactive as Ze,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Qe,shallowRef as $e,toDisplayString as C,unref as w,watch as T,withCtx as E}from"vue";var et=/* @__PURE__ */ e({default:()=>zt}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`viewBox`,`aria-describedby`],ot=[`x`,`y`,`width`,`height`],st={key:1},ct=[`id`,`x1`,`y1`,`x2`,`y2`],lt=[`stop-color`,`offset`],ut={key:2},dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft={key:3},pt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],mt=[`x`,`y`,`fill`,`font-size`],ht=[`transform`,`font-size`,`fill`,`font-weight`],gt={key:6},_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vt={key:7},yt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],bt=[`transform`,`fill`,`font-size`,`text-anchor`],xt=[`x`,`y`,`font-size`,`fill`,`font-weight`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt=[`d`,`stroke`,`stroke-width`],Tt=[`d`,`stroke`,`stroke-width`],Et=[`cx`,`cy`,`fill`,`r`],Dt=[`cx`,`cy`,`fill`,`r`,`stroke`,`stroke-width`],Ot={key:1},kt=[`transform`,`font-size`,`fill`,`font-weight`],At=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],jt={key:2},Mt=[`transform`,`font-size`,`font-weight`,`fill`],Nt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],Pt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ft={key:5,class:`vue-data-ui-watermark`},It=[`id`],Lt=[`onClick`],Rt={style:{display:`flex`,"align-items":`center`}},zt=/*#__PURE__*/ He({__name:`vue-ui-history-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:He,emit:et}){let zt=m(()=>import(`./Tooltip-B432XpvC.js`)),Bt=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Vt=m(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Ht=m(()=>import(`./DataTable-KeuZB1JM.js`)),Ut=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Wt=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Gt=m(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),Kt=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_history_plot:qt}=De(),D=e,O=b(null),Jt=b(null),Yt=b(null),Xt=b(0),Zt=$e(null),Qt=b(null),k=b(pe()),$t=b(!1),en=b(``),A=b([]),tn=b(!1),j=b(null),M=b(!1),nn=b(null),rn=b(!1),an=b(null),on=b(null),sn=b(null),cn=b(null),ln=b(null),un=b(null),N=b(null),P=b(null),dn=b({x:0,y:0}),fn=b(`pointer`),pn=b(!1),mn=l(()=>Array.from(D.dataset,e=>{let t=e&&typeof e==`object`?Object.keys(e):[],n=[`name`,`values`].filter(e=>!t.includes(e)),r=Array.isArray(e?.values),i=r?Array.from(e.values,e=>({x:Number.isFinite(e?.x),y:Number.isFinite(e?.y)})):[];return{missing:n,array:r,points:i,valid:!n.length&&r&&i.every(e=>e.x&&e.y)}})),hn=l(()=>D.dataset.length>0&&mn.value.every(e=>e.valid)),gn=et,_n=b(!1),F=null,vn=!1,yn=$e(null);function bn(){Zt.value?.disconnect(),Zt.value=null,F!==null&&cancelAnimationFrame(F),F=null}function xn(){if(bn(),yn.value=null,_n.value=!1,!L.value.responsive||!O.value?.parentNode)return;let e=new ResizeObserver(t);function t(){vn||Zt.value!==e||(F!==null&&cancelAnimationFrame(F),F=requestAnimationFrame(()=>{if(vn||Zt.value!==e)return;F=null;let{width:t,height:n}=Ae({chart:O.value,title:H.value.title.text?Jt.value:null,noTitle:Qt.value,legend:H.value.legend.show?Yt.value:null,source:nn.value});yn.value={width:Math.max(.1,t),height:Math.max(.1,n)},_n.value=!0}))}Zt.value=e,e.observe(O.value.parentNode);for(let t of[Jt.value,Yt.value,nn.value,Qt.value])t&&e.observe(t);t()}Xe(()=>{rn.value=!0,xn()}),Ye(()=>{vn=!0,bn()});function Sn(){return ne(D.config,qt,Ie)}let Cn=l(()=>Ze(Sn())),I=l(()=>!!D.config.loading||!hn.value),wn=l(()=>_e({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:Cn.value.skeletonConfig??{}})),L=l(()=>I.value?Ze(_e({defaultConfig:Cn.value,userConfig:wn.value})):Cn.value),Tn=l(()=>I.value?D.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}]}]:D.dataset),R=l(()=>Cn.value.debug),z=l(()=>L.value.style.chart.plots),B=l(()=>L.value.style.chart.grid),V=l(()=>L.value.style.chart.axes),H=l(()=>L.value.style.chart);Te({config:()=>L.value,dataset:()=>D.dataset,component:`VueUiHistoryPlot`,rules:[Ee.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}=Me({config:()=>L.value.transitions,dataset:()=>D.dataset}),En=l(()=>L.value.userOptions.useCursorPointer),Dn=b(!L.value.userOptions.showOnChartHover),On=l(()=>L.value.userOptions.keepStateOnChartLeave);function kn(e=!1){L.value.userOptions.showOnChartHover&&(Dn.value=e)}T(()=>L.value.userOptions.showOnChartHover,e=>{Dn.value=!e});let{svgRef:W}=Ne({config:H.value.title});T([mn,R],()=>{D.dataset.length||he({componentName:`VueUiHistoryPlot`,type:`dataset`,debug:R.value}),mn.value.forEach((e,t)=>{e.missing.forEach(e=>he({componentName:`VueUiHistoryPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:R.value})),R.value&&(!e.missing.includes(`values`)&&!e.array&&console.warn(`VueUiHistoryPlot: dataset[${t}].values must be an array.`),e.points.forEach((e,n)=>{for(let r of[`x`,`y`])e[r]||console.warn(`VueUiHistoryPlot: dataset[${t}].values[${n}].${r} must be a finite number.`)}))})},{immediate:!0}),T([()=>L.value.responsive,()=>H.value.title.text,()=>H.value.legend.show,()=>H.value.legend.position,Jt,Yt,nn,Qt],xn,{flush:`post`});let{isPrinting:An,isImaging:jn,generatePdf:Mn,generateImage:Nn}=ke({elementId:`history_plot_${k.value}`,fileName:H.value.title.text||`vue-ui-history-plot`,options:L.value.userOptions.print}),Pn=l(()=>L.value.userOptions.show&&!H.value.title.text),Fn=l(()=>we(L.value.customPalette)),G=b({showTable:L.value.table.show,showTooltip:H.value.tooltip.show});T(()=>L.value.table.show,e=>{G.value.showTable=e}),T(()=>H.value.tooltip.show,e=>{G.value.showTooltip=e});let K=l(()=>yn.value||{width:H.value.width,height:H.value.height}),In=l(()=>K.value.width),Ln=l(()=>K.value.height),{metrics:Rn,ready:zn,settling:q,update:Bn}=Oe({svgRef:W,canMeasure:()=>!L.value.responsive||_n.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(un.value).textWidth,yAxisLabelWidth:e(cn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(ln.value).height})});function Vn(){let e=Rn.value.scaleLabelsWidth,t=Rn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Hn=l(()=>Rn.value.xAxisLabelHeight+Rn.value.timeLabelsHeight+(sn.value?Y.value.xAxisName/2:0)),J=l(()=>{let e=z.value.radius,t=H.value.padding.left+Vn()+V.value.y.name.offsetX,n=H.value.padding.top+e,r=K.value.width-H.value.padding.right-e-V.value.y.name.offsetX,i=K.value.height-H.value.padding.bottom-Hn.value-e-V.value.x.name.offsetY;return{left:t,top:n,right:r,bottom:i,width:r-t,height:i-n}}),Y=l(()=>{let e=(e,t)=>L.value.responsive&&L.value.responsiveProportionalSizing&&yn.value?xe({relator:Math.min(K.value.width,K.value.height),adjuster:600,source:e,threshold:t,fallback:t}):e;return{plots:e(z.value.radius,3),indexLabels:e(z.value.indexLabels.fontSize,6),labels:e(z.value.labels.fontSize,6),xAxisLabels:e(V.value.x.labels.fontSize,6),xAxisName:e(V.value.x.name.fontSize,6),yAxisLabels:e(V.value.y.labels.fontSize,6),yAxisName:e(V.value.y.name.fontSize,6)}}),Un=/* @__PURE__ */ new Map;function Wn(e){return Un.has(e)||Un.set(e,pe()),Un.get(e)}let Gn=/* @__PURE__ */ new Map,Kn=l(()=>{let e=/* @__PURE__ */ new Set;function t(t){return e.add(t),Wn(t)}let n=/* @__PURE__ */ new Map,r=Tn.value.map((e,r)=>{let i=e?.id==null?e?.name==null?`index:${r}`:`name:${e.name}`:`id:${typeof e.id}:${e.id}`,a=n.get(i)||0;return n.set(i,a+1),t(`${I.value?`skeleton`:`data`}:${i}:${a}`)}),i=Tn.value.map((e,n)=>{let i=/* @__PURE__ */ new Map;return(Array.isArray(e?.values)?e.values:[]).map((e,a)=>{let o=e?.id==null?e?.label?`label:${e.label}`:`index:${a}`:`id:${typeof e.id}:${e.id}`,s=i.get(o)||0;return i.set(o,s+1),t(`${r[n]}:${o}:${s}`)})});for(let t of Gn.get(I.value)||[])e.has(t)||Un.delete(t);return Gn.set(I.value,e),{series:r,plots:i}}),qn=l(()=>Kn.value.series),Jn=l(()=>Kn.value.plots),X=l(()=>qn.value.flatMap((e,t)=>A.value.includes(e)?[t]:[])),Yn=l(()=>Tn.value.map((e,t)=>{let n=Array.isArray(e.temperatureColors)&&e.temperatureColors.length?e.temperatureColors.map(e=>de(e)):void 0;return{...e,color:e.color?de(e.color):Fn.value[t]||ce[t]||ce[t%ce.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=l(()=>Yn.value.filter(e=>!X.value.includes(e.seriesIndex))),Qn=l(()=>{let e=1/0,t=-1/0,n=1/0,r=-1/0;for(let i of Zn.value)for(let a of i.values)e=Math.min(e,a.x),t=Math.max(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.y);return{minX:Math.min(0,Number.isFinite(e)?e:0),maxX:Number.isFinite(t)?t:1,minY:Math.min(0,Number.isFinite(n)?n:0),maxY:Number.isFinite(r)?r:1}});function $n(e,t,n){let r=Number.isFinite(e.scaleMin)?e.scaleMin:t,i=Number.isFinite(e.scaleMax)?e.scaleMax:n,a=Math.min(r,i),o=Math.max(r,i);return me(a===o?a-(a?Math.abs(a)*.1:0):a,a===o?o+(o?Math.abs(o)*.1:1):o,Math.max(2,e.ticks||2))}let Z=l(()=>{let e=$n(V.value.x,Qn.value.minX,Qn.value.maxX),t=$n(V.value.y,Qn.value.minY,Qn.value.maxY);return{x:e,y:t,tickX:e.ticks.map(t=>({x:J.value.left+(t-e.min)/(e.max-e.min)*J.value.width,y1:J.value.top,y2:J.value.bottom,value:t})),tickY:t.ticks.map(e=>({y:J.value.bottom-(e-t.min)/(t.max-t.min)*J.value.height,x1:J.value.left,x2:J.value.right,value:e}))}});function er(e){let t=Z.value.x.min<0?Math.abs(Z.value.x.min):Z.value.x.min>0?-Z.value.x.min:0;return J.value.left+((e||0)+t)/(Z.value.x.max+t)*J.value.width}function tr(e){let t=Z.value.y.min<0?Math.abs(Z.value.y.min):Z.value.y.min>0?-Z.value.y.min:0;return J.value.bottom-((e||0)+t)/(Z.value.y.max+t)*J.value.height}let Q=l(()=>Zn.value.map((e,t)=>{let n=e.values.map((t,n)=>({valueX:t.x,valueY:t.y,label:t.label,x:er(t.x),y:tr(t.y),color:e.color,seriesName:e.name,id:Jn.value[e.seriesIndex][n]})),r=e.smooth?fe(n):n.map(e=>`${e.x},${e.y} `).join(``).trim();return{...e,gradientIndex:t,plots:n,path:n.length?`M${r}`:``}})),nr=l(()=>{if(j.value===null||N.value===null)return Q.value;let e=Q.value.findIndex(e=>e.seriesIndex===N.value);if(e===-1)return Q.value;let t=Q.value[e];return[...Q.value.slice(0,e),...Q.value.slice(e+1),t]}),rr=l(()=>Q.value.some(e=>ir(e)));function ir(e){return Array.isArray(e?.temperatureColors)&&e.temperatureColors.length}function ar(e){return ir(e)&&e.usePlotTemperatureColors}function or(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=1/0,r=-1/0,i=1/0,a=-1/0;for(let e of t)n=Math.min(n,e.x),r=Math.max(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.y);return{minX:n,maxX:r,minY:i,maxY:a,width:r-n,height:a-i}}function sr(){let e=J.value;return{minX:e.left,maxX:e.right,minY:e.top,maxY:e.bottom,width:e.width,height:e.height}}function cr(e){return e?.temperatureIndependant?or(e):sr()}function lr(e){let t=Xn(e?.temperatureAngle)*Math.PI/180,n=Math.sin(t),r=Math.cos(t),i=cr(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}}let ur=l(()=>{let e=/* @__PURE__ */ new Map;for(let t of Q.value){if(!ir(t))continue;let n=lr(t),{x1:r,y1:i,x2:a,y2:o}=n,s=a-r,ee=o-i,te=s*s+ee*ee,ne=/* @__PURE__ */ new Map;if(ar(t))for(let e of t.plots){let n=te?Math.min(1,Math.max(0,((e.x-r)*s+(e.y-i)*ee)/te)):0;ne.set(e.id,oe({colors:t.temperatureColors,ratio:n}))}e.set(t.seriesIndex,{coordinates:n,colors:ne})}return e});function dr(e){return ur.value.get(e.seriesIndex)?.coordinates}function fr(e,t){return ur.value.get(e.seriesIndex)?.colors.get(t.id)??e.color}function pr(e,t){return`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${k.value}`}function mr(e,t,n){return ar(e)?z.value.gradient.show?`url(#${pr(e,t)})`:fr(e,t):z.value.gradient.show?`url(#gradient_${n}_${k.value})`:t.color}function hr(e,t){return ar(e)?fr(e,t):e.color}function gr(e,t){return z.value.indexLabels.adaptColorToBackground?be(hr(e,t)):z.value.indexLabels.color}function _r(e,t){let n=Q.value.find(t=>t.seriesIndex===e);return n&&ar(n)?fr(n,t):t.color}function vr(e){return ir(e)?`url(#temperature_grad_history_${e.seriesIndex}_${k.value})`:H.value.paths.useSerieColor?e.color:H.value.paths.stroke}function yr(e){return j.value===null||N.value===e?1:Math.min(1,z.value.unselectedOpacity)}function br(){X.value.length?A.value=[]:Dr.value.forEach(e=>{A.value.push(qn.value[e.seriesIndex])}),gn(`selectLegend`,Q.value)}function xr(e){X.value.includes(e)?A.value=A.value.filter(t=>t!==qn.value[e]):A.value.push(qn.value[e]),gn(`selectLegend`,Q.value)}function Sr(e){return Yn.value.length?Yn.value.find(t=>t.name===e)||(R.value&&console.warn(`VueUiHistoryPlot - Series name not found "${e}"`),null):(R.value&&console.warn(`VueUiHistoryPlot - There are no series to show.`),null)}function Cr(e){let t=Sr(e);t!==null&&X.value.includes(t.seriesIndex)&&xr(t.seriesIndex)}function wr(e){let t=Sr(e);t!==null&&(X.value.includes(t.seriesIndex)||xr(t.seriesIndex))}T(qn,e=>{I.value||(A.value=A.value.filter(t=>e.includes(t)))});let $=l(()=>Q.value.filter(e=>e.plots.length)),Tr=l(()=>{let e=/* @__PURE__ */ new Map;for(let t of Q.value)t.plots.forEach((n,r)=>e.set(n.id,{serie:t,plot:n,plotIndex:r}));return e}),Er=b(null),Dr=l(()=>Yn.value.map(e=>{let t=ir(e)?e.temperatureColors:null;return{...e,gradientColors:t,opacity:X.value.includes(e.seriesIndex)?.5:1,segregate:()=>xr(e.seriesIndex),isSegregated:X.value.includes(e.seriesIndex),shape:t?`gradient`:`circle`}})),Or=l(()=>({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 kr({datapoint:e,plotIndex:t,seriesIndex:n}){I.value||(L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),gn(`selectDatapoint`,e))}function Ar(e){tn.value=e,Xt.value+=1}let jr=b(null);function Mr({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),(fn.value!==`keyboard`||N.value!==n||P.value!==t)&&ii()}function Nr(e,t){if(vn||!W.value)return;let n=Q.value.find(t=>t.seriesIndex===e);if(!n)return;let r=n.plots[t];if(!r)return;let i=Ce(r.x,r.y,W.value);i&&(dn.value=i)}function Pr({datapoint:e,plotIndex:t,seriesIndex:n,triggerMode:r=`pointer`}){I.value||(L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),Er.value=e.id,N.value=n,P.value=t,fn.value=r,j.value=e,Fr({datapoint:e,plotIndex:t,seriesIndex:n}),$t.value=!0,r===`keyboard`&&Je(()=>{Er.value===e.id&&Nr(n,t)}))}function Fr({datapoint:e,plotIndex:t,seriesIndex:n}){let r=_r(n,e),i={...e,color:r};jr.value={datapoint:i,color:r,seriesIndex:n,plotIndex:t,config:L.value,series:Yn.value},j.value=e;let a=H.value.tooltip.customFormat;if(M.value=!1,ae(a))try{let e=a({seriesIndex:n,datapoint:i,color:r,plotIndex:t,series:Yn.value,config:L.value});typeof e==`string`&&(en.value=e,M.value=!0)}catch{console.warn(`Custom format cannot be applied.`),M.value=!1}if(!M.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="${r}"/></svg><span>${e.seriesName}</span></div>`,t+=`<div>${e.label}</div>`,t+=`<div>${V.value.x.name.text||`x`}: ${ge(V.value.x.labels.formatter,e.valueX,re({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`}: ${ge(V.value.y.labels.formatter,e.valueY,re({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))}</div>`,en.value=`<div>${t}</div>`}}T([Q,()=>H.value.tooltip,I],()=>{if(!Er.value)return;let e=Tr.value.get(Er.value);if(!e||I.value){ii();return}let{plot:t,serie:n,plotIndex:r}=e;j.value=t,N.value=n.seriesIndex,P.value=r,Fr({datapoint:t,seriesIndex:n.seriesIndex,plotIndex:r}),fn.value===`keyboard`&&Nr(n.seriesIndex,r)},{flush:`post`});let Ir=l(()=>{let e=[L.value.table.columnNames.series,L.value.table.columnNames.datapoint,L.value.table.columnNames.x,L.value.table.columnNames.y];return{head:e,body:Q.value.flatMap(e=>e.plots.map(e=>[{color:e.color,name:e.seriesName},e.label,ge(V.value.x.labels.formatter,e.valueX,re({p:V.value.x.labels.prefix,v:e.valueX,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding})),ge(V.value.y.labels.formatter,e.valueY,re({p:V.value.y.labels.prefix,v:e.valueY,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))])),config:{th:{backgroundColor:L.value.table.th.backgroundColor,color:L.value.table.th.color,outline:L.value.table.th.outline},td:{backgroundColor:L.value.table.td.backgroundColor,color:L.value.table.td.color,outline:L.value.table.td.outline},breakpoint:L.value.table.responsiveBreakpoint},colNames:e}});function Lr(e=null){Je(()=>{let t=[[L.value.table.columnNames.series],[L.value.table.columnNames.datapoint],[L.value.table.columnNames.x],[L.value.table.columnNames.y]],n=Q.value.flatMap(e=>e.plots.map(e=>[[e.seriesName],[e.label],[e.valueX],[e.valueY]])),r=[[H.value.title.text],[H.value.title.subtitle.text],t].concat(n),i=ie(r);e?e(i):ve({csvContent:i,title:H.value.title.text||`vue-ui-history-plot`})})}let Rr=b(!1);function zr(){Rr.value=!Rr.value}function Br(){G.value.showTable=!G.value.showTable}function Vr(){G.value.showTooltip=!G.value.showTooltip}function Hr(){return Q.value}let Ur=te(O,()=>H.value.title.text),Wr=l(()=>Z.value.tickX),Gr=l(()=>({start:0,end:Z.value.tickX.length}));Pe({timeLabelsEls:ln,timeLabels:Wr,slicer:Gr,configRef:L,rotationPath:[`style`,`chart`,`axes`,`x`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`axes`,`x`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:In,height:Ln,targetClass:`.vue-ui-history-plot-x-axis-scale`,rotation:V.value.x.labels.autoRotate.angle});let Kr=l(()=>ee({config:L,style:H,mutableConfig:G,dialog:Kt,accordion:Vt,isFullscreen:tn,parent:O,maxWidth:800}));T([()=>G.value.showTable,an],([e])=>{an.value&&s(e,L,an)},{flush:`post`});function qr(){G.value.showTable=!1,on.value&&on.value.setTableIconState(!1)}let Jr=l(()=>H.value.backgroundColor),Yr=l(()=>H.value.legend),Xr=l(()=>H.value.title),{isCallbackImaging:Zr,isCallbackSvg:Qr,generateSvg:$r,onGenerateImage:ei}=je({svg:W,title:Xr,legend:Yr,legendItems:Dr,backgroundColor:Jr,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:Nn});async function ti(){gn(`copyAlt`,{config:L.value,dataset:Q.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:Q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ni=l(()=>({head:Ir.value.head,body:Ir.value.body.map(e=>[e[0]?.name||``,e[1],e[2],e[3]]),caption:L.value.a11y.translations.tableCaption,notice:L.value.a11y.translations.tableAvailable}));function ri(e){return $.value.findIndex(t=>t.seriesIndex===e)}function ii(e=!1){e&&j.value&&L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:{...j.value,plotIndex:P.value,seriesIndex:N.value},seriesIndex:N.value}),Er.value=null,N.value=null,P.value=null,fn.value=`pointer`,$t.value=!1,j.value=null,jr.value=null,en.value=``,M.value=!1}function ai(){ii(!0)}function oi(){ii(),pn.value=!0}function si(){ai(),pn.value=!1}function ci(e,t){if(!e?.plots?.length)return null;let n=e.plots.length;return(t%n+n)%n}function li({seriesIndex:e,plotIndex:t,direction:n}){if(!$.value.length)return null;let r=ri(e);if(r===-1)return null;if(n===`up`||n===`down`){let e=$.value[r];if(!e?.plots?.length)return null;let i=ci(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 ui(e){if(!W.value||Rr.value||I.value||document.activeElement!==W.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){ai();return}if(a){if(N.value===null||P.value===null)return;let e=$.value.find(e=>e.seriesIndex===N.value)?.plots?.[P.value];if(!e)return;kr({datapoint:e,plotIndex:P.value,seriesIndex:N.value});return}let s=null;if(N.value===null||P.value===null){let e=$.value[0];if(!e?.plots?.length)return;s={seriesIndex:e.seriesIndex,plotIndex:0}}else r?s=li({seriesIndex:N.value,plotIndex:P.value,direction:`up`}):i?s=li({seriesIndex:N.value,plotIndex:P.value,direction:`down`}):t?s=li({seriesIndex:N.value,plotIndex:P.value,direction:`left`}):n&&(s=li({seriesIndex:N.value,plotIndex:P.value,direction:`right`}));if(!s)return;let ee=$.value.find(e=>e.seriesIndex===s.seriesIndex)?.plots?.[s.plotIndex];ee&&Pr({datapoint:ee,plotIndex:s.plotIndex,seriesIndex:s.seriesIndex,triggerMode:`keyboard`})}return He({getData:Hr,getImage:Ur,generatePdf:Mn,generateCsv:Lr,generateImage:Nn,generateSvg:$r,hideSeries:wr,showSeries:Cr,toggleTable:Br,toggleTooltip:Vr,toggleAnnotator:zr,toggleFullscreen:Ar,copyAlt:ti}),T(()=>[K.value,Y.value,V.value,H.value,L.value.style.fontFamily,D.dataset,_n.value,un.value,ln.value,sn.value,cn.value],Bn,{flush:`post`,deep:!0}),(e,s)=>(y(),f(`div`,{id:`history_plot_${k.value}`,ref_key:`historyPlotChart`,ref:O,class:g({"vue-data-ui-component":!0,"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":tn.value}),style:v(`background:${H.value.backgroundColor};color:${H.value.color};font-family:${L.value.style.fontFamily}; position: relative; ${L.value.responsive?`height: 100%`:``}`),onMouseenter:s[2]||=()=>kn(!0),onMouseleave:s[3]||=()=>kn(!1)},[p(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[p(`p`,null,C(L.value.a11y.translations.keyboardNavigation),1)],8,nt),L.value.a11y.includeTable&&ni.value.body.length?(y(),u(ze,{key:0,uid:k.value,head:ni.value.head,body:ni.value.body,caption:ni.value.caption,notice:ni.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):d(``,!0),S(e.$slots,`userConfig`,{},void 0,!0),L.value.userOptions.buttons.annotator?(y(),u(w(Ut),qe({key:1},w(a)(L.value.userOptions.annotator),{svgRef:w(W),backgroundColor:H.value.backgroundColor,color:H.value.color,active:Rr.value,isCursorPointer:En.value,palette:L.value.userOptions.annotatorPalette,onClose:zr}),We({_:2},[x(w(o),t=>({name:t,fn:E(n=>[S(e.$slots,t,_(h(w(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),Pn.value?(y(),f(`div`,{key:2,ref_key:`noTitle`,ref:Qt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),H.value.title.text?(y(),f(`div`,{key:3,ref_key:`chartTitle`,ref:Jt,class:`vue-ui-xy-title`,style:v(`font-family:${L.value.style.fontFamily}`)},[Ke(Fe,{config:{title:{cy:`history-plot-div-title`,...H.value.title},subtitle:{cy:`history-plot-div-subtitle`,...H.value.title.subtitle}}},null,8,[`config`])],4)):d(``,!0),p(`div`,{id:`legend-top-${k.value}`},null,8,rt),L.value.userOptions.show&&hn.value&&(On.value||Dn.value)?(y(),u(w(Wt),qe({ref_key:`userOptionsRef`,ref:on,key:`user_option_${Xt.value}`,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:w(An),isImaging:w(jn),uid:k.value,hasTooltip:H.value.tooltip.show&&L.value.userOptions.buttons.tooltip,hasLabel:!1,isFullscreen:tn.value,chartElement:O.value},w(n)(L.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:G.value.showTooltip,isAnnotation:Rr.value,tableDialog:L.value.table.useDialog,isCursorPointer:En.value,onToggleFullscreen:Ar,onGeneratePdf:w(Mn),onGenerateCsv:Lr,onGenerateImage:w(ei),onGenerateSvg:w($r),onToggleTable:Br,onToggleTooltip:Vr,onToggleAnnotator:zr,onCopyAlt:ti,style:{visibility:On.value?Dn.value?`visible`:`hidden`:`visible`}}),We({_:2},[x(w(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[S(e.$slots,t,_(h(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isFullscreen`,`chartElement`,`isTooltip`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),p(`div`,it,[(y(),f(`svg`,{ref_key:`svgRef`,ref:W,xmlns:w(Se),viewBox:`0 0 ${K.value.width<0?.1:K.value.width} ${K.value.height<0?.1:K.value.height}`,style:v(`max-width:100%;overflow:visible;background:transparent;color:${H.value.color};visibility:${w(zn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${k.value}`,tabindex:`0`,onFocus:oi,onBlur:si,onKeydown:ui},[Ke(w(Gt)),S(e.$slots,`svg-underlayer`,{svg:{...K.value,drawingArea:J.value,isPrintingImg:w(An)||w(jn)||w(Zr),isPrintingSvg:w(Qr)}},void 0,!0),e.$slots[`chart-background`]?(y(),f(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:J.value.width<=0?10:J.value.width,height:J.value.height<=0?10:J.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):d(``,!0),z.value.gradient.show||rr.value?(y(),f(`defs`,st,[z.value.gradient.show?(y(!0),f(c,{key:0},x(Q.value,(e,t)=>(y(),u(Ve,{t:`radial`,key:`gradient_${t}_${k.value}`,id:`gradient_${t}_${k.value}`,fy:`30%`,stops:[[`10%`,w(se)(e.color,z.value.gradient.intensity/100),1],[`90%`,w(ue)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)):d(``,!0),(y(!0),f(c,null,x(Q.value,e=>(y(),f(c,{key:`temperature_grad_history_template_${e.seriesIndex}_${k.value}`},[z.value.gradient.show&&ar(e)?(y(!0),f(c,{key:0},x(e.plots,t=>(y(),u(Ve,{t:`radial`,key:`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${k.value}`,id:pr(e,t),fy:`30%`,stops:[[`10%`,w(se)(fr(e,t),z.value.gradient.intensity/100),1],[`90%`,w(ue)(fr(e,t),.1),1],[`100%`,fr(e,t),1]]},null,8,[`id`,`stops`]))),128)):d(``,!0),ir(e)?(y(),f(`linearGradient`,{key:1,id:`temperature_grad_history_${e.seriesIndex}_${k.value}`,gradientUnits:`userSpaceOnUse`,x1:dr(e).x1,y1:dr(e).y1,x2:dr(e).x2,y2:dr(e).y2},[(y(!0),f(c,null,x(e.temperatureColors,(t,n)=>(y(),f(`stop`,{key:`temperature_grad_history_stop_${e.seriesIndex}_${n}_${k.value}`,"stop-color":t,offset:e.temperatureColors.length===1?`0%`:w(ye)(n,e.temperatureColors.length)},null,8,lt))),128))],8,ct)):d(``,!0)],64))),128))])):d(``,!0),B.value.verticalLines.show?(y(),f(`g`,ut,[(y(!0),f(c,null,x(Z.value.tickX,e=>(y(),f(`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,dt))),256))])):d(``,!0),V.value.y.labels.show?(y(),f(`g`,ft,[(y(!0),f(c,null,x(Z.value.tickY,e=>(y(),f(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:J.value.left-5,x2:J.value.left,y1:e.y,y2:e.y},null,8,pt))),256))])):d(``,!0),V.value.y.labels.show?(y(),f(`g`,{key:4,ref_key:`yAxisScales`,ref:un},[(y(!0),f(c,null,x(Z.value.tickY,e=>(y(),f(`text`,{x:J.value.left+V.value.y.labels.offsetX-4-z.value.radius,y:e.y+Y.value.yAxisLabels/3,fill:V.value.y.labels.color,"font-size":Y.value.yAxisLabels,"text-anchor":`end`},C(w(ge)(V.value.y.labels.formatter,e.value,w(re)({p:V.value.y.labels.prefix,v:e.value,s:V.value.y.labels.suffix,r:V.value.y.labels.rounding}))),9,mt))),256))],512)):d(``,!0),V.value.y.name.text?(y(),f(`text`,{key:5,ref_key:`yAxisLabel`,ref:cn,transform:`translate(${Y.value.yAxisName}, ${K.value.height/2+V.value.y.name.offsetY}), rotate(-90)`,"font-size":Y.value.yAxisName,fill:V.value.y.name.color,"font-weight":V.value.y.name.bold?`bold`:`normal`,"text-anchor":`middle`},C(V.value.y.name.text),9,ht)):d(``,!0),B.value.horizontalLines.show?(y(),f(`g`,gt,[(y(!0),f(c,null,x(Z.value.tickY,e=>(y(),f(`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,_t))),256))])):d(``,!0),V.value.x.labels.show?(y(),f(`g`,vt,[(y(!0),f(c,null,x(Z.value.tickX,e=>(y(),f(`line`,{stroke:B.value.verticalLines.stroke,"stroke-width":B.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:e.x,x2:e.x,y1:J.value.bottom,y2:J.value.bottom+5},null,8,yt))),256))])):d(``,!0),V.value.x.labels.show?(y(),f(`g`,{key:8,ref_key:`xAxisScales`,ref:ln},[(y(!0),f(c,null,x(Z.value.tickX,e=>(y(),f(`text`,{class:`vue-ui-history-plot-x-axis-scale`,transform:`translate(${e.x}, ${J.value.bottom+V.value.x.labels.offsetY+Y.value.xAxisLabels+z.value.radius}), rotate(${V.value.x.labels.rotation})`,fill:V.value.x.labels.color,"font-size":Y.value.xAxisLabels,"text-anchor":V.value.x.labels.rotation>0?`start`:V.value.x.labels.rotation<0?`end`:`middle`},C(w(ge)(V.value.x.labels.formatter,e.value,w(re)({p:V.value.x.labels.prefix,v:e.value,s:V.value.x.labels.suffix,r:V.value.x.labels.rounding}))),9,bt))),256))],512)):d(``,!0),V.value.x.name.text?(y(),f(`text`,{key:9,ref_key:`xAxisLabel`,ref:sn,x:K.value.width/2+V.value.x.name.offsetX,y:K.value.height,"font-size":Y.value.xAxisName,fill:V.value.x.name.color,"font-weight":V.value.x.name.bold?`bold`:`normal`,"text-anchor":`middle`},C(V.value.x.name.text),9,xt)):d(``,!0),B.value.xAxis.show?(y(),f(`line`,{key:10,x1:J.value.left,x2:J.value.left+J.value.width,y1:J.value.bottom,y2:J.value.bottom,stroke:B.value.xAxis.stroke,"stroke-width":B.value.xAxis.strokeWidth,"stroke-linecap":`round`},null,8,St)):d(``,!0),B.value.yAxis.show?(y(),f(`line`,{key:11,x1:J.value.left,x2:J.value.left,y1:J.value.top,y2:J.value.bottom,stroke:B.value.yAxis.stroke,"stroke-width":B.value.yAxis.strokeWidth,"stroke-linecap":`round`},null,8,Ct)):d(``,!0),(y(!0),f(c,null,x(nr.value,e=>(y(),f(`g`,{key:`history_plot_serie_${e.seriesIndex}_${k.value}`},[H.value.paths.show?(y(),f(`g`,{key:0,style:v({opacity:yr(e.seriesIndex)})},[p(`path`,{class:g({"vue-data-ui-transition":w(U)&&!w(q)}),d:e.path,stroke:H.value.backgroundColor,"stroke-width":H.value.paths.strokeWidth+4,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,wt),p(`path`,{class:g({"vue-data-ui-transition":w(U)&&!w(q)}),d:e.path,stroke:vr(e),"stroke-width":H.value.paths.strokeWidth,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Tt)],4)):d(``,!0),(y(!0),f(c,null,x(e.plots,e=>(y(),f(`circle`,{cx:e.x,cy:e.y,fill:H.value.backgroundColor,r:Y.value.plots,stroke:`none`,class:g({"vue-data-ui-transition":w(U)&&!w(q)})},null,10,Et))),256)),(y(!0),f(c,null,x(e.plots,t=>(y(),f(`circle`,{cx:t.x,cy:t.y,fill:mr(e,t,e.gradientIndex),r:Y.value.plots,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,class:g({"vue-data-ui-transition":w(U)&&!w(q)}),style:v({opacity:yr(e.seriesIndex)})},null,14,Dt))),256)),z.value.labels.show?(y(),f(`g`,Ot,[(y(!0),f(c,null,x(e.plots,(t,n)=>(y(),f(`g`,{key:`plab_${n}`},[String(t.label).includes(`
2
2
  `)?(y(),f(`text`,{key:1,class:g({"vue-data-ui-transition":w(U)&&!w(q)}),transform:`translate(${t.x+z.value.labels.offsetX}, ${t.y+z.value.labels.offsetY+Y.value.plots+Y.value.labels})`,"font-size":Y.value.labels,fill:z.value.labels.color,"font-weight":z.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:v({opacity:yr(e.seriesIndex)}),innerHTML:w(le)({content:String(t.label),fontSize:Y.value.labels,fill:z.value.labels.color,x:0,y:0})},null,14,At)):(y(),f(`text`,{key:0,class:g({"vue-data-ui-transition":w(U)&&!w(q)}),transform:`translate(${t.x+z.value.labels.offsetX}, ${t.y+z.value.labels.offsetY+Y.value.plots+Y.value.labels})`,"font-size":Y.value.labels,fill:z.value.labels.color,"font-weight":z.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:v({opacity:yr(e.seriesIndex)})},C(t.label),15,kt))]))),128))])):d(``,!0),z.value.indexLabels.show?(y(),f(`g`,jt,[(y(!0),f(c,null,x(e.plots,(t,n)=>(y(),f(`text`,{key:`lab_${n}`,class:g({"vue-data-ui-transition":w(U)&&!w(q)}),transform:`translate(${t.x+z.value.indexLabels.offsetX}, ${t.y+z.value.indexLabels.offsetY+Y.value.indexLabels/3})`,"font-size":Y.value.indexLabels,"font-weight":z.value.indexLabels.bold?`bold`:`normal`,fill:gr(e,t),"text-anchor":`middle`,style:v({opacity:yr(e.seriesIndex)})},C(z.value.indexLabels.startAtZero?n:n+1),15,Mt))),128))])):d(``,!0)]))),128)),(y(!0),f(c,null,x(nr.value,e=>(y(),f(`g`,{key:`history_plot_trap_serie_${e.seriesIndex}_${k.value}`},[(y(!0),f(c,null,x(e.plots,(t,n)=>(y(),f(`circle`,{cx:t.x,cy:t.y,fill:`transparent`,r:Y.value.plots,stroke:`none`,onMouseenter:r=>Pr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex,triggerMode:`pointer`}),onMouseleave:r=>Mr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex}),onClick:r=>kr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex})},null,40,Nt))),256))]))),128)),S(e.$slots,`svg`,{svg:{...K.value,drawingArea:J.value,isPrintingImg:w(An)||w(jn)||w(Zr),isPrintingSvg:w(Qr)}},void 0,!0)],44,at)),e.$slots.hint?(y(),f(`div`,Pt,[S(e.$slots,`hint`,_(h({hint:L.value.a11y.translations.keyboardNavigation,isVisible:pn.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(y(),f(`div`,Ft,[S(e.$slots,`watermark`,_(h({isPrinting:w(An)||w(jn)||w(Zr)||w(Qr)})),void 0,!0)])):d(``,!0),p(`div`,{id:`legend-bottom-${k.value}`},null,8,It),rn.value&&(H.value.legend.show||e.$slots.legend)?(y(),u(Ue,{key:6,to:H.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[p(`div`,{ref_key:`chartLegend`,ref:Yt},[S(e.$slots,`legend`,{legend:Dr.value},()=>[H.value.legend.show&&hn.value?(y(),u(Le,{key:0,legendSet:Dr.value,config:Or.value,isCursorPointer:En.value,onClickMarker:s[0]||=({legend:e})=>{xr(e.seriesIndex)}},{item:E(({legend:e,index:t})=>[p(`div`,{onClick:t=>e.segregate(),style:v(`opacity:${X.value.includes(e.seriesIndex)?.5:1}`)},C(e.name),13,Lt)]),legendToggle:E(()=>[Dr.value.length>2&&H.value.legend.selectAllToggle.show&&!I.value?(y(),u(Be,{key:0,backgroundColor:H.value.legend.selectAllToggle.backgroundColor,color:H.value.legend.selectAllToggle.color,fontSize:H.value.legend.fontSize,checked:X.value.length>0,isCursorPointer:En.value,onToggle:br},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):d(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):d(``,!0)],!0)],512)],8,[`to`])):d(``,!0),e.$slots.source?(y(),f(`div`,{key:7,ref_key:`source`,ref:nn,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),Ke(w(zt),{teleportTo:H.value.tooltip.teleportTo,show:G.value.showTooltip&&$t.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:O.value,content:en.value,isCustom:M.value,isFullscreen:tn.value,smooth:H.value.tooltip.smooth,backdropFilter:H.value.tooltip.backdropFilter,smoothForce:H.value.tooltip.smoothForce,smoothSnapThreshold:H.value.tooltip.smoothSnapThreshold,isA11yMode:fn.value===`keyboard`,a11yPosition:dn.value},{"tooltip-before":E(()=>[S(e.$slots,`tooltip-before`,_(h({...jr.value})),void 0,!0)]),tooltip:E(()=>[S(e.$slots,`tooltip`,_(h({...jr.value})),void 0,!0)]),"tooltip-after":E(()=>[S(e.$slots,`tooltip-after`,_(h({...jr.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),hn.value&&L.value.userOptions.buttons.table?(y(),u(Qe(Kr.value.component),qe({key:8},Kr.value.props,{ref_key:`tableUnit`,ref:an,onClose:qr}),We({content:E(()=>[Ke(w(Ht),{colNames:Ir.value.colNames,head:Ir.value.head,body:Ir.value.body,config:Ir.value.config,title:L.value.table.useDialog?``:Kr.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:En.value,onClose:qr},{th:E(({th:e})=>[p(`div`,Rt,C(e),1)]),td:E(({td:e})=>[Ge(C(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[L.value.table.useDialog?{name:`title`,fn:E(()=>[Ge(C(Kr.value.title),1)]),key:`0`}:void 0,L.value.table.useDialog?{name:`actions`,fn:E(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Lr(L.value.userOptions.callbacks.csv),style:v({cursor:En.value?`pointer`:`default`})},[Ke(w(Bt),{name:`fileCsv`,stroke:Kr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),S(e.$slots,`skeleton`,{},()=>[I.value?(y(),u(Re,{key:0})):d(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-fa284a3f`]]);export{et as n,zt as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as ee}from"./chartImage-DPGnEuYM.js";import{$ as l,D as te,Dt as ne,Ht as u,J as re,Jt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,b as d,i as ue,in as de,nn as fe,nt as pe,t as me,tn as he,vt as ge,w as _e,wt as ve,zt as ye}from"./lib-rPeBMZrn.js";import{c as be}from"./canvas-lib-22VpOI4_.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./useConfig-CXhXxWjB.js";import{t as we}from"./useLoading-DoqqfnmS.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./useNestedProp-DnGoh-XS.js";import{t as Oe}from"./useThemeCheck-BKNRbGeC.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{t as Ae}from"./useTransitions-ChGGrtrv.js";import{t as je}from"./useTableResponsive-uSz_qZOB.js";import{t as Me}from"./useUserOptionState-CXlFnwPv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./Shape-CRe8woTu.js";import{n as Fe}from"./Title-BliHuXfT.js";import{t as Ie}from"./vue_ui_horizontal_bar-_jcrdeQR.js";import{t as Le}from"./Legend-W9YVYVX-.js";import{t as Re}from"./vue-ui-accordion-D3uT1Ynv.js";import{t as ze}from"./BaseScanner-m6QR9rwD.js";import{t as Be}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ve}from"./A11yDataTable-DWNlWXzs.js";import{t as He}from"./DefGrad-DKMq1REY.js";import{t as Ue}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as f,computed as p,createBlock as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as qe,guardReactiveProps as v,mergeProps as y,nextTick as Je,normalizeClass as b,normalizeProps as Ye,normalizeStyle as x,onBeforeUnmount as Xe,onMounted as Ze,openBlock as S,ref as C,renderList as w,renderSlot as T,resolveDynamicComponent as Qe,toDisplayString as E,toRefs as $e,unref as D,useCssVars as et,useSlots as tt,watch as nt,withCtx as O,withKeys as rt}from"vue";var it=/* @__PURE__ */ e({default:()=>Ft}),at=[`id`],ot=[`id`],st=[`onClick`],ct={style:{position:`relative`}},lt=[`xmlns`,`viewBox`,`aria-describedby`],ut={class:`vue-data-ui-g`},dt=[`width`,`height`],ft={key:1},pt=[`y`,`width`,`height`,`fill`,`rx`],mt=[`fill`,`rx`],ht=[`fill`,`rx`,`stroke`,`stroke-width`],gt=[`fill`,`rx`,`stroke`,`stroke-width`],_t=[`stroke`,`stroke-width`,`d`],vt=[`stroke`,`stroke-width`,`d`],yt=[`y`,`height`,`width`,`fill`],bt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],xt=[`transform`,`font-size`,`fill`,`font-weight`],St=[`transform`,`font-size`,`font-weight`,`innerHTML`],Ct=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],wt=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Tt=[`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Et={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Dt={key:7,class:`vue-data-ui-watermark`},Ot=[`onClick`],kt={style:`width:100%;padding-top: 36px;position:relative`},At={class:`vue-ui-data-table`},jt={key:0},Mt={style:{width:`100%`}},Nt=[`data-cell`],Pt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ft=/*#__PURE__*/ Ue({__name:`vue-ui-horizontal-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`,`selectDatapoint`],setup(e,{expose:Ue,emit:it}){et(e=>({v4c8b2a51:e.tdo}));let Ft=qe(()=>import(`./Tooltip-B432XpvC.js`)),It=qe(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Lt=qe(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Rt=qe(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),zt=qe(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),Bt=qe(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_vertical_bar:Vt}=Ce(),{isThemeValid:Ht,warnInvalidTheme:Ut}=Oe(),Wt=tt(),k=e,Gt=p(()=>!!k.dataset?.length),A=C(oe()),Kt=C(!1),qt=C(``),Jt=C(null),Yt=C(0),j=C(null),Xt=C(null),Zt=C(null),Qt=C(null),$t=C(null),en=C(0),tn=C(0),nn=C(null),rn=C(null),an=C(null),M=C([]),on={none:0,asc:1,desc:2},N=C(0),sn=C(0),cn=null,ln=null,P=C(null),un=C({x:0,y:0}),dn=C(`pointer`),fn=it,F=C(Sn()),I=p(()=>F.value.style.chart.layout.bars),L=p(()=>F.value.style.chart.layout),R=p(()=>F.value.style.chart.tooltip),z=p(()=>F.value.style.chart);xe({config:()=>F.value,dataset:()=>k.dataset,component:`VueUiHorizontalBar`,rules:[Se.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:B}=Ae({config:()=>F.value.transitions,dataset:()=>k.dataset}),V=p(()=>F.value.userOptions.useCursorPointer),pn=p(()=>k.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`}]),mn=p(()=>de({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:F.value.skeletonConfig??{}})),{loading:hn,FINAL_DATASET:gn,manualLoading:_n}=we({...$e(k),FINAL_CONFIG:F,prepareConfig:Sn,callback:()=>{Promise.resolve().then(async()=>{K.value.showTable=F.value.table.show,Pn()})},skeletonDataset:pn.value,skeletonConfig:de({defaultConfig:F.value,userConfig:mn.value})}),{userOptionsVisible:vn,setUserOptionsVisibility:yn,keepUserOptionState:bn}=Me({config:F.value}),{svgRef:xn}=Ne({config:z.value.title});function Sn(){let e=De({userConfig:k.config,defaultConfig:Vt}),t={},n=e.theme;if(n){if(!Ht.value(e))Ut(e),t=e;else{let r=De({userConfig:Ie[n]||k.config,defaultConfig:e});t={...De({userConfig:k.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:fe[n]||u}}}else t=e;for(let e of[`datapointEnter`,`datapointLeave`,`datapointClick`])t.events[e]=ve(k.config,`events.${e}`)?k.config.events[e]:null;return t}let H=C(z.value.width),U=C(z.value.height),W=C(I.value.gap),Cn=ce(k.config);nt(()=>k.config,(e,t)=>{let n=ce(e),r=n!==Cn;Cn=n;let i=Sn();r?(hn.value||(F.value=i),vn.value=!F.value.userOptions.showOnChartHover,en.value+=1,tn.value+=1,K.value.showTable=F.value.table.show,N.value=on[I.value.sort]??0,K.value.showTooltip=R.value.show,H.value=z.value.width,U.value=z.value.height,W.value=I.value.gap):(F.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=F.value.style.chart.tooltip.show)},{deep:!0}),nt(()=>k.dataset,e=>{Array.isArray(e)&&e.length>0&&(_n.value=!1)},{deep:!0});let{isPrinting:wn,isImaging:Tn,generatePdf:En,generateImage:Dn}=Te({elementId:`vue-ui-vertical-bar_${A.value}`,fileName:z.value.title.text||`vue-ui-vertical-bar`,options:F.value.userOptions.print}),On=p(()=>F.value.userOptions.show&&!z.value.title.text),kn=p(()=>_e(F.value.customPalette)),An=C(null),jn=p(()=>F.value.table.responsiveBreakpoint),Mn=p(()=>F.value.debug),G=C(null),Nn=C(null);function Pn(){if(j.value&&(ye(k.dataset)&&(le({componentName:`VueUiVerticalBar`,type:`dataset`,debug:Mn.value}),_n.value=!0),ye(k.dataset)||(_n.value=F.value.loading),F.value.responsive)){let e=be(()=>{let{width:e,height:t}=Ee({chart:j.value,title:z.value.title.text?Xt.value:null,legend:z.value.legend.show?Zt.value:null,source:Qt.value,noTitle:$t.value});requestAnimationFrame(async()=>{U.value=t,H.value=e})});G.value&&(Nn.value&&G.value.unobserve(Nn.value),G.value.disconnect()),G.value=new ResizeObserver(e),Je(()=>{Nn.value=j.value?.parentNode,Nn.value&&G.value.observe(Nn.value)})}}Xe(()=>{G.value&&(Nn.value&&G.value.unobserve(Nn.value),G.value.disconnect())});let K=C({showTable:F.value.table.show,showTooltip:R.value.show}),Fn=p(()=>N.value===0),In=p(()=>N.value===2),q=p(()=>(gn.value.forEach((e,t)=>{!e.value&&!e.children&&le({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`value (index ${t})`,debug:Mn.value}),e.children&&(ye(e.children)?le({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`children (index ${t})`,debug:Mn.value}):e.children.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiVerticalBar`,type:`datasetSerieAttribute`,property:`name`,key:`children`,index:t,debug:Mn.value})}))}),gn.value.map((e,t)=>{let n=`vertical_parent_${t}_${A.value}`,r=e.children&&e.children.length>0,i=d(e.value?e.value:r?e.children.map(e=>e.value||0).reduce((e,t)=>e+t,0):0),a=i>=0?1:-1;return{...e,id:n,absoluteIndex:t,shape:`square`,opacity:M.value.includes(n)?.5:1,value:Math.abs(i),sign:a,hasChildren:r,isChild:!1,segregate:()=>$n(n),isSegregated:M.value.includes(n),color:ae(e.color)||kn.value[t]||u[t]||u[t%u.length],children:!e.children||!e.children.length?[]:e.children.toSorted(Fn.value?()=>0:(e,t)=>In.value?t.value-e.value:e.value-t.value).map((r,o)=>({...r,value:d(Math.abs(r.value)),absoluteIndex:t,sign:r.value>=0?1:-1,isChild:!0,parentId:n,parentName:e.name,parentValue:i,parentSign:a,id:`vertical_child_${t}_${o}_${A.value}`,childIndex:o,isFirstChild:o===0,isLastChild:o===e.children.length-1,color:ae(r.color)||ae(e.color)||kn.value[t]||u[t]||u[t%u.length]}))}}).toSorted(Fn.value?()=>0:(e,t)=>In.value?t.value-e.value:e.value-t.value))),J=p(()=>q.value.filter(e=>!M.value.includes(e.id)));function Ln(e){return e.flatMap(e=>e.hasChildren?e.children:e)}let Y=p(()=>Ln(J.value)),Rn=p(()=>Ln(q.value)),zn=p(()=>Y.value.length),Bn=p(()=>({cy:`vertical-bar-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,fontWeight:z.value.legend.bold?`bold`:``})),Vn=p(()=>I.value.parentLabels.show?I.value.parentLabels.fontSize*3+I.value.parentLabels.paddingBottom:0),Hn=p(()=>{let e=[],t=0;return Y.value.forEach((n,r)=>{n.isChild&&n.childIndex===0&&I.value.parentLabels.show&&(t+=1),e[r]=t}),e}),X=p(()=>{let e=Math.max(0,...Hn.value)*Vn.value;return(U.value-24-(zn.value-1)*W.value-e)/zn.value}),Z=p(()=>({width:H.value,height:U.value,padding:{top:12,left:128+I.value.offsetX,right:64+I.value.paddingRight,bottom:12}})),Un=C(0);function Wn(){Je(()=>{if(!an.value){Un.value=0;return}let e=Array.from(an.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getBBox?.().width??t.getComputedTextLength();return n>e?n:e},0);Un.value=e+12})}nt(()=>[Y.value,H.value,U.value,I.value.nameLabels,I.value.offsetX],()=>Wn(),{deep:!0}),Ze(()=>{Wn()});function Gn(){return typeof document>`u`?null:(cn||(cn=document.createElement(`canvas`),ln=cn.getContext(`2d`)),ln)}function Kn(e){let t=String(e??``),n=I.value,r=n.dataLabels.fontSize,i=n.dataLabels.bold?700:400,a=F.value.style.fontFamily,o=Gn();return o?(o.font=`${i} ${r}px ${a}`,o.measureText(t).width):t.length*r*.6}function qn(){return Y.value.length?Math.max(...Y.value.map(e=>Math.abs(e.value))):0}let Jn=p(()=>{sn.value;let e=I.value,t=Un.value+Math.abs(e.nameLabels.offsetX)+e.offsetX,n=Z.value.width-Z.value.padding.right,r=Math.max(0,n-t-e.offsetX),i=Z.value.width-40,a=qn(),o=Y.value.map((e,t)=>({serie:e,textWidth:Kn(xr(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 l=0;l=c>ee?(c+ee)/2:Math.min(ee,Math.max(c,0));let te=l*2;return te>=0?{left:Math.ceil(Math.min(r,te)),right:0}:{left:0,right:Math.ceil(Math.min(r,-te))}}),Yn=p(()=>Jn.value.right),Xn=p(()=>Jn.value.left);function Zn(){sn.value+=1}Ze(()=>{typeof document<`u`&&document.fonts&&(document.fonts.ready.then(Zn),document.fonts.addEventListener?.(`loadingdone`,Zn))}),Xe(()=>{typeof document<`u`&&document.fonts&&document.fonts.removeEventListener?.(`loadingdone`,Zn),cn=null,ln=null});let Q=p(()=>{let e=Un.value+Math.abs(I.value.nameLabels.offsetX)+Xn.value+I.value.offsetX,t=Z.value.width-Z.value.padding.right,n=Math.max(0,t-e-Yn.value-I.value.offsetX);return{top:Z.value.padding.top,bottom:Z.value.padding.top+Z.value.height,left:e,right:t,width:n,fullHeight:Z.value.padding.top+Z.value.padding.bottom+Z.value.height}});function Qn(){M.value.length?M.value=[]:q.value.forEach(e=>{M.value.push(e.id)}),fn(`selectLegend`,J.value)}async function $n(e){if(M.value.includes(e))M.value=M.value.filter(t=>t!==e);else{if(M.value.length===q.value.length-1)return;M.value.push(e)}fn(`selectLegend`,J.value)}function er(e){return q.value.length?q.value.find(t=>t.name===e)||(Mn.value&&console.warn(`VueUiHorizontalBar - Series name not found "${e}"`),null):(Mn.value&&console.warn(`VueUiHorizontalBar - There are no series to show.`),null)}function tr(e){let t=er(e);t!==null&&M.value.includes(t.id)&&$n(t.id)}function nr(e){let t=er(e);t!==null&&(M.value.includes(t.id)||$n(t.id))}let $=p(()=>J.value.map(e=>Math.abs(e.value)).reduce((e,t)=>e+t,0));function rr(e,t=!1,n=0){return t?l({v:d(Math.abs(e)/$.value*100),s:`%`,r:n}):Math.abs(e)/$.value}let ir=p(()=>Y.value.some(e=>e.sign===-1)),ar=p(()=>Math.max(...Y.value.map(e=>e.value)));function or(e){let t=e/ar.value;return d(Q.value.width/(ir.value?2:1)*t)}function sr(e){return or(e)+Q.value.left}function cr(e){return Q.value.top+(W.value+X.value)*e+Hn.value[e]*Vn.value}let lr=p(()=>Y.value.map((e,t)=>{let n=or(e.value),r=n<=0?1e-4:n;return{x:d(ir.value?Q.value.left+Q.value.width/2-(e.sign===1?0:r):Q.value.left),y:cr(t),width:d(r),height:X.value<=0?1e-4:X.value}})),ur=p(()=>{let e=new Map(J.value.map(e=>[e.id,e]));return Y.value.map((t,n)=>{if(!t.isChild)return null;let r=e.get(t.parentId);return{y:cr(n)-Vn.value+I.value.parentLabels.fontSize,name:r.name,value:[void 0,NaN,null].includes(r.value)?``:r.sign===1?r.value:-r.value,percentageToTotal:isNaN(r.value/$.value)?``:rr(r.value,!0,I.value.dataLabels.percentage.roundingPercentage),sign:r.sign}})});function dr(e,t){return ur.value[t]}function fr(){return J.value}function pr(e,t){return dr(e,t).name}function mr(e,t){let n=dr(e,t);return xr(n.value,n,t,e.parentSign||e.sign)}let hr=C(null),gr=C(null);function _r({datapoint:e,seriesIndex:t}){fn(`selectDatapoint`,e),F.value.events.datapointClick&&F.value.events.datapointClick({datapoint:e,seriesIndex:t})}function vr({datapoint:e,seriesIndex:t}){F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:e,seriesIndex:t}),Jt.value=null,Kt.value=!1,hr.value=null,P.value===t&&(P.value=null)}function yr(e,t,n=`pointer`){dn.value=n,F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:e,datpoint:e,seriesIndex:t}),P.value=t,Jt.value=e,gr.value={datapoint:e,seriesIndex:t,series:q.value,config:F.value},Kt.value=!0,hr.value=e.id;let r=``,i=e.isChild?e.parentName:e.name,a=e.isChild?e.name:``,o=R.value.customFormat,s=ne(o)?o({datapoint:e,series:q.value,config:F.value,seriesIndex:t}):null;typeof s==`string`?qt.value=s:(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as ee}from"./chartImage-DPGnEuYM.js";import{$ as l,D as te,Dt as ne,Ht as u,J as re,Jt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,b as d,i as ue,in as de,nn as fe,nt as pe,t as me,tn as he,vt as ge,w as _e,wt as ve,zt as ye}from"./lib-rPeBMZrn.js";import{c as be}from"./canvas-lib-22VpOI4_.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./useConfig-CXhXxWjB.js";import{t as we}from"./useLoading-DoqqfnmS.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./useNestedProp-DnGoh-XS.js";import{t as Oe}from"./useThemeCheck-BKNRbGeC.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{t as Ae}from"./useTransitions-ChGGrtrv.js";import{t as je}from"./useTableResponsive-uSz_qZOB.js";import{t as Me}from"./useUserOptionState-CXlFnwPv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./Shape-CRe8woTu.js";import{n as Fe}from"./Title-BliHuXfT.js";import{t as Ie}from"./vue_ui_horizontal_bar-_jcrdeQR.js";import{t as Le}from"./Legend-W9YVYVX-.js";import{t as Re}from"./vue-ui-accordion-D3uT1Ynv.js";import{t as ze}from"./BaseScanner-m6QR9rwD.js";import{t as Be}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ve}from"./A11yDataTable-DWNlWXzs.js";import{t as He}from"./DefGrad-DKMq1REY.js";import{t as Ue}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as f,computed as p,createBlock as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as qe,guardReactiveProps as v,mergeProps as y,nextTick as Je,normalizeClass as b,normalizeProps as Ye,normalizeStyle as x,onBeforeUnmount as Xe,onMounted as Ze,openBlock as S,ref as C,renderList as w,renderSlot as T,resolveDynamicComponent as Qe,toDisplayString as E,toRefs as $e,unref as D,useCssVars as et,useSlots as tt,watch as nt,withCtx as O,withKeys as rt}from"vue";var it=/* @__PURE__ */ e({default:()=>Ft}),at=[`id`],ot=[`id`],st=[`onClick`],ct={style:{position:`relative`}},lt=[`xmlns`,`viewBox`,`aria-describedby`],ut={class:`vue-data-ui-g`},dt=[`width`,`height`],ft={key:1},pt=[`y`,`width`,`height`,`fill`,`rx`],mt=[`fill`,`rx`],ht=[`fill`,`rx`,`stroke`,`stroke-width`],gt=[`fill`,`rx`,`stroke`,`stroke-width`],_t=[`stroke`,`stroke-width`,`d`],vt=[`stroke`,`stroke-width`,`d`],yt=[`y`,`height`,`width`,`fill`],bt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],xt=[`transform`,`font-size`,`fill`,`font-weight`],St=[`transform`,`font-size`,`font-weight`,`innerHTML`],Ct=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],wt=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Tt=[`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Et={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Dt={key:7,class:`vue-data-ui-watermark`},Ot=[`onClick`],kt={style:`width:100%;padding-top: 36px;position:relative`},At={class:`vue-ui-data-table`},jt={key:0},Mt={style:{width:`100%`}},Nt=[`data-cell`],Pt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ft=/*#__PURE__*/ Ue({__name:`vue-ui-horizontal-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`,`selectDatapoint`],setup(e,{expose:Ue,emit:it}){et(e=>({v4c8b2a51:e.tdo}));let Ft=qe(()=>import(`./Tooltip-B432XpvC.js`)),It=qe(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Lt=qe(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Rt=qe(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),zt=qe(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),Bt=qe(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_vertical_bar:Vt}=Ce(),{isThemeValid:Ht,warnInvalidTheme:Ut}=Oe(),Wt=tt(),k=e,Gt=p(()=>!!k.dataset?.length),A=C(oe()),Kt=C(!1),qt=C(``),Jt=C(null),Yt=C(0),j=C(null),Xt=C(null),Zt=C(null),Qt=C(null),$t=C(null),en=C(0),tn=C(0),nn=C(null),rn=C(null),an=C(null),M=C([]),on={none:0,asc:1,desc:2},N=C(0),sn=C(0),cn=null,ln=null,P=C(null),un=C({x:0,y:0}),dn=C(`pointer`),fn=it,F=C(Sn()),I=p(()=>F.value.style.chart.layout.bars),L=p(()=>F.value.style.chart.layout),R=p(()=>F.value.style.chart.tooltip),z=p(()=>F.value.style.chart);xe({config:()=>F.value,dataset:()=>k.dataset,component:`VueUiHorizontalBar`,rules:[Se.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:B}=Ae({config:()=>F.value.transitions,dataset:()=>k.dataset}),V=p(()=>F.value.userOptions.useCursorPointer),pn=p(()=>k.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`}]),mn=p(()=>de({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:F.value.skeletonConfig??{}})),{loading:hn,FINAL_DATASET:gn,manualLoading:_n}=we({...$e(k),FINAL_CONFIG:F,prepareConfig:Sn,callback:()=>{Promise.resolve().then(async()=>{K.value.showTable=F.value.table.show,Pn()})},skeletonDataset:pn.value,skeletonConfig:de({defaultConfig:F.value,userConfig:mn.value})}),{userOptionsVisible:vn,setUserOptionsVisibility:yn,keepUserOptionState:bn}=Me({config:F.value}),{svgRef:xn}=Ne({config:z.value.title});function Sn(){let e=De({userConfig:k.config,defaultConfig:Vt}),t={},n=e.theme;if(n){if(!Ht.value(e))Ut(e),t=e;else{let r=De({userConfig:Ie[n]||k.config,defaultConfig:e});t={...De({userConfig:k.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:fe[n]||u}}}else t=e;for(let e of[`datapointEnter`,`datapointLeave`,`datapointClick`])t.events[e]=ve(k.config,`events.${e}`)?k.config.events[e]:null;return t}let H=C(z.value.width),U=C(z.value.height),W=C(I.value.gap),Cn=ce(k.config);nt(()=>k.config,(e,t)=>{let n=ce(e),r=n!==Cn;Cn=n;let i=Sn();r?(hn.value||(F.value=i),vn.value=!F.value.userOptions.showOnChartHover,en.value+=1,tn.value+=1,K.value.showTable=F.value.table.show,N.value=on[I.value.sort]??0,K.value.showTooltip=R.value.show,H.value=z.value.width,U.value=z.value.height,W.value=I.value.gap):(F.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=F.value.style.chart.tooltip.show)},{deep:!0}),nt(()=>k.dataset,e=>{Array.isArray(e)&&e.length>0&&(_n.value=!1)},{deep:!0});let{isPrinting:wn,isImaging:Tn,generatePdf:En,generateImage:Dn}=Te({elementId:`vue-ui-vertical-bar_${A.value}`,fileName:z.value.title.text||`vue-ui-vertical-bar`,options:F.value.userOptions.print}),On=p(()=>F.value.userOptions.show&&!z.value.title.text),kn=p(()=>_e(F.value.customPalette)),An=C(null),jn=p(()=>F.value.table.responsiveBreakpoint),Mn=p(()=>F.value.debug),G=C(null),Nn=C(null);function Pn(){if(j.value&&(ye(k.dataset)&&(le({componentName:`VueUiVerticalBar`,type:`dataset`,debug:Mn.value}),_n.value=!0),ye(k.dataset)||(_n.value=F.value.loading),F.value.responsive)){let e=be(()=>{let{width:e,height:t}=Ee({chart:j.value,title:z.value.title.text?Xt.value:null,legend:z.value.legend.show?Zt.value:null,source:Qt.value,noTitle:$t.value});requestAnimationFrame(async()=>{U.value=t,H.value=e})});G.value&&(Nn.value&&G.value.unobserve(Nn.value),G.value.disconnect()),G.value=new ResizeObserver(e),Je(()=>{Nn.value=j.value?.parentNode,Nn.value&&G.value.observe(Nn.value)})}}Xe(()=>{G.value&&(Nn.value&&G.value.unobserve(Nn.value),G.value.disconnect())});let K=C({showTable:F.value.table.show,showTooltip:R.value.show}),Fn=p(()=>N.value===0),In=p(()=>N.value===2),q=p(()=>(gn.value.forEach((e,t)=>{!e.value&&!e.children&&le({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`value (index ${t})`,debug:Mn.value}),e.children&&(ye(e.children)?le({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`children (index ${t})`,debug:Mn.value}):e.children.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiVerticalBar`,type:`datasetSerieAttribute`,property:`name`,key:`children`,index:t,debug:Mn.value})}))}),gn.value.map((e,t)=>{let n=`vertical_parent_${t}_${A.value}`,r=e.children&&e.children.length>0,i=d(e.value?e.value:r?e.children.map(e=>e.value||0).reduce((e,t)=>e+t,0):0),a=i>=0?1:-1;return{...e,id:n,absoluteIndex:t,shape:`square`,opacity:M.value.includes(n)?.5:1,value:Math.abs(i),sign:a,hasChildren:r,isChild:!1,segregate:()=>$n(n),isSegregated:M.value.includes(n),color:ae(e.color)||kn.value[t]||u[t]||u[t%u.length],children:!e.children||!e.children.length?[]:e.children.toSorted(Fn.value?()=>0:(e,t)=>In.value?t.value-e.value:e.value-t.value).map((r,o)=>({...r,value:d(Math.abs(r.value)),absoluteIndex:t,sign:r.value>=0?1:-1,isChild:!0,parentId:n,parentName:e.name,parentValue:i,parentSign:a,id:`vertical_child_${t}_${o}_${A.value}`,childIndex:o,isFirstChild:o===0,isLastChild:o===e.children.length-1,color:ae(r.color)||ae(e.color)||kn.value[t]||u[t]||u[t%u.length]}))}}).toSorted(Fn.value?()=>0:(e,t)=>In.value?t.value-e.value:e.value-t.value))),J=p(()=>q.value.filter(e=>!M.value.includes(e.id)));function Ln(e){return e.flatMap(e=>e.hasChildren?e.children:e)}let Y=p(()=>Ln(J.value)),Rn=p(()=>Ln(q.value)),zn=p(()=>Y.value.length),Bn=p(()=>({cy:`vertical-bar-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,fontWeight:z.value.legend.bold?`bold`:``})),Vn=p(()=>I.value.parentLabels.show?I.value.parentLabels.fontSize*3+I.value.parentLabels.paddingBottom:0),Hn=p(()=>{let e=[],t=0;return Y.value.forEach((n,r)=>{n.isChild&&n.childIndex===0&&I.value.parentLabels.show&&(t+=1),e[r]=t}),e}),X=p(()=>{let e=Math.max(0,...Hn.value)*Vn.value;return(U.value-24-(zn.value-1)*W.value-e)/zn.value}),Z=p(()=>({width:H.value,height:U.value,padding:{top:12,left:128+I.value.offsetX,right:64+I.value.paddingRight,bottom:12}})),Un=C(0);function Wn(){Je(()=>{if(!an.value){Un.value=0;return}let e=Array.from(an.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getBBox?.().width??t.getComputedTextLength();return n>e?n:e},0);Un.value=e+12})}nt(()=>[Y.value,H.value,U.value,I.value.nameLabels,I.value.offsetX],()=>Wn(),{deep:!0}),Ze(()=>{Wn()});function Gn(){return typeof document>`u`?null:(cn||(cn=document.createElement(`canvas`),ln=cn.getContext(`2d`)),ln)}function Kn(e){let t=String(e??``),n=I.value,r=n.dataLabels.fontSize,i=n.dataLabels.bold?700:400,a=F.value.style.fontFamily,o=Gn();return o?(o.font=`${i} ${r}px ${a}`,o.measureText(t).width):t.length*r*.6}function qn(){return Y.value.length?Math.max(...Y.value.map(e=>Math.abs(e.value))):0}let Jn=p(()=>{sn.value;let e=I.value,t=Un.value+Math.abs(e.nameLabels.offsetX)+e.offsetX,n=Z.value.width-Z.value.padding.right,r=Math.max(0,n-t-e.offsetX),i=Z.value.width-40,a=qn(),o=Y.value.map((e,t)=>({serie:e,textWidth:Kn(xr(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 l=0;l=c>ee?(c+ee)/2:Math.min(ee,Math.max(c,0));let te=l*2;return te>=0?{left:Math.ceil(Math.min(r,te)),right:0}:{left:0,right:Math.ceil(Math.min(r,-te))}}),Yn=p(()=>Jn.value.right),Xn=p(()=>Jn.value.left);function Zn(){sn.value+=1}Ze(()=>{typeof document<`u`&&document.fonts&&(document.fonts.ready.then(Zn),document.fonts.addEventListener?.(`loadingdone`,Zn))}),Xe(()=>{typeof document<`u`&&document.fonts&&document.fonts.removeEventListener?.(`loadingdone`,Zn),cn=null,ln=null});let Q=p(()=>{let e=Un.value+Math.abs(I.value.nameLabels.offsetX)+Xn.value+I.value.offsetX,t=Z.value.width-Z.value.padding.right,n=Math.max(0,t-e-Yn.value-I.value.offsetX);return{top:Z.value.padding.top,bottom:Z.value.padding.top+Z.value.height,left:e,right:t,width:n,fullHeight:Z.value.padding.top+Z.value.padding.bottom+Z.value.height}});function Qn(){M.value.length?M.value=[]:q.value.forEach(e=>{M.value.push(e.id)}),fn(`selectLegend`,J.value)}async function $n(e){if(M.value.includes(e))M.value=M.value.filter(t=>t!==e);else{if(M.value.length===q.value.length-1)return;M.value.push(e)}fn(`selectLegend`,J.value)}function er(e){return q.value.length?q.value.find(t=>t.name===e)||(Mn.value&&console.warn(`VueUiHorizontalBar - Series name not found "${e}"`),null):(Mn.value&&console.warn(`VueUiHorizontalBar - There are no series to show.`),null)}function tr(e){let t=er(e);t!==null&&M.value.includes(t.id)&&$n(t.id)}function nr(e){let t=er(e);t!==null&&(M.value.includes(t.id)||$n(t.id))}let $=p(()=>J.value.map(e=>Math.abs(e.value)).reduce((e,t)=>e+t,0));function rr(e,t=!1,n=0){return t?l({v:d(Math.abs(e)/$.value*100),s:`%`,r:n}):Math.abs(e)/$.value}let ir=p(()=>Y.value.some(e=>e.sign===-1)),ar=p(()=>Math.max(...Y.value.map(e=>e.value)));function or(e){let t=e/ar.value;return d(Q.value.width/(ir.value?2:1)*t)}function sr(e){return or(e)+Q.value.left}function cr(e){return Q.value.top+(W.value+X.value)*e+Hn.value[e]*Vn.value}let lr=p(()=>Y.value.map((e,t)=>{let n=or(e.value),r=n<=0?1e-4:n;return{x:d(ir.value?Q.value.left+Q.value.width/2-(e.sign===1?0:r):Q.value.left),y:cr(t),width:d(r),height:X.value<=0?1e-4:X.value}})),ur=p(()=>{let e=new Map(J.value.map(e=>[e.id,e]));return Y.value.map((t,n)=>{if(!t.isChild)return null;let r=e.get(t.parentId);return{y:cr(n)-Vn.value+I.value.parentLabels.fontSize,name:r.name,value:[void 0,NaN,null].includes(r.value)?``:r.sign===1?r.value:-r.value,percentageToTotal:isNaN(r.value/$.value)?``:rr(r.value,!0,I.value.dataLabels.percentage.roundingPercentage),sign:r.sign}})});function dr(e,t){return ur.value[t]}function fr(){return J.value}function pr(e,t){return dr(e,t).name}function mr(e,t){let n=dr(e,t);return xr(n.value,n,t,e.parentSign||e.sign)}let hr=C(null),gr=C(null);function _r({datapoint:e,seriesIndex:t}){fn(`selectDatapoint`,e),F.value.events.datapointClick&&F.value.events.datapointClick({datapoint:e,seriesIndex:t})}function vr({datapoint:e,seriesIndex:t}){F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:e,seriesIndex:t}),Jt.value=null,Kt.value=!1,hr.value=null,P.value===t&&(P.value=null)}function yr(e,t,n=`pointer`){dn.value=n,F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:e,datpoint:e,seriesIndex:t}),P.value=t,Jt.value=e,gr.value={datapoint:e,seriesIndex:t,series:q.value,config:F.value},Kt.value=!0,hr.value=e.id;let r=``,i=e.isChild?e.parentName:e.name,a=e.isChild?e.name:``,o=R.value.customFormat,s=ne(o)?o({datapoint:e,series:q.value,config:F.value,seriesIndex:t}):null;typeof s==`string`?qt.value=s:(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${R.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}"/>${Wt.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${A.value}_${e.absoluteIndex})"/>`:``}</svg> ${i}</div>
3
3
  ${a?`<div>${a}</div>`:``}
4
4
  </div>`,R.value.showValue&&(r+=`<div>${F.value.translations.value}: <b>${ue(I.value.dataLabels.value.formatter,e.sign===1?e.value:-e.value,l({p:R.value.prefix,v:e.sign===1?e.value:-e.value,s:R.value.suffix,r:R.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`),R.value.showPercentage&&(r+=`<div>${F.value.translations.percentageToTotal} : <b>${l({v:Math.abs(e.value)/$.value*100,s:`%`,r:R.value.roundingPercentage})}</b></div>`,e.isChild&&(r+=`<div>${F.value.translations.percentageToSerie}: <b>${l({v:Math.abs(e.value)/Math.abs(e.parentValue)*100,s:`%`,r:R.value.roundingPercentage})}</b></div>`)),qt.value=`<div style="text-align:left">${r}</div>`)}function br({legend:e,index:t}){let n=z.value.legend;return n.showValue?`${e.name}: ${ue(I.value.dataLabels.value.formatter,e.value,l({p:n.prefix,v:e.value,s:n.suffix,r:n.roundingValue}),{datapoint:e,seriesIndex:t})}`:e.name}function xr(e,t,n,r){if(!I.value.dataLabels.value.show)return``;let i=ue(I.value.dataLabels.value.formatter,d(r===-1&&e>=0?-e:e),l({p:I.value.dataLabels.value.prefix,v:d(r===-1&&e>=0?-e:e),s:I.value.dataLabels.value.suffix,r:I.value.dataLabels.value.roundingValue}),{datapoint:t,seriesIndex:n}),a=`(${rr(e,!0,I.value.dataLabels.percentage.roundingPercentage)})`;return`${i}${I.value.dataLabels.percentage.show?` ${a}`:``}`}let Sr=p(()=>({head:[F.value.translations.parentName,F.value.translations.value,F.value.translations.percentageToTotal,F.value.translations.childName,F.value.translations.value,F.value.translations.percentageToSerie,F.value.translations.percentageToTotal],body:Y.value.map(e=>e.isChild?{color:e.isFirstChild?e.color:``,parentName:e.isFirstChild?e.parentName:``,parentValue:e.isFirstChild?e.parentValue:``,percentageToTotal:e.isFirstChild?e.parentValue/$.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)/$.value}:{color:e.color,parentName:e.name,parentValue:e.sign===1?e.value:-e.value,percentageToTotal:Math.abs(e.value)/$.value,childName:``,childValue:``,childPercentageToParent:``,childPercentageToTotal:``})})),Cr=[{key:`parentName`,type:`name`},{key:`parentValue`,type:`value`},{key:`percentageToTotal`,type:`percentage`},{key:`childName`,type:`name`},{key:`childValue`,type:`value`},{key:`childPercentageToParent`,type:`percentage`},{key:`childPercentageToTotal`,type:`percentage`}];function wr(e,t){let n=e[t.key],r=F.value.table.td,i=[``,NaN,void 0].includes(n);return t.type===`value`?`${E(r.prefix)}${i?``:n.toFixed(r.roundingValue)}${E(r.suffix)}`:t.type===`percentage`?i?``:`${(n*100).toFixed(r.roundingPercentage)}%`:n}function Tr(e=null){let t=[[z.value.title.text],[z.value.title.subtitle.text],[``]],n=Sr.value.head,r=Sr.value.body.map(e=>Cr.map(t=>e[t.key])),i=t.concat([n]).concat(r),a=te(i);e?e(a):pe({csvContent:a,title:z.value.title.text||`vue-ui-vertical-bar`})}let Er=C(!1);function Dr(e){Er.value=e,Yt.value+=1}function Or(){K.value.showTable=!K.value.showTable}Ze(()=>{[`none`,`asc`,`desc`].includes(I.value.sort)||le({componentName:`VueUiVerticalBar`,type:`attributeWrongValue`,property:`style.chart.layout.bars.sort`,key:I.value.sort}),N.value=on[I.value.sort]??0});function kr(){N.value+=1,N.value>2&&(N.value=0)}function Ar(){kr()}function jr(){K.value.showTooltip=!K.value.showTooltip}let Mr=C(!1);function Nr(){Mr.value=!Mr.value}let Pr=ee(j,()=>z.value.title.text),Fr=p(()=>c({config:F,style:z,mutableConfig:K,dialog:Bt,accordion:Re,isFullscreen:Er,parent:j,maxWidth:800,isCursorPointer:V}));nt(()=>K.value.showTable,e=>s(e,F,nn));let{isResponsive:Ir}=je(An,jn);function Lr(){K.value.showTable=!1,rn.value&&rn.value.setTableIconState(!1)}let Rr=p(()=>q.value.map((e,t)=>({...e,shape:`square`,display:`${e.name}: ${ue(I.value.dataLabels.value.formatter,e.value,l({p:z.value.legend.prefix,v:e.value,s:z.value.legend.suffix,r:z.value.legend.roundingValue}),{datapoint:e,seriesIndex:t})}`}))),zr=p(()=>z.value.backgroundColor),Br=p(()=>z.value.legend),Vr=p(()=>z.value.title),Hr=p(()=>Rr.value.map(e=>({...e,name:e.display}))),{isCallbackImaging:Ur,isCallbackSvg:Wr,generateSvg:Gr,onGenerateImage:Kr}=ke({svg:xn,title:Vr,legend:Br,legendItems:Hr,backgroundColor:zr,getSvgCallback:()=>F.value.userOptions.callbacks.svg,generateImage:Dn});function qr(){console.warn(`[autoSize]: this legacy method can be safely removed as it has no impact.`)}async function Jr(){fn(`copyAlt`,{config:F.value,dataset:J.value}),F.value.userOptions.callbacks.altCopy?await Promise.resolve(F.value.userOptions.callbacks.altCopy({config:F.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Yr=C(!1);function Xr(){P.value=null,Yr.value=!0}function Zr(){P.value=null,Kt.value=!1,Yr.value=!1}function Qr(){if(P.value===null)return;let e=Y.value[P.value];e&&vr({datapoint:e,seriesIndex:P.value}),P.value=null,dn.value=`pointer`}function $r(e){if(!xn.value||Mr.value||document.activeElement!==xn.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=Y.value.length;if(!a)return;if(e.preventDefault(),e.stopPropagation(),i){Qr();return}if(r){if(P.value===null)return;let e=Y.value[P.value];if(!e)return;_r({datapoint:e,seriesIndex:P.value});return}let o=P.value,s=Jt.value?Y.value.findIndex(e=>e.id===Jt.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=Y.value[o];c&&(P.value=o,ei(c),yr(c,o,`keyboard`))}function ei(e){if(!e)return;let t=Y.value.findIndex(t=>t.id===e.id);if(t<0)return;let n=Q.value.right,r=lr.value[t].y;if(!Number.isFinite(n)||!Number.isFinite(r))return;let i=he(n,r,xn.value);i&&(un.value=i)}let ti=p(()=>({head:Sr.value.head,body:Sr.value.body.map(e=>[e.parentName,e.parentValue===``?``:l({v:e.parentValue,r:I.value.dataLabels.value.roundingValue,p:I.value.dataLabels.value.prefix,s:I.value.dataLabels.value.suffix}),e.percentageToTotal===``?``:l({v:e.percentageToTotal*100,r:I.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childName,e.childValue===``?``:l({v:e.childValue,r:I.value.dataLabels.value.roundingValue,p:I.value.dataLabels.value.prefix,s:I.value.dataLabels.value.suffix}),e.childPercentageToParent===``?``:l({v:e.childPercentageToParent*100,r:I.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childPercentageToTotal===``?``:l({v:e.childPercentageToTotal*100,r:I.value.dataLabels.percentage.roundingPercentage,s:`%`})]),caption:F.value.a11y.translations.tableCaption,notice:F.value.a11y.translations.tableAvailable}));return Ue({autoSize:qr,getData:fr,getImage:Pr,generatePdf:En,generateCsv:Tr,generateImage:Dn,generateSvg:Gr,hideSeries:nr,showSeries:tr,toggleTable:Or,toggleSort:Ar,toggleTooltip:jr,toggleAnnotator:Nr,toggleFullscreen:Dr,copyAlt:Jr}),(e,s)=>(S(),g(`div`,{class:b(`vue-data-ui-component vue-ui-vertical-bar ${Er.value?`vue-data-ui-wrapper-fullscreen`:``} ${F.value.useCssAnimation?``:`vue-ui-dna`} ${F.value.responsive?`vue-ui-vertical-bar-autosize`:``}`),ref_key:`verticalBarChart`,ref:j,id:`vue-ui-vertical-bar_${A.value}`,style:x(`font-family:${F.value.style.fontFamily};width:100%; text-align:center;background:${z.value.backgroundColor};height:100%`),onMouseenter:s[3]||=()=>D(yn)(!0),onMouseleave:s[4]||=()=>D(yn)(!1)},[_(`p`,{id:`chart-instructions-${A.value}`,class:`sr-only`},E(F.value.a11y.translations.keyboardNavigation),9,ot),F.value.a11y.includeTable&&ti.value.body.length?(S(),m(Ve,{key:0,uid:A.value,head:ti.value.head,body:ti.value.body,caption:ti.value.caption,notice:ti.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):h(``,!0),F.value.userOptions.buttons.annotator?(S(),m(D(Lt),y({key:1},D(a)(F.value.userOptions.annotator),{svgRef:D(xn),backgroundColor:z.value.backgroundColor,color:z.value.color,active:Mr.value,isCursorPointer:V.value,palette:F.value.userOptions.annotatorPalette,onClose:Nr}),We({_:2},[w(D(o),t=>({name:t,fn:O(n=>[T(e.$slots,t,Ye(v(D(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):h(``,!0),On.value?(S(),g(`div`,{key:2,ref_key:`noTitle`,ref:$t,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):h(``,!0),z.value.title.text?(S(),g(`div`,{key:3,ref_key:`chartTitle`,ref:Xt,style:`width:100%;background:transparent;padding-bottom:12px`},[(S(),m(Fe,{key:`title_${en.value}`,config:{title:{cy:`vertical-bar-div-title`,...z.value.title},subtitle:{cy:`vertical-bar-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):h(``,!0),F.value.userOptions.show&&Gt.value&&(D(bn)||D(vn))?(S(),m(D(Rt),y({ref_key:`userOptionsRef`,ref:rn,backgroundColor:z.value.backgroundColor,color:z.value.color,key:`user_options_${Yt.value}`,isImaging:D(Tn),isPrinting:D(wn),uid:A.value,hasTooltip:F.value.userOptions.buttons.tooltip&&R.value.show,isFullscreen:Er.value,isTooltip:K.value.showTooltip,chartElement:j.value},D(n)(F.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator sort`),{isAnnotation:Mr.value,tableDialog:F.value.table.useDialog,isCursorPointer:V.value,onToggleFullscreen:Dr,onGeneratePdf:D(En),onGenerateCsv:Tr,onGenerateImage:D(Kr),onGenerateSvg:D(Gr),onToggleTable:Or,onToggleSort:Ar,onToggleTooltip:jr,onToggleAnnotator:Nr,onCopyAlt:Jr,style:{visibility:D(bn)?D(vn)?`visible`:`hidden`:`visible`}}),We({_:2},[w(D(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionSort optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:O(n=>[T(e.$slots,t,Ye(v(D(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):h(``,!0),e.$slots.legend&&z.value.legend.show&&z.value.legend.position===`top`?T(e.$slots,`legend`,{legend:q.value},void 0,!0,5):h(``,!0),!e.$slots.legend&&z.value.legend.show&&z.value.legend.position===`top`?(S(),g(`div`,{key:6,ref_key:`chartLegend`,ref:Zt},[(S(),m(Le,{key:`legend_top_${tn.value}`,legendSet:q.value,config:Bn.value,onClickMarker:s[0]||=({legend:e})=>$n(e.id)},We({item:O(({legend:e,index:t})=>[_(`div`,{onClick:t=>$n(e.id),style:x(`opacity:${M.value.includes(e.id)?.5:1}`)},E(br({legend:e,index:t})),13,st)]),legendToggle:O(()=>[q.value.length>2&&z.value.legend.selectAllToggle.show&&!D(hn)?(S(),m(Be,{key:0,backgroundColor:z.value.legend.selectAllToggle.backgroundColor,color:z.value.legend.selectAllToggle.color,fontSize:z.value.legend.fontSize,checked:M.value.length>0,onToggle:Qn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):h(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:O(({legend:e,index:t})=>[Ke(Pe,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${A.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`]))],512)):h(``,!0),_(`div`,ct,[(S(),g(`svg`,{ref_key:`svgRef`,ref:xn,xmlns:D(me),class:b({"vue-data-ui-fullscreen--on":Er.value,"vue-data-ui-fulscreen--off":!Er.value,"vue-data-ui-no-transition":!D(B)}),viewBox:`0 0 ${H.value} ${U.value}`,style:x(`max-width:100%;overflow:visible;background:transparent;color:${z.value.color}`),tabindex:`0`,"aria-describedby":`chart-instructions-${A.value}`,onFocus:Xr,onBlur:Zr,onKeydown:$r},[_(`g`,ut,[Ke(D(zt)),T(e.$slots,`svg-underlayer`,{svg:{...Z.value,drawingArea:Q.value,isPrintingImg:D(wn)||D(Tn)||D(Ur),isPrintingSvg:D(Wr)}},void 0,!0),e.$slots[`chart-background`]?(S(),g(`foreignObject`,{key:0,x:0,y:0,width:H.value,height:U.value,style:{pointerEvents:`none`}},[T(e.$slots,`chart-background`,{},void 0,!0)],8,dt)):h(``,!0),_(`defs`,null,[(S(!0),g(f,null,w(Y.value,(e,t)=>(S(),m(He,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`vertical_bar_gradient_${A.value}_${t}`,key:`vertical_bar_gradient_${A.value}_${t}`,stops:[[`0%`,e.color,1],[`100%`,D(ie)(D(se)(e.color,.03),100-I.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(S(),g(`g`,ft,[(S(!0),g(f,null,w(Y.value,t=>(S(),g(`defs`,null,[T(e.$slots,`pattern`,y({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${A.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):h(``,!0),I.value.rowColor?(S(!0),g(f,{key:2},w(Y.value,(e,t)=>(S(),g(`g`,{key:`row_${e.id}`},[_(`rect`,{x:0,y:cr(t),width:H.value,height:X.value<=0?1e-4:X.value,fill:I.value.rowColor,rx:I.value.rowRadius,style:{pointerEvents:`none`},class:b({"vue-data-ui-transition":D(B)})},null,10,pt)]))),128)):h(``,!0),(S(!0),g(f,null,w(Y.value,(e,t)=>(S(),g(`g`,{key:`underlayer_${e.id}`},[_(`rect`,y({ref_for:!0},lr.value[t],{fill:I.value.underlayerColor,rx:I.value.borderRadius,class:{"vue-data-ui-transition":D(B)}}),null,16,mt)]))),128)),(S(!0),g(f,null,w(Y.value,(t,n)=>(S(),g(`g`,{key:`barloop_${t.id}`},[_(`rect`,y({ref_for:!0},lr.value[n],{fill:I.value.useGradient?`url(#vertical_bar_gradient_${A.value}_${n})`:D(ie)(t.color,I.value.fillOpacity),rx:I.value.borderRadius,stroke:I.value.useStroke?t.color:`none`,"stroke-width":I.value.useStroke?I.value.strokeWidth:0,class:{"vue-data-ui-transition":D(B)}}),null,16,ht),e.$slots.pattern?(S(),g(`rect`,y({key:0,ref_for:!0},lr.value[n],{fill:`url(#pattern_${A.value}_${t.absoluteIndex})`,rx:I.value.borderRadius,stroke:I.value.useStroke?t.color:`none`,"stroke-width":I.value.useStroke?I.value.strokeWidth:0,class:{"vue-data-ui-transition":D(B)}}),null,16,gt)):h(``,!0),(!t.isChild||t.isLastChild)&&L.value.separators.show&&n!==Y.value.length-1?(S(),g(`path`,{key:1,stroke:L.value.separators.color,"stroke-width":L.value.separators.strokeWidth,"stroke-linecap":`round`,class:b({"vue-data-ui-transition":D(B)}),d:`M${H.value}, ${X.value+W.value/2+cr(n)} ${L.value.separators.fullWidth?0:Q.value.left}, ${X.value+W.value/2+cr(n)}`},null,10,_t)):h(``,!0),ir.value&&L.value.separators.show?(S(),g(`path`,{key:2,stroke:L.value.separators.color,"stroke-width":L.value.separators.strokeWidth,"stroke-linecap":`round`,class:b({"vue-data-ui-transition":D(B)}),d:`M${Q.value.left+Q.value.width/2}, ${Q.value.top} ${Q.value.left+Q.value.width/2}, ${Q.value.bottom}`},null,10,vt)):h(``,!0)]))),128)),_(`g`,null,[(S(!0),g(f,null,w(Y.value,(e,t)=>(S(),g(`g`,{key:`pn_${e.id}`,class:`vue-ui-horizontal-bar-parent-label`},[e.isChild&&e.childIndex===0&&I.value.parentLabels.show?(S(),g(`rect`,{key:0,class:b([`vue-ui-horizontal-bar-parent-marker`,{"vue-data-ui-transition":D(B)}]),x:2,y:dr(e,t).y-I.value.parentLabels.fontSize/1.5,height:I.value.parentLabels.fontSize/1.5,width:I.value.parentLabels.fontSize/1.5,rx:1,fill:e.color},null,10,yt)):h(``,!0),e.isChild&&e.childIndex===0&&I.value.parentLabels.show?(S(),g(`text`,{key:1,class:b({"vue-data-ui-transition":D(B)}),transform:`translate(${I.value.parentLabels.offsetX+I.value.parentLabels.fontSize}, ${dr(e,t).y})`,"font-size":I.value.parentLabels.fontSize,fill:I.value.parentLabels.color,"font-weight":I.value.parentLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:D(re)({content:`${pr(e,t)}`,fontSize:I.value.parentLabels.fontSize,fill:L.value.bars.parentLabels.color,x:0,y:0,translateY:!1})},null,10,bt)):h(``,!0),e.isChild&&e.childIndex===0&&I.value.parentLabels.show?(S(),g(`text`,{key:2,class:b({"vue-data-ui-transition":D(B)}),transform:`translate(${I.value.parentLabels.offsetX+I.value.parentLabels.fontSize}, ${dr(e,t).y+D(ge)(pr(e,t))*I.value.parentLabels.fontSize*1.1})`,"font-size":I.value.parentLabels.fontSize,fill:I.value.parentLabels.color,"font-weight":I.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`start`},E(mr(e,t)),11,xt)):h(``,!0)]))),128))]),_(`g`,{ref_key:`childLabels`,ref:an},[(S(!0),g(f,null,w(Rn.value,(e,t)=>(S(),g(`g`,{key:`cl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&I.value.nameLabels.show?(S(),g(`text`,{key:0,"text-anchor":`start`,class:b({"vue-data-ui-transition":D(B)}),transform:`translate(${Math.abs(I.value.nameLabels.offsetX)}, ${D(d)(Q.value.top+(W.value+X.value)*t+X.value/2+I.value.nameLabels.fontSize/2+Hn.value[t]*Vn.value)})`,"font-size":I.value.nameLabels.fontSize,fill:`transparent`,"font-weight":I.value.nameLabels.bold?`bold`:`normal`,style:{"user-select":`none`},innerHTML:D(re)({content:e.name,fontSize:I.value.nameLabels.fontSize,fill:`transparent`,x:0,y:0,translateY:!0})},null,10,St)):h(``,!0)]))),128))],512),_(`g`,null,[(S(!0),g(f,null,w(Y.value,(e,t)=>(S(),g(`g`,{key:`vislab_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&I.value.nameLabels.show?(S(),g(`text`,{key:0,class:b({"vue-data-ui-transition":D(B)}),"text-anchor":`end`,transform:`translate(${Q.value.left+I.value.nameLabels.offsetX-6}, ${Q.value.top+(W.value+X.value)*t+X.value/2+I.value.nameLabels.fontSize/3+Hn.value[t]*Vn.value})`,"font-size":I.value.nameLabels.fontSize,fill:I.value.nameLabels.color,"font-weight":I.value.nameLabels.bold?`bold`:`normal`,innerHTML:D(re)({content:e.name,fontSize:I.value.nameLabels.fontSize,fill:L.value.bars.nameLabels.color,x:0,y:0,translateY:!0})},null,10,Ct)):h(``,!0)]))),128))]),_(`g`,null,[(S(!0),g(f,null,w(Y.value,(e,t)=>(S(),g(`g`,{key:`sdl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[_(`text`,{class:b({"vue-data-ui-transition":D(B)}),transform:`translate(${ir.value?Q.value.left+Q.value.width/2+(e.sign===1?-12:12)+(e.sign===1?-L.value.bars.dataLabels.offsetX:L.value.bars.dataLabels.offsetX):Math.min(sr(e.value)+3+z.value.layout.bars.dataLabels.offsetX,Q.value.right-2)},${Q.value.top+(W.value+X.value)*t+X.value/2+Hn.value[t]*Vn.value+I.value.dataLabels.fontSize/3})`,"text-anchor":!ir.value||e.sign===-1?`start`:`end`,"font-size":I.value.dataLabels.fontSize,fill:I.value.dataLabels.color,"font-weight":I.value.dataLabels.bold?`bold`:`normal`},E(xr(e.value,e,t,e.sign)),11,wt)]))),128))]),(S(!0),g(f,null,w(Y.value,(e,t)=>(S(),g(`g`,null,[_(`rect`,{x:0,y:Q.value.top+(W.value+X.value)*t-W.value/2+Hn.value[t]*Vn.value,width:H.value,height:X.value+W.value<=0?1e-4:X.value+W.value,fill:hr.value===e.id?D(ie)(L.value.highlighter.color,L.value.highlighter.opacity):`transparent`,onMouseenter:n=>yr(e,t,`pointer`),onMouseleave:n=>vr({datapoint:e,seriesIndex:t}),onClick:n=>_r({datapoint:e,seriesIndex:t})},null,40,Tt)]))),256)),T(e.$slots,`svg`,{svg:{...Z.value,drawingArea:Q.value,isPrintingImg:D(wn)||D(Tn)||D(Ur),isPrintingSvg:D(Wr)}},void 0,!0)])],46,lt)),e.$slots.hint?(S(),g(`div`,Et,[T(e.$slots,`hint`,Ye(v({hint:F.value.a11y.translations.keyboardNavigation,isVisible:Yr.value})),void 0,!0)])):h(``,!0)]),e.$slots.watermark?(S(),g(`div`,Dt,[T(e.$slots,`watermark`,Ye(v({isPrinting:D(wn)||D(Tn)||D(Ur)||D(Wr)})),void 0,!0)])):h(``,!0),e.$slots.legend&&z.value.legend.show&&z.value.legend.position===`bottom`?T(e.$slots,`legend`,{legend:q.value},void 0,!0,8):h(``,!0),!e.$slots.legend&&z.value.legend.show&&z.value.legend.position===`bottom`?(S(),g(`div`,{key:9,ref_key:`chartLegend`,ref:Zt},[(S(),m(Le,{key:`legend_bottom_${tn.value}`,legendSet:q.value,config:Bn.value,isCursorPointer:V.value,onClickMarker:s[1]||=({legend:e})=>$n(e.id)},We({item:O(({legend:e,index:t})=>[_(`div`,{onClick:t=>$n(e.id),style:x(`opacity:${M.value.includes(e.id)?.5:1}`)},E(br({legend:e,index:t})),13,Ot)]),legendToggle:O(()=>[q.value.length>2&&z.value.legend.selectAllToggle.show&&!D(hn)?(S(),m(Be,{key:0,backgroundColor:z.value.legend.selectAllToggle.backgroundColor,color:z.value.legend.selectAllToggle.color,fontSize:z.value.legend.fontSize,checked:M.value.length>0,isCursorPointer:V.value,onToggle:Qn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):h(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:O(({legend:e,index:t})=>[Ke(Pe,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${A.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`]))],512)):h(``,!0),e.$slots.source?(S(),g(`div`,{key:10,ref_key:`source`,ref:Qt,dir:`auto`},[T(e.$slots,`source`,{},void 0,!0)],512)):h(``,!0),Ke(D(Ft),{teleportTo:R.value.teleportTo,show:K.value.showTooltip&&Kt.value&&M.value.length<k.dataset.length,backgroundColor:R.value.backgroundColor,color:R.value.color,borderRadius:R.value.borderRadius,borderColor:R.value.borderColor,borderWidth:R.value.borderWidth,fontSize:R.value.fontSize,backgroundOpacity:R.value.backgroundOpacity,position:R.value.position,offsetX:R.value.offsetX,offsetY:R.value.offsetY,parent:j.value,content:qt.value,isFullscreen:Er.value,isCustom:R.value.customFormat&&typeof R.value.customFormat==`function`,smooth:R.value.smooth,backdropFilter:R.value.backdropFilter,smoothForce:R.value.smoothForce,smoothSnapThreshold:R.value.smoothSnapThreshold,isA11yMode:dn.value===`keyboard`,a11yPosition:un.value},{"tooltip-before":O(()=>[T(e.$slots,`tooltip-before`,Ye(v({...gr.value})),void 0,!0)]),tooltip:O(()=>[T(e.$slots,`tooltip`,Ye(v({...gr.value})),void 0,!0)]),"tooltip-after":O(()=>[T(e.$slots,`tooltip-after`,Ye(v({...gr.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Gt.value&&F.value.userOptions.buttons.table?(S(),m(Qe(Fr.value.component),y({key:11},Fr.value.props,{ref_key:`tableUnit`,ref:nn,onClose:Lr}),We({content:O(()=>[_(`div`,{ref_key:`tableContainer`,ref:An,class:`vue-ui-vertical-bar-table atom-data-table`,style:x(`${F.value.table.useDialog?``:`max-height: 300px; margin-top: 24px`}`)},[_(`div`,kt,[F.value.table.useDialog?h(``,!0):(S(),g(`div`,{key:0,role:`button`,tabindex:`0`,style:x(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${V.value?`pointer`:`default`}; background:${F.value.table.th.backgroundColor};`),onClick:Lr,onKeypress:rt(Lr,[`enter`])},[Ke(D(It),{name:`close`,stroke:F.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),_(`div`,{style:{width:`100%`,"container-type":`inline-size`},class:b({"vue-ui-responsive":D(Ir)})},[_(`table`,At,[F.value.table.useDialog?h(``,!0):(S(),g(`caption`,{key:0,style:x({backgroundColor:F.value.table.th.backgroundColor,color:F.value.table.th.color,outline:F.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Ge(E(z.value.title.text)+` `,1),z.value.title.subtitle.text?(S(),g(`span`,jt,E(z.value.title.subtitle.text),1)):h(``,!0)],4)),_(`thead`,null,[_(`tr`,{role:`row`,style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color}`)},[(S(!0),g(f,null,w(Sr.value.head,e=>(S(),g(`th`,{style:x(`outline:${F.value.table.th.outline}`)},[_(`div`,Mt,E(e),1)],4))),256))],4),_(`tr`,null,[_(`th`,{style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`)},null,4),_(`th`,{style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` ∑ `+E(F.value.table.td.prefix)+E(isNaN($.value)?``:$.value.toFixed(F.value.table.td.roundingValue))+E(F.value.table.td.suffix),5),_(`th`,{style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` 100% `,4),_(`th`,{style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`)},null,4),_(`th`,{style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`)},null,4),_(`th`,{style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`)},null,4),_(`th`,{style:x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`)},null,4)])]),_(`tbody`,null,[(S(!0),g(f,null,w(Sr.value.body,(e,t)=>(S(),g(`tr`,{class:b({"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:x(`background:${F.value.table.td.backgroundColor};color:${F.value.table.td.color}`)},[(S(),g(f,null,w(Cr,(t,n)=>_(`td`,{key:t.key,class:`vue-ui-data-table__tbody__td`,style:x(n===0?`outline:${F.value.table.td.outline};font-variant-numeric: tabular-nums;`:`outline:${F.value.table.td.outline}`),"data-cell":Sr.value.head[n]??``},[_(`div`,Pt,[n===0?(S(),g(f,{key:0},[e.color?(S(),g(`span`,{key:0,style:x(`color:${e.color};margin-right:3px`)},`⬤`,4)):h(``,!0),_(`span`,null,E(e.parentName),1)],64)):(S(),g(f,{key:1},[Ge(E(wr(e,t)),1)],64))])],12,Nt)),64))],6))),256))])])],2)])],4)]),_:2},[F.value.table.useDialog?{name:`title`,fn:O(()=>[Ge(E(Fr.value.title),1)]),key:`0`}:void 0,F.value.table.useDialog?{name:`actions`,fn:O(()=>[_(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[2]||=e=>Tr(F.value.userOptions.callbacks.csv),style:x({cursor:V.value?`pointer`:`default`})},[Ke(D(It),{name:`fileCsv`,stroke:Fr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):h(``,!0),T(e.$slots,`skeleton`,{},()=>[D(hn)?(S(),m(ze,{key:0})):h(``,!0)],!0)],46,at))}},[[`__scopeId`,`data-v-8c7e8645`]]);export{it as n,Ft as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useAnimationFrame-D8gcRfnW.js";import{t as n}from"./useNestedProp-DnGoh-XS.js";import{$ as r,X as i,i as a}from"./lib-rPeBMZrn.js";import{t as o}from"./useConfig-CXhXxWjB.js";import{n as s,t as c}from"./useHints-C-TwxM0Y.js";import{t as l}from"./usePrefersMotion-XLHwega2.js";import{Fragment as u,computed as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createTextVNode as h,createVNode as g,defineAsyncComponent as _,normalizeClass as v,normalizeStyle as y,onMounted as b,openBlock as x,ref as S,renderSlot as C,toDisplayString as w,unref as T,useSlots as E,watch as D}from"vue";var O=/* @__PURE__ */ e({default:()=>M}),k=[`aria-labelledby`],A=[`id`],j=[`aria-label`],M={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(e){let O=_(()=>import(`./vue-ui-digits-DG2jj43S.js`).then(e=>e.n)),{vue_ui_kpi:M}=o(),N=l(),P=e,F=d({get:()=>z(),set:e=>e});s({config:()=>F.value,dataset:()=>P.dataset,component:`VueUiKpi`,rules:[c.noHint]});let I=E(),L=d(()=>F.value.debug),R=S(i());b(()=>{I[`chart-background`]&&L.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function z(){return n({userConfig:P.config,defaultConfig:M})}D(()=>P.config,e=>{F.value=z(),W()},{deep:!0});let B=S((P.dataset,P.dataset)),V=S(F.value.useAnimation?F.value.animationValueStart:B.value),H=t(),U=e=>{if(H.cancel(),H.isDisposed())return;let t=F.value.animationFrames,n=Math.abs(e-V.value)/t;if(!F.value.useAnimation||N.value||!Number.isFinite(n)||n<=0){V.value=e;return}function r(){V.value<e?V.value=Math.min(V.value+n,e):V.value>e&&(V.value=Math.max(V.value-n,e)),V.value!==e&&H.request(r)}r()};b(()=>{W()});function W(){H.cancel(),F.value.useAnimation&&!N.value?(V.value=F.value.animationValueStart,U(P.dataset)):V.value=P.dataset}return D(()=>P.dataset,e=>{F.value.useAnimation&&!N.value?U(e):(H.cancel(),V.value=e)}),D(N,e=>{e&&(H.cancel(),V.value=P.dataset)}),(t,n)=>(x(),p(`div`,{class:v(`vue-data-ui-component vue-ui-kpi ${F.value.layoutClass}`),style:y(`background:${F.value.backgroundColor}; ${F.value.layoutCss}`),"aria-labelledby":`kpi-title-${R.value}`},[F.value.title||t.$slots.title?(x(),p(`div`,{key:0,class:v(`vue-ui-kpi-title ${F.value.titleClass}`),style:y(`font-family: ${F.value.fontFamily}; font-size:${F.value.titleFontSize}px; color:${F.value.titleColor}; font-weight:${F.value.titleBold?`bold`:`normal`}; ${F.value.titleCss}`),id:`kpi-title-${R.value}`},[C(t.$slots,`title`,{comment:e.dataset}),h(` `+w(F.value.title),1)],14,A)):f(``,!0),C(t.$slots,`comment-before`,{comment:e.dataset}),m(`div`,{class:v(`vue-ui-kpi-value ${F.value.valueClass}`),style:y(`font-family: ${F.value.fontFamily}; font-size:${F.value.valueFontSize}px; color:${F.value.valueColor}; font-weight:${F.value.valueBold?`bold`:`normal`}; ${F.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":V.value.toFixed(F.value.valueRounding)},[C(t.$slots,`value`,{comment:e.dataset}),F.value.analogDigits.show?(x(),p(`div`,{key:0,style:y({height:F.value.analogDigits.height+`px`})},[g(T(O),{dataset:Number(V.value.toFixed(F.value.valueRounding)),config:{backgroundColor:F.value.backgroundColor,digits:{color:F.value.analogDigits.color,skeletonColor:F.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(x(),p(u,{key:1},[h(w(T(a)(F.value.formatter,V.value,T(r)({p:F.value.prefix,v:V.value,s:F.value.suffix,r:F.value.valueRounding}))),1)],64))],14,j),C(t.$slots,`comment-after`,{comment:e.dataset})],14,k))}};export{O as n,M as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useAnimationFrame-D8gcRfnW.js";import{t as n}from"./useNestedProp-DnGoh-XS.js";import{$ as r,X as i,i as a}from"./lib-rPeBMZrn.js";import{t as o}from"./useConfig-CXhXxWjB.js";import{n as s,t as c}from"./useHints-C-TwxM0Y.js";import{t as l}from"./usePrefersMotion-XLHwega2.js";import{Fragment as u,computed as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createTextVNode as h,createVNode as g,defineAsyncComponent as _,normalizeClass as v,normalizeStyle as y,onMounted as b,openBlock as x,ref as S,renderSlot as C,toDisplayString as w,unref as T,useSlots as E,watch as D}from"vue";var O=/* @__PURE__ */ e({default:()=>M}),k=[`aria-labelledby`],A=[`id`],j=[`aria-label`],M={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(e){let O=_(()=>import(`./vue-ui-digits-gtQiZcOT.js`).then(e=>e.n)),{vue_ui_kpi:M}=o(),N=l(),P=e,F=d({get:()=>z(),set:e=>e});s({config:()=>F.value,dataset:()=>P.dataset,component:`VueUiKpi`,rules:[c.noHint]});let I=E(),L=d(()=>F.value.debug),R=S(i());b(()=>{I[`chart-background`]&&L.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function z(){return n({userConfig:P.config,defaultConfig:M})}D(()=>P.config,e=>{F.value=z(),W()},{deep:!0});let B=S((P.dataset,P.dataset)),V=S(F.value.useAnimation?F.value.animationValueStart:B.value),H=t(),U=e=>{if(H.cancel(),H.isDisposed())return;let t=F.value.animationFrames,n=Math.abs(e-V.value)/t;if(!F.value.useAnimation||N.value||!Number.isFinite(n)||n<=0){V.value=e;return}function r(){V.value<e?V.value=Math.min(V.value+n,e):V.value>e&&(V.value=Math.max(V.value-n,e)),V.value!==e&&H.request(r)}r()};b(()=>{W()});function W(){H.cancel(),F.value.useAnimation&&!N.value?(V.value=F.value.animationValueStart,U(P.dataset)):V.value=P.dataset}return D(()=>P.dataset,e=>{F.value.useAnimation&&!N.value?U(e):(H.cancel(),V.value=e)}),D(N,e=>{e&&(H.cancel(),V.value=P.dataset)}),(t,n)=>(x(),p(`div`,{class:v(`vue-data-ui-component vue-ui-kpi ${F.value.layoutClass}`),style:y(`background:${F.value.backgroundColor}; ${F.value.layoutCss}`),"aria-labelledby":`kpi-title-${R.value}`},[F.value.title||t.$slots.title?(x(),p(`div`,{key:0,class:v(`vue-ui-kpi-title ${F.value.titleClass}`),style:y(`font-family: ${F.value.fontFamily}; font-size:${F.value.titleFontSize}px; color:${F.value.titleColor}; font-weight:${F.value.titleBold?`bold`:`normal`}; ${F.value.titleCss}`),id:`kpi-title-${R.value}`},[C(t.$slots,`title`,{comment:e.dataset}),h(` `+w(F.value.title),1)],14,A)):f(``,!0),C(t.$slots,`comment-before`,{comment:e.dataset}),m(`div`,{class:v(`vue-ui-kpi-value ${F.value.valueClass}`),style:y(`font-family: ${F.value.fontFamily}; font-size:${F.value.valueFontSize}px; color:${F.value.valueColor}; font-weight:${F.value.valueBold?`bold`:`normal`}; ${F.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":V.value.toFixed(F.value.valueRounding)},[C(t.$slots,`value`,{comment:e.dataset}),F.value.analogDigits.show?(x(),p(`div`,{key:0,style:y({height:F.value.analogDigits.height+`px`})},[g(T(O),{dataset:Number(V.value.toFixed(F.value.valueRounding)),config:{backgroundColor:F.value.backgroundColor,digits:{color:F.value.analogDigits.color,skeletonColor:F.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(x(),p(u,{key:1},[h(w(T(a)(F.value.formatter,V.value,T(r)({p:F.value.prefix,v:V.value,s:F.value.suffix,r:F.value.valueRounding}))),1)],64))],14,j),C(t.$slots,`comment-after`,{comment:e.dataset})],14,k))}};export{O as n,M as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as ee,r as i,t as a}from"./annotationSlots-OLiW25XN.js";import{n as o}from"./annotationViewport-X8fvs7pz.js";import{n as te,t as s}from"./tableIntegration-CNoJ1CIY.js";import{t as ne}from"./chartImage-DPGnEuYM.js";import{n as c}from"./resolveChartConfig-0IvbmIE_.js";import{D as re,Dt as ie,Ft as ae,Ht as oe,M as se,S as ce,X as le,Zt as ue,at as de,et as fe,in as pe,nt as me,pt as he,t as ge,w as _e,zt as ve}from"./lib-rPeBMZrn.js";import{n as ye,t as be}from"./useHints-C-TwxM0Y.js";import{t as xe}from"./useConfig-CXhXxWjB.js";import{t as Se}from"./useLoading-DoqqfnmS.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./vue_ui_molecule-DYWXPxKs.js";import{t as Oe}from"./usePanZoom-DlEcNgCv.js";import{t as ke}from"./BaseScanner-m6QR9rwD.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Me,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as m,createTextVNode as Ne,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as v,nextTick as y,normalizeClass as Pe,normalizeProps as b,normalizeStyle as x,onMounted as Fe,openBlock as S,ref as C,renderList as w,renderSlot as T,resolveDynamicComponent as Ie,toDisplayString as E,toRefs as Le,unref as D,useCssVars as Re,watch as O,withCtx as k}from"vue";var ze=/* @__PURE__ */ e({default:()=>Je}),Be=[`id`],Ve={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},He={key:2,style:`width:100%;background:transparent;`},Ue=[`xmlns`,`viewBox`],We=[`width`,`height`],Ge={key:4,class:`vue-data-ui-watermark`},Ke={key:5,"data-dom-to-png-ignore":``,class:`reset-wrapper`},qe={key:6,ref:`source`,dir:`auto`},Je=/*#__PURE__*/ je({__name:`vue-ui-molecule`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectNode`,`copyAlt`],setup(e,{expose:je,emit:ze}){Re(e=>({v452ef5ad:ln.value}));let Je=g(()=>import(`./Title-BliHuXfT.js`).then(e=>e.t)),Ye=g(()=>import(`./Tooltip-B432XpvC.js`)),Xe=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ze=g(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Qe=g(()=>import(`./DataTable-KeuZB1JM.js`)),$e=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),et=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),tt=g(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),nt=g(()=>import(`./RecursiveLinks-CZtG6uWg.js`)),rt=g(()=>import(`./RecursiveLabels-B0d04xSj.js`)),it=g(()=>import(`./RecursiveCircles-BftI1kwF.js`)),at=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_molecule:ot}=xe(),A=e,st=ze,ct=l(()=>!!A.dataset&&A.dataset.length);Fe(()=>{ut()});let lt=l(()=>P.value.debug);function ut(){ve(A.dataset)&&de({componentName:`VueUiMolecule`,type:`dataset`,debug:lt.value})}let dt=C(le()),j=C(!1),M=C(``),N=C(null),ft=C(0),pt=C(0),mt=C(0),ht=C(null),gt=C(null),P=C(B()),F=l(()=>P.value.style.chart.tooltip),I=l(()=>P.value.style.chart),L=l(()=>P.value.userOptions);ye({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiMolecule`,rules:[be.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=l(()=>P.value.userOptions.useCursorPointer),_t=l(()=>pe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#6A6A6A`},links:{stroke:`#6A6A6A80`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:vt,FINAL_DATASET:yt}=Se({...Le(A),FINAL_CONFIG:P,prepareConfig:B,skeletonDataset:A.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:pe({defaultConfig:P.value,userConfig:_t.value})}),{userOptionsVisible:bt,setUserOptionsVisibility:xt,keepUserOptionState:St}=Te({config:P.value}),{svgRef:z}=Ee({config:I.value.title});function B(){return c(A.config,ot,De)}let Ct=ue(A.config);O(()=>A.config,e=>{let t=ue(e),n=t!==Ct;Ct=t;let r=B();n?(P.value=r,bt.value=!P.value.userOptions.showOnChartHover,ut(),pt.value+=1,mt.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 wt=C(0),Tt=()=>{wt.value+=1};O([()=>vt.value,()=>yt.value],async([e])=>{e||(await y(),W.value=jt(),await y(),Tt(),await y(),Zt({x:0,y:0,width:400,height:400}),Yt(!1))},{flush:`post`,deep:!1});let{isPrinting:V,isImaging:H,generatePdf:Et,generateImage:Dt}=Ce({elementId:`cluster_${dt.value}`,fileName:I.value.title.text||`vue-ui-molecule`,options:P.value.userOptions.print}),Ot=l(()=>P.value.userOptions.show&&!I.value.title.text),kt=l(()=>_e(P.value.customPalette)),U=C({showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show});O(P,()=>{U.value={showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show}},{immediate:!0});function At(e,t=0){return Array.isArray(e)&&e.length>0&&e[0].nodes?At(e[0].nodes,t+1):t}function jt(){let e=At(yt.value),t=100,n=t;for(let r=0;r<e;r+=1)t/=1,n+=t;return{height:n,width:n}}let W=C(jt());function Mt(e,t={x:-W.value.width/2.43,y:W.value.height/2},n=W.value.width/1.1,r=24,ee=0,i=0,a=`#BBBBBB`,o=0){if(!Array.isArray(e)||e.length===0)return e;let te=se({plot:t,radius:n,sides:e.length,rotation:ee});return e.forEach((e,t)=>{let s=te.coordinates[t],ne=e.color?(()=>{let t=ce(e.color);return t.startsWith(`#`)?t:`#${t}`})():null,c;ne?c=ne:o===0?c=a:o===1?(c=kt.value[i]||oe[i]||a,i+=1):c=a,e.polygonPath={coordinates:[s]},e.circleRadius=r,e.color=c,e.strokeWidth=Math.min(I.value.links.strokeWidth/(o+1),r/2),e.uid=le(),Array.isArray(e.nodes)&&e.nodes.length&&(e.nodes=Mt(e.nodes,s,n/2.9,r/2.2,ee+Math.PI*t/e.nodes.length,i,c,o+1))}),e}function Nt(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=ce(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 Pt=l(()=>Nt(G.value)),G=l(()=>Mt(fe(yt.value))),K=C(null);function Ft(e){K.value={datapoint:e,seriesIndex:-1,series:G.value,config:P.value};let t=F.value.customFormat;if(ie(t)&&he(()=>t({seriesIndex:-1,datapoint:e,series:G.value,config:P.value})))M.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>`),M.value=`<div style="font-family:inherit">${t}</div>`}}let q=C(null),J=C(null),It=C(null);function Lt(e){It.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:It.value||q.value,seriesIndex:-1}),e?(j.value=!0,Ft(e),J.value=e.uid):(j.value=!1,M.value=``,J.value=null)}function Rt(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 zt=l(()=>Rt(G.value)),Y=l(()=>({head:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor],body:zt.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 Bt(e=null){y(()=>{let t=Y.value.body.map((e,t)=>[[e[0].name],[e[1]],[e[2]]]),n=[[I.value.title.text],[I.value.title.subtitle.text],[[...Y.value.head]]].concat(t),r=re(n);e?e(r):me({csvContent:r,title:I.value.title.text||`vue-ui-molecule`})})}function Vt(){return G.value}let X=C(!1);function Ht(e){X.value=e,ft.value+=1}function Ut(){U.value.showTable=!U.value.showTable}function Wt(){U.value.showDataLabels=!U.value.showDataLabels}function Gt(){U.value.showTooltip=!U.value.showTooltip}function Kt(){U.value.showZoom=!U.value.showZoom}let Z=C(!1);function qt(){Z.value=!Z.value}let Jt=l(()=>!Z.value&&U.value.showZoom),{viewBox:Q,resetZoom:Yt,isZoom:Xt,setInitialViewBox:Zt}=Oe(z,{x:0,y:0,width:Math.max(10,W.value.width),height:Math.max(10,W.value.height)},I.value.zoom.speed,Jt);function Qt(e){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:-1}),st(`selectNode`,e)}let $t=ne(N,()=>I.value.title.text),$=l(()=>s({config:P,style:I,mutableConfig:U,dialog:at,accordion:Ze,isFullscreen:X,parent:N,maxWidth:800,isCursorPointer:R}));O(()=>U.value.showTable,e=>te(e,P,ht));function en(){U.value.showTable=!1,gt.value&&gt.value.setTableIconState(!1)}let tn=l(()=>I.value.backgroundColor),nn=l(()=>I.value.title),{isCallbackImaging:rn,isCallbackSvg:an,generateSvg:on,onGenerateImage:sn}=we({svg:z,title:nn,legend:null,legendItems:null,backgroundColor:tn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Dt});async function cn(){st(`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 ln=l(()=>I.value.color);je({getData:Vt,getImage:$t,generatePdf:Et,generateCsv:Bt,generateImage:Dt,generateSvg:on,toggleTable:Ut,toggleLabels:Wt,toggleTooltip:Gt,toggleAnnotator:qt,toggleFullscreen:Ht,toggleZoom:Kt,copyAlt:cn});let un=l(()=>o(P.value.userOptions?.annotator?.followZoom,Q.value));return(e,o)=>(S(),f(`div`,{ref_key:`moleculeChart`,ref:N,class:Pe(`vue-data-ui-component vue-ui-molecule ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:x(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor}`),id:`cluster_${dt.value}`,onMouseleave:o[2]||=e=>{q.value=null,J.value=null,D(xt)(!1)},onMouseenter:o[3]||=()=>D(xt)(!0)},[L.value.buttons.annotator&&D(z)?(S(),u(D($e),v({key:0},D(i)(L.value.annotator),{svgRef:D(z),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:un.value,backgroundColor:I.value.backgroundColor,color:I.value.color,active:Z.value,isCursorPointer:R.value,onClose:qt}),m({_:2},[w(D(a),t=>({name:t,fn:k(n=>[T(e.$slots,t,b(_(D(ee)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):d(``,!0),Ot.value?(S(),f(`div`,Ve,null,512)):d(``,!0),I.value.title.text?(S(),f(`div`,He,[(S(),u(D(Je),{key:`title_${pt.value}`,config:{title:{cy:`molecule-div-title`,...I.value.title},subtitle:{cy:`molecule-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))])):d(``,!0),L.value.show&&ct.value&&(D(St)||D(bt))?(S(),u(D(et),v({ref_key:`userOptionsRef`,ref:gt,key:`user_options_${ft.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:D(V),isImaging:D(H),uid:dt.value,hasTooltip:L.value.buttons.tooltip&&F.value.show,isTooltip:U.value.showTooltip,isFullscreen:X.value,chartElement:N.value},D(n)(L.value,`pdf csv img svg labels table fullscreen altCopy annotator zoom`),{isAnnotation:Z.value,tableDialog:P.value.table.useDialog,isZoom:U.value.showZoom,isCursorPointer:R.value,onToggleFullscreen:Ht,onGeneratePdf:D(Et),onGenerateCsv:Bt,onGenerateImage:D(sn),onGenerateSvg:D(on),onToggleTable:Ut,onToggleLabels:Wt,onToggleTooltip:Gt,onToggleAnnotator:qt,onToggleZoom:Kt,onCopyAlt:cn,style:{visibility:D(St)?D(bt)?`visible`:`hidden`:`visible`}}),m({_:2},[w(D(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:k(n=>[T(e.$slots,t,b(_(D(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isZoom`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),(S(),f(`svg`,{ref_key:`svgRef`,ref:z,key:`svg_${wt.value}`,xmlns:D(ge),viewBox:`${D(Q).x} ${D(Q).y} ${D(Q).width} ${D(Q).height}`,class:Pe({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),style:x(`overflow: hidden; background:transparent;color:${I.value.color}`)},[h(D(tt)),T(e.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:{...D(Q)},isPrintingImg:D(V)||D(H)||D(rn),isPrintingSvg:D(an)}},void 0,!0),e.$slots[`chart-background`]?(S(),f(`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`}},[T(e.$slots,`chart-background`,{},void 0,!0)],8,We)):d(``,!0),p(`defs`,null,[(S(!0),f(Me,null,w(Object.keys(Pt.value),(e,t)=>(S(),u(Ae,{t:`radial`,id:`gradient_${e}`,key:`gradient_${e}_${t}`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,D(ae)(e,.5),1],[`100%`,e,1]]},null,8,[`id`,`stops`]))),128))]),h(D(nt),{dataset:G.value,color:I.value.links.stroke,backgroundColor:I.value.backgroundColor,useChildColor:I.value.links.useChildColor},null,8,[`dataset`,`color`,`backgroundColor`,`useChildColor`]),h(D(it),{dataset:G.value,hoveredUid:J.value,stroke:I.value.nodes.stroke,strokeHovered:I.value.nodes.strokeHovered,onClick:Qt,onHover:Lt},{node:k(({node:t})=>[T(e.$slots,`node`,b(_({node:t})),void 0,!0)]),"node-svg":k(({nodeSvg:t})=>[T(e.$slots,`node-svg`,b(_({nodeSvg:t})),void 0,!0)]),_:3},8,[`dataset`,`hoveredUid`,`stroke`,`strokeHovered`]),U.value.showDataLabels&&!D(vt)?(S(),u(D(rt),{key:1,dataset:G.value,color:I.value.color,hoveredUid:J.value},null,8,[`dataset`,`color`,`hoveredUid`])):d(``,!0),T(e.$slots,`svg`,{svg:{...W.value,drawingArea:{...D(Q)},isPrintingImg:D(V)||D(H)||D(rn),isPrintingSvg:D(an)}},void 0,!0)],14,Ue)),e.$slots.watermark?(S(),f(`div`,Ge,[T(e.$slots,`watermark`,b(_({isPrinting:D(V)||D(H)||D(rn)||D(an)})),void 0,!0)])):d(``,!0),D(Xt)?(S(),f(`div`,Ke,[T(e.$slots,`reset-action`,{reset:D(Yt)},()=>[p(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:x({background:I.value.backgroundColor,cursor:R.value?`pointer`:`default`}),onClick:o[0]||=e=>D(Yt)(!0)},[h(D(Xe),{name:`refresh`,stroke:I.value.color},null,8,[`stroke`])],4)],!0)])):d(``,!0),e.$slots.source?(S(),f(`div`,qe,[T(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),h(D(Ye),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&j.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:N.value,content:M.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":k(()=>[T(e.$slots,`tooltip-before`,b(_({...K.value})),void 0,!0)]),tooltip:k(()=>[T(e.$slots,`tooltip`,b(_({...K.value})),void 0,!0)]),"tooltip-after":k(()=>[T(e.$slots,`tooltip-after`,b(_({...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`]),ct.value&&L.value.buttons.table?(S(),u(Ie($.value.component),v({key:7},$.value.props,{ref_key:`tableUnit`,ref:ht,onClose:en}),m({content:k(()=>[(S(),u(D(Qe),{key:`table_${mt.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:en},{th:k(({th:e})=>[p(`div`,null,E(e),1)]),td:k(({td:e})=>[Ne(E(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[Ne(E($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:o[1]||=e=>Bt(L.value.callbacks.csv),style:x({cursor:R.value?`pointer`:`default`})},[h(D(Xe),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),T(e.$slots,`skeleton`,{},()=>[D(vt)?(S(),u(ke,{key:0})):d(``,!0)],!0)],46,Be))}},[[`__scopeId`,`data-v-cf33e049`]]);export{ze as n,Je as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as ee,r as i,t as a}from"./annotationSlots-OLiW25XN.js";import{n as o}from"./annotationViewport-X8fvs7pz.js";import{n as te,t as s}from"./tableIntegration-CNoJ1CIY.js";import{t as ne}from"./chartImage-DPGnEuYM.js";import{n as c}from"./resolveChartConfig-0IvbmIE_.js";import{D as re,Dt as ie,Ft as ae,Ht as oe,M as se,S as ce,X as le,Zt as ue,at as de,et as fe,in as pe,nt as me,pt as he,t as ge,w as _e,zt as ve}from"./lib-rPeBMZrn.js";import{n as ye,t as be}from"./useHints-C-TwxM0Y.js";import{t as xe}from"./useConfig-CXhXxWjB.js";import{t as Se}from"./useLoading-DoqqfnmS.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./vue_ui_molecule-DYWXPxKs.js";import{t as Oe}from"./usePanZoom-DlEcNgCv.js";import{t as ke}from"./BaseScanner-m6QR9rwD.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Me,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as m,createTextVNode as Ne,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as v,nextTick as y,normalizeClass as Pe,normalizeProps as b,normalizeStyle as x,onMounted as Fe,openBlock as S,ref as C,renderList as w,renderSlot as T,resolveDynamicComponent as Ie,toDisplayString as E,toRefs as Le,unref as D,useCssVars as Re,watch as O,withCtx as k}from"vue";var ze=/* @__PURE__ */ e({default:()=>Je}),Be=[`id`],Ve={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},He={key:2,style:`width:100%;background:transparent;`},Ue=[`xmlns`,`viewBox`],We=[`width`,`height`],Ge={key:4,class:`vue-data-ui-watermark`},Ke={key:5,"data-dom-to-png-ignore":``,class:`reset-wrapper`},qe={key:6,ref:`source`,dir:`auto`},Je=/*#__PURE__*/ je({__name:`vue-ui-molecule`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectNode`,`copyAlt`],setup(e,{expose:je,emit:ze}){Re(e=>({v452ef5ad:ln.value}));let Je=g(()=>import(`./Title-BliHuXfT.js`).then(e=>e.t)),Ye=g(()=>import(`./Tooltip-B432XpvC.js`)),Xe=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ze=g(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Qe=g(()=>import(`./DataTable-KeuZB1JM.js`)),$e=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),et=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),tt=g(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),nt=g(()=>import(`./RecursiveLinks-CZtG6uWg.js`)),rt=g(()=>import(`./RecursiveLabels-B0d04xSj.js`)),it=g(()=>import(`./RecursiveCircles-BftI1kwF.js`)),at=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_molecule:ot}=xe(),A=e,st=ze,ct=l(()=>!!A.dataset&&A.dataset.length);Fe(()=>{ut()});let lt=l(()=>P.value.debug);function ut(){ve(A.dataset)&&de({componentName:`VueUiMolecule`,type:`dataset`,debug:lt.value})}let dt=C(le()),j=C(!1),M=C(``),N=C(null),ft=C(0),pt=C(0),mt=C(0),ht=C(null),gt=C(null),P=C(B()),F=l(()=>P.value.style.chart.tooltip),I=l(()=>P.value.style.chart),L=l(()=>P.value.userOptions);ye({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiMolecule`,rules:[be.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=l(()=>P.value.userOptions.useCursorPointer),_t=l(()=>pe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#6A6A6A`},links:{stroke:`#6A6A6A80`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:vt,FINAL_DATASET:yt}=Se({...Le(A),FINAL_CONFIG:P,prepareConfig:B,skeletonDataset:A.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:pe({defaultConfig:P.value,userConfig:_t.value})}),{userOptionsVisible:bt,setUserOptionsVisibility:xt,keepUserOptionState:St}=Te({config:P.value}),{svgRef:z}=Ee({config:I.value.title});function B(){return c(A.config,ot,De)}let Ct=ue(A.config);O(()=>A.config,e=>{let t=ue(e),n=t!==Ct;Ct=t;let r=B();n?(P.value=r,bt.value=!P.value.userOptions.showOnChartHover,ut(),pt.value+=1,mt.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 wt=C(0),Tt=()=>{wt.value+=1};O([()=>vt.value,()=>yt.value],async([e])=>{e||(await y(),W.value=jt(),await y(),Tt(),await y(),Zt({x:0,y:0,width:400,height:400}),Yt(!1))},{flush:`post`,deep:!1});let{isPrinting:V,isImaging:H,generatePdf:Et,generateImage:Dt}=Ce({elementId:`cluster_${dt.value}`,fileName:I.value.title.text||`vue-ui-molecule`,options:P.value.userOptions.print}),Ot=l(()=>P.value.userOptions.show&&!I.value.title.text),kt=l(()=>_e(P.value.customPalette)),U=C({showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show});O(P,()=>{U.value={showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show}},{immediate:!0});function At(e,t=0){return Array.isArray(e)&&e.length>0&&e[0].nodes?At(e[0].nodes,t+1):t}function jt(){let e=At(yt.value),t=100,n=t;for(let r=0;r<e;r+=1)t/=1,n+=t;return{height:n,width:n}}let W=C(jt());function Mt(e,t={x:-W.value.width/2.43,y:W.value.height/2},n=W.value.width/1.1,r=24,ee=0,i=0,a=`#BBBBBB`,o=0){if(!Array.isArray(e)||e.length===0)return e;let te=se({plot:t,radius:n,sides:e.length,rotation:ee});return e.forEach((e,t)=>{let s=te.coordinates[t],ne=e.color?(()=>{let t=ce(e.color);return t.startsWith(`#`)?t:`#${t}`})():null,c;ne?c=ne:o===0?c=a:o===1?(c=kt.value[i]||oe[i]||a,i+=1):c=a,e.polygonPath={coordinates:[s]},e.circleRadius=r,e.color=c,e.strokeWidth=Math.min(I.value.links.strokeWidth/(o+1),r/2),e.uid=le(),Array.isArray(e.nodes)&&e.nodes.length&&(e.nodes=Mt(e.nodes,s,n/2.9,r/2.2,ee+Math.PI*t/e.nodes.length,i,c,o+1))}),e}function Nt(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=ce(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 Pt=l(()=>Nt(G.value)),G=l(()=>Mt(fe(yt.value))),K=C(null);function Ft(e){K.value={datapoint:e,seriesIndex:-1,series:G.value,config:P.value};let t=F.value.customFormat;if(ie(t)&&he(()=>t({seriesIndex:-1,datapoint:e,series:G.value,config:P.value})))M.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>`),M.value=`<div style="font-family:inherit">${t}</div>`}}let q=C(null),J=C(null),It=C(null);function Lt(e){It.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:It.value||q.value,seriesIndex:-1}),e?(j.value=!0,Ft(e),J.value=e.uid):(j.value=!1,M.value=``,J.value=null)}function Rt(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 zt=l(()=>Rt(G.value)),Y=l(()=>({head:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor],body:zt.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 Bt(e=null){y(()=>{let t=Y.value.body.map((e,t)=>[[e[0].name],[e[1]],[e[2]]]),n=[[I.value.title.text],[I.value.title.subtitle.text],[[...Y.value.head]]].concat(t),r=re(n);e?e(r):me({csvContent:r,title:I.value.title.text||`vue-ui-molecule`})})}function Vt(){return G.value}let X=C(!1);function Ht(e){X.value=e,ft.value+=1}function Ut(){U.value.showTable=!U.value.showTable}function Wt(){U.value.showDataLabels=!U.value.showDataLabels}function Gt(){U.value.showTooltip=!U.value.showTooltip}function Kt(){U.value.showZoom=!U.value.showZoom}let Z=C(!1);function qt(){Z.value=!Z.value}let Jt=l(()=>!Z.value&&U.value.showZoom),{viewBox:Q,resetZoom:Yt,isZoom:Xt,setInitialViewBox:Zt}=Oe(z,{x:0,y:0,width:Math.max(10,W.value.width),height:Math.max(10,W.value.height)},I.value.zoom.speed,Jt);function Qt(e){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:-1}),st(`selectNode`,e)}let $t=ne(N,()=>I.value.title.text),$=l(()=>s({config:P,style:I,mutableConfig:U,dialog:at,accordion:Ze,isFullscreen:X,parent:N,maxWidth:800,isCursorPointer:R}));O(()=>U.value.showTable,e=>te(e,P,ht));function en(){U.value.showTable=!1,gt.value&&gt.value.setTableIconState(!1)}let tn=l(()=>I.value.backgroundColor),nn=l(()=>I.value.title),{isCallbackImaging:rn,isCallbackSvg:an,generateSvg:on,onGenerateImage:sn}=we({svg:z,title:nn,legend:null,legendItems:null,backgroundColor:tn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Dt});async function cn(){st(`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 ln=l(()=>I.value.color);je({getData:Vt,getImage:$t,generatePdf:Et,generateCsv:Bt,generateImage:Dt,generateSvg:on,toggleTable:Ut,toggleLabels:Wt,toggleTooltip:Gt,toggleAnnotator:qt,toggleFullscreen:Ht,toggleZoom:Kt,copyAlt:cn});let un=l(()=>o(P.value.userOptions?.annotator?.followZoom,Q.value));return(e,o)=>(S(),f(`div`,{ref_key:`moleculeChart`,ref:N,class:Pe(`vue-data-ui-component vue-ui-molecule ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:x(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor}`),id:`cluster_${dt.value}`,onMouseleave:o[2]||=e=>{q.value=null,J.value=null,D(xt)(!1)},onMouseenter:o[3]||=()=>D(xt)(!0)},[L.value.buttons.annotator&&D(z)?(S(),u(D($e),v({key:0},D(i)(L.value.annotator),{svgRef:D(z),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:un.value,backgroundColor:I.value.backgroundColor,color:I.value.color,active:Z.value,isCursorPointer:R.value,onClose:qt}),m({_:2},[w(D(a),t=>({name:t,fn:k(n=>[T(e.$slots,t,b(_(D(ee)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):d(``,!0),Ot.value?(S(),f(`div`,Ve,null,512)):d(``,!0),I.value.title.text?(S(),f(`div`,He,[(S(),u(D(Je),{key:`title_${pt.value}`,config:{title:{cy:`molecule-div-title`,...I.value.title},subtitle:{cy:`molecule-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))])):d(``,!0),L.value.show&&ct.value&&(D(St)||D(bt))?(S(),u(D(et),v({ref_key:`userOptionsRef`,ref:gt,key:`user_options_${ft.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:D(V),isImaging:D(H),uid:dt.value,hasTooltip:L.value.buttons.tooltip&&F.value.show,isTooltip:U.value.showTooltip,isFullscreen:X.value,chartElement:N.value},D(n)(L.value,`pdf csv img svg labels table fullscreen altCopy annotator zoom`),{isAnnotation:Z.value,tableDialog:P.value.table.useDialog,isZoom:U.value.showZoom,isCursorPointer:R.value,onToggleFullscreen:Ht,onGeneratePdf:D(Et),onGenerateCsv:Bt,onGenerateImage:D(sn),onGenerateSvg:D(on),onToggleTable:Ut,onToggleLabels:Wt,onToggleTooltip:Gt,onToggleAnnotator:qt,onToggleZoom:Kt,onCopyAlt:cn,style:{visibility:D(St)?D(bt)?`visible`:`hidden`:`visible`}}),m({_:2},[w(D(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:k(n=>[T(e.$slots,t,b(_(D(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isZoom`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),(S(),f(`svg`,{ref_key:`svgRef`,ref:z,key:`svg_${wt.value}`,xmlns:D(ge),viewBox:`${D(Q).x} ${D(Q).y} ${D(Q).width} ${D(Q).height}`,class:Pe({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),style:x(`overflow: hidden; background:transparent;color:${I.value.color}`)},[h(D(tt)),T(e.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:{...D(Q)},isPrintingImg:D(V)||D(H)||D(rn),isPrintingSvg:D(an)}},void 0,!0),e.$slots[`chart-background`]?(S(),f(`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`}},[T(e.$slots,`chart-background`,{},void 0,!0)],8,We)):d(``,!0),p(`defs`,null,[(S(!0),f(Me,null,w(Object.keys(Pt.value),(e,t)=>(S(),u(Ae,{t:`radial`,id:`gradient_${e}`,key:`gradient_${e}_${t}`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,D(ae)(e,.5),1],[`100%`,e,1]]},null,8,[`id`,`stops`]))),128))]),h(D(nt),{dataset:G.value,color:I.value.links.stroke,backgroundColor:I.value.backgroundColor,useChildColor:I.value.links.useChildColor},null,8,[`dataset`,`color`,`backgroundColor`,`useChildColor`]),h(D(it),{dataset:G.value,hoveredUid:J.value,stroke:I.value.nodes.stroke,strokeHovered:I.value.nodes.strokeHovered,onClick:Qt,onHover:Lt},{node:k(({node:t})=>[T(e.$slots,`node`,b(_({node:t})),void 0,!0)]),"node-svg":k(({nodeSvg:t})=>[T(e.$slots,`node-svg`,b(_({nodeSvg:t})),void 0,!0)]),_:3},8,[`dataset`,`hoveredUid`,`stroke`,`strokeHovered`]),U.value.showDataLabels&&!D(vt)?(S(),u(D(rt),{key:1,dataset:G.value,color:I.value.color,hoveredUid:J.value},null,8,[`dataset`,`color`,`hoveredUid`])):d(``,!0),T(e.$slots,`svg`,{svg:{...W.value,drawingArea:{...D(Q)},isPrintingImg:D(V)||D(H)||D(rn),isPrintingSvg:D(an)}},void 0,!0)],14,Ue)),e.$slots.watermark?(S(),f(`div`,Ge,[T(e.$slots,`watermark`,b(_({isPrinting:D(V)||D(H)||D(rn)||D(an)})),void 0,!0)])):d(``,!0),D(Xt)?(S(),f(`div`,Ke,[T(e.$slots,`reset-action`,{reset:D(Yt)},()=>[p(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:x({background:I.value.backgroundColor,cursor:R.value?`pointer`:`default`}),onClick:o[0]||=e=>D(Yt)(!0)},[h(D(Xe),{name:`refresh`,stroke:I.value.color},null,8,[`stroke`])],4)],!0)])):d(``,!0),e.$slots.source?(S(),f(`div`,qe,[T(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),h(D(Ye),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&j.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:N.value,content:M.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":k(()=>[T(e.$slots,`tooltip-before`,b(_({...K.value})),void 0,!0)]),tooltip:k(()=>[T(e.$slots,`tooltip`,b(_({...K.value})),void 0,!0)]),"tooltip-after":k(()=>[T(e.$slots,`tooltip-after`,b(_({...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`]),ct.value&&L.value.buttons.table?(S(),u(Ie($.value.component),v({key:7},$.value.props,{ref_key:`tableUnit`,ref:ht,onClose:en}),m({content:k(()=>[(S(),u(D(Qe),{key:`table_${mt.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:en},{th:k(({th:e})=>[p(`div`,null,E(e),1)]),td:k(({td:e})=>[Ne(E(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[Ne(E($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:o[1]||=e=>Bt(L.value.callbacks.csv),style:x({cursor:R.value?`pointer`:`default`})},[h(D(Xe),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),T(e.$slots,`skeleton`,{},()=>[D(vt)?(S(),u(ke,{key:0})):d(``,!0)],!0)],46,Be))}},[[`__scopeId`,`data-v-cf33e049`]]);export{ze as n,Je as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useAnimationFrame-D8gcRfnW.js";import{n,r,t as i}from"./userOptionsSlots-CWtXN5Q6.js";import{n as a,r as ee,t as te}from"./annotationSlots-OLiW25XN.js";import{n as ne,t as re}from"./tableIntegration-CNoJ1CIY.js";import{t as ie}from"./chartImage-DPGnEuYM.js";import{t as ae}from"./resolveChartConfig-0IvbmIE_.js";import{$ as o,D as oe,Jt as s,Lt as se,M as ce,X as le,Yt as ue,at as de,i as fe,in as pe,nt as me,t as he,zt as ge}from"./lib-rPeBMZrn.js";import{c as _e}from"./canvas-lib-22VpOI4_.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./useConfig-CXhXxWjB.js";import{t as xe}from"./useLoading-DoqqfnmS.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{n as De}from"./Title-BliHuXfT.js";import{t as Oe}from"./vue_ui_mood_radar-BSOkyeXz.js";import{t as ke}from"./Legend-W9YVYVX-.js";import{t as Ae}from"./BaseScanner-m6QR9rwD.js";import{t as je}from"./A11yDataTable-DWNlWXzs.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Pe,Teleport as Fe,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ie,createTextVNode as Le,createVNode as p,defineAsyncComponent as m,guardReactiveProps as Re,mergeProps as ze,nextTick as Be,normalizeClass as Ve,normalizeProps as He,normalizeStyle as h,onBeforeUnmount as Ue,onMounted as We,openBlock as g,ref as _,renderList as Ge,renderSlot as v,resolveDynamicComponent as Ke,toDisplayString as y,toRefs as qe,unref as b,watch as Je,withCtx as x,withKeys as Ye}from"vue";var Xe=/* @__PURE__ */ e({default:()=>S}),Ze=[`id`],Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`aria-describedby`,`viewBox`],nt=[`width`,`height`],rt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],it=[`d`,`stroke`,`stroke-width`],at=[`transform`],ot=[`stroke`],st=[`aria-label`,`fill`],ct=[`transform`],lt=[`stroke`],ut=[`aria-label`,`fill`],dt=[`transform`],ft=[`stroke`],pt=[`aria-label`,`fill`],mt=[`transform`],ht=[`stroke`],gt=[`aria-label`,`fill`],_t=[`transform`],vt=[`stroke`],yt=[`aria-label`,`fill`],bt=[`d`,`stroke`,`stroke-width`,`fill`],xt=[`x1`,`y1`,`x2`,`y2`,`stroke`],St=[`cx`,`cy`,`fill`,`stroke`],Ct=[`cx`,`cy`,`fill`,`stroke`],wt=[`x`,`y`,`fill`,`font-weight`],Tt=[`x`,`y`,`fill`],Et={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Dt={key:5,class:`vue-data-ui-watermark`},Ot=[`id`],kt=[`onClick`],At={key:0},jt={key:1},S=/*#__PURE__*/ Ne({__name:`vue-ui-mood-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:Ne,emit:Xe}){let S=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Mt=m(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Nt=m(()=>import(`./DataTable-KeuZB1JM.js`)),Pt=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ft=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),It=m(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),Lt=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_mood_radar:Rt}=be(),C=e,zt=Xe,w=_(le()),T=_(null),E=_(null),Bt=_(null),Vt=_(0),Ht=_(0),Ut=_(0),Wt=_(null),Gt=_(null),Kt=_(null),qt=_(null),Jt=t(),Yt=0;function Xt(){Yt+=1,Jt.cancel(),Kt.value?.disconnect(),Kt.value=null,qt.value=null}Ue(Xt);let Zt=_(null),Qt=_(!1),$t=_(null),en=_(null),D=_(null),tn=_(!1),nn=c(()=>!!C.dataset&&Object.keys(C.dataset).length),O=_(dn()),k=c(()=>O.value.userOptions),A=c(()=>O.value.style.chart.layout.smileys),j=c(()=>O.value.style.chart.layout),M=c(()=>O.value.style.chart);ve({config:()=>O.value,dataset:()=>C.dataset,component:`VueUiMoodRadar`,rules:[ye.noHint]});let N=c(()=>O.value.userOptions.useCursorPointer),rn=c(()=>pe({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:O.value.skeletonConfig??{}})),{loading:an,FINAL_DATASET:P}=xe({...qe(C),FINAL_CONFIG:O,prepareConfig:dn,callback:()=>{Promise.resolve().then(async()=>{await Be(),R.value.showTable=O.value.table.show})},skeletonDataset:C.config?.skeletonDataset??{1:1,2:1,3:1,4:1,5:1},skeletonConfig:pe({defaultConfig:O.value,userConfig:rn.value})});We(()=>{Qt.value=!0,sn()});let on=c(()=>O.value.debug);function sn(){if(Xt(),ge(C.dataset)&&de({componentName:`VueUiMoodRadar`,type:`dataset`,debug:on.value}),O.value.responsive&&T.value?.parentNode){let e=Yt,t=_e(()=>{if(e!==Yt||Jt.isDisposed())return;let{width:t,height:n}=Ce({chart:T.value,title:M.value.title.text?Wt.value:null,legend:M.value.legend.show?Gt.value:null,noTitle:Bt.value,source:Zt.value});Jt.request(()=>{z.value.width=t,z.value.height=n-12})});Kt.value=new ResizeObserver(t),qt.value=T.value.parentNode,Kt.value.observe(qt.value)}}let{userOptionsVisible:cn,setUserOptionsVisibility:ln,keepUserOptionState:un}=Te({config:O.value}),{svgRef:F}=Ee({config:M.value.title});function dn(){return ae(C.config,Rt,Oe)}Je(()=>C.config,e=>{O.value=dn(),cn.value=!O.value.userOptions.showOnChartHover,sn(),Vt.value+=1,Ht.value+=1,Ut.value+=1,R.value.showTable=O.value.table.show},{deep:!0});let{isPrinting:I,isImaging:L,generatePdf:fn,generateImage:pn}=Se({elementId:w.value,fileName:M.value.title.text||`vue-ui-mood-radar`,options:O.value.userOptions.print}),mn=c(()=>O.value.userOptions.show&&!M.value.title.text),R=_({showTable:O.value.table.show}),z=_({height:256,width:256}),hn={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}},gn=c(()=>{let e={};return xn.value.forEach(t=>{e[t.key]={x:t.x,y:t.y}}),e});function B(e){let t=hn[e],n=gn.value[e]||t;return`translate(${n.x-t.x}, ${n.y-t.y})`}let _n=c(()=>ce({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 vn({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 yn=c(()=>Math.max(...Object.values(P.value).map(e=>isNaN(e)?0:e))),V=c(()=>Object.values(P.value).reduce((e,t)=>(isNaN(e)?0:e)+(isNaN(t)?0:t),0)),H=c(()=>Object.keys(P.value).map((e,t)=>{let n=typeof P.value[e]!=`number`||isNaN(P.value[e])?0:P.value[e];return{index:t,key:e,value:n,proportion:n/V.value,color:A.value.colors[e]}}).map(e=>({...e,onSelect:()=>U(e.key)})).sort((e,t)=>t.key-e.key)),bn=c(()=>H.value.map((e,t)=>({...e,display:`${fe(j.value.dataLabel.formatter,e.value,o({p:j.value.dataLabel.prefix,v:e.value,s:j.value.dataLabel.suffix,r:j.value.dataLabel.roundingValue}))}${an.value?``:` (${o({v:e.proportion*100,s:`%`,r:M.value.legend.roundingPercentage})})`}`}))),xn=c(()=>([`1`,`2`,`3`,`4`,`5`].forEach(e=>{[null,void 0].includes(P.value[e])&&de({componentName:`VueUiMoodRadar`,type:`datasetAttribute`,property:e,debug:on.value})}),_n.value.coordinates.map((e,t)=>{let n=vn({centerX:z.value.width/2,centerY:z.value.height/2,apexX:e.x,apexY:e.y,proportion:H.value[t].value/yn.value,key:H.value[t].key,value:H.value[t].value});return{...e,plots:n,key:H.value[t].key}}))),Sn=c(()=>({cy:`mood-radar-legend`,backgroundColor:M.value.legend.backgroundColor,color:M.value.legend.color,fontSize:M.value.legend.fontSize,paddingBottom:12,fontWeight:M.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);O.value.events.datapointEnter&&O.value.events.datapointEnter({datapoint:t,seriesIndex:t.index})}function G(e){E.value=null;let t=H.value.find(t=>t.key===e);O.value.events.datapointLeave&&O.value.events.datapointLeave({datapoint:t,seriesIndex:t.index})}function K(e){let t=H.value.find(t=>t.key===e);O.value.events.datapointClick&&O.value.events.datapointClick({datapoint:t,seriesIndex:t.index})}let q=c(()=>({head:H.value.map(e=>({name:e.key,color:e.color})),body:H.value.map(e=>isNaN(e.value)?0:e.value)}));function Cn(e=null){Be(()=>{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=[[M.value.title.text],[M.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=oe(n);e?e(r):me({csvContent:r,title:M.value.title.text||`vue-ui-mood-radar`})})}let J=c(()=>({head:[`__SUM__`,Number(V.value.toFixed(O.value.table.td.roundingValue)).toLocaleString(),`100%`],body:q.value.head.map((e,t)=>[{color:e.color,name:e.name},q.value.body[t].toFixed(O.value.table.td.roundingValue),isNaN(q.value.body[t]/V.value)?`-`:(q.value.body[t]/V.value*100).toFixed(O.value.table.td.roundingPercentage)+`%`]),config:{th:{backgroundColor:O.value.table.th.backgroundColor,color:O.value.table.th.color,outline:O.value.table.th.outline},td:{backgroundColor:O.value.table.td.backgroundColor,color:O.value.table.td.color,outline:O.value.table.td.outline},breakpoint:O.value.table.responsiveBreakpoint},colNames:[O.value.table.columnNames.series,O.value.table.columnNames.value,O.value.table.columnNames.percentage]}));function wn(){return H.value}function Tn(){R.value.showTable=!R.value.showTable}let Y=_(!1);function En(e){Y.value=e}let X=_(!1);function Dn(){X.value=!X.value}let On=ie(T,()=>M.value.title.text),Z=c(()=>re({config:O,style:M,mutableConfig:R,dialog:Lt,accordion:Mt,isFullscreen:Y,parent:T,maxWidth:800,isCursorPointer:N}));Je(()=>R.value.showTable,e=>ne(e,O,$t));function kn(){R.value.showTable=!1,en.value&&en.value.setTableIconState(!1)}let An=c(()=>bn.value.map(e=>({...e,name:e.display,shape:`circle`}))),jn=c(()=>M.value.backgroundColor),Mn=c(()=>M.value.legend),Nn=c(()=>M.value.title),{isCallbackImaging:Pn,isCallbackSvg:Fn,generateSvg:In,onGenerateImage:Ln}=we({svg:F,title:Nn,legend:Mn,legendItems:An,backgroundColor:jn,getSvgCallback:()=>O.value.userOptions.callbacks.svg,generateImage:pn});async function Rn(){zt(`copyAlt`,{config:O.value,dataset:H.value}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:H.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Q=c(()=>H.value.map(e=>String(e.key)));function zn(){ln(!0)}function Bn(){ln(!1)}function Vn(e){return H.value.find(t=>String(t.key)===String(e))}function Hn(e,t,n){return fe(j.value.dataLabel.formatter,e,o({p:j.value.dataLabel.prefix,v:e,s:j.value.dataLabel.suffix,r:j.value.dataLabel.roundingValue}),{datapoint:n,seriesIndex:t})}function Un(e){return o({v:V.value?e/V.value*100:0,s:`%`,r:j.value.dataLabel.roundingPercentage})}function $(e){let t=Vn(e);return t?`${e}, ${Hn(t.value,t.index,t)}, ${Un(t.value)}`:`${e}`}function Wn(e){let t=Q.value[e];t&&(D.value=e,E.value=t)}function Gn(){tn.value=!0}function Kn(){D.value=null,E.value=null,tn.value=!1}function qn(e){if(!F.value||!Q.value.length||X.value||document.activeElement!==F.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){D.value=null,E.value=null;return}if(r){if(D.value===null)return;let e=Q.value[D.value];if(!e)return;U(e);return}let a=D.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)),Wn(a)}function Jn(e,t){let n=e.key===`Enter`||e.key===` `,r=e.key===`Escape`;(n||r)&&(e.preventDefault(),e.stopPropagation(),r?(D.value=null,E.value=null):U(String(t)))}let Yn=c(()=>({headers:J.value?.colNames??[],rows:H.value.map(e=>[String(e.key),Hn(e.value,e.index,e),Un(e.value)])}));return Ne({getData:wn,getImage:On,generatePdf:fn,generateCsv:Cn,generateImage:pn,generateSvg:In,toggleTable:Tn,toggleAnnotator:Dn,toggleFullscreen:En,copyAlt:Rn}),(e,t)=>(g(),d(`div`,{class:Ve(`vue-data-ui-component vue-ui-mood-radar ${Y.value?`vue-data-ui-wrapper-fullscreen`:``} ${O.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`moodRadarChart`,ref:T,id:`${w.value}`,style:h(`font-family:${O.value.style.fontFamily};width:100%; text-align:center;background:${M.value.backgroundColor}`),onMouseenter:zn,onMouseleave:Bn},[f(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[f(`p`,null,y(O.value.a11y.translations.keyboardNavigation),1)],8,Qe),O.value.a11y.includeTable&&Yn.value?.rows?.length?(g(),l(je,{key:0,uid:w.value,head:Yn.value.headers,body:Yn.value.rows,notice:O.value.a11y.translations.tableAvailable,caption:O.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),k.value.buttons.annotator?(g(),l(b(Pt),ze({key:1},b(ee)(k.value.annotator),{svgRef:b(F),backgroundColor:M.value.backgroundColor,color:M.value.color,active:X.value,isCursorPointer:N.value,palette:k.value.annotatorPalette,onClose:Dn}),Ie({_:2},[Ge(b(te),t=>({name:t,fn:x(n=>[v(e.$slots,t,He(Re(b(a)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),mn.value?(g(),d(`div`,{key:2,ref_key:`noTitle`,ref:Bt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),M.value.title.text?(g(),d(`div`,{key:3,ref_key:`chartTitle`,ref:Wt,style:`width:100%;background:transparent`},[p(De,{config:{title:{cy:`mood-radar-title`,...M.value.title},subtitle:{cy:`mood-radar-subtitle`,...M.value.title.subtitle}}},null,8,[`config`])],512)):u(``,!0),f(`div`,{id:`legend-top-${w.value}`},null,8,$e),k.value.show&&nn.value&&(b(un)||b(cn))?(g(),l(b(Ft),ze({key:4,ref_key:`userOptionsRef`,ref:en,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:b(I),isImaging:b(L),uid:w.value,isFullscreen:Y.value,chartElement:T.value},b(r)(k.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:X.value,tableDialog:O.value.table.useDialog,isCursorPointer:N.value,onToggleFullscreen:En,onGeneratePdf:b(fn),onGenerateCsv:Cn,onGenerateImage:b(Ln),onGenerateSvg:b(In),onToggleTable:Tn,onToggleAnnotator:Dn,onCopyAlt:Rn,style:{visibility:b(un)?b(cn)?`visible`:`hidden`:`visible`}}),Ie({_:2},[Ge(b(n)(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,He(Re(b(i)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),f(`div`,et,[(g(),d(`svg`,{ref_key:`svgRef`,ref:F,xmlns:b(he),"aria-describedby":`chart-instructions-${w.value}`,viewBox:`0 0 ${z.value.width} ${z.value.height}`,class:Ve({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),style:h(`overflow:visible;background:transparent;color:${M.value.color}`),tabindex:`0`,onFocus:Gn,onBlur:Kn,onKeydown:qn},[p(b(It)),v(e.$slots,`svg-underlayer`,{svg:{...z.value,isPrintingImg:b(I)||b(L)||b(Pn),isPrintingSvg:b(Fn)}},void 0,!0),e.$slots[`chart-background`]?(g(),d(`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,nt)):u(``,!0),f(`defs`,null,[p(Me,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`mood_radar_gradient_${w.value}`,stops:[[`0%`,b(s)(j.value.dataPolygon.color,j.value.dataPolygon.opacity),1],[`100%`,b(s)(b(ue)(j.value.dataPolygon.color,j.value.dataPolygon.gradient.intensity/100),j.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`])]),(g(!0),d(Pe,null,Ge(_n.value.coordinates,e=>(g(),d(`line`,{x1:z.value.width/2,y1:z.value.height/2,x2:e.x,y2:e.y,stroke:j.value.grid.stroke,"stroke-width":j.value.grid.strokeWidth},null,8,rt))),256)),f(`path`,{d:_n.value.path,fill:`none`,stroke:j.value.outerPolygon.stroke,"stroke-width":j.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,it),f(`g`,{transform:B(`5`)},[f(`path`,{fill:`none`,stroke:A.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,ot),f(`circle`,{role:`button`,class:`vue-ui-mood-radar-trap`,cx:`128`,cy:`25`,r:`20`,"aria-label":$(`5`),fill:E.value===`5`?b(s)(A.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,st)],8,at),f(`g`,{transform:B(`4`)},[f(`path`,{fill:`none`,stroke:A.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,lt),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`227`,cy:`95.5`,r:`20`,"aria-label":$(`4`),fill:E.value===`4`?b(s)(A.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,ut)],8,ct),f(`g`,{transform:B(`3`)},[f(`path`,{fill:`none`,stroke:A.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,ft),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`190`,cy:`213.5`,r:`20`,"aria-label":$(`3`),fill:E.value===`3`?b(s)(A.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,pt)],8,dt),f(`g`,{transform:B(`2`)},[f(`path`,{fill:`none`,stroke:A.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,ht),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`65`,cy:`213.5`,r:`20`,"aria-label":$(`2`),fill:E.value===`2`?b(s)(A.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,gt)],8,mt),f(`g`,{transform:B(`1`)},[f(`path`,{fill:`none`,stroke:A.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,vt),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`29`,cy:`95.5`,r:`20`,"aria-label":$(`1`),fill:E.value===`1`?b(s)(A.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,yt)],8,_t),f(`path`,{d:b(se)(xn.value.map(e=>e.plots)),stroke:j.value.dataPolygon.stroke,"stroke-width":j.value.dataPolygon.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:j.value.dataPolygon.gradient.show?`url(#mood_radar_gradient_${w.value})`:b(s)(j.value.dataPolygon.color,j.value.dataPolygon.opacity)},null,8,bt),(g(!0),d(Pe,null,Ge(xn.value.map(e=>e.plots),(e,t)=>(g(),d(`g`,{class:`vue-ui-mood-radar-trap`,style:h(`opacity:${E.value==e.key?`1`:`0`}`)},[f(`line`,{x1:e.x,y1:e.y,x2:z.value.width/2,y2:z.value.height/2,stroke:A.value.colors[e.key]},null,8,xt),f(`circle`,{cx:e.x,cy:e.y,fill:A.value.colors[e.key],r:`3`,stroke:M.value.backgroundColor,"stroke-width":.5},null,8,St),f(`circle`,{cx:z.value.width/2,cy:z.value.height/2,fill:A.value.colors[e.key],r:`3`,stroke:M.value.backgroundColor,"stroke-width":.5},null,8,Ct),f(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.13:z.value.height/2*.9375,fill:j.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`,"font-weight":j.value.dataLabel.bold?`bold`:`normal`},y(b(fe)(j.value.dataLabel.formatter,e.value,b(o)({p:j.value.dataLabel.prefix,v:e.value,s:j.value.dataLabel.suffix,r:j.value.dataLabel.roundingValue}),{datapoint:e,seriesIndex:t})),9,wt),f(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.273:z.value.height/2*.7968,fill:j.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`},` (`+y(b(o)({v:e.value/V.value*100,s:`%`,r:j.value.dataLabel.roundingPercentage}))+`) `,9,Tt)],4))),256)),v(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:b(I)||b(L)||b(Pn),isPrintingSvg:b(Fn)}},void 0,!0)],46,tt)),e.$slots.hint?(g(),d(`div`,Et,[v(e.$slots,`hint`,He(Re({hint:O.value.a11y.translations.keyboardNavigation,isVisible:tn.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(g(),d(`div`,Dt,[v(e.$slots,`watermark`,He(Re({isPrinting:b(I)||b(L)||b(Pn)||b(Fn)})),void 0,!0)])):u(``,!0),f(`div`,{id:`legend-bottom-${w.value}`},null,8,Ot),Qt.value&&(M.value.legend.show||e.$slots.legend)?(g(),l(Fe,{key:6,to:M.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[f(`div`,{ref_key:`chartLegend`,ref:Gt},[v(e.$slots,`legend`,{legend:H.value},()=>[M.value.legend.show?(g(),l(ke,{legendSet:bn.value,config:Sn.value,key:`legend_${Ut.value}`,isCursorPointer:N.value,style:{display:`flex`,"row-gap":`6px`},onClickMarker:t[15]||=({legend:e})=>U(e.key),onKeydown:t[16]||=Ye(e=>Jn(e),[`esc`])},{item:x(({legend:e,index:t})=>[f(`div`,{onClick:()=>U(e.key),style:{display:`flex`,"flex-direction":`row`,gap:`3px`,"align-items":`center`,margin:`3px 0`}},[e.key==1?(g(),l(b(S),{key:0,strokeWidth:1,name:`moodSad`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==2?(g(),l(b(S),{key:1,strokeWidth:1,name:`moodFlat`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==3?(g(),l(b(S),{key:2,strokeWidth:1,name:`moodNeutral`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==4?(g(),l(b(S),{key:3,strokeWidth:1,name:`smiley`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==5?(g(),l(b(S),{key:4,strokeWidth:1,name:`moodHappy`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),b(an)?u(``,!0):(g(),d(`span`,{key:5,style:h({fontWeight:M.value.legend.bold?`bold`:`normal`})},y(e.display),5))],8,kt)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):u(``,!0)],!0)],512)],8,[`to`])):u(``,!0),e.$slots.source?(g(),d(`div`,{key:7,ref_key:`source`,ref:Zt,dir:`auto`},[v(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),nn.value&&k.value.buttons.table?(g(),l(Ke(Z.value.component),ze({key:8},Z.value.props,{ref_key:`tableUnit`,ref:$t,onClose:kn}),Ie({content:x(()=>[p(b(Nt),{colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:O.value.table.useDialog?``:Z.value.title,withCloseButton:!O.value.table.useDialog,isCursorPointer:N.value,onClose:kn},{th:x(({th:e})=>[e===`__SUM__`?(g(),d(`div`,At,[p(b(S),{name:`sigma`,stroke:J.value.config.th.color,size:16},null,8,[`stroke`])])):(g(),d(`div`,jt,y(e),1))]),td:x(({td:e})=>[Le(y(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[O.value.table.useDialog?{name:`title`,fn:x(()=>[Le(y(Z.value.title),1)]),key:`0`}:void 0,O.value.table.useDialog?{name:`actions`,fn:x(()=>[f(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[17]||=e=>Cn(k.value.callbacks.csv),style:h({cursor:N.value?`pointer`:`default`})},[p(b(S),{name:`fileCsv`,stroke:Z.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):u(``,!0),v(e.$slots,`skeleton`,{},()=>[b(an)?(g(),l(Ae,{key:0})):u(``,!0)],!0)],46,Ze))}},[[`__scopeId`,`data-v-701ec5bb`]]);export{Xe as n,S as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useAnimationFrame-D8gcRfnW.js";import{n,r,t as i}from"./userOptionsSlots-CWtXN5Q6.js";import{n as a,r as ee,t as te}from"./annotationSlots-OLiW25XN.js";import{n as ne,t as re}from"./tableIntegration-CNoJ1CIY.js";import{t as ie}from"./chartImage-DPGnEuYM.js";import{t as ae}from"./resolveChartConfig-0IvbmIE_.js";import{$ as o,D as oe,Jt as s,Lt as se,M as ce,X as le,Yt as ue,at as de,i as fe,in as pe,nt as me,t as he,zt as ge}from"./lib-rPeBMZrn.js";import{c as _e}from"./canvas-lib-22VpOI4_.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./useConfig-CXhXxWjB.js";import{t as xe}from"./useLoading-DoqqfnmS.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{n as De}from"./Title-BliHuXfT.js";import{t as Oe}from"./vue_ui_mood_radar-BSOkyeXz.js";import{t as ke}from"./Legend-W9YVYVX-.js";import{t as Ae}from"./BaseScanner-m6QR9rwD.js";import{t as je}from"./A11yDataTable-DWNlWXzs.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Pe,Teleport as Fe,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ie,createTextVNode as Le,createVNode as p,defineAsyncComponent as m,guardReactiveProps as Re,mergeProps as ze,nextTick as Be,normalizeClass as Ve,normalizeProps as He,normalizeStyle as h,onBeforeUnmount as Ue,onMounted as We,openBlock as g,ref as _,renderList as Ge,renderSlot as v,resolveDynamicComponent as Ke,toDisplayString as y,toRefs as qe,unref as b,watch as Je,withCtx as x,withKeys as Ye}from"vue";var Xe=/* @__PURE__ */ e({default:()=>S}),Ze=[`id`],Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`aria-describedby`,`viewBox`],nt=[`width`,`height`],rt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],it=[`d`,`stroke`,`stroke-width`],at=[`transform`],ot=[`stroke`],st=[`aria-label`,`fill`],ct=[`transform`],lt=[`stroke`],ut=[`aria-label`,`fill`],dt=[`transform`],ft=[`stroke`],pt=[`aria-label`,`fill`],mt=[`transform`],ht=[`stroke`],gt=[`aria-label`,`fill`],_t=[`transform`],vt=[`stroke`],yt=[`aria-label`,`fill`],bt=[`d`,`stroke`,`stroke-width`,`fill`],xt=[`x1`,`y1`,`x2`,`y2`,`stroke`],St=[`cx`,`cy`,`fill`,`stroke`],Ct=[`cx`,`cy`,`fill`,`stroke`],wt=[`x`,`y`,`fill`,`font-weight`],Tt=[`x`,`y`,`fill`],Et={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Dt={key:5,class:`vue-data-ui-watermark`},Ot=[`id`],kt=[`onClick`],At={key:0},jt={key:1},S=/*#__PURE__*/ Ne({__name:`vue-ui-mood-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:Ne,emit:Xe}){let S=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Mt=m(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Nt=m(()=>import(`./DataTable-KeuZB1JM.js`)),Pt=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ft=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),It=m(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),Lt=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_mood_radar:Rt}=be(),C=e,zt=Xe,w=_(le()),T=_(null),E=_(null),Bt=_(null),Vt=_(0),Ht=_(0),Ut=_(0),Wt=_(null),Gt=_(null),Kt=_(null),qt=_(null),Jt=t(),Yt=0;function Xt(){Yt+=1,Jt.cancel(),Kt.value?.disconnect(),Kt.value=null,qt.value=null}Ue(Xt);let Zt=_(null),Qt=_(!1),$t=_(null),en=_(null),D=_(null),tn=_(!1),nn=c(()=>!!C.dataset&&Object.keys(C.dataset).length),O=_(dn()),k=c(()=>O.value.userOptions),A=c(()=>O.value.style.chart.layout.smileys),j=c(()=>O.value.style.chart.layout),M=c(()=>O.value.style.chart);ve({config:()=>O.value,dataset:()=>C.dataset,component:`VueUiMoodRadar`,rules:[ye.noHint]});let N=c(()=>O.value.userOptions.useCursorPointer),rn=c(()=>pe({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:O.value.skeletonConfig??{}})),{loading:an,FINAL_DATASET:P}=xe({...qe(C),FINAL_CONFIG:O,prepareConfig:dn,callback:()=>{Promise.resolve().then(async()=>{await Be(),R.value.showTable=O.value.table.show})},skeletonDataset:C.config?.skeletonDataset??{1:1,2:1,3:1,4:1,5:1},skeletonConfig:pe({defaultConfig:O.value,userConfig:rn.value})});We(()=>{Qt.value=!0,sn()});let on=c(()=>O.value.debug);function sn(){if(Xt(),ge(C.dataset)&&de({componentName:`VueUiMoodRadar`,type:`dataset`,debug:on.value}),O.value.responsive&&T.value?.parentNode){let e=Yt,t=_e(()=>{if(e!==Yt||Jt.isDisposed())return;let{width:t,height:n}=Ce({chart:T.value,title:M.value.title.text?Wt.value:null,legend:M.value.legend.show?Gt.value:null,noTitle:Bt.value,source:Zt.value});Jt.request(()=>{z.value.width=t,z.value.height=n-12})});Kt.value=new ResizeObserver(t),qt.value=T.value.parentNode,Kt.value.observe(qt.value)}}let{userOptionsVisible:cn,setUserOptionsVisibility:ln,keepUserOptionState:un}=Te({config:O.value}),{svgRef:F}=Ee({config:M.value.title});function dn(){return ae(C.config,Rt,Oe)}Je(()=>C.config,e=>{O.value=dn(),cn.value=!O.value.userOptions.showOnChartHover,sn(),Vt.value+=1,Ht.value+=1,Ut.value+=1,R.value.showTable=O.value.table.show},{deep:!0});let{isPrinting:I,isImaging:L,generatePdf:fn,generateImage:pn}=Se({elementId:w.value,fileName:M.value.title.text||`vue-ui-mood-radar`,options:O.value.userOptions.print}),mn=c(()=>O.value.userOptions.show&&!M.value.title.text),R=_({showTable:O.value.table.show}),z=_({height:256,width:256}),hn={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}},gn=c(()=>{let e={};return xn.value.forEach(t=>{e[t.key]={x:t.x,y:t.y}}),e});function B(e){let t=hn[e],n=gn.value[e]||t;return`translate(${n.x-t.x}, ${n.y-t.y})`}let _n=c(()=>ce({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 vn({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 yn=c(()=>Math.max(...Object.values(P.value).map(e=>isNaN(e)?0:e))),V=c(()=>Object.values(P.value).reduce((e,t)=>(isNaN(e)?0:e)+(isNaN(t)?0:t),0)),H=c(()=>Object.keys(P.value).map((e,t)=>{let n=typeof P.value[e]!=`number`||isNaN(P.value[e])?0:P.value[e];return{index:t,key:e,value:n,proportion:n/V.value,color:A.value.colors[e]}}).map(e=>({...e,onSelect:()=>U(e.key)})).sort((e,t)=>t.key-e.key)),bn=c(()=>H.value.map((e,t)=>({...e,display:`${fe(j.value.dataLabel.formatter,e.value,o({p:j.value.dataLabel.prefix,v:e.value,s:j.value.dataLabel.suffix,r:j.value.dataLabel.roundingValue}))}${an.value?``:` (${o({v:e.proportion*100,s:`%`,r:M.value.legend.roundingPercentage})})`}`}))),xn=c(()=>([`1`,`2`,`3`,`4`,`5`].forEach(e=>{[null,void 0].includes(P.value[e])&&de({componentName:`VueUiMoodRadar`,type:`datasetAttribute`,property:e,debug:on.value})}),_n.value.coordinates.map((e,t)=>{let n=vn({centerX:z.value.width/2,centerY:z.value.height/2,apexX:e.x,apexY:e.y,proportion:H.value[t].value/yn.value,key:H.value[t].key,value:H.value[t].value});return{...e,plots:n,key:H.value[t].key}}))),Sn=c(()=>({cy:`mood-radar-legend`,backgroundColor:M.value.legend.backgroundColor,color:M.value.legend.color,fontSize:M.value.legend.fontSize,paddingBottom:12,fontWeight:M.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);O.value.events.datapointEnter&&O.value.events.datapointEnter({datapoint:t,seriesIndex:t.index})}function G(e){E.value=null;let t=H.value.find(t=>t.key===e);O.value.events.datapointLeave&&O.value.events.datapointLeave({datapoint:t,seriesIndex:t.index})}function K(e){let t=H.value.find(t=>t.key===e);O.value.events.datapointClick&&O.value.events.datapointClick({datapoint:t,seriesIndex:t.index})}let q=c(()=>({head:H.value.map(e=>({name:e.key,color:e.color})),body:H.value.map(e=>isNaN(e.value)?0:e.value)}));function Cn(e=null){Be(()=>{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=[[M.value.title.text],[M.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=oe(n);e?e(r):me({csvContent:r,title:M.value.title.text||`vue-ui-mood-radar`})})}let J=c(()=>({head:[`__SUM__`,Number(V.value.toFixed(O.value.table.td.roundingValue)).toLocaleString(),`100%`],body:q.value.head.map((e,t)=>[{color:e.color,name:e.name},q.value.body[t].toFixed(O.value.table.td.roundingValue),isNaN(q.value.body[t]/V.value)?`-`:(q.value.body[t]/V.value*100).toFixed(O.value.table.td.roundingPercentage)+`%`]),config:{th:{backgroundColor:O.value.table.th.backgroundColor,color:O.value.table.th.color,outline:O.value.table.th.outline},td:{backgroundColor:O.value.table.td.backgroundColor,color:O.value.table.td.color,outline:O.value.table.td.outline},breakpoint:O.value.table.responsiveBreakpoint},colNames:[O.value.table.columnNames.series,O.value.table.columnNames.value,O.value.table.columnNames.percentage]}));function wn(){return H.value}function Tn(){R.value.showTable=!R.value.showTable}let Y=_(!1);function En(e){Y.value=e}let X=_(!1);function Dn(){X.value=!X.value}let On=ie(T,()=>M.value.title.text),Z=c(()=>re({config:O,style:M,mutableConfig:R,dialog:Lt,accordion:Mt,isFullscreen:Y,parent:T,maxWidth:800,isCursorPointer:N}));Je(()=>R.value.showTable,e=>ne(e,O,$t));function kn(){R.value.showTable=!1,en.value&&en.value.setTableIconState(!1)}let An=c(()=>bn.value.map(e=>({...e,name:e.display,shape:`circle`}))),jn=c(()=>M.value.backgroundColor),Mn=c(()=>M.value.legend),Nn=c(()=>M.value.title),{isCallbackImaging:Pn,isCallbackSvg:Fn,generateSvg:In,onGenerateImage:Ln}=we({svg:F,title:Nn,legend:Mn,legendItems:An,backgroundColor:jn,getSvgCallback:()=>O.value.userOptions.callbacks.svg,generateImage:pn});async function Rn(){zt(`copyAlt`,{config:O.value,dataset:H.value}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:H.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Q=c(()=>H.value.map(e=>String(e.key)));function zn(){ln(!0)}function Bn(){ln(!1)}function Vn(e){return H.value.find(t=>String(t.key)===String(e))}function Hn(e,t,n){return fe(j.value.dataLabel.formatter,e,o({p:j.value.dataLabel.prefix,v:e,s:j.value.dataLabel.suffix,r:j.value.dataLabel.roundingValue}),{datapoint:n,seriesIndex:t})}function Un(e){return o({v:V.value?e/V.value*100:0,s:`%`,r:j.value.dataLabel.roundingPercentage})}function $(e){let t=Vn(e);return t?`${e}, ${Hn(t.value,t.index,t)}, ${Un(t.value)}`:`${e}`}function Wn(e){let t=Q.value[e];t&&(D.value=e,E.value=t)}function Gn(){tn.value=!0}function Kn(){D.value=null,E.value=null,tn.value=!1}function qn(e){if(!F.value||!Q.value.length||X.value||document.activeElement!==F.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){D.value=null,E.value=null;return}if(r){if(D.value===null)return;let e=Q.value[D.value];if(!e)return;U(e);return}let a=D.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)),Wn(a)}function Jn(e,t){let n=e.key===`Enter`||e.key===` `,r=e.key===`Escape`;(n||r)&&(e.preventDefault(),e.stopPropagation(),r?(D.value=null,E.value=null):U(String(t)))}let Yn=c(()=>({headers:J.value?.colNames??[],rows:H.value.map(e=>[String(e.key),Hn(e.value,e.index,e),Un(e.value)])}));return Ne({getData:wn,getImage:On,generatePdf:fn,generateCsv:Cn,generateImage:pn,generateSvg:In,toggleTable:Tn,toggleAnnotator:Dn,toggleFullscreen:En,copyAlt:Rn}),(e,t)=>(g(),d(`div`,{class:Ve(`vue-data-ui-component vue-ui-mood-radar ${Y.value?`vue-data-ui-wrapper-fullscreen`:``} ${O.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`moodRadarChart`,ref:T,id:`${w.value}`,style:h(`font-family:${O.value.style.fontFamily};width:100%; text-align:center;background:${M.value.backgroundColor}`),onMouseenter:zn,onMouseleave:Bn},[f(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[f(`p`,null,y(O.value.a11y.translations.keyboardNavigation),1)],8,Qe),O.value.a11y.includeTable&&Yn.value?.rows?.length?(g(),l(je,{key:0,uid:w.value,head:Yn.value.headers,body:Yn.value.rows,notice:O.value.a11y.translations.tableAvailable,caption:O.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),k.value.buttons.annotator?(g(),l(b(Pt),ze({key:1},b(ee)(k.value.annotator),{svgRef:b(F),backgroundColor:M.value.backgroundColor,color:M.value.color,active:X.value,isCursorPointer:N.value,palette:k.value.annotatorPalette,onClose:Dn}),Ie({_:2},[Ge(b(te),t=>({name:t,fn:x(n=>[v(e.$slots,t,He(Re(b(a)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),mn.value?(g(),d(`div`,{key:2,ref_key:`noTitle`,ref:Bt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),M.value.title.text?(g(),d(`div`,{key:3,ref_key:`chartTitle`,ref:Wt,style:`width:100%;background:transparent`},[p(De,{config:{title:{cy:`mood-radar-title`,...M.value.title},subtitle:{cy:`mood-radar-subtitle`,...M.value.title.subtitle}}},null,8,[`config`])],512)):u(``,!0),f(`div`,{id:`legend-top-${w.value}`},null,8,$e),k.value.show&&nn.value&&(b(un)||b(cn))?(g(),l(b(Ft),ze({key:4,ref_key:`userOptionsRef`,ref:en,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:b(I),isImaging:b(L),uid:w.value,isFullscreen:Y.value,chartElement:T.value},b(r)(k.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:X.value,tableDialog:O.value.table.useDialog,isCursorPointer:N.value,onToggleFullscreen:En,onGeneratePdf:b(fn),onGenerateCsv:Cn,onGenerateImage:b(Ln),onGenerateSvg:b(In),onToggleTable:Tn,onToggleAnnotator:Dn,onCopyAlt:Rn,style:{visibility:b(un)?b(cn)?`visible`:`hidden`:`visible`}}),Ie({_:2},[Ge(b(n)(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,He(Re(b(i)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),f(`div`,et,[(g(),d(`svg`,{ref_key:`svgRef`,ref:F,xmlns:b(he),"aria-describedby":`chart-instructions-${w.value}`,viewBox:`0 0 ${z.value.width} ${z.value.height}`,class:Ve({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),style:h(`overflow:visible;background:transparent;color:${M.value.color}`),tabindex:`0`,onFocus:Gn,onBlur:Kn,onKeydown:qn},[p(b(It)),v(e.$slots,`svg-underlayer`,{svg:{...z.value,isPrintingImg:b(I)||b(L)||b(Pn),isPrintingSvg:b(Fn)}},void 0,!0),e.$slots[`chart-background`]?(g(),d(`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,nt)):u(``,!0),f(`defs`,null,[p(Me,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`mood_radar_gradient_${w.value}`,stops:[[`0%`,b(s)(j.value.dataPolygon.color,j.value.dataPolygon.opacity),1],[`100%`,b(s)(b(ue)(j.value.dataPolygon.color,j.value.dataPolygon.gradient.intensity/100),j.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`])]),(g(!0),d(Pe,null,Ge(_n.value.coordinates,e=>(g(),d(`line`,{x1:z.value.width/2,y1:z.value.height/2,x2:e.x,y2:e.y,stroke:j.value.grid.stroke,"stroke-width":j.value.grid.strokeWidth},null,8,rt))),256)),f(`path`,{d:_n.value.path,fill:`none`,stroke:j.value.outerPolygon.stroke,"stroke-width":j.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,it),f(`g`,{transform:B(`5`)},[f(`path`,{fill:`none`,stroke:A.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,ot),f(`circle`,{role:`button`,class:`vue-ui-mood-radar-trap`,cx:`128`,cy:`25`,r:`20`,"aria-label":$(`5`),fill:E.value===`5`?b(s)(A.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,st)],8,at),f(`g`,{transform:B(`4`)},[f(`path`,{fill:`none`,stroke:A.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,lt),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`227`,cy:`95.5`,r:`20`,"aria-label":$(`4`),fill:E.value===`4`?b(s)(A.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,ut)],8,ct),f(`g`,{transform:B(`3`)},[f(`path`,{fill:`none`,stroke:A.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,ft),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`190`,cy:`213.5`,r:`20`,"aria-label":$(`3`),fill:E.value===`3`?b(s)(A.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,pt)],8,dt),f(`g`,{transform:B(`2`)},[f(`path`,{fill:`none`,stroke:A.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,ht),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`65`,cy:`213.5`,r:`20`,"aria-label":$(`2`),fill:E.value===`2`?b(s)(A.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,gt)],8,mt),f(`g`,{transform:B(`1`)},[f(`path`,{fill:`none`,stroke:A.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,vt),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`29`,cy:`95.5`,r:`20`,"aria-label":$(`1`),fill:E.value===`1`?b(s)(A.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,yt)],8,_t),f(`path`,{d:b(se)(xn.value.map(e=>e.plots)),stroke:j.value.dataPolygon.stroke,"stroke-width":j.value.dataPolygon.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:j.value.dataPolygon.gradient.show?`url(#mood_radar_gradient_${w.value})`:b(s)(j.value.dataPolygon.color,j.value.dataPolygon.opacity)},null,8,bt),(g(!0),d(Pe,null,Ge(xn.value.map(e=>e.plots),(e,t)=>(g(),d(`g`,{class:`vue-ui-mood-radar-trap`,style:h(`opacity:${E.value==e.key?`1`:`0`}`)},[f(`line`,{x1:e.x,y1:e.y,x2:z.value.width/2,y2:z.value.height/2,stroke:A.value.colors[e.key]},null,8,xt),f(`circle`,{cx:e.x,cy:e.y,fill:A.value.colors[e.key],r:`3`,stroke:M.value.backgroundColor,"stroke-width":.5},null,8,St),f(`circle`,{cx:z.value.width/2,cy:z.value.height/2,fill:A.value.colors[e.key],r:`3`,stroke:M.value.backgroundColor,"stroke-width":.5},null,8,Ct),f(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.13:z.value.height/2*.9375,fill:j.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`,"font-weight":j.value.dataLabel.bold?`bold`:`normal`},y(b(fe)(j.value.dataLabel.formatter,e.value,b(o)({p:j.value.dataLabel.prefix,v:e.value,s:j.value.dataLabel.suffix,r:j.value.dataLabel.roundingValue}),{datapoint:e,seriesIndex:t})),9,wt),f(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.273:z.value.height/2*.7968,fill:j.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`},` (`+y(b(o)({v:e.value/V.value*100,s:`%`,r:j.value.dataLabel.roundingPercentage}))+`) `,9,Tt)],4))),256)),v(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:b(I)||b(L)||b(Pn),isPrintingSvg:b(Fn)}},void 0,!0)],46,tt)),e.$slots.hint?(g(),d(`div`,Et,[v(e.$slots,`hint`,He(Re({hint:O.value.a11y.translations.keyboardNavigation,isVisible:tn.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(g(),d(`div`,Dt,[v(e.$slots,`watermark`,He(Re({isPrinting:b(I)||b(L)||b(Pn)||b(Fn)})),void 0,!0)])):u(``,!0),f(`div`,{id:`legend-bottom-${w.value}`},null,8,Ot),Qt.value&&(M.value.legend.show||e.$slots.legend)?(g(),l(Fe,{key:6,to:M.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[f(`div`,{ref_key:`chartLegend`,ref:Gt},[v(e.$slots,`legend`,{legend:H.value},()=>[M.value.legend.show?(g(),l(ke,{legendSet:bn.value,config:Sn.value,key:`legend_${Ut.value}`,isCursorPointer:N.value,style:{display:`flex`,"row-gap":`6px`},onClickMarker:t[15]||=({legend:e})=>U(e.key),onKeydown:t[16]||=Ye(e=>Jn(e),[`esc`])},{item:x(({legend:e,index:t})=>[f(`div`,{onClick:()=>U(e.key),style:{display:`flex`,"flex-direction":`row`,gap:`3px`,"align-items":`center`,margin:`3px 0`}},[e.key==1?(g(),l(b(S),{key:0,strokeWidth:1,name:`moodSad`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==2?(g(),l(b(S),{key:1,strokeWidth:1,name:`moodFlat`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==3?(g(),l(b(S),{key:2,strokeWidth:1,name:`moodNeutral`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==4?(g(),l(b(S),{key:3,strokeWidth:1,name:`smiley`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==5?(g(),l(b(S),{key:4,strokeWidth:1,name:`moodHappy`,stroke:A.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),b(an)?u(``,!0):(g(),d(`span`,{key:5,style:h({fontWeight:M.value.legend.bold?`bold`:`normal`})},y(e.display),5))],8,kt)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):u(``,!0)],!0)],512)],8,[`to`])):u(``,!0),e.$slots.source?(g(),d(`div`,{key:7,ref_key:`source`,ref:Zt,dir:`auto`},[v(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),nn.value&&k.value.buttons.table?(g(),l(Ke(Z.value.component),ze({key:8},Z.value.props,{ref_key:`tableUnit`,ref:$t,onClose:kn}),Ie({content:x(()=>[p(b(Nt),{colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:O.value.table.useDialog?``:Z.value.title,withCloseButton:!O.value.table.useDialog,isCursorPointer:N.value,onClose:kn},{th:x(({th:e})=>[e===`__SUM__`?(g(),d(`div`,At,[p(b(S),{name:`sigma`,stroke:J.value.config.th.color,size:16},null,8,[`stroke`])])):(g(),d(`div`,jt,y(e),1))]),td:x(({td:e})=>[Le(y(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[O.value.table.useDialog?{name:`title`,fn:x(()=>[Le(y(Z.value.title),1)]),key:`0`}:void 0,O.value.table.useDialog?{name:`actions`,fn:x(()=>[f(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[17]||=e=>Cn(k.value.callbacks.csv),style:h({cursor:N.value?`pointer`:`default`})},[p(b(S),{name:`fileCsv`,stroke:Z.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):u(``,!0),v(e.$slots,`skeleton`,{},()=>[b(an)?(g(),l(Ae,{key:0})):u(``,!0)],!0)],46,Ze))}},[[`__scopeId`,`data-v-701ec5bb`]]);export{Xe as n,S as t};