vue-data-ui 3.29.2 → 3.29.3

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 (159) hide show
  1. package/dist/{PackageVersion-C1vtZkKc.js → PackageVersion-DAF5ApGl.js} +1 -1
  2. package/dist/{XyAnalysisOptions-CD0cCtt5.js → XyAnalysisOptions-Cyt8w5B3.js} +1 -1
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-accordion.js +1 -1
  5. package/dist/components/vue-ui-age-pyramid.js +1 -1
  6. package/dist/components/vue-ui-annotator.js +1 -1
  7. package/dist/components/vue-ui-bullet.js +1 -1
  8. package/dist/components/vue-ui-bump.js +1 -1
  9. package/dist/components/vue-ui-candlestick.js +1 -1
  10. package/dist/components/vue-ui-carousel-table.js +1 -1
  11. package/dist/components/vue-ui-chestnut.js +1 -1
  12. package/dist/components/vue-ui-chord.js +1 -1
  13. package/dist/components/vue-ui-circle-pack.js +1 -1
  14. package/dist/components/vue-ui-cursor.js +1 -1
  15. package/dist/components/vue-ui-dag.js +1 -1
  16. package/dist/components/vue-ui-dashboard.js +1 -1
  17. package/dist/components/vue-ui-digits.js +1 -1
  18. package/dist/components/vue-ui-donut-evolution.js +1 -1
  19. package/dist/components/vue-ui-donut.js +1 -1
  20. package/dist/components/vue-ui-dumbbell.js +1 -1
  21. package/dist/components/vue-ui-flow.js +1 -1
  22. package/dist/components/vue-ui-funnel.js +1 -1
  23. package/dist/components/vue-ui-galaxy.js +1 -1
  24. package/dist/components/vue-ui-gauge.js +1 -1
  25. package/dist/components/vue-ui-geo.js +1 -1
  26. package/dist/components/vue-ui-gizmo.js +1 -1
  27. package/dist/components/vue-ui-graph.js +1 -1
  28. package/dist/components/vue-ui-heatmap.js +1 -1
  29. package/dist/components/vue-ui-hill.js +1 -1
  30. package/dist/components/vue-ui-history-plot.js +1 -1
  31. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  32. package/dist/components/vue-ui-kpi.js +1 -1
  33. package/dist/components/vue-ui-label.js +1 -1
  34. package/dist/components/vue-ui-mini-loader.js +1 -1
  35. package/dist/components/vue-ui-molecule.js +1 -1
  36. package/dist/components/vue-ui-mood-radar.js +1 -1
  37. package/dist/components/vue-ui-nested-donuts.js +1 -1
  38. package/dist/components/vue-ui-onion.js +1 -1
  39. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  40. package/dist/components/vue-ui-quadrant.js +1 -1
  41. package/dist/components/vue-ui-quick-chart.js +1 -1
  42. package/dist/components/vue-ui-radar.js +1 -1
  43. package/dist/components/vue-ui-rating.js +1 -1
  44. package/dist/components/vue-ui-relation-circle.js +1 -1
  45. package/dist/components/vue-ui-ridgeline.js +1 -1
  46. package/dist/components/vue-ui-rings.js +1 -1
  47. package/dist/components/vue-ui-scatter.js +1 -1
  48. package/dist/components/vue-ui-skeleton.js +1 -1
  49. package/dist/components/vue-ui-smiley.js +1 -1
  50. package/dist/components/vue-ui-spark-trend.js +1 -1
  51. package/dist/components/vue-ui-sparkbar.js +1 -1
  52. package/dist/components/vue-ui-sparkgauge.js +1 -1
  53. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  54. package/dist/components/vue-ui-sparkline.js +1 -1
  55. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  56. package/dist/components/vue-ui-stackbar.js +1 -1
  57. package/dist/components/vue-ui-stackline.js +1 -1
  58. package/dist/components/vue-ui-strip-plot.js +1 -1
  59. package/dist/components/vue-ui-table-heatmap.js +1 -1
  60. package/dist/components/vue-ui-table-sparkline.js +1 -1
  61. package/dist/components/vue-ui-table.js +1 -1
  62. package/dist/components/vue-ui-thermometer.js +1 -1
  63. package/dist/components/vue-ui-timer.js +1 -1
  64. package/dist/components/vue-ui-tiremarks.js +1 -1
  65. package/dist/components/vue-ui-treemap.js +1 -1
  66. package/dist/components/vue-ui-vertical-bar.js +1 -1
  67. package/dist/components/vue-ui-waffle.js +1 -1
  68. package/dist/components/vue-ui-wheel.js +1 -1
  69. package/dist/components/vue-ui-word-cloud.js +1 -1
  70. package/dist/components/vue-ui-world.js +1 -1
  71. package/dist/components/vue-ui-xy-canvas.js +1 -1
  72. package/dist/components/vue-ui-xy.js +1 -1
  73. package/dist/package-Dd1ZNT5Q.js +1 -0
  74. package/dist/{render-common-DNKT42_W.js → render-common-B7aQrXBR.js} +1 -1
  75. package/dist/ssr/vue-ui-donut.js +1 -1
  76. package/dist/ssr/vue-ui-xy.js +1 -1
  77. package/dist/ssr.js +1 -1
  78. package/dist/style.css +1 -1
  79. package/dist/types/vue-data-ui.d.ts +9 -0
  80. package/dist/{useConfig-CXhXxWjB.js → useConfig-B8qvYKdK.js} +1 -1
  81. package/dist/{useObjectBindings-BCep9t8A.js → useObjectBindings-CztjiAzG.js} +1 -1
  82. package/dist/utils.js +1 -1
  83. package/dist/vue-data-ui-BmTsLaNH.js +1 -0
  84. package/dist/vue-data-ui.js +1 -1
  85. package/dist/{vue-ui-3d-bar-CNym5PLY.js → vue-ui-3d-bar-D3pDUYiG.js} +1 -1
  86. package/dist/{vue-ui-accordion-D3uT1Ynv.js → vue-ui-accordion-BpTfjWvH.js} +1 -1
  87. package/dist/{vue-ui-age-pyramid-zD6anIub.js → vue-ui-age-pyramid-bJmGRZ59.js} +1 -1
  88. package/dist/{vue-ui-annotator-aP1DFNt9.js → vue-ui-annotator-C-gyszpf.js} +1 -1
  89. package/dist/{vue-ui-bullet-CxhIb-XU.js → vue-ui-bullet-5ZNUgPS7.js} +1 -1
  90. package/dist/{vue-ui-bump-B8WYM1RE.js → vue-ui-bump-DYGbmTko.js} +1 -1
  91. package/dist/{vue-ui-candlestick-CwG1H80q.js → vue-ui-candlestick-BwETH5d4.js} +1 -1
  92. package/dist/{vue-ui-carousel-table-CdrxVrHZ.js → vue-ui-carousel-table-_V-HWzd-.js} +1 -1
  93. package/dist/{vue-ui-chestnut-CZG6Ep36.js → vue-ui-chestnut-Cg8m6-N6.js} +1 -1
  94. package/dist/{vue-ui-chord-DQS4tBWQ.js → vue-ui-chord-CaJ-uclL.js} +1 -1
  95. package/dist/{vue-ui-circle-pack-BGbhvnE5.js → vue-ui-circle-pack-BiVPm8ii.js} +1 -1
  96. package/dist/{vue-ui-cursor-DTRAPWBW.js → vue-ui-cursor-jkuEvFtX.js} +1 -1
  97. package/dist/{vue-ui-dag-BGNC8uRQ.js → vue-ui-dag-wkBDTIcz.js} +1 -1
  98. package/dist/{vue-ui-dashboard-DtPlz7y-.js → vue-ui-dashboard-CDekEQNH.js} +1 -1
  99. package/dist/{vue-ui-digits-gtQiZcOT.js → vue-ui-digits-ByjwG9Hv.js} +1 -1
  100. package/dist/{vue-ui-donut-COELw22T.js → vue-ui-donut-BB7BW0dE.js} +1 -1
  101. package/dist/{vue-ui-donut-_wqSXunY.js → vue-ui-donut-BV3btR0S.js} +1 -1
  102. package/dist/{vue-ui-donut-evolution-CdztIQSl.js → vue-ui-donut-evolution-CPIVtWxh.js} +1 -1
  103. package/dist/{vue-ui-dumbbell-CpLMoEet.js → vue-ui-dumbbell-bTQpX8A6.js} +1 -1
  104. package/dist/{vue-ui-flow-DwG1MX2V.js → vue-ui-flow-BRC3pGzL.js} +1 -1
  105. package/dist/{vue-ui-funnel-CisiLlR9.js → vue-ui-funnel-7RjzjVqE.js} +1 -1
  106. package/dist/{vue-ui-galaxy-HndquOs-.js → vue-ui-galaxy-D91dIUfs.js} +1 -1
  107. package/dist/{vue-ui-gauge-CVxKlU2U.js → vue-ui-gauge-DM3p5s8H.js} +1 -1
  108. package/dist/{vue-ui-geo-0PDP2JjE.js → vue-ui-geo-BUQL79cU.js} +1 -1
  109. package/dist/{vue-ui-gizmo-mFeK8xP1.js → vue-ui-gizmo-CoET_abC.js} +1 -1
  110. package/dist/{vue-ui-graph-Duw5qG0a.js → vue-ui-graph-CCLd8bTj.js} +1 -1
  111. package/dist/{vue-ui-heatmap-DZM9MvfE.js → vue-ui-heatmap-BvVHrOcc.js} +1 -1
  112. package/dist/{vue-ui-hill-BGQSrcHM.js → vue-ui-hill-BkcY-Zbf.js} +1 -1
  113. package/dist/{vue-ui-history-plot-EGeDhkdS.js → vue-ui-history-plot-DVoOwR1y.js} +1 -1
  114. package/dist/{vue-ui-horizontal-bar-CtONqcjG.js → vue-ui-horizontal-bar-Khi_qtla.js} +1 -1
  115. package/dist/{vue-ui-kpi-BSRfwYk9.js → vue-ui-kpi-BPL64spX.js} +1 -1
  116. package/dist/{vue-ui-label-W0ITGnQa.js → vue-ui-label-OvoE3A_k.js} +1 -1
  117. package/dist/{vue-ui-mini-loader-BBsXG6nD.js → vue-ui-mini-loader-DyefvJIr.js} +1 -1
  118. package/dist/{vue-ui-molecule-DOQ8dsme.js → vue-ui-molecule-B7KJzavj.js} +1 -1
  119. package/dist/{vue-ui-mood-radar-BJeSC-Op.js → vue-ui-mood-radar-6q5OUW6D.js} +1 -1
  120. package/dist/{vue-ui-nested-donuts-DUUmc8K7.js → vue-ui-nested-donuts-C137tg5U.js} +1 -1
  121. package/dist/{vue-ui-onion-B8M1x8Jc.js → vue-ui-onion-ClMux968.js} +1 -1
  122. package/dist/{vue-ui-parallel-coordinate-plot-Dv0eO4ZI.js → vue-ui-parallel-coordinate-plot-JbfDQzwN.js} +1 -1
  123. package/dist/{vue-ui-quadrant-_QcgE234.js → vue-ui-quadrant-BPKWN3Ac.js} +1 -1
  124. package/dist/{vue-ui-quick-chart-DzJx0LBu.js → vue-ui-quick-chart-BvqQnNn1.js} +1 -1
  125. package/dist/{vue-ui-radar-C-idGMCp.js → vue-ui-radar-DIdTBEet.js} +1 -1
  126. package/dist/{vue-ui-rating-CwD4CB9M.js → vue-ui-rating-CFu9LjID.js} +1 -1
  127. package/dist/{vue-ui-relation-circle-Dl2XO5DU.js → vue-ui-relation-circle-5Noti3DC.js} +1 -1
  128. package/dist/{vue-ui-ridgeline-SG44P21X.js → vue-ui-ridgeline-DUrvAa8z.js} +1 -1
  129. package/dist/{vue-ui-rings-b8Ms_mTp.js → vue-ui-rings-B-cJIyAX.js} +1 -1
  130. package/dist/{vue-ui-scatter-KPiaTVuv.js → vue-ui-scatter-DcchOWYi.js} +1 -1
  131. package/dist/{vue-ui-skeleton-Dg0tACvE.js → vue-ui-skeleton-DtHam8Oi.js} +1 -1
  132. package/dist/{vue-ui-smiley-B34VeonG.js → vue-ui-smiley-C8ES41OS.js} +1 -1
  133. package/dist/{vue-ui-spark-trend-C3EXOm2F.js → vue-ui-spark-trend-m_ybZFN7.js} +1 -1
  134. package/dist/{vue-ui-sparkbar-CCjgG6pR.js → vue-ui-sparkbar-CVJo0I__.js} +1 -1
  135. package/dist/{vue-ui-sparkgauge-DnxHmWiH.js → vue-ui-sparkgauge-UXQOQCQ6.js} +1 -1
  136. package/dist/{vue-ui-sparkhistogram--QcZmUje.js → vue-ui-sparkhistogram-DVyAev-n.js} +1 -1
  137. package/dist/{vue-ui-sparkline-D1BPdZdr.js → vue-ui-sparkline-DXJpSvr5.js} +1 -1
  138. package/dist/{vue-ui-sparkstackbar-CxF1OSDL.js → vue-ui-sparkstackbar-CI7LeTy9.js} +1 -1
  139. package/dist/{vue-ui-stackbar-yKTDxwXp.js → vue-ui-stackbar-BAdE_agj.js} +1 -1
  140. package/dist/{vue-ui-stackline-BPdR_8x0.js → vue-ui-stackline-CEcCgYrY.js} +1 -1
  141. package/dist/{vue-ui-strip-plot-CAmBydR2.js → vue-ui-strip-plot-D2JTssjF.js} +1 -1
  142. package/dist/{vue-ui-table-BKfGLJgN.js → vue-ui-table-CcBJ_hPp.js} +1 -1
  143. package/dist/{vue-ui-table-heatmap-CpviNfWA.js → vue-ui-table-heatmap-CwV82zwm.js} +1 -1
  144. package/dist/{vue-ui-table-sparkline-CVomhgHC.js → vue-ui-table-sparkline-D1OPXi2z.js} +1 -1
  145. package/dist/{vue-ui-thermometer-DNRR87NF.js → vue-ui-thermometer-D2LlLcEV.js} +1 -1
  146. package/dist/{vue-ui-timer-Bx5D4QsO.js → vue-ui-timer-Ca8KPZNl.js} +2 -2
  147. package/dist/{vue-ui-tiremarks-CnZqIcFq.js → vue-ui-tiremarks-BsKJi3S0.js} +1 -1
  148. package/dist/{vue-ui-treemap-D7k9vWC9.js → vue-ui-treemap-5HkhmOD4.js} +1 -1
  149. package/dist/{vue-ui-waffle-BHcDq09N.js → vue-ui-waffle-2BJYwpwv.js} +1 -1
  150. package/dist/{vue-ui-wheel-Cd3P9Nq4.js → vue-ui-wheel-Dr-mMZrH.js} +1 -1
  151. package/dist/vue-ui-word-cloud-CF_k1x_e.js +4 -0
  152. package/dist/{vue-ui-world-bZ7gOrS1.js → vue-ui-world-BuzOXOPx.js} +1 -1
  153. package/dist/{vue-ui-xy-Y_MKCMGp.js → vue-ui-xy-Cr5w4DsW.js} +1 -1
  154. package/dist/{vue-ui-xy-BTGZ1NSt.js → vue-ui-xy-Cwkavs_B.js} +3 -3
  155. package/dist/{vue-ui-xy-canvas-C8Xi5Bad.js → vue-ui-xy-canvas-DnWzhq9y.js} +1 -1
  156. package/package.json +2 -2
  157. package/dist/package-BPQ4kSL9.js +0 -1
  158. package/dist/vue-data-ui-CeZQZazG.js +0 -1
  159. package/dist/vue-ui-word-cloud-B7iGPkGe.js +0 -4
