vue-data-ui 3.29.2-beta.0 → 3.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PackageVersion-D8aPzzvh.js → PackageVersion-C1vtZkKc.js} +1 -1
- package/dist/{XyAnalysisOptions-TrM-d1cV.js → XyAnalysisOptions-CD0cCtt5.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-graph.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/package-BPQ4kSL9.js +1 -0
- package/dist/{render-common-D_b9nsiP.js → render-common-DNKT42_W.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/{vue-data-ui-KUM8DuFn.js → vue-data-ui-CeZQZazG.js} +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Qk10B6Cd.js → vue-ui-3d-bar-CNym5PLY.js} +1 -1
- package/dist/{vue-ui-age-pyramid-DrI34mhm.js → vue-ui-age-pyramid-zD6anIub.js} +1 -1
- package/dist/{vue-ui-bullet-CKFpHbob.js → vue-ui-bullet-CxhIb-XU.js} +1 -1
- package/dist/{vue-ui-bump-3DZDFqlN.js → vue-ui-bump-B8WYM1RE.js} +1 -1
- package/dist/{vue-ui-candlestick-D-pcBKMb.js → vue-ui-candlestick-CwG1H80q.js} +1 -1
- package/dist/{vue-ui-carousel-table-jc4H5Csu.js → vue-ui-carousel-table-CdrxVrHZ.js} +1 -1
- package/dist/{vue-ui-chestnut-DuY5XkX5.js → vue-ui-chestnut-CZG6Ep36.js} +1 -1
- package/dist/{vue-ui-chord-B7OK3qHh.js → vue-ui-chord-DQS4tBWQ.js} +1 -1
- package/dist/{vue-ui-circle-pack-B8jc9sHP.js → vue-ui-circle-pack-BGbhvnE5.js} +1 -1
- package/dist/{vue-ui-cursor-IwoqyrxC.js → vue-ui-cursor-DTRAPWBW.js} +1 -1
- package/dist/{vue-ui-dag-Ji8-v6L0.js → vue-ui-dag-BGNC8uRQ.js} +1 -1
- package/dist/{vue-ui-dashboard-WIwFoyCz.js → vue-ui-dashboard-DtPlz7y-.js} +1 -1
- package/dist/{vue-ui-digits-DG2jj43S.js → vue-ui-digits-gtQiZcOT.js} +1 -1
- package/dist/{vue-ui-donut-Cp_rDJUY.js → vue-ui-donut-COELw22T.js} +1 -1
- package/dist/{vue-ui-donut-BZHm9bc7.js → vue-ui-donut-_wqSXunY.js} +1 -1
- package/dist/{vue-ui-donut-evolution-_Kdf1mvb.js → vue-ui-donut-evolution-CdztIQSl.js} +1 -1
- package/dist/{vue-ui-dumbbell-7IaXl-8-.js → vue-ui-dumbbell-CpLMoEet.js} +1 -1
- package/dist/{vue-ui-flow-DR_wI1D2.js → vue-ui-flow-DwG1MX2V.js} +1 -1
- package/dist/{vue-ui-funnel-BN1pctHJ.js → vue-ui-funnel-CisiLlR9.js} +1 -1
- package/dist/{vue-ui-galaxy-Hh7hGC7B.js → vue-ui-galaxy-HndquOs-.js} +1 -1
- package/dist/{vue-ui-gauge-BLRxKref.js → vue-ui-gauge-CVxKlU2U.js} +1 -1
- package/dist/{vue-ui-geo-CCgF74O9.js → vue-ui-geo-0PDP2JjE.js} +1 -1
- package/dist/{vue-ui-gizmo-Crc_ZyI6.js → vue-ui-gizmo-mFeK8xP1.js} +1 -1
- package/dist/{vue-ui-graph-BKP_eWfb.js → vue-ui-graph-Duw5qG0a.js} +1 -1
- package/dist/{vue-ui-heatmap-ClwqkUxt.js → vue-ui-heatmap-DZM9MvfE.js} +1 -1
- package/dist/{vue-ui-hill-GDmqAoJ5.js → vue-ui-hill-BGQSrcHM.js} +1 -1
- package/dist/{vue-ui-history-plot-ApFEePsd.js → vue-ui-history-plot-EGeDhkdS.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-ny2bvg06.js → vue-ui-horizontal-bar-CtONqcjG.js} +1 -1
- package/dist/{vue-ui-kpi-Bp1e999m.js → vue-ui-kpi-BSRfwYk9.js} +1 -1
- package/dist/{vue-ui-molecule-DxtTUaLQ.js → vue-ui-molecule-DOQ8dsme.js} +1 -1
- package/dist/{vue-ui-mood-radar-j0d3TK6F.js → vue-ui-mood-radar-BJeSC-Op.js} +1 -1
- package/dist/{vue-ui-nested-donuts-B5uZ3ysI.js → vue-ui-nested-donuts-DUUmc8K7.js} +1 -1
- package/dist/{vue-ui-onion-CNh69F7R.js → vue-ui-onion-B8M1x8Jc.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-2SQJp8f0.js → vue-ui-parallel-coordinate-plot-Dv0eO4ZI.js} +1 -1
- package/dist/{vue-ui-quadrant-Bhgpb3cX.js → vue-ui-quadrant-_QcgE234.js} +1 -1
- package/dist/{vue-ui-quick-chart-Bfe2UmN_.js → vue-ui-quick-chart-DzJx0LBu.js} +1 -1
- package/dist/{vue-ui-radar-3dYXgEMZ.js → vue-ui-radar-C-idGMCp.js} +1 -1
- package/dist/{vue-ui-relation-circle-BG6-M08A.js → vue-ui-relation-circle-Dl2XO5DU.js} +1 -1
- package/dist/{vue-ui-ridgeline-C0iY3yTj.js → vue-ui-ridgeline-SG44P21X.js} +1 -1
- package/dist/{vue-ui-rings-B_J_Gfrt.js → vue-ui-rings-b8Ms_mTp.js} +1 -1
- package/dist/{vue-ui-scatter-Cehkxo2z.js → vue-ui-scatter-KPiaTVuv.js} +1 -1
- package/dist/{vue-ui-skeleton-D-hfKRUc.js → vue-ui-skeleton-Dg0tACvE.js} +1 -1
- package/dist/{vue-ui-spark-trend--Dt7macD.js → vue-ui-spark-trend-C3EXOm2F.js} +1 -1
- package/dist/{vue-ui-sparkbar-DzGe_dfJ.js → vue-ui-sparkbar-CCjgG6pR.js} +1 -1
- package/dist/{vue-ui-sparkgauge-BqcV18vm.js → vue-ui-sparkgauge-DnxHmWiH.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-TdoHtGYT.js → vue-ui-sparkhistogram--QcZmUje.js} +1 -1
- package/dist/{vue-ui-sparkline-Eet_Atf1.js → vue-ui-sparkline-D1BPdZdr.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-B1SX-oPW.js → vue-ui-sparkstackbar-CxF1OSDL.js} +1 -1
- package/dist/{vue-ui-stackbar-BsEWtYRO.js → vue-ui-stackbar-yKTDxwXp.js} +1 -1
- package/dist/{vue-ui-stackline-B5hG3Qg4.js → vue-ui-stackline-BPdR_8x0.js} +1 -1
- package/dist/{vue-ui-strip-plot-eWnUp_6Y.js → vue-ui-strip-plot-CAmBydR2.js} +1 -1
- package/dist/{vue-ui-table-G7KEKsPH.js → vue-ui-table-BKfGLJgN.js} +1 -1
- package/dist/{vue-ui-table-sparkline-BDS0VE4_.js → vue-ui-table-sparkline-CVomhgHC.js} +1 -1
- package/dist/{vue-ui-thermometer-C-jpJjJ8.js → vue-ui-thermometer-DNRR87NF.js} +1 -1
- package/dist/{vue-ui-timer-DNAmPraQ.js → vue-ui-timer-Bx5D4QsO.js} +1 -1
- package/dist/{vue-ui-tiremarks-9om1K_xI.js → vue-ui-tiremarks-CnZqIcFq.js} +1 -1
- package/dist/{vue-ui-treemap-DjpsD5YK.js → vue-ui-treemap-D7k9vWC9.js} +1 -1
- package/dist/{vue-ui-waffle-C7i07E9j.js → vue-ui-waffle-BHcDq09N.js} +1 -1
- package/dist/{vue-ui-wheel-DagrJGMA.js → vue-ui-wheel-Cd3P9Nq4.js} +1 -1
- package/dist/{vue-ui-word-cloud-DEa-Eg43.js → vue-ui-word-cloud-B7iGPkGe.js} +1 -1
- package/dist/{vue-ui-world-UE0OI7Nw.js → vue-ui-world-bZ7gOrS1.js} +1 -1
- package/dist/{vue-ui-xy-BlxUkwlc.js → vue-ui-xy-BTGZ1NSt.js} +2 -2
- package/dist/{vue-ui-xy-D7jTqz17.js → vue-ui-xy-Y_MKCMGp.js} +1 -1
- package/package.json +1 -1
- package/dist/package-C5OjoKoX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as 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{$ as c,D as ne,Dt as re,Ht as ie,Jt as ae,Lt as oe,M as se,S as ce,X as le,Yt as ue,at as l,b as de,i as fe,in as pe,nt as me,t as he,w as ge,yt as _e}from"./lib-rPeBMZrn.js";import{n as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useConfig-CXhXxWjB.js";import{n as be}from"./resolveChartConfig-0IvbmIE_.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{t as we}from"./useChartAccessibility-DOMuYJfm.js";import{t as Te}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./Legend-W9YVYVX-.js";import{t as Oe}from"./vue_ui_radar-BujJL_m0.js";import{t as ke}from"./BaseScanner-m6QR9rwD.js";import{t as Ae}from"./A11yDataTable-DWNlWXzs.js";import{t as je}from"./BaseLegendToggle-VzX69MCo.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as Pe,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Fe,createTextVNode as Ie,createVNode as Le,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ve,onMounted as He,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Ue,shallowRef as We,toDisplayString as w,unref as T,watch as E,withCtx as D}from"vue";var Ge=/* @__PURE__ */ e({default:()=>St}),Ke=[`id`],qe=[`id`],Je=[`id`],Ye={style:{position:`relative`}},Xe=[`xmlns`,`aria-describedby`,`viewBox`],Ze=[`width`,`height`],Qe={key:1},$e=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],et={key:0,style:{"pointer-events":`none`}},tt=[`d`,`stroke`,`stroke-width`],nt=[`d`,`stroke`,`stroke-width`],rt={key:2},it=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`points`,`stroke`,`stroke-width`],ot=[`points`,`stroke`,`stroke-width`,`fill`],st=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ct={key:4},lt=[`onMouseenter`,`onMouseleave`,`onClick`],ut=[`cx`,`cy`,`r`],dt=[`cx`,`cy`,`fill`,`r`,`stroke`],ft={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},pt={key:5,class:`vue-data-ui-watermark`},mt=[`id`],ht=[`onClick`],gt={class:`vue-data-ui-legend-item`},_t=[`stroke`,`stroke-width`,`stroke-dasharray`],vt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},yt={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},bt={class:`vue-ui-radar-tooltip-datalabel-name`},xt={key:0},St=/*#__PURE__*/ Ne({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Ne,emit:Ge}){let St=g(()=>import(`./Tooltip-B432XpvC.js`)),Ct=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),wt=g(()=>import(`./vue-ui-sparkbar-DzGe_dfJ.js`).then(e=>e.n)),Tt=g(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Et=g(()=>import(`./DataTable-KeuZB1JM.js`)),Dt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ot=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),kt=g(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),At=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_radar:jt}=ye(),O=e,Mt=d(()=>Nt(O.dataset));function Nt(e){return Array.isArray(e?.categories)&&e.categories.length>0&&Array.from(e.categories,e=>e&&Object.keys(e).includes(`name`)).every(Boolean)&&Array.isArray(e.series)&&e.series.length>0&&Array.from(e.series,t=>t&&Object.keys(t).includes(`name`)&&Array.isArray(t.values)&&t.values.length===e.categories.length&&Array.from(t.values,Number.isFinite).every(Boolean)&&(t.target===void 0||Number.isFinite(t.target))).every(Boolean)}let k=x(le()),Pt=x(!1),Ft=x(``),It=x(0),A=x(null),Lt=x(null),Rt=x(null),zt=x(null),Bt=x(null),Vt=x(!1),Ht=x(null),Ut=x(null),j=x(null),Wt=x({x:0,y:0}),Gt=x(`pointer`),Kt=x(!1),M=x(Qt());E(()=>O.config,()=>{M.value=Qt()},{deep:!0});let N=d(()=>!!O.config.loading||!Mt.value),P=d(()=>N.value?pe({defaultConfig:M.value,userConfig:qt.value}):M.value),qt=d(()=>pe({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),F=d(()=>P.value.userOptions),I=d(()=>P.value.style.chart.layout.labels),L=d(()=>P.value.style.chart.layout),R=d(()=>P.value.style.chart.tooltip),z=d(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>O.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let B=d(()=>P.value.userOptions.useCursorPointer),Jt=d(()=>N.value?Nt(O.config.skeletonDataset)?O.config.skeletonDataset:{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]}:O.dataset),Yt=x(!P.value.userOptions.showOnChartHover),Xt=d(()=>P.value.userOptions.keepStateOnChartLeave);function Zt(e=!1){P.value.userOptions.showOnChartHover&&(Yt.value=e)}E(()=>P.value.userOptions.showOnChartHover,e=>{Yt.value=!e});let{svgRef:V}=we({config:z.value.title});function Qt(){return be(O.config,jt,Oe)}let $t=We(null),en=We(null),H=null,tn=!1,U=d(()=>M.value.debug);function nn(){$t.value?.disconnect(),$t.value=null,H!==null&&cancelAnimationFrame(H),H=null}function rn(){if(nn(),en.value=null,!P.value.responsive||!A.value?.parentNode)return;let e=new ResizeObserver(t);function t(){tn||$t.value!==e||(H!==null&&cancelAnimationFrame(H),H=requestAnimationFrame(()=>{if(tn||$t.value!==e)return;H=null;let{width:t,height:n}=Se({chart:A.value,title:z.value.title.text?Lt.value:null,legend:z.value.legend.show?Rt.value:null,source:zt.value,noTitle:Bt.value});en.value={width:Math.max(.1,t),height:Math.max(.1,n)}}))}$t.value=e;for(let t of[A.value.parentNode,Lt.value,Rt.value,zt.value,Bt.value])t&&e.observe(t);t()}E([()=>P.value.responsive,Lt,Rt,zt,Bt,()=>z.value.title.text,()=>z.value.legend.show,()=>z.value.legend.position],rn,{flush:`post`}),He(()=>{Vt.value=!0,rn()}),Ve(()=>{tn=!0,nn(),bn()});let{isPrinting:an,isImaging:on,generatePdf:sn,generateImage:cn}=xe({elementId:`vue-ui-radar_${k.value}`,fileName:z.value.title.text||`vue-ui-radar`,options:P.value.userOptions.print}),ln=d(()=>P.value.userOptions.show&&!z.value.title.text),un=d(()=>ge(P.value.customPalette)),W=x({showTable:M.value.table.show,showTooltip:M.value.style.chart.tooltip.show});E(()=>M.value.table.show,e=>{W.value.showTable=e}),E(()=>M.value.style.chart.tooltip.show,e=>{W.value.showTooltip=e});let dn=d(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:R.value.animation.show,animationFrames:R.value.animation.animationFrames},labels:{fontSize:R.value.fontSize,name:{color:R.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),G=d(()=>en.value??{height:312,width:512});function fn(e){let t=/* @__PURE__ */ new Map;return e.map(e=>{let n=e.name,r=t.get(n)??0;return t.set(n,r+1),JSON.stringify([n,r])})}let K=d(()=>fn(Y.value)),pn=d(()=>fn(X.value)),mn=Ge,q=x([]),J=d(()=>K.value.flatMap((e,t)=>q.value.includes(e)?[t]:[])),hn=x(null),gn=x(!1);function _n(){N.value||(bn(),q.value=J.value.length?[]:K.value.slice(),vn())}function vn(){mn(`selectLegend`,Q.value.filter((e,t)=>!J.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}let yn=null;function bn(){yn!==null&&clearTimeout(yn),yn=null,gn.value=!1,hn.value=null}function xn(e){if(N.value||!K.value[e])return;bn();let t=K.value[e],n=q.value.includes(t);q.value=n?q.value.filter(e=>e!==t):[...q.value,t],P.value.useCssAnimation&&(gn.value=!0,n&&(hn.value=e),yn=setTimeout(bn,500)),vn()}function Sn(){return Q.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function Cn(){let e=O.dataset;[null,void 0].includes(e?.categories)?(l({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:U.value})):(Array.isArray(e.categories)?e.categories.length===0?l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:U.value}):U.value&&Array.from(e.categories).forEach((e,t)=>{_e({datasetObject:e??{},requiredAttributes:[`name`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}):U.value&&console.warn(`VueUiRadar: dataset.categories must be an array.`),[null,void 0].includes(e?.series)?l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target?: number}[])`,debug:U.value}):Array.isArray(e.series)?(e.series.length===0&&l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`series`,debug:U.value}),U.value&&Array.from(e.series).forEach((t,n)=>{_e({datasetObject:t??{},requiredAttributes:[`name`,`values`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:n})}),Array.isArray(t?.values)?(t.values.length!==e.categories?.length&&console.warn(`VueUiRadar: dataset.series[${n}].values must contain one value per category.`),Array.from(t.values).forEach((e,t)=>{Number.isFinite(e)||console.warn(`VueUiRadar: dataset.series[${n}].values[${t}] must be a finite number.`)})):t&&Object.keys(t).includes(`values`)&&console.warn(`VueUiRadar: dataset.series[${n}].values must be an array.`),t?.target!==void 0&&!Number.isFinite(t.target)&&console.warn(`VueUiRadar: dataset.series[${n}].target must be a finite number.`)})):U.value&&console.warn(`VueUiRadar: dataset.series must be an array.`))}E([()=>O.dataset,U],()=>Cn(),{deep:!0,immediate:!0});let Y=d(()=>{let e=Array.isArray(Jt.value?.categories)?Jt.value.categories:[],t=un.value??ie;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${k.value}_${n}`,color:ce(e?.color)||t[n]||ie[n%ie.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),X=d(()=>Jt.value.series.map((e,t)=>({...e,color:ce(e.color)||un.value[t]||ie[t]||ie[t%ie.length],serieId:`radar_serie_${k.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));E([K,()=>P.value.useCssAnimation],()=>{bn(),N.value||(q.value=q.value.filter(e=>K.value.includes(e)))});function wn(e){return X.value.length?Q.value.find(t=>t.name===e)||(U.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(U.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function Tn(e){let t=wn(e);t!==null&&J.value.includes(t.absoluteIndex)&&xn(t.absoluteIndex)}function En(e){let t=wn(e);t!==null&&(J.value.includes(t.absoluteIndex)||xn(t.absoluteIndex))}let Dn=d(()=>X.value.reduce((e,t)=>t.values.reduce((e,t)=>Math.max(e,t),e),0)),On=d(()=>X.value.map(e=>L.value.scaleToAxisMax?e.values.reduce((e,t)=>Math.max(e,t),Math.max(1,e.target||0)):e.target||Dn.value||1));function kn(e,t){let n=e/t;return Number.isFinite(n*100)?n:null}let An=d(()=>X.value.map((e,t)=>{let n=Fn.value.coordinates[t];return Bn({centerX:G.value.width/2,centerY:G.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/On.value[t]})})),jn=d(()=>X.value.length),Mn=d(()=>Math.min(G.value.width,G.value.height)/3),Nn=d(()=>{let e=Number(L.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),Pn=d(()=>{let e=Number(L.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Fn=d(()=>se({plot:{x:G.value.width/2,y:G.value.height/2},radius:Mn.value,sides:jn.value,rotation:Pn.value})),In=d(()=>{let e=[];if(!Number.isFinite(L.value.grid.graduations)||L.value.grid.graduations<=0)return e;for(let t=0;t<Mn.value;t+=Mn.value/L.value.grid.graduations)e.push(t);return e}),Z=d(()=>Fn.value.coordinates.map((e,t)=>{let n=X.value[t],r=X.value[t].values.map(n=>Bn({centerX:G.value.width/2,centerY:G.value.height/2,apexX:e.x,apexY:e.y,proportion:n/On.value[t]}));return{...e,...n,plots:r}}).map(e=>{let t=Ln(e);return{...e,labelX:t.x,labelY:t.y,labelAnchor:t.anchor}}));function Ln({x:e,y:t}){let n=G.value.width/2,r=G.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),s=Number(I.value.dataLabels.offset??0),ee=20+(Number.isFinite(s)?s:0);if(!o)return{x:e,y:t,anchor:`middle`};let te=i/o,c=a/o,ne=`middle`;return te>.01?ne=`start`:te<-.01&&(ne=`end`),{x:e+te*ee,y:t+c*ee,anchor:ne}}let{autoSizeLabels:Rn}=Te({svgRef:V,fontSize:()=>I.value.dataLabels.fontSize,minFontSize:6,labelClass:`.vue-ui-radar-apex-label`});E([Z,()=>I.value.dataLabels.fontSize,()=>I.value.dataLabels.show],Rn,{flush:`post`}),He(Rn);let zn=d(()=>Y.value.map((e,t)=>oe(Z.value.map(e=>e.plots[t]),!1,!0)));function Bn({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let Q=d(()=>{let e=X.value.map((e,t)=>e.values.map(t=>t/(e.target||Dn.value)));return Y.value.map((t,n)=>{let r=de(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/X.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:J.value.includes(n)?.5:1,segregate:()=>xn(n),isSegregated:J.value.includes(n),display:`${t.name}: ${c({v:(r??0)*100,s:`%`,r:z.value.legend.roundingPercentage})}`}})}),Vn=d(()=>({cy:`radar-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,fontWeight:z.value.legend.bold?`bold`:``})),Hn=d(()=>{let e=[{name:P.value.translations.datapoint,color:``},{name:P.value.translations.target,color:``},...Q.value];return{head:e,body:Jt.value.series.map(e=>[e.name,fe(e.formatter,e.target,c({p:e.prefix,v:e.target,s:e.suffix,r:P.value.table.td.roundingValue})),...e.values.map((t,n)=>`${fe(e.formatter,t,c({p:Y.value[n]?.prefix??``,v:t,s:Y.value[n]?.suffix??``,r:P.value.table.td.roundingValue}))} (${kn(t,e.target)===null?``:c({v:kn(t,e.target)*100,s:`%`,r:P.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Un=x(null),Wn=x(null),Gn=x([]),Kn=x(null);function qn(){Pt.value=!1,Un.value=null,j.value=null,Wn.value=null,Gt.value=`pointer`,Kn.value=null,Gn.value=[],Ft.value=``}function Jn(e,t){N.value||(qn(),P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Yn(e,t){N.value||P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Xn(e,t,n=`pointer`,r=!0){if(N.value)return;Wn.value=pn.value[t],r&&P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t}),Gt.value=n,j.value=t;let i=Y.value.slice();Gn.value=[],Un.value=t,Pt.value=!0,Kn.value={datapoint:e,seriesIndex:t,series:{categories:i,datapoints:X.value,radar:Z.value},config:P.value};let a=R.value.customFormat;if(re(a)){let e=a(Kn.value);if(typeof e==`string`){Ft.value=e;return}}Ft.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!J.value.includes(t)){let n=i[t],r=e.values[t],a=(kn(r,e.target)??0)*100,o=fe(e.formatter,r,c({p:Y.value[t].prefix,v:r,s:Y.value[t].suffix,r:R.value.roundingValue}),{datapoint:e}),s=c({v:a,s:`%`,r:R.value.roundingPercentage}),ee=R.value.showValue&&R.value.showPercentage?`${o} (${s})`:R.value.showValue&&!R.value.showPercentage?o:!R.value.showValue&&R.value.showPercentage?`${s}`:``;Gn.value.push({name:n?.name??`#${t+1}`,value:a,color:n?.color,suffix:ee,prefix:``,rounding:R.value.roundingPercentage,formatter:e.formatter})}}function Zn(e=null){ze(()=>{let t=[[z.value.title.text],[z.value.title.subtitle.text],[``]],n=[[``],[P.value.translations.target],...Q.value.flatMap(e=>[[e.name],[`%`]])],r=Jt.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,kn(t,e.target)===null?``:kn(t,e.target)*100])]),i=t.concat([n]).concat(r),a=ne(i);e?e(a):me({csvContent:a,title:z.value.title.text||`vue-ui-radar`})})}let $=x(!1);function Qn(e){$.value=e,It.value+=1}function $n(){W.value.showTable=!W.value.showTable}function er(){W.value.showTooltip=!W.value.showTooltip}let tr=x(!1);function nr(){tr.value=!tr.value}let rr=te(A,()=>z.value.title.text),ir=d(()=>ee({config:P,style:z,mutableConfig:W,dialog:At,accordion:Tt,isFullscreen:$,parent:A,maxWidth:800,isCursorPointer:B}));E([()=>W.value.showTable,Ht,()=>P.value.table.useDialog],([e])=>{Ht.value&&s(e,P,Ht)},{flush:`post`});function ar(){W.value.showTable=!1,Ut.value&&Ut.value.setTableIconState(!1)}let or=d(()=>Q.value.map(e=>({...e,name:e.display}))),sr=d(()=>z.value.backgroundColor),cr=d(()=>z.value.legend),lr=d(()=>z.value.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=Ce({svg:V,title:lr,legend:cr,legendItems:or,backgroundColor:sr,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:cn});async function mr(){mn(`copyAlt`,{config:P.value,dataset:Z.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:Z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function hr(){qn(),Kt.value=!0}function gr(){qn(),Kt.value=!1}function _r(e){if(!Number.isFinite(e)||!V.value)return;let t=Z.value[e];if(!t)return;let n=V.value.getBoundingClientRect();Wt.value={x:n.left+t.labelX/G.value.width*n.width,y:n.top+t.labelY/G.value.height*n.height}}function vr(e){if(!V.value||tr.value||N.value||document.activeElement!==V.value||!Z.value.length)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){qn();return}if(r){if(j.value===null)return;let e=Z.value[j.value];if(!e)return;Yn(e,j.value);return}let a=j.value;a===null||a<0||a>=Z.value.length?a=n?0:Z.value.length-1:n?(a+=1,a>=Z.value.length&&(a=0)):t&&(--a,a<0&&(a=Z.value.length-1));let o=Z.value[a];o&&(j.value=a,_r(a),Xn(o,a,`keyboard`))}E([Z,pn,Y,J,R,()=>P.value],()=>{if(Wn.value===null)return;let e=pn.value.indexOf(Wn.value);N.value||e<0?qn():(Gt.value===`keyboard`&&_r(e),Xn(Z.value[e],e,Gt.value,!1))},{flush:`post`});let yr=d(()=>({headers:Hn.value?.colNames?.map(e=>e.name??e)??[],rows:Hn.value?.body??[]}));return Ne({getData:Sn,getImage:rr,generatePdf:sn,generateCsv:Zn,generateImage:cn,generateSvg:fr,hideSeries:En,showSeries:Tn,toggleTable:$n,toggleTooltip:er,toggleAnnotator:nr,toggleFullscreen:Qn,copyAlt:mr}),(e,s)=>(b(),m(`div`,{class:Be(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:A,id:`vue-ui-radar_${k.value}`,style:y(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height: 100%;`:``} text-align:center;background:${z.value.backgroundColor}`),onMouseenter:s[2]||=()=>Zt(!0),onMouseleave:s[3]||=()=>Zt(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,qe),P.value.a11y.includeTable&&yr.value?.rows?.length?(b(),f(Ae,{key:0,uid:k.value,head:yr.value.headers,body:yr.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),F.value.buttons.annotator?(b(),f(T(Dt),Re({key:1},T(a)(F.value.annotator),{svgRef:T(V),backgroundColor:z.value.backgroundColor,color:z.value.color,active:tr.value,isCursorPointer:B.value,palette:F.value.annotatorPalette,onClose:nr}),Fe({_:2},[S(T(o),t=>({name:t,fn:D(n=>[C(e.$slots,t,v(_(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),ln.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:Bt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),z.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Lt,style:`width:100%;background:transparent;padding-bottom:12px`},[Le(Ee,{config:{title:{cy:`radar-div-title`,...z.value.title},subtitle:{cy:`radar-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`])],512)):p(``,!0),h(`div`,{id:`legend-top-${k.value}`},null,8,Je),F.value.show&&Mt.value&&(Xt.value||Yt.value)?(b(),f(T(Ot),Re({ref_key:`userOptionsRef`,ref:Ut,key:`user_options_${It.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isImaging:T(on),isPrinting:T(an),uid:k.value,hasTooltip:F.value.buttons.tooltip&&R.value.show,isFullscreen:$.value,isTooltip:W.value.showTooltip,chartElement:A.value},T(n)(F.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:tr.value,tableDialog:P.value.table.useDialog,isCursorPointer:B.value,onToggleFullscreen:Qn,onGeneratePdf:T(sn),onGenerateCsv:Zn,onGenerateImage:T(pr),onGenerateSvg:T(fr),onToggleTable:$n,onToggleTooltip:er,onToggleAnnotator:nr,onCopyAlt:mr,style:{visibility:Xt.value?Yt.value?`visible`:`hidden`:`visible`}}),Fe({_:2},[S(T(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(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`,Ye,[(b(),m(`svg`,{ref_key:`svgRef`,ref:V,xmlns:T(he),"aria-describedby":`chart-instructions-${k.value}`,class:Be({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${z.value.color}`),tabindex:`0`,onFocus:hr,onBlur:gr,onKeydown:vr},[Le(T(kt)),C(e.$slots,`svg-underlayer`,{svg:{...G.value,outerPolygon:Fn.value,isPrintingImg:T(an)||T(on)||T(ur),isPrintingSvg:T(dr)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,Ze)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),f(Me,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${k.value}_${t}`,key:`radar_gradient_${k.value}_${t}`,stops:[[`0%`,T(ae)(T(ue)(e.color,.05),L.value.dataPolygon.opacity),1],[`100%`,T(ae)(e.color,L.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),L.value.grid.show?(b(),m(`g`,Qe,[(b(!0),m(u,null,S(Z.value,e=>(b(),m(`line`,{x1:G.value.width/2,y1:G.value.height/2,x2:e.x,y2:e.y,stroke:L.value.grid.stroke,"stroke-width":L.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,$e))),256)),L.value.grid.graduations>0?(b(),m(`g`,et,[(b(!0),m(u,null,S(In.value,e=>(b(),m(`path`,{d:T(se)({plot:{x:G.value.width/2,y:G.value.height/2},radius:e,sides:jn.value,rotation:Pn.value}).path,fill:`none`,stroke:L.value.grid.stroke,"stroke-width":L.value.grid.strokeWidth},null,8,tt))),256))])):p(``,!0)])):p(``,!0),h(`path`,{d:Fn.value.path,fill:`none`,stroke:L.value.outerPolygon.stroke,"stroke-width":L.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,nt),I.value.dataLabels.show?(b(),m(`g`,rt,[(b(!0),m(u,null,S(Z.value,(e,t)=>(b(),m(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":I.value.dataLabels.fontSize,fill:I.value.dataLabels.color,onMouseenter:n=>Xn(e,t,`pointer`),onMouseleave:n=>Jn(e,t),onClick:n=>Yn(e,t)},w(e.name),41,it))),256))])):p(``,!0),(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`g`,null,[h(`g`,null,[P.value.useCssAnimation||!P.value.useCssAnimation&&!J.value.includes(t)?(b(),m(`polygon`,{key:0,points:zn.value[t],stroke:z.value.backgroundColor,"stroke-width":L.value.dataPolygon.strokeWidth+1,fill:`none`,class:Be({"animated-out":J.value.includes(t)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===t&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,at)):p(``,!0),P.value.useCssAnimation||!P.value.useCssAnimation&&!J.value.includes(t)?(b(),m(`polygon`,{key:1,points:zn.value[t],stroke:e.color,"stroke-width":L.value.dataPolygon.strokeWidth,fill:L.value.dataPolygon.transparent?`transparent`:L.value.dataPolygon.useGradient?`url(#radar_gradient_${k.value}_${t})`:T(ae)(e.color,L.value.dataPolygon.opacity),class:Be({"animated-out":J.value.includes(t)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===t&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ot)):p(``,!0)])]))),256)),L.value.targetReference.show?(b(),m(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${T(oe)(An.value,!1,!0)}Z`,fill:`none`,stroke:L.value.targetReference.stroke,"stroke-width":L.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":L.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,st)):p(``,!0),L.value.plots.show?(b(),m(`g`,ct,[(b(!0),m(u,null,S(Z.value,(e,t)=>(b(),m(`g`,{key:`radar-category-${t}`},[(b(!0),m(u,null,S(e.plots,(n,r)=>(b(),m(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!J.value.includes(r)&&Xn(e,t,`pointer`),onMouseleave:n=>!J.value.includes(r)&&Jn(e,t),onClick:n=>!J.value.includes(r)&&Yn(e,t)},[h(`circle`,{cx:n.x,cy:n.y,r:Nn.value,fill:`transparent`,stroke:`transparent`,style:y({pointerEvents:J.value.includes(r)?`none`:`all`})},null,12,ut),h(`circle`,{cx:n.x,cy:n.y,fill:J.value.includes(r)?`transparent`:Y.value[r]?Y.value[r].color:`transparent`,r:Un.value!==null&&Un.value===t?L.value.plots.radius*1.6:L.value.plots.radius,stroke:J.value.includes(r)?`transparent`:z.value.backgroundColor,"stroke-width":.5,class:Be({"animated-out":J.value.includes(r)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===r&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,dt)],40,lt))),128))]))),128))])):p(``,!0),C(e.$slots,`svg`,{svg:{...G.value,outerPolygon:Fn.value,isPrintingImg:T(an)||T(on)||T(ur),isPrintingSvg:T(dr)}},void 0,!0)],46,Xe)),e.$slots.hint?(b(),m(`div`,ft,[C(e.$slots,`hint`,v(_({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,pt,[C(e.$slots,`watermark`,v(_({isPrinting:T(an)||T(on)||T(ur)||T(dr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${k.value}`},null,8,mt),Vt.value&&(z.value.legend.show||e.$slots.legend)?(b(),f(Pe,{key:6,to:z.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Rt},[C(e.$slots,`legend`,{legend:Q.value},()=>[z.value.legend.show?(b(),f(De,{key:0,legendSet:Q.value,config:Vn.value,isCursorPointer:B.value,onClickMarker:s[0]||=({i:e})=>xn(e)},Fe({item:D(({legend:e,index:t})=>[N.value?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>e.segregate(),style:y(`opacity:${J.value.includes(t)?.5:1}`)},w(e.display),13,ht))]),legendToggle:D(()=>[Q.value.length>2&&z.value.legend.selectAllToggle.show&&!N.value?(b(),f(je,{key:0,backgroundColor:z.value.legend.selectAllToggle.backgroundColor,color:z.value.legend.selectAllToggle.color,fontSize:z.value.legend.fontSize,checked:J.value.length>0,isCursorPointer:B.value,onToggle:_n},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[L.value.targetReference.show&&L.value.targetReference.showInLegend?{name:`after`,fn:D(()=>[h(`div`,gt,[h(`div`,{style:y({display:`flex`,height:z.value.legend.fontSize})},[(b(),m(`svg`,{style:y({width:z.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[h(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:L.value.targetReference.stroke,"stroke-width":L.value.targetReference.strokeWidth*.7,"stroke-dasharray":L.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,_t)],4))],4),h(`span`,null,w(L.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:7,ref_key:`source`,ref:zt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Le(T(St),{teleportTo:R.value.teleportTo,show:W.value.showTooltip&&Pt.value,backgroundColor:R.value.backgroundColor,color:R.value.color,borderRadius:R.value.borderRadius,borderColor:R.value.borderColor,borderWidth:R.value.borderWidth,backgroundOpacity:R.value.backgroundOpacity,fontSize:R.value.fontSize,position:R.value.position,offsetX:R.value.offsetX,offsetY:R.value.offsetY,parent:A.value,content:Ft.value,isFullscreen:$.value,isCustom:R.value.customFormat&&typeof R.value.customFormat==`function`,smooth:R.value.smooth,backdropFilter:R.value.backdropFilter,smoothForce:R.value.smoothForce,smoothSnapThreshold:R.value.smoothSnapThreshold,isA11yMode:Gt.value===`keyboard`,a11yPosition:Wt.value},{"tooltip-before":D(()=>[C(e.$slots,`tooltip-before`,v(_({...Kn.value})),void 0,!0)]),tooltip:D(()=>[C(e.$slots,`tooltip`,v(_({...Kn.value})),void 0,!0)]),"tooltip-after":D(()=>[![`function`].includes(typeof R.value.customFormat)&&!e.$slots.tooltip?(b(),m(`div`,vt,[Le(T(wt),{dataset:Gn.value,config:dn.value,backgroundOpacity:0},{"data-label":D(({bar:e})=>[h(`div`,yt,[h(`span`,bt,w(e.name+(R.value.showValue||R.value.showPercentage?`:`:``)),1),R.value.showValue||R.value.showPercentage?(b(),m(`span`,xt,w(e.suffix),1)):p(``,!0)])]),_:1},8,[`dataset`,`config`])])):p(``,!0),C(e.$slots,`tooltip-after`,v(_({...Kn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),!N.value&&Mt.value&&F.value.buttons.table?(b(),f(Ue(ir.value.component),Re({key:8},ir.value.props,{ref_key:`tableUnit`,ref:Ht,onClose:ar}),Fe({content:D(()=>[Le(T(Et),{colNames:Hn.value.colNames,head:Hn.value.head,body:Hn.value.body,config:Hn.value.config,title:P.value.table.useDialog?``:ir.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:B.value,onClose:ar},{th:D(({th:e})=>[Ie(w(e.name),1)]),td:D(({td:e})=>[Ie(w(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[P.value.table.useDialog?{name:`title`,fn:D(()=>[Ie(w(ir.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:D(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Zn(F.value.callbacks.csv),style:y({cursor:B.value?`pointer`:`default`})},[Le(T(Ct),{name:`fileCsv`,stroke:ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[N.value?(b(),f(ke,{key:0})):p(``,!0)],!0)],46,Ke))}},[[`__scopeId`,`data-v-968e4534`]]);export{Ge as n,St as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as 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{$ as c,D as ne,Dt as re,Ht as ie,Jt as ae,Lt as oe,M as se,S as ce,X as le,Yt as ue,at as l,b as de,i as fe,in as pe,nt as me,t as he,w as ge,yt as _e}from"./lib-rPeBMZrn.js";import{n as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useConfig-CXhXxWjB.js";import{n as be}from"./resolveChartConfig-0IvbmIE_.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{t as we}from"./useChartAccessibility-DOMuYJfm.js";import{t as Te}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./Legend-W9YVYVX-.js";import{t as Oe}from"./vue_ui_radar-BujJL_m0.js";import{t as ke}from"./BaseScanner-m6QR9rwD.js";import{t as Ae}from"./A11yDataTable-DWNlWXzs.js";import{t as je}from"./BaseLegendToggle-VzX69MCo.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as Pe,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Fe,createTextVNode as Ie,createVNode as Le,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ve,onMounted as He,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Ue,shallowRef as We,toDisplayString as w,unref as T,watch as E,withCtx as D}from"vue";var Ge=/* @__PURE__ */ e({default:()=>St}),Ke=[`id`],qe=[`id`],Je=[`id`],Ye={style:{position:`relative`}},Xe=[`xmlns`,`aria-describedby`,`viewBox`],Ze=[`width`,`height`],Qe={key:1},$e=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],et={key:0,style:{"pointer-events":`none`}},tt=[`d`,`stroke`,`stroke-width`],nt=[`d`,`stroke`,`stroke-width`],rt={key:2},it=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`points`,`stroke`,`stroke-width`],ot=[`points`,`stroke`,`stroke-width`,`fill`],st=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ct={key:4},lt=[`onMouseenter`,`onMouseleave`,`onClick`],ut=[`cx`,`cy`,`r`],dt=[`cx`,`cy`,`fill`,`r`,`stroke`],ft={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},pt={key:5,class:`vue-data-ui-watermark`},mt=[`id`],ht=[`onClick`],gt={class:`vue-data-ui-legend-item`},_t=[`stroke`,`stroke-width`,`stroke-dasharray`],vt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},yt={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},bt={class:`vue-ui-radar-tooltip-datalabel-name`},xt={key:0},St=/*#__PURE__*/ Ne({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Ne,emit:Ge}){let St=g(()=>import(`./Tooltip-B432XpvC.js`)),Ct=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),wt=g(()=>import(`./vue-ui-sparkbar-CCjgG6pR.js`).then(e=>e.n)),Tt=g(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),Et=g(()=>import(`./DataTable-KeuZB1JM.js`)),Dt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ot=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),kt=g(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),At=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_radar:jt}=ye(),O=e,Mt=d(()=>Nt(O.dataset));function Nt(e){return Array.isArray(e?.categories)&&e.categories.length>0&&Array.from(e.categories,e=>e&&Object.keys(e).includes(`name`)).every(Boolean)&&Array.isArray(e.series)&&e.series.length>0&&Array.from(e.series,t=>t&&Object.keys(t).includes(`name`)&&Array.isArray(t.values)&&t.values.length===e.categories.length&&Array.from(t.values,Number.isFinite).every(Boolean)&&(t.target===void 0||Number.isFinite(t.target))).every(Boolean)}let k=x(le()),Pt=x(!1),Ft=x(``),It=x(0),A=x(null),Lt=x(null),Rt=x(null),zt=x(null),Bt=x(null),Vt=x(!1),Ht=x(null),Ut=x(null),j=x(null),Wt=x({x:0,y:0}),Gt=x(`pointer`),Kt=x(!1),M=x(Qt());E(()=>O.config,()=>{M.value=Qt()},{deep:!0});let N=d(()=>!!O.config.loading||!Mt.value),P=d(()=>N.value?pe({defaultConfig:M.value,userConfig:qt.value}):M.value),qt=d(()=>pe({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),F=d(()=>P.value.userOptions),I=d(()=>P.value.style.chart.layout.labels),L=d(()=>P.value.style.chart.layout),R=d(()=>P.value.style.chart.tooltip),z=d(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>O.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let B=d(()=>P.value.userOptions.useCursorPointer),Jt=d(()=>N.value?Nt(O.config.skeletonDataset)?O.config.skeletonDataset:{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]}:O.dataset),Yt=x(!P.value.userOptions.showOnChartHover),Xt=d(()=>P.value.userOptions.keepStateOnChartLeave);function Zt(e=!1){P.value.userOptions.showOnChartHover&&(Yt.value=e)}E(()=>P.value.userOptions.showOnChartHover,e=>{Yt.value=!e});let{svgRef:V}=we({config:z.value.title});function Qt(){return be(O.config,jt,Oe)}let $t=We(null),en=We(null),H=null,tn=!1,U=d(()=>M.value.debug);function nn(){$t.value?.disconnect(),$t.value=null,H!==null&&cancelAnimationFrame(H),H=null}function rn(){if(nn(),en.value=null,!P.value.responsive||!A.value?.parentNode)return;let e=new ResizeObserver(t);function t(){tn||$t.value!==e||(H!==null&&cancelAnimationFrame(H),H=requestAnimationFrame(()=>{if(tn||$t.value!==e)return;H=null;let{width:t,height:n}=Se({chart:A.value,title:z.value.title.text?Lt.value:null,legend:z.value.legend.show?Rt.value:null,source:zt.value,noTitle:Bt.value});en.value={width:Math.max(.1,t),height:Math.max(.1,n)}}))}$t.value=e;for(let t of[A.value.parentNode,Lt.value,Rt.value,zt.value,Bt.value])t&&e.observe(t);t()}E([()=>P.value.responsive,Lt,Rt,zt,Bt,()=>z.value.title.text,()=>z.value.legend.show,()=>z.value.legend.position],rn,{flush:`post`}),He(()=>{Vt.value=!0,rn()}),Ve(()=>{tn=!0,nn(),bn()});let{isPrinting:an,isImaging:on,generatePdf:sn,generateImage:cn}=xe({elementId:`vue-ui-radar_${k.value}`,fileName:z.value.title.text||`vue-ui-radar`,options:P.value.userOptions.print}),ln=d(()=>P.value.userOptions.show&&!z.value.title.text),un=d(()=>ge(P.value.customPalette)),W=x({showTable:M.value.table.show,showTooltip:M.value.style.chart.tooltip.show});E(()=>M.value.table.show,e=>{W.value.showTable=e}),E(()=>M.value.style.chart.tooltip.show,e=>{W.value.showTooltip=e});let dn=d(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:R.value.animation.show,animationFrames:R.value.animation.animationFrames},labels:{fontSize:R.value.fontSize,name:{color:R.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),G=d(()=>en.value??{height:312,width:512});function fn(e){let t=/* @__PURE__ */ new Map;return e.map(e=>{let n=e.name,r=t.get(n)??0;return t.set(n,r+1),JSON.stringify([n,r])})}let K=d(()=>fn(Y.value)),pn=d(()=>fn(X.value)),mn=Ge,q=x([]),J=d(()=>K.value.flatMap((e,t)=>q.value.includes(e)?[t]:[])),hn=x(null),gn=x(!1);function _n(){N.value||(bn(),q.value=J.value.length?[]:K.value.slice(),vn())}function vn(){mn(`selectLegend`,Q.value.filter((e,t)=>!J.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}let yn=null;function bn(){yn!==null&&clearTimeout(yn),yn=null,gn.value=!1,hn.value=null}function xn(e){if(N.value||!K.value[e])return;bn();let t=K.value[e],n=q.value.includes(t);q.value=n?q.value.filter(e=>e!==t):[...q.value,t],P.value.useCssAnimation&&(gn.value=!0,n&&(hn.value=e),yn=setTimeout(bn,500)),vn()}function Sn(){return Q.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function Cn(){let e=O.dataset;[null,void 0].includes(e?.categories)?(l({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:U.value})):(Array.isArray(e.categories)?e.categories.length===0?l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:U.value}):U.value&&Array.from(e.categories).forEach((e,t)=>{_e({datasetObject:e??{},requiredAttributes:[`name`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}):U.value&&console.warn(`VueUiRadar: dataset.categories must be an array.`),[null,void 0].includes(e?.series)?l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target?: number}[])`,debug:U.value}):Array.isArray(e.series)?(e.series.length===0&&l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`series`,debug:U.value}),U.value&&Array.from(e.series).forEach((t,n)=>{_e({datasetObject:t??{},requiredAttributes:[`name`,`values`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:n})}),Array.isArray(t?.values)?(t.values.length!==e.categories?.length&&console.warn(`VueUiRadar: dataset.series[${n}].values must contain one value per category.`),Array.from(t.values).forEach((e,t)=>{Number.isFinite(e)||console.warn(`VueUiRadar: dataset.series[${n}].values[${t}] must be a finite number.`)})):t&&Object.keys(t).includes(`values`)&&console.warn(`VueUiRadar: dataset.series[${n}].values must be an array.`),t?.target!==void 0&&!Number.isFinite(t.target)&&console.warn(`VueUiRadar: dataset.series[${n}].target must be a finite number.`)})):U.value&&console.warn(`VueUiRadar: dataset.series must be an array.`))}E([()=>O.dataset,U],()=>Cn(),{deep:!0,immediate:!0});let Y=d(()=>{let e=Array.isArray(Jt.value?.categories)?Jt.value.categories:[],t=un.value??ie;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${k.value}_${n}`,color:ce(e?.color)||t[n]||ie[n%ie.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),X=d(()=>Jt.value.series.map((e,t)=>({...e,color:ce(e.color)||un.value[t]||ie[t]||ie[t%ie.length],serieId:`radar_serie_${k.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));E([K,()=>P.value.useCssAnimation],()=>{bn(),N.value||(q.value=q.value.filter(e=>K.value.includes(e)))});function wn(e){return X.value.length?Q.value.find(t=>t.name===e)||(U.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(U.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function Tn(e){let t=wn(e);t!==null&&J.value.includes(t.absoluteIndex)&&xn(t.absoluteIndex)}function En(e){let t=wn(e);t!==null&&(J.value.includes(t.absoluteIndex)||xn(t.absoluteIndex))}let Dn=d(()=>X.value.reduce((e,t)=>t.values.reduce((e,t)=>Math.max(e,t),e),0)),On=d(()=>X.value.map(e=>L.value.scaleToAxisMax?e.values.reduce((e,t)=>Math.max(e,t),Math.max(1,e.target||0)):e.target||Dn.value||1));function kn(e,t){let n=e/t;return Number.isFinite(n*100)?n:null}let An=d(()=>X.value.map((e,t)=>{let n=Fn.value.coordinates[t];return Bn({centerX:G.value.width/2,centerY:G.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/On.value[t]})})),jn=d(()=>X.value.length),Mn=d(()=>Math.min(G.value.width,G.value.height)/3),Nn=d(()=>{let e=Number(L.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),Pn=d(()=>{let e=Number(L.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Fn=d(()=>se({plot:{x:G.value.width/2,y:G.value.height/2},radius:Mn.value,sides:jn.value,rotation:Pn.value})),In=d(()=>{let e=[];if(!Number.isFinite(L.value.grid.graduations)||L.value.grid.graduations<=0)return e;for(let t=0;t<Mn.value;t+=Mn.value/L.value.grid.graduations)e.push(t);return e}),Z=d(()=>Fn.value.coordinates.map((e,t)=>{let n=X.value[t],r=X.value[t].values.map(n=>Bn({centerX:G.value.width/2,centerY:G.value.height/2,apexX:e.x,apexY:e.y,proportion:n/On.value[t]}));return{...e,...n,plots:r}}).map(e=>{let t=Ln(e);return{...e,labelX:t.x,labelY:t.y,labelAnchor:t.anchor}}));function Ln({x:e,y:t}){let n=G.value.width/2,r=G.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),s=Number(I.value.dataLabels.offset??0),ee=20+(Number.isFinite(s)?s:0);if(!o)return{x:e,y:t,anchor:`middle`};let te=i/o,c=a/o,ne=`middle`;return te>.01?ne=`start`:te<-.01&&(ne=`end`),{x:e+te*ee,y:t+c*ee,anchor:ne}}let{autoSizeLabels:Rn}=Te({svgRef:V,fontSize:()=>I.value.dataLabels.fontSize,minFontSize:6,labelClass:`.vue-ui-radar-apex-label`});E([Z,()=>I.value.dataLabels.fontSize,()=>I.value.dataLabels.show],Rn,{flush:`post`}),He(Rn);let zn=d(()=>Y.value.map((e,t)=>oe(Z.value.map(e=>e.plots[t]),!1,!0)));function Bn({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let Q=d(()=>{let e=X.value.map((e,t)=>e.values.map(t=>t/(e.target||Dn.value)));return Y.value.map((t,n)=>{let r=de(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/X.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:J.value.includes(n)?.5:1,segregate:()=>xn(n),isSegregated:J.value.includes(n),display:`${t.name}: ${c({v:(r??0)*100,s:`%`,r:z.value.legend.roundingPercentage})}`}})}),Vn=d(()=>({cy:`radar-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,fontWeight:z.value.legend.bold?`bold`:``})),Hn=d(()=>{let e=[{name:P.value.translations.datapoint,color:``},{name:P.value.translations.target,color:``},...Q.value];return{head:e,body:Jt.value.series.map(e=>[e.name,fe(e.formatter,e.target,c({p:e.prefix,v:e.target,s:e.suffix,r:P.value.table.td.roundingValue})),...e.values.map((t,n)=>`${fe(e.formatter,t,c({p:Y.value[n]?.prefix??``,v:t,s:Y.value[n]?.suffix??``,r:P.value.table.td.roundingValue}))} (${kn(t,e.target)===null?``:c({v:kn(t,e.target)*100,s:`%`,r:P.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Un=x(null),Wn=x(null),Gn=x([]),Kn=x(null);function qn(){Pt.value=!1,Un.value=null,j.value=null,Wn.value=null,Gt.value=`pointer`,Kn.value=null,Gn.value=[],Ft.value=``}function Jn(e,t){N.value||(qn(),P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Yn(e,t){N.value||P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Xn(e,t,n=`pointer`,r=!0){if(N.value)return;Wn.value=pn.value[t],r&&P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t}),Gt.value=n,j.value=t;let i=Y.value.slice();Gn.value=[],Un.value=t,Pt.value=!0,Kn.value={datapoint:e,seriesIndex:t,series:{categories:i,datapoints:X.value,radar:Z.value},config:P.value};let a=R.value.customFormat;if(re(a)){let e=a(Kn.value);if(typeof e==`string`){Ft.value=e;return}}Ft.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!J.value.includes(t)){let n=i[t],r=e.values[t],a=(kn(r,e.target)??0)*100,o=fe(e.formatter,r,c({p:Y.value[t].prefix,v:r,s:Y.value[t].suffix,r:R.value.roundingValue}),{datapoint:e}),s=c({v:a,s:`%`,r:R.value.roundingPercentage}),ee=R.value.showValue&&R.value.showPercentage?`${o} (${s})`:R.value.showValue&&!R.value.showPercentage?o:!R.value.showValue&&R.value.showPercentage?`${s}`:``;Gn.value.push({name:n?.name??`#${t+1}`,value:a,color:n?.color,suffix:ee,prefix:``,rounding:R.value.roundingPercentage,formatter:e.formatter})}}function Zn(e=null){ze(()=>{let t=[[z.value.title.text],[z.value.title.subtitle.text],[``]],n=[[``],[P.value.translations.target],...Q.value.flatMap(e=>[[e.name],[`%`]])],r=Jt.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,kn(t,e.target)===null?``:kn(t,e.target)*100])]),i=t.concat([n]).concat(r),a=ne(i);e?e(a):me({csvContent:a,title:z.value.title.text||`vue-ui-radar`})})}let $=x(!1);function Qn(e){$.value=e,It.value+=1}function $n(){W.value.showTable=!W.value.showTable}function er(){W.value.showTooltip=!W.value.showTooltip}let tr=x(!1);function nr(){tr.value=!tr.value}let rr=te(A,()=>z.value.title.text),ir=d(()=>ee({config:P,style:z,mutableConfig:W,dialog:At,accordion:Tt,isFullscreen:$,parent:A,maxWidth:800,isCursorPointer:B}));E([()=>W.value.showTable,Ht,()=>P.value.table.useDialog],([e])=>{Ht.value&&s(e,P,Ht)},{flush:`post`});function ar(){W.value.showTable=!1,Ut.value&&Ut.value.setTableIconState(!1)}let or=d(()=>Q.value.map(e=>({...e,name:e.display}))),sr=d(()=>z.value.backgroundColor),cr=d(()=>z.value.legend),lr=d(()=>z.value.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=Ce({svg:V,title:lr,legend:cr,legendItems:or,backgroundColor:sr,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:cn});async function mr(){mn(`copyAlt`,{config:P.value,dataset:Z.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:Z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function hr(){qn(),Kt.value=!0}function gr(){qn(),Kt.value=!1}function _r(e){if(!Number.isFinite(e)||!V.value)return;let t=Z.value[e];if(!t)return;let n=V.value.getBoundingClientRect();Wt.value={x:n.left+t.labelX/G.value.width*n.width,y:n.top+t.labelY/G.value.height*n.height}}function vr(e){if(!V.value||tr.value||N.value||document.activeElement!==V.value||!Z.value.length)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){qn();return}if(r){if(j.value===null)return;let e=Z.value[j.value];if(!e)return;Yn(e,j.value);return}let a=j.value;a===null||a<0||a>=Z.value.length?a=n?0:Z.value.length-1:n?(a+=1,a>=Z.value.length&&(a=0)):t&&(--a,a<0&&(a=Z.value.length-1));let o=Z.value[a];o&&(j.value=a,_r(a),Xn(o,a,`keyboard`))}E([Z,pn,Y,J,R,()=>P.value],()=>{if(Wn.value===null)return;let e=pn.value.indexOf(Wn.value);N.value||e<0?qn():(Gt.value===`keyboard`&&_r(e),Xn(Z.value[e],e,Gt.value,!1))},{flush:`post`});let yr=d(()=>({headers:Hn.value?.colNames?.map(e=>e.name??e)??[],rows:Hn.value?.body??[]}));return Ne({getData:Sn,getImage:rr,generatePdf:sn,generateCsv:Zn,generateImage:cn,generateSvg:fr,hideSeries:En,showSeries:Tn,toggleTable:$n,toggleTooltip:er,toggleAnnotator:nr,toggleFullscreen:Qn,copyAlt:mr}),(e,s)=>(b(),m(`div`,{class:Be(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:A,id:`vue-ui-radar_${k.value}`,style:y(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height: 100%;`:``} text-align:center;background:${z.value.backgroundColor}`),onMouseenter:s[2]||=()=>Zt(!0),onMouseleave:s[3]||=()=>Zt(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,qe),P.value.a11y.includeTable&&yr.value?.rows?.length?(b(),f(Ae,{key:0,uid:k.value,head:yr.value.headers,body:yr.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),F.value.buttons.annotator?(b(),f(T(Dt),Re({key:1},T(a)(F.value.annotator),{svgRef:T(V),backgroundColor:z.value.backgroundColor,color:z.value.color,active:tr.value,isCursorPointer:B.value,palette:F.value.annotatorPalette,onClose:nr}),Fe({_:2},[S(T(o),t=>({name:t,fn:D(n=>[C(e.$slots,t,v(_(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),ln.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:Bt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),z.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Lt,style:`width:100%;background:transparent;padding-bottom:12px`},[Le(Ee,{config:{title:{cy:`radar-div-title`,...z.value.title},subtitle:{cy:`radar-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`])],512)):p(``,!0),h(`div`,{id:`legend-top-${k.value}`},null,8,Je),F.value.show&&Mt.value&&(Xt.value||Yt.value)?(b(),f(T(Ot),Re({ref_key:`userOptionsRef`,ref:Ut,key:`user_options_${It.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isImaging:T(on),isPrinting:T(an),uid:k.value,hasTooltip:F.value.buttons.tooltip&&R.value.show,isFullscreen:$.value,isTooltip:W.value.showTooltip,chartElement:A.value},T(n)(F.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:tr.value,tableDialog:P.value.table.useDialog,isCursorPointer:B.value,onToggleFullscreen:Qn,onGeneratePdf:T(sn),onGenerateCsv:Zn,onGenerateImage:T(pr),onGenerateSvg:T(fr),onToggleTable:$n,onToggleTooltip:er,onToggleAnnotator:nr,onCopyAlt:mr,style:{visibility:Xt.value?Yt.value?`visible`:`hidden`:`visible`}}),Fe({_:2},[S(T(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(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`,Ye,[(b(),m(`svg`,{ref_key:`svgRef`,ref:V,xmlns:T(he),"aria-describedby":`chart-instructions-${k.value}`,class:Be({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${z.value.color}`),tabindex:`0`,onFocus:hr,onBlur:gr,onKeydown:vr},[Le(T(kt)),C(e.$slots,`svg-underlayer`,{svg:{...G.value,outerPolygon:Fn.value,isPrintingImg:T(an)||T(on)||T(ur),isPrintingSvg:T(dr)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,Ze)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),f(Me,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${k.value}_${t}`,key:`radar_gradient_${k.value}_${t}`,stops:[[`0%`,T(ae)(T(ue)(e.color,.05),L.value.dataPolygon.opacity),1],[`100%`,T(ae)(e.color,L.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),L.value.grid.show?(b(),m(`g`,Qe,[(b(!0),m(u,null,S(Z.value,e=>(b(),m(`line`,{x1:G.value.width/2,y1:G.value.height/2,x2:e.x,y2:e.y,stroke:L.value.grid.stroke,"stroke-width":L.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,$e))),256)),L.value.grid.graduations>0?(b(),m(`g`,et,[(b(!0),m(u,null,S(In.value,e=>(b(),m(`path`,{d:T(se)({plot:{x:G.value.width/2,y:G.value.height/2},radius:e,sides:jn.value,rotation:Pn.value}).path,fill:`none`,stroke:L.value.grid.stroke,"stroke-width":L.value.grid.strokeWidth},null,8,tt))),256))])):p(``,!0)])):p(``,!0),h(`path`,{d:Fn.value.path,fill:`none`,stroke:L.value.outerPolygon.stroke,"stroke-width":L.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,nt),I.value.dataLabels.show?(b(),m(`g`,rt,[(b(!0),m(u,null,S(Z.value,(e,t)=>(b(),m(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":I.value.dataLabels.fontSize,fill:I.value.dataLabels.color,onMouseenter:n=>Xn(e,t,`pointer`),onMouseleave:n=>Jn(e,t),onClick:n=>Yn(e,t)},w(e.name),41,it))),256))])):p(``,!0),(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`g`,null,[h(`g`,null,[P.value.useCssAnimation||!P.value.useCssAnimation&&!J.value.includes(t)?(b(),m(`polygon`,{key:0,points:zn.value[t],stroke:z.value.backgroundColor,"stroke-width":L.value.dataPolygon.strokeWidth+1,fill:`none`,class:Be({"animated-out":J.value.includes(t)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===t&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,at)):p(``,!0),P.value.useCssAnimation||!P.value.useCssAnimation&&!J.value.includes(t)?(b(),m(`polygon`,{key:1,points:zn.value[t],stroke:e.color,"stroke-width":L.value.dataPolygon.strokeWidth,fill:L.value.dataPolygon.transparent?`transparent`:L.value.dataPolygon.useGradient?`url(#radar_gradient_${k.value}_${t})`:T(ae)(e.color,L.value.dataPolygon.opacity),class:Be({"animated-out":J.value.includes(t)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===t&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ot)):p(``,!0)])]))),256)),L.value.targetReference.show?(b(),m(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${T(oe)(An.value,!1,!0)}Z`,fill:`none`,stroke:L.value.targetReference.stroke,"stroke-width":L.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":L.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,st)):p(``,!0),L.value.plots.show?(b(),m(`g`,ct,[(b(!0),m(u,null,S(Z.value,(e,t)=>(b(),m(`g`,{key:`radar-category-${t}`},[(b(!0),m(u,null,S(e.plots,(n,r)=>(b(),m(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!J.value.includes(r)&&Xn(e,t,`pointer`),onMouseleave:n=>!J.value.includes(r)&&Jn(e,t),onClick:n=>!J.value.includes(r)&&Yn(e,t)},[h(`circle`,{cx:n.x,cy:n.y,r:Nn.value,fill:`transparent`,stroke:`transparent`,style:y({pointerEvents:J.value.includes(r)?`none`:`all`})},null,12,ut),h(`circle`,{cx:n.x,cy:n.y,fill:J.value.includes(r)?`transparent`:Y.value[r]?Y.value[r].color:`transparent`,r:Un.value!==null&&Un.value===t?L.value.plots.radius*1.6:L.value.plots.radius,stroke:J.value.includes(r)?`transparent`:z.value.backgroundColor,"stroke-width":.5,class:Be({"animated-out":J.value.includes(r)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===r&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,dt)],40,lt))),128))]))),128))])):p(``,!0),C(e.$slots,`svg`,{svg:{...G.value,outerPolygon:Fn.value,isPrintingImg:T(an)||T(on)||T(ur),isPrintingSvg:T(dr)}},void 0,!0)],46,Xe)),e.$slots.hint?(b(),m(`div`,ft,[C(e.$slots,`hint`,v(_({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,pt,[C(e.$slots,`watermark`,v(_({isPrinting:T(an)||T(on)||T(ur)||T(dr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${k.value}`},null,8,mt),Vt.value&&(z.value.legend.show||e.$slots.legend)?(b(),f(Pe,{key:6,to:z.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Rt},[C(e.$slots,`legend`,{legend:Q.value},()=>[z.value.legend.show?(b(),f(De,{key:0,legendSet:Q.value,config:Vn.value,isCursorPointer:B.value,onClickMarker:s[0]||=({i:e})=>xn(e)},Fe({item:D(({legend:e,index:t})=>[N.value?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>e.segregate(),style:y(`opacity:${J.value.includes(t)?.5:1}`)},w(e.display),13,ht))]),legendToggle:D(()=>[Q.value.length>2&&z.value.legend.selectAllToggle.show&&!N.value?(b(),f(je,{key:0,backgroundColor:z.value.legend.selectAllToggle.backgroundColor,color:z.value.legend.selectAllToggle.color,fontSize:z.value.legend.fontSize,checked:J.value.length>0,isCursorPointer:B.value,onToggle:_n},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[L.value.targetReference.show&&L.value.targetReference.showInLegend?{name:`after`,fn:D(()=>[h(`div`,gt,[h(`div`,{style:y({display:`flex`,height:z.value.legend.fontSize})},[(b(),m(`svg`,{style:y({width:z.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[h(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:L.value.targetReference.stroke,"stroke-width":L.value.targetReference.strokeWidth*.7,"stroke-dasharray":L.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,_t)],4))],4),h(`span`,null,w(L.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:7,ref_key:`source`,ref:zt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Le(T(St),{teleportTo:R.value.teleportTo,show:W.value.showTooltip&&Pt.value,backgroundColor:R.value.backgroundColor,color:R.value.color,borderRadius:R.value.borderRadius,borderColor:R.value.borderColor,borderWidth:R.value.borderWidth,backgroundOpacity:R.value.backgroundOpacity,fontSize:R.value.fontSize,position:R.value.position,offsetX:R.value.offsetX,offsetY:R.value.offsetY,parent:A.value,content:Ft.value,isFullscreen:$.value,isCustom:R.value.customFormat&&typeof R.value.customFormat==`function`,smooth:R.value.smooth,backdropFilter:R.value.backdropFilter,smoothForce:R.value.smoothForce,smoothSnapThreshold:R.value.smoothSnapThreshold,isA11yMode:Gt.value===`keyboard`,a11yPosition:Wt.value},{"tooltip-before":D(()=>[C(e.$slots,`tooltip-before`,v(_({...Kn.value})),void 0,!0)]),tooltip:D(()=>[C(e.$slots,`tooltip`,v(_({...Kn.value})),void 0,!0)]),"tooltip-after":D(()=>[![`function`].includes(typeof R.value.customFormat)&&!e.$slots.tooltip?(b(),m(`div`,vt,[Le(T(wt),{dataset:Gn.value,config:dn.value,backgroundOpacity:0},{"data-label":D(({bar:e})=>[h(`div`,yt,[h(`span`,bt,w(e.name+(R.value.showValue||R.value.showPercentage?`:`:``)),1),R.value.showValue||R.value.showPercentage?(b(),m(`span`,xt,w(e.suffix),1)):p(``,!0)])]),_:1},8,[`dataset`,`config`])])):p(``,!0),C(e.$slots,`tooltip-after`,v(_({...Kn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),!N.value&&Mt.value&&F.value.buttons.table?(b(),f(Ue(ir.value.component),Re({key:8},ir.value.props,{ref_key:`tableUnit`,ref:Ht,onClose:ar}),Fe({content:D(()=>[Le(T(Et),{colNames:Hn.value.colNames,head:Hn.value.head,body:Hn.value.body,config:Hn.value.config,title:P.value.table.useDialog?``:ir.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:B.value,onClose:ar},{th:D(({th:e})=>[Ie(w(e.name),1)]),td:D(({td:e})=>[Ie(w(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[P.value.table.useDialog?{name:`title`,fn:D(()=>[Ie(w(ir.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:D(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Zn(F.value.callbacks.csv),style:y({cursor:B.value?`pointer`:`default`})},[Le(T(Ct),{name:`fileCsv`,stroke:ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[N.value?(b(),f(ke,{key:0})):p(``,!0)],!0)],46,Ke))}},[[`__scopeId`,`data-v-968e4534`]]);export{Ge as n,St as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,Ht as ee,X as te,at as ne,i as re,in as ie,r as ae,rn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./useConfig-CXhXxWjB.js";import{t as he}from"./useLoading-DoqqfnmS.js";import{t as ge}from"./usePrinter-DVf3YcG5.js";import{t as _e}from"./useResponsive-CENUxfEL.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{t as ye}from"./useUserOptionState-CXlFnwPv.js";import{t as be}from"./useChartAccessibility-DOMuYJfm.js";import{t as xe}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Se}from"./img-D4RQwASc.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./vue_ui_relation_circle-Bd8SWF0Z.js";import{t as Te}from"./BaseScanner-m6QR9rwD.js";import{t as Ee}from"./A11yDataTable-DWNlWXzs.js";import{t as De}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Oe,createTextVNode as ke,createVNode as Ae,defineAsyncComponent as je,guardReactiveProps as h,mergeProps as Me,normalizeClass as Ne,normalizeProps as g,normalizeStyle as _,onBeforeUnmount as Pe,onMounted as Fe,openBlock as v,ref as y,renderList as b,renderSlot as x,shallowRef as Ie,toDisplayString as S,toRefs as Le,unref as C,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>ct}),He=[`id`],Ue=[`id`],We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Je={key:1},Ye=[`stroke`,`d`,`stroke-width`],Xe={style:{"pointer-events":`none`}},Ze=[`cx`,`cy`,`fill`,`r`,`stroke`],Qe=[`x`,`y`,`fill`,`font-size`],$e={key:2},et=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],tt={style:{"pointer-events":`none`}},nt=[`cx`,`cy`,`fill`,`r`,`stroke`],rt=[`x`,`y`,`fill`,`font-size`],it=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],at=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],ot={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},st={key:5,class:`vue-data-ui-watermark`},ct=/*#__PURE__*/ De({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:De,emit:Ve}){Re(e=>({d8b066be:Pt.value,c035b400:Nt.value,v5bed39e2:Ft.value}));let ct=je(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),lt=je(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),ut=je(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),{vue_ui_relation_circle:dt}=me(),w=e,ft=Ve,pt=u(()=>!!w.dataset&&Object.keys(w.dataset).length),T=y(te()),mt=y(0),E=y(null),ht=y(null),gt=y(null),_t=y(null),vt=y(0),D=y(null),O=y(!1),k=y(Et()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.weightLabels),M=u(()=>k.value.style);fe({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let N=u(()=>k.value.userOptions.useCursorPointer),yt=u(()=>ie({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:k.value.skeletonConfig??{}})),{loading:bt,FINAL_DATASET:xt,manualLoading:St}=he({...Le(w),FINAL_CONFIG:k,prepareConfig:Et,skeletonDataset:w.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:ie({defaultConfig:k.value,userConfig:yt.value})}),{userOptionsVisible:Ct,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=ye({config:k.value}),{svgRef:P}=be({config:M.value.title});function Et(){return s(w.config,dt,we)}ze(()=>w.config,e=>{k.value=Et(),Ct.value=!k.value.userOptions.showOnChartHover,H.value=M.value.size,U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize,K.value.height=M.value.size,K.value.width=M.value.size,Lt(),vt.value+=1},{deep:!0}),ze(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(St.value=!1)},{deep:!0});let{isPrinting:F,isImaging:I,generatePdf:Dt,generateImage:Ot}=ge({elementId:`relation_circle_${T.value}`,fileName:M.value.title.text||`vue-ui-relation-circle`,options:k.value.userOptions.print}),kt=u(()=>k.value.userOptions.show&&!M.value.title.text),At=u(()=>ce(k.value.customPalette)),L=y([]),R=y([]),z=y({}),B=y([]),jt=y(0),V=u(()=>xt.value.slice(0,M.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));ze(V,()=>{L.value=[],R.value=[],Bt(),Ht()});let H=y(M.value.size),U=y(j.value.size),W=y(M.value.plot.radius),G=y(M.value.labels.fontSize),K=y({height:M.value.size,width:M.value.size}),q=u({get(){return H.value*M.value.circle.radiusProportion},set(e){return e}}),Mt=u(()=>M.value.links.curved),Nt=u(()=>`${M.value.animation.speedMs}ms`),Pt=u(()=>q.value*2),Ft=u(()=>q.value*4),J=Ie(null),Y=Ie(null);Fe(()=>{Lt(),document.getElementById(`relation_circle_${T.value}`).addEventListener(`click`,zt)});let It=u(()=>k.value.debug);function Lt(){if(ue(w.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),St.value=!0):It.value&&w.dataset.forEach((e,t)=>{le({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),ue(w.dataset)||(St.value=k.value.loading),k.value.responsive){let e=de(()=>{let{width:e,height:t}=_e({chart:E.value,title:M.value.title.text?ht.value:null,source:gt.value,noTitle:_t.value});requestAnimationFrame(()=>{H.value=Math.min(e,t),K.value.width=Math.max(.1,e),K.value.height=Math.max(.1,t-12),q.value=H.value*M.value.circle.radiusProportion,L.value=[],R.value=[],Bt(),Ht(),Rt(),k.value.responsiveProportionalSizing?(U.value=oe({relator:H.value,adjuster:M.value.size,source:j.value.size,threshold:6,fallback:6}),W.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.plot.radius,threshold:1,fallback:1}),G.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.labels.fontSize,threshold:6,fallback:6})):(U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize)})});J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect()),J.value=new ResizeObserver(e),Y.value=E.value.parentNode,J.value.observe(Y.value)}else L.value=[],R.value=[],Bt(),Ht();Rt()}Pe(()=>{document.getElementById(`relation_circle_${T.value}`)?.removeEventListener(`click`,zt),J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect())});let{autoSizeLabels:Rt}=xe({svgRef:P,fontSize:M.value.labels.fontSize,minFontSize:M.value.labels.minFontSize,sizeRef:G,labelClass:`.vue-ui-relation-circle-legend`});function zt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(z.value={},B.value=[])}function Bt(){let e=6.28319/V.value.length,t=360/V.value.length,n=0,r=0;V.value.forEach((i,a)=>{let o=i.weights.reduce((e,t)=>e+t,0),s=q.value*Math.cos(n)+K.value.width/2,c=q.value*Math.sin(n)+K.value.height/2+M.value.circle.offsetY;L.value.push({x:s,y:c,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:o}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){R.value=[],L.value.forEach(e=>{L.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);R.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Vt({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Ut({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Ut(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:K.value.width/2,y:K.value.height/2+M.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Wt=u(()=>Math.max(...R.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function X(e){return e.colorSource}function Kt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function Z(e){return Object.hasOwn(z.value,`x`)?!!(B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.value.id}_${e.id}`):!1}function qt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Jt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Yt(e){return Object.hasOwn(z.value,`x`)?z.value.id===e.id||B.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Xt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let Q=y(null);function Zt(e,t){Q.value=t,D.value=t,k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Q.value=null,O.value||(D.value=null),k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,z.value.id&&e.id===z.value.id?(z.value={},B.value=[]):(z.value=e,B.value=[...e.relations]))}function en(e,t){D.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*M.value.links.maxWidth;return Math.max(.3,t)}let nn=y(!1);function rn(e){nn.value=e,mt.value+=1}let $=y(!1);function an(){$.value=!$.value}async function on({scale:e=2}={}){if(!E.value)return;let{width:t,height:n}=E.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await Se({domElement:E.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.title.text,width:t,height:n,aspectRatio:r}}let sn=u(()=>M.value.backgroundColor),cn=u(()=>M.value.title),{isCallbackImaging:ln,isCallbackSvg:un,generateSvg:dn,onGenerateImage:fn}=ve({svg:P,title:cn,legend:null,legendItems:null,backgroundColor:sn,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Ot});async function pn(){ft(`copyAlt`,{config:k.value,dataset:V.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function mn(){O.value=!0,L.value.length&&D.value===null&&(D.value=0)}function hn(){O.value=!1,D.value=null}function gn(e){if(!P.value||$.value||document.activeElement!==P.value||!L.value.length)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,z.value={},B.value=[];return}if(r){if(D.value===null)return;let e=L.value[D.value];if(!e)return;$t(e,D.value);return}let a=D.value;a===null||a<0||a>=L.value.length?a=n?0:L.value.length-1:n?(a+=1,a>=L.value.length&&(a=0)):t&&(--a,a<0&&(a=L.value.length-1)),D.value=a,Q.value=a;let o=L.value[a];o&&k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let _n=u(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:V.value.map(e=>{let t=e.relations.map(e=>V.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return De({getImage:on,generatePdf:Dt,generateSvg:dn,generateImage:Ot,toggleAnnotator:an,toggleFullscreen:rn,copyAlt:pn}),(e,s)=>(v(),p(`div`,{ref_key:`relationCircleChart`,ref:E,class:`vue-data-ui-component vue-ui-relation-circle`,style:_(`width:100%;background:${M.value.backgroundColor};text-align:center;${k.value.responsive?`height: 100%`:``}`),id:`relation_circle_${T.value}`,onMouseenter:s[0]||=()=>C(wt)(!0),onMouseleave:s[1]||=()=>C(wt)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ue),k.value.a11y.includeTable&&_n.value?.rows?.length?(v(),d(Ee,{key:0,uid:T.value,head:_n.value.headers,body:_n.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),A.value.buttons.annotator?(v(),d(C(ct),Me({key:1},C(a)(A.value.annotator),{svgRef:C(P),backgroundColor:M.value.backgroundColor,color:M.value.color,active:$.value,isCursorPointer:N.value,palette:A.value.annotatorPalette,onClose:an}),Oe({_:2},[b(C(o),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),kt.value?(v(),p(`div`,{key:2,ref_key:`noTitle`,ref:_t,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),M.value.title.text?(v(),p(`div`,{key:3,ref_key:`chartTitle`,ref:ht,style:`width:100%;background:transparent`},[(v(),d(Ce,{key:`title_${vt.value}`,config:{title:{cy:`relation-div-title`,...M.value.title},subtitle:{cy:`relation-div-subtitle`,...M.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),A.value.show&&pt.value&&(C(Tt)||C(Ct))?(v(),d(C(lt),Me({ref:`details`,key:`user_options_${mt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:C(F),isImaging:C(I),uid:T.value,hasXls:!1,isFullscreen:nn.value,chartElement:E.value},C(n)(A.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:$.value,isCursorPointer:N.value,onToggleFullscreen:rn,onGeneratePdf:C(Dt),onGenerateImage:C(fn),onGenerateSvg:C(dn),onToggleAnnotator:an,onCopyAlt:pn,style:{visibility:C(Tt)?C(Ct)?`visible`:`hidden`:`visible`}}),Oe({_:2},[b(C(t)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),m(`div`,We,[(v(),p(`svg`,{ref_key:`svgRef`,ref:P,xmlns:C(se),class:Ne([{"vue-data-ui-fullscreen--on":nn.value,"vue-data-ui-fulscreen--off":!nn.value},`relation-circle`]),viewBox:`0 0 ${K.value.width<=0?10:K.value.width} ${K.value.height<=0?10:K.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${T.value}`,tabindex:`0`,onFocus:mn,onBlur:hn,onKeydown:gn},[Ae(C(ut)),x(e.$slots,`svg-underlayer`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:K.value.width<=0?10:K.value.width,height:K.value.height<=0?10:K.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):f(``,!0),m(`circle`,{cx:(K.value.width<=0?1e-4:K.value.width)/2,cy:(K.value.height<=0?1e-4:K.value.height)/2+M.value.circle.offsetY,r:q.value<=0?1e-4:q.value,stroke:M.value.circle.stroke,"stroke-width":M.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,qe),Mt.value?(v(),p(`g`,Je,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`path`,{key:`relation_${t}`,style:_(Kt(e)),stroke:X(e),class:Ne([`relation`,{"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${K.value.width/2},${K.value.height/2+M.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Ye))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,Xe,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,Ze)):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,Qe)):f(``,!0)]))),256))])):(v(),p(`g`,$e,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`line`,{key:`relation_${t}`,stroke:X(e),"stroke-width":tn(e),style:_(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Ne({"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}),"stroke-linecap":`round`},null,14,et))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,tt,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,nt)):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,rt)):f(``,!0)]))),256))])),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`text`,{key:`plot_text_${t}`,"text-anchor":qt(e),transform:Xt(e),x:Jt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":z.value.id===e.id?`900`:`400`,style:_(`font-family:${M.value.fontFamily};${Yt(e)};cursor:${N.value?`pointer`:`default`}`),"font-size":G.value,fill:M.value.labels.color,"text-decoration":t===Q.value||t===D.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[C(bt)?(v(),p(l,{key:0},[ke(`--------`)],64)):(v(),p(l,{key:1},[ke(S(e.label)+` (`+S(C(re)(j.value.formatter,e.totalWeight,C(c)({p:j.value.prefix,v:e.totalWeight,s:j.value.suffix,r:j.value.rounding}),{...e}))+`) `,1)],64))],44,it))),128)),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:_(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${N.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:M.value.plot.useSerieColor?e.color:M.value.plot.color,stroke:M.value.backgroundColor,"stroke-width":`1`,r:W.value*(t===Q.value||t===D.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,at))),128)),x(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0)],42,Ge)),e.$slots.hint?(v(),p(`div`,ot,[x(e.$slots,`hint`,g(h({hint:k.value.a11y.translations.keyboardNavigation,isVisible:O.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,st,[x(e.$slots,`watermark`,g(h({isPrinting:C(F)||C(I)||C(ln)||C(un)})),void 0,!0)])):f(``,!0),e.$slots.source?(v(),p(`div`,{key:6,ref_key:`source`,ref:gt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C(bt)?(v(),d(Te,{key:0})):f(``,!0)],!0)],44,He))}},[[`__scopeId`,`data-v-dfb6df3b`]]);export{Ve as n,ct as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,Ht as ee,X as te,at as ne,i as re,in as ie,r as ae,rn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./useConfig-CXhXxWjB.js";import{t as he}from"./useLoading-DoqqfnmS.js";import{t as ge}from"./usePrinter-DVf3YcG5.js";import{t as _e}from"./useResponsive-CENUxfEL.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{t as ye}from"./useUserOptionState-CXlFnwPv.js";import{t as be}from"./useChartAccessibility-DOMuYJfm.js";import{t as xe}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Se}from"./img-D4RQwASc.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./vue_ui_relation_circle-Bd8SWF0Z.js";import{t as Te}from"./BaseScanner-m6QR9rwD.js";import{t as Ee}from"./A11yDataTable-DWNlWXzs.js";import{t as De}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Oe,createTextVNode as ke,createVNode as Ae,defineAsyncComponent as je,guardReactiveProps as h,mergeProps as Me,normalizeClass as Ne,normalizeProps as g,normalizeStyle as _,onBeforeUnmount as Pe,onMounted as Fe,openBlock as v,ref as y,renderList as b,renderSlot as x,shallowRef as Ie,toDisplayString as S,toRefs as Le,unref as C,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>ct}),He=[`id`],Ue=[`id`],We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Je={key:1},Ye=[`stroke`,`d`,`stroke-width`],Xe={style:{"pointer-events":`none`}},Ze=[`cx`,`cy`,`fill`,`r`,`stroke`],Qe=[`x`,`y`,`fill`,`font-size`],$e={key:2},et=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],tt={style:{"pointer-events":`none`}},nt=[`cx`,`cy`,`fill`,`r`,`stroke`],rt=[`x`,`y`,`fill`,`font-size`],it=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],at=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],ot={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},st={key:5,class:`vue-data-ui-watermark`},ct=/*#__PURE__*/ De({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:De,emit:Ve}){Re(e=>({d8b066be:Pt.value,c035b400:Nt.value,v5bed39e2:Ft.value}));let ct=je(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),lt=je(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),ut=je(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),{vue_ui_relation_circle:dt}=me(),w=e,ft=Ve,pt=u(()=>!!w.dataset&&Object.keys(w.dataset).length),T=y(te()),mt=y(0),E=y(null),ht=y(null),gt=y(null),_t=y(null),vt=y(0),D=y(null),O=y(!1),k=y(Et()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.weightLabels),M=u(()=>k.value.style);fe({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let N=u(()=>k.value.userOptions.useCursorPointer),yt=u(()=>ie({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:k.value.skeletonConfig??{}})),{loading:bt,FINAL_DATASET:xt,manualLoading:St}=he({...Le(w),FINAL_CONFIG:k,prepareConfig:Et,skeletonDataset:w.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:ie({defaultConfig:k.value,userConfig:yt.value})}),{userOptionsVisible:Ct,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=ye({config:k.value}),{svgRef:P}=be({config:M.value.title});function Et(){return s(w.config,dt,we)}ze(()=>w.config,e=>{k.value=Et(),Ct.value=!k.value.userOptions.showOnChartHover,H.value=M.value.size,U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize,K.value.height=M.value.size,K.value.width=M.value.size,Lt(),vt.value+=1},{deep:!0}),ze(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(St.value=!1)},{deep:!0});let{isPrinting:F,isImaging:I,generatePdf:Dt,generateImage:Ot}=ge({elementId:`relation_circle_${T.value}`,fileName:M.value.title.text||`vue-ui-relation-circle`,options:k.value.userOptions.print}),kt=u(()=>k.value.userOptions.show&&!M.value.title.text),At=u(()=>ce(k.value.customPalette)),L=y([]),R=y([]),z=y({}),B=y([]),jt=y(0),V=u(()=>xt.value.slice(0,M.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));ze(V,()=>{L.value=[],R.value=[],Bt(),Ht()});let H=y(M.value.size),U=y(j.value.size),W=y(M.value.plot.radius),G=y(M.value.labels.fontSize),K=y({height:M.value.size,width:M.value.size}),q=u({get(){return H.value*M.value.circle.radiusProportion},set(e){return e}}),Mt=u(()=>M.value.links.curved),Nt=u(()=>`${M.value.animation.speedMs}ms`),Pt=u(()=>q.value*2),Ft=u(()=>q.value*4),J=Ie(null),Y=Ie(null);Fe(()=>{Lt(),document.getElementById(`relation_circle_${T.value}`).addEventListener(`click`,zt)});let It=u(()=>k.value.debug);function Lt(){if(ue(w.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),St.value=!0):It.value&&w.dataset.forEach((e,t)=>{le({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),ue(w.dataset)||(St.value=k.value.loading),k.value.responsive){let e=de(()=>{let{width:e,height:t}=_e({chart:E.value,title:M.value.title.text?ht.value:null,source:gt.value,noTitle:_t.value});requestAnimationFrame(()=>{H.value=Math.min(e,t),K.value.width=Math.max(.1,e),K.value.height=Math.max(.1,t-12),q.value=H.value*M.value.circle.radiusProportion,L.value=[],R.value=[],Bt(),Ht(),Rt(),k.value.responsiveProportionalSizing?(U.value=oe({relator:H.value,adjuster:M.value.size,source:j.value.size,threshold:6,fallback:6}),W.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.plot.radius,threshold:1,fallback:1}),G.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.labels.fontSize,threshold:6,fallback:6})):(U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize)})});J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect()),J.value=new ResizeObserver(e),Y.value=E.value.parentNode,J.value.observe(Y.value)}else L.value=[],R.value=[],Bt(),Ht();Rt()}Pe(()=>{document.getElementById(`relation_circle_${T.value}`)?.removeEventListener(`click`,zt),J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect())});let{autoSizeLabels:Rt}=xe({svgRef:P,fontSize:M.value.labels.fontSize,minFontSize:M.value.labels.minFontSize,sizeRef:G,labelClass:`.vue-ui-relation-circle-legend`});function zt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(z.value={},B.value=[])}function Bt(){let e=6.28319/V.value.length,t=360/V.value.length,n=0,r=0;V.value.forEach((i,a)=>{let o=i.weights.reduce((e,t)=>e+t,0),s=q.value*Math.cos(n)+K.value.width/2,c=q.value*Math.sin(n)+K.value.height/2+M.value.circle.offsetY;L.value.push({x:s,y:c,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:o}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){R.value=[],L.value.forEach(e=>{L.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);R.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Vt({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Ut({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Ut(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:K.value.width/2,y:K.value.height/2+M.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Wt=u(()=>Math.max(...R.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function X(e){return e.colorSource}function Kt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function Z(e){return Object.hasOwn(z.value,`x`)?!!(B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.value.id}_${e.id}`):!1}function qt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Jt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Yt(e){return Object.hasOwn(z.value,`x`)?z.value.id===e.id||B.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Xt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let Q=y(null);function Zt(e,t){Q.value=t,D.value=t,k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Q.value=null,O.value||(D.value=null),k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,z.value.id&&e.id===z.value.id?(z.value={},B.value=[]):(z.value=e,B.value=[...e.relations]))}function en(e,t){D.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*M.value.links.maxWidth;return Math.max(.3,t)}let nn=y(!1);function rn(e){nn.value=e,mt.value+=1}let $=y(!1);function an(){$.value=!$.value}async function on({scale:e=2}={}){if(!E.value)return;let{width:t,height:n}=E.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await Se({domElement:E.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.title.text,width:t,height:n,aspectRatio:r}}let sn=u(()=>M.value.backgroundColor),cn=u(()=>M.value.title),{isCallbackImaging:ln,isCallbackSvg:un,generateSvg:dn,onGenerateImage:fn}=ve({svg:P,title:cn,legend:null,legendItems:null,backgroundColor:sn,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Ot});async function pn(){ft(`copyAlt`,{config:k.value,dataset:V.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function mn(){O.value=!0,L.value.length&&D.value===null&&(D.value=0)}function hn(){O.value=!1,D.value=null}function gn(e){if(!P.value||$.value||document.activeElement!==P.value||!L.value.length)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,z.value={},B.value=[];return}if(r){if(D.value===null)return;let e=L.value[D.value];if(!e)return;$t(e,D.value);return}let a=D.value;a===null||a<0||a>=L.value.length?a=n?0:L.value.length-1:n?(a+=1,a>=L.value.length&&(a=0)):t&&(--a,a<0&&(a=L.value.length-1)),D.value=a,Q.value=a;let o=L.value[a];o&&k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let _n=u(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:V.value.map(e=>{let t=e.relations.map(e=>V.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return De({getImage:on,generatePdf:Dt,generateSvg:dn,generateImage:Ot,toggleAnnotator:an,toggleFullscreen:rn,copyAlt:pn}),(e,s)=>(v(),p(`div`,{ref_key:`relationCircleChart`,ref:E,class:`vue-data-ui-component vue-ui-relation-circle`,style:_(`width:100%;background:${M.value.backgroundColor};text-align:center;${k.value.responsive?`height: 100%`:``}`),id:`relation_circle_${T.value}`,onMouseenter:s[0]||=()=>C(wt)(!0),onMouseleave:s[1]||=()=>C(wt)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ue),k.value.a11y.includeTable&&_n.value?.rows?.length?(v(),d(Ee,{key:0,uid:T.value,head:_n.value.headers,body:_n.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),A.value.buttons.annotator?(v(),d(C(ct),Me({key:1},C(a)(A.value.annotator),{svgRef:C(P),backgroundColor:M.value.backgroundColor,color:M.value.color,active:$.value,isCursorPointer:N.value,palette:A.value.annotatorPalette,onClose:an}),Oe({_:2},[b(C(o),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),kt.value?(v(),p(`div`,{key:2,ref_key:`noTitle`,ref:_t,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),M.value.title.text?(v(),p(`div`,{key:3,ref_key:`chartTitle`,ref:ht,style:`width:100%;background:transparent`},[(v(),d(Ce,{key:`title_${vt.value}`,config:{title:{cy:`relation-div-title`,...M.value.title},subtitle:{cy:`relation-div-subtitle`,...M.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),A.value.show&&pt.value&&(C(Tt)||C(Ct))?(v(),d(C(lt),Me({ref:`details`,key:`user_options_${mt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:C(F),isImaging:C(I),uid:T.value,hasXls:!1,isFullscreen:nn.value,chartElement:E.value},C(n)(A.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:$.value,isCursorPointer:N.value,onToggleFullscreen:rn,onGeneratePdf:C(Dt),onGenerateImage:C(fn),onGenerateSvg:C(dn),onToggleAnnotator:an,onCopyAlt:pn,style:{visibility:C(Tt)?C(Ct)?`visible`:`hidden`:`visible`}}),Oe({_:2},[b(C(t)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),m(`div`,We,[(v(),p(`svg`,{ref_key:`svgRef`,ref:P,xmlns:C(se),class:Ne([{"vue-data-ui-fullscreen--on":nn.value,"vue-data-ui-fulscreen--off":!nn.value},`relation-circle`]),viewBox:`0 0 ${K.value.width<=0?10:K.value.width} ${K.value.height<=0?10:K.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${T.value}`,tabindex:`0`,onFocus:mn,onBlur:hn,onKeydown:gn},[Ae(C(ut)),x(e.$slots,`svg-underlayer`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:K.value.width<=0?10:K.value.width,height:K.value.height<=0?10:K.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):f(``,!0),m(`circle`,{cx:(K.value.width<=0?1e-4:K.value.width)/2,cy:(K.value.height<=0?1e-4:K.value.height)/2+M.value.circle.offsetY,r:q.value<=0?1e-4:q.value,stroke:M.value.circle.stroke,"stroke-width":M.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,qe),Mt.value?(v(),p(`g`,Je,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`path`,{key:`relation_${t}`,style:_(Kt(e)),stroke:X(e),class:Ne([`relation`,{"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${K.value.width/2},${K.value.height/2+M.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Ye))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,Xe,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,Ze)):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,Qe)):f(``,!0)]))),256))])):(v(),p(`g`,$e,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`line`,{key:`relation_${t}`,stroke:X(e),"stroke-width":tn(e),style:_(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Ne({"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}),"stroke-linecap":`round`},null,14,et))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,tt,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,nt)):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,rt)):f(``,!0)]))),256))])),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`text`,{key:`plot_text_${t}`,"text-anchor":qt(e),transform:Xt(e),x:Jt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":z.value.id===e.id?`900`:`400`,style:_(`font-family:${M.value.fontFamily};${Yt(e)};cursor:${N.value?`pointer`:`default`}`),"font-size":G.value,fill:M.value.labels.color,"text-decoration":t===Q.value||t===D.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[C(bt)?(v(),p(l,{key:0},[ke(`--------`)],64)):(v(),p(l,{key:1},[ke(S(e.label)+` (`+S(C(re)(j.value.formatter,e.totalWeight,C(c)({p:j.value.prefix,v:e.totalWeight,s:j.value.suffix,r:j.value.rounding}),{...e}))+`) `,1)],64))],44,it))),128)),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:_(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${N.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:M.value.plot.useSerieColor?e.color:M.value.plot.color,stroke:M.value.backgroundColor,"stroke-width":`1`,r:W.value*(t===Q.value||t===D.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,at))),128)),x(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0)],42,Ge)),e.$slots.hint?(v(),p(`div`,ot,[x(e.$slots,`hint`,g(h({hint:k.value.a11y.translations.keyboardNavigation,isVisible:O.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,st,[x(e.$slots,`watermark`,g(h({isPrinting:C(F)||C(I)||C(ln)||C(un)})),void 0,!0)])):f(``,!0),e.$slots.source?(v(),p(`div`,{key:6,ref_key:`source`,ref:gt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C(bt)?(v(),d(Te,{key:0})):f(``,!0)],!0)],44,He))}},[[`__scopeId`,`data-v-dfb6df3b`]]);export{Ve as n,ct as t};
|
|
@@ -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 ee,r as i,t as a}from"./annotationSlots-OLiW25XN.js";import{n as o,t as s}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,Ht as ie,J as ae,N as oe,P as se,S as ce,U as le,X as ue,Xt as de,at as fe,i as pe,in as me,nt as he,r as ge,t as _e,tt as ve,w as ye,xt as be,yt as xe,zt as Se}from"./lib-rPeBMZrn.js";import{c as Ce}from"./canvas-lib-22VpOI4_.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./useConfig-CXhXxWjB.js";import{t as De}from"./useLoading-DoqqfnmS.js";import{t as Oe}from"./usePrinter-DVf3YcG5.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./useTimeLabels-Das5O74F.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{t as Me}from"./useUserOptionState-CXlFnwPv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Fe}from"./vue_ui_ridgeline-Bea0vgUJ.js";import{t as Ie}from"./Legend-W9YVYVX-.js";import{n as Le}from"./Title-BliHuXfT.js";import{t as Re}from"./Shape-CRe8woTu.js";import{t as ze}from"./BaseScanner-m6QR9rwD.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./BaseLegendToggle-VzX69MCo.js";import{t as He}from"./DefGrad-DKMq1REY.js";import{t as Ue}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as h,guardReactiveProps as qe,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as Ze,normalizeStyle as g,onBeforeUnmount as Qe,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as $e,shallowRef as et,toDisplayString as x,toRefs as tt,unref as S,watch as nt,watchEffect as rt,withCtx as C}from"vue";var it=/* @__PURE__ */ e({default:()=>Dt}),at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`aria-describedby`,`viewBox`],lt={key:0},ut=[`fill`,`d`],dt=[`stroke`,`stroke-width`,`d`],ft=[`fill`,`d`],pt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],mt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],gt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],_t={key:0},vt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],yt=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],bt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],St=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],Ct=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],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=[`onClick`],Dt=/*#__PURE__*/ Ue({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:Ue,emit:it}){let Dt=h(()=>import(`./vue-ui-xy-BlxUkwlc.js`).then(e=>e.n)),Ot=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),kt=h(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),At=h(()=>import(`./DataTable-KeuZB1JM.js`)),jt=h(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Mt=h(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Nt=h(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),Pt=h(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_ridgeline:Ft}=Ee(),w=e,It=u({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Lt=it,T=v(null),Rt=v(null),zt=v(null),E=et(null),D=et(null),Bt=v(null),Vt=v(null),Ht=v(0),Ut=v(0),Wt=v(0),O=v(ue()),Gt=v(0),Kt=v(0),qt=v(512),k=v(null),A=v(null),Jt=v(null),Yt=v(0),Xt=v(null),Zt=v(null),Qt=v(null),j=v(null),$t=v(!1);function en(){return ne(w.config,Ft,Fe)}let M=v(en()),N=u(()=>M.value.userOptions),P=u(()=>M.value.style.chart.areas),F=u(()=>M.value.style.chart.selector),I=u(()=>M.value.style.chart.xAxis.labels),L=u(()=>M.value.style.chart.yAxis.labels),R=u(()=>M.value.style.chart);we({config:()=>M.value,dataset:()=>w.dataset,component:`VueUiRidgeline`,rules:[Te.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=u(()=>M.value.userOptions.useCursorPointer),tn=u(()=>me({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:nn,FINAL_DATASET:B,manualLoading:rn}=De({...tt(w),FINAL_CONFIG:M,prepareConfig:en,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:me({defaultConfig:M.value,userConfig:tn.value})}),V=v(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:an,setUserOptionsVisibility:on,keepUserOptionState:sn}=Me({config:M.value}),{svgRef:H}=Ne({config:R.value.title}),cn=u(()=>M.value.debug);function ln(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)fe({componentName:`VueUiRidgeline`,type:`dataset`,debug:cn.value}),rn.value=!0;else if(e.forEach((e,t)=>{xe({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:cn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{xe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:cn.value})})})}),Kt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),Se(w.dataset)||(rn.value=M.value.loading),M.value.responsive){let t=Ce(()=>{let{width:t,height:n}=ke({chart:T.value,title:R.value.title.text?Rt.value:null,legend:R.value.legend.show?zt.value:null,source:Bt.value,noTitle:Vt.value,padding:R.value.padding});requestAnimationFrame(()=>{qt.value=t,V.value=e.length?n/e.length:0,Yt.value=n-12})});E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect()),E.value=new ResizeObserver(t),D.value=T.value?.parentNode||null,D.value&&E.value.observe(D.value)}}Qe(()=>{E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect())});let{isPrinting:un,isImaging:dn,generatePdf:fn,generateImage:pn}=Oe({elementId:`vue-ui-ridgeline_${O.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),mn=u(()=>M.value.userOptions.show&&!R.value.title.text),hn=u(()=>ye(M.value.customPalette)),U=v({showTable:M.value.table.show});nt(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(an.value=!M.value.userOptions.showOnChartHover,await Ye(),ln(),Ht.value+=1,Wt.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),nt(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rn.value=!1)},{deep:!0}),nt(()=>nn.value,async e=>{e||(await Ye(),ln())},{immediate:!0}),nt(()=>w.config,()=>{M.value=en(B.value||null),an.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Ht.value+=1,Wt.value+=1},{deep:!0});let gn=u(()=>P.value.height/P.value.rowHeight);function _n(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Lt(`selectLegend`,Y.value)}function vn(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Lt(`selectLegend`,Y.value)}function yn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(cn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(cn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function bn(e){let t=yn(e);t!==null&&X.value.includes(t.id)&&vn(t.id)}function xn(e){let t=yn(e);t!==null&&(X.value.includes(t.id)||vn(t.id))}let W=u(()=>It.value?(B.value||[]).map(e=>({...e,labelLen:Fn(e.name,L.value.fontSize),uid:ue(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ce(e.color):hn.value[t]||ie[t]||ie[t%ie.length],r=de(e.name);return{...e,color:n,id:r}})})):[]),Sn=u(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*gn.value+R.value.padding.bottom),G=u(()=>{let e=R.value.padding;return{width:qt.value,height:Sn.value,padding:e}}),Cn=u(()=>G.value.width),wn=u(()=>G.value.height),Tn=v(0),En=Ce(e=>{Tn.value=e},100);rt(e=>{let t=Xt.value;if(!t)return;let n=new ResizeObserver(e=>{En(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Qe(()=>{Tn.value=0});let K=u(()=>({fullHeight:G.value.height+Tn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),Dn=u(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=v([]),On=0;rt(()=>{let e=++On;(async()=>{let t=await Ae({values:I.value.values,maxDatapoints:Dn.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===On&&(q.value=t)})()});let J=u(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/Dn.value,r=[];for(let e=0;e<Dn.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:Sn.value});return r});function kn(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function An(e){k.value=e;let t=kn(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function jn(e){k.value=null;let t=kn(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function Mn(e){let t=kn(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Lt(`selectX`,t)}function Nn(e,t){return e.length*t/2+t}function Pn(e,t,n){return e+Nn(t,n)>K.value.right}function Fn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=u(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,ee=(K.value.width-r)/Dn.value,i=Math.abs(Math.min(n,0)),a=t+i;function o(e){return isNaN(e/a)?0:e/a}return W.value.map((e,t)=>{let n=V.value*gn.value*(1-o(i)),a=K.value.top+V.value*t,s=K.value.top+a+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?s-n/2:s)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let te=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+ee*n,y:K.value.top+a+V.value*gn.value*(1-o(te+i)),value:t,isMaxPoint:t===Math.max(...e.values),zero:s}}),n=`${oe(t,s,!1,!1)}`,te=`M ${r},${s} ${le(t)} ${t.at(-1).x},${s}`,ne=`M ${r},${s} ${t.at(-1).x},${s}`,c=`M ${se(t)}`,re=`M ${le(t)}`,ie=be(P.value.smooth?c:re);return{...e,uid:ue(),plots:t,smoothPath:n,straightPath:te,zeroPath:ne,pathLength:ie,smoothPathRidge:c,straightPathRidge:re}}).filter(e=>!X.value.includes(e.id))}})}),X=v([]);function In(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=de(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>vn(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=u(()=>In(W.value)),Ln=u(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=v(!1);function Rn(e){Q.value=e,Gt.value+=1}let zn=v({}),Bn=v([]);function Vn(e){Lt(`selectDatapoint`,e),R.value.dialog.show&&(Bn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),A.value=e,zn.value=ve({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),Jt.value&&Jt.value.open())}let Hn=v(null);function Un(e){Hn.value=e}function Wn(){Hn.value=null}let Gn=v(!1);function Kn(){Gn.value=!Gn.value}function qn(){U.value.showTable=!U.value.showTable}let Jn=u(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=u(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={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};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:Jn.value.body,config:t}});function Yn(e=null){Ye(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...Jn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=re(n);e?e(r):he({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Xn(){return Y.value}let Zn=te(T,()=>R.value.title.text),Qn=u(()=>({min:0,max:Dn.value}));Pe({timeLabelsEls:Xt,timeLabels:q,slicer:Qn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Cn,height:wn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let $n=u(()=>s({config:M,style:R,mutableConfig:U,dialog:Pt,accordion:kt,isFullscreen:Q,parent:T,maxWidth:800,isCursorPointer:z}));nt(()=>U.value.showTable,e=>o(e,M,Zt));function er(){U.value.showTable=!1,Qt.value&&Qt.value.setTableIconState(!1)}let tr=u(()=>R.value.backgroundColor),nr=u(()=>({...R.value.legend,position:`bottom`})),rr=u(()=>R.value.title),{isCallbackImaging:ir,isCallbackSvg:ar,generateSvg:or,onGenerateImage:sr}=je({svg:H,title:rr,legend:nr,legendItems:Z,backgroundColor:tr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:pn});function cr(e){lr(`xy-zoom`,e.dataset,e.config)}async function lr(e=`main-chart`,t=null,n=null){Lt(`copyAlt`,{source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){j.value=null,$t.value=!0}function dr(){hr(),$t.value=!1}function fr(e){if(!H.value||Gn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,ee=e.key===`ArrowRight`,i=e.key===`Enter`||e.key===` `,a=e.key===`Escape`;if(!t&&!n&&!r&&!ee&&!i&&!a)return;if(e.preventDefault(),e.stopPropagation(),a){hr();return}if(i){if(j.value!==null){let e=Y.value[j.value];e&&Vn(e);return}k.value&&Mn(k.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:pr(e+(n?1:-1)),j.value=e,Hn.value=e;return}if(!J.value.length)return;let o=k.value?.index??null;o=o===null?ee?0:J.value.length-1:mr(o+(ee?1:-1));let s=J.value[o];s&&An(s)}function pr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function mr(e){let t=J.value.length;return t?(e%t+t)%t:null}function hr(){j.value=null,Hn.value=null,k.value?jn(k.value):k.value=null}let gr=u(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return Ue({getData:Xn,getImage:Zn,generateImage:pn,generateSvg:or,generatePdf:fn,generateCsv:Yn,hideSeries:xn,showSeries:bn,toggleAnnotator:Kn,toggleTable:qn,toggleFullscreen:Rn,copyAlt:lr}),(e,o)=>(_(),p(`div`,{ref_key:`ridgelineChart`,ref:T,class:Xe(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${O.value}`,style:g({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:o[3]||=()=>S(on)(!0),onMouseleave:o[4]||=()=>S(on)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,x(M.value.a11y.translations.keyboardNavigation),1)],8,ot),M.value.a11y.includeTable&&gr.value.body.length?(_(),d(Be,{key:0,uid:O.value,head:gr.value.head,body:gr.value.body,caption:gr.value.caption,notice:gr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):f(``,!0),N.value.buttons.annotator&&S(H)?(_(),d(S(jt),Je({key:1},S(i)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Gn.value,svgRef:S(H),isCursorPointer:z.value,onClose:Kn}),We({_:2},[y(S(a),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(ee)(t,n))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):f(``,!0),b(e.$slots,`userConfig`,{},void 0,!0),mn.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:Vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),R.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rt,style:`width:100%;background:transparent;padding-bottom:24px`},[(_(),d(Le,{key:`title_${Ht.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),N.value.show&&It.value&&(S(sn)||S(an))?(_(),d(S(Mt),Je({ref_key:`userOptionsRef`,ref:Qt,key:`user_option_${Gt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:S(un),isImaging:S(dn),uid:O.value,hasTooltip:!1,hasLabel:!1,isFullscreen:Q.value,chartElement:T.value},S(n)(N.value,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:!1,isAnnotation:Gn.value,tableDialog:M.value.table.useDialog,style:{visibility:S(sn)?S(an)?`visible`:`hidden`:`visible`},isCursorPointer:z.value,onToggleFullscreen:Rn,onGeneratePdf:S(fn),onGenerateCsv:Yn,onGenerateImage:S(sr),onGenerateSvg:S(or),onToggleTable:qn,onToggleAnnotator:Kn,onCopyAlt:lr}),We({_:2},[y(S(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`style`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`])):f(``,!0),m(`div`,st,[(_(),p(`svg`,{ref_key:`svgRef`,ref:H,xmlns:S(_e),"aria-describedby":`chart-instructions-${O.value}`,class:Xe({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:g(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Yt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[Ke(S(Nt)),b(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:S(un)||S(dn)||S(ir),isPrintingSvg:S(ar),data:Y.value}},void 0,!0),m(`defs`,null,[(_(!0),p(l,null,y(Z.value,(e,t)=>(_(),d(He,{t:`linear`,id:`gradient-${e.id}-${O.value}`,key:`gradient-${e.id}-${O.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(_(!0),p(l,null,y(Y.value,(e,t)=>(_(),p(l,null,[(_(!0),p(l,null,y(e.datapoints,(e,t)=>(_(),d(He,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${O.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(_(!0),p(l,null,y(Y.value,(t,n)=>(_(),p(`g`,{key:`ds-${n}`},[(_(!0),p(l,null,y(t.datapoints,(t,r)=>(_(),p(`g`,{key:t.id},[e.$slots.pattern?(_(),p(`g`,lt,[m(`defs`,null,[b(e.$slots,`pattern`,Je({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${O.value}_${t.uid}`}),void 0,!0)])])):f(``,!0),m(`path`,{fill:e.$slots.pattern?`url(#pattern_${O.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:g({opacity:P.value.opacity})},null,12,ut),m(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,dt),m(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${O.value})`:`url(#gradient-single-${O.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ft),R.value.zeroLine.show?(_(),p(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,pt)):f(``,!0),P.value.maxPoint.show&&t.plots.length>1?(_(!0),p(l,{key:2},y(t.plots,e=>(_(),p(l,null,[e.isMaxPoint?(_(),p(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?S(ge)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,mt)):f(``,!0)],64))),256)):f(``,!0),t.plots.length===1?(_(),p(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,ht)):f(``,!0)]))),128)),m(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:g({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Hn.value===n||A.value&&t.uid===A.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Un(n),onMouseleave:Wn,onClick:e=>Vn(t)},x(t.name),45,gt)]))),128)),I.value.values.length?(_(),p(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Xt},[(_(!0),p(l,null,y(J.value,(t,n)=>b(e.$slots,`time-label`,Je({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(_(),p(`g`,_t,[String(t.label).includes(`
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as ee,r as i,t as a}from"./annotationSlots-OLiW25XN.js";import{n as o,t as s}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,Ht as ie,J as ae,N as oe,P as se,S as ce,U as le,X as ue,Xt as de,at as fe,i as pe,in as me,nt as he,r as ge,t as _e,tt as ve,w as ye,xt as be,yt as xe,zt as Se}from"./lib-rPeBMZrn.js";import{c as Ce}from"./canvas-lib-22VpOI4_.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./useConfig-CXhXxWjB.js";import{t as De}from"./useLoading-DoqqfnmS.js";import{t as Oe}from"./usePrinter-DVf3YcG5.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./useTimeLabels-Das5O74F.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{t as Me}from"./useUserOptionState-CXlFnwPv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Fe}from"./vue_ui_ridgeline-Bea0vgUJ.js";import{t as Ie}from"./Legend-W9YVYVX-.js";import{n as Le}from"./Title-BliHuXfT.js";import{t as Re}from"./Shape-CRe8woTu.js";import{t as ze}from"./BaseScanner-m6QR9rwD.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./BaseLegendToggle-VzX69MCo.js";import{t as He}from"./DefGrad-DKMq1REY.js";import{t as Ue}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as h,guardReactiveProps as qe,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as Ze,normalizeStyle as g,onBeforeUnmount as Qe,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as $e,shallowRef as et,toDisplayString as x,toRefs as tt,unref as S,watch as nt,watchEffect as rt,withCtx as C}from"vue";var it=/* @__PURE__ */ e({default:()=>Dt}),at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`aria-describedby`,`viewBox`],lt={key:0},ut=[`fill`,`d`],dt=[`stroke`,`stroke-width`,`d`],ft=[`fill`,`d`],pt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],mt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],gt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],_t={key:0},vt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],yt=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],bt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],St=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],Ct=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],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=[`onClick`],Dt=/*#__PURE__*/ Ue({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:Ue,emit:it}){let Dt=h(()=>import(`./vue-ui-xy-BTGZ1NSt.js`).then(e=>e.n)),Ot=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),kt=h(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),At=h(()=>import(`./DataTable-KeuZB1JM.js`)),jt=h(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Mt=h(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Nt=h(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),Pt=h(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_ridgeline:Ft}=Ee(),w=e,It=u({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Lt=it,T=v(null),Rt=v(null),zt=v(null),E=et(null),D=et(null),Bt=v(null),Vt=v(null),Ht=v(0),Ut=v(0),Wt=v(0),O=v(ue()),Gt=v(0),Kt=v(0),qt=v(512),k=v(null),A=v(null),Jt=v(null),Yt=v(0),Xt=v(null),Zt=v(null),Qt=v(null),j=v(null),$t=v(!1);function en(){return ne(w.config,Ft,Fe)}let M=v(en()),N=u(()=>M.value.userOptions),P=u(()=>M.value.style.chart.areas),F=u(()=>M.value.style.chart.selector),I=u(()=>M.value.style.chart.xAxis.labels),L=u(()=>M.value.style.chart.yAxis.labels),R=u(()=>M.value.style.chart);we({config:()=>M.value,dataset:()=>w.dataset,component:`VueUiRidgeline`,rules:[Te.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=u(()=>M.value.userOptions.useCursorPointer),tn=u(()=>me({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:nn,FINAL_DATASET:B,manualLoading:rn}=De({...tt(w),FINAL_CONFIG:M,prepareConfig:en,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:me({defaultConfig:M.value,userConfig:tn.value})}),V=v(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:an,setUserOptionsVisibility:on,keepUserOptionState:sn}=Me({config:M.value}),{svgRef:H}=Ne({config:R.value.title}),cn=u(()=>M.value.debug);function ln(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)fe({componentName:`VueUiRidgeline`,type:`dataset`,debug:cn.value}),rn.value=!0;else if(e.forEach((e,t)=>{xe({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:cn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{xe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:cn.value})})})}),Kt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),Se(w.dataset)||(rn.value=M.value.loading),M.value.responsive){let t=Ce(()=>{let{width:t,height:n}=ke({chart:T.value,title:R.value.title.text?Rt.value:null,legend:R.value.legend.show?zt.value:null,source:Bt.value,noTitle:Vt.value,padding:R.value.padding});requestAnimationFrame(()=>{qt.value=t,V.value=e.length?n/e.length:0,Yt.value=n-12})});E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect()),E.value=new ResizeObserver(t),D.value=T.value?.parentNode||null,D.value&&E.value.observe(D.value)}}Qe(()=>{E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect())});let{isPrinting:un,isImaging:dn,generatePdf:fn,generateImage:pn}=Oe({elementId:`vue-ui-ridgeline_${O.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),mn=u(()=>M.value.userOptions.show&&!R.value.title.text),hn=u(()=>ye(M.value.customPalette)),U=v({showTable:M.value.table.show});nt(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(an.value=!M.value.userOptions.showOnChartHover,await Ye(),ln(),Ht.value+=1,Wt.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),nt(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rn.value=!1)},{deep:!0}),nt(()=>nn.value,async e=>{e||(await Ye(),ln())},{immediate:!0}),nt(()=>w.config,()=>{M.value=en(B.value||null),an.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Ht.value+=1,Wt.value+=1},{deep:!0});let gn=u(()=>P.value.height/P.value.rowHeight);function _n(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Lt(`selectLegend`,Y.value)}function vn(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Lt(`selectLegend`,Y.value)}function yn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(cn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(cn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function bn(e){let t=yn(e);t!==null&&X.value.includes(t.id)&&vn(t.id)}function xn(e){let t=yn(e);t!==null&&(X.value.includes(t.id)||vn(t.id))}let W=u(()=>It.value?(B.value||[]).map(e=>({...e,labelLen:Fn(e.name,L.value.fontSize),uid:ue(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ce(e.color):hn.value[t]||ie[t]||ie[t%ie.length],r=de(e.name);return{...e,color:n,id:r}})})):[]),Sn=u(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*gn.value+R.value.padding.bottom),G=u(()=>{let e=R.value.padding;return{width:qt.value,height:Sn.value,padding:e}}),Cn=u(()=>G.value.width),wn=u(()=>G.value.height),Tn=v(0),En=Ce(e=>{Tn.value=e},100);rt(e=>{let t=Xt.value;if(!t)return;let n=new ResizeObserver(e=>{En(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Qe(()=>{Tn.value=0});let K=u(()=>({fullHeight:G.value.height+Tn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),Dn=u(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=v([]),On=0;rt(()=>{let e=++On;(async()=>{let t=await Ae({values:I.value.values,maxDatapoints:Dn.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===On&&(q.value=t)})()});let J=u(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/Dn.value,r=[];for(let e=0;e<Dn.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:Sn.value});return r});function kn(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function An(e){k.value=e;let t=kn(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function jn(e){k.value=null;let t=kn(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function Mn(e){let t=kn(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Lt(`selectX`,t)}function Nn(e,t){return e.length*t/2+t}function Pn(e,t,n){return e+Nn(t,n)>K.value.right}function Fn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=u(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,ee=(K.value.width-r)/Dn.value,i=Math.abs(Math.min(n,0)),a=t+i;function o(e){return isNaN(e/a)?0:e/a}return W.value.map((e,t)=>{let n=V.value*gn.value*(1-o(i)),a=K.value.top+V.value*t,s=K.value.top+a+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?s-n/2:s)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let te=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+ee*n,y:K.value.top+a+V.value*gn.value*(1-o(te+i)),value:t,isMaxPoint:t===Math.max(...e.values),zero:s}}),n=`${oe(t,s,!1,!1)}`,te=`M ${r},${s} ${le(t)} ${t.at(-1).x},${s}`,ne=`M ${r},${s} ${t.at(-1).x},${s}`,c=`M ${se(t)}`,re=`M ${le(t)}`,ie=be(P.value.smooth?c:re);return{...e,uid:ue(),plots:t,smoothPath:n,straightPath:te,zeroPath:ne,pathLength:ie,smoothPathRidge:c,straightPathRidge:re}}).filter(e=>!X.value.includes(e.id))}})}),X=v([]);function In(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=de(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>vn(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=u(()=>In(W.value)),Ln=u(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=v(!1);function Rn(e){Q.value=e,Gt.value+=1}let zn=v({}),Bn=v([]);function Vn(e){Lt(`selectDatapoint`,e),R.value.dialog.show&&(Bn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),A.value=e,zn.value=ve({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),Jt.value&&Jt.value.open())}let Hn=v(null);function Un(e){Hn.value=e}function Wn(){Hn.value=null}let Gn=v(!1);function Kn(){Gn.value=!Gn.value}function qn(){U.value.showTable=!U.value.showTable}let Jn=u(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=u(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={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};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:Jn.value.body,config:t}});function Yn(e=null){Ye(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...Jn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=re(n);e?e(r):he({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Xn(){return Y.value}let Zn=te(T,()=>R.value.title.text),Qn=u(()=>({min:0,max:Dn.value}));Pe({timeLabelsEls:Xt,timeLabels:q,slicer:Qn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Cn,height:wn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let $n=u(()=>s({config:M,style:R,mutableConfig:U,dialog:Pt,accordion:kt,isFullscreen:Q,parent:T,maxWidth:800,isCursorPointer:z}));nt(()=>U.value.showTable,e=>o(e,M,Zt));function er(){U.value.showTable=!1,Qt.value&&Qt.value.setTableIconState(!1)}let tr=u(()=>R.value.backgroundColor),nr=u(()=>({...R.value.legend,position:`bottom`})),rr=u(()=>R.value.title),{isCallbackImaging:ir,isCallbackSvg:ar,generateSvg:or,onGenerateImage:sr}=je({svg:H,title:rr,legend:nr,legendItems:Z,backgroundColor:tr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:pn});function cr(e){lr(`xy-zoom`,e.dataset,e.config)}async function lr(e=`main-chart`,t=null,n=null){Lt(`copyAlt`,{source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){j.value=null,$t.value=!0}function dr(){hr(),$t.value=!1}function fr(e){if(!H.value||Gn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,ee=e.key===`ArrowRight`,i=e.key===`Enter`||e.key===` `,a=e.key===`Escape`;if(!t&&!n&&!r&&!ee&&!i&&!a)return;if(e.preventDefault(),e.stopPropagation(),a){hr();return}if(i){if(j.value!==null){let e=Y.value[j.value];e&&Vn(e);return}k.value&&Mn(k.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:pr(e+(n?1:-1)),j.value=e,Hn.value=e;return}if(!J.value.length)return;let o=k.value?.index??null;o=o===null?ee?0:J.value.length-1:mr(o+(ee?1:-1));let s=J.value[o];s&&An(s)}function pr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function mr(e){let t=J.value.length;return t?(e%t+t)%t:null}function hr(){j.value=null,Hn.value=null,k.value?jn(k.value):k.value=null}let gr=u(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return Ue({getData:Xn,getImage:Zn,generateImage:pn,generateSvg:or,generatePdf:fn,generateCsv:Yn,hideSeries:xn,showSeries:bn,toggleAnnotator:Kn,toggleTable:qn,toggleFullscreen:Rn,copyAlt:lr}),(e,o)=>(_(),p(`div`,{ref_key:`ridgelineChart`,ref:T,class:Xe(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${O.value}`,style:g({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:o[3]||=()=>S(on)(!0),onMouseleave:o[4]||=()=>S(on)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,x(M.value.a11y.translations.keyboardNavigation),1)],8,ot),M.value.a11y.includeTable&&gr.value.body.length?(_(),d(Be,{key:0,uid:O.value,head:gr.value.head,body:gr.value.body,caption:gr.value.caption,notice:gr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):f(``,!0),N.value.buttons.annotator&&S(H)?(_(),d(S(jt),Je({key:1},S(i)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Gn.value,svgRef:S(H),isCursorPointer:z.value,onClose:Kn}),We({_:2},[y(S(a),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(ee)(t,n))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):f(``,!0),b(e.$slots,`userConfig`,{},void 0,!0),mn.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:Vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),R.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rt,style:`width:100%;background:transparent;padding-bottom:24px`},[(_(),d(Le,{key:`title_${Ht.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),N.value.show&&It.value&&(S(sn)||S(an))?(_(),d(S(Mt),Je({ref_key:`userOptionsRef`,ref:Qt,key:`user_option_${Gt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:S(un),isImaging:S(dn),uid:O.value,hasTooltip:!1,hasLabel:!1,isFullscreen:Q.value,chartElement:T.value},S(n)(N.value,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:!1,isAnnotation:Gn.value,tableDialog:M.value.table.useDialog,style:{visibility:S(sn)?S(an)?`visible`:`hidden`:`visible`},isCursorPointer:z.value,onToggleFullscreen:Rn,onGeneratePdf:S(fn),onGenerateCsv:Yn,onGenerateImage:S(sr),onGenerateSvg:S(or),onToggleTable:qn,onToggleAnnotator:Kn,onCopyAlt:lr}),We({_:2},[y(S(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`style`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`])):f(``,!0),m(`div`,st,[(_(),p(`svg`,{ref_key:`svgRef`,ref:H,xmlns:S(_e),"aria-describedby":`chart-instructions-${O.value}`,class:Xe({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:g(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Yt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[Ke(S(Nt)),b(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:S(un)||S(dn)||S(ir),isPrintingSvg:S(ar),data:Y.value}},void 0,!0),m(`defs`,null,[(_(!0),p(l,null,y(Z.value,(e,t)=>(_(),d(He,{t:`linear`,id:`gradient-${e.id}-${O.value}`,key:`gradient-${e.id}-${O.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(_(!0),p(l,null,y(Y.value,(e,t)=>(_(),p(l,null,[(_(!0),p(l,null,y(e.datapoints,(e,t)=>(_(),d(He,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${O.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(_(!0),p(l,null,y(Y.value,(t,n)=>(_(),p(`g`,{key:`ds-${n}`},[(_(!0),p(l,null,y(t.datapoints,(t,r)=>(_(),p(`g`,{key:t.id},[e.$slots.pattern?(_(),p(`g`,lt,[m(`defs`,null,[b(e.$slots,`pattern`,Je({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${O.value}_${t.uid}`}),void 0,!0)])])):f(``,!0),m(`path`,{fill:e.$slots.pattern?`url(#pattern_${O.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:g({opacity:P.value.opacity})},null,12,ut),m(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,dt),m(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${O.value})`:`url(#gradient-single-${O.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ft),R.value.zeroLine.show?(_(),p(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,pt)):f(``,!0),P.value.maxPoint.show&&t.plots.length>1?(_(!0),p(l,{key:2},y(t.plots,e=>(_(),p(l,null,[e.isMaxPoint?(_(),p(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?S(ge)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,mt)):f(``,!0)],64))),256)):f(``,!0),t.plots.length===1?(_(),p(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,ht)):f(``,!0)]))),128)),m(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:g({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Hn.value===n||A.value&&t.uid===A.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Un(n),onMouseleave:Wn,onClick:e=>Vn(t)},x(t.name),45,gt)]))),128)),I.value.values.length?(_(),p(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Xt},[(_(!0),p(l,null,y(J.value,(t,n)=>b(e.$slots,`time-label`,Je({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(_(),p(`g`,_t,[String(t.label).includes(`
|
|
2
2
|
`)?(_(),p(`text`,{key:1,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:g({opacity:k.value?k.value.index===n?1:.2:1}),innerHTML:S(ae)({content:String(t.label),fontSize:R.value.xAxis.labels.fontSize,fill:R.value.xAxis.labels.color,stroke:R.value.backgroundColor,x:0,y:0})},null,12,yt)):(_(),p(`text`,{key:0,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,stroke:R.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:g({opacity:k.value?k.value.index===n?1:.2:1})},x(t.label),13,vt))])):f(``,!0)],!0)),256))],512)):f(``,!0),m(`g`,null,[(_(!0),p(l,null,y(J.value,(e,t)=>(_(),p(`rect`,{x:e.x,y:e.y,width:e.width<0?.1:e.width,height:e.height<0?.1:e.height,fill:`transparent`,onMouseenter:t=>An(e),onMouseleave:t=>jn(e),onClick:()=>Mn(e)},null,40,bt))),256)),F.value.show&&k.value?(_(),p(`line`,{key:0,x1:k.value.selectorX,x2:k.value.selectorX,y1:k.value.y,y2:k.value.y+k.value.height-V.value/2,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray,"stroke-linecap":`round`,style:{pointerEvents:`none`}},null,8,xt)):f(``,!0),k.value||F.value.labels.showLast?(_(!0),p(l,{key:1},y(Y.value,e=>(_(),p(l,null,[(_(!0),p(l,null,y(e.datapoints,e=>(_(),p(l,null,[(_(!0),p(l,null,y(e.plots,(t,n)=>(_(),p(l,null,[k.value&&k.value.index===n||!k.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(_(),p(`circle`,{key:0,cx:t.x,cy:t.y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?e.color:R.value.selector.dot.fill,style:{pointerEvents:`none`}},null,8,St)):f(``,!0),k.value&&k.value.index===n||!k.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(_(),p(`text`,{key:1,x:Pn(t.x,S(pe)(R.value.selector.labels.formatter,t.value,S(c)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?t.x-R.value.selector.labels.fontSize/2:t.x+R.value.selector.labels.fontSize/2,y:t.y,"dominant-baseline":`middle`,stroke:R.value.backgroundColor,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`,"paint-order":`stroke fill`,"text-anchor":Pn(t.x,S(pe)(R.value.selector.labels.formatter,t.value,S(c)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?`end`:`start`,"font-size":F.value.labels.fontSize,fill:F.value.labels.color,style:{pointerEvents:`none`}},x(S(pe)(R.value.selector.labels.formatter,t.value,S(c)({p:R.value.xAxis.labels.prefix,v:t.value,s:R.value.xAxis.labels.suffix,r:R.value.selector.labels.rounding}))),9,Ct)):f(``,!0)],64))),256))],64))),256))],64))),256)):f(``,!0)]),b(e.$slots,`svg`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:S(un)||S(dn)||S(ir),isPrintingSvg:S(ar),data:Y.value}},void 0,!0)],46,ct)),e.$slots.hint?(_(),p(`div`,wt,[b(e.$slots,`hint`,Ze(qe({hint:M.value.a11y.translations.keyboardNavigation,isVisible:$t.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(_(),p(`div`,Tt,[b(e.$slots,`watermark`,Ze(qe({isPrinting:S(un)||S(dn)||S(ir)||S(ar)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartLegend`,ref:zt},[b(e.$slots,`legend`,{legend:Z.value},()=>[R.value.legend.show?(_(),d(Ie,{key:`legend_${Wt.value}`,legendSet:Z.value,config:Ln.value,isCursorPointer:z.value,onClickMarker:o[0]||=({legend:e})=>vn(e.id)},We({item:C(({legend:e})=>[S(nn)?f(``,!0):(_(),p(`div`,{key:0,style:g(`opacity:${X.value.includes(e.id)?.5:1}`),onClick:t=>e.segregate()},x(e.name),13,Et))]),legendToggle:C(()=>[Z.value.length>2&&R.value.legend.selectAllToggle.show&&!S(nn)?(_(),d(Ve,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:X.value.length>0,isCursorPointer:z.value,onToggle:_n},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):f(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:C(({legend:e,index:t})=>[Ke(Re,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):f(``,!0)],!0)],512),e.$slots.source?(_(),p(`div`,{key:6,ref_key:`source`,ref:Bt,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),It.value&&N.value.buttons.table?(_(),d($e($n.value.component),Je({key:7},$n.value.props,{ref_key:`tableUnit`,ref:Zt,onClose:er}),We({content:C(()=>[(_(),d(S(At),{key:`table_${Ut.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:$n.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:er},{th:C(({th:e})=>[m(`div`,null,x(e),1)]),td:C(({td:e})=>[Ge(x(e.name?e.name:S(pe)(F.value.labels.formatter,e,S(c)({p:R.value.xAxis.labels.prefix,v:e,s:R.value.xAxis.labels.suffix,r:M.value.table.td.roundingValue}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:C(()=>[Ge(x($n.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:C(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:o[1]||=e=>Yn(N.value.callbacks.csv),style:g({cursor:z.value?`pointer`:`default`})},[Ke(S(Ot),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),R.value.dialog.show?(_(),d(S(Pt),{key:8,ref_key:`dialog`,ref:Jt,onClose:o[2]||=e=>A.value=null,backgroundColor:R.value.dialog.backgroundColor,color:R.value.dialog.color,headerBg:R.value.dialog.header.backgroundColor,headerColor:R.value.dialog.header.color,isFullscreen:Q.value,fullscreenParent:T.value,isCursorPointer:z.value,withPadding:``},{title:C(()=>[Ge(x(A.value.name),1)]),content:C(()=>[A.value?(_(),d(S(Dt),{key:0,config:zn.value,dataset:Bn.value,onCopyAlt:cr},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`,`isCursorPointer`])):f(``,!0),b(e.$slots,`skeleton`,{},()=>[S(nn)?(_(),d(ze,{key:0})):f(``,!0)],!0)],46,at))}},[[`__scopeId`,`data-v-58694d85`]]);export{it as n,Dt as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as ee}from"./annotationSlots-OLiW25XN.js";import{n as te,t as ne}from"./tableIntegration-CNoJ1CIY.js";import{t as re}from"./chartImage-DPGnEuYM.js";import{$ as o,D as ie,Dt as ae,Ht as oe,J as se,Jt as ce,S as le,X as ue,Yt as de,at as fe,i as pe,in as me,nt as he,t as ge,w as _e,yt as ve}from"./lib-rPeBMZrn.js";import{t as ye}from"./labelUtils-CdtU-yB_.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./useConfig-CXhXxWjB.js";import{n as Ce}from"./resolveChartConfig-0IvbmIE_.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{t as Oe}from"./useChartAccessibility-DOMuYJfm.js";import{t as ke}from"./Shape-CRe8woTu.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./vue_ui_rings-CTMi6U5j.js";import{t as Me}from"./Legend-W9YVYVX-.js";import{t as Ne}from"./BaseScanner-m6QR9rwD.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Re,Teleport as ze,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Be,createTextVNode as Ve,createVNode as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as He,nextTick as Ue,normalizeClass as h,normalizeProps as g,normalizeStyle as We,onBeforeUnmount as Ge,onMounted as Ke,openBlock as _,ref as v,renderList as qe,renderSlot as y,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as Xe,unref as b,useSlots as Ze,watch as x,withCtx as S,withModifiers as Qe}from"vue";var $e=/* @__PURE__ */ e({default:()=>xt}),et=[`id`],tt=[`id`],nt=[`id`],rt={style:{position:`relative`}},it=[`xmlns`,`viewBox`,`aria-describedby`],at=[`width`,`height`],ot={key:1},st=[`onAnimationend`],ct=[`stroke`,`cx`,`cy`,`r`,`fill`],lt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],ut=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],dt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`x`,`y`,`width`,`height`,`fill`,`rx`],pt=[`cx`,`cy`,`r`,`fill`,`stroke`],mt=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],ht={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},gt={key:5,class:`vue-data-ui-watermark`},_t=[`id`],vt=[`onClick`],yt={key:0},bt={key:1},xt=/*#__PURE__*/ Le({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Le,emit:$e}){let xt=p(()=>import(`./Tooltip-B432XpvC.js`)),St=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ct=p(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),wt=p(()=>import(`./DataTable-KeuZB1JM.js`)),Tt=p(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Et=p(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Dt=p(()=>import(`./PackageVersion-D8aPzzvh.js`).then(e=>e.t)),Ot=p(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_rings:kt}=Se(),At=Ze(),C=e;function jt(e){return Array.isArray(e)&&e.length>0&&Array.from(e,e=>e&&Object.keys(e).includes(`name`)&&Array.isArray(e.values)&&e.values.length>0).every(Boolean)}let Mt=s(()=>jt(C.dataset)),w=v(ue()),Nt=v(!1),Pt=v(``),T=v(null),Ft=v(0),E=v(null),It=v(null),Lt=v(null),Rt=v(null),zt=v(null),Bt=v(!1),Vt=v(!1),Ht=v(null),Ut=v(null),D=v(null),Wt=v({x:0,y:0}),Gt=v(`pointer`),Kt=v(!1),O=v(Qt());x(()=>C.config,()=>{O.value=Qt()},{deep:!0});let k=s(()=>!!C.config.loading||!Mt.value),A=s(()=>k.value?me({defaultConfig:O.value,userConfig:qt.value}):O.value),qt=s(()=>me({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{rings:{stroke:`#6A6A6A`,gradient:{underlayerColor:`#FFFFFF`}},labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`}}}},userConfig:O.value.skeletonConfig??{}})),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.rings),N=s(()=>A.value.style.chart.layout.labels),P=s(()=>A.value.style.chart.tooltip),F=s(()=>A.value.style.chart);be({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiRings`,rules:[xe.singleSeries,xe.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. 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:I}=De({config:()=>A.value.transitions,dataset:()=>C.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),Jt=s(()=>k.value?jt(C.config.skeletonDataset)?C.config.skeletonDataset:[{name:`_`,values:[13],color:`#808080`},{name:`_`,values:[8],color:`#969696`},{name:`_`,values:[5],color:`#ADADAD`},{name:`_`,values:[3],color:`#C4C4C4`},{name:`_`,values:[2],color:`#DBDBDB`}]:C.dataset),Yt=v(!A.value.userOptions.showOnChartHover),Xt=s(()=>A.value.userOptions.keepStateOnChartLeave);function Zt(e=!1){A.value.userOptions.showOnChartHover&&(Yt.value=e)}x(()=>A.value.userOptions.showOnChartHover,e=>{Yt.value=!e});let{svgRef:R}=Oe({config:F.value.title});function Qt(){return Ce(C.config,kt,je)}let $t=s(()=>{let{markers:e}=N.value.dataLabels,t=Pn.value/2,n=pn.value?e.position===`left`?t:-t:0,r=pn.value?U.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*U.value.width,y:0/F.value.size*U.value.height}}),z=s(()=>({x:U.value.width/2+$t.value.x,y:U.value.height/2+$t.value.y})),en=Ye(null),tn=Ye(null),B=null,nn=!1,V=s(()=>O.value.debug);function rn(){!Array.isArray(C.dataset)||!C.dataset.length?fe({componentName:`VueUiRings`,type:`dataset`,debug:V.value}):Array.from(C.dataset).forEach((e,t)=>{ve({datasetObject:e??{},requiredAttributes:[`name`,`values`]}).forEach(e=>{fe({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:V.value})}),V.value&&(Array.isArray(e?.values)?e.values.length||fe({componentName:`VueUiRings`,type:`dataset`,debug:!0}):e&&Object.keys(e).includes(`values`)&&console.warn(`VueUiRings: dataset[${t}].values must be an array.`))})}x([()=>C.dataset,V],rn,{immediate:!0,deep:!0});function an(){en.value?.disconnect(),en.value=null,B!==null&&cancelAnimationFrame(B),B=null,Bt.value=!1}function on(){if(an(),tn.value=null,!A.value.responsive||!E.value?.parentNode)return;let e=new ResizeObserver(t);function t(){nn||en.value!==e||(B!==null&&cancelAnimationFrame(B),Bt.value=!0,B=requestAnimationFrame(()=>{if(nn||en.value!==e)return;B=null;let{width:t,height:n}=Te({chart:E.value,title:F.value.title.text?It.value:null,legend:F.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value});tn.value={width:Math.max(.1,t),height:Math.max(.1,n-12)},Bt.value=!1}))}en.value=e;for(let t of[E.value.parentNode,It.value,Lt.value,Rt.value,zt.value])t&&e.observe(t);t()}x([()=>A.value.responsive,It,Lt,Rt,zt,()=>F.value.title.text,()=>F.value.legend.show,()=>F.value.legend.position],on,{flush:`post`}),Ke(()=>{Vt.value=!0,on()}),Ge(()=>{nn=!0,an()});let{isPrinting:sn,isImaging:cn,generatePdf:ln,generateImage:un}=we({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),dn=s(()=>A.value.userOptions.show&&!F.value.title.text),fn=s(()=>_e(A.value.customPalette)),H=v({showTable:O.value.table.show,showTooltip:O.value.style.chart.tooltip.show,showLabels:O.value.style.chart.layout.labels.dataLabels.show});x(()=>O.value.table.show,e=>{H.value.showTable=e}),x(()=>O.value.style.chart.tooltip.show,e=>{H.value.showTooltip=e}),x(()=>O.value.style.chart.layout.labels.dataLabels.show,e=>{H.value.showLabels=e});let pn=s(()=>k.value?N.value.dataLabels.show:H.value.showLabels),U=s(()=>tn.value??{height:F.value.size,width:F.value.size}),mn=s(()=>Math.min(U.value.height,U.value.width)),hn=$e,gn=v(/* @__PURE__ */ new Set);function _n(e){gn.value.add(e)}function vn(){G.value.forEach(e=>_n(e.uid))}let W=v([]);function yn(){k.value||(vn(),W.value.length?W.value=[]:jn.value.forEach(e=>{W.value.push(e.uid)}),bn())}function bn(){hn(`selectLegend`,q.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function xn(e){if(!k.value){if(vn(),W.value.includes(e))W.value=W.value.filter(t=>t!==e);else{if(W.value.length===G.value.length-1)return;W.value.push(e)}bn()}}function Sn(e){return G.value.length?G.value.find(t=>t.name===e)||(V.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(V.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function Cn(e){let t=Sn(e);t!==null&&W.value.includes(t.uid)&&xn(t.uid)}function wn(e){let t=Sn(e);t!==null&&(W.value.includes(t.uid)||xn(t.uid))}let Tn=/* @__PURE__ */ new Map,En=s(()=>{let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Set,n=Jt.value.map((n,r)=>{let i=e.get(n.name)??0;e.set(n.name,i+1);let a=JSON.stringify([k.value,n.name,i]);return t.add(a),Tn.has(a)||Tn.set(a,ue()),{name:n.name,color:n.color,absoluteValues:n.values,value:n.values.reduce((e,t)=>e+(Number.isFinite(t)?t:0),0),uid:Tn.get(a),absoluteIndex:r}});for(let e of Tn.keys())e.startsWith(`[${k.value},`)&&!t.has(e)&&Tn.delete(e);let r=n.reduce((e,t)=>e+t.value,0);return n.map(e=>({...e,proportion:Dn(e.value,r)}))});function Dn(e,t){let n=e/t;return Number.isFinite(n)?n:0}let G=s(()=>En.value.map((e,t)=>({...e,color:e.color||le(e.color)||fn.value[t]||oe[t%oe.length]}))),On=s(()=>G.value.filter(e=>!W.value.includes(e.uid))),kn=s(()=>On.value.reduce((e,t)=>Math.max(e,t.value),-1/0));function An(e){return Dn(e,kn.value)}let jn=s(()=>G.value.map((e,t)=>{let n=pe(N.value.dataLabels.formatter,e.value,o({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=Number.isFinite(e.value/K.value)?o({v:e.value/K.value*100,s:`%`,r:F.value.legend.roundingPercentage}):`-`,i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:W.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:W.value.includes(e.uid)?.5:1,segregate:()=>xn(e.uid),isSegregated:W.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Mn=s(()=>({cy:`rings-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),K=s(()=>On.value.reduce((e,t)=>e+t.value,0)),q=s(()=>On.value.map(e=>({...e,proportion:An(e.value),percentage:Dn(e.value,K.value)*100,strokeWidth:M.value.strokeWidth*An(e.value)})).toSorted((e,t)=>t.value-e.value));x(()=>En.value.map(e=>e.uid),e=>{k.value||(W.value=W.value.filter(t=>e.includes(t)))});function Nn(){return q.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Pn=s(()=>mn.value-M.value.strokeWidth*2);function Fn(e,t){k.value||A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function J(){Un.value=null,T.value=null,Nt.value=!1,D.value=null,Gt.value=`pointer`,Y.value=null,Pt.value=``}function In(e,t){k.value||(J(),A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Ln({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.dataLabels;return ye({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=pe(t.formatter,e.value,o({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=o({v:e.percentage,s:`%`,r:t.roundingPercentage});return`${e.name}\n${Ln({val:n,percentage:r,showVal:t.showValue,showPercentage:t.showPercentage})}`}function zn(e){return Math.max(1e-4,Pn.value*e.proportion/2*.9)}let Bn=s(()=>z.value.y+(q.value.length?zn(q.value[0]):0));function Vn(e){return Bn.value-zn(e)}function Hn(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Pn.value/2):Pn.value/2;return{x:z.value.x+n,y:Vn(e,t)-zn(e)}}let Y=v(null),Un=v(null);function Wn(e,t,n=`pointer`,r=!0){if(k.value||!e||(r&&A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),W.value.length===C.dataset.length))return;Y.value={datapoint:e,seriesIndex:t,series:q.value,config:A.value},Un.value=e.uid,T.value=t,D.value=t,Gt.value=n;let i=q.value[t],a=P.value.customFormat,ee=ae(a)?a(Y.value):null;if(typeof ee==`string`)Pt.value=ee;else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${i.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${i.color}" />${At.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${w.value}_${e.absoluteIndex})" />`:``}</svg>`,n+=`<b>${Ln({showVal:P.value.showValue,showPercentage:P.value.showPercentage,val:`<span>${pe(N.value.dataLabels.formatter,i.value,o({p:N.value.dataLabels.prefix,v:i.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:o({v:i.percentage,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Pt.value=n}Nt.value=!0}let X=s(()=>({head:q.value.map(e=>({name:e.name,color:e.color})),body:q.value.map(e=>e.value)})),Z=s(()=>{let e=[`__SUM__`,o({p:N.value.dataLabels.prefix,v:K.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=X.value.head.map((e,t)=>[{color:e.color,name:e.name},o({p:N.value.dataLabels.prefix,v:X.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),Number.isFinite(X.value.body[t]/K.value)?(X.value.body[t]/K.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`:`-`]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}});function Gn(e=null){Ue(()=>{let t=X.value.head.map((e,t)=>[[e.name],[X.value.body[t]],[Number.isFinite(X.value.body[t]/K.value)?X.value.body[t]/K.value*100:`-`]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[A.value.table.columnNames.series],[A.value.table.columnNames.value],[A.value.table.columnNames.percentage]]].concat(t),r=ie(n);e?e(r):he({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let Q=v(!1);function Kn(e){Q.value=e,Ft.value+=1}function qn(){H.value.showTable=!H.value.showTable}function Jn(){H.value.showTooltip=!H.value.showTooltip}function Yn(){H.value.showLabels=!pn.value}let Xn=v(!1);function Zn(){Xn.value=!Xn.value}let Qn=re(E,()=>F.value.title.text),$n=s(()=>ne({config:A,style:F,mutableConfig:H,dialog:Ot,accordion:Ct,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:L}));x([()=>H.value.showTable,Ht,()=>A.value.table.useDialog],([e])=>{Ht.value&&te(e,A,Ht)},{flush:`post`});function er(){H.value.showTable=!1,Ut.value&&Ut.value.setTableIconState(!1)}let tr=s(()=>jn.value.map(e=>({...e,name:e.display}))),nr=s(()=>F.value.backgroundColor),rr=s(()=>F.value.legend),ir=s(()=>F.value.title),{isCallbackImaging:ar,isCallbackSvg:or,generateSvg:sr,onGenerateImage:cr}=Ee({svg:R,title:ir,legend:rr,legendItems:tr,backgroundColor:nr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:un});async function lr(){hn(`copyAlt`,{config:A.value,dataset:q.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){J(),Kt.value=!0}function dr(){J(),Kt.value=!1}function fr(e){if(!R.value||Xn.value||k.value||document.activeElement!==R.value||!q.value.length||W.value.length===C.dataset.length)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){J();return}if(r){if(D.value===null)return;let e=q.value[D.value];if(!e)return;Fn(e,D.value);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));let ee=q.value[a];ee&&(pr(a),Wn(ee,a,`keyboard`))}function pr(e){if(!Number.isFinite(e)||!R.value)return;let t=q.value[e];if(!t)return;let n=Hn(t,e),r=R.value.getBoundingClientRect();Wt.value={x:r.left+n.x/U.value.width*r.width,y:r.top+n.y/U.value.height*r.height}}x([q,U,z,P,()=>A.value],()=>{if(Un.value===null)return;let e=q.value.findIndex(e=>e.uid===Un.value);k.value||e<0?J():(Gt.value===`keyboard`&&pr(e),Wn(q.value[e],e,Gt.value,!1))},{flush:`post`});let mr=s(()=>q.value.map(Rn)),$=s(()=>q.value.map((e,t)=>({radius:zn(e),y:Vn(e,t),marker:Hn(e,t)}))),hr=s(()=>({headers:Z.value?.colNames??[],rows:Z.value?.a11yBody??[]}));return Le({getData:Nn,getImage:Qn,generatePdf:ln,generateCsv:Gn,generateImage:un,generateSvg:sr,hideSeries:wn,showSeries:Cn,toggleTable:qn,toggleTooltip:Jn,toggleAnnotator:Zn,toggleFullscreen:Kn,toggleLabels:Yn,copyAlt:lr}),(e,te)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:E,class:h(`vue-data-ui-component vue-ui-rings ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:We(`font-family:${A.value.style.fontFamily};text-align:center;width:100%;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),id:`rings_${w.value}`,onMouseleave:te[2]||=e=>{J(),Zt(!1)},onMouseenter:te[3]||=()=>Zt(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,Xe(A.value.a11y.translations.keyboardNavigation),1)],8,tt),A.value.a11y.includeTable&&hr.value?.rows?.length?(_(),c(Pe,{key:0,uid:w.value,head:hr.value.headers,body:hr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(_(),c(b(Tt),He({key:1},b(a)(j.value.annotator),{svgRef:b(R),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Xn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Zn}),Be({_:2},[qe(b(ee),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),dn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),F.value.title.text?(_(),u(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent`},[f(Ae,{config:{title:{cy:`rings-div-title`,...F.value.title},subtitle:{cy:`rings-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`])],512)):l(``,!0),d(`div`,{id:`legend-top-${w.value}`},null,8,nt),j.value.show&&Mt.value&&(Xt.value||Yt.value)?(_(),c(b(Et),He({ref_key:`userOptionsRef`,ref:Ut,key:`user_options_${Ft.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(sn),isImaging:b(cn),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,isTooltip:H.value.showTooltip,isFullscreen:Q.value,chartElement:E.value},b(n)(j.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:Xn.value,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Kn,onGeneratePdf:b(ln),onGenerateCsv:Gn,onGenerateImage:b(cr),onGenerateSvg:b(sr),onToggleTable:qn,onToggleTooltip:Jn,onToggleAnnotator:Zn,onToggleLabels:Yn,onCopyAlt:lr,style:{visibility:Xt.value?Yt.value?`visible`:`hidden`:`visible`}}),Be({_:2},[qe(b(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):l(``,!0),d(`div`,rt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:R,xmlns:b(ge),class:h({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,resizing:Bt.value||k.value,"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`,style:We(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[f(b(Dt)),y(e.$slots,`svg-underlayer`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`foreignObject`,{key:0,x:0,y:0,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,at)):l(``,!0),d(`defs`,null,[(_(!0),u(Re,null,qe(q.value,(e,t)=>(_(),c(Ie,{t:`radial`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${w.value}_${t}`,key:`gradient_${w.value}_${t}`,stops:[[`0%`,b(ce)(b(de)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,ot,[(_(!0),u(Re,null,qe(G.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,He({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(Re,null,qe(q.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`,onAnimationend:Qe(e=>_n(t.uid),[`self`]),class:h({"vue-rings-item-onload":A.value.useCssAnimation&&A.value.transitions.enable&&!k.value&&!gn.value.has(t.uid)}),style:We({transformOrigin:`${z.value.x}px ${Bn.value}px`,animationDelay:`${(q.value.length-1-n)*100}ms`})},[d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-opacity":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.underlayerColor},null,10,ct),d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,10,lt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,10,ut)):l(``,!0),d(`circle`,{stroke:`none`,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`transparent`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,dt),pn.value?(_(),u(Re,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?$.value[n].marker.x:z.value.x,y:$.value[n].marker.y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(z.value.x-$.value[n].marker.x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,ft),d(`circle`,{cx:$.value[n].marker.x,cy:$.value[n].marker.y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,pt),d(`text`,{"text-anchor":N.value.dataLabels.markers.position===`left`?`end`:`start`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),transform:`translate(${$.value[n].marker.x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${$.value[n].marker.y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(se)({content:mr.value[n],fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,mt)],64)):l(``,!0)],46,st))),128)),y(e.$slots,`svg`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0)],46,it)),e.$slots.hint?(_(),u(`div`,ht,[y(e.$slots,`hint`,g(m({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,gt,[y(e.$slots,`watermark`,g(m({isPrinting:b(sn)||b(cn)||b(ar)||b(or)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,_t),Vt.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(ze,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Lt},[y(e.$slots,`legend`,{legend:jn.value},()=>[F.value.legend.show?(_(),c(Me,{key:0,legendSet:jn.value,config:Mn.value,isCursorPointer:L.value,onClickMarker:te[0]||=({legend:e})=>xn(e.uid)},Be({item:S(({legend:e,index:t})=>[k.value?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>xn(e.uid),style:We(`opacity:${W.value.includes(e.uid)?.5:1}`)},Xe(e.display),13,vt))]),legendToggle:S(()=>[jn.value.length>2&&F.value.legend.selectAllToggle.show&&!k.value?(_(),c(Fe,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:L.value,onToggle:yn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:S(({legend:e,index:t})=>[f(ke,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${e.absoluteIndex})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(_(),u(`div`,{key:7,ref_key:`source`,ref:Rt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),f(b(xt),{teleportTo:P.value.teleportTo,show:H.value.showTooltip&&Nt.value&&W.value.length<C.dataset.length,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:E.value,content:Pt.value,isFullscreen:Q.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:Gt.value===`keyboard`,a11yPosition:Wt.value},{"tooltip-before":S(()=>[y(e.$slots,`tooltip-before`,g(m({...Y.value})),void 0,!0)]),tooltip:S(()=>[y(e.$slots,`tooltip`,g(m({...Y.value})),void 0,!0)]),"tooltip-after":S(()=>[y(e.$slots,`tooltip-after`,g(m({...Y.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),!k.value&&Mt.value&&j.value.buttons.table?(_(),c(Je($n.value.component),He({key:8},$n.value.props,{ref_key:`tableUnit`,ref:Ht,onClose:er}),Be({content:S(()=>[f(b(wt),{colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:A.value.table.useDialog?``:$n.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:er},{th:S(({th:e})=>[e===`__SUM__`?(_(),u(`div`,yt,[f(b(St),{name:`sigma`,stroke:Z.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,bt,Xe(e),1))]),td:S(({td:e})=>[Ve(Xe(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Ve(Xe($n.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:te[1]||=e=>Gn(j.value.callbacks.csv),style:We({cursor:L.value?`pointer`:`default`})},[f(b(St),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[k.value?(_(),c(Ne,{key:0})):l(``,!0)],!0)],46,et))}},[[`__scopeId`,`data-v-5087967c`]]);export{$e as n,xt as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as ee}from"./annotationSlots-OLiW25XN.js";import{n as te,t as ne}from"./tableIntegration-CNoJ1CIY.js";import{t as re}from"./chartImage-DPGnEuYM.js";import{$ as o,D as ie,Dt as ae,Ht as oe,J as se,Jt as ce,S as le,X as ue,Yt as de,at as fe,i as pe,in as me,nt as he,t as ge,w as _e,yt as ve}from"./lib-rPeBMZrn.js";import{t as ye}from"./labelUtils-CdtU-yB_.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./useConfig-CXhXxWjB.js";import{n as Ce}from"./resolveChartConfig-0IvbmIE_.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{t as Oe}from"./useChartAccessibility-DOMuYJfm.js";import{t as ke}from"./Shape-CRe8woTu.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./vue_ui_rings-CTMi6U5j.js";import{t as Me}from"./Legend-W9YVYVX-.js";import{t as Ne}from"./BaseScanner-m6QR9rwD.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Re,Teleport as ze,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Be,createTextVNode as Ve,createVNode as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as He,nextTick as Ue,normalizeClass as h,normalizeProps as g,normalizeStyle as We,onBeforeUnmount as Ge,onMounted as Ke,openBlock as _,ref as v,renderList as qe,renderSlot as y,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as Xe,unref as b,useSlots as Ze,watch as x,withCtx as S,withModifiers as Qe}from"vue";var $e=/* @__PURE__ */ e({default:()=>xt}),et=[`id`],tt=[`id`],nt=[`id`],rt={style:{position:`relative`}},it=[`xmlns`,`viewBox`,`aria-describedby`],at=[`width`,`height`],ot={key:1},st=[`onAnimationend`],ct=[`stroke`,`cx`,`cy`,`r`,`fill`],lt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],ut=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],dt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`x`,`y`,`width`,`height`,`fill`,`rx`],pt=[`cx`,`cy`,`r`,`fill`,`stroke`],mt=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],ht={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},gt={key:5,class:`vue-data-ui-watermark`},_t=[`id`],vt=[`onClick`],yt={key:0},bt={key:1},xt=/*#__PURE__*/ Le({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Le,emit:$e}){let xt=p(()=>import(`./Tooltip-B432XpvC.js`)),St=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ct=p(()=>import(`./vue-ui-accordion-D3uT1Ynv.js`).then(e=>e.n)),wt=p(()=>import(`./DataTable-KeuZB1JM.js`)),Tt=p(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Et=p(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Dt=p(()=>import(`./PackageVersion-C1vtZkKc.js`).then(e=>e.t)),Ot=p(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_rings:kt}=Se(),At=Ze(),C=e;function jt(e){return Array.isArray(e)&&e.length>0&&Array.from(e,e=>e&&Object.keys(e).includes(`name`)&&Array.isArray(e.values)&&e.values.length>0).every(Boolean)}let Mt=s(()=>jt(C.dataset)),w=v(ue()),Nt=v(!1),Pt=v(``),T=v(null),Ft=v(0),E=v(null),It=v(null),Lt=v(null),Rt=v(null),zt=v(null),Bt=v(!1),Vt=v(!1),Ht=v(null),Ut=v(null),D=v(null),Wt=v({x:0,y:0}),Gt=v(`pointer`),Kt=v(!1),O=v(Qt());x(()=>C.config,()=>{O.value=Qt()},{deep:!0});let k=s(()=>!!C.config.loading||!Mt.value),A=s(()=>k.value?me({defaultConfig:O.value,userConfig:qt.value}):O.value),qt=s(()=>me({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{rings:{stroke:`#6A6A6A`,gradient:{underlayerColor:`#FFFFFF`}},labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`}}}},userConfig:O.value.skeletonConfig??{}})),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.rings),N=s(()=>A.value.style.chart.layout.labels),P=s(()=>A.value.style.chart.tooltip),F=s(()=>A.value.style.chart);be({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiRings`,rules:[xe.singleSeries,xe.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. 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:I}=De({config:()=>A.value.transitions,dataset:()=>C.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),Jt=s(()=>k.value?jt(C.config.skeletonDataset)?C.config.skeletonDataset:[{name:`_`,values:[13],color:`#808080`},{name:`_`,values:[8],color:`#969696`},{name:`_`,values:[5],color:`#ADADAD`},{name:`_`,values:[3],color:`#C4C4C4`},{name:`_`,values:[2],color:`#DBDBDB`}]:C.dataset),Yt=v(!A.value.userOptions.showOnChartHover),Xt=s(()=>A.value.userOptions.keepStateOnChartLeave);function Zt(e=!1){A.value.userOptions.showOnChartHover&&(Yt.value=e)}x(()=>A.value.userOptions.showOnChartHover,e=>{Yt.value=!e});let{svgRef:R}=Oe({config:F.value.title});function Qt(){return Ce(C.config,kt,je)}let $t=s(()=>{let{markers:e}=N.value.dataLabels,t=Pn.value/2,n=pn.value?e.position===`left`?t:-t:0,r=pn.value?U.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*U.value.width,y:0/F.value.size*U.value.height}}),z=s(()=>({x:U.value.width/2+$t.value.x,y:U.value.height/2+$t.value.y})),en=Ye(null),tn=Ye(null),B=null,nn=!1,V=s(()=>O.value.debug);function rn(){!Array.isArray(C.dataset)||!C.dataset.length?fe({componentName:`VueUiRings`,type:`dataset`,debug:V.value}):Array.from(C.dataset).forEach((e,t)=>{ve({datasetObject:e??{},requiredAttributes:[`name`,`values`]}).forEach(e=>{fe({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:V.value})}),V.value&&(Array.isArray(e?.values)?e.values.length||fe({componentName:`VueUiRings`,type:`dataset`,debug:!0}):e&&Object.keys(e).includes(`values`)&&console.warn(`VueUiRings: dataset[${t}].values must be an array.`))})}x([()=>C.dataset,V],rn,{immediate:!0,deep:!0});function an(){en.value?.disconnect(),en.value=null,B!==null&&cancelAnimationFrame(B),B=null,Bt.value=!1}function on(){if(an(),tn.value=null,!A.value.responsive||!E.value?.parentNode)return;let e=new ResizeObserver(t);function t(){nn||en.value!==e||(B!==null&&cancelAnimationFrame(B),Bt.value=!0,B=requestAnimationFrame(()=>{if(nn||en.value!==e)return;B=null;let{width:t,height:n}=Te({chart:E.value,title:F.value.title.text?It.value:null,legend:F.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value});tn.value={width:Math.max(.1,t),height:Math.max(.1,n-12)},Bt.value=!1}))}en.value=e;for(let t of[E.value.parentNode,It.value,Lt.value,Rt.value,zt.value])t&&e.observe(t);t()}x([()=>A.value.responsive,It,Lt,Rt,zt,()=>F.value.title.text,()=>F.value.legend.show,()=>F.value.legend.position],on,{flush:`post`}),Ke(()=>{Vt.value=!0,on()}),Ge(()=>{nn=!0,an()});let{isPrinting:sn,isImaging:cn,generatePdf:ln,generateImage:un}=we({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),dn=s(()=>A.value.userOptions.show&&!F.value.title.text),fn=s(()=>_e(A.value.customPalette)),H=v({showTable:O.value.table.show,showTooltip:O.value.style.chart.tooltip.show,showLabels:O.value.style.chart.layout.labels.dataLabels.show});x(()=>O.value.table.show,e=>{H.value.showTable=e}),x(()=>O.value.style.chart.tooltip.show,e=>{H.value.showTooltip=e}),x(()=>O.value.style.chart.layout.labels.dataLabels.show,e=>{H.value.showLabels=e});let pn=s(()=>k.value?N.value.dataLabels.show:H.value.showLabels),U=s(()=>tn.value??{height:F.value.size,width:F.value.size}),mn=s(()=>Math.min(U.value.height,U.value.width)),hn=$e,gn=v(/* @__PURE__ */ new Set);function _n(e){gn.value.add(e)}function vn(){G.value.forEach(e=>_n(e.uid))}let W=v([]);function yn(){k.value||(vn(),W.value.length?W.value=[]:jn.value.forEach(e=>{W.value.push(e.uid)}),bn())}function bn(){hn(`selectLegend`,q.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function xn(e){if(!k.value){if(vn(),W.value.includes(e))W.value=W.value.filter(t=>t!==e);else{if(W.value.length===G.value.length-1)return;W.value.push(e)}bn()}}function Sn(e){return G.value.length?G.value.find(t=>t.name===e)||(V.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(V.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function Cn(e){let t=Sn(e);t!==null&&W.value.includes(t.uid)&&xn(t.uid)}function wn(e){let t=Sn(e);t!==null&&(W.value.includes(t.uid)||xn(t.uid))}let Tn=/* @__PURE__ */ new Map,En=s(()=>{let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Set,n=Jt.value.map((n,r)=>{let i=e.get(n.name)??0;e.set(n.name,i+1);let a=JSON.stringify([k.value,n.name,i]);return t.add(a),Tn.has(a)||Tn.set(a,ue()),{name:n.name,color:n.color,absoluteValues:n.values,value:n.values.reduce((e,t)=>e+(Number.isFinite(t)?t:0),0),uid:Tn.get(a),absoluteIndex:r}});for(let e of Tn.keys())e.startsWith(`[${k.value},`)&&!t.has(e)&&Tn.delete(e);let r=n.reduce((e,t)=>e+t.value,0);return n.map(e=>({...e,proportion:Dn(e.value,r)}))});function Dn(e,t){let n=e/t;return Number.isFinite(n)?n:0}let G=s(()=>En.value.map((e,t)=>({...e,color:e.color||le(e.color)||fn.value[t]||oe[t%oe.length]}))),On=s(()=>G.value.filter(e=>!W.value.includes(e.uid))),kn=s(()=>On.value.reduce((e,t)=>Math.max(e,t.value),-1/0));function An(e){return Dn(e,kn.value)}let jn=s(()=>G.value.map((e,t)=>{let n=pe(N.value.dataLabels.formatter,e.value,o({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=Number.isFinite(e.value/K.value)?o({v:e.value/K.value*100,s:`%`,r:F.value.legend.roundingPercentage}):`-`,i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:W.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:W.value.includes(e.uid)?.5:1,segregate:()=>xn(e.uid),isSegregated:W.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Mn=s(()=>({cy:`rings-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),K=s(()=>On.value.reduce((e,t)=>e+t.value,0)),q=s(()=>On.value.map(e=>({...e,proportion:An(e.value),percentage:Dn(e.value,K.value)*100,strokeWidth:M.value.strokeWidth*An(e.value)})).toSorted((e,t)=>t.value-e.value));x(()=>En.value.map(e=>e.uid),e=>{k.value||(W.value=W.value.filter(t=>e.includes(t)))});function Nn(){return q.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Pn=s(()=>mn.value-M.value.strokeWidth*2);function Fn(e,t){k.value||A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function J(){Un.value=null,T.value=null,Nt.value=!1,D.value=null,Gt.value=`pointer`,Y.value=null,Pt.value=``}function In(e,t){k.value||(J(),A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Ln({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.dataLabels;return ye({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=pe(t.formatter,e.value,o({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=o({v:e.percentage,s:`%`,r:t.roundingPercentage});return`${e.name}\n${Ln({val:n,percentage:r,showVal:t.showValue,showPercentage:t.showPercentage})}`}function zn(e){return Math.max(1e-4,Pn.value*e.proportion/2*.9)}let Bn=s(()=>z.value.y+(q.value.length?zn(q.value[0]):0));function Vn(e){return Bn.value-zn(e)}function Hn(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Pn.value/2):Pn.value/2;return{x:z.value.x+n,y:Vn(e,t)-zn(e)}}let Y=v(null),Un=v(null);function Wn(e,t,n=`pointer`,r=!0){if(k.value||!e||(r&&A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),W.value.length===C.dataset.length))return;Y.value={datapoint:e,seriesIndex:t,series:q.value,config:A.value},Un.value=e.uid,T.value=t,D.value=t,Gt.value=n;let i=q.value[t],a=P.value.customFormat,ee=ae(a)?a(Y.value):null;if(typeof ee==`string`)Pt.value=ee;else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${i.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${i.color}" />${At.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${w.value}_${e.absoluteIndex})" />`:``}</svg>`,n+=`<b>${Ln({showVal:P.value.showValue,showPercentage:P.value.showPercentage,val:`<span>${pe(N.value.dataLabels.formatter,i.value,o({p:N.value.dataLabels.prefix,v:i.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:o({v:i.percentage,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Pt.value=n}Nt.value=!0}let X=s(()=>({head:q.value.map(e=>({name:e.name,color:e.color})),body:q.value.map(e=>e.value)})),Z=s(()=>{let e=[`__SUM__`,o({p:N.value.dataLabels.prefix,v:K.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=X.value.head.map((e,t)=>[{color:e.color,name:e.name},o({p:N.value.dataLabels.prefix,v:X.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),Number.isFinite(X.value.body[t]/K.value)?(X.value.body[t]/K.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`:`-`]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}});function Gn(e=null){Ue(()=>{let t=X.value.head.map((e,t)=>[[e.name],[X.value.body[t]],[Number.isFinite(X.value.body[t]/K.value)?X.value.body[t]/K.value*100:`-`]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[A.value.table.columnNames.series],[A.value.table.columnNames.value],[A.value.table.columnNames.percentage]]].concat(t),r=ie(n);e?e(r):he({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let Q=v(!1);function Kn(e){Q.value=e,Ft.value+=1}function qn(){H.value.showTable=!H.value.showTable}function Jn(){H.value.showTooltip=!H.value.showTooltip}function Yn(){H.value.showLabels=!pn.value}let Xn=v(!1);function Zn(){Xn.value=!Xn.value}let Qn=re(E,()=>F.value.title.text),$n=s(()=>ne({config:A,style:F,mutableConfig:H,dialog:Ot,accordion:Ct,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:L}));x([()=>H.value.showTable,Ht,()=>A.value.table.useDialog],([e])=>{Ht.value&&te(e,A,Ht)},{flush:`post`});function er(){H.value.showTable=!1,Ut.value&&Ut.value.setTableIconState(!1)}let tr=s(()=>jn.value.map(e=>({...e,name:e.display}))),nr=s(()=>F.value.backgroundColor),rr=s(()=>F.value.legend),ir=s(()=>F.value.title),{isCallbackImaging:ar,isCallbackSvg:or,generateSvg:sr,onGenerateImage:cr}=Ee({svg:R,title:ir,legend:rr,legendItems:tr,backgroundColor:nr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:un});async function lr(){hn(`copyAlt`,{config:A.value,dataset:q.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){J(),Kt.value=!0}function dr(){J(),Kt.value=!1}function fr(e){if(!R.value||Xn.value||k.value||document.activeElement!==R.value||!q.value.length||W.value.length===C.dataset.length)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){J();return}if(r){if(D.value===null)return;let e=q.value[D.value];if(!e)return;Fn(e,D.value);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));let ee=q.value[a];ee&&(pr(a),Wn(ee,a,`keyboard`))}function pr(e){if(!Number.isFinite(e)||!R.value)return;let t=q.value[e];if(!t)return;let n=Hn(t,e),r=R.value.getBoundingClientRect();Wt.value={x:r.left+n.x/U.value.width*r.width,y:r.top+n.y/U.value.height*r.height}}x([q,U,z,P,()=>A.value],()=>{if(Un.value===null)return;let e=q.value.findIndex(e=>e.uid===Un.value);k.value||e<0?J():(Gt.value===`keyboard`&&pr(e),Wn(q.value[e],e,Gt.value,!1))},{flush:`post`});let mr=s(()=>q.value.map(Rn)),$=s(()=>q.value.map((e,t)=>({radius:zn(e),y:Vn(e,t),marker:Hn(e,t)}))),hr=s(()=>({headers:Z.value?.colNames??[],rows:Z.value?.a11yBody??[]}));return Le({getData:Nn,getImage:Qn,generatePdf:ln,generateCsv:Gn,generateImage:un,generateSvg:sr,hideSeries:wn,showSeries:Cn,toggleTable:qn,toggleTooltip:Jn,toggleAnnotator:Zn,toggleFullscreen:Kn,toggleLabels:Yn,copyAlt:lr}),(e,te)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:E,class:h(`vue-data-ui-component vue-ui-rings ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:We(`font-family:${A.value.style.fontFamily};text-align:center;width:100%;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),id:`rings_${w.value}`,onMouseleave:te[2]||=e=>{J(),Zt(!1)},onMouseenter:te[3]||=()=>Zt(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,Xe(A.value.a11y.translations.keyboardNavigation),1)],8,tt),A.value.a11y.includeTable&&hr.value?.rows?.length?(_(),c(Pe,{key:0,uid:w.value,head:hr.value.headers,body:hr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(_(),c(b(Tt),He({key:1},b(a)(j.value.annotator),{svgRef:b(R),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Xn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Zn}),Be({_:2},[qe(b(ee),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),dn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),F.value.title.text?(_(),u(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent`},[f(Ae,{config:{title:{cy:`rings-div-title`,...F.value.title},subtitle:{cy:`rings-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`])],512)):l(``,!0),d(`div`,{id:`legend-top-${w.value}`},null,8,nt),j.value.show&&Mt.value&&(Xt.value||Yt.value)?(_(),c(b(Et),He({ref_key:`userOptionsRef`,ref:Ut,key:`user_options_${Ft.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(sn),isImaging:b(cn),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,isTooltip:H.value.showTooltip,isFullscreen:Q.value,chartElement:E.value},b(n)(j.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:Xn.value,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Kn,onGeneratePdf:b(ln),onGenerateCsv:Gn,onGenerateImage:b(cr),onGenerateSvg:b(sr),onToggleTable:qn,onToggleTooltip:Jn,onToggleAnnotator:Zn,onToggleLabels:Yn,onCopyAlt:lr,style:{visibility:Xt.value?Yt.value?`visible`:`hidden`:`visible`}}),Be({_:2},[qe(b(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):l(``,!0),d(`div`,rt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:R,xmlns:b(ge),class:h({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,resizing:Bt.value||k.value,"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`,style:We(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[f(b(Dt)),y(e.$slots,`svg-underlayer`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`foreignObject`,{key:0,x:0,y:0,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,at)):l(``,!0),d(`defs`,null,[(_(!0),u(Re,null,qe(q.value,(e,t)=>(_(),c(Ie,{t:`radial`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${w.value}_${t}`,key:`gradient_${w.value}_${t}`,stops:[[`0%`,b(ce)(b(de)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,ot,[(_(!0),u(Re,null,qe(G.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,He({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(Re,null,qe(q.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`,onAnimationend:Qe(e=>_n(t.uid),[`self`]),class:h({"vue-rings-item-onload":A.value.useCssAnimation&&A.value.transitions.enable&&!k.value&&!gn.value.has(t.uid)}),style:We({transformOrigin:`${z.value.x}px ${Bn.value}px`,animationDelay:`${(q.value.length-1-n)*100}ms`})},[d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-opacity":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.underlayerColor},null,10,ct),d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,10,lt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,10,ut)):l(``,!0),d(`circle`,{stroke:`none`,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`transparent`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,dt),pn.value?(_(),u(Re,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?$.value[n].marker.x:z.value.x,y:$.value[n].marker.y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(z.value.x-$.value[n].marker.x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,ft),d(`circle`,{cx:$.value[n].marker.x,cy:$.value[n].marker.y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,pt),d(`text`,{"text-anchor":N.value.dataLabels.markers.position===`left`?`end`:`start`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),transform:`translate(${$.value[n].marker.x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${$.value[n].marker.y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(se)({content:mr.value[n],fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,mt)],64)):l(``,!0)],46,st))),128)),y(e.$slots,`svg`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0)],46,it)),e.$slots.hint?(_(),u(`div`,ht,[y(e.$slots,`hint`,g(m({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,gt,[y(e.$slots,`watermark`,g(m({isPrinting:b(sn)||b(cn)||b(ar)||b(or)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,_t),Vt.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(ze,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Lt},[y(e.$slots,`legend`,{legend:jn.value},()=>[F.value.legend.show?(_(),c(Me,{key:0,legendSet:jn.value,config:Mn.value,isCursorPointer:L.value,onClickMarker:te[0]||=({legend:e})=>xn(e.uid)},Be({item:S(({legend:e,index:t})=>[k.value?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>xn(e.uid),style:We(`opacity:${W.value.includes(e.uid)?.5:1}`)},Xe(e.display),13,vt))]),legendToggle:S(()=>[jn.value.length>2&&F.value.legend.selectAllToggle.show&&!k.value?(_(),c(Fe,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:L.value,onToggle:yn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:S(({legend:e,index:t})=>[f(ke,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${e.absoluteIndex})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(_(),u(`div`,{key:7,ref_key:`source`,ref:Rt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),f(b(xt),{teleportTo:P.value.teleportTo,show:H.value.showTooltip&&Nt.value&&W.value.length<C.dataset.length,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:E.value,content:Pt.value,isFullscreen:Q.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:Gt.value===`keyboard`,a11yPosition:Wt.value},{"tooltip-before":S(()=>[y(e.$slots,`tooltip-before`,g(m({...Y.value})),void 0,!0)]),tooltip:S(()=>[y(e.$slots,`tooltip`,g(m({...Y.value})),void 0,!0)]),"tooltip-after":S(()=>[y(e.$slots,`tooltip-after`,g(m({...Y.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),!k.value&&Mt.value&&j.value.buttons.table?(_(),c(Je($n.value.component),He({key:8},$n.value.props,{ref_key:`tableUnit`,ref:Ht,onClose:er}),Be({content:S(()=>[f(b(wt),{colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:A.value.table.useDialog?``:$n.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:er},{th:S(({th:e})=>[e===`__SUM__`?(_(),u(`div`,yt,[f(b(St),{name:`sigma`,stroke:Z.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,bt,Xe(e),1))]),td:S(({td:e})=>[Ve(Xe(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Ve(Xe($n.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:te[1]||=e=>Gn(j.value.callbacks.csv),style:We({cursor:L.value?`pointer`:`default`})},[f(b(St),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[k.value?(_(),c(Ne,{key:0})):l(``,!0)],!0)],46,et))}},[[`__scopeId`,`data-v-5087967c`]]);export{$e as n,xt as t};
|