@@ -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-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};
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-B8qvYKdK.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-BpTfjWvH.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-DAF5ApGl.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,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 re,It as ie,Jt as ae,Kt as oe,S as se,Ut as ce,X as le,Zt as ue,at as de,f as fe,i as pe,in as me,it as he,n as ge,nt as _e,p as ve,t as ye,w as be}from"./lib-rPeBMZrn.js";import{t as xe}from"./labelUtils-CdtU-yB_.js";import{n as Se,t as Ce}from"./useHints-C-TwxM0Y.js";import{t as we}from"./useConfig-CXhXxWjB.js";import{t as Te}from"./useLoading-DoqqfnmS.js";import{t as Ee}from"./usePrinter-DVf3YcG5.js";import{n as De}from"./resolveChartConfig-0IvbmIE_.js";import{t as Oe}from"./useResponsive-CENUxfEL.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{n as Me}from"./Title-BliHuXfT.js";import{t as Ne}from"./vue_ui_nested_donuts-BTu965IJ.js";import{t as Pe}from"./Legend-W9YVYVX-.js";import{t as Fe}from"./BaseScanner-m6QR9rwD.js";import{t as Ie}from"./A11yDataTable-DWNlWXzs.js";import{t as Le}from"./BaseLegendToggle-VzX69MCo.js";import{t as Re}from"./DefGrad-DKMq1REY.js";import{t as ze}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as Be,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ve,createTextVNode as He,createVNode as Ue,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as We,nextTick as Ge,normalizeClass as Ke,normalizeProps as v,normalizeStyle as qe,onBeforeUnmount as Je,onMounted as Ye,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as C,toRefs as Qe,unref as w,vShow as $e,watch as T,withCtx as E,withDirectives as et}from"vue";var tt=/* @__PURE__ */ e({default:()=>Mt}),nt=[`id`],rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st=[`width`,`height`],ct=[`id`],lt=[`id`],ut=[`id`],dt=[`flood-color`],ft=[`id`,`d`],pt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],mt=[`d`,`fill`,`stroke`,`stroke-width`],ht={key:1},gt=[`d`,`fill`],_t={key:2},vt=[`font-size`,`font-weight`,`fill`,`dy`],yt=[`href`],bt=[`x`,`y`,`font-size`,`font-weight`,`fill`],xt={key:3},St=[`filter`],Ct=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],wt=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Tt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseleave`],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={key:0,class:`vue-ui-nested-donuts-legend-title`},At=[`onClick`],jt={style:{display:`flex`,"align-items":`center`}},Mt=/*#__PURE__*/ ze({__name:`vue-ui-nested-donuts`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:ze,emit:tt}){let Mt=g(()=>import(`./Tooltip-B432XpvC.js`)),Nt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Pt=g(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Ft=g(()=>import(`./DataTable-KeuZB1JM.js`)),It=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Lt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Rt=g(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),zt=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_nested_donuts:Bt}=we(),D=e,Vt=d(()=>!!D.dataset?.length),O=b(le()),Ht=b(!1),Ut=b(``),Wt=b(0),k=b(null),Gt=b(null),Kt=b(null),qt=b(null),Jt=b(null),Yt=b(0),Xt=b(0),Zt=b(0),Qt=b(!0),$t=b([]),en=b(!1),tn=b(null),nn=b(null),A=b(null),rn=b({x:0,y:0}),an=b(`pointer`),on=b(!1),j=b(!1);function sn(e){j.value=e,Wt.value+=1}let M=b(hn()),N=d(()=>M.value.style.chart.layout.labels),P=d(()=>M.value.style.chart.tooltip),F=d(()=>M.value.userOptions),I=d(()=>M.value.style.chart.layout),L=d(()=>M.value.style.chart);Se({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiNestedDonuts`,rules:[Ce.emptyArray,{test:e=>e.some(e=>e.series.length>6),message:[`👀 Some series have > 6 data points. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" data point.`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.length===1,message:[`👀 There is only one series in your dataset. Consider:`,``,`▶️ Using VueUiDonut instead.`]},{test:e=>e.length>6,message:[`👀 The number of series in your dataset > 6. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let R=d(()=>M.value.userOptions.useCursorPointer),cn={name:``,series:[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}]},ln=d(()=>me({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:M.value.skeletonConfig??{}})),{loading:un,FINAL_DATASET:dn}=Te({...Qe(D),FINAL_CONFIG:M,prepareConfig:hn,skeletonDataset:D.config?.skeletonDataset??[cn,cn],skeletonConfig:me({defaultConfig:M.value,userConfig:ln.value})}),{userOptionsVisible:fn,setUserOptionsVisibility:pn,keepUserOptionState:mn}=Ae({config:M.value}),{svgRef:z}=je({config:L.value.title});function hn(){return De(D.config,Bt,Ne)}let gn=ue(D.config);T(()=>D.config,(e,t)=>{let n=ue(e),r=n!==gn;gn=n;let i=hn();r?(un.value||(M.value=i),fn.value=!M.value.userOptions.showOnChartHover,Yt.value+=1,Xt.value+=1,Zt.value+=1,G.value.dataLabels.show=N.value.dataLabels.show,G.value.showTable=M.value.table.show,G.value.showTooltip=P.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let _n=d(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),vn=!1,B=null,yn=0,V=/* @__PURE__ */ new Map,H=b({});function bn(){yn+=1,B!==null&&cancelAnimationFrame(B),B=null,Qt.value=!1}function xn(e){let t=V.get(e);t&&cancelAnimationFrame(t.frame),V.delete(e)}function Sn(){bn();for(let e of V.keys())xn(e);H.value={}}function Cn(){if(Sn(),q.value=q.value.filter(e=>In.value.has(e)),vn||un.value||!M.value.startAnimation.show)return;let e=J.value.flatMap(e=>e.series.map(e=>e.value)),{durationMs:t,staggerMs:n}=M.value.startAnimation,r=Number(t);if(!e.length||!Number.isFinite(r)||r<=0)return;let i=Number.isFinite(Number(n))?Math.max(0,Number(n)):0;$t.value=e.map(()=>0),Qt.value=!0;let a=yn,o=performance.now();function s(t){if(vn||a!==yn)return;let n=!0;$t.value=e.map((e,a)=>{let s=Math.max(0,Math.min(1,(t-o-a*i)/r));return s<1&&(n=!1),e*he(s)}),n?(B=null,Qt.value=!1):B=requestAnimationFrame(s)}B=requestAnimationFrame(s)}let wn=d(()=>{if(!Qt.value)return[];let e=0;return J.value.map((t,n)=>{let r=t.series.reduce((e,t)=>e+t.value,0)-$t.value.slice(e,e+t.series.length).reduce((e,t)=>e+t,0);return e+=t.series.length,{name:`__ghost__`,arcOf:t.name,arcOfId:t.id,id:`ghost_${O.value}_${n}`,seriesIndex:-1,datasetIndex:n,color:`transparent`,value:r,fullValue:r,absoluteValues:[],ghost:!0}}).filter(e=>e.value>Number.MIN_VALUE)}),Tn=Ze(null),U=null;function En(){Tn.value?.disconnect(),Tn.value=null,U!==null&&cancelAnimationFrame(U),U=null}function Dn(){if(En(),!M.value.responsive){K.value={width:L.value.width,height:L.value.height};return}let e=k.value?.parentNode;if(!e)return;let t=()=>{U!==null&&cancelAnimationFrame(U),U=requestAnimationFrame(()=>{if(U=null,vn)return;let{width:e,height:t}=Oe({chart:k.value,title:L.value.title.text?Gt.value:null,legend:L.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value,padding:_n.value});K.value={width:e,height:t}})};Tn.value=new ResizeObserver(t),Tn.value.observe(e),t()}Ye(()=>{en.value=!0,Dn()}),Je(()=>{vn=!0,Sn(),En()});let W=d(()=>M.value.debug),{isPrinting:On,isImaging:kn,generatePdf:An,generateImage:jn}=Ee({elementId:`nested_donuts_${O.value}`,fileName:L.value.title.text||`vue-ui-nested-donuts`,options:M.value.userOptions.print}),Mn=d(()=>M.value.userOptions.show&&!L.value.title.text),Nn=d(()=>be(M.value.customPalette)),G=b({dataLabels:{show:N.value.dataLabels.show},showTable:M.value.table.show,showTooltip:P.value.show});T(M,()=>{G.value={dataLabels:{show:N.value.dataLabels.show},showTable:M.value.table.show,showTooltip:P.value.show}},{immediate:!0});let K=b({width:L.value.width,height:L.value.height}),Pn=tt;function Fn({datapoint:e,index:t,seriesIndex:n}){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:n}),Pn(`selectDatapoint`,{datapoint:e,index:t})}let q=b([]),J=d(()=>(dn.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,debug:W.value}),[null,void 0].includes(e.series)?de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`series`,index:t,debug:W.value}):e.series.length===0?de({componentName:`VueUiNestedDonuts`,type:`datasetAttributeEmpty`,property:`series at index ${t}`,debug:W.value}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,key:`serie`,debug:W.value}),[null,void 0].includes(e.values)&&de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`values`,index:t,key:`serie`,debug:W.value})})}),dn.value.map((e,t)=>({...e,datasetIndex:t,id:`${O.value}_${t}`,series:(e.series||[]).map((n,r)=>{let i=oe(n.values).reduce((e,t)=>e+t,0);return{name:n.name,arcOf:e.name,arcOfId:`${O.value}_${t}`,id:`${O.value}_${t}_${r}`,seriesIndex:r,datasetIndex:t,color:se(n.color)||Nn.value[r]||re[r%re.length],value:i,absoluteValues:n.values||[]}})})))),In=d(()=>new Map(J.value.flatMap(e=>e.series.map(e=>[e.id,e])))),Ln=d(()=>{let e=0;return J.value.map(t=>({...t,total:t.series.filter(e=>!q.value.includes(e.id)).reduce((e,t)=>e+t.value,0),series:t.series.map(t=>({...t,value:Qt.value?$t.value[e++]??0:t.value}))}))}),Rn=d(()=>Math.min(K.value.height,K.value.width)*(I.value.donut.strokeWidth/512));function zn(e={}){return Ln.value.map(t=>{let n=t.series.filter(e=>!q.value.includes(e.id)).map(t=>({...t,value:e[t.id]??t.value})),r=n.reduce((e,t)=>e+t.value,0);return{...t,total:r,series:n.map(e=>({...e,proportion:r?e.value/r:0}))}})}let Bn=d(()=>zn()),Y=d(()=>zn(H.value));function Vn(e){Sn();let t=e.map(e=>e.id);if(e.some(e=>q.value.includes(e.id))){let e=new Set(t);q.value=q.value.filter(t=>!e.has(t))}else q.value.push(...t);Pn(`selectLegend`,Bn.value)}function Hn(e){let t=In.value.get(e.id);if(!t)return;bn();let n=V.get(e.id),r=n?!n.show:q.value.includes(e.id),i=J.value[t.datasetIndex];if(!r&&i.series.filter(e=>!q.value.includes(e.id)&&V.get(e.id)?.show!==!1).length<=1)return;let a=H.value[e.id]??(r?0:t.value);xn(e.id),r&&(q.value=q.value.filter(t=>t!==e.id));let o=()=>{!r&&!q.value.includes(e.id)&&q.value.push(e.id);let{[e.id]:t,...n}=H.value;H.value=n,V.delete(e.id),Pn(`selectLegend`,Bn.value)},s=Number(M.value.serieToggleAnimation.durationMs);if(!M.value.serieToggleAnimation.show||!Number.isFinite(s)||s<=0){o();return}let c={show:r,frame:null};V.set(e.id,c);let ee=r?t.value:0;H.value={...H.value,[e.id]:a};let l=performance.now();function te(t){if(vn||V.get(e.id)!==c)return;let n=Math.min(1,Math.max(0,(t-l)/s));H.value={...H.value,[e.id]:a+(ee-a)*he(n)},n<1?c.frame=requestAnimationFrame(te):o()}c.frame=requestAnimationFrame(te)}function Un(e){if(!Ln.value.length)return W.value&&console.warn(`VueUiNestedDonuts - There are no series to show.`),null;let t=Ln.value.flatMap(e=>e.series).filter(t=>t.name===e);return t.length?t:(W.value&&console.warn(`VueUiNestedDonuts - Series name not found "${e}"`),null)}function Wn(e){let t=Un(e);t!==null&&t.forEach(e=>{(q.value.includes(e.id)||V.get(e.id)?.show===!1)&&Hn(e)})}function Gn(e){let t=Un(e);t!==null&&t.forEach(e=>{!q.value.includes(e.id)&&V.get(e.id)?.show!==!1&&Hn(e)})}let Kn=d(()=>Rn.value/Math.max(1,J.value.length)*I.value.donut.spacingRatio),qn=d(()=>J.value.map((e,t)=>Rn.value-t*Rn.value/J.value.length));function Jn(e,t){return ie({series:e},K.value.width/2,K.value.height/2,t,t,1.99999,2,1,360,105.25,Kn.value)}let Yn=d(()=>qn.value.map(e=>({radius:e,skeleton:Jn([{name:`_`,color:I.value.donut.emptyFill,value:1}],e),fullCirclePath:`M ${K.value.width/2},${K.value.height/2+e}
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 re,It as ie,Jt as ae,Kt as oe,S as se,Ut as ce,X as le,Zt as ue,at as de,f as fe,i as pe,in as me,it as he,n as ge,nt as _e,p as ve,t as ye,w as be}from"./lib-rPeBMZrn.js";import{t as xe}from"./labelUtils-CdtU-yB_.js";import{n as Se,t as Ce}from"./useHints-C-TwxM0Y.js";import{t as we}from"./useConfig-B8qvYKdK.js";import{t as Te}from"./useLoading-DoqqfnmS.js";import{t as Ee}from"./usePrinter-DVf3YcG5.js";import{n as De}from"./resolveChartConfig-0IvbmIE_.js";import{t as Oe}from"./useResponsive-CENUxfEL.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{n as Me}from"./Title-BliHuXfT.js";import{t as Ne}from"./vue_ui_nested_donuts-BTu965IJ.js";import{t as Pe}from"./Legend-W9YVYVX-.js";import{t as Fe}from"./BaseScanner-m6QR9rwD.js";import{t as Ie}from"./A11yDataTable-DWNlWXzs.js";import{t as Le}from"./BaseLegendToggle-VzX69MCo.js";import{t as Re}from"./DefGrad-DKMq1REY.js";import{t as ze}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as Be,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ve,createTextVNode as He,createVNode as Ue,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as We,nextTick as Ge,normalizeClass as Ke,normalizeProps as v,normalizeStyle as qe,onBeforeUnmount as Je,onMounted as Ye,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as C,toRefs as Qe,unref as w,vShow as $e,watch as T,withCtx as E,withDirectives as et}from"vue";var tt=/* @__PURE__ */ e({default:()=>Mt}),nt=[`id`],rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st=[`width`,`height`],ct=[`id`],lt=[`id`],ut=[`id`],dt=[`flood-color`],ft=[`id`,`d`],pt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],mt=[`d`,`fill`,`stroke`,`stroke-width`],ht={key:1},gt=[`d`,`fill`],_t={key:2},vt=[`font-size`,`font-weight`,`fill`,`dy`],yt=[`href`],bt=[`x`,`y`,`font-size`,`font-weight`,`fill`],xt={key:3},St=[`filter`],Ct=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],wt=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Tt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseleave`],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={key:0,class:`vue-ui-nested-donuts-legend-title`},At=[`onClick`],jt={style:{display:`flex`,"align-items":`center`}},Mt=/*#__PURE__*/ ze({__name:`vue-ui-nested-donuts`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:ze,emit:tt}){let Mt=g(()=>import(`./Tooltip-B432XpvC.js`)),Nt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Pt=g(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),Ft=g(()=>import(`./DataTable-KeuZB1JM.js`)),It=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Lt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Rt=g(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),zt=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_nested_donuts:Bt}=we(),D=e,Vt=d(()=>!!D.dataset?.length),O=b(le()),Ht=b(!1),Ut=b(``),Wt=b(0),k=b(null),Gt=b(null),Kt=b(null),qt=b(null),Jt=b(null),Yt=b(0),Xt=b(0),Zt=b(0),Qt=b(!0),$t=b([]),en=b(!1),tn=b(null),nn=b(null),A=b(null),rn=b({x:0,y:0}),an=b(`pointer`),on=b(!1),j=b(!1);function sn(e){j.value=e,Wt.value+=1}let M=b(hn()),N=d(()=>M.value.style.chart.layout.labels),P=d(()=>M.value.style.chart.tooltip),F=d(()=>M.value.userOptions),I=d(()=>M.value.style.chart.layout),L=d(()=>M.value.style.chart);Se({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiNestedDonuts`,rules:[Ce.emptyArray,{test:e=>e.some(e=>e.series.length>6),message:[`👀 Some series have > 6 data points. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" data point.`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.length===1,message:[`👀 There is only one series in your dataset. Consider:`,``,`▶️ Using VueUiDonut instead.`]},{test:e=>e.length>6,message:[`👀 The number of series in your dataset > 6. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let R=d(()=>M.value.userOptions.useCursorPointer),cn={name:``,series:[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}]},ln=d(()=>me({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:M.value.skeletonConfig??{}})),{loading:un,FINAL_DATASET:dn}=Te({...Qe(D),FINAL_CONFIG:M,prepareConfig:hn,skeletonDataset:D.config?.skeletonDataset??[cn,cn],skeletonConfig:me({defaultConfig:M.value,userConfig:ln.value})}),{userOptionsVisible:fn,setUserOptionsVisibility:pn,keepUserOptionState:mn}=Ae({config:M.value}),{svgRef:z}=je({config:L.value.title});function hn(){return De(D.config,Bt,Ne)}let gn=ue(D.config);T(()=>D.config,(e,t)=>{let n=ue(e),r=n!==gn;gn=n;let i=hn();r?(un.value||(M.value=i),fn.value=!M.value.userOptions.showOnChartHover,Yt.value+=1,Xt.value+=1,Zt.value+=1,G.value.dataLabels.show=N.value.dataLabels.show,G.value.showTable=M.value.table.show,G.value.showTooltip=P.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let _n=d(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),vn=!1,B=null,yn=0,V=/* @__PURE__ */ new Map,H=b({});function bn(){yn+=1,B!==null&&cancelAnimationFrame(B),B=null,Qt.value=!1}function xn(e){let t=V.get(e);t&&cancelAnimationFrame(t.frame),V.delete(e)}function Sn(){bn();for(let e of V.keys())xn(e);H.value={}}function Cn(){if(Sn(),q.value=q.value.filter(e=>In.value.has(e)),vn||un.value||!M.value.startAnimation.show)return;let e=J.value.flatMap(e=>e.series.map(e=>e.value)),{durationMs:t,staggerMs:n}=M.value.startAnimation,r=Number(t);if(!e.length||!Number.isFinite(r)||r<=0)return;let i=Number.isFinite(Number(n))?Math.max(0,Number(n)):0;$t.value=e.map(()=>0),Qt.value=!0;let a=yn,o=performance.now();function s(t){if(vn||a!==yn)return;let n=!0;$t.value=e.map((e,a)=>{let s=Math.max(0,Math.min(1,(t-o-a*i)/r));return s<1&&(n=!1),e*he(s)}),n?(B=null,Qt.value=!1):B=requestAnimationFrame(s)}B=requestAnimationFrame(s)}let wn=d(()=>{if(!Qt.value)return[];let e=0;return J.value.map((t,n)=>{let r=t.series.reduce((e,t)=>e+t.value,0)-$t.value.slice(e,e+t.series.length).reduce((e,t)=>e+t,0);return e+=t.series.length,{name:`__ghost__`,arcOf:t.name,arcOfId:t.id,id:`ghost_${O.value}_${n}`,seriesIndex:-1,datasetIndex:n,color:`transparent`,value:r,fullValue:r,absoluteValues:[],ghost:!0}}).filter(e=>e.value>Number.MIN_VALUE)}),Tn=Ze(null),U=null;function En(){Tn.value?.disconnect(),Tn.value=null,U!==null&&cancelAnimationFrame(U),U=null}function Dn(){if(En(),!M.value.responsive){K.value={width:L.value.width,height:L.value.height};return}let e=k.value?.parentNode;if(!e)return;let t=()=>{U!==null&&cancelAnimationFrame(U),U=requestAnimationFrame(()=>{if(U=null,vn)return;let{width:e,height:t}=Oe({chart:k.value,title:L.value.title.text?Gt.value:null,legend:L.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value,padding:_n.value});K.value={width:e,height:t}})};Tn.value=new ResizeObserver(t),Tn.value.observe(e),t()}Ye(()=>{en.value=!0,Dn()}),Je(()=>{vn=!0,Sn(),En()});let W=d(()=>M.value.debug),{isPrinting:On,isImaging:kn,generatePdf:An,generateImage:jn}=Ee({elementId:`nested_donuts_${O.value}`,fileName:L.value.title.text||`vue-ui-nested-donuts`,options:M.value.userOptions.print}),Mn=d(()=>M.value.userOptions.show&&!L.value.title.text),Nn=d(()=>be(M.value.customPalette)),G=b({dataLabels:{show:N.value.dataLabels.show},showTable:M.value.table.show,showTooltip:P.value.show});T(M,()=>{G.value={dataLabels:{show:N.value.dataLabels.show},showTable:M.value.table.show,showTooltip:P.value.show}},{immediate:!0});let K=b({width:L.value.width,height:L.value.height}),Pn=tt;function Fn({datapoint:e,index:t,seriesIndex:n}){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:n}),Pn(`selectDatapoint`,{datapoint:e,index:t})}let q=b([]),J=d(()=>(dn.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,debug:W.value}),[null,void 0].includes(e.series)?de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`series`,index:t,debug:W.value}):e.series.length===0?de({componentName:`VueUiNestedDonuts`,type:`datasetAttributeEmpty`,property:`series at index ${t}`,debug:W.value}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,key:`serie`,debug:W.value}),[null,void 0].includes(e.values)&&de({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`values`,index:t,key:`serie`,debug:W.value})})}),dn.value.map((e,t)=>({...e,datasetIndex:t,id:`${O.value}_${t}`,series:(e.series||[]).map((n,r)=>{let i=oe(n.values).reduce((e,t)=>e+t,0);return{name:n.name,arcOf:e.name,arcOfId:`${O.value}_${t}`,id:`${O.value}_${t}_${r}`,seriesIndex:r,datasetIndex:t,color:se(n.color)||Nn.value[r]||re[r%re.length],value:i,absoluteValues:n.values||[]}})})))),In=d(()=>new Map(J.value.flatMap(e=>e.series.map(e=>[e.id,e])))),Ln=d(()=>{let e=0;return J.value.map(t=>({...t,total:t.series.filter(e=>!q.value.includes(e.id)).reduce((e,t)=>e+t.value,0),series:t.series.map(t=>({...t,value:Qt.value?$t.value[e++]??0:t.value}))}))}),Rn=d(()=>Math.min(K.value.height,K.value.width)*(I.value.donut.strokeWidth/512));function zn(e={}){return Ln.value.map(t=>{let n=t.series.filter(e=>!q.value.includes(e.id)).map(t=>({...t,value:e[t.id]??t.value})),r=n.reduce((e,t)=>e+t.value,0);return{...t,total:r,series:n.map(e=>({...e,proportion:r?e.value/r:0}))}})}let Bn=d(()=>zn()),Y=d(()=>zn(H.value));function Vn(e){Sn();let t=e.map(e=>e.id);if(e.some(e=>q.value.includes(e.id))){let e=new Set(t);q.value=q.value.filter(t=>!e.has(t))}else q.value.push(...t);Pn(`selectLegend`,Bn.value)}function Hn(e){let t=In.value.get(e.id);if(!t)return;bn();let n=V.get(e.id),r=n?!n.show:q.value.includes(e.id),i=J.value[t.datasetIndex];if(!r&&i.series.filter(e=>!q.value.includes(e.id)&&V.get(e.id)?.show!==!1).length<=1)return;let a=H.value[e.id]??(r?0:t.value);xn(e.id),r&&(q.value=q.value.filter(t=>t!==e.id));let o=()=>{!r&&!q.value.includes(e.id)&&q.value.push(e.id);let{[e.id]:t,...n}=H.value;H.value=n,V.delete(e.id),Pn(`selectLegend`,Bn.value)},s=Number(M.value.serieToggleAnimation.durationMs);if(!M.value.serieToggleAnimation.show||!Number.isFinite(s)||s<=0){o();return}let c={show:r,frame:null};V.set(e.id,c);let ee=r?t.value:0;H.value={...H.value,[e.id]:a};let l=performance.now();function te(t){if(vn||V.get(e.id)!==c)return;let n=Math.min(1,Math.max(0,(t-l)/s));H.value={...H.value,[e.id]:a+(ee-a)*he(n)},n<1?c.frame=requestAnimationFrame(te):o()}c.frame=requestAnimationFrame(te)}function Un(e){if(!Ln.value.length)return W.value&&console.warn(`VueUiNestedDonuts - There are no series to show.`),null;let t=Ln.value.flatMap(e=>e.series).filter(t=>t.name===e);return t.length?t:(W.value&&console.warn(`VueUiNestedDonuts - Series name not found "${e}"`),null)}function Wn(e){let t=Un(e);t!==null&&t.forEach(e=>{(q.value.includes(e.id)||V.get(e.id)?.show===!1)&&Hn(e)})}function Gn(e){let t=Un(e);t!==null&&t.forEach(e=>{!q.value.includes(e.id)&&V.get(e.id)?.show!==!1&&Hn(e)})}let Kn=d(()=>Rn.value/Math.max(1,J.value.length)*I.value.donut.spacingRatio),qn=d(()=>J.value.map((e,t)=>Rn.value-t*Rn.value/J.value.length));function Jn(e,t){return ie({series:e},K.value.width/2,K.value.height/2,t,t,1.99999,2,1,360,105.25,Kn.value)}let Yn=d(()=>qn.value.map(e=>({radius:e,skeleton:Jn([{name:`_`,color:I.value.donut.emptyFill,value:1}],e),fullCirclePath:`M ${K.value.width/2},${K.value.height/2+e}
2
2
  a ${e},${e} 0 1,1 0,${-2*e}
3
3
  a ${e},${e} 0 1,1 0,${2*e}`}))),X=d(()=>Y.value.map((e,t)=>{let n=Yn.value[t],r=wn.value.find(e=>e.datasetIndex===t),i=Jn([...e.series,...r?[r]:[]].map(e=>({...e,value:e.value<1e-11?Number.MIN_VALUE:e.value})),n.radius);return{...e,...n,hasData:Math.abs(e.total)>0,donut:i,visibleArcs:i.filter(e=>!e.ghost)}})),Xn=d(()=>qn.value.map(e=>({sizeRatio:Rn.value-e,donut:Jn([{value:1}],e)[0]}))),Z=b(null),Zn=d(()=>$.value.find(e=>e.id===Z.value)?.seriesIndex??null),Qn=b(null);function $n(){Ht.value=!1,Z.value=null,A.value=null,an.value=`pointer`}function er({datapoint:e,seriesIndex:t}){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t}),$n()}function tr({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return xe({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function nr({datapoint:e,relativeIndex:t,notify:n=!0,seriesIndex:r,triggerMode:i=`pointer`}){n&&M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:r}),an.value=i,A.value=t??$.value.findIndex(t=>t.id===e.id),Z.value=e.id,Qn.value={datapoint:e,seriesIndex:r,series:Y.value,config:M.value};let a=P.value.customFormat,o=ne(a)?a({seriesIndex:r,datapoint:e,series:Y.value,config:M.value}):null;if(typeof o==`string`)Ut.value=o;else{let t=``;if(P.value.showAllItemsAtIndex&&q.value.length===0){let e=Y.value.map(e=>e.series.find(e=>e.seriesIndex===r));e.forEach((n,i)=>{if(!n)return``;t+=`
4
4
  <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<e.length-1?`border-bottom:1px solid ${P.value.borderColor}`:``}">
@@ -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 ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,D as re,Dt as ie,Ht as ae,S as oe,X as se,Zt as ce,at as le,i as ue,in as de,nt as fe,t as pe,w as me}from"./lib-rPeBMZrn.js";import{t as he}from"./labelUtils-CdtU-yB_.js";import{n as ge,t as _e}from"./useHints-C-TwxM0Y.js";import{t as ve}from"./useConfig-CXhXxWjB.js";import{t as ye}from"./useLoading-DoqqfnmS.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{t as xe}from"./useResponsive-CENUxfEL.js";import{t as Se}from"./useTransitions-ChGGrtrv.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{n as De}from"./Title-BliHuXfT.js";import{t as Oe}from"./Legend-W9YVYVX-.js";import{t as ke}from"./vue_ui_onion-B32NW6YW.js";import{t as Ae}from"./BaseScanner-m6QR9rwD.js";import{t as je}from"./A11yDataTable-DWNlWXzs.js";import{t as Me}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Pe,Teleport as Fe,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Ie,createTextVNode as Le,createVNode as Re,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as g,nextTick as ze,normalizeClass as Be,normalizeProps as _,normalizeStyle as Ve,onBeforeUnmount as He,onMounted as Ue,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as We,shallowRef as Ge,toDisplayString as Ke,toRefs as qe,unref as S,watch as C,withCtx as w}from"vue";var Je=/* @__PURE__ */ e({default:()=>gt}),Ye=[`id`],Xe=[`id`],Ze=[`id`],Qe={style:{position:`relative`}},$e=[`xmlns`,`aria-describedby`,`viewBox`],et=[`width`,`height`],tt=[`stroke`,`stroke-width`],nt=[`stroke`,`stroke-width`],rt=[`id`],it=[`stdDeviation`],at=[`filter`],ot=[`stroke-width`],st=[`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],ct={key:2},lt=[`onMouseenter`,`onMouseleave`,`onClick`],ut=[`transform`,`font-size`,`fill`,`font-weight`],dt={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`},pt=[`id`],mt=[`onClick`],ht=[`innerHTML`],gt=/*#__PURE__*/ Ne({__name:`vue-ui-onion`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Ne,emit:Je}){let gt=m(()=>import(`./Tooltip-B432XpvC.js`)),_t=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),vt=m(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),yt=m(()=>import(`./DataTable-KeuZB1JM.js`)),bt=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),xt=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),St=m(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),Ct=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_onion:wt}=ve(),T=e,Tt=l(()=>!!T.dataset&&T.dataset.length),E=y(se()),Et=y(0),Dt=y(!1),Ot=y(``),D=y([]),O=y(null),kt=y(null),At=y(null),jt=y(null),Mt=y(null),Nt=y(0),Pt=y(0),Ft=y(0),k=y(!1),It=y(!1),Lt=y(null),A=y(null),Rt=y({x:0,y:0}),j=y(`pointer`),zt=y(!1),M=y(Kt()),N=l(()=>M.value.userOptions),P=l(()=>M.value.style.chart.layout.labels),Bt=l(()=>M.value.style.chart.layout),F=l(()=>M.value.style.chart.tooltip),I=l(()=>M.value.style.chart);ge({config:()=>M.value,dataset:()=>T.dataset,component:`VueUiOnion`,rules:[_e.emptyArray,{test:e=>e.length>8,message:[`👀 The number of series is > 8. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:L}=Se({config:()=>M.value.transitions,dataset:()=>T.dataset}),R=l(()=>M.value.userOptions.useCursorPointer),Vt=l(()=>de({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{gutter:{color:`#99999950`},labels:{show:!1}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:z,FINAL_DATASET:Ht}=ye({...qe(T),FINAL_CONFIG:M,prepareConfig:Kt,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,percentage:50,value:1,color:`#DBDBDB`},{name:`_`,percentage:50,value:1,color:`#C4C4C4`},{name:`_`,percentage:50,value:1,color:`#ADADAD`},{name:`_`,percentage:50,value:1,color:`#969696`}],skeletonConfig:de({defaultConfig:M.value,userConfig:Vt.value})}),{userOptionsVisible:Ut,setUserOptionsVisibility:Wt,keepUserOptionState:Gt}=we({config:M.value}),{svgRef:B}=Te({config:I.value.title});function Kt(){return ne(T.config,wt,ke)}let qt=ce(T.config);C(()=>T.config,(e,t)=>{let n=ce(e),r=n!==qt;qt=n;let i=Kt();r?(z.value||(M.value=i),Ut.value=!M.value.userOptions.showOnChartHover,Nt.value+=1,Pt.value+=1,Ft.value+=1,V.value.showTable=M.value.table.show,V.value.showTooltip=F.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Jt,isImaging:Yt,generatePdf:Xt,generateImage:Zt}=be({elementId:`vue-ui-onion_${E.value}`,fileName:I.value.title.text||`vue-ui-onion`,options:M.value.userOptions.print}),Qt=l(()=>M.value.userOptions.show&&!I.value.title.text),$t=l(()=>me(M.value.customPalette)),V=y({showTable:M.value.table.show,showTooltip:F.value.show});C(M,()=>{V.value={showTable:M.value.table.show,showTooltip:F.value.show}},{immediate:!0});let H=y({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),en=Ge(null),U=null,W=!1;Ue(()=>{It.value=!0,un()});let{autoSizeLabelsNow:tn}=Ee({svgRef:B,fontSize:()=>P.value.fontSize,minFontSize:()=>P.value.minFontSize,labelClass:`.vue-ui-onion-label`}),G=null,K=null,nn=0;function rn(){G!==null&&(cancelAnimationFrame(G),G=null),K!==null&&(clearTimeout(K),K=null)}function an(e){return String(e).split(`,`).map(e=>{let t=e.trim(),n=Number.parseFloat(t);return Number.isFinite(n)?t.endsWith(`ms`)?n:n*1e3:0})}function on(){return typeof window>`u`||!L.value||k.value||z.value||!B.value?0:Array.from(B.value.querySelectorAll(`.vue-ui-onion-label.vue-data-ui-transition`)).reduce((e,t)=>{let n=window.getComputedStyle(t);if(n.transitionProperty===`none`)return e;let r=an(n.transitionDuration),i=an(n.transitionDelay),a=Math.max(r.length,i.length),o=Array.from({length:a},(e,t)=>(r[t%r.length]??0)+(i[t%i.length]??0)).reduce((e,t)=>Math.max(e,t),0);return Math.max(e,o)},0)}function sn(){if(W||typeof window>`u`)return;let e=++nn;rn(),ze(()=>{e===nn&&(G=requestAnimationFrame(()=>{if(G=null,e!==nn)return;let t=on();t<=0?tn():K=setTimeout(()=>{K=null,e===nn&&tn()},t+34)}))})}let cn=l(()=>M.value.debug);function ln(){en.value?.disconnect(),en.value=null,U!==null&&cancelAnimationFrame(U),U=null,k.value=!1}function un(){if(ln(),!M.value.responsive){H.value={width:512,height:512,padding:{top:64,right:64,bottom:64,left:64},minRadius:64},sn();return}let e=O.value?.parentNode;if(!e)return;let t=()=>{U!==null&&cancelAnimationFrame(U),k.value=!0,U=requestAnimationFrame(async()=>{if(U=null,W)return;let{width:e,height:t}=xe({chart:O.value,title:I.value.title.text?kt.value:null,legend:I.value.legend.show?At.value:null,source:jt.value,noTitle:Mt.value}),n=t-12,r=Math.max(e,n)*64/512;H.value={width:e,height:n,padding:{top:r,right:r,bottom:r,left:r},minRadius:Math.min(e,n)*64/512},await ze(),W||(k.value=!1,sn())})};en.value=new ResizeObserver(t),en.value.observe(e),t()}He(()=>{W=!0,vn(),ln(),nn+=1,rn()});let q=l(()=>({top:H.value.padding.top,left:H.value.padding.left,right:H.value.width-H.value.padding.right,bottom:H.value.height-H.value.padding.bottom,centerX:H.value.width/2,centerY:H.value.height/2,width:H.value.width-H.value.padding.right-H.value.padding.left,height:H.value.height-H.value.padding.bottom-H.value.padding.top,minRadius:H.value.minRadius,maxRadius:Math.min(H.value.width,H.value.height)-H.value.padding.top*2})),J=l(()=>(cn.value&&Ht.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiOnion`,type:`datasetSerieAttribute`,property:`name`,index:t}),[void 0].includes(e.percentage)&&le({componentName:`VueUiOnion`,type:`datasetSerieAttribute`,property:`percentage`,index:t})}),Ht.value.map((e,t)=>{let n=`onion_serie_${t}_${E.value}`;return{...e,percentage:e.percentage||0,targetPercentage:e.percentage||0,color:oe(e.color)||$t.value[t]||ae[t],id:n,shape:`circle`,opacity:D.value.includes(n)?.5:1,absoluteIndex:t,segregate:()=>En(n),isSegregated:D.value.includes(n)}}))),dn=l(()=>J.value.map((e,t)=>{let n=I.value.legend.showValue,r=I.value.legend.showPercentage,i=ue(P.value.value.formatter,e.value,c({p:e.prefix||``,v:e.value,s:e.suffix||``,r:I.value.legend.roundingValue})),a=c({v:e.percentage??0,s:`%`,r:I.value.legend.roundingPercentage}),o=he({showVal:n,showPercentage:r,val:i,percentage:a,config:I.value.legend});return{...e,display:`${e.name}${n||r?`: `:``}${o}`}})),fn=y(null),pn=l(()=>J.value.map(e=>({...e,percentage:fn.value===null?e.percentage:Math.min(fn.value,e.targetPercentage)}))),mn=l(()=>M.value.useStartAnimation),hn=y(!1),gn=null,_n=0;function vn(){_n+=1,gn!==null&&cancelAnimationFrame(gn),gn=null,fn.value=null}function yn(){if(vn(),W||!mn.value||hn.value||z.value)return;let e=Math.max(0,...J.value.map(e=>e.percentage));if(!Number.isFinite(e)||e<=0){hn.value=!0;return}let t=_n,n=0;function r(){W||t!==_n||(n>=e?(fn.value=null,gn=null,hn.value=!0):(fn.value=n++,gn=requestAnimationFrame(r)))}r()}let bn=l(()=>({cy:`onion-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),xn=l(()=>pn.value.filter(e=>!D.value.includes(e.id))),Y=l(()=>{let e=Math.min(Bt.value.maxThickness,Math.min(q.value.width,q.value.height)/2/Math.max(1,J.value.length));return{gutter:e*Bt.value.gutter.width,track:e*Bt.value.track.width}}),X=l(()=>xn.value.map((e,t)=>{let n=(q.value.maxRadius-Y.value.track)/xn.value.length/2*(1+t),r=q.value.centerY-n;return{percentage:e.percentage||0,...e,labelY:r,radius:n,path:Sn(n,e.percentage||0)}}));function Sn(e,t){let n=2*Math.PI*e,r=n*.75,i=`${r} ${n}`,a=r*(1-t/100);return{bgDashArray:`${r} ${n}`,bgDashOffset:0,dashArray:i,dashOffset:a,fullOffset:0,active:`
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 c,D as re,Dt as ie,Ht as ae,S as oe,X as se,Zt as ce,at as le,i as ue,in as de,nt as fe,t as pe,w as me}from"./lib-rPeBMZrn.js";import{t as he}from"./labelUtils-CdtU-yB_.js";import{n as ge,t as _e}from"./useHints-C-TwxM0Y.js";import{t as ve}from"./useConfig-B8qvYKdK.js";import{t as ye}from"./useLoading-DoqqfnmS.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{t as xe}from"./useResponsive-CENUxfEL.js";import{t as Se}from"./useTransitions-ChGGrtrv.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{n as De}from"./Title-BliHuXfT.js";import{t as Oe}from"./Legend-W9YVYVX-.js";import{t as ke}from"./vue_ui_onion-B32NW6YW.js";import{t as Ae}from"./BaseScanner-m6QR9rwD.js";import{t as je}from"./A11yDataTable-DWNlWXzs.js";import{t as Me}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Pe,Teleport as Fe,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Ie,createTextVNode as Le,createVNode as Re,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as g,nextTick as ze,normalizeClass as Be,normalizeProps as _,normalizeStyle as Ve,onBeforeUnmount as He,onMounted as Ue,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as We,shallowRef as Ge,toDisplayString as Ke,toRefs as qe,unref as S,watch as C,withCtx as w}from"vue";var Je=/* @__PURE__ */ e({default:()=>gt}),Ye=[`id`],Xe=[`id`],Ze=[`id`],Qe={style:{position:`relative`}},$e=[`xmlns`,`aria-describedby`,`viewBox`],et=[`width`,`height`],tt=[`stroke`,`stroke-width`],nt=[`stroke`,`stroke-width`],rt=[`id`],it=[`stdDeviation`],at=[`filter`],ot=[`stroke-width`],st=[`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],ct={key:2},lt=[`onMouseenter`,`onMouseleave`,`onClick`],ut=[`transform`,`font-size`,`fill`,`font-weight`],dt={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`},pt=[`id`],mt=[`onClick`],ht=[`innerHTML`],gt=/*#__PURE__*/ Ne({__name:`vue-ui-onion`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Ne,emit:Je}){let gt=m(()=>import(`./Tooltip-B432XpvC.js`)),_t=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),vt=m(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),yt=m(()=>import(`./DataTable-KeuZB1JM.js`)),bt=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),xt=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),St=m(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),Ct=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_onion:wt}=ve(),T=e,Tt=l(()=>!!T.dataset&&T.dataset.length),E=y(se()),Et=y(0),Dt=y(!1),Ot=y(``),D=y([]),O=y(null),kt=y(null),At=y(null),jt=y(null),Mt=y(null),Nt=y(0),Pt=y(0),Ft=y(0),k=y(!1),It=y(!1),Lt=y(null),A=y(null),Rt=y({x:0,y:0}),j=y(`pointer`),zt=y(!1),M=y(Kt()),N=l(()=>M.value.userOptions),P=l(()=>M.value.style.chart.layout.labels),Bt=l(()=>M.value.style.chart.layout),F=l(()=>M.value.style.chart.tooltip),I=l(()=>M.value.style.chart);ge({config:()=>M.value,dataset:()=>T.dataset,component:`VueUiOnion`,rules:[_e.emptyArray,{test:e=>e.length>8,message:[`👀 The number of series is > 8. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:L}=Se({config:()=>M.value.transitions,dataset:()=>T.dataset}),R=l(()=>M.value.userOptions.useCursorPointer),Vt=l(()=>de({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{gutter:{color:`#99999950`},labels:{show:!1}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:z,FINAL_DATASET:Ht}=ye({...qe(T),FINAL_CONFIG:M,prepareConfig:Kt,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,percentage:50,value:1,color:`#DBDBDB`},{name:`_`,percentage:50,value:1,color:`#C4C4C4`},{name:`_`,percentage:50,value:1,color:`#ADADAD`},{name:`_`,percentage:50,value:1,color:`#969696`}],skeletonConfig:de({defaultConfig:M.value,userConfig:Vt.value})}),{userOptionsVisible:Ut,setUserOptionsVisibility:Wt,keepUserOptionState:Gt}=we({config:M.value}),{svgRef:B}=Te({config:I.value.title});function Kt(){return ne(T.config,wt,ke)}let qt=ce(T.config);C(()=>T.config,(e,t)=>{let n=ce(e),r=n!==qt;qt=n;let i=Kt();r?(z.value||(M.value=i),Ut.value=!M.value.userOptions.showOnChartHover,Nt.value+=1,Pt.value+=1,Ft.value+=1,V.value.showTable=M.value.table.show,V.value.showTooltip=F.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Jt,isImaging:Yt,generatePdf:Xt,generateImage:Zt}=be({elementId:`vue-ui-onion_${E.value}`,fileName:I.value.title.text||`vue-ui-onion`,options:M.value.userOptions.print}),Qt=l(()=>M.value.userOptions.show&&!I.value.title.text),$t=l(()=>me(M.value.customPalette)),V=y({showTable:M.value.table.show,showTooltip:F.value.show});C(M,()=>{V.value={showTable:M.value.table.show,showTooltip:F.value.show}},{immediate:!0});let H=y({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),en=Ge(null),U=null,W=!1;Ue(()=>{It.value=!0,un()});let{autoSizeLabelsNow:tn}=Ee({svgRef:B,fontSize:()=>P.value.fontSize,minFontSize:()=>P.value.minFontSize,labelClass:`.vue-ui-onion-label`}),G=null,K=null,nn=0;function rn(){G!==null&&(cancelAnimationFrame(G),G=null),K!==null&&(clearTimeout(K),K=null)}function an(e){return String(e).split(`,`).map(e=>{let t=e.trim(),n=Number.parseFloat(t);return Number.isFinite(n)?t.endsWith(`ms`)?n:n*1e3:0})}function on(){return typeof window>`u`||!L.value||k.value||z.value||!B.value?0:Array.from(B.value.querySelectorAll(`.vue-ui-onion-label.vue-data-ui-transition`)).reduce((e,t)=>{let n=window.getComputedStyle(t);if(n.transitionProperty===`none`)return e;let r=an(n.transitionDuration),i=an(n.transitionDelay),a=Math.max(r.length,i.length),o=Array.from({length:a},(e,t)=>(r[t%r.length]??0)+(i[t%i.length]??0)).reduce((e,t)=>Math.max(e,t),0);return Math.max(e,o)},0)}function sn(){if(W||typeof window>`u`)return;let e=++nn;rn(),ze(()=>{e===nn&&(G=requestAnimationFrame(()=>{if(G=null,e!==nn)return;let t=on();t<=0?tn():K=setTimeout(()=>{K=null,e===nn&&tn()},t+34)}))})}let cn=l(()=>M.value.debug);function ln(){en.value?.disconnect(),en.value=null,U!==null&&cancelAnimationFrame(U),U=null,k.value=!1}function un(){if(ln(),!M.value.responsive){H.value={width:512,height:512,padding:{top:64,right:64,bottom:64,left:64},minRadius:64},sn();return}let e=O.value?.parentNode;if(!e)return;let t=()=>{U!==null&&cancelAnimationFrame(U),k.value=!0,U=requestAnimationFrame(async()=>{if(U=null,W)return;let{width:e,height:t}=xe({chart:O.value,title:I.value.title.text?kt.value:null,legend:I.value.legend.show?At.value:null,source:jt.value,noTitle:Mt.value}),n=t-12,r=Math.max(e,n)*64/512;H.value={width:e,height:n,padding:{top:r,right:r,bottom:r,left:r},minRadius:Math.min(e,n)*64/512},await ze(),W||(k.value=!1,sn())})};en.value=new ResizeObserver(t),en.value.observe(e),t()}He(()=>{W=!0,vn(),ln(),nn+=1,rn()});let q=l(()=>({top:H.value.padding.top,left:H.value.padding.left,right:H.value.width-H.value.padding.right,bottom:H.value.height-H.value.padding.bottom,centerX:H.value.width/2,centerY:H.value.height/2,width:H.value.width-H.value.padding.right-H.value.padding.left,height:H.value.height-H.value.padding.bottom-H.value.padding.top,minRadius:H.value.minRadius,maxRadius:Math.min(H.value.width,H.value.height)-H.value.padding.top*2})),J=l(()=>(cn.value&&Ht.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiOnion`,type:`datasetSerieAttribute`,property:`name`,index:t}),[void 0].includes(e.percentage)&&le({componentName:`VueUiOnion`,type:`datasetSerieAttribute`,property:`percentage`,index:t})}),Ht.value.map((e,t)=>{let n=`onion_serie_${t}_${E.value}`;return{...e,percentage:e.percentage||0,targetPercentage:e.percentage||0,color:oe(e.color)||$t.value[t]||ae[t],id:n,shape:`circle`,opacity:D.value.includes(n)?.5:1,absoluteIndex:t,segregate:()=>En(n),isSegregated:D.value.includes(n)}}))),dn=l(()=>J.value.map((e,t)=>{let n=I.value.legend.showValue,r=I.value.legend.showPercentage,i=ue(P.value.value.formatter,e.value,c({p:e.prefix||``,v:e.value,s:e.suffix||``,r:I.value.legend.roundingValue})),a=c({v:e.percentage??0,s:`%`,r:I.value.legend.roundingPercentage}),o=he({showVal:n,showPercentage:r,val:i,percentage:a,config:I.value.legend});return{...e,display:`${e.name}${n||r?`: `:``}${o}`}})),fn=y(null),pn=l(()=>J.value.map(e=>({...e,percentage:fn.value===null?e.percentage:Math.min(fn.value,e.targetPercentage)}))),mn=l(()=>M.value.useStartAnimation),hn=y(!1),gn=null,_n=0;function vn(){_n+=1,gn!==null&&cancelAnimationFrame(gn),gn=null,fn.value=null}function yn(){if(vn(),W||!mn.value||hn.value||z.value)return;let e=Math.max(0,...J.value.map(e=>e.percentage));if(!Number.isFinite(e)||e<=0){hn.value=!0;return}let t=_n,n=0;function r(){W||t!==_n||(n>=e?(fn.value=null,gn=null,hn.value=!0):(fn.value=n++,gn=requestAnimationFrame(r)))}r()}let bn=l(()=>({cy:`onion-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),xn=l(()=>pn.value.filter(e=>!D.value.includes(e.id))),Y=l(()=>{let e=Math.min(Bt.value.maxThickness,Math.min(q.value.width,q.value.height)/2/Math.max(1,J.value.length));return{gutter:e*Bt.value.gutter.width,track:e*Bt.value.track.width}}),X=l(()=>xn.value.map((e,t)=>{let n=(q.value.maxRadius-Y.value.track)/xn.value.length/2*(1+t),r=q.value.centerY-n;return{percentage:e.percentage||0,...e,labelY:r,radius:n,path:Sn(n,e.percentage||0)}}));function Sn(e,t){let n=2*Math.PI*e,r=n*.75,i=`${r} ${n}`,a=r*(1-t/100);return{bgDashArray:`${r} ${n}`,bgDashOffset:0,dashArray:i,dashOffset:a,fullOffset:0,active:`
2
2
  M ${q.value.centerX},${q.value.centerY-e}
3
3
  A ${e},${e} 0 1 1
4
4
  ${q.value.centerX+e*Math.cos(Math.PI*3/4)},${q.value.centerY+e*Math.sin(Math.PI*3/4)}
@@ -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 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,Ht as oe,J as se,Jt as ce,P as le,S as ue,U as de,X as fe,Zt as pe,_ as me,at as he,i as ge,in as _e,nt as ve,rn as ye,t as be,tn as xe,w as Se,xt as Ce,yt as we,zt as Te}from"./lib-rPeBMZrn.js";import{n as Ee,t as De}from"./useHints-C-TwxM0Y.js";import{t as Oe}from"./useConfig-CXhXxWjB.js";import{t as ke}from"./useSvgLabelLayout-42Kats14.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useLoading-DoqqfnmS.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./useChartExport-BZts4KFb.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Re}from"./vue_ui_parallel_coordinate_plot-BhzmL7XF.js";import{n as ze}from"./Title-BliHuXfT.js";import{t as Be}from"./Legend-W9YVYVX-.js";import{t as Ve}from"./Shape-CRe8woTu.js";import{t as He}from"./BaseScanner-m6QR9rwD.js";import{t as Ue}from"./A11yDataTable-DWNlWXzs.js";import{t as We}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,Teleport as Ke,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as qe,createTextVNode as Je,createVNode as Ye,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Xe,nextTick as Ze,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,watch as rt,withCtx as T}from"vue";var it=/* @__PURE__ */ e({default:()=>Ot}),at=[`id`],ot=[`id`],st=[`id`],ct={style:{position:`relative`}},lt=[`xmlns`,`aria-describedby`,`viewBox`],ut=[`x`,`y`,`width`,`height`],dt={style:{"pointer-events":`none`}},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`d`,`stroke`,`stroke-width`],mt={key:0},ht=[`transform`,`fill`,`font-size`,`font-weight`],gt=[`innerHTML`],_t={key:0},vt=[`x`,`y`,`font-size`,`fill`],yt=[`width`,`x`,`y`],bt={style:{width:`100%`}},xt=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],St=[`d`,`onMouseenter`,`onMouseleave`,`onClick`],Ct=[`transform`,`fill`,`font-weight`,`font-size`,`stroke`,`onMouseenter`,`onMouseleave`,`onClick`],wt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et=[`id`],Dt=[`onClick`],Ot=/*#__PURE__*/ Ge({__name:`vue-ui-parallel-coordinate-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Ge,emit:it}){let Ot=m(()=>import(`./Tooltip-B432XpvC.js`)),kt=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),At=m(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),jt=m(()=>import(`./DataTable-KeuZB1JM.js`)),Mt=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Nt=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Pt=m(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),Ft=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_parallel_coordinate_plot:It}=Oe(),E=e,Lt=l(()=>!!E.dataset?.length),Rt=b(0),D=b(null),zt=b(null),Bt=b(null),Vt=b(null),Ht=b(null),Ut=b(0),Wt=b(0),Gt=b(0),Kt=b(!1),qt=b(null),Jt=b(null),Yt=b(null),O=b(null),Xt=b({x:0,y:0}),k=b(`pointer`),Zt=b(!1),A=b(fe()),j=b(!1);function Qt(e){j.value=e,Rt.value+=1}let M=b(on()),N=l(()=>M.value.userOptions),P=l(()=>M.value.style.chart.yAxis.labels),F=l(()=>M.value.style.chart.tooltip),I=l(()=>M.value.style.chart),{transitionEnabled:L}=Pe({config:()=>M.value.transitions,dataset:()=>E.dataset});Ee({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiParallelCoordinatePlot`,rules:[De.emptyArray,{test:e=>e.length>10,message:[`👀 There are > 10 series. Consider:`,``,`▶️ Using filters, to show less series at the same time and make the chart more readable.`]},{test:e=>e.some(e=>(e?.series??[]).some(e=>(e?.values??[]).length>15)),message:[`👀 There are > 15 axes, which can make the chart hard to read. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]},{test:e=>e.some(e=>e?.series?.length>5),message:[`👀 Some series have > 5 datapoints. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]}]});let R=l(()=>M.value.userOptions.useCursorPointer),$t=l(()=>_e({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{show:!0,backgroundColor:`transparent`},yAxis:{stroke:`#6A6A6A`,labels:{showAxisNames:!1,axisNames:[],ticks:{color:`#6A6A6A`}}}}}},userConfig:M.value.skeletonConfig??{}})),{loading:en,FINAL_DATASET:tn}=je({...nt(E),FINAL_CONFIG:M,prepareConfig:on,skeletonDataset:E.config?.skeletonDataset??[{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[1,10,100,1e3]}]},{name:``,shape:`circle`,color:`#CACACA`,series:[{name:``,values:[.2,3,50,800]}]},{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[0,0,0,0]}]}],skeletonConfig:_e({defaultConfig:M.value,userConfig:$t.value})}),{userOptionsVisible:nn,setUserOptionsVisibility:rn,keepUserOptionState:an}=Fe({config:M.value}),{svgRef:z}=Ie({config:I.value.title});function on(){return ne(E.config,It,Re)}let sn=pe(E.config);rt(()=>E.config,(e,t)=>{let n=pe(e),r=n!==sn;sn=n;let i=on();r?(en.value||(M.value=i),nn.value=!M.value.userOptions.showOnChartHover,Ut.value+=1,Gt.value+=1,Wt.value+=1,U.value.dataLabels.show=P.value.datapoints.show,U.value.showTable=M.value.table.show,U.value.showTooltip=F.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let cn=tt(null),ln=!1,un=b(!1),dn=0;$e(()=>{Kt.value=!0,pn()});let fn=l(()=>M.value.debug);function pn(){Te(E.dataset)?he({componentName:`VueUiParallelCoordinatePlot`,type:`dataset`,debug:fn.value}):E.dataset.forEach((e,t)=>{we({datasetObject:e,requiredAttributes:[`name`,`series`]}).forEach(e=>{he({componentName:`VueUiParallelCoordinatePlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:fn.value})})}),gn()}function mn(e=I.value.width,t=I.value.height,n=null){let r={width:e,height:t},i=[[`plotSize`,I.value.plots.radius,2],[`ticksFontSize`,P.value.ticks.fontSize,10],[`datapointFontSize`,P.value.datapoints.fontSize,10],[`axisNameFontSize`,P.value.axisNamesFontSize,12]];for(let[e,t,a]of i)r[e]=n!==null&&M.value.responsiveProportionalSizing?ye({relator:n,adjuster:600,source:t,threshold:a,fallback:a}):t;return r}function hn(){cancelAnimationFrame(dn),cn.value?.disconnect(),cn.value=null}function gn(){if(hn(),ln)return;if(un.value=!1,!M.value.responsive){B.value=mn();return}if(!D.value)return;let e=()=>{!ln&&M.value.responsive&&(cancelAnimationFrame(dn),dn=requestAnimationFrame(()=>{let{width:e,height:t}=Me({chart:D.value,title:I.value.title.text?zt.value:null,legend:I.value.legend.show?Bt.value:null,source:Vt.value,noTitle:Ht.value});B.value=mn(e,t-12,Math.min(e,t)),un.value=!0}))};cn.value=new ResizeObserver(e),cn.value.observe(D.value.parentNode),e()}Qe(()=>{ln=!0,hn()});let{isPrinting:_n,isImaging:vn,generatePdf:yn,generateImage:bn}=Ae({elementId:`pcp_${A.value}`,fileName:I.value.title.text||`vue-ui-parallel-coordinate-plot`,options:M.value.userOptions.print}),xn=l(()=>M.value.userOptions.show&&!I.value.title.text),B=b(mn()),Sn=l(()=>B.value.width),Cn=l(()=>B.value.height),{metrics:wn,ready:Tn,settling:V,update:En}=ke({svgRef:z,canMeasure:()=>!M.value.responsive||un.value,initialMetrics:{top:0},measure:e=>({top:e(Yt.value).height})}),Dn=l(()=>wn.value.top),H=l(()=>{let{top:e,right:t,bottom:n,left:r}=I.value.padding,i=Cn.value,a=Sn.value;return{chartHeight:Math.max(.001,i),chartWidth:Math.max(.001,a),height:Math.max(.001,i-e-n-Dn.value-B.value.datapointFontSize*2),width:Math.max(.001,a-r-t),top:e+Dn.value+B.value.datapointFontSize,left:r,right:a-t,bottom:i-n-B.value.datapointFontSize}}),On=l(()=>Se(M.value.customPalette)),U=b({dataLabels:{show:P.value.datapoints.show},showTable:M.value.table.show,showTooltip:F.value.show});rt(M,()=>{gn(),U.value={dataLabels:{show:P.value.datapoints.show},showTable:M.value.table.show,showTooltip:F.value.show}},{immediate:!0});let W=b([]);function kn(){W.value.length?W.value=[]:Pn.value.forEach(e=>{W.value.push(e.id)}),$n(`selectLegend`,In.value)}function An(e){W.value.includes(e)?W.value=W.value.filter(t=>t!==e):W.value.push(e),$n(`selectLegend`,In.value)}let G=l(()=>tn.value.map((e,t)=>{let n=ue(e.color)||On.value[t]||oe[t]||oe[t%oe.length];return{...e,series:(e.series||[]).map((r,i)=>({...r,id:`pcp_item_${A.value}_${e.id??t}_${r.id??i}`,color:n})),seriesIndex:t,color:n,id:`pcp_group_${A.value}_${e.id??t}`,shape:e.shape||`circle`}}));function jn(e){return G.value.length?G.value.find(t=>t.name===e)||(fn.value&&console.warn(`VueUiParallelCoordinatePlot - Series name not found "${e}"`),null):(fn.value&&console.warn(`VueUiParallelCoordinatePlot - There are no series to show.`),null)}function Mn(e){let t=jn(e);t!==null&&W.value.includes(t.id)&&An(t.id)}function Nn(e){let t=jn(e);t!==null&&(W.value.includes(t.id)||An(t.id))}let Pn=l(()=>G.value.map(e=>({...e,opacity:W.value.includes(e.id)?.5:1,segregate:()=>An(e.id),isSegregated:W.value.includes(e.id),shape:e.shape||`circle`}))),Fn=l(()=>({cy:`pcp-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),In=l(()=>G.value.filter(e=>!W.value.includes(e.id))),Ln=l(()=>In.value.flatMap(e=>e.series)),Rn=l(()=>Math.max(0,...Ln.value.map(e=>e.values.length))),K=l(()=>Rn.value?H.value.width/Rn.value:0);function zn(e,t){return H.value.bottom-H.value.height*((e-t.min)/(t.max-t.min))}function Bn(e){return H.value.left+K.value*e+K.value/2}function Vn(e,t){let n=e,r=t;return e===t&&(e>0?(n=e/4,r=t*2):e<0?(n=e*2,r=t/4):(n=0,r=1)),me(n,r,Math.max(2,I.value.yAxis.scaleTicks))}let q=l(()=>Array.from({length:Rn.value},(e,t)=>{let n=Ln.value.map(e=>e.values[t]||0),r=Vn(Math.min(...n),Math.max(...n));return{scale:r,ticks:r.ticks.map(e=>({y:zn(e,r),x:Bn(t),value:e})),name:P.value.axisNames[t]||`Y-${t+1}`}})),J=l(()=>In.value.map((e,t)=>({...e,series:e.series.map((n,r)=>{let i=n.values.map((i,a)=>({name:n.name,seriesName:e.name,axisIndex:a,datapointIndex:r,seriesIndex:t,value:i||0,x:Bn(a),y:zn(i||0,q.value[a].scale),comment:n.comments&&n.comments[a]||``})),a=de(i),o=le(i,.12);return{...n,datapoints:i,straightPath:a,smoothPath:o,pathLength:Ce(I.value.lines.smooth?`M ${o}`:`M ${a}`)}})}))),Y=l(()=>J.value.flatMap((e,t)=>e.series.map((n,r)=>({shape:e.shape,serieName:e.name,serie:n,relativeIndex:r,seriesIndex:e.seriesIndex,S:t,key:n.id})))),Hn=l(()=>new Map(Y.value.map(e=>[e.serie.id,e])));function X(e){return Hn.value.get(e.id)}function Un({value:e,index:t,datapoint:n}){return ge(P.value.formatters[t]||null,e,re({p:P.value.prefixes[t]||``,v:e,s:P.value.suffixes[t]||``,r:P.value.roundings[t]||0}),{datapoint:n,seriesIndex:t})}function Wn(e,t){let n=P.value;return{class:`vue-ui-parallel-coordinate-plot-x-label`,"data-cy":`pcp-axis-label`,fill:n.axisNamesColor,"font-size":B.value.axisNameFontSize,"font-weight":n.axisNamesBold?`bold`:``,"text-anchor":n.axisNamesRotation===0?`middle`:n.axisNamesRotation<0?`start`:`end`,transform:`translate(${Bn(t)}, ${Dn.value-B.value.axisNameFontSize}), rotate(${n.axisNamesRotation})`}}let Z=b(null),Gn=b(null),Kn=b(!1),qn=b(``);function Jn({shape:e,serie:t,S:n}){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:{...t,shape:e},seriesIndex:n});let r=O.value===null?null:Y.value[O.value];k.value===`keyboard`&&r&&r.serie.id===t.id||(Z.value=null,Kn.value=!1)}function Yn(e){if(!z.value||!e?.datapoints?.length)return;let t=e.datapoints[Math.floor(e.datapoints.length/2)];if(!t)return;let n=xe(t.x,t.y,z.value);n&&(Xt.value=n)}function Q({shape:e,serieName:t,serie:n,relativeIndex:r,seriesIndex:i,S:a,triggerMode:o=`pointer`,notify:s=!0}){s&&M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:{...n,shape:e},seriesIndex:a}),k.value=o,Gn.value={config:M.value,datapoint:n,serie:n,relativeIndex:r,seriesIndex:i,series:G.value,scales:q.value},Kn.value=!0,Z.value=n.id;let ee=``,te=F.value.customFormat,ne=ae(te)?te({serie:n,seriesIndex:i,series:G.value,config:M.value,scales:q.value}):void 0;typeof ne==`string`?qn.value=ne:(ee+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${t?t+` - `:``}${n.name}</div>`,q.value.map(e=>e.name).forEach((e,t)=>{ee+=`
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,Ht as oe,J as se,Jt as ce,P as le,S as ue,U as de,X as fe,Zt as pe,_ as me,at as he,i as ge,in as _e,nt as ve,rn as ye,t as be,tn as xe,w as Se,xt as Ce,yt as we,zt as Te}from"./lib-rPeBMZrn.js";import{n as Ee,t as De}from"./useHints-C-TwxM0Y.js";import{t as Oe}from"./useConfig-B8qvYKdK.js";import{t as ke}from"./useSvgLabelLayout-42Kats14.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useLoading-DoqqfnmS.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./useChartExport-BZts4KFb.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Re}from"./vue_ui_parallel_coordinate_plot-BhzmL7XF.js";import{n as ze}from"./Title-BliHuXfT.js";import{t as Be}from"./Legend-W9YVYVX-.js";import{t as Ve}from"./Shape-CRe8woTu.js";import{t as He}from"./BaseScanner-m6QR9rwD.js";import{t as Ue}from"./A11yDataTable-DWNlWXzs.js";import{t as We}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,Teleport as Ke,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as qe,createTextVNode as Je,createVNode as Ye,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Xe,nextTick as Ze,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,watch as rt,withCtx as T}from"vue";var it=/* @__PURE__ */ e({default:()=>Ot}),at=[`id`],ot=[`id`],st=[`id`],ct={style:{position:`relative`}},lt=[`xmlns`,`aria-describedby`,`viewBox`],ut=[`x`,`y`,`width`,`height`],dt={style:{"pointer-events":`none`}},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`d`,`stroke`,`stroke-width`],mt={key:0},ht=[`transform`,`fill`,`font-size`,`font-weight`],gt=[`innerHTML`],_t={key:0},vt=[`x`,`y`,`font-size`,`fill`],yt=[`width`,`x`,`y`],bt={style:{width:`100%`}},xt=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],St=[`d`,`onMouseenter`,`onMouseleave`,`onClick`],Ct=[`transform`,`fill`,`font-weight`,`font-size`,`stroke`,`onMouseenter`,`onMouseleave`,`onClick`],wt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et=[`id`],Dt=[`onClick`],Ot=/*#__PURE__*/ Ge({__name:`vue-ui-parallel-coordinate-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Ge,emit:it}){let Ot=m(()=>import(`./Tooltip-B432XpvC.js`)),kt=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),At=m(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),jt=m(()=>import(`./DataTable-KeuZB1JM.js`)),Mt=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Nt=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Pt=m(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),Ft=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_parallel_coordinate_plot:It}=Oe(),E=e,Lt=l(()=>!!E.dataset?.length),Rt=b(0),D=b(null),zt=b(null),Bt=b(null),Vt=b(null),Ht=b(null),Ut=b(0),Wt=b(0),Gt=b(0),Kt=b(!1),qt=b(null),Jt=b(null),Yt=b(null),O=b(null),Xt=b({x:0,y:0}),k=b(`pointer`),Zt=b(!1),A=b(fe()),j=b(!1);function Qt(e){j.value=e,Rt.value+=1}let M=b(on()),N=l(()=>M.value.userOptions),P=l(()=>M.value.style.chart.yAxis.labels),F=l(()=>M.value.style.chart.tooltip),I=l(()=>M.value.style.chart),{transitionEnabled:L}=Pe({config:()=>M.value.transitions,dataset:()=>E.dataset});Ee({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiParallelCoordinatePlot`,rules:[De.emptyArray,{test:e=>e.length>10,message:[`👀 There are > 10 series. Consider:`,``,`▶️ Using filters, to show less series at the same time and make the chart more readable.`]},{test:e=>e.some(e=>(e?.series??[]).some(e=>(e?.values??[]).length>15)),message:[`👀 There are > 15 axes, which can make the chart hard to read. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]},{test:e=>e.some(e=>e?.series?.length>5),message:[`👀 Some series have > 5 datapoints. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]}]});let R=l(()=>M.value.userOptions.useCursorPointer),$t=l(()=>_e({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{show:!0,backgroundColor:`transparent`},yAxis:{stroke:`#6A6A6A`,labels:{showAxisNames:!1,axisNames:[],ticks:{color:`#6A6A6A`}}}}}},userConfig:M.value.skeletonConfig??{}})),{loading:en,FINAL_DATASET:tn}=je({...nt(E),FINAL_CONFIG:M,prepareConfig:on,skeletonDataset:E.config?.skeletonDataset??[{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[1,10,100,1e3]}]},{name:``,shape:`circle`,color:`#CACACA`,series:[{name:``,values:[.2,3,50,800]}]},{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[0,0,0,0]}]}],skeletonConfig:_e({defaultConfig:M.value,userConfig:$t.value})}),{userOptionsVisible:nn,setUserOptionsVisibility:rn,keepUserOptionState:an}=Fe({config:M.value}),{svgRef:z}=Ie({config:I.value.title});function on(){return ne(E.config,It,Re)}let sn=pe(E.config);rt(()=>E.config,(e,t)=>{let n=pe(e),r=n!==sn;sn=n;let i=on();r?(en.value||(M.value=i),nn.value=!M.value.userOptions.showOnChartHover,Ut.value+=1,Gt.value+=1,Wt.value+=1,U.value.dataLabels.show=P.value.datapoints.show,U.value.showTable=M.value.table.show,U.value.showTooltip=F.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let cn=tt(null),ln=!1,un=b(!1),dn=0;$e(()=>{Kt.value=!0,pn()});let fn=l(()=>M.value.debug);function pn(){Te(E.dataset)?he({componentName:`VueUiParallelCoordinatePlot`,type:`dataset`,debug:fn.value}):E.dataset.forEach((e,t)=>{we({datasetObject:e,requiredAttributes:[`name`,`series`]}).forEach(e=>{he({componentName:`VueUiParallelCoordinatePlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:fn.value})})}),gn()}function mn(e=I.value.width,t=I.value.height,n=null){let r={width:e,height:t},i=[[`plotSize`,I.value.plots.radius,2],[`ticksFontSize`,P.value.ticks.fontSize,10],[`datapointFontSize`,P.value.datapoints.fontSize,10],[`axisNameFontSize`,P.value.axisNamesFontSize,12]];for(let[e,t,a]of i)r[e]=n!==null&&M.value.responsiveProportionalSizing?ye({relator:n,adjuster:600,source:t,threshold:a,fallback:a}):t;return r}function hn(){cancelAnimationFrame(dn),cn.value?.disconnect(),cn.value=null}function gn(){if(hn(),ln)return;if(un.value=!1,!M.value.responsive){B.value=mn();return}if(!D.value)return;let e=()=>{!ln&&M.value.responsive&&(cancelAnimationFrame(dn),dn=requestAnimationFrame(()=>{let{width:e,height:t}=Me({chart:D.value,title:I.value.title.text?zt.value:null,legend:I.value.legend.show?Bt.value:null,source:Vt.value,noTitle:Ht.value});B.value=mn(e,t-12,Math.min(e,t)),un.value=!0}))};cn.value=new ResizeObserver(e),cn.value.observe(D.value.parentNode),e()}Qe(()=>{ln=!0,hn()});let{isPrinting:_n,isImaging:vn,generatePdf:yn,generateImage:bn}=Ae({elementId:`pcp_${A.value}`,fileName:I.value.title.text||`vue-ui-parallel-coordinate-plot`,options:M.value.userOptions.print}),xn=l(()=>M.value.userOptions.show&&!I.value.title.text),B=b(mn()),Sn=l(()=>B.value.width),Cn=l(()=>B.value.height),{metrics:wn,ready:Tn,settling:V,update:En}=ke({svgRef:z,canMeasure:()=>!M.value.responsive||un.value,initialMetrics:{top:0},measure:e=>({top:e(Yt.value).height})}),Dn=l(()=>wn.value.top),H=l(()=>{let{top:e,right:t,bottom:n,left:r}=I.value.padding,i=Cn.value,a=Sn.value;return{chartHeight:Math.max(.001,i),chartWidth:Math.max(.001,a),height:Math.max(.001,i-e-n-Dn.value-B.value.datapointFontSize*2),width:Math.max(.001,a-r-t),top:e+Dn.value+B.value.datapointFontSize,left:r,right:a-t,bottom:i-n-B.value.datapointFontSize}}),On=l(()=>Se(M.value.customPalette)),U=b({dataLabels:{show:P.value.datapoints.show},showTable:M.value.table.show,showTooltip:F.value.show});rt(M,()=>{gn(),U.value={dataLabels:{show:P.value.datapoints.show},showTable:M.value.table.show,showTooltip:F.value.show}},{immediate:!0});let W=b([]);function kn(){W.value.length?W.value=[]:Pn.value.forEach(e=>{W.value.push(e.id)}),$n(`selectLegend`,In.value)}function An(e){W.value.includes(e)?W.value=W.value.filter(t=>t!==e):W.value.push(e),$n(`selectLegend`,In.value)}let G=l(()=>tn.value.map((e,t)=>{let n=ue(e.color)||On.value[t]||oe[t]||oe[t%oe.length];return{...e,series:(e.series||[]).map((r,i)=>({...r,id:`pcp_item_${A.value}_${e.id??t}_${r.id??i}`,color:n})),seriesIndex:t,color:n,id:`pcp_group_${A.value}_${e.id??t}`,shape:e.shape||`circle`}}));function jn(e){return G.value.length?G.value.find(t=>t.name===e)||(fn.value&&console.warn(`VueUiParallelCoordinatePlot - Series name not found "${e}"`),null):(fn.value&&console.warn(`VueUiParallelCoordinatePlot - There are no series to show.`),null)}function Mn(e){let t=jn(e);t!==null&&W.value.includes(t.id)&&An(t.id)}function Nn(e){let t=jn(e);t!==null&&(W.value.includes(t.id)||An(t.id))}let Pn=l(()=>G.value.map(e=>({...e,opacity:W.value.includes(e.id)?.5:1,segregate:()=>An(e.id),isSegregated:W.value.includes(e.id),shape:e.shape||`circle`}))),Fn=l(()=>({cy:`pcp-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),In=l(()=>G.value.filter(e=>!W.value.includes(e.id))),Ln=l(()=>In.value.flatMap(e=>e.series)),Rn=l(()=>Math.max(0,...Ln.value.map(e=>e.values.length))),K=l(()=>Rn.value?H.value.width/Rn.value:0);function zn(e,t){return H.value.bottom-H.value.height*((e-t.min)/(t.max-t.min))}function Bn(e){return H.value.left+K.value*e+K.value/2}function Vn(e,t){let n=e,r=t;return e===t&&(e>0?(n=e/4,r=t*2):e<0?(n=e*2,r=t/4):(n=0,r=1)),me(n,r,Math.max(2,I.value.yAxis.scaleTicks))}let q=l(()=>Array.from({length:Rn.value},(e,t)=>{let n=Ln.value.map(e=>e.values[t]||0),r=Vn(Math.min(...n),Math.max(...n));return{scale:r,ticks:r.ticks.map(e=>({y:zn(e,r),x:Bn(t),value:e})),name:P.value.axisNames[t]||`Y-${t+1}`}})),J=l(()=>In.value.map((e,t)=>({...e,series:e.series.map((n,r)=>{let i=n.values.map((i,a)=>({name:n.name,seriesName:e.name,axisIndex:a,datapointIndex:r,seriesIndex:t,value:i||0,x:Bn(a),y:zn(i||0,q.value[a].scale),comment:n.comments&&n.comments[a]||``})),a=de(i),o=le(i,.12);return{...n,datapoints:i,straightPath:a,smoothPath:o,pathLength:Ce(I.value.lines.smooth?`M ${o}`:`M ${a}`)}})}))),Y=l(()=>J.value.flatMap((e,t)=>e.series.map((n,r)=>({shape:e.shape,serieName:e.name,serie:n,relativeIndex:r,seriesIndex:e.seriesIndex,S:t,key:n.id})))),Hn=l(()=>new Map(Y.value.map(e=>[e.serie.id,e])));function X(e){return Hn.value.get(e.id)}function Un({value:e,index:t,datapoint:n}){return ge(P.value.formatters[t]||null,e,re({p:P.value.prefixes[t]||``,v:e,s:P.value.suffixes[t]||``,r:P.value.roundings[t]||0}),{datapoint:n,seriesIndex:t})}function Wn(e,t){let n=P.value;return{class:`vue-ui-parallel-coordinate-plot-x-label`,"data-cy":`pcp-axis-label`,fill:n.axisNamesColor,"font-size":B.value.axisNameFontSize,"font-weight":n.axisNamesBold?`bold`:``,"text-anchor":n.axisNamesRotation===0?`middle`:n.axisNamesRotation<0?`start`:`end`,transform:`translate(${Bn(t)}, ${Dn.value-B.value.axisNameFontSize}), rotate(${n.axisNamesRotation})`}}let Z=b(null),Gn=b(null),Kn=b(!1),qn=b(``);function Jn({shape:e,serie:t,S:n}){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:{...t,shape:e},seriesIndex:n});let r=O.value===null?null:Y.value[O.value];k.value===`keyboard`&&r&&r.serie.id===t.id||(Z.value=null,Kn.value=!1)}function Yn(e){if(!z.value||!e?.datapoints?.length)return;let t=e.datapoints[Math.floor(e.datapoints.length/2)];if(!t)return;let n=xe(t.x,t.y,z.value);n&&(Xt.value=n)}function Q({shape:e,serieName:t,serie:n,relativeIndex:r,seriesIndex:i,S:a,triggerMode:o=`pointer`,notify:s=!0}){s&&M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:{...n,shape:e},seriesIndex:a}),k.value=o,Gn.value={config:M.value,datapoint:n,serie:n,relativeIndex:r,seriesIndex:i,series:G.value,scales:q.value},Kn.value=!0,Z.value=n.id;let ee=``,te=F.value.customFormat,ne=ae(te)?te({serie:n,seriesIndex:i,series:G.value,config:M.value,scales:q.value}):void 0;typeof ne==`string`?qn.value=ne:(ee+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${t?t+` - `:``}${n.name}</div>`,q.value.map(e=>e.name).forEach((e,t)=>{ee+=`
2
2
  <div class="vue-ui-tooltip-item" style="text-align:left">
3
3
  <span>${e}: </span>
4
4
  <span>
@@ -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 c}from"./tableIntegration-CNoJ1CIY.js";import{t as l}from"./chartImage-DPGnEuYM.js";import{n as ee}from"./resolveChartConfig-0IvbmIE_.js";import{$ as te,Ct as ne,D as re,Dt as ie,Ht as ae,J as oe,Jt as se,S as ce,X as le,Yt as ue,Zt as de,at as fe,i as pe,in as me,jt as he,nt as ge,r as _e,t as ve,w as ye,zt as be}from"./lib-rPeBMZrn.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"./useChartExport-BZts4KFb.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./Shape-CRe8woTu.js";import{t as Me}from"./vue_ui_quadrant-CZEw2s9q.js";import{t as Ne}from"./Legend-W9YVYVX-.js";import{t as Pe}from"./BaseScanner-m6QR9rwD.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./BaseLegendToggle-VzX69MCo.js";import{t as Le}from"./DefGrad-DKMq1REY.js";import{t as Re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as ze,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as w,toRefs as Xe,unref as T,watch as Ze,withCtx as E}from"vue";var Qe=/* @__PURE__ */ e({default:()=>qt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`,`id`],it=[`x`,`y`,`width`,`height`],at={key:1},ot=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],st=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:2},ut=[`points`,`fill`],dt=[`points`,`fill`],ft=[`points`,`fill`],pt=[`points`,`fill`],mt={key:3},ht=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`onClick`],gt={key:4},_t=[`x`,`y`,`font-size`,`fill`],vt=[`x`,`y`,`font-size`,`fill`],yt=[`x`,`y`,`font-size`,`fill`],bt=[`id`,`font-size`,`transform`,`fill`],xt=[`id`,`font-size`,`transform`,`fill`],St=[`id`,`font-size`,`transform`,`fill`],Ct={key:5},wt=[`fill`,`points`],Tt=[`onClick`,`x`,`y`,`width`,`height`],Et=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Dt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Ot=[`data-a11y-plot-id`,`cx`,`cy`,`r`],kt={key:0,style:{"pointer-events":`none`}},At=[`innerHTML`],jt={key:0},Mt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Nt={key:8,class:`vue-ui-dna`},Pt=[`points`,`fill`],Ft={key:9},It=[`x`,`y`,`font-size`,`fill`,`font-weight`],Lt={key:10},Rt=[`x`,`y`,`fill`,`onClick`],zt=[`stroke`,`d`],Bt=[`stroke`,`d`],Vt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ht={key:5,class:`vue-data-ui-watermark`},Ut=[`id`],Wt=[`onClick`],Gt={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},Kt=[`innerHTML`],qt=/*#__PURE__*/ Re({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Re,emit:Qe}){let qt=g(()=>import(`./Tooltip-B432XpvC.js`)),Jt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Yt=g(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Xt=g(()=>import(`./DataTable-KeuZB1JM.js`)),Zt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Qt=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),$t=g(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),en=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_quadrant:tn}=Ce(),D=e,nn=d(()=>!!D.dataset&&D.dataset.length),O=x(le()),rn=Qe,an=x(!1),on=x(``),sn=x(0),k=x(!1),A=x(null),cn=x(null),ln=x(null),un=x(null),dn=x(null),fn=x(0),pn=x(0),mn=x(0),hn=x(!1),gn=x(null),_n=x(null),j=x(null),vn=x(null),yn=x({x:0,y:0}),bn=x(`pointer`),xn=x(!1),M=x(On()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.layout.grid),F=d(()=>M.value.style.chart.layout.labels),I=d(()=>M.value.style.chart.tooltip),L=d(()=>M.value.style.chart);xe({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiQuadrant`,rules:[Se.emptyArray,Se.noHint]});let R=d(()=>M.value.userOptions.useCursorPointer),Sn=d(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:Cn,FINAL_DATASET:wn}=we({...Xe(D),FINAL_CONFIG:M,prepareConfig:On,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:me({defaultConfig:M.value,userConfig:Sn.value})}),{userOptionsVisible:Tn,setUserOptionsVisibility:En,keepUserOptionState:Dn}=Oe({config:M.value}),{svgRef:z}=ke({config:L.value.title});function On(){return ee(D.config,tn,Me)}let kn=de(D.config);Ze(()=>D.config,(e,t)=>{let n=de(e),r=n!==kn;kn=n;let i=On();r?(Cn.value||(M.value=i),Tn.value=!M.value.userOptions.showOnChartHover,fn.value+=1,pn.value+=1,mn.value+=1,B.value.plotLabels.show=F.value.plotLabels.show,B.value.showTable=M.value.table.show,B.value.showTooltip=I.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let An=Ye(null),jn=!1,Mn=null,Nn=d(()=>M.value.debug);function Pn(){be(D.dataset)?fe({componentName:`VueUiQuadrant`,type:`dataset`,debug:Nn.value}):Nn.value&&D.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),In()}function Fn(){An.value?.disconnect(),An.value=null,Mn!==null&&cancelAnimationFrame(Mn),Mn=null}function In(){if(Fn(),jn)return;if(!M.value.responsive){Wn(L.value.width,L.value.height);return}if(!A.value)return;let e=()=>{!jn&&M.value.responsive&&Mn===null&&(Mn=requestAnimationFrame(()=>{Mn=null;let{width:e,height:t}=Ee({chart:A.value,title:L.value.title.text?cn.value:null,legend:L.value.legend.show?ln.value:null,source:un.value,noTitle:dn.value});Wn(e,t)}))};An.value=new ResizeObserver(e),An.value.observe(A.value.parentNode),e()}qe(()=>{hn.value=!0,Pn()}),Ke(()=>{jn=!0,Fn(),Yn()});let{isPrinting:Ln,isImaging:Rn,generatePdf:zn,generateImage:Bn}=Te({elementId:`vue-ui-quadrant_${O.value}`,fileName:L.value.title.text||`vue-ui-quadrant`,options:M.value.userOptions.print}),Vn=d(()=>M.value.userOptions.show&&!L.value.title.text),Hn=d(()=>ye(M.value.customPalette)),B=x({plotLabels:{show:F.value.plotLabels.show},showTable:M.value.table.show,showTooltip:I.value.show});function Un(e,t){return{height:t,usableHeight:t-96,width:e,usableWidth:e-96,top:48,left:48,right:e-48,bottom:t-48,centerX:e/2,centerY:t-t/2,padding:48}}let V=x(Un(L.value.width,L.value.height));function Wn(e,t){(V.value.width!==e||V.value.height!==t)&&(V.value=Un(e,t))}let H=x({...V.value,startX:0,startY:0}),U=x(null),Gn=x(null),Kn=x(!1),qn=0,Jn=d(()=>M.value.zoomEnabled),W=[{id:`TL`,key:`tl`,right:!1,bottom:!1,fallback:`Top Left`},{id:`TR`,key:`tr`,right:!0,bottom:!1,fallback:`Top Right`},{id:`BR`,key:`br`,right:!0,bottom:!0,fallback:`Bottom Right`},{id:`BL`,key:`bl`,right:!1,bottom:!0,fallback:`Bottom Left`}],G=d(()=>{let e=W.find(e=>e.id===U.value);if(!e)return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1};let t=F.value.quadrantLabels[e.key];return{x:H.value.startX+H.value.width/2,y:H.value.height*(e.bottom?1.678:1),text:t.text||e.fallback,fontSize:t.fontSize,fill:t.color,bold:t.bold}});function Yn(){qn+=1,Gn.value!==null&&cancelAnimationFrame(Gn.value),Gn.value=null,Kn.value=!1}function Xn(){Yn(),H.value={...V.value,startX:0,startY:0},U.value=null,k.value=!1}Ze(V,Xn,{deep:!0}),Ze(M,()=>{B.value={plotLabels:{show:F.value.plotLabels.show},showTable:M.value.table.show,showTooltip:I.value.show},In()},{flush:`post`});function Zn({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){U.value&&Sr(i),Yn();let a=qn,o={...H.value},s=Number(M.value.zoomAnimationFrames),c=Number.isFinite(s)?Math.max(1,Math.trunc(s)):1,l=0;Kn.value=!0;function ee(){if(jn||a!==qn)return;l+=1;let i=l/c;Object.assign(H.value,{startX:l===c?e:o.startX+(e-o.startX)*i,startY:l===c?t:o.startY+(t-o.startY)*i,width:l===c?n:o.width+(n-o.width)*i,height:l===c?r:o.height+(r-o.height)*i}),l<c?Gn.value=requestAnimationFrame(ee):(Gn.value=null,Kn.value=!1)}ee()}function Qn(e){if(!Jn.value||Kn.value)return;let t=W.find(t=>t.id===e);t&&(k.value&&U.value===e?(Zn({targetX:0,targetY:0,targetW:V.value.width,targetH:V.value.height}),U.value=null,k.value=!1):(U.value=e,Zn({targetX:t.right?V.value.width/2-V.value.left:0,targetY:t.bottom?V.value.height/2-V.value.top:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:t.key}),k.value=!0))}let $n=d(()=>{let e=P.value.graduations.steps,t=V.value.usableWidth/(e*2),n=V.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:V.value.padding+t*i,y:n+V.value.usableHeight*(i/e/2),height:V.value.usableHeight*(1-i/e),width:V.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),K=d(()=>{let e=P.value.xAxis.max,t=P.value.xAxis.min,n=P.value.yAxis.max,r=P.value.yAxis.min;if(P.value.xAxis.auto||P.value.yAxis.auto){let i=1/0,a=-1/0,o=1/0,s=-1/0;for(let e of er.value)for(let t of e.series)i=Math.min(i,t.x),a=Math.max(a,t.x),o=Math.min(o,t.y),s=Math.max(s,t.y);P.value.xAxis.auto&&(t=i,e=a),P.value.yAxis.auto&&(r=o,n=s)}return{x:{max:e,min:t},y:{max:n,min:r}}}),q=x([]),er=d(()=>wn.value.map((e,t)=>({...e,series:he({data:e.series,threshold:M.value.downsample.threshold}),id:`cat_${t}_${O.value}`,color:ce(e.color)||Hn.value[t]||ae[t]}))),tr=d(()=>er.value.filter(e=>!q.value.includes(e.id))),J=d(()=>(Nn.value&&wn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),tr.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||Hn.value[t]||ae[t],series:e.series.map((t,n)=>({...t,category:e,x:nr(t.x),y:rr(t.y),xValue:t.x,yValue:t.y,quadrantSide:fr({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:`plot_${e.id}_${t.id??n}`}))}))));function nr(e){if(e===0||(e>=0?K.value.x.max:K.value.x.min)===0)return V.value.centerX;if(e>=0){let t=e/K.value.x.max;return V.value.centerX+V.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(K.value.x.min);return V.value.centerX-V.value.usableWidth/2*t}}function rr(e){if((e>=0?K.value.y.max:K.value.y.min)===0)return V.value.centerY;if(e>=0){let t=e/K.value.y.max;return V.value.centerY+(1-V.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(K.value.y.min);return V.value.centerY-(1-V.value.usableHeight/2*t)}}let ir=d(()=>{let e=J.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=P.value.xAxis.name||`x`,n=P.value.yAxis.name||`y`;return{head:[M.value.translations.category,M.value.translations.item,t,n,M.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),tableData:e}});function Y(e,t,n,r){return pe(F.value.plotLabels[t].formatter,e,te({v:e,r:n}),r)}let ar=d(()=>{let e=ir.value.head,t=ir.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,Y(e.x,`x`,F.value.plotLabels.rounding),Y(e.y,`y`,F.value.plotLabels.rounding),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:e}});function or(){q.value.length?q.value=[]:X.value.forEach(e=>{q.value.push(e.id)}),rn(`selectLegend`,Tr())}function sr(e){q.value.includes(e)?q.value=q.value.filter(t=>t!==e):q.value.push(e),rn(`selectLegend`,Tr())}let X=d(()=>er.value.map(e=>({name:e.name,shape:e.shape||`circle`,color:e.color,id:e.id,opacity:q.value.includes(e.id)?.5:1,segregate:()=>sr(e.id),isSegregated:q.value.includes(e.id)})));function cr(e){return X.value.length?X.value.find(t=>t.name===e)||(Nn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(Nn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function lr(e){let t=cr(e);t!==null&&q.value.includes(t.id)&&sr(t.id)}function ur(e){let t=cr(e);t!==null&&(q.value.includes(t.id)||sr(t.id))}let dr=d(()=>({cy:`quadrant-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``}));function fr(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=x(null),pr=x(null),mr=x(null);function hr(){Z.value=null,pr.value=null,j.value=null,vn.value=null,an.value=!1}function gr(e){if(!z.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=z.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();yn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function _r(e,t,n,r=`pointer`,i=null,a=!0){a&&M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,pr.value={color:e.color,shape:e.shape},bn.value=r,j.value=i,vn.value=t.uid,mr.value={datapoint:t,seriesIndex:n,series:J.value,config:M.value};let o=I.value.customFormat,s=ie(o)?o({seriesIndex:n,datapoint:t,series:J.value,config:M.value}):void 0;if(typeof s==`string`)on.value=s;else{let r=``;t.quadrantSide&&(r+=`<div style="color:${F.value.quadrantLabels[t.quadrantSide].color};font-weight:${F.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${F.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${I.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${P.value.xAxis.name?P.value.xAxis.name:`x`}: <b>${Y(t.xValue,`x`,I.value.roundingValue,{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${P.value.yAxis.name?P.value.yAxis.name:`y`}: <b>${Y(t.yValue,`y`,I.value.roundingValue,{datapoint:t,category:e,categoryIndex:n})}</b></div>`,on.value=`<div style="text-align:left;font-size:${I.value.fontSize}px">${r}</div>`}r===`keyboard`&&We(()=>{gr(t.uid)}),an.value=!0}function vr(e,t,n){return{...t,onEnter:()=>_r(e,t,n),onLeave:()=>br(t,n),onClick:()=>xr(e,t,n),isSelected:Z.value&&t.uid===Z.value}}function yr(e){return{"data-cy":`plot-label`,x:e.x,y:e.y+F.value.plotLabels.offsetY+L.value.layout.plots.radius,"text-anchor":`middle`,"font-size":F.value.plotLabels.fontSize/(k.value?1.5:1),fill:F.value.plotLabels.color}}function br(e,t){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(vn.value!==e.uid||bn.value!==`keyboard`)&&(an.value=!1,Z.value=null,pr.value=null)}function xr(e,t,n){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text};rn(`selectPlot`,r)}function Sr(e){if(!e)return;let t=J.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:F.value.quadrantLabels[e].text,items:[...t]};rn(`selectSide`,n)}let Cr=d(()=>({TL:`${V.value.left-1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.top-1} ${V.value.right},${V.value.top-1} ${V.value.right},${V.value.bottom} ${V.value.left-1},${V.value.bottom} ${V.value.left-1},${V.value.centerY}`,TR:`${V.value.left},${V.value.top-1} ${V.value.centerX},${V.value.top-1} ${V.value.centerX},${V.value.centerY} ${V.value.right+1},${V.value.centerY} ${V.value.right+1},${V.value.bottom} ${V.value.left},${V.value.bottom} ${V.value.left},${V.value.top-1}`,BR:`${V.value.left},${V.value.top} ${V.value.right+1},${V.value.top} ${V.value.right+1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.bottom+1} ${V.value.left},${V.value.bottom+1} ${V.value.left},${V.value.top}`,BL:`${V.value.left-1},${V.value.top} ${V.value.right},${V.value.top} ${V.value.right},${V.value.bottom+1} ${V.value.centerX},${V.value.bottom+1} ${V.value.centerX},${V.value.centerY} ${V.value.left-1},${V.value.centerY} ${V.value.left-1},${V.value.top}`})[U.value]),wr=d(()=>Object.fromEntries(W.map(e=>{let t=(e.right?V.value.centerX:V.value.left)+V.value.usableWidth/4,n=e.bottom?V.value.centerY-48:0;return[e.id,{...Object.fromEntries(W.map(e=>[e.key,{x:t+(e.right?0:-20),y:n+(e.bottom?20:0),fill:F.value.quadrantLabels[e.key].color}])),crosshairs:{horizontal:`M ${t-20},${n+20} ${t+20},${n+20}`,vertical:`M ${t},${n} ${t},${n+40}`}}]})));function Tr(){return J.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:F.value.quadrantLabels[e.quadrantSide].text}))}))}function Er(e=null){We(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=ir.value.head,r=ir.value.body,i=t.concat([n]).concat(r),a=re(i);e?e(a):ge({csvContent:a,title:L.value.title.text||`vue-ui-quadrant`})})}let Q=x(!1);function Dr(e){Q.value=e,sn.value+=1}function Or(){B.value.showTable=!B.value.showTable}function kr(){B.value.plotLabels.show=!B.value.plotLabels.show}function Ar(){B.value.showTooltip=!B.value.showTooltip}let jr=x(!1);function Mr(){jr.value=!jr.value}let Nr=l(A,()=>L.value.title.text),Pr=d(()=>c({config:M,style:L,mutableConfig:B,dialog:en,accordion:Yt,isFullscreen:Q,parent:A,maxWidth:800,isCursorPointer:R}));Ze(()=>B.value.showTable,e=>{gn.value&&s(e,M,gn)});function Fr(){B.value.showTable=!1,_n.value&&_n.value.setTableIconState(!1)}let Ir=d(()=>L.value.backgroundColor),Lr=d(()=>L.value.legend),Rr=d(()=>L.value.title),{isCallbackImaging:zr,isCallbackSvg:Br,generateSvg:Vr,onGenerateImage:Hr}=De({svg:z,title:Rr,legend:Lr,legendItems:X,backgroundColor:Ir,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Bn});async function Ur(){rn(`copyAlt`,{config:M.value,dataset:tr.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:tr.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Wr(){j.value=null,vn.value=null,xn.value=!0}function Gr(){hr(),xn.value=!1}function Kr(e){if(!z.value||jr.value||document.activeElement!==z.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){hr();return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;xr(e.category,e.plot,e.categoryIndex);return}let a=j.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let l=$.value[a];l&&_r(l.category,l.plot,l.categoryIndex,`keyboard`,a)}let qr=d(()=>({headers:ar.value?.colNames??[],rows:ar.value?.a11yBody??[]})),$=d(()=>J.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Ze($,e=>{if(!Z.value)return;let t=e.findIndex(e=>e.plot.uid===Z.value);if(t===-1){hr();return}let n=e[t];_r(n.category,n.plot,n.categoryIndex,bn.value,j.value===null?null:t,!1)}),Re({getData:Tr,getImage:Nr,generatePdf:zn,generateCsv:Er,generateImage:Bn,generateSvg:Vr,hideSeries:ur,showSeries:lr,toggleTable:Or,toggleLabels:kr,toggleTooltip:Ar,toggleAnnotator:Mr,toggleFullscreen:Dr,copyAlt:Ur}),(e,s)=>(b(),m(`div`,{class:Ge(`vue-data-ui-component vue-ui-quadrant ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:A,id:`vue-ui-quadrant_${O.value}`,style:y(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};${M.value.responsive?`height: 100%`:``}`),onMouseenter:s[2]||=()=>T(En)(!0),onMouseleave:s[3]||=()=>{T(En)(!1),xn.value||hr()}},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,w(M.value.a11y.translations.keyboardNavigation),1)],8,et),M.value.a11y.includeTable&&qr.value?.rows?.length?(b(),f(Fe,{key:0,uid:O.value,head:qr.value.headers,body:qr.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),N.value.buttons.annotator?(b(),f(T(Zt),Ue({key:1},T(a)(N.value.annotator),{svgRef:T(z),backgroundColor:L.value.backgroundColor,color:L.value.color,active:jr.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:Mr}),Be({_:2},[S(T(o),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Vn.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:dn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),L.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:cn,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),f(Ae,{key:`table_${fn.value}`,config:{title:{cy:`quadrant-title`,...L.value.title},subtitle:{cy:`quadrant-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,tt),N.value.show&&nn.value&&(T(Dn)||T(Tn))?(b(),f(T(Qt),Ue({ref_key:`userOptionsRef`,ref:_n,key:`user_options_${sn.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isImaging:T(Rn),isPrinting:T(Ln),uid:O.value,hasTooltip:N.value.buttons.tooltip&&I.value.show,isFullscreen:Q.value,isTooltip:B.value.showTooltip,chartElement:A.value},T(n)(N.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:jr.value,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Dr,onGeneratePdf:T(zn),onGenerateCsv:Er,onGenerateImage:T(Hr),onGenerateSvg:T(Vr),onToggleTable:Or,onToggleLabels:kr,onToggleTooltip:Ar,onToggleAnnotator:Mr,onCopyAlt:Ur,style:{visibility:T(Dn)?T(Tn)?`visible`:`hidden`:`visible`}}),Be({_:2},[S(T(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,nt,[(b(),m(`svg`,{ref_key:`svgRef`,ref:z,xmlns:T(ve),"aria-describedby":`chart-instructions-${O.value}`,class:Ge({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`${H.value.startX} ${H.value.startY} ${H.value.width} ${H.value.height}`,style:y(`max-width:100%;overflow:hidden;background:transparent;color:${L.value.color}`),id:`svg_${O.value}`,tabindex:`0`,onFocus:Wr,onBlur:Gr,onKeydown:Kr},[He(T($t)),C(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:T(Ln)||T(Rn)||T(zr),isPrintingSvg:T(Br)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:H.value.startX,y:H.value.startY,width:H.value.width,height:H.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,it)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),f(Le,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${O.value}_${t}`,key:`quadrant_gradient_${O.value}_${t}`,stops:[[`0%`,T(se)(T(ue)(e.color,.05),L.value.layout.areas.opacity),1],[`100%`,T(se)(e.color,L.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),P.value.graduations.show?(b(),m(`g`,at,[(b(!0),m(u,null,S($n.value,e=>(b(),m(`rect`,{fill:P.value.graduations.fill?T(se)(P.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":P.value.graduations.strokeWidth,stroke:P.value.graduations.stroke,rx:P.value.graduations.roundingForce},null,8,ot))),256))])):p(``,!0),h(`line`,{x1:V.value.left,y1:V.value.centerY,x2:V.value.right,y2:V.value.centerY,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,st),h(`line`,{x1:V.value.centerX,y1:V.value.top,x2:V.value.centerX,y2:V.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,ct),P.value.showArrows?(b(),m(`g`,lt,[h(`polygon`,{points:`${V.value.right-8},${V.value.centerY-6} ${V.value.right},${V.value.centerY} ${V.value.right-8},${V.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,ut),h(`polygon`,{points:`${V.value.left+8},${V.value.centerY-6} ${V.value.left},${V.value.centerY} ${V.value.left+8},${V.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,dt),h(`polygon`,{points:`${V.value.centerX-6},${V.value.top+8} ${V.value.centerX},${V.value.top} ${V.value.centerX+6},${V.value.top+8}`,fill:P.value.stroke,stroke:`none`},null,8,ft),h(`polygon`,{points:`${V.value.centerX-6},${V.value.bottom-8} ${V.value.centerX},${V.value.bottom} ${V.value.centerX+6},${V.value.bottom-8}`,fill:P.value.stroke,stroke:`none`},null,8,pt)])):p(``,!0),F.value.quadrantLabels.show&&!k.value?(b(),m(`g`,mt,[(b(),m(u,null,S(W,e=>(b(),m(u,{key:e.id},[F.value.quadrantLabels[e.key].text?(b(),m(`text`,{key:0,x:e.right?V.value.width:0,y:e.bottom?V.value.bottom+V.value.padding*.7:V.value.top-V.value.padding/2,"text-anchor":e.right?`end`:`start`,fill:F.value.quadrantLabels[e.key].color,"font-size":F.value.quadrantLabels[e.key].fontSize,style:y(`font-weight:${F.value.quadrantLabels[e.key].bold?`bold`:``}`),onClick:t=>Sr(e.key)},w(F.value.quadrantLabels[e.key].text),13,ht)):p(``,!0)],64))),64))])):p(``,!0),F.value.axisLabels.show?(b(),m(`g`,gt,[P.value.yAxis.show?(b(),m(`text`,{key:0,x:V.value.centerX,y:V.value.top-V.value.padding/6,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},w(Y(K.value.y.max,`y`,F.value.plotLabels.rounding)),9,_t)):p(``,!0),h(`text`,{x:V.value.centerX,y:V.value.top-V.value.padding/2,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},w(P.value.yAxis.name),9,vt),P.value.yAxis.show?(b(),m(`text`,{key:1,x:V.value.centerX,y:V.value.bottom+V.value.padding*.35,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.negative},w(Y(K.value.y.min,`y`,F.value.plotLabels.rounding)),9,yt)):p(``,!0),P.value.xAxis.show?(b(),m(`text`,{key:2,id:`xLabelMin_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.padding-F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(-90)`,fill:F.value.axisLabels.color.negative},w(Y(K.value.x.min,`x`,F.value.plotLabels.rounding)),9,bt)):p(``,!0),P.value.xAxis.show?(b(),m(`text`,{key:3,id:`xLabelMax_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.width-V.value.padding+F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},w(Y(K.value.x.max,`x`,F.value.plotLabels.rounding)),9,xt)):p(``,!0),h(`text`,{id:`xLabelMaxName_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.width-F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},w(P.value.xAxis.name),9,St)])):p(``,!0),L.value.layout.areas.show?(b(),m(`g`,Ct,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),m(`g`,null,[e.series.length>2?(b(),m(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:L.value.layout.areas.useGradient?`url(#quadrant_gradient_${O.value}_${t})`:T(se)(e.color,L.value.layout.areas.opacity),points:T(ne)(e)},null,8,wt)):p(``,!0)]))),256))])):p(``,!0),h(`g`,null,[(b(),m(u,null,S(W,e=>h(`rect`,{key:e.id,onClick:t=>Qn(e.id),x:e.right?V.value.centerX:V.value.left,y:e.bottom?V.value.centerY:V.value.top,width:Math.max(.001,V.value.usableWidth/2),height:Math.max(.001,V.value.usableHeight/2),fill:`transparent`,class:Ge({"vue-data-ui-zoom-plus":!k.value&&Jn.value,"vue-data-ui-zoom-minus":k.value&&Jn.value})},null,10,Tt)),64))]),F.value.plotLabels.showAsTag?(b(),m(u,{key:7},[B.value.plotLabels.show?(b(),m(`g`,jt,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),m(u,null,[(b(!0),m(u,null,S(e.series,n=>(b(),m(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-F.value.plotLabels.fontSize,onMouseover:r=>_r(e,n,t),onMouseleave:e=>br(n,t),onClick:r=>xr(e,n,t)},[h(`div`,{style:y(`color:${T(_e)(e.color)};margin: 0 auto; font-size:${F.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},w(n.name),5)],40,Mt))),256))],64))),256))])):p(``,!0)],64)):(b(),m(u,{key:6},[(b(!0),m(u,null,S(J.value,(t,n)=>(b(),m(`g`,null,[e.$slots.datapoint&&!T(Cn)?(b(!0),m(u,{key:0},S(t.series,r=>(b(),m(`g`,{key:r.uid},[(b(),m(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>_r(t,r,n),onMouseleave:e=>br(r,n),onClick:e=>xr(t,r,n)},[C(e.$slots,`datapoint`,Ue({ref_for:!0},{datapoint:vr(t,r,n)}),void 0,!0)],40,Et)),h(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(L.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Dt)]))),128)):e.$slots.datapointSvg&&!T(Cn)?(b(!0),m(u,{key:1},S(t.series,r=>(b(),m(`g`,{key:r.uid},[C(e.$slots,`datapointSvg`,Ue({ref_for:!0},{datapoint:vr(t,r,n)}),void 0,!0)]))),128)):(b(!0),m(u,{key:2},S(t.series,(e,r)=>(b(),m(`g`,{key:e.uid},[He(je,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:L.value.layout.plots.radius/(k.value?1.5:1),shape:t.shape,stroke:L.value.layout.plots.outline?L.value.layout.plots.outlineColor:`none`,strokeWidth:L.value.layout.plots.outlineWidth,onMouseenter:r=>_r(t,e,n,`pointer`),onMouseleave:t=>br(e,n),onClick:r=>xr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),h(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(L.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Ot)]))),128))]))),256)),B.value.plotLabels.show?(b(),m(`g`,kt,[(b(!0),m(u,null,S(J.value,e=>(b(),m(`g`,null,[(b(!0),m(u,null,S(e.series,e=>(b(),m(`g`,null,[String(e.name).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 c}from"./tableIntegration-CNoJ1CIY.js";import{t as l}from"./chartImage-DPGnEuYM.js";import{n as ee}from"./resolveChartConfig-0IvbmIE_.js";import{$ as te,Ct as ne,D as re,Dt as ie,Ht as ae,J as oe,Jt as se,S as ce,X as le,Yt as ue,Zt as de,at as fe,i as pe,in as me,jt as he,nt as ge,r as _e,t as ve,w as ye,zt as be}from"./lib-rPeBMZrn.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./useConfig-B8qvYKdK.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"./useChartExport-BZts4KFb.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./Shape-CRe8woTu.js";import{t as Me}from"./vue_ui_quadrant-CZEw2s9q.js";import{t as Ne}from"./Legend-W9YVYVX-.js";import{t as Pe}from"./BaseScanner-m6QR9rwD.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./BaseLegendToggle-VzX69MCo.js";import{t as Le}from"./DefGrad-DKMq1REY.js";import{t as Re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as ze,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as w,toRefs as Xe,unref as T,watch as Ze,withCtx as E}from"vue";var Qe=/* @__PURE__ */ e({default:()=>qt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`,`id`],it=[`x`,`y`,`width`,`height`],at={key:1},ot=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],st=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:2},ut=[`points`,`fill`],dt=[`points`,`fill`],ft=[`points`,`fill`],pt=[`points`,`fill`],mt={key:3},ht=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`onClick`],gt={key:4},_t=[`x`,`y`,`font-size`,`fill`],vt=[`x`,`y`,`font-size`,`fill`],yt=[`x`,`y`,`font-size`,`fill`],bt=[`id`,`font-size`,`transform`,`fill`],xt=[`id`,`font-size`,`transform`,`fill`],St=[`id`,`font-size`,`transform`,`fill`],Ct={key:5},wt=[`fill`,`points`],Tt=[`onClick`,`x`,`y`,`width`,`height`],Et=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Dt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Ot=[`data-a11y-plot-id`,`cx`,`cy`,`r`],kt={key:0,style:{"pointer-events":`none`}},At=[`innerHTML`],jt={key:0},Mt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Nt={key:8,class:`vue-ui-dna`},Pt=[`points`,`fill`],Ft={key:9},It=[`x`,`y`,`font-size`,`fill`,`font-weight`],Lt={key:10},Rt=[`x`,`y`,`fill`,`onClick`],zt=[`stroke`,`d`],Bt=[`stroke`,`d`],Vt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ht={key:5,class:`vue-data-ui-watermark`},Ut=[`id`],Wt=[`onClick`],Gt={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},Kt=[`innerHTML`],qt=/*#__PURE__*/ Re({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Re,emit:Qe}){let qt=g(()=>import(`./Tooltip-B432XpvC.js`)),Jt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Yt=g(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),Xt=g(()=>import(`./DataTable-KeuZB1JM.js`)),Zt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Qt=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),$t=g(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),en=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_quadrant:tn}=Ce(),D=e,nn=d(()=>!!D.dataset&&D.dataset.length),O=x(le()),rn=Qe,an=x(!1),on=x(``),sn=x(0),k=x(!1),A=x(null),cn=x(null),ln=x(null),un=x(null),dn=x(null),fn=x(0),pn=x(0),mn=x(0),hn=x(!1),gn=x(null),_n=x(null),j=x(null),vn=x(null),yn=x({x:0,y:0}),bn=x(`pointer`),xn=x(!1),M=x(On()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.layout.grid),F=d(()=>M.value.style.chart.layout.labels),I=d(()=>M.value.style.chart.tooltip),L=d(()=>M.value.style.chart);xe({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiQuadrant`,rules:[Se.emptyArray,Se.noHint]});let R=d(()=>M.value.userOptions.useCursorPointer),Sn=d(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:Cn,FINAL_DATASET:wn}=we({...Xe(D),FINAL_CONFIG:M,prepareConfig:On,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:me({defaultConfig:M.value,userConfig:Sn.value})}),{userOptionsVisible:Tn,setUserOptionsVisibility:En,keepUserOptionState:Dn}=Oe({config:M.value}),{svgRef:z}=ke({config:L.value.title});function On(){return ee(D.config,tn,Me)}let kn=de(D.config);Ze(()=>D.config,(e,t)=>{let n=de(e),r=n!==kn;kn=n;let i=On();r?(Cn.value||(M.value=i),Tn.value=!M.value.userOptions.showOnChartHover,fn.value+=1,pn.value+=1,mn.value+=1,B.value.plotLabels.show=F.value.plotLabels.show,B.value.showTable=M.value.table.show,B.value.showTooltip=I.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let An=Ye(null),jn=!1,Mn=null,Nn=d(()=>M.value.debug);function Pn(){be(D.dataset)?fe({componentName:`VueUiQuadrant`,type:`dataset`,debug:Nn.value}):Nn.value&&D.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),In()}function Fn(){An.value?.disconnect(),An.value=null,Mn!==null&&cancelAnimationFrame(Mn),Mn=null}function In(){if(Fn(),jn)return;if(!M.value.responsive){Wn(L.value.width,L.value.height);return}if(!A.value)return;let e=()=>{!jn&&M.value.responsive&&Mn===null&&(Mn=requestAnimationFrame(()=>{Mn=null;let{width:e,height:t}=Ee({chart:A.value,title:L.value.title.text?cn.value:null,legend:L.value.legend.show?ln.value:null,source:un.value,noTitle:dn.value});Wn(e,t)}))};An.value=new ResizeObserver(e),An.value.observe(A.value.parentNode),e()}qe(()=>{hn.value=!0,Pn()}),Ke(()=>{jn=!0,Fn(),Yn()});let{isPrinting:Ln,isImaging:Rn,generatePdf:zn,generateImage:Bn}=Te({elementId:`vue-ui-quadrant_${O.value}`,fileName:L.value.title.text||`vue-ui-quadrant`,options:M.value.userOptions.print}),Vn=d(()=>M.value.userOptions.show&&!L.value.title.text),Hn=d(()=>ye(M.value.customPalette)),B=x({plotLabels:{show:F.value.plotLabels.show},showTable:M.value.table.show,showTooltip:I.value.show});function Un(e,t){return{height:t,usableHeight:t-96,width:e,usableWidth:e-96,top:48,left:48,right:e-48,bottom:t-48,centerX:e/2,centerY:t-t/2,padding:48}}let V=x(Un(L.value.width,L.value.height));function Wn(e,t){(V.value.width!==e||V.value.height!==t)&&(V.value=Un(e,t))}let H=x({...V.value,startX:0,startY:0}),U=x(null),Gn=x(null),Kn=x(!1),qn=0,Jn=d(()=>M.value.zoomEnabled),W=[{id:`TL`,key:`tl`,right:!1,bottom:!1,fallback:`Top Left`},{id:`TR`,key:`tr`,right:!0,bottom:!1,fallback:`Top Right`},{id:`BR`,key:`br`,right:!0,bottom:!0,fallback:`Bottom Right`},{id:`BL`,key:`bl`,right:!1,bottom:!0,fallback:`Bottom Left`}],G=d(()=>{let e=W.find(e=>e.id===U.value);if(!e)return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1};let t=F.value.quadrantLabels[e.key];return{x:H.value.startX+H.value.width/2,y:H.value.height*(e.bottom?1.678:1),text:t.text||e.fallback,fontSize:t.fontSize,fill:t.color,bold:t.bold}});function Yn(){qn+=1,Gn.value!==null&&cancelAnimationFrame(Gn.value),Gn.value=null,Kn.value=!1}function Xn(){Yn(),H.value={...V.value,startX:0,startY:0},U.value=null,k.value=!1}Ze(V,Xn,{deep:!0}),Ze(M,()=>{B.value={plotLabels:{show:F.value.plotLabels.show},showTable:M.value.table.show,showTooltip:I.value.show},In()},{flush:`post`});function Zn({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){U.value&&Sr(i),Yn();let a=qn,o={...H.value},s=Number(M.value.zoomAnimationFrames),c=Number.isFinite(s)?Math.max(1,Math.trunc(s)):1,l=0;Kn.value=!0;function ee(){if(jn||a!==qn)return;l+=1;let i=l/c;Object.assign(H.value,{startX:l===c?e:o.startX+(e-o.startX)*i,startY:l===c?t:o.startY+(t-o.startY)*i,width:l===c?n:o.width+(n-o.width)*i,height:l===c?r:o.height+(r-o.height)*i}),l<c?Gn.value=requestAnimationFrame(ee):(Gn.value=null,Kn.value=!1)}ee()}function Qn(e){if(!Jn.value||Kn.value)return;let t=W.find(t=>t.id===e);t&&(k.value&&U.value===e?(Zn({targetX:0,targetY:0,targetW:V.value.width,targetH:V.value.height}),U.value=null,k.value=!1):(U.value=e,Zn({targetX:t.right?V.value.width/2-V.value.left:0,targetY:t.bottom?V.value.height/2-V.value.top:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:t.key}),k.value=!0))}let $n=d(()=>{let e=P.value.graduations.steps,t=V.value.usableWidth/(e*2),n=V.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:V.value.padding+t*i,y:n+V.value.usableHeight*(i/e/2),height:V.value.usableHeight*(1-i/e),width:V.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),K=d(()=>{let e=P.value.xAxis.max,t=P.value.xAxis.min,n=P.value.yAxis.max,r=P.value.yAxis.min;if(P.value.xAxis.auto||P.value.yAxis.auto){let i=1/0,a=-1/0,o=1/0,s=-1/0;for(let e of er.value)for(let t of e.series)i=Math.min(i,t.x),a=Math.max(a,t.x),o=Math.min(o,t.y),s=Math.max(s,t.y);P.value.xAxis.auto&&(t=i,e=a),P.value.yAxis.auto&&(r=o,n=s)}return{x:{max:e,min:t},y:{max:n,min:r}}}),q=x([]),er=d(()=>wn.value.map((e,t)=>({...e,series:he({data:e.series,threshold:M.value.downsample.threshold}),id:`cat_${t}_${O.value}`,color:ce(e.color)||Hn.value[t]||ae[t]}))),tr=d(()=>er.value.filter(e=>!q.value.includes(e.id))),J=d(()=>(Nn.value&&wn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),tr.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||Hn.value[t]||ae[t],series:e.series.map((t,n)=>({...t,category:e,x:nr(t.x),y:rr(t.y),xValue:t.x,yValue:t.y,quadrantSide:fr({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:`plot_${e.id}_${t.id??n}`}))}))));function nr(e){if(e===0||(e>=0?K.value.x.max:K.value.x.min)===0)return V.value.centerX;if(e>=0){let t=e/K.value.x.max;return V.value.centerX+V.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(K.value.x.min);return V.value.centerX-V.value.usableWidth/2*t}}function rr(e){if((e>=0?K.value.y.max:K.value.y.min)===0)return V.value.centerY;if(e>=0){let t=e/K.value.y.max;return V.value.centerY+(1-V.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(K.value.y.min);return V.value.centerY-(1-V.value.usableHeight/2*t)}}let ir=d(()=>{let e=J.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=P.value.xAxis.name||`x`,n=P.value.yAxis.name||`y`;return{head:[M.value.translations.category,M.value.translations.item,t,n,M.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),tableData:e}});function Y(e,t,n,r){return pe(F.value.plotLabels[t].formatter,e,te({v:e,r:n}),r)}let ar=d(()=>{let e=ir.value.head,t=ir.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,Y(e.x,`x`,F.value.plotLabels.rounding),Y(e.y,`y`,F.value.plotLabels.rounding),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:e}});function or(){q.value.length?q.value=[]:X.value.forEach(e=>{q.value.push(e.id)}),rn(`selectLegend`,Tr())}function sr(e){q.value.includes(e)?q.value=q.value.filter(t=>t!==e):q.value.push(e),rn(`selectLegend`,Tr())}let X=d(()=>er.value.map(e=>({name:e.name,shape:e.shape||`circle`,color:e.color,id:e.id,opacity:q.value.includes(e.id)?.5:1,segregate:()=>sr(e.id),isSegregated:q.value.includes(e.id)})));function cr(e){return X.value.length?X.value.find(t=>t.name===e)||(Nn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(Nn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function lr(e){let t=cr(e);t!==null&&q.value.includes(t.id)&&sr(t.id)}function ur(e){let t=cr(e);t!==null&&(q.value.includes(t.id)||sr(t.id))}let dr=d(()=>({cy:`quadrant-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``}));function fr(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=x(null),pr=x(null),mr=x(null);function hr(){Z.value=null,pr.value=null,j.value=null,vn.value=null,an.value=!1}function gr(e){if(!z.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=z.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();yn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function _r(e,t,n,r=`pointer`,i=null,a=!0){a&&M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,pr.value={color:e.color,shape:e.shape},bn.value=r,j.value=i,vn.value=t.uid,mr.value={datapoint:t,seriesIndex:n,series:J.value,config:M.value};let o=I.value.customFormat,s=ie(o)?o({seriesIndex:n,datapoint:t,series:J.value,config:M.value}):void 0;if(typeof s==`string`)on.value=s;else{let r=``;t.quadrantSide&&(r+=`<div style="color:${F.value.quadrantLabels[t.quadrantSide].color};font-weight:${F.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${F.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${I.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${P.value.xAxis.name?P.value.xAxis.name:`x`}: <b>${Y(t.xValue,`x`,I.value.roundingValue,{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${P.value.yAxis.name?P.value.yAxis.name:`y`}: <b>${Y(t.yValue,`y`,I.value.roundingValue,{datapoint:t,category:e,categoryIndex:n})}</b></div>`,on.value=`<div style="text-align:left;font-size:${I.value.fontSize}px">${r}</div>`}r===`keyboard`&&We(()=>{gr(t.uid)}),an.value=!0}function vr(e,t,n){return{...t,onEnter:()=>_r(e,t,n),onLeave:()=>br(t,n),onClick:()=>xr(e,t,n),isSelected:Z.value&&t.uid===Z.value}}function yr(e){return{"data-cy":`plot-label`,x:e.x,y:e.y+F.value.plotLabels.offsetY+L.value.layout.plots.radius,"text-anchor":`middle`,"font-size":F.value.plotLabels.fontSize/(k.value?1.5:1),fill:F.value.plotLabels.color}}function br(e,t){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(vn.value!==e.uid||bn.value!==`keyboard`)&&(an.value=!1,Z.value=null,pr.value=null)}function xr(e,t,n){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text};rn(`selectPlot`,r)}function Sr(e){if(!e)return;let t=J.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:F.value.quadrantLabels[e].text,items:[...t]};rn(`selectSide`,n)}let Cr=d(()=>({TL:`${V.value.left-1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.top-1} ${V.value.right},${V.value.top-1} ${V.value.right},${V.value.bottom} ${V.value.left-1},${V.value.bottom} ${V.value.left-1},${V.value.centerY}`,TR:`${V.value.left},${V.value.top-1} ${V.value.centerX},${V.value.top-1} ${V.value.centerX},${V.value.centerY} ${V.value.right+1},${V.value.centerY} ${V.value.right+1},${V.value.bottom} ${V.value.left},${V.value.bottom} ${V.value.left},${V.value.top-1}`,BR:`${V.value.left},${V.value.top} ${V.value.right+1},${V.value.top} ${V.value.right+1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.bottom+1} ${V.value.left},${V.value.bottom+1} ${V.value.left},${V.value.top}`,BL:`${V.value.left-1},${V.value.top} ${V.value.right},${V.value.top} ${V.value.right},${V.value.bottom+1} ${V.value.centerX},${V.value.bottom+1} ${V.value.centerX},${V.value.centerY} ${V.value.left-1},${V.value.centerY} ${V.value.left-1},${V.value.top}`})[U.value]),wr=d(()=>Object.fromEntries(W.map(e=>{let t=(e.right?V.value.centerX:V.value.left)+V.value.usableWidth/4,n=e.bottom?V.value.centerY-48:0;return[e.id,{...Object.fromEntries(W.map(e=>[e.key,{x:t+(e.right?0:-20),y:n+(e.bottom?20:0),fill:F.value.quadrantLabels[e.key].color}])),crosshairs:{horizontal:`M ${t-20},${n+20} ${t+20},${n+20}`,vertical:`M ${t},${n} ${t},${n+40}`}}]})));function Tr(){return J.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:F.value.quadrantLabels[e.quadrantSide].text}))}))}function Er(e=null){We(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=ir.value.head,r=ir.value.body,i=t.concat([n]).concat(r),a=re(i);e?e(a):ge({csvContent:a,title:L.value.title.text||`vue-ui-quadrant`})})}let Q=x(!1);function Dr(e){Q.value=e,sn.value+=1}function Or(){B.value.showTable=!B.value.showTable}function kr(){B.value.plotLabels.show=!B.value.plotLabels.show}function Ar(){B.value.showTooltip=!B.value.showTooltip}let jr=x(!1);function Mr(){jr.value=!jr.value}let Nr=l(A,()=>L.value.title.text),Pr=d(()=>c({config:M,style:L,mutableConfig:B,dialog:en,accordion:Yt,isFullscreen:Q,parent:A,maxWidth:800,isCursorPointer:R}));Ze(()=>B.value.showTable,e=>{gn.value&&s(e,M,gn)});function Fr(){B.value.showTable=!1,_n.value&&_n.value.setTableIconState(!1)}let Ir=d(()=>L.value.backgroundColor),Lr=d(()=>L.value.legend),Rr=d(()=>L.value.title),{isCallbackImaging:zr,isCallbackSvg:Br,generateSvg:Vr,onGenerateImage:Hr}=De({svg:z,title:Rr,legend:Lr,legendItems:X,backgroundColor:Ir,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Bn});async function Ur(){rn(`copyAlt`,{config:M.value,dataset:tr.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:tr.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Wr(){j.value=null,vn.value=null,xn.value=!0}function Gr(){hr(),xn.value=!1}function Kr(e){if(!z.value||jr.value||document.activeElement!==z.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){hr();return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;xr(e.category,e.plot,e.categoryIndex);return}let a=j.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let l=$.value[a];l&&_r(l.category,l.plot,l.categoryIndex,`keyboard`,a)}let qr=d(()=>({headers:ar.value?.colNames??[],rows:ar.value?.a11yBody??[]})),$=d(()=>J.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Ze($,e=>{if(!Z.value)return;let t=e.findIndex(e=>e.plot.uid===Z.value);if(t===-1){hr();return}let n=e[t];_r(n.category,n.plot,n.categoryIndex,bn.value,j.value===null?null:t,!1)}),Re({getData:Tr,getImage:Nr,generatePdf:zn,generateCsv:Er,generateImage:Bn,generateSvg:Vr,hideSeries:ur,showSeries:lr,toggleTable:Or,toggleLabels:kr,toggleTooltip:Ar,toggleAnnotator:Mr,toggleFullscreen:Dr,copyAlt:Ur}),(e,s)=>(b(),m(`div`,{class:Ge(`vue-data-ui-component vue-ui-quadrant ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:A,id:`vue-ui-quadrant_${O.value}`,style:y(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};${M.value.responsive?`height: 100%`:``}`),onMouseenter:s[2]||=()=>T(En)(!0),onMouseleave:s[3]||=()=>{T(En)(!1),xn.value||hr()}},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,w(M.value.a11y.translations.keyboardNavigation),1)],8,et),M.value.a11y.includeTable&&qr.value?.rows?.length?(b(),f(Fe,{key:0,uid:O.value,head:qr.value.headers,body:qr.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),N.value.buttons.annotator?(b(),f(T(Zt),Ue({key:1},T(a)(N.value.annotator),{svgRef:T(z),backgroundColor:L.value.backgroundColor,color:L.value.color,active:jr.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:Mr}),Be({_:2},[S(T(o),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Vn.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:dn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),L.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:cn,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),f(Ae,{key:`table_${fn.value}`,config:{title:{cy:`quadrant-title`,...L.value.title},subtitle:{cy:`quadrant-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,tt),N.value.show&&nn.value&&(T(Dn)||T(Tn))?(b(),f(T(Qt),Ue({ref_key:`userOptionsRef`,ref:_n,key:`user_options_${sn.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isImaging:T(Rn),isPrinting:T(Ln),uid:O.value,hasTooltip:N.value.buttons.tooltip&&I.value.show,isFullscreen:Q.value,isTooltip:B.value.showTooltip,chartElement:A.value},T(n)(N.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:jr.value,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Dr,onGeneratePdf:T(zn),onGenerateCsv:Er,onGenerateImage:T(Hr),onGenerateSvg:T(Vr),onToggleTable:Or,onToggleLabels:kr,onToggleTooltip:Ar,onToggleAnnotator:Mr,onCopyAlt:Ur,style:{visibility:T(Dn)?T(Tn)?`visible`:`hidden`:`visible`}}),Be({_:2},[S(T(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,nt,[(b(),m(`svg`,{ref_key:`svgRef`,ref:z,xmlns:T(ve),"aria-describedby":`chart-instructions-${O.value}`,class:Ge({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`${H.value.startX} ${H.value.startY} ${H.value.width} ${H.value.height}`,style:y(`max-width:100%;overflow:hidden;background:transparent;color:${L.value.color}`),id:`svg_${O.value}`,tabindex:`0`,onFocus:Wr,onBlur:Gr,onKeydown:Kr},[He(T($t)),C(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:T(Ln)||T(Rn)||T(zr),isPrintingSvg:T(Br)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:H.value.startX,y:H.value.startY,width:H.value.width,height:H.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,it)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),f(Le,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${O.value}_${t}`,key:`quadrant_gradient_${O.value}_${t}`,stops:[[`0%`,T(se)(T(ue)(e.color,.05),L.value.layout.areas.opacity),1],[`100%`,T(se)(e.color,L.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),P.value.graduations.show?(b(),m(`g`,at,[(b(!0),m(u,null,S($n.value,e=>(b(),m(`rect`,{fill:P.value.graduations.fill?T(se)(P.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":P.value.graduations.strokeWidth,stroke:P.value.graduations.stroke,rx:P.value.graduations.roundingForce},null,8,ot))),256))])):p(``,!0),h(`line`,{x1:V.value.left,y1:V.value.centerY,x2:V.value.right,y2:V.value.centerY,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,st),h(`line`,{x1:V.value.centerX,y1:V.value.top,x2:V.value.centerX,y2:V.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,ct),P.value.showArrows?(b(),m(`g`,lt,[h(`polygon`,{points:`${V.value.right-8},${V.value.centerY-6} ${V.value.right},${V.value.centerY} ${V.value.right-8},${V.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,ut),h(`polygon`,{points:`${V.value.left+8},${V.value.centerY-6} ${V.value.left},${V.value.centerY} ${V.value.left+8},${V.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,dt),h(`polygon`,{points:`${V.value.centerX-6},${V.value.top+8} ${V.value.centerX},${V.value.top} ${V.value.centerX+6},${V.value.top+8}`,fill:P.value.stroke,stroke:`none`},null,8,ft),h(`polygon`,{points:`${V.value.centerX-6},${V.value.bottom-8} ${V.value.centerX},${V.value.bottom} ${V.value.centerX+6},${V.value.bottom-8}`,fill:P.value.stroke,stroke:`none`},null,8,pt)])):p(``,!0),F.value.quadrantLabels.show&&!k.value?(b(),m(`g`,mt,[(b(),m(u,null,S(W,e=>(b(),m(u,{key:e.id},[F.value.quadrantLabels[e.key].text?(b(),m(`text`,{key:0,x:e.right?V.value.width:0,y:e.bottom?V.value.bottom+V.value.padding*.7:V.value.top-V.value.padding/2,"text-anchor":e.right?`end`:`start`,fill:F.value.quadrantLabels[e.key].color,"font-size":F.value.quadrantLabels[e.key].fontSize,style:y(`font-weight:${F.value.quadrantLabels[e.key].bold?`bold`:``}`),onClick:t=>Sr(e.key)},w(F.value.quadrantLabels[e.key].text),13,ht)):p(``,!0)],64))),64))])):p(``,!0),F.value.axisLabels.show?(b(),m(`g`,gt,[P.value.yAxis.show?(b(),m(`text`,{key:0,x:V.value.centerX,y:V.value.top-V.value.padding/6,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},w(Y(K.value.y.max,`y`,F.value.plotLabels.rounding)),9,_t)):p(``,!0),h(`text`,{x:V.value.centerX,y:V.value.top-V.value.padding/2,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},w(P.value.yAxis.name),9,vt),P.value.yAxis.show?(b(),m(`text`,{key:1,x:V.value.centerX,y:V.value.bottom+V.value.padding*.35,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.negative},w(Y(K.value.y.min,`y`,F.value.plotLabels.rounding)),9,yt)):p(``,!0),P.value.xAxis.show?(b(),m(`text`,{key:2,id:`xLabelMin_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.padding-F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(-90)`,fill:F.value.axisLabels.color.negative},w(Y(K.value.x.min,`x`,F.value.plotLabels.rounding)),9,bt)):p(``,!0),P.value.xAxis.show?(b(),m(`text`,{key:3,id:`xLabelMax_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.width-V.value.padding+F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},w(Y(K.value.x.max,`x`,F.value.plotLabels.rounding)),9,xt)):p(``,!0),h(`text`,{id:`xLabelMaxName_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.width-F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},w(P.value.xAxis.name),9,St)])):p(``,!0),L.value.layout.areas.show?(b(),m(`g`,Ct,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),m(`g`,null,[e.series.length>2?(b(),m(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:L.value.layout.areas.useGradient?`url(#quadrant_gradient_${O.value}_${t})`:T(se)(e.color,L.value.layout.areas.opacity),points:T(ne)(e)},null,8,wt)):p(``,!0)]))),256))])):p(``,!0),h(`g`,null,[(b(),m(u,null,S(W,e=>h(`rect`,{key:e.id,onClick:t=>Qn(e.id),x:e.right?V.value.centerX:V.value.left,y:e.bottom?V.value.centerY:V.value.top,width:Math.max(.001,V.value.usableWidth/2),height:Math.max(.001,V.value.usableHeight/2),fill:`transparent`,class:Ge({"vue-data-ui-zoom-plus":!k.value&&Jn.value,"vue-data-ui-zoom-minus":k.value&&Jn.value})},null,10,Tt)),64))]),F.value.plotLabels.showAsTag?(b(),m(u,{key:7},[B.value.plotLabels.show?(b(),m(`g`,jt,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),m(u,null,[(b(!0),m(u,null,S(e.series,n=>(b(),m(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-F.value.plotLabels.fontSize,onMouseover:r=>_r(e,n,t),onMouseleave:e=>br(n,t),onClick:r=>xr(e,n,t)},[h(`div`,{style:y(`color:${T(_e)(e.color)};margin: 0 auto; font-size:${F.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},w(n.name),5)],40,Mt))),256))],64))),256))])):p(``,!0)],64)):(b(),m(u,{key:6},[(b(!0),m(u,null,S(J.value,(t,n)=>(b(),m(`g`,null,[e.$slots.datapoint&&!T(Cn)?(b(!0),m(u,{key:0},S(t.series,r=>(b(),m(`g`,{key:r.uid},[(b(),m(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>_r(t,r,n),onMouseleave:e=>br(r,n),onClick:e=>xr(t,r,n)},[C(e.$slots,`datapoint`,Ue({ref_for:!0},{datapoint:vr(t,r,n)}),void 0,!0)],40,Et)),h(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(L.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Dt)]))),128)):e.$slots.datapointSvg&&!T(Cn)?(b(!0),m(u,{key:1},S(t.series,r=>(b(),m(`g`,{key:r.uid},[C(e.$slots,`datapointSvg`,Ue({ref_for:!0},{datapoint:vr(t,r,n)}),void 0,!0)]))),128)):(b(!0),m(u,{key:2},S(t.series,(e,r)=>(b(),m(`g`,{key:e.uid},[He(je,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:L.value.layout.plots.radius/(k.value?1.5:1),shape:t.shape,stroke:L.value.layout.plots.outline?L.value.layout.plots.outlineColor:`none`,strokeWidth:L.value.layout.plots.outlineWidth,onMouseenter:r=>_r(t,e,n,`pointer`),onMouseleave:t=>br(e,n),onClick:r=>xr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),h(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(L.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Ot)]))),128))]))),256)),B.value.plotLabels.show?(b(),m(`g`,kt,[(b(!0),m(u,null,S(J.value,e=>(b(),m(`g`,null,[(b(!0),m(u,null,S(e.series,e=>(b(),m(`g`,null,[String(e.name).includes(`
2
2
  `)?(b(),m(`text`,Ue({key:1,ref_for:!0},yr(e),{innerHTML:T(oe)({content:String(e.name),fontSize:F.value.plotLabels.fontSize/(k.value?1.5:1),fill:F.value.plotLabels.color,x:e.x,y:e.y+F.value.plotLabels.offsetY+L.value.layout.plots.radius})}),null,16,At)):(b(),m(`text`,Ue({key:0,ref_for:!0},yr(e)),w(e.name),17))]))),256))]))),256))])):p(``,!0)],64)),k.value?(b(),m(`g`,Nt,[Cr.value?(b(),m(`polygon`,{key:0,points:Cr.value,fill:L.value.backgroundColor,style:{opacity:`1`}},null,8,Pt)):p(``,!0)])):p(``,!0),U.value&&!Kn.value?(b(),m(`g`,Ft,[h(`text`,{x:G.value.x,y:G.value.y-G.value.fontSize/1.5,"font-size":G.value.fontSize/1.5,fill:G.value.fill,"text-anchor":`middle`,"font-weight":G.value.bold?`bold`:`normal`},w(G.value.text),9,It)])):p(``,!0),k.value&&U.value?(b(),m(`g`,Lt,[(b(),m(u,null,S(W,e=>h(`rect`,{key:e.id,x:wr.value[U.value][e.key].x,y:wr.value[U.value][e.key].y,width:`20`,height:`20`,fill:wr.value[U.value][e.key].fill,style:y(`cursor: ${R.value?`pointer`:`default`}; opacity: ${U.value===e.id?1:.2}`),onClick:t=>Qn(e.id),class:Ge({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==e.id})},null,14,Rt)),64)),h(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:L.value.backgroundColor,"stroke-width":1,d:wr.value[U.value].crosshairs.horizontal},null,8,zt),h(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:L.value.backgroundColor,"stroke-width":1,d:wr.value[U.value].crosshairs.vertical},null,8,Bt)])):p(``,!0),C(e.$slots,`svg`,{svg:{...V.value,isPrintingImg:T(Ln)||T(Rn)||T(zr),isPrintingSvg:T(Br)}},void 0,!0)],46,rt)),e.$slots.hint?(b(),m(`div`,Vt,[C(e.$slots,`hint`,v(_({hint:M.value.a11y.translations.keyboardNavigation,isVisible:xn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,Ht,[C(e.$slots,`watermark`,v(_({isPrinting:T(Ln)||T(Rn)||T(zr)||T(Br)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${O.value}`},null,8,Ut),hn.value&&(L.value.legend.show||e.$slots.legend)?(b(),f(ze,{key:6,to:L.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[h(`div`,{ref_key:`chartLegend`,ref:ln},[C(e.$slots,`legend`,{legend:X.value},()=>[L.value.legend.show?(b(),f(Ne,{key:`legend_${mn.value}`,legendSet:X.value,config:dr.value,isCursorPointer:R.value,onClickMarker:s[0]||=({legend:e})=>sr(e.id)},{item:E(({legend:e})=>[T(Cn)?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>sr(e.id),style:y(`opacity:${q.value.includes(e.id)?.5:1}`)},w(e.name),13,Wt))]),legendToggle:E(()=>[X.value.length>2&&L.value.legend.selectAllToggle.show&&!T(Cn)?(b(),f(Ie,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:q.value.length>0,isCursorPointer:R.value,onToggle:or},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:7,ref_key:`source`,ref:un,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),He(T(qt),{teleportTo:I.value.teleportTo,show:B.value.showTooltip&&an.value,backgroundColor:I.value.backgroundColor,color:I.value.color,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,fontSize:I.value.fontSize,backgroundOpacity:I.value.backgroundOpacity,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:A.value,content:on.value,isFullscreen:Q.value,isCustom:I.value.customFormat&&typeof I.value.customFormat==`function`,smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:bn.value===`keyboard`,a11yPosition:yn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,v(_({...mr.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,v(_({...mr.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,v(_({...mr.value})),void 0,!0)]),default:E(()=>[I.value.showShape?(b(),m(`svg`,Gt,[He(je,{plot:{x:10,y:10},shape:pr.value.shape,color:pr.value.color,radius:8,stroke:L.value.layout.plots.outline?L.value.layout.plots.outlineColor:`none`,"stroke-width":L.value.layout.plots.outlineWidth},null,8,[`shape`,`color`,`stroke`,`stroke-width`])])):p(``,!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`]),nn.value&&N.value.buttons.table?(b(),f(Je(Pr.value.component),Ue({key:8},Pr.value.props,{ref_key:`tableUnit`,ref:gn,onClose:Fr}),Be({content:E(()=>[(b(),f(T(Xt),{key:`table_${pn.value}`,colNames:ar.value.colNames,head:ar.value.head,body:ar.value.body,config:ar.value.config,title:M.value.table.useDialog?``:Pr.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:R.value,onClose:Fr},{th:E(({th:e})=>[Ve(w(e),1)]),td:E(({td:e})=>[h(`div`,{innerHTML:e.name||e},null,8,Kt)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:E(()=>[Ve(w(Pr.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:E(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Er(N.value.callbacks.csv),style:y({cursor:R.value?`pointer`:`default`})},[He(T(Jt),{name:`fileCsv`,stroke:Pr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[T(Cn)?(b(),f(Pe,{key:0})):p(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-ea8b6084`]]);export{Qe as n,qt as t};