vue-data-ui 3.28.4 → 3.28.5
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/{BaseDraggableDialog-DHgIPVmz.js → BaseDraggableDialog-9d30Yx8c.js} +1 -1
- package/dist/{BaseIcon-Cm-IJ179.js → BaseIcon-fYK0iID8.js} +1 -1
- package/dist/{BaseLegendToggle-Q3TiW9u1.js → BaseLegendToggle-aT9fOoGO.js} +1 -1
- package/dist/{BaseZoomControls-ByS_7fmI.js → BaseZoomControls-1OdFWrHW.js} +1 -1
- package/dist/ColorPicker-DEJOjcmD.js +1 -0
- package/dist/{DataTable-0Vv-aGHD.js → DataTable-5Ug6gMAX.js} +1 -1
- package/dist/{HillActions-qz6J_uK7.js → HillActions-C8am4I5c.js} +1 -1
- package/dist/{NonSvgPenAndPaper-Do6RcwEr.js → NonSvgPenAndPaper-CawVDtNj.js} +1 -1
- package/dist/{PackageVersion-DhptF5oD.js → PackageVersion-DWlHsdPa.js} +1 -1
- package/dist/PenAndPaper-r50tK3S4.js +1 -0
- package/dist/{SlicerPreview-CFFUOlQr.js → SlicerPreview-DYuyE9u9.js} +1 -1
- package/dist/{UserOptions-uWHV_zPB.js → UserOptions-Em_JgDXM.js} +1 -1
- package/dist/annotationSlots-RvQBEO9-.js +1 -0
- package/dist/annotationViewport-X8fvs7pz.js +1 -0
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.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-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.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-rating.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-smiley.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-heatmap.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-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/package-CM94W_P5.js +1 -0
- package/dist/{render-common-DwEiRIJ0.js → render-common-Dkf3n13B.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/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +26 -1
- package/dist/types/vue-ui-xy.d.ts +3 -0
- package/dist/useConfig-D3ZfFSE5.js +1 -0
- package/dist/{useObjectBindings-C15PEyQD.js → useObjectBindings-BCi3Az41.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/vue-data-ui-B2f_qLvD.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CJTKyv3A.js → vue-ui-3d-bar-Bm-Oe_kr.js} +2 -2
- package/dist/{vue-ui-accordion-S3nRtTU-.js → vue-ui-accordion-D4FHxzsL.js} +1 -1
- package/dist/{vue-ui-age-pyramid-6uZzf1w6.js → vue-ui-age-pyramid-DeN6_pms.js} +1 -1
- package/dist/{vue-ui-annotator-DCJdieNC.js → vue-ui-annotator-DuAQovkf.js} +1 -1
- package/dist/{vue-ui-bullet-CsJcLhmV.js → vue-ui-bullet-CXCjzBCa.js} +2 -2
- package/dist/{vue-ui-bump-DXpxBWp_.js → vue-ui-bump-DrphtYb-.js} +2 -2
- package/dist/vue-ui-candlestick-CAdTTZzx.js +22 -0
- package/dist/{vue-ui-carousel-table-ChNykS-r.js → vue-ui-carousel-table-D-PSQEuw.js} +1 -1
- package/dist/vue-ui-chestnut-BhnQd90d.js +1 -0
- package/dist/{vue-ui-chord-Pp0U0-zV.js → vue-ui-chord-C6swlh_I.js} +3 -3
- package/dist/vue-ui-circle-pack-CXhm9rwh.js +13 -0
- package/dist/{vue-ui-cursor-3-RTIIl-.js → vue-ui-cursor-CCx0hL1b.js} +1 -1
- package/dist/vue-ui-dag-BNYDTrHG.js +9 -0
- package/dist/{vue-ui-dashboard-Dlwnintv.js → vue-ui-dashboard-C2KQNeNt.js} +1 -1
- package/dist/{vue-ui-digits-ZMK0aBxE.js → vue-ui-digits-Bcg9Ocwc.js} +1 -1
- package/dist/{vue-ui-donut-CmLo1r4-.js → vue-ui-donut-CU-L5W3v.js} +2 -2
- package/dist/{vue-ui-donut-j1bv0KyD.js → vue-ui-donut-CqasvTv0.js} +1 -1
- package/dist/vue-ui-donut-evolution-DgLZRZkG.js +2 -0
- package/dist/{vue-ui-dumbbell-DigrSGwq.js → vue-ui-dumbbell-DCYDSSZf.js} +2 -2
- package/dist/{vue-ui-flow-D9cc9yXD.js → vue-ui-flow-BzGZdOi-.js} +2 -2
- package/dist/{vue-ui-funnel-U88Hs0nL.js → vue-ui-funnel-pJc9jVJO.js} +1 -1
- package/dist/{vue-ui-galaxy-B1Vuz8CA.js → vue-ui-galaxy-DHheME5Z.js} +1 -1
- package/dist/{vue-ui-gauge-1MgZSPXt.js → vue-ui-gauge-C4v_qdpm.js} +1 -1
- package/dist/vue-ui-geo-Fras0OVo.js +1 -0
- package/dist/{vue-ui-gizmo-DtsERB-E.js → vue-ui-gizmo-Bqea3ZMn.js} +1 -1
- package/dist/{vue-ui-graph-BVTPTDl5.js → vue-ui-graph-BZs3jwhv.js} +2 -2
- package/dist/vue-ui-heatmap-2ALnM7Oj.js +1 -0
- package/dist/{vue-ui-hill-BvrNT8KZ.js → vue-ui-hill-B8dCg3x5.js} +1 -1
- package/dist/{vue-ui-history-plot-CJIILQPt.js → vue-ui-history-plot-CegRxR-x.js} +2 -2
- package/dist/vue-ui-horizontal-bar-DuRnq32M.js +4 -0
- package/dist/{vue-ui-kpi-DHfExr9d.js → vue-ui-kpi-DSwSDLcO.js} +1 -1
- package/dist/{vue-ui-label-B_1kM28r.js → vue-ui-label-0lSeoxvv.js} +1 -1
- package/dist/{vue-ui-mini-loader-Bbupx66Y.js → vue-ui-mini-loader-C6vhrfx3.js} +1 -1
- package/dist/vue-ui-molecule-DF9I7IDy.js +1 -0
- package/dist/{vue-ui-mood-radar-DsnT2U65.js → vue-ui-mood-radar-BpDzg6P1.js} +1 -1
- package/dist/{vue-ui-nested-donuts-JkpqMhuL.js → vue-ui-nested-donuts-CYU90SX-.js} +2 -2
- package/dist/{vue-ui-onion-CIA2tlff.js → vue-ui-onion-C9Y96_Pe.js} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-Bcr3B3NI.js → vue-ui-parallel-coordinate-plot-CEX33A1e.js} +3 -3
- package/dist/{vue-ui-quadrant-DKVFawhC.js → vue-ui-quadrant-BzD-dhcs.js} +2 -2
- package/dist/vue-ui-quick-chart-DDXK6KTi.js +17 -0
- package/dist/{vue-ui-radar-CdH-BFKA.js → vue-ui-radar-fgVruUz1.js} +1 -1
- package/dist/{vue-ui-rating-ChWXrWNJ.js → vue-ui-rating-7RAJA7I4.js} +1 -1
- package/dist/{vue-ui-relation-circle-COZpOybS.js → vue-ui-relation-circle-TA-KH-2J.js} +1 -1
- package/dist/{vue-ui-ridgeline-MLknaTUO.js → vue-ui-ridgeline-GJ_EyeMs.js} +2 -2
- package/dist/{vue-ui-rings-ARqLCM_P.js → vue-ui-rings-CQ4CQa-D.js} +1 -1
- package/dist/{vue-ui-scatter-CX2wsXdE.js → vue-ui-scatter-ecBr_qgs.js} +2 -2
- package/dist/{vue-ui-skeleton-wyvAru88.js → vue-ui-skeleton-BqHwNz2O.js} +1 -1
- package/dist/{vue-ui-smiley--VTlUAdp.js → vue-ui-smiley-BdhxsPGW.js} +1 -1
- package/dist/{vue-ui-spark-trend-C02PmIq_.js → vue-ui-spark-trend-DULUucQY.js} +1 -1
- package/dist/{vue-ui-sparkbar-CjD57-Xi.js → vue-ui-sparkbar-CUzfk9Y4.js} +1 -1
- package/dist/{vue-ui-sparkgauge-8Eia8T2W.js → vue-ui-sparkgauge-CEYIZNGr.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-C-0f7XCl.js → vue-ui-sparkhistogram-BATfvYil.js} +1 -1
- package/dist/{vue-ui-sparkline-BMMrpUPR.js → vue-ui-sparkline-B2jYjPFT.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-BmgCVCKG.js → vue-ui-sparkstackbar-CN-Xz72S.js} +1 -1
- package/dist/vue-ui-stackbar-D9hp_pkz.js +29 -0
- package/dist/vue-ui-stackline-BKcbKdrA.js +39 -0
- package/dist/{vue-ui-strip-plot-DVyPa3sp.js → vue-ui-strip-plot-CKk6MJhD.js} +2 -2
- package/dist/{vue-ui-table-qTF_q-Qu.js → vue-ui-table-D-jfpSh1.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DzvPQnY9.js → vue-ui-table-heatmap-IYPQ7LMg.js} +1 -1
- package/dist/{vue-ui-table-sparkline-B2Q-7-GQ.js → vue-ui-table-sparkline-295WMuHK.js} +1 -1
- package/dist/vue-ui-thermometer-Ccasz0jb.js +1 -0
- package/dist/{vue-ui-timer-DRjoRidI.js → vue-ui-timer-DeTZUIxO.js} +2 -2
- package/dist/{vue-ui-tiremarks-BC_YGp3T.js → vue-ui-tiremarks-DWrBN1nz.js} +1 -1
- package/dist/vue-ui-treemap-D8Se3_RA.js +1 -0
- package/dist/{vue-ui-waffle-BiJshI4O.js → vue-ui-waffle-BSfHWe_Z.js} +1 -1
- package/dist/vue-ui-wheel-BRaABy8K.js +1 -0
- package/dist/vue-ui-word-cloud-9YYx_Xrj.js +4 -0
- package/dist/{vue-ui-world-CJgt0ESz.js → vue-ui-world-BmICer9M.js} +2 -2
- package/dist/{vue-ui-xy-DrKVPSg7.js → vue-ui-xy-D7IJvizz.js} +1 -1
- package/dist/vue-ui-xy-DYnPKTpK.js +24 -0
- package/dist/{vue-ui-xy-canvas-Do4P4ajB.js → vue-ui-xy-canvas-CjrbWdJJ.js} +1 -1
- package/package.json +1 -1
- package/dist/ColorPicker-Dmus34hN.js +0 -1
- package/dist/PenAndPaper-BGEp-TUm.js +0 -1
- package/dist/annotationSlots-BRR85CqJ.js +0 -1
- package/dist/package-CX7pZToh.js +0 -1
- package/dist/useConfig-6jO1fkp5.js +0 -1
- package/dist/vue-data-ui-CORn0LF6.js +0 -1
- package/dist/vue-ui-candlestick-Bn_RSZ0k.js +0 -22
- package/dist/vue-ui-chestnut-DMYQTkxM.js +0 -1
- package/dist/vue-ui-circle-pack-We23fOaF.js +0 -13
- package/dist/vue-ui-dag-5fVnwEXd.js +0 -9
- package/dist/vue-ui-donut-evolution-CYvo7Cww.js +0 -2
- package/dist/vue-ui-geo-BV8ARcaX.js +0 -1
- package/dist/vue-ui-heatmap-6YwaVr3F.js +0 -1
- package/dist/vue-ui-horizontal-bar-Dfo-kTqg.js +0 -4
- package/dist/vue-ui-molecule-C8e5IeHG.js +0 -1
- package/dist/vue-ui-quick-chart-Bk2N8Hmd.js +0 -17
- package/dist/vue-ui-stackbar-G_zZRAa9.js +0 -29
- package/dist/vue-ui-stackline-DchZoEAg.js +0 -39
- package/dist/vue-ui-thermometer-CxNoxslq.js +0 -1
- package/dist/vue-ui-treemap-CNM5ohoO.js +0 -1
- package/dist/vue-ui-wheel-BxR0_iNZ.js +0 -1
- package/dist/vue-ui-word-cloud-CZzC3R1K.js +0 -4
- package/dist/vue-ui-xy-B6XNUCzQ.js +0 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Bt as r,D as i,Dt as a,Ht as o,It as s,Jt as c,S as l,X as u,Y as ee,Yt as te,Zt as ne,at as d,b as re,dt as ie,f,h as p,i as m,in as ae,it as oe,j as se,nn as ce,nt as le,p as h,s as ue,t as de,ut as fe,w as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-DPGnEuYM.js";import{n as we}from"./Title-BliHuXfT.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./annotationSlots-BRR85CqJ.js";import{n as Ae,t as je}from"./userOptionsSlots-DYuo-E5m.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ve,t as He}from"./labelUtils-CdtU-yB_.js";import{t as Ue}from"./vue_ui_donut-T5PeOqvf.js";import{t as We}from"./Legend-DM0ClX3D.js";import{Fragment as g,Teleport as Ge,computed as _,createBlock as v,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as Ye,guardReactiveProps as Xe,mergeProps as Ze,nextTick as Qe,normalizeClass as $e,normalizeProps as et,normalizeStyle as S,onBeforeUnmount as tt,onMounted as nt,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as D,toRefs as at,unref as O,useSlots as ot,vShow as st,watch as ct,withCtx as k,withDirectives as lt}from"vue";function ut(e){let{FINAL_CONFIG:t,noGhostDonut:n,svg:r,padding:i,labels_inline_fontSize:a,minSize:o,findArcMidpoint:s,calcMarkerOffsetX:c,calcMarkerOffsetY:l,animatingIndex:u,segregated:ee,isSmallArc:te}=e;return{smallArcLayoutsClassic:_(()=>{if(t.value.type!==`classic`)return{};let e={},ne=n.value||[];if(!ne.length)return e;let d=r.value.width/2,re=r.value.height/2,ie=i.value.top+16,f=r.value.height-i.value.bottom-16,p=a.value,m=p/3,ae=p*1.5,oe=d-(o.value+6),se=d+(o.value+6),ce=!!t.value.style.chart.layout.curvedMarkers;function le({midX:e,midY:t,bandX:n,bandY:r}){if(!ce)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<d?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-d,l=t-re,u=Math.sqrt(c*c+l*l)||1,ee=c/u,te=l/u,ne=u+9;function ie({x:e,y:t}){let n=e-d,r=t-re,i=Math.sqrt(n*n+r*r)||1;if(i>=ne)return{x:e,y:t};let a=ne/i;return{x:d+n*a,y:re+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,ne=(t+r)*.5,f=u+c,p=ne+l,m=(f-d)*(f-d)+(p-re)*(p-re),ae=u-c,oe=ne-l;(ae-d)*(ae-d)+(oe-re)*(oe-re)>m&&(c=-c,l=-l);let se=.78,ce=e+a*se,le=t+o*se,h=Math.max(0,Math.min(1,(s-18)/44)),ue=h*h*(3-2*h),de=2.5+ue*4,fe=1+ue*2.5;de*=.9;let pe=ie({x:ce+c*de+ee*fe,y:le+l*de+te*fe});return`M ${e} ${t} Q ${pe.x} ${pe.y} ${n} ${r}`}let f=s*.34;f<20&&(f=20),f>46&&(f=46);let p=s*.46;p<22&&(p=22),p>70&&(p=70);let m={x:e+ee*f,y:t+te*f},ae=d+i*Math.max(Math.abs(n-d),ne),oe={x:n-i*Math.min(p,Math.abs(ae-n)*.75),y:r},se=ie(m),le=ie(oe);return`M ${e} ${t} C ${se.x} ${se.y} ${le.x} ${le.y} ${n} ${r}`}function h(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(p*1.2);return ae+n}function ue({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:h(e.name)}}function de(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||ee.value.includes(n)?!1:te(t,n)}function fe(e){let t=e.inlineMarkerY<re,n=e.inlineMarkerX<d;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function pe(e,t){t.startsWith(`T`)?e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index):e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function me({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+m,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function he({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let ee=u,te=le({midX:s,midY:c,bandX:r,bandY:ee});e[i]=me({side:n,markerX:r,markerY:ee,labelY:u,connectorPath:te})})}let ge=ne.map((e,t)=>ue({arc:e,index:t})).filter(de),_e={TL:[],TR:[],BL:[],BR:[]};return ge.forEach(e=>{_e[fe(e)].push(e)}),Object.keys(_e).forEach(e=>{pe(_e[e],e)}),he({candidateList:_e.TL,side:`left`,bandMarkerX:oe,startY:ie,direction:`down`}),he({candidateList:_e.TR,side:`right`,bandMarkerX:se,startY:ie,direction:`down`}),_e.BL.length>1&&he({candidateList:_e.BL,side:`left`,bandMarkerX:oe,startY:f,direction:`up`}),_e.BR.length>1&&he({candidateList:_e.BR,side:`right`,bandMarkerX:se,startY:f,direction:`up`}),e})}}var dt=/* @__PURE__ */ e({default:()=>En}),ft=[`id`],pt=[`id`],mt=[`id`],ht={style:{position:`relative`}},gt=[`xmlns`,`aria-describedby`,`viewBox`],_t=[`width`,`height`],vt={key:1},yt={key:2},bt=[`id`],xt=[`id`],St=[`id`],Ct=[`flood-color`],wt=[`id`],Tt=[`flood-color`],Et=[`d`,`stroke`,`filter`],Dt=[`d`,`stroke`,`filter`],Ot=[`cx`,`cy`,`r`,`fill`,`filter`],kt={key:6},At=[`stroke`,`d`],jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Pt={key:0},Ft=[`stroke`,`d`],It={key:0},Lt=[`d`,`stroke`,`stroke-width`,`filter`],Rt={key:1},zt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Bt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Vt={key:1},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Wt={key:0},Gt=[`d`,`fill`,`stroke`,`stroke-width`],Kt=[`cx`,`cy`,`r`,`stroke`],qt=[`cx`,`cy`,`r`,`fill`],Jt=[`cx`,`cy`,`r`],Yt={key:0},Xt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Zt={key:1},Qt=[`cx`,`cy`,`r`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`x`,`y`,`fill`,`font-size`],nn=[`x`,`y`,`fill`,`font-size`],rn=[`filter`,`opacity`],an={key:0},on=[`x`,`y`],sn={key:1},cn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],hn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],gn={key:2},_n=[`x`,`y`,`width`],vn=[`x`,`y`,`width`],yn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bn={key:5,class:`vue-data-ui-watermark`},xn=[`id`],Sn=[`onClick`],Cn={key:8,class:`vue-ui-donut-hollow`},wn={key:0},Tn={key:1},En=/*#__PURE__*/ be({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:be,emit:dt}){let En=Ye(()=>import(`./Tooltip-C1q0Qoh7.js`)),Dn=Ye(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),On=Ye(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),kn=Ye(()=>import(`./DataTable-0Vv-aGHD.js`)),An=Ye(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),jn=Ye(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Mn=Ye(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),Nn=Ye(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_donut:Pn}=t(),{isThemeValid:Fn,warnInvalidTheme:In}=Se(),Ln=ot(),A=e,Rn=_({get(){return!!A.dataset&&A.dataset.length},set(e){return e}}),zn=it(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=it(null),Wn=it(null),Gn=it(null),Kn=it(null),qn=it(null),Jn=it(null),Yn=w(0),Xn=w(0),Zn=w(0),Qn=w(!1),$n=w(null),er=w(null),tr=w(null),nr=w({x:0,y:0}),rr=w(`pointer`),ir=w(!1),ar=_({get:()=>P.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),j=_({get:()=>P.value.style.chart.layout.labels.name.fontSize,set:e=>e}),or=_({get:()=>P.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),sr=!1,cr=()=>{P.value.autoSize&&!sr&&(sr=!0,requestAnimationFrame(()=>{sr=!1;let e=P.value,t=Bn.value,n=z.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:F.value.percentage.fontSize,minSize:F.value.percentage.minFontSize,sizeRef:ar},{selector:`.vue-data-ui-datalabel-name`,baseSize:F.value.name.fontSize,minSize:F.value.name.minFontSize,sizeRef:j},{selector:`.vue-data-ui-datalabel-inline`,baseSize:F.value.dataLabels.smallArcClusterFontSize,minSize:F.value.name.minFontSize,sizeRef:or}];c.map(e=>t.querySelectorAll(e.selector).length).reduce((e,t)=>e+t,0)!==0&&c.forEach(({selector:e,baseSize:n,minSize:r,sizeRef:i})=>{t.querySelectorAll(e).forEach(e=>{i.value=ue({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};nt(async()=>{Qn.value=!0,dr(),requestAnimationFrame(cr)});let lr;nt(()=>{zn.value&&(lr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){cr();break}}}),lr.observe(zn.value.parentElement))}),tt(()=>{lr?.disconnect()}),tt(()=>{Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect())});let ur=_(()=>P.value.debug);function dr(){if(he(A.dataset)?(d({componentName:`VueUiDonut`,type:`dataset`,debug:ur.value}),Rn.value=!1,xr.value=!0):(A.dataset.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{d({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:ur.value}),Rn.value=!1,xr.value=!0})}),ur.value&&A.dataset.forEach((e,t)=>{e.name&&e.name!==``||d({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),he(A.dataset)||(xr.value=P.value.loading),P.value.responsive){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:zn.value,title:P.value.style.chart.title.text?Un.value:null,legend:P.value.style.chart.legend.show?Wn.value:null,source:qn.value,noTitle:Jn.value,padding:P.value.autoSize?void 0:Nr.value});requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,cr()})});Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect()),Gn.value=new ResizeObserver(e),Kn.value=zn.value.parentNode,Gn.value.observe(Kn.value)}}let M=w(u()),fr=w(!1),pr=w(``),N=w(null),mr=w(0);function hr(){let e=xe({userConfig:A.config,defaultConfig:Pn}),t={},n=e.theme;if(!n)t=e;else if(!Fn.value(e))In(e),t=e;else{let r=xe({userConfig:Ue[n]||A.config,defaultConfig:e});t={...xe({userConfig:A.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||o}}return t}let P=w(hr()),F=_(()=>P.value.style.chart.layout.labels),I=_(()=>P.value.style.chart.layout.donut),gr=_(()=>P.value.style.chart.layout),L=_(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiDonut`,rules:[ye.singleSeries,ye.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 _r=_(()=>P.value.userOptions.useCursorPointer),vr=_(()=>ae({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:yr,FINAL_DATASET:br,manualLoading:xr,skeletonDataset:Sr}=ge({...at(A),FINAL_CONFIG:P,prepareConfig:hr,skeletonDataset:A.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:ae({defaultConfig:P.value,userConfig:vr.value})}),R=w(!0),Cr=w(0),wr=w(!1),Tr=null;function Er(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=oe(o);Cr.value=s,o<1?Tr=requestAnimationFrame(r):(Cr.value=1,Tr=null,t())}Tr!==null&&cancelAnimationFrame(Tr),Cr.value=0,Tr=requestAnimationFrame(r)})}ct(()=>yr.value,async e=>{if(e||wr.value)return;let t=br.value===Sr,n=P.value.startAnimation?.show;!t&&n?(wr.value=!0,await Er(P.value.startAnimation.durationMs||1e3)):Cr.value=1,R.value=!1},{immediate:!0});let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=ze({config:P.value}),{svgRef:z}=Be({config:L.value.title});function Ar(){Or(!0)}function jr(){Or(!1)}let Mr=ne(A.config);ct(()=>A.config,(e,t)=>{let n=ne(e),r=n!==Mr;Mr=n;let i=hr();r?(yr.value||(P.value=i),Dr.value=!P.value.userOptions.showOnChartHover,dr(),Yn.value+=1,Xn.value+=1,Zn.value+=1,B.value.dataLabels.show=F.value.dataLabels.show,B.value.showTable=P.value.table.show,B.value.showTooltip=L.value.tooltip.show,V.value.height=L.value.height,V.value.width=L.value.width):(P.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let Nr=_(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Pr,isImaging:Fr,generatePdf:Ir,generateImage:Lr}=Me({elementId:`donut__${M.value}`,fileName:L.value.title.text||`vue-ui-donut`,options:P.value.userOptions.print}),Rr=_(()=>P.value.userOptions.show&&!L.value.title.text),zr=_(()=>pe(P.value.customPalette)),B=w({dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show});ct(P,()=>{B.value={dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show}},{immediate:!0});let V=w({height:L.value.height,width:L.value.width}),Br=_(()=>{if(P.value.pie)return G.value;let e=I.value.strokeWidth/512,t=Math.min(V.value.width,V.value.height)*e,n=t>G.value?G.value:t;return Math.max(n,12*(1+e))}),Vr=dt,H=_(()=>br.value.sort((e,t)=>{let n=Array.isArray(e.values)?e.values.reduce((e,t)=>e+t,0):e.value??0,r=Array.isArray(t.values)?t.values.reduce((e,t)=>e+t,0):t.value??0;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:re(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${M.value}_${t}`})));ct(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(xr.value=!1)},{immediate:!0});let U=it(H.value);ct(()=>H.value,e=>{U.value=e,requestAnimationFrame(cr)});function Hr(){return H.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let W=w([]),Ur=w(!1),Wr=w(null);function Gr(){Vr(`selectLegend`,$r.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Kr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=oe}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function qr(){W.value.length?W.value=[]:ei.value.forEach((e,t)=>{W.value.push(t)}),Gr()}function Jr(e){let t=H.value.find((t,n)=>n===e),n=U.value.find((t,n)=>n===e).value;if(W.value.includes(e)){W.value=W.value.filter(t=>t!==e);let r=t.value;function i(){U.value=U.value.map((t,n)=>e===n?{...t,value:r}:t),Gr()}function a(){Ur.value=!0,Wr.value=e,Kr({from:n,to:r,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{i(),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?a():(i(),requestAnimationFrame(cr))}else if(W.value.length<H.value.length-1){function t(){W.value.push(e),U.value=U.value.map((t,n)=>e===n?{...t,value:0}:t),Gr()}function r(){Ur.value=!0,Wr.value=e,Kr({from:n,to:0,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{t(),requestAnimationFrame(cr),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?r():t()}}function Yr(e){return H.value.length?H.value.find(t=>t.name===e)||(ur.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(ur.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Xr(e){let t=Yr(e);t!==null&&W.value.includes(t.seriesIndex)&&Jr(t.seriesIndex)}function Zr(e){let t=Yr(e);t!==null&&(W.value.includes(t.seriesIndex)||Jr(t.seriesIndex))}let Qr=_(()=>br.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),$r=_(()=>{if(R.value&&!yr.value){let e=Cr.value,t=H.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Qr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return U.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),U.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!W.value.includes(t))}),ei=_(()=>br.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/br.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let r=m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,index:t}),i=m(F.value.percentage.formatter,di(e),n({v:di(e),s:`%`,r:L.value.legend.roundingPercentage})),a=Di({val:r,percentage:W.value.includes(t)?`${Ei(e.proportion*100)}%`:i,showVal:L.value.legend.showValue,showPercentage:L.value.legend.showPercentage,config:L.value.legend});return{...e,opacity:W.value.includes(t)?.5:1,segregate:()=>!Ur.value&&Jr(t),isSegregated:W.value.includes(t),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${a}`}})),ti=_(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),G=_(()=>{let e=I.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(V.value.width*t,V.value.height*t);return Math.max(12,n)}),K=_(()=>s({series:$r.value},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),ni=_(()=>Math.abs($r.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ri=_(()=>s({series:[{value:1,color:I.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),q=_(()=>K.value.filter(e=>!e.ghost)),J=_(()=>{let e=Math.max(...$r.value.map(e=>e.value)),t=$r.value.map(t=>t.value/e);return se({series:t,center:{x:V.value.width/2,y:V.value.height/2},maxRadius:Math.min(V.value.width,V.value.height)/3,hasGhost:R.value})});function ii(e){return e.x>V.value.width/2+6?`start`:e.x<V.value.width/2-6?`end`:`middle`}function ai(e){return e.middlePoint.y>V.value.height/2?r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:V.value.width/2,centerY:V.value.height/2}).y:r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:V.value.width/2,centerY:V.value.height/2}).y-100}function Y(e){return e.proportion*100>F.value.dataLabels.hideUnderValue}function oi(e,t){let n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold,i=(li.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:X}=ut({FINAL_CONFIG:P,noGhostDonut:q,svg:V,padding:Nr,labels_inline_fontSize:or,minSize:G,findArcMidpoint:fe,calcMarkerOffsetX:f,calcMarkerOffsetY:h,animatingIndex:Wr,segregated:W,isSmallArc:oi});function si(e,t){let r=e.value/ci(t);return isNaN(r)?0:m(F.value.percentage.formatter,r*100,n({v:r*100,s:`%`,r:F.value.percentage.rounding}),{datapoint:e})}function ci(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Z=_(()=>$r.value.map(e=>e.value).reduce((e,t)=>e+t,0)),li=_(()=>{let e=H.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:H.value.map(t=>t.value/e)}),ui=_(()=>Z.value/$r.value.length);function di(e){return Ur.value?e.proportion*100:e.value/Z.value*100}let fi=w(null),pi=w(!1);function mi({datapoint:e,seriesIndex:t}){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),fr.value=!1,N.value=null,tr.value=null,rr.value=`pointer`}function Q({datapoint:e,relativeIndex:t,seriesIndex:r,show:i=!1,triggerMode:o=`pointer`}){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:r}),rr.value=o,tr.value=t,fi.value={datapoint:e,seriesIndex:r,config:P.value,series:H.value},fr.value=i,N.value=t;let s=``,l=L.value.tooltip.customFormat;if(pi.value=!1,a(l))try{let t=l({seriesIndex:r,datapoint:e,series:H.value,config:P.value});typeof t==`string`&&(pr.value=t,pi.value=!0)}catch{console.warn(`Custom format cannot be applied.`),pi.value=!1}pi.value||(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,s+=`<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="${e.color}"/>${Ln.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${M.value}_${r})"/>`:``}</svg>`,s+=`<b>${Di({showVal:L.value.tooltip.showValue,showPercentage:L.value.tooltip.showPercentage,val:`<span>${m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:r})}</span>`,percentage:m(F.value.percentage.formatter,e.proportion*100,n({v:e.proportion*100,s:`%`,r:L.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:r}),config:L.value.tooltip})}</b></div>`,L.value.comments.showInTooltip&&e.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${c(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),pr.value=`<div>${s}</div>`)}function hi(e,t){let n=X.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=f(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:h(e)}}function gi(e,t,n){let{textAnchor:r,x:i}=hi(e,t),a=Oi(e),o=`
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,Bt as r,D as i,Dt as a,Ht as o,It as s,Jt as c,S as l,X as u,Y as ee,Yt as te,Zt as ne,at as d,b as re,dt as ie,f,h as p,i as m,in as ae,it as oe,j as se,nn as ce,nt as le,p as h,s as ue,t as de,ut as fe,w as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-DPGnEuYM.js";import{n as we}from"./Title-BliHuXfT.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./annotationSlots-RvQBEO9-.js";import{n as Ae,t as je}from"./userOptionsSlots-DYuo-E5m.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-aT9fOoGO.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ve,t as He}from"./labelUtils-CdtU-yB_.js";import{t as Ue}from"./vue_ui_donut-T5PeOqvf.js";import{t as We}from"./Legend-DM0ClX3D.js";import{Fragment as g,Teleport as Ge,computed as _,createBlock as v,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as Ye,guardReactiveProps as Xe,mergeProps as Ze,nextTick as Qe,normalizeClass as $e,normalizeProps as et,normalizeStyle as S,onBeforeUnmount as tt,onMounted as nt,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as D,toRefs as at,unref as O,useSlots as ot,vShow as st,watch as ct,withCtx as k,withDirectives as lt}from"vue";function ut(e){let{FINAL_CONFIG:t,noGhostDonut:n,svg:r,padding:i,labels_inline_fontSize:a,minSize:o,findArcMidpoint:s,calcMarkerOffsetX:c,calcMarkerOffsetY:l,animatingIndex:u,segregated:ee,isSmallArc:te}=e;return{smallArcLayoutsClassic:_(()=>{if(t.value.type!==`classic`)return{};let e={},ne=n.value||[];if(!ne.length)return e;let d=r.value.width/2,re=r.value.height/2,ie=i.value.top+16,f=r.value.height-i.value.bottom-16,p=a.value,m=p/3,ae=p*1.5,oe=d-(o.value+6),se=d+(o.value+6),ce=!!t.value.style.chart.layout.curvedMarkers;function le({midX:e,midY:t,bandX:n,bandY:r}){if(!ce)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<d?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-d,l=t-re,u=Math.sqrt(c*c+l*l)||1,ee=c/u,te=l/u,ne=u+9;function ie({x:e,y:t}){let n=e-d,r=t-re,i=Math.sqrt(n*n+r*r)||1;if(i>=ne)return{x:e,y:t};let a=ne/i;return{x:d+n*a,y:re+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,ne=(t+r)*.5,f=u+c,p=ne+l,m=(f-d)*(f-d)+(p-re)*(p-re),ae=u-c,oe=ne-l;(ae-d)*(ae-d)+(oe-re)*(oe-re)>m&&(c=-c,l=-l);let se=.78,ce=e+a*se,le=t+o*se,h=Math.max(0,Math.min(1,(s-18)/44)),ue=h*h*(3-2*h),de=2.5+ue*4,fe=1+ue*2.5;de*=.9;let pe=ie({x:ce+c*de+ee*fe,y:le+l*de+te*fe});return`M ${e} ${t} Q ${pe.x} ${pe.y} ${n} ${r}`}let f=s*.34;f<20&&(f=20),f>46&&(f=46);let p=s*.46;p<22&&(p=22),p>70&&(p=70);let m={x:e+ee*f,y:t+te*f},ae=d+i*Math.max(Math.abs(n-d),ne),oe={x:n-i*Math.min(p,Math.abs(ae-n)*.75),y:r},se=ie(m),le=ie(oe);return`M ${e} ${t} C ${se.x} ${se.y} ${le.x} ${le.y} ${n} ${r}`}function h(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(p*1.2);return ae+n}function ue({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:h(e.name)}}function de(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||ee.value.includes(n)?!1:te(t,n)}function fe(e){let t=e.inlineMarkerY<re,n=e.inlineMarkerX<d;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function pe(e,t){t.startsWith(`T`)?e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index):e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function me({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+m,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function he({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let ee=u,te=le({midX:s,midY:c,bandX:r,bandY:ee});e[i]=me({side:n,markerX:r,markerY:ee,labelY:u,connectorPath:te})})}let ge=ne.map((e,t)=>ue({arc:e,index:t})).filter(de),_e={TL:[],TR:[],BL:[],BR:[]};return ge.forEach(e=>{_e[fe(e)].push(e)}),Object.keys(_e).forEach(e=>{pe(_e[e],e)}),he({candidateList:_e.TL,side:`left`,bandMarkerX:oe,startY:ie,direction:`down`}),he({candidateList:_e.TR,side:`right`,bandMarkerX:se,startY:ie,direction:`down`}),_e.BL.length>1&&he({candidateList:_e.BL,side:`left`,bandMarkerX:oe,startY:f,direction:`up`}),_e.BR.length>1&&he({candidateList:_e.BR,side:`right`,bandMarkerX:se,startY:f,direction:`up`}),e})}}var dt=/* @__PURE__ */ e({default:()=>En}),ft=[`id`],pt=[`id`],mt=[`id`],ht={style:{position:`relative`}},gt=[`xmlns`,`aria-describedby`,`viewBox`],_t=[`width`,`height`],vt={key:1},yt={key:2},bt=[`id`],xt=[`id`],St=[`id`],Ct=[`flood-color`],wt=[`id`],Tt=[`flood-color`],Et=[`d`,`stroke`,`filter`],Dt=[`d`,`stroke`,`filter`],Ot=[`cx`,`cy`,`r`,`fill`,`filter`],kt={key:6},At=[`stroke`,`d`],jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Pt={key:0},Ft=[`stroke`,`d`],It={key:0},Lt=[`d`,`stroke`,`stroke-width`,`filter`],Rt={key:1},zt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Bt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Vt={key:1},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Wt={key:0},Gt=[`d`,`fill`,`stroke`,`stroke-width`],Kt=[`cx`,`cy`,`r`,`stroke`],qt=[`cx`,`cy`,`r`,`fill`],Jt=[`cx`,`cy`,`r`],Yt={key:0},Xt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Zt={key:1},Qt=[`cx`,`cy`,`r`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`x`,`y`,`fill`,`font-size`],nn=[`x`,`y`,`fill`,`font-size`],rn=[`filter`,`opacity`],an={key:0},on=[`x`,`y`],sn={key:1},cn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],hn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],gn={key:2},_n=[`x`,`y`,`width`],vn=[`x`,`y`,`width`],yn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bn={key:5,class:`vue-data-ui-watermark`},xn=[`id`],Sn=[`onClick`],Cn={key:8,class:`vue-ui-donut-hollow`},wn={key:0},Tn={key:1},En=/*#__PURE__*/ be({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:be,emit:dt}){let En=Ye(()=>import(`./Tooltip-C1q0Qoh7.js`)),Dn=Ye(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),On=Ye(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),kn=Ye(()=>import(`./DataTable-5Ug6gMAX.js`)),An=Ye(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),jn=Ye(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),Mn=Ye(()=>import(`./PackageVersion-DWlHsdPa.js`).then(e=>e.t)),Nn=Ye(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_donut:Pn}=t(),{isThemeValid:Fn,warnInvalidTheme:In}=Se(),Ln=ot(),A=e,Rn=_({get(){return!!A.dataset&&A.dataset.length},set(e){return e}}),zn=it(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=it(null),Wn=it(null),Gn=it(null),Kn=it(null),qn=it(null),Jn=it(null),Yn=w(0),Xn=w(0),Zn=w(0),Qn=w(!1),$n=w(null),er=w(null),tr=w(null),nr=w({x:0,y:0}),rr=w(`pointer`),ir=w(!1),ar=_({get:()=>P.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),j=_({get:()=>P.value.style.chart.layout.labels.name.fontSize,set:e=>e}),or=_({get:()=>P.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),sr=!1,cr=()=>{P.value.autoSize&&!sr&&(sr=!0,requestAnimationFrame(()=>{sr=!1;let e=P.value,t=Bn.value,n=z.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:F.value.percentage.fontSize,minSize:F.value.percentage.minFontSize,sizeRef:ar},{selector:`.vue-data-ui-datalabel-name`,baseSize:F.value.name.fontSize,minSize:F.value.name.minFontSize,sizeRef:j},{selector:`.vue-data-ui-datalabel-inline`,baseSize:F.value.dataLabels.smallArcClusterFontSize,minSize:F.value.name.minFontSize,sizeRef:or}];c.map(e=>t.querySelectorAll(e.selector).length).reduce((e,t)=>e+t,0)!==0&&c.forEach(({selector:e,baseSize:n,minSize:r,sizeRef:i})=>{t.querySelectorAll(e).forEach(e=>{i.value=ue({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};nt(async()=>{Qn.value=!0,dr(),requestAnimationFrame(cr)});let lr;nt(()=>{zn.value&&(lr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){cr();break}}}),lr.observe(zn.value.parentElement))}),tt(()=>{lr?.disconnect()}),tt(()=>{Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect())});let ur=_(()=>P.value.debug);function dr(){if(he(A.dataset)?(d({componentName:`VueUiDonut`,type:`dataset`,debug:ur.value}),Rn.value=!1,xr.value=!0):(A.dataset.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{d({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:ur.value}),Rn.value=!1,xr.value=!0})}),ur.value&&A.dataset.forEach((e,t)=>{e.name&&e.name!==``||d({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),he(A.dataset)||(xr.value=P.value.loading),P.value.responsive){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:zn.value,title:P.value.style.chart.title.text?Un.value:null,legend:P.value.style.chart.legend.show?Wn.value:null,source:qn.value,noTitle:Jn.value,padding:P.value.autoSize?void 0:Nr.value});requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,cr()})});Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect()),Gn.value=new ResizeObserver(e),Kn.value=zn.value.parentNode,Gn.value.observe(Kn.value)}}let M=w(u()),fr=w(!1),pr=w(``),N=w(null),mr=w(0);function hr(){let e=xe({userConfig:A.config,defaultConfig:Pn}),t={},n=e.theme;if(!n)t=e;else if(!Fn.value(e))In(e),t=e;else{let r=xe({userConfig:Ue[n]||A.config,defaultConfig:e});t={...xe({userConfig:A.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||o}}return t}let P=w(hr()),F=_(()=>P.value.style.chart.layout.labels),I=_(()=>P.value.style.chart.layout.donut),gr=_(()=>P.value.style.chart.layout),L=_(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiDonut`,rules:[ye.singleSeries,ye.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 _r=_(()=>P.value.userOptions.useCursorPointer),vr=_(()=>ae({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:yr,FINAL_DATASET:br,manualLoading:xr,skeletonDataset:Sr}=ge({...at(A),FINAL_CONFIG:P,prepareConfig:hr,skeletonDataset:A.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:ae({defaultConfig:P.value,userConfig:vr.value})}),R=w(!0),Cr=w(0),wr=w(!1),Tr=null;function Er(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=oe(o);Cr.value=s,o<1?Tr=requestAnimationFrame(r):(Cr.value=1,Tr=null,t())}Tr!==null&&cancelAnimationFrame(Tr),Cr.value=0,Tr=requestAnimationFrame(r)})}ct(()=>yr.value,async e=>{if(e||wr.value)return;let t=br.value===Sr,n=P.value.startAnimation?.show;!t&&n?(wr.value=!0,await Er(P.value.startAnimation.durationMs||1e3)):Cr.value=1,R.value=!1},{immediate:!0});let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=ze({config:P.value}),{svgRef:z}=Be({config:L.value.title});function Ar(){Or(!0)}function jr(){Or(!1)}let Mr=ne(A.config);ct(()=>A.config,(e,t)=>{let n=ne(e),r=n!==Mr;Mr=n;let i=hr();r?(yr.value||(P.value=i),Dr.value=!P.value.userOptions.showOnChartHover,dr(),Yn.value+=1,Xn.value+=1,Zn.value+=1,B.value.dataLabels.show=F.value.dataLabels.show,B.value.showTable=P.value.table.show,B.value.showTooltip=L.value.tooltip.show,V.value.height=L.value.height,V.value.width=L.value.width):(P.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let Nr=_(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Pr,isImaging:Fr,generatePdf:Ir,generateImage:Lr}=Me({elementId:`donut__${M.value}`,fileName:L.value.title.text||`vue-ui-donut`,options:P.value.userOptions.print}),Rr=_(()=>P.value.userOptions.show&&!L.value.title.text),zr=_(()=>pe(P.value.customPalette)),B=w({dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show});ct(P,()=>{B.value={dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show}},{immediate:!0});let V=w({height:L.value.height,width:L.value.width}),Br=_(()=>{if(P.value.pie)return G.value;let e=I.value.strokeWidth/512,t=Math.min(V.value.width,V.value.height)*e,n=t>G.value?G.value:t;return Math.max(n,12*(1+e))}),Vr=dt,H=_(()=>br.value.sort((e,t)=>{let n=Array.isArray(e.values)?e.values.reduce((e,t)=>e+t,0):e.value??0,r=Array.isArray(t.values)?t.values.reduce((e,t)=>e+t,0):t.value??0;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:re(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${M.value}_${t}`})));ct(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(xr.value=!1)},{immediate:!0});let U=it(H.value);ct(()=>H.value,e=>{U.value=e,requestAnimationFrame(cr)});function Hr(){return H.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let W=w([]),Ur=w(!1),Wr=w(null);function Gr(){Vr(`selectLegend`,$r.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Kr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=oe}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function qr(){W.value.length?W.value=[]:ei.value.forEach((e,t)=>{W.value.push(t)}),Gr()}function Jr(e){let t=H.value.find((t,n)=>n===e),n=U.value.find((t,n)=>n===e).value;if(W.value.includes(e)){W.value=W.value.filter(t=>t!==e);let r=t.value;function i(){U.value=U.value.map((t,n)=>e===n?{...t,value:r}:t),Gr()}function a(){Ur.value=!0,Wr.value=e,Kr({from:n,to:r,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{i(),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?a():(i(),requestAnimationFrame(cr))}else if(W.value.length<H.value.length-1){function t(){W.value.push(e),U.value=U.value.map((t,n)=>e===n?{...t,value:0}:t),Gr()}function r(){Ur.value=!0,Wr.value=e,Kr({from:n,to:0,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{t(),requestAnimationFrame(cr),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?r():t()}}function Yr(e){return H.value.length?H.value.find(t=>t.name===e)||(ur.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(ur.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Xr(e){let t=Yr(e);t!==null&&W.value.includes(t.seriesIndex)&&Jr(t.seriesIndex)}function Zr(e){let t=Yr(e);t!==null&&(W.value.includes(t.seriesIndex)||Jr(t.seriesIndex))}let Qr=_(()=>br.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),$r=_(()=>{if(R.value&&!yr.value){let e=Cr.value,t=H.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Qr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return U.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),U.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!W.value.includes(t))}),ei=_(()=>br.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/br.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let r=m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,index:t}),i=m(F.value.percentage.formatter,di(e),n({v:di(e),s:`%`,r:L.value.legend.roundingPercentage})),a=Di({val:r,percentage:W.value.includes(t)?`${Ei(e.proportion*100)}%`:i,showVal:L.value.legend.showValue,showPercentage:L.value.legend.showPercentage,config:L.value.legend});return{...e,opacity:W.value.includes(t)?.5:1,segregate:()=>!Ur.value&&Jr(t),isSegregated:W.value.includes(t),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${a}`}})),ti=_(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),G=_(()=>{let e=I.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(V.value.width*t,V.value.height*t);return Math.max(12,n)}),K=_(()=>s({series:$r.value},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),ni=_(()=>Math.abs($r.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ri=_(()=>s({series:[{value:1,color:I.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),q=_(()=>K.value.filter(e=>!e.ghost)),J=_(()=>{let e=Math.max(...$r.value.map(e=>e.value)),t=$r.value.map(t=>t.value/e);return se({series:t,center:{x:V.value.width/2,y:V.value.height/2},maxRadius:Math.min(V.value.width,V.value.height)/3,hasGhost:R.value})});function ii(e){return e.x>V.value.width/2+6?`start`:e.x<V.value.width/2-6?`end`:`middle`}function ai(e){return e.middlePoint.y>V.value.height/2?r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:V.value.width/2,centerY:V.value.height/2}).y:r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:V.value.width/2,centerY:V.value.height/2}).y-100}function Y(e){return e.proportion*100>F.value.dataLabels.hideUnderValue}function oi(e,t){let n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold,i=(li.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:X}=ut({FINAL_CONFIG:P,noGhostDonut:q,svg:V,padding:Nr,labels_inline_fontSize:or,minSize:G,findArcMidpoint:fe,calcMarkerOffsetX:f,calcMarkerOffsetY:h,animatingIndex:Wr,segregated:W,isSmallArc:oi});function si(e,t){let r=e.value/ci(t);return isNaN(r)?0:m(F.value.percentage.formatter,r*100,n({v:r*100,s:`%`,r:F.value.percentage.rounding}),{datapoint:e})}function ci(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Z=_(()=>$r.value.map(e=>e.value).reduce((e,t)=>e+t,0)),li=_(()=>{let e=H.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:H.value.map(t=>t.value/e)}),ui=_(()=>Z.value/$r.value.length);function di(e){return Ur.value?e.proportion*100:e.value/Z.value*100}let fi=w(null),pi=w(!1);function mi({datapoint:e,seriesIndex:t}){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),fr.value=!1,N.value=null,tr.value=null,rr.value=`pointer`}function Q({datapoint:e,relativeIndex:t,seriesIndex:r,show:i=!1,triggerMode:o=`pointer`}){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:r}),rr.value=o,tr.value=t,fi.value={datapoint:e,seriesIndex:r,config:P.value,series:H.value},fr.value=i,N.value=t;let s=``,l=L.value.tooltip.customFormat;if(pi.value=!1,a(l))try{let t=l({seriesIndex:r,datapoint:e,series:H.value,config:P.value});typeof t==`string`&&(pr.value=t,pi.value=!0)}catch{console.warn(`Custom format cannot be applied.`),pi.value=!1}pi.value||(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,s+=`<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="${e.color}"/>${Ln.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${M.value}_${r})"/>`:``}</svg>`,s+=`<b>${Di({showVal:L.value.tooltip.showValue,showPercentage:L.value.tooltip.showPercentage,val:`<span>${m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:r})}</span>`,percentage:m(F.value.percentage.formatter,e.proportion*100,n({v:e.proportion*100,s:`%`,r:L.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:r}),config:L.value.tooltip})}</b></div>`,L.value.comments.showInTooltip&&e.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${c(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),pr.value=`<div>${s}</div>`)}function hi(e,t){let n=X.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=f(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:h(e)}}function gi(e,t,n){let{textAnchor:r,x:i}=hi(e,t),a=Oi(e),o=`
|
|
2
2
|
<tspan
|
|
3
3
|
class="vue-data-ui-datalabel-inline"
|
|
4
4
|
fill="${F.value.percentage.color}"
|
|
@@ -44,4 +44,4 @@ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO
|
|
|
44
44
|
font-size="${j.value}px"
|
|
45
45
|
style="font-weight:${F.value.name.bold?`bold`:`normal`}"
|
|
46
46
|
>${e}</tspan>
|
|
47
|
-
`}),i===`end`?`${F.value.name.show?u:``}${c}`:`${c}${F.value.name.show?u:``}`}function vi(e){return P.value.useBlurOnHover&&![null,void 0].includes(N.value)&&N.value!==e?`url(#blur_${M.value})`:``}function yi(e){if(!Ur.value||Wr.value===null||e.seriesIndex!==Wr.value)return 1;let t=(e.proportion??0)*100,n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let bi=_(()=>({head:$r.value.map(e=>({name:e.name,color:e.color})),body:$r.value.map(e=>e.value)}));function xi(e=null){Qe(()=>{let t=bi.value.head.map((e,t)=>[[e.name],[bi.value.body[t]],[isNaN(bi.value.body[t]/Z.value)?`-`:bi.value.body[t]/Z.value*100]]),n=[[L.value.title.text],[L.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=i(n);e?e(r):le({csvContent:r,title:L.value.title.text||`vue-ui-donut`})})}let Si=_(()=>{let e=[`__SUM__`,n({p:F.value.dataLabels.prefix,v:Z.value,s:F.value.dataLabels.suffix,r:P.value.table.td.roundingValue}),`100%`],t=bi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},bi.value.body[t],isNaN(bi.value.body[t]/Z.value)?`-`:(bi.value.body[t]/Z.value*100).toFixed(P.value.table.td.roundingPercentage)+`%`]),r=t.map(e=>e.map((e,t)=>t===0?e.name:e)),i={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};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.value,P.value.table.columnNames.percentage],head:e,body:t,a11yBody:r,config:i}}),Ci=w(!1);function wi(e){Ci.value=e,mr.value+=1}let Ti=_(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ei(e){return Ve({num:e,rounding:L.value.legend.roundingPercentage})}function Di({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return He({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Oi(e){return Di({val:m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:F.value.value.rounding}),{datapoint:e}),percentage:si(e,q.value),showVal:F.value.value.show,showPercentage:F.value.percentage.show,config:F.value.dataLabels})}function $(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),Vr(`selectDatapoint`,{datapoint:e,index:t})}function ki(){B.value.showTable=!B.value.showTable}function Ai(){B.value.dataLabels.show=!B.value.dataLabels.show}function ji(){B.value.showTooltip=!B.value.showTooltip}let Mi=w(!1);function Ni(){Mi.value=!Mi.value}let Pi=Ce(zn,()=>L.value.title.text);function Fi(){if(!Bn.value)return;let{x:e,y:t,width:n,height:r}=Bn.value.getBBox();z.value&&z.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ii=_(()=>De({config:P,style:L,mutableConfig:B,dialog:Nn,accordion:On,isFullscreen:Ci,parent:zn,maxWidth:500,isCursorPointer:_r}));ct(()=>B.value.showTable,e=>Ee(e,P,$n));function Li(){B.value.showTable=!1,er.value&&er.value.setTableIconState(!1)}let Ri=_(()=>ei.value.map(e=>({...e,name:e.display}))),zi=_(()=>L.value.backgroundColor),Bi=_(()=>L.value.legend),Vi=_(()=>L.value.title),{isCallbackImaging:Hi,isCallbackSvg:Ui,generateSvg:Wi,onGenerateImage:Gi}=Te({svg:z,title:Vi,legend:Bi,legendItems:Ri,backgroundColor:zi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Lr});async function Ki(){Vr(`copyAlt`,{config:P.value,dataset:U.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:U.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qi(){tr.value=null,ir.value=!0}function Ji(){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null,ir.value=!1}function Yi(e){if(!z.value||Mi.value||document.activeElement!==z.value||!q.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){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null;return}if(r){if(tr.value===null)return;let e=q.value[tr.value];if(!e)return;$(e,tr.value);return}let a=tr.value,o=N.value,s=a!==null&&a>=0&&a<q.value.length,c=o!==null&&o>=0&&o<q.value.length;s?n?(a+=1,a>=q.value.length&&(a=0)):t&&(--a,a<0&&(a=q.value.length-1)):c?(a=n?o+1:o-1,a>=q.value.length&&(a=0),a<0&&(a=q.value.length-1)):a=n?0:q.value.length-1;let l=q.value[a];l&&(tr.value=a,Xi(a),Q({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Xi(e){if(!Number.isFinite(e)||!z.value)return;let t=V.value.width/2,n=V.value.height/2;if(P.value.type===`classic`){let r=q.value[e];if(!r?.arcSlice)return;let i=fe(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=J.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=z.value.getBoundingClientRect();nr.value={x:r.left+t/V.value.width*r.width,y:r.top+n/V.value.height*r.height}}let Zi=_(()=>({headers:Si.value?.colNames??[],rows:Si.value?.a11yBody??[]}));return be({autoSize:Fi,getData:Hr,getImage:Pi,generatePdf:Ir,generateCsv:xi,generateImage:Lr,generateSvg:Wi,hideSeries:Zr,showSeries:Xr,toggleTable:ki,toggleLabels:Ai,toggleTooltip:ji,toggleAnnotator:Ni,toggleFullscreen:wi,copyAlt:Ki}),(t,i)=>(C(),b(`div`,{ref_key:`donutChart`,ref:zn,class:$e(`vue-data-ui-component vue-ui-donut ${Ci.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:S(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height:100%;`:``} text-align:center;background:${L.value.backgroundColor}`),id:`donut__${M.value}`,onMouseenter:Ar,onMouseleave:jr},[x(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[x(`p`,null,D(P.value.a11y.translations.keyboardNavigation),1)],8,pt),Zi.value?.rows?.length?(C(),v(Re,{key:0,uid:M.value,head:Zi.value.headers,body:Zi.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):y(``,!0),P.value.userOptions.buttons.annotator&&O(z)?(C(),v(O(An),{key:1,color:L.value.color,backgroundColor:L.value.backgroundColor,active:Mi.value,svgRef:O(z),isCursorPointer:_r.value,palette:P.value.userOptions.annotatorPalette,onClose:Ni},Ke({_:2},[T(O(ke),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(Oe)(e,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):y(``,!0),E(t.$slots,`userConfig`,{},void 0,!0),Rr.value?(C(),b(`div`,{key:2,ref_key:`noTitle`,ref:Jn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):y(``,!0),L.value.title.text?(C(),b(`div`,{key:3,ref_key:`chartTitle`,ref:Un,style:`width:100%;background:transparent;padding-bottom:24px`},[(C(),v(we,{key:`title_${Yn.value}`,config:{title:{cy:`donut-div-title`,...L.value.title},subtitle:{cy:`donut-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):y(``,!0),x(`div`,{id:`legend-top-${M.value}`},null,8,mt),P.value.userOptions.show&&Rn.value&&(O(kr)||O(Dr))?(C(),v(O(jn),{ref_key:`userOptionsRef`,ref:er,key:`user_option_${mr.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:O(Pr),isImaging:O(Fr),uid:M.value,hasTooltip:L.value.tooltip.show&&P.value.userOptions.buttons.tooltip,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasLabel:P.value.userOptions.buttons.labels,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ci.value,chartElement:zn.value,position:P.value.userOptions.position,callbacks:P.value.userOptions.callbacks,isTooltip:B.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Mi.value,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:_r.value,onToggleFullscreen:wi,onGeneratePdf:O(Ir),onGenerateCsv:xi,onGenerateImage:O(Gi),onGenerateSvg:O(Wi),onToggleTable:ki,onToggleLabels:Ai,onToggleTooltip:ji,onToggleAnnotator:Ni,onCopyAlt:Ki,style:S({visibility:O(kr)?O(Dr)?`visible`:`hidden`:`visible`})},Ke({_:2},[T(O(Ae)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(je)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.isTooltip.titles.hasAnnotator.isAnnotation.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):y(``,!0),x(`div`,ht,[(C(),b(`svg`,{ref_key:`svgRef`,ref:z,xmlns:O(de),"aria-describedby":`chart-instructions-${M.value}`,class:$e({"vue-data-ui-fullscreen--on":Ci.value,"vue-data-ui-fulscreen--off":!Ci.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`,style:S(`max-width:100%; overflow: visible; background:transparent;color:${L.value.color};${Nr.value.css}`),tabindex:`0`,onFocus:qi,onBlur:Ji,onKeydown:Yi},[x(`g`,{ref_key:`G`,ref:Bn,class:`vue-data-ui-g`},[Je(O(Mn)),E(t.$slots,`svg-underlayer`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0),t.$slots[`chart-background`]?(C(),b(`foreignObject`,{key:0,x:0,y:0,width:V.value.width<=0?10:V.value.width,height:V.value.height<=0?10:V.value.height,style:{pointerEvents:`none`}},[E(t.$slots,`chart-background`,{},void 0,!0)],8,_t)):y(``,!0),P.value.type===`classic`&&!isNaN(Br.value/G.value)?(C(),b(`defs`,vt,[L.value.useGradient?(C(),v(Ie,{key:0,t:`radial`,id:`gradient_${M.value}`,stops:[[`0%`,O(c)(L.value.backgroundColor,0),0],[`${(1-Br.value/G.value)*100}%`,O(c)(`#FFFFFF`,0),0],[`${(1-Br.value/G.value/2)*100}%`,O(c)(`#FFFFFF`,L.value.gradientIntensity),1],[`100%`,O(c)(L.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):y(``,!0)])):y(``,!0),P.value.type===`polar`?(C(),b(`defs`,yt,[(C(!0),b(g,null,T(J.value,(e,t)=>(C(),v(Ie,{t:`radial`,id:`polar_gradient_${t}_${M.value}`,key:`pg_${t}_${M.value}`,cx:(isNaN(e.middlePoint.x/V.value.width*100)?0:e.middlePoint.x/V.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/V.value.height*100)?0:e.middlePoint.y/V.value.height*100)+`%`,r:`62%`,stops:[[`0%`,O(te)(K.value[t].color,.05),L.value.gradientIntensity/100],[`100%`,K.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):y(``,!0),x(`defs`,null,[x(`filter`,{id:`blur_${M.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${M.value}`},null,8,xt),i[5]||=x(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,bt),x(`filter`,{id:`shadow_${M.value}`,"color-interpolation-filters":`sRGB`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":I.value.shadowColor},null,8,Ct)],8,St),x(`filter`,{id:`drop_shadow_${M.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":I.value.shadowColor},null,8,Tt)],8,wt)]),P.value.type===`classic`?(C(!0),b(g,{key:3},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:O(X)[t]?.connectorPath||O(p)(e,{x:V.value.width/2,y:V.value.height/2},16,16,!1,!1,Br.value,12,gr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t)},null,8,Et)):y(``,!0)]))),256)):y(``,!0),P.value.type===`polar`?(C(!0),b(g,{key:4},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:`M ${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x},${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Dt)):y(``,!0)]))),256)):y(``,!0),P.value.type===`classic`&&I.value.useShadow?(C(),b(`circle`,{key:5,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:L.value.backgroundColor,filter:`url(#shadow_${M.value})`},null,8,Ot)):y(``,!0),t.$slots.pattern?(C(),b(`g`,kt,[(C(!0),b(g,null,T(e.dataset,(e,n)=>(C(),b(`defs`,{key:`pattern-${e.patternIndex}`},[E(t.$slots,`pattern`,Ze({ref_for:!0},{seriesIndex:n,patternId:`pattern_${M.value}_${n}`}),void 0,!0)]))),128))])):y(``,!0),Z.value&&P.value.type===`classic`?(C(),b(g,{key:7},[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:L.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,At))),256)),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,jt))),256)),t.$slots.pattern?(C(),b(`g`,Mt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,Nt))),256))])):y(``,!0)],64)):y(``,!0),Z.value&&P.value.type===`polar`?(C(),b(g,{key:8},[K.value.length>1?(C(),b(`g`,Pt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,d:J.value[t].path,fill:`#FFFFFF`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256)),I.value.useShadow?(C(),b(`g`,It,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`transparent`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:`url(#drop_shadow_${M.value})`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256))])):y(``,!0),t.$slots.pattern?(C(),b(`g`,Rt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,zt))),256))])):y(``,!0),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:L.value.useGradient?`url(#polar_gradient_${t}_${M.value})`:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Bt))),256))])):(C(),b(`g`,Vt,[t.$slots.pattern?(C(),b(`circle`,{key:0,cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`url(#pattern_${M.value}_${K.value[0].patternIndex})`,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ht)):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:L.value.useGradient?`url(#polar_gradient_0_${M.value})`:K.value[0].color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ut)]))],64)):(C(),b(g,{key:9},[P.value.type===`classic`&&!ni.value?(C(),b(`g`,Wt,[(C(!0),b(g,null,T(ri.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Gt))),256))])):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`transparent`,stroke:L.value.backgroundColor},null,8,Kt)],64)),L.value.useGradient&&P.value.type===`classic`?(C(),b(`circle`,{key:10,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`url(#gradient_${M.value})`},null,8,qt)):y(``,!0),x(`circle`,{ref_key:`circle_hollow`,ref:Hn,style:{pointerEvents:`none`},fill:`none`,cx:V.value.width/2,cy:V.value.height/2,r:Math.max(.1,Br.value*1.7)},null,8,Jt),Z.value?(C(),b(g,{key:11},[K.value.length>1||P.value.type===`classic`?(C(),b(`g`,Yt,[(C(!0),b(g,null,T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`path`,{d:P.value.type===`classic`?e.arcSlice:J.value[t].path,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,fill:N.value===t?I.value.selectedColor:`transparent`,onMouseenter:n=>Q({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>$(e,t)},null,40,Xt))),256))])):(C(),b(`g`,Zt,[x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`transparent`,onMouseenter:i[0]||=e=>Q({datapoint:K.value[0],relativeIndex:0,seriesIndex:K.value[0].seriesIndex,show:!0}),onMouseleave:i[1]||=e=>mi({datapoint:K.value[0],seriesIndex:K.value[0].seriesIndex}),onClick:i[2]||=e=>$(K.value[0],t.i)},null,40,Qt)]))],64)):y(``,!0),P.value.type===`classic`?(C(),b(`g`,{key:12,ref_key:`G_hollow`,ref:Vn,class:`vue-data-ui-donut-hollow-labels`},[F.value.hollow.total.show?(C(),b(`text`,{key:0,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.offsetY,fill:F.value.hollow.total.color,"font-size":F.value.hollow.total.fontSize,style:S(`font-weight:${F.value.hollow.total.bold?`bold`:``}`)},D(F.value.hollow.total.text),13,$t)):y(``,!0),F.value.hollow.total.show?(C(),b(`text`,{key:1,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+F.value.hollow.total.fontSize-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.value.offsetY,fill:F.value.hollow.total.value.color,"font-size":F.value.hollow.total.value.fontSize,style:S(`font-weight:${F.value.hollow.total.value.bold?`bold`:``}`)},D(O(m)(F.value.hollow.total.value.formatter,Z.value,O(n)({p:F.value.hollow.total.value.prefix,v:Z.value,s:F.value.hollow.total.value.suffix}))),13,en)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:2,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.offsetY,fill:F.value.hollow.average.color,"font-size":F.value.hollow.average.fontSize,style:S(`font-weight:${F.value.hollow.average.bold?`bold`:``}`)},D(F.value.hollow.average.text),13,tn)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:3,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.fontSize+F.value.hollow.average.value.offsetY,fill:F.value.hollow.average.value.color,"font-size":F.value.hollow.average.value.fontSize,style:S(`font-weight:${F.value.hollow.average.value.bold?`bold`:``}`)},D(Ur.value||R.value?`--`:O(m)(F.value.hollow.average.value.formatter,O(ie)(ui.value),O(n)({p:F.value.hollow.average.value.prefix,v:O(ie)(ui.value),s:F.value.hollow.average.value.suffix,r:F.value.hollow.average.value.rounding}))),13,nn)):y(``,!0)],512)):y(``,!0),(C(!0),b(g,null,T(q.value.filter(e=>!e.ghost),(e,n)=>(C(),b(`g`,{filter:vi(n),key:e.seriesIndex,opacity:yi(e)},[F.value.dataLabels.useLabelSlots?(C(),b(`g`,an,[(C(),b(`foreignObject`,{x:O(f)(e,!0).anchor===`end`?O(f)(e).x-120:O(f)(e,!0).anchor===`middle`?O(f)(e).x-60:O(f)(e).x,y:O(h)(e)-(Ti.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[x(`div`,null,[E(t.$slots,`dataLabel`,Ze({ref_for:!0},{datapoint:e,isBlur:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n,isSafari:Ti.value,isVisible:Y(e)&&B.value.dataLabels.show,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,percentage:si(e,q.value)}),void 0,!0)])],8,on))])):(C(),b(`g`,sn,[P.value.type===`classic`?(C(),b(g,{key:0},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(X)[n]?.markerX??O(f)(e).x,cy:O(X)[n]?.markerY??O(h)(e)-3.5,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,cn)):y(``,!0),F.value.dataLabels.oneLine||O(X)[n]?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:gi(e,n,!!O(X)[n])},null,40,ln)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[lt(x(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),fill:F.value.percentage.color,"font-size":ar.value+`px`,style:S(`font-weight:${F.value.percentage.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,un),[[st,Y(e)&&B.value.dataLabels.show]]),lt(x(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value*1.2,fill:F.value.name.color,"font-size":j.value+`px`,style:S(`font-weight:${F.value.name.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value})},null,44,dn),[[st,Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show]])],64))],64)):y(``,!0),P.value.type===`polar`?(C(),b(g,{key:1},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x,cy:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,fn)):y(``,!0),F.value.dataLabels.oneLine?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:_i(e,n)},null,44,pn)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[Y(e)&&B.value.dataLabels.show?(C(),b(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:F.value.percentage.color,"font-size":ar.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.percentage.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,mn)):y(``,!0),Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show?(C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2,fill:F.value.name.color,"font-size":j.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.name.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2})},null,44,hn)):y(``,!0)],64))],64)):y(``,!0)])),B.value.dataLabels.show&&L.value.comments.show&&e.comment?(C(),b(`g`,gn,[Y(e)&&P.value.type===`classic`?(C(),b(`foreignObject`,{key:0,x:L.value.comments.offsetX+(O(f)(e,!0).anchor===`end`?O(f)(e).x-L.value.comments.width:O(f)(e,!0).anchor===`middle`?O(f)(e).x-L.value.comments.width/2:O(f)(e).x),y:O(h)(e)+24+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,isFirstLoad:R.value}},void 0,!0)])],8,_n)):y(``,!0),Y(e)&&P.value.type===`polar`?(C(),b(`foreignObject`,{key:1,x:L.value.comments.offsetX+(ii(J.value[n].middlePoint)===`end`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width:ii(J.value[n].middlePoint)===`middle`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width/2:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x),y:ai(J.value[n])+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:ii(J.value[n].middlePoint),flexAlign:ii(J.value[n].middlePoint),isFirstLoad:R.value}},void 0,!0)])],12,vn)):y(``,!0)])):y(``,!0)],8,rn))),128)),E(t.$slots,`svg`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0)],512)],46,gt)),t.$slots.hint?(C(),b(`div`,yn,[E(t.$slots,`hint`,et(Xe({hint:P.value.a11y.translations.keyboardNavigation,isVisible:ir.value})),void 0,!0)])):y(``,!0)]),t.$slots.watermark?(C(),b(`div`,bn,[E(t.$slots,`watermark`,et(Xe({isPrinting:O(Pr)||O(Fr)||O(Hi)||O(Ui)})),void 0,!0)])):y(``,!0),x(`div`,{id:`legend-bottom-${M.value}`},null,8,xn),Qn.value&&(L.value.legend.show||t.$slots.legend)?(C(),v(Ge,{key:6,to:L.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[x(`div`,{ref_key:`chartLegend`,ref:Wn},[E(t.$slots,`legend`,{legend:ei.value},()=>[L.value.legend.show?(C(),v(We,{key:`legend_${Zn.value}`,legendSet:ei.value,config:ti.value,onClickMarker:i[3]||=({i:e})=>Jr(e),isCursorPointer:_r.value},Ke({item:k(({legend:e,index:t})=>[x(`div`,{style:S(`opacity:${W.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},D(e.display),13,Sn)]),legendToggle:k(()=>[ei.value.length>2&&L.value.legend.selectAllToggle.show&&!O(yr)?(C(),v(Le,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:_r.value,onToggle:qr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):y(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:k(({legend:e,index:t})=>[Je(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${M.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):y(``,!0)],!0)],512)],8,[`to`])):y(``,!0),t.$slots.source?(C(),b(`div`,{key:7,ref_key:`source`,ref:qn,dir:`auto`},[E(t.$slots,`source`,{},void 0,!0)],512)):y(``,!0),t.$slots.hollow?(C(),b(`div`,Cn,[E(t.$slots,`hollow`,et(Xe({total:Z.value,average:ui.value,dataset:H.value,...V.value})),void 0,!0)])):y(``,!0),Je(O(En),{teleportTo:L.value.tooltip.teleportTo,show:B.value.showTooltip&&fr.value,backgroundColor:L.value.tooltip.backgroundColor,color:L.value.tooltip.color,fontSize:L.value.tooltip.fontSize,borderRadius:L.value.tooltip.borderRadius,borderColor:L.value.tooltip.borderColor,borderWidth:L.value.tooltip.borderWidth,backgroundOpacity:L.value.tooltip.backgroundOpacity,position:L.value.tooltip.position,offsetX:L.value.tooltip.offsetX,offsetY:L.value.tooltip.offsetY,parent:zn.value,content:pr.value,isCustom:pi.value,isFullscreen:Ci.value,smooth:L.value.tooltip.smooth,backdropFilter:L.value.tooltip.backdropFilter,smoothForce:L.value.tooltip.smoothForce,smoothSnapThreshold:L.value.tooltip.smoothSnapThrehsold,isA11yMode:rr.value===`keyboard`,a11yPosition:nr.value},{"tooltip-before":k(()=>[E(t.$slots,`tooltip-before`,et(Xe({...fi.value})),void 0,!0)]),tooltip:k(()=>[E(t.$slots,`tooltip`,et(Xe({...fi.value})),void 0,!0)]),"tooltip-after":k(()=>[E(t.$slots,`tooltip-after`,et(Xe({...fi.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Rn.value&&P.value.userOptions.buttons.table?(C(),v(rt(Ii.value.component),Ze({key:9},Ii.value.props,{ref_key:`tableUnit`,ref:$n,onClose:Li}),Ke({content:k(()=>[(C(),v(O(kn),{key:`table_${Xn.value}`,colNames:Si.value.colNames,head:Si.value.head,body:Si.value.body,config:Si.value.config,title:P.value.table.useDialog?``:Ii.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:_r.value,onClose:Li},{th:k(({th:e})=>[e===`__SUM__`?(C(),b(`div`,wn,[Je(O(Dn),{name:`sigma`,stroke:Si.value.config.th.color,size:16},null,8,[`stroke`])])):(C(),b(`div`,Tn,D(e),1))]),td:k(({td:e})=>[qe(D(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:O(m)(F.value.percentage.formatter,e,O(n)({v:e,s:`%`,r:F.value.percentage.rounding})):O(m)(F.value.value.formatter,e,O(n)({p:F.value.dataLabels.prefix,v:e,s:F.value.dataLabels.suffix,r:F.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[qe(D(Ii.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[x(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[4]||=e=>xi(P.value.userOptions.callbacks.csv),style:S({cursor:_r.value?`pointer`:`default`})},[Je(O(Dn),{name:`fileCsv`,stroke:Ii.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):y(``,!0),E(t.$slots,`skeleton`,{},()=>[O(yr)?(C(),v(_e,{key:0})):y(``,!0)],!0)],46,ft))}},[[`__scopeId`,`data-v-774756cd`]]);export{dt as n,En as t};
|
|
47
|
+
`}),i===`end`?`${F.value.name.show?u:``}${c}`:`${c}${F.value.name.show?u:``}`}function vi(e){return P.value.useBlurOnHover&&![null,void 0].includes(N.value)&&N.value!==e?`url(#blur_${M.value})`:``}function yi(e){if(!Ur.value||Wr.value===null||e.seriesIndex!==Wr.value)return 1;let t=(e.proportion??0)*100,n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let bi=_(()=>({head:$r.value.map(e=>({name:e.name,color:e.color})),body:$r.value.map(e=>e.value)}));function xi(e=null){Qe(()=>{let t=bi.value.head.map((e,t)=>[[e.name],[bi.value.body[t]],[isNaN(bi.value.body[t]/Z.value)?`-`:bi.value.body[t]/Z.value*100]]),n=[[L.value.title.text],[L.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=i(n);e?e(r):le({csvContent:r,title:L.value.title.text||`vue-ui-donut`})})}let Si=_(()=>{let e=[`__SUM__`,n({p:F.value.dataLabels.prefix,v:Z.value,s:F.value.dataLabels.suffix,r:P.value.table.td.roundingValue}),`100%`],t=bi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},bi.value.body[t],isNaN(bi.value.body[t]/Z.value)?`-`:(bi.value.body[t]/Z.value*100).toFixed(P.value.table.td.roundingPercentage)+`%`]),r=t.map(e=>e.map((e,t)=>t===0?e.name:e)),i={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};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.value,P.value.table.columnNames.percentage],head:e,body:t,a11yBody:r,config:i}}),Ci=w(!1);function wi(e){Ci.value=e,mr.value+=1}let Ti=_(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ei(e){return Ve({num:e,rounding:L.value.legend.roundingPercentage})}function Di({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return He({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Oi(e){return Di({val:m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:F.value.value.rounding}),{datapoint:e}),percentage:si(e,q.value),showVal:F.value.value.show,showPercentage:F.value.percentage.show,config:F.value.dataLabels})}function $(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),Vr(`selectDatapoint`,{datapoint:e,index:t})}function ki(){B.value.showTable=!B.value.showTable}function Ai(){B.value.dataLabels.show=!B.value.dataLabels.show}function ji(){B.value.showTooltip=!B.value.showTooltip}let Mi=w(!1);function Ni(){Mi.value=!Mi.value}let Pi=Ce(zn,()=>L.value.title.text);function Fi(){if(!Bn.value)return;let{x:e,y:t,width:n,height:r}=Bn.value.getBBox();z.value&&z.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ii=_(()=>De({config:P,style:L,mutableConfig:B,dialog:Nn,accordion:On,isFullscreen:Ci,parent:zn,maxWidth:500,isCursorPointer:_r}));ct(()=>B.value.showTable,e=>Ee(e,P,$n));function Li(){B.value.showTable=!1,er.value&&er.value.setTableIconState(!1)}let Ri=_(()=>ei.value.map(e=>({...e,name:e.display}))),zi=_(()=>L.value.backgroundColor),Bi=_(()=>L.value.legend),Vi=_(()=>L.value.title),{isCallbackImaging:Hi,isCallbackSvg:Ui,generateSvg:Wi,onGenerateImage:Gi}=Te({svg:z,title:Vi,legend:Bi,legendItems:Ri,backgroundColor:zi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Lr});async function Ki(){Vr(`copyAlt`,{config:P.value,dataset:U.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:U.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qi(){tr.value=null,ir.value=!0}function Ji(){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null,ir.value=!1}function Yi(e){if(!z.value||Mi.value||document.activeElement!==z.value||!q.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){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null;return}if(r){if(tr.value===null)return;let e=q.value[tr.value];if(!e)return;$(e,tr.value);return}let a=tr.value,o=N.value,s=a!==null&&a>=0&&a<q.value.length,c=o!==null&&o>=0&&o<q.value.length;s?n?(a+=1,a>=q.value.length&&(a=0)):t&&(--a,a<0&&(a=q.value.length-1)):c?(a=n?o+1:o-1,a>=q.value.length&&(a=0),a<0&&(a=q.value.length-1)):a=n?0:q.value.length-1;let l=q.value[a];l&&(tr.value=a,Xi(a),Q({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Xi(e){if(!Number.isFinite(e)||!z.value)return;let t=V.value.width/2,n=V.value.height/2;if(P.value.type===`classic`){let r=q.value[e];if(!r?.arcSlice)return;let i=fe(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=J.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=z.value.getBoundingClientRect();nr.value={x:r.left+t/V.value.width*r.width,y:r.top+n/V.value.height*r.height}}let Zi=_(()=>({headers:Si.value?.colNames??[],rows:Si.value?.a11yBody??[]}));return be({autoSize:Fi,getData:Hr,getImage:Pi,generatePdf:Ir,generateCsv:xi,generateImage:Lr,generateSvg:Wi,hideSeries:Zr,showSeries:Xr,toggleTable:ki,toggleLabels:Ai,toggleTooltip:ji,toggleAnnotator:Ni,toggleFullscreen:wi,copyAlt:Ki}),(t,i)=>(C(),b(`div`,{ref_key:`donutChart`,ref:zn,class:$e(`vue-data-ui-component vue-ui-donut ${Ci.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:S(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height:100%;`:``} text-align:center;background:${L.value.backgroundColor}`),id:`donut__${M.value}`,onMouseenter:Ar,onMouseleave:jr},[x(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[x(`p`,null,D(P.value.a11y.translations.keyboardNavigation),1)],8,pt),Zi.value?.rows?.length?(C(),v(Re,{key:0,uid:M.value,head:Zi.value.headers,body:Zi.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):y(``,!0),P.value.userOptions.buttons.annotator&&O(z)?(C(),v(O(An),{key:1,showGroupActions:P.value.userOptions.annotator?.showGroupActions??!0,color:L.value.color,backgroundColor:L.value.backgroundColor,active:Mi.value,svgRef:O(z),isCursorPointer:_r.value,palette:P.value.userOptions.annotatorPalette,onClose:Ni},Ke({_:2},[T(O(ke),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(Oe)(e,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):y(``,!0),E(t.$slots,`userConfig`,{},void 0,!0),Rr.value?(C(),b(`div`,{key:2,ref_key:`noTitle`,ref:Jn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):y(``,!0),L.value.title.text?(C(),b(`div`,{key:3,ref_key:`chartTitle`,ref:Un,style:`width:100%;background:transparent;padding-bottom:24px`},[(C(),v(we,{key:`title_${Yn.value}`,config:{title:{cy:`donut-div-title`,...L.value.title},subtitle:{cy:`donut-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):y(``,!0),x(`div`,{id:`legend-top-${M.value}`},null,8,mt),P.value.userOptions.show&&Rn.value&&(O(kr)||O(Dr))?(C(),v(O(jn),{ref_key:`userOptionsRef`,ref:er,key:`user_option_${mr.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:O(Pr),isImaging:O(Fr),uid:M.value,hasTooltip:L.value.tooltip.show&&P.value.userOptions.buttons.tooltip,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasLabel:P.value.userOptions.buttons.labels,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ci.value,chartElement:zn.value,position:P.value.userOptions.position,callbacks:P.value.userOptions.callbacks,isTooltip:B.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Mi.value,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:_r.value,onToggleFullscreen:wi,onGeneratePdf:O(Ir),onGenerateCsv:xi,onGenerateImage:O(Gi),onGenerateSvg:O(Wi),onToggleTable:ki,onToggleLabels:Ai,onToggleTooltip:ji,onToggleAnnotator:Ni,onCopyAlt:Ki,style:S({visibility:O(kr)?O(Dr)?`visible`:`hidden`:`visible`})},Ke({_:2},[T(O(Ae)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(je)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.isTooltip.titles.hasAnnotator.isAnnotation.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):y(``,!0),x(`div`,ht,[(C(),b(`svg`,{ref_key:`svgRef`,ref:z,xmlns:O(de),"aria-describedby":`chart-instructions-${M.value}`,class:$e({"vue-data-ui-fullscreen--on":Ci.value,"vue-data-ui-fulscreen--off":!Ci.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`,style:S(`max-width:100%; overflow: visible; background:transparent;color:${L.value.color};${Nr.value.css}`),tabindex:`0`,onFocus:qi,onBlur:Ji,onKeydown:Yi},[x(`g`,{ref_key:`G`,ref:Bn,class:`vue-data-ui-g`},[Je(O(Mn)),E(t.$slots,`svg-underlayer`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0),t.$slots[`chart-background`]?(C(),b(`foreignObject`,{key:0,x:0,y:0,width:V.value.width<=0?10:V.value.width,height:V.value.height<=0?10:V.value.height,style:{pointerEvents:`none`}},[E(t.$slots,`chart-background`,{},void 0,!0)],8,_t)):y(``,!0),P.value.type===`classic`&&!isNaN(Br.value/G.value)?(C(),b(`defs`,vt,[L.value.useGradient?(C(),v(Ie,{key:0,t:`radial`,id:`gradient_${M.value}`,stops:[[`0%`,O(c)(L.value.backgroundColor,0),0],[`${(1-Br.value/G.value)*100}%`,O(c)(`#FFFFFF`,0),0],[`${(1-Br.value/G.value/2)*100}%`,O(c)(`#FFFFFF`,L.value.gradientIntensity),1],[`100%`,O(c)(L.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):y(``,!0)])):y(``,!0),P.value.type===`polar`?(C(),b(`defs`,yt,[(C(!0),b(g,null,T(J.value,(e,t)=>(C(),v(Ie,{t:`radial`,id:`polar_gradient_${t}_${M.value}`,key:`pg_${t}_${M.value}`,cx:(isNaN(e.middlePoint.x/V.value.width*100)?0:e.middlePoint.x/V.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/V.value.height*100)?0:e.middlePoint.y/V.value.height*100)+`%`,r:`62%`,stops:[[`0%`,O(te)(K.value[t].color,.05),L.value.gradientIntensity/100],[`100%`,K.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):y(``,!0),x(`defs`,null,[x(`filter`,{id:`blur_${M.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${M.value}`},null,8,xt),i[5]||=x(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,bt),x(`filter`,{id:`shadow_${M.value}`,"color-interpolation-filters":`sRGB`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":I.value.shadowColor},null,8,Ct)],8,St),x(`filter`,{id:`drop_shadow_${M.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":I.value.shadowColor},null,8,Tt)],8,wt)]),P.value.type===`classic`?(C(!0),b(g,{key:3},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:O(X)[t]?.connectorPath||O(p)(e,{x:V.value.width/2,y:V.value.height/2},16,16,!1,!1,Br.value,12,gr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t)},null,8,Et)):y(``,!0)]))),256)):y(``,!0),P.value.type===`polar`?(C(!0),b(g,{key:4},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:`M ${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x},${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Dt)):y(``,!0)]))),256)):y(``,!0),P.value.type===`classic`&&I.value.useShadow?(C(),b(`circle`,{key:5,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:L.value.backgroundColor,filter:`url(#shadow_${M.value})`},null,8,Ot)):y(``,!0),t.$slots.pattern?(C(),b(`g`,kt,[(C(!0),b(g,null,T(e.dataset,(e,n)=>(C(),b(`defs`,{key:`pattern-${e.patternIndex}`},[E(t.$slots,`pattern`,Ze({ref_for:!0},{seriesIndex:n,patternId:`pattern_${M.value}_${n}`}),void 0,!0)]))),128))])):y(``,!0),Z.value&&P.value.type===`classic`?(C(),b(g,{key:7},[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:L.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,At))),256)),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,jt))),256)),t.$slots.pattern?(C(),b(`g`,Mt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,Nt))),256))])):y(``,!0)],64)):y(``,!0),Z.value&&P.value.type===`polar`?(C(),b(g,{key:8},[K.value.length>1?(C(),b(`g`,Pt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,d:J.value[t].path,fill:`#FFFFFF`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256)),I.value.useShadow?(C(),b(`g`,It,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`transparent`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:`url(#drop_shadow_${M.value})`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256))])):y(``,!0),t.$slots.pattern?(C(),b(`g`,Rt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,zt))),256))])):y(``,!0),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:L.value.useGradient?`url(#polar_gradient_${t}_${M.value})`:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Bt))),256))])):(C(),b(`g`,Vt,[t.$slots.pattern?(C(),b(`circle`,{key:0,cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`url(#pattern_${M.value}_${K.value[0].patternIndex})`,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ht)):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:L.value.useGradient?`url(#polar_gradient_0_${M.value})`:K.value[0].color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ut)]))],64)):(C(),b(g,{key:9},[P.value.type===`classic`&&!ni.value?(C(),b(`g`,Wt,[(C(!0),b(g,null,T(ri.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Gt))),256))])):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`transparent`,stroke:L.value.backgroundColor},null,8,Kt)],64)),L.value.useGradient&&P.value.type===`classic`?(C(),b(`circle`,{key:10,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`url(#gradient_${M.value})`},null,8,qt)):y(``,!0),x(`circle`,{ref_key:`circle_hollow`,ref:Hn,style:{pointerEvents:`none`},fill:`none`,cx:V.value.width/2,cy:V.value.height/2,r:Math.max(.1,Br.value*1.7)},null,8,Jt),Z.value?(C(),b(g,{key:11},[K.value.length>1||P.value.type===`classic`?(C(),b(`g`,Yt,[(C(!0),b(g,null,T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`path`,{d:P.value.type===`classic`?e.arcSlice:J.value[t].path,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,fill:N.value===t?I.value.selectedColor:`transparent`,onMouseenter:n=>Q({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>$(e,t)},null,40,Xt))),256))])):(C(),b(`g`,Zt,[x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`transparent`,onMouseenter:i[0]||=e=>Q({datapoint:K.value[0],relativeIndex:0,seriesIndex:K.value[0].seriesIndex,show:!0}),onMouseleave:i[1]||=e=>mi({datapoint:K.value[0],seriesIndex:K.value[0].seriesIndex}),onClick:i[2]||=e=>$(K.value[0],t.i)},null,40,Qt)]))],64)):y(``,!0),P.value.type===`classic`?(C(),b(`g`,{key:12,ref_key:`G_hollow`,ref:Vn,class:`vue-data-ui-donut-hollow-labels`},[F.value.hollow.total.show?(C(),b(`text`,{key:0,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.offsetY,fill:F.value.hollow.total.color,"font-size":F.value.hollow.total.fontSize,style:S(`font-weight:${F.value.hollow.total.bold?`bold`:``}`)},D(F.value.hollow.total.text),13,$t)):y(``,!0),F.value.hollow.total.show?(C(),b(`text`,{key:1,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+F.value.hollow.total.fontSize-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.value.offsetY,fill:F.value.hollow.total.value.color,"font-size":F.value.hollow.total.value.fontSize,style:S(`font-weight:${F.value.hollow.total.value.bold?`bold`:``}`)},D(O(m)(F.value.hollow.total.value.formatter,Z.value,O(n)({p:F.value.hollow.total.value.prefix,v:Z.value,s:F.value.hollow.total.value.suffix}))),13,en)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:2,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.offsetY,fill:F.value.hollow.average.color,"font-size":F.value.hollow.average.fontSize,style:S(`font-weight:${F.value.hollow.average.bold?`bold`:``}`)},D(F.value.hollow.average.text),13,tn)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:3,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.fontSize+F.value.hollow.average.value.offsetY,fill:F.value.hollow.average.value.color,"font-size":F.value.hollow.average.value.fontSize,style:S(`font-weight:${F.value.hollow.average.value.bold?`bold`:``}`)},D(Ur.value||R.value?`--`:O(m)(F.value.hollow.average.value.formatter,O(ie)(ui.value),O(n)({p:F.value.hollow.average.value.prefix,v:O(ie)(ui.value),s:F.value.hollow.average.value.suffix,r:F.value.hollow.average.value.rounding}))),13,nn)):y(``,!0)],512)):y(``,!0),(C(!0),b(g,null,T(q.value.filter(e=>!e.ghost),(e,n)=>(C(),b(`g`,{filter:vi(n),key:e.seriesIndex,opacity:yi(e)},[F.value.dataLabels.useLabelSlots?(C(),b(`g`,an,[(C(),b(`foreignObject`,{x:O(f)(e,!0).anchor===`end`?O(f)(e).x-120:O(f)(e,!0).anchor===`middle`?O(f)(e).x-60:O(f)(e).x,y:O(h)(e)-(Ti.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[x(`div`,null,[E(t.$slots,`dataLabel`,Ze({ref_for:!0},{datapoint:e,isBlur:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n,isSafari:Ti.value,isVisible:Y(e)&&B.value.dataLabels.show,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,percentage:si(e,q.value)}),void 0,!0)])],8,on))])):(C(),b(`g`,sn,[P.value.type===`classic`?(C(),b(g,{key:0},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(X)[n]?.markerX??O(f)(e).x,cy:O(X)[n]?.markerY??O(h)(e)-3.5,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,cn)):y(``,!0),F.value.dataLabels.oneLine||O(X)[n]?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:gi(e,n,!!O(X)[n])},null,40,ln)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[lt(x(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),fill:F.value.percentage.color,"font-size":ar.value+`px`,style:S(`font-weight:${F.value.percentage.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,un),[[st,Y(e)&&B.value.dataLabels.show]]),lt(x(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value*1.2,fill:F.value.name.color,"font-size":j.value+`px`,style:S(`font-weight:${F.value.name.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value})},null,44,dn),[[st,Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show]])],64))],64)):y(``,!0),P.value.type===`polar`?(C(),b(g,{key:1},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x,cy:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,fn)):y(``,!0),F.value.dataLabels.oneLine?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:_i(e,n)},null,44,pn)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[Y(e)&&B.value.dataLabels.show?(C(),b(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:F.value.percentage.color,"font-size":ar.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.percentage.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,mn)):y(``,!0),Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show?(C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2,fill:F.value.name.color,"font-size":j.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.name.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2})},null,44,hn)):y(``,!0)],64))],64)):y(``,!0)])),B.value.dataLabels.show&&L.value.comments.show&&e.comment?(C(),b(`g`,gn,[Y(e)&&P.value.type===`classic`?(C(),b(`foreignObject`,{key:0,x:L.value.comments.offsetX+(O(f)(e,!0).anchor===`end`?O(f)(e).x-L.value.comments.width:O(f)(e,!0).anchor===`middle`?O(f)(e).x-L.value.comments.width/2:O(f)(e).x),y:O(h)(e)+24+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,isFirstLoad:R.value}},void 0,!0)])],8,_n)):y(``,!0),Y(e)&&P.value.type===`polar`?(C(),b(`foreignObject`,{key:1,x:L.value.comments.offsetX+(ii(J.value[n].middlePoint)===`end`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width:ii(J.value[n].middlePoint)===`middle`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width/2:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x),y:ai(J.value[n])+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:ii(J.value[n].middlePoint),flexAlign:ii(J.value[n].middlePoint),isFirstLoad:R.value}},void 0,!0)])],12,vn)):y(``,!0)])):y(``,!0)],8,rn))),128)),E(t.$slots,`svg`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0)],512)],46,gt)),t.$slots.hint?(C(),b(`div`,yn,[E(t.$slots,`hint`,et(Xe({hint:P.value.a11y.translations.keyboardNavigation,isVisible:ir.value})),void 0,!0)])):y(``,!0)]),t.$slots.watermark?(C(),b(`div`,bn,[E(t.$slots,`watermark`,et(Xe({isPrinting:O(Pr)||O(Fr)||O(Hi)||O(Ui)})),void 0,!0)])):y(``,!0),x(`div`,{id:`legend-bottom-${M.value}`},null,8,xn),Qn.value&&(L.value.legend.show||t.$slots.legend)?(C(),v(Ge,{key:6,to:L.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[x(`div`,{ref_key:`chartLegend`,ref:Wn},[E(t.$slots,`legend`,{legend:ei.value},()=>[L.value.legend.show?(C(),v(We,{key:`legend_${Zn.value}`,legendSet:ei.value,config:ti.value,onClickMarker:i[3]||=({i:e})=>Jr(e),isCursorPointer:_r.value},Ke({item:k(({legend:e,index:t})=>[x(`div`,{style:S(`opacity:${W.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},D(e.display),13,Sn)]),legendToggle:k(()=>[ei.value.length>2&&L.value.legend.selectAllToggle.show&&!O(yr)?(C(),v(Le,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:_r.value,onToggle:qr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):y(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:k(({legend:e,index:t})=>[Je(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${M.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):y(``,!0)],!0)],512)],8,[`to`])):y(``,!0),t.$slots.source?(C(),b(`div`,{key:7,ref_key:`source`,ref:qn,dir:`auto`},[E(t.$slots,`source`,{},void 0,!0)],512)):y(``,!0),t.$slots.hollow?(C(),b(`div`,Cn,[E(t.$slots,`hollow`,et(Xe({total:Z.value,average:ui.value,dataset:H.value,...V.value})),void 0,!0)])):y(``,!0),Je(O(En),{teleportTo:L.value.tooltip.teleportTo,show:B.value.showTooltip&&fr.value,backgroundColor:L.value.tooltip.backgroundColor,color:L.value.tooltip.color,fontSize:L.value.tooltip.fontSize,borderRadius:L.value.tooltip.borderRadius,borderColor:L.value.tooltip.borderColor,borderWidth:L.value.tooltip.borderWidth,backgroundOpacity:L.value.tooltip.backgroundOpacity,position:L.value.tooltip.position,offsetX:L.value.tooltip.offsetX,offsetY:L.value.tooltip.offsetY,parent:zn.value,content:pr.value,isCustom:pi.value,isFullscreen:Ci.value,smooth:L.value.tooltip.smooth,backdropFilter:L.value.tooltip.backdropFilter,smoothForce:L.value.tooltip.smoothForce,smoothSnapThreshold:L.value.tooltip.smoothSnapThrehsold,isA11yMode:rr.value===`keyboard`,a11yPosition:nr.value},{"tooltip-before":k(()=>[E(t.$slots,`tooltip-before`,et(Xe({...fi.value})),void 0,!0)]),tooltip:k(()=>[E(t.$slots,`tooltip`,et(Xe({...fi.value})),void 0,!0)]),"tooltip-after":k(()=>[E(t.$slots,`tooltip-after`,et(Xe({...fi.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Rn.value&&P.value.userOptions.buttons.table?(C(),v(rt(Ii.value.component),Ze({key:9},Ii.value.props,{ref_key:`tableUnit`,ref:$n,onClose:Li}),Ke({content:k(()=>[(C(),v(O(kn),{key:`table_${Xn.value}`,colNames:Si.value.colNames,head:Si.value.head,body:Si.value.body,config:Si.value.config,title:P.value.table.useDialog?``:Ii.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:_r.value,onClose:Li},{th:k(({th:e})=>[e===`__SUM__`?(C(),b(`div`,wn,[Je(O(Dn),{name:`sigma`,stroke:Si.value.config.th.color,size:16},null,8,[`stroke`])])):(C(),b(`div`,Tn,D(e),1))]),td:k(({td:e})=>[qe(D(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:O(m)(F.value.percentage.formatter,e,O(n)({v:e,s:`%`,r:F.value.percentage.rounding})):O(m)(F.value.value.formatter,e,O(n)({p:F.value.dataLabels.prefix,v:e,s:F.value.dataLabels.suffix,r:F.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[qe(D(Ii.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[x(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[4]||=e=>xi(P.value.userOptions.callbacks.csv),style:S({cursor:_r.value?`pointer`:`default`})},[Je(O(Dn),{name:`fileCsv`,stroke:Ii.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):y(``,!0),E(t.$slots,`skeleton`,{},()=>[O(yr)?(C(),v(_e,{key:0})):y(``,!0)],!0)],46,ft))}},[[`__scopeId`,`data-v-4cc12940`]]);export{dt as n,En as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./useConfig-6jO1fkp5.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,i as f,in as p,j as m,nn as h,p as g,st as _,t as v}from"./lib-rPeBMZrn.js";import{t as y}from"./vue_ui_donut-T5PeOqvf.js";import{_ as b,a as x,c as S,d as C,g as w,i as T,l as E,n as D,o as O,p as k,r as A,s as ee,t as te,u as j,v as M}from"./render-common-DwEiRIJ0.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=p({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=p({userConfig:y[i]||{},defaultConfig:n}),o=p({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:h[i]||r}}function N(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function P(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+N(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+N(t,0),0):N(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:N(P(o,`chart.padding.top`,24),24),right:N(P(o,`chart.padding.right`,24),24),bottom:N(P(o,`chart.padding.bottom`,24),24),left:N(P(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=N(P(o,`chart.donut.radius`,f),f),m=N(P(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:N(P(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function F(){return ue}function I(e){return O(x(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return b(e?.value??e?.absoluteValue??0,0)}function L(e){return w(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:O(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function R(e){return e.reduce((e,t)=>e+Math.abs(b(t.value,0)),0)}function fe(e){let t=x(e,`title`,{}),n=k(t,`subtitle`,{});if(!t.text)return 0;let r=b(t.fontSize,20),i=n.show!==!1&&n.text?b(n.fontSize,14):0;return b(t.paddingTop,12)+r+(i?i+12:0)+b(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=x(n,`legend`,{}),a=b(i.fontSize,12),o=b(i.markerSize,10),s=b(i.itemGap,24),c=b(i.rowGap,8),l=b(i.padding,8),u=b(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Be(e,t),r=D(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function z(e,t){return!x(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function B(e){return!!T(e,`pie`,x(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=z(e,t),s=x(n,`legend.show`,!0),c=x(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=b(x(n,`padding.top`,24),24),f=b(x(n,`padding.right`,24),24),p=b(x(n,`padding.bottom`,24),24),m=b(x(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?b(T(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=b(x(n,`layout.donut.radiusRatio`,.35),.35),S=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*S),w=x(n,`layout.donut.radius`,null),E=w==null?C:Math.min(C,b(w,C)),D=b(x(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(E*D*2,E),12*(1+D)),k=x(n,`layout.donut.thickness`,x(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(E-1,k==null?O:b(k,O)));return{...e,drawingArea:h,center:v,radius:E,thickness:A,innerRadius:B(n)?0:Math.max(0,E-A)}}function he(e,t){let n=b(x(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,B(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:O(e.color,t[n]?.color),value:b(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(b(e.value,0)))),r=t.map(e=>Math.abs(b(e.value,0))/n);return m({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function V(e){return`gradient_${F()}`}function H(e,t){return`polar_gradient_${t}_${F()}`}function _e(e){return T(e.config,`type`,`classic`)!==`classic`||!x(e.config,`useGradient`,!1)?``:C(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${V(e)})`})}function U(e){return`drop_shadow_${F()}`}function ve(e){let{config:t,width:n}=e,r=x(t,`title`,{}),i=k(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?b(r.paddingLeft,12):a===`right`?n-b(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=b(r.fontSize,20),l=b(i.fontSize,14),u=b(r.paddingTop,12)+c,d=[M(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:O(r.color,A(t))})];return i.text&&d.push(M(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:O(i.color||r.color,A(t))})),j(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!x(n,`useGradient`,!1),o=!!x(n,`layout.donut.useShadow`,!1);if(i){let i=T(n,`type`,`classic`),o=b(x(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=B(n)?1:e.thickness/e.radius;r.push(j(`radialGradient`,{id:V(e)},[C(`stop`,{offset:`0%`,"stop-color":a(I(n),0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),C(`stop`,{offset:`100%`,"stop-color":a(I(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(j(`radialGradient`,{id:H(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[C(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),C(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=O(x(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=b(x(n,`layout.donut.shadowOpacity`,.2),.2),a=b(x(n,`layout.donut.shadowBlur`,6),6),o=b(x(n,`layout.donut.shadowOffsetY`,3),3);r.push(j(`filter`,{id:U(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?j(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return x(e.config,`useGradient`,!1)?`url(#${H(e,n)})`:t.color}function W(e){let{config:t}=e;return x(t,`layout.donut.borderColorAuto`,!0)?I(t):O(x(t,`layout.donut.borderColor`,I(t)),I(t))}function G(e){return x(e.config,`layout.donut.useShadow`,!1)?`url(#${U(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=W(e),r=b(x(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{b(t.proportion,0)<=0||(i.push(C(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:I(e.config)})),i.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:G(e)})))}),j(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=W(e),i=b(x(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(C(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:G(e)})))}),j(`g`,{"data-layer":`polar-slices`},a.join(``))}function K(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=x(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:b(x(i,r,s.rounding??0),s.rounding??0)});return f(s.formatter,n.value,c,{datapoint:n})}function q(e,n){let{config:r}=e,i=x(r,`layout.labels.percentage`,{}),a=b(n.proportion,0)*100,o=t({v:a,s:`%`,r:b(i.rounding,0)});return f(i.formatter,a,o,{datapoint:n})}function J(e,t){let n=x(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?K(e,t):``,percentage:a?q(e,t):``}}function we(e,t){let{value:n,percentage:r}=J(e,t);return r&&n?`${r} (${n})`:r||n||``}function Y(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?K(e,t):``,s=a?q(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function X(e,t){let n=x(e.config,`layout.labels`,{}).dataLabels??{};if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=b(n.hideUnderValue,0);return b(t.proportion,0)*100>r}function Te(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r=b(n.smallArcClusterThreshold,0),i=b(n.hideUnderValue,0),a=b(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Z(e){return!!x(e.config,`layout.curvedMarkers`,x(e.config,`layout.donut.curvedMarkers`,!1))}function Q(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=b(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Z(e);function _(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function S({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:g(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>S({arc:e,index:t})).filter(({arc:t})=>X(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function Ee({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=x(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??g(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=J(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:O(s.color,A(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},_(t+(n===m.length-1?` `:``)))).join(``):``,v=p?j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},_(p)):``;return j(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${v}`)}function De(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!T(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=b(r.fontSize??n.value?.fontSize??12,12);O(r.color??n.value?.color??A(e.config),A(e.config)),r.bold??n.value?.bold;let a=b(r.offset,16),o=Q(e,t),s=[];return t.forEach((t,n)=>{if(!X(e,t))return;let c=o[n];Y(e,t),c?s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:b(r.smallArcClusterFontSize,i)})):s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:g(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?j(`g`,{"data-layer":`data-labels`},s.join(``)):``}function Oe(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function ke(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function Ae(e,t,n,r){let i=x(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=b(a.fontSize,i.dataLabels?.fontSize??12),c=b(o.fontSize,i.dataLabels?.fontSize??12),l=j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(a.color,A(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},_(String(Y(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:O(o.color,A(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},_(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function je(e,t,n){let r=x(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=b(a.fontSize,i.fontSize??12),d=b(s.fontSize,i.fontSize??12),f=O(o.color,A(e.config)),p=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!X(e,t))return;let a=Oe(e,i,42),m=ke(e,a);l?p.push(j(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":m},Ae(e,t,a.x,m))):(p.push(j(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":m,fill:f},te({content:Y(e,t),x:a.x,fontSize:u,fill:f,textAnchor:m}))),s.show&&p.push(j(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":m,fill:O(s.color,A(e.config))},c({content:_(String(t.name??``)),fontSize:d,fill:O(s.color,A(e.config)),x:a.x}))))}),p.length?j(`g`,{"data-layer":`polar-data-labels`},p.join(``)):``}function Me(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=x(e.config,`layout.labels.dataLabels`,{}),i=b(r.offset,16),a=b(r.markerFlatLength,12),o=Z(e),s=d(t).x,c=g(t,i,i)-4,l=s+(t.center.endX>t.cx?-a:a),u=`${s},${c}`,f=`${l},${c}`,p=`${t.center.endX},${t.center.endY}`;return o?`M${u} Q${f} ${p}`:`M${u} ${f} ${p}`}function Ne(e,t){let n=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Q(e,t),i=[];return t.forEach((t,a)=>{if(!X(e,t))return;let o=r[a],s=Me(e,t,o);s&&(i.push(C(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":b(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(C(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??g(t)-3.5,r:b(n.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1})))}),i.length?j(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Pe(e,t,r){let i=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!X(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(C(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":b(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(C(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:b(i.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1}))}),a.length?j(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:M(e,{"text-anchor":`middle`,...t})}function Fe(e,n,r){if(T(e.config,`type`,`classic`)!==`classic`||B(e.config)||!n)return``;let i=x(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=b(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+b(a.offsetY,0),l=a.value??{},u=b(l.fontSize,r),d=f(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:b(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:O(a.color,A(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+b(l.offsetY,0),fill:O(l.color,O(a.color,A(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=b(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=b(u.fontSize,i),p=f(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:b(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+b(o.offsetY,0),fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+b(u.offsetY,0),fill:O(u.color,O(o.color,A(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?j(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Ie(e,n){let{config:r,center:i}=e,a=x(r,`layout.donut.labels.total`,x(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=x(r,`layout.labels.dataLabels`,{}),s=b(a.fontSize,20),c=O(a.color,A(r)),l=f(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:b(a.rounding,0)}),{total:n});return M(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Le(e,t){let n=R(L(e));return n?b(t.value,0)/n*100:0}function Re(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:b(r.roundingValue,o.rounding??0)});return f(o.formatter,n.value,s,{datapoint:n,serie:n})}function ze(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}).percentage??{},a=Le(e,n),o=t({v:a,s:`%`,r:b(r.roundingPercentage,i.rounding??0)});return f(i.formatter,a,o,{datapoint:n,serie:n})}function Be(e,t){let n=x(e.config,`legend`,{}),r=[],i=n.showPercentage?ze(e,t):``,a=n.showValue?Re(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function Ve(e,t){let n=x(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=z(e,t),i=O(n.color,A(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(C(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(M(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),j(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function He(e){return j(`g`,{"data-layer":`no-data`},[C(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:O(x(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function Ue(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function We(e,t,n){let r=`${T(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return j(`title`,{},_(r))}async function Ge(e){let t=e.config,n=b(e.width,x(t,`width`,512)),r=b(e.height,x(t,`height`,512)),i=L(e),a=R(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=T(t,`type`,`classic`),u=a>0&&s.some(e=>b(e.proportion,0)>0);return`
|
|
1
|
+
import{t as e}from"./useConfig-D3ZfFSE5.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,i as f,in as p,j as m,nn as h,p as g,st as _,t as v}from"./lib-rPeBMZrn.js";import{t as y}from"./vue_ui_donut-T5PeOqvf.js";import{_ as b,a as x,c as S,d as C,g as w,i as T,l as E,n as D,o as O,p as k,r as A,s as ee,t as te,u as j,v as M}from"./render-common-Dkf3n13B.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=p({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=p({userConfig:y[i]||{},defaultConfig:n}),o=p({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:h[i]||r}}function N(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function P(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+N(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+N(t,0),0):N(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:N(P(o,`chart.padding.top`,24),24),right:N(P(o,`chart.padding.right`,24),24),bottom:N(P(o,`chart.padding.bottom`,24),24),left:N(P(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=N(P(o,`chart.donut.radius`,f),f),m=N(P(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:N(P(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function F(){return ue}function I(e){return O(x(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return b(e?.value??e?.absoluteValue??0,0)}function L(e){return w(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:O(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function R(e){return e.reduce((e,t)=>e+Math.abs(b(t.value,0)),0)}function fe(e){let t=x(e,`title`,{}),n=k(t,`subtitle`,{});if(!t.text)return 0;let r=b(t.fontSize,20),i=n.show!==!1&&n.text?b(n.fontSize,14):0;return b(t.paddingTop,12)+r+(i?i+12:0)+b(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=x(n,`legend`,{}),a=b(i.fontSize,12),o=b(i.markerSize,10),s=b(i.itemGap,24),c=b(i.rowGap,8),l=b(i.padding,8),u=b(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Be(e,t),r=D(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function z(e,t){return!x(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function B(e){return!!T(e,`pie`,x(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=z(e,t),s=x(n,`legend.show`,!0),c=x(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=b(x(n,`padding.top`,24),24),f=b(x(n,`padding.right`,24),24),p=b(x(n,`padding.bottom`,24),24),m=b(x(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?b(T(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=b(x(n,`layout.donut.radiusRatio`,.35),.35),S=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*S),w=x(n,`layout.donut.radius`,null),E=w==null?C:Math.min(C,b(w,C)),D=b(x(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(E*D*2,E),12*(1+D)),k=x(n,`layout.donut.thickness`,x(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(E-1,k==null?O:b(k,O)));return{...e,drawingArea:h,center:v,radius:E,thickness:A,innerRadius:B(n)?0:Math.max(0,E-A)}}function he(e,t){let n=b(x(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,B(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:O(e.color,t[n]?.color),value:b(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(b(e.value,0)))),r=t.map(e=>Math.abs(b(e.value,0))/n);return m({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function V(e){return`gradient_${F()}`}function H(e,t){return`polar_gradient_${t}_${F()}`}function _e(e){return T(e.config,`type`,`classic`)!==`classic`||!x(e.config,`useGradient`,!1)?``:C(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${V(e)})`})}function U(e){return`drop_shadow_${F()}`}function ve(e){let{config:t,width:n}=e,r=x(t,`title`,{}),i=k(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?b(r.paddingLeft,12):a===`right`?n-b(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=b(r.fontSize,20),l=b(i.fontSize,14),u=b(r.paddingTop,12)+c,d=[M(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:O(r.color,A(t))})];return i.text&&d.push(M(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:O(i.color||r.color,A(t))})),j(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!x(n,`useGradient`,!1),o=!!x(n,`layout.donut.useShadow`,!1);if(i){let i=T(n,`type`,`classic`),o=b(x(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=B(n)?1:e.thickness/e.radius;r.push(j(`radialGradient`,{id:V(e)},[C(`stop`,{offset:`0%`,"stop-color":a(I(n),0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),C(`stop`,{offset:`100%`,"stop-color":a(I(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(j(`radialGradient`,{id:H(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[C(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),C(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=O(x(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=b(x(n,`layout.donut.shadowOpacity`,.2),.2),a=b(x(n,`layout.donut.shadowBlur`,6),6),o=b(x(n,`layout.donut.shadowOffsetY`,3),3);r.push(j(`filter`,{id:U(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?j(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return x(e.config,`useGradient`,!1)?`url(#${H(e,n)})`:t.color}function W(e){let{config:t}=e;return x(t,`layout.donut.borderColorAuto`,!0)?I(t):O(x(t,`layout.donut.borderColor`,I(t)),I(t))}function G(e){return x(e.config,`layout.donut.useShadow`,!1)?`url(#${U(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=W(e),r=b(x(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{b(t.proportion,0)<=0||(i.push(C(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:I(e.config)})),i.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:G(e)})))}),j(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=W(e),i=b(x(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(C(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:G(e)})))}),j(`g`,{"data-layer":`polar-slices`},a.join(``))}function K(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=x(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:b(x(i,r,s.rounding??0),s.rounding??0)});return f(s.formatter,n.value,c,{datapoint:n})}function q(e,n){let{config:r}=e,i=x(r,`layout.labels.percentage`,{}),a=b(n.proportion,0)*100,o=t({v:a,s:`%`,r:b(i.rounding,0)});return f(i.formatter,a,o,{datapoint:n})}function J(e,t){let n=x(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?K(e,t):``,percentage:a?q(e,t):``}}function we(e,t){let{value:n,percentage:r}=J(e,t);return r&&n?`${r} (${n})`:r||n||``}function Y(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?K(e,t):``,s=a?q(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function X(e,t){let n=x(e.config,`layout.labels`,{}).dataLabels??{};if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=b(n.hideUnderValue,0);return b(t.proportion,0)*100>r}function Te(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r=b(n.smallArcClusterThreshold,0),i=b(n.hideUnderValue,0),a=b(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Z(e){return!!x(e.config,`layout.curvedMarkers`,x(e.config,`layout.donut.curvedMarkers`,!1))}function Q(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=b(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Z(e);function _(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function S({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:g(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>S({arc:e,index:t})).filter(({arc:t})=>X(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function Ee({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=x(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??g(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=J(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:O(s.color,A(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},_(t+(n===m.length-1?` `:``)))).join(``):``,v=p?j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},_(p)):``;return j(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${v}`)}function De(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!T(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=b(r.fontSize??n.value?.fontSize??12,12);O(r.color??n.value?.color??A(e.config),A(e.config)),r.bold??n.value?.bold;let a=b(r.offset,16),o=Q(e,t),s=[];return t.forEach((t,n)=>{if(!X(e,t))return;let c=o[n];Y(e,t),c?s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:b(r.smallArcClusterFontSize,i)})):s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:g(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?j(`g`,{"data-layer":`data-labels`},s.join(``)):``}function Oe(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function ke(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function Ae(e,t,n,r){let i=x(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=b(a.fontSize,i.dataLabels?.fontSize??12),c=b(o.fontSize,i.dataLabels?.fontSize??12),l=j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(a.color,A(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},_(String(Y(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:O(o.color,A(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},_(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function je(e,t,n){let r=x(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=b(a.fontSize,i.fontSize??12),d=b(s.fontSize,i.fontSize??12),f=O(o.color,A(e.config)),p=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!X(e,t))return;let a=Oe(e,i,42),m=ke(e,a);l?p.push(j(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":m},Ae(e,t,a.x,m))):(p.push(j(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":m,fill:f},te({content:Y(e,t),x:a.x,fontSize:u,fill:f,textAnchor:m}))),s.show&&p.push(j(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":m,fill:O(s.color,A(e.config))},c({content:_(String(t.name??``)),fontSize:d,fill:O(s.color,A(e.config)),x:a.x}))))}),p.length?j(`g`,{"data-layer":`polar-data-labels`},p.join(``)):``}function Me(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=x(e.config,`layout.labels.dataLabels`,{}),i=b(r.offset,16),a=b(r.markerFlatLength,12),o=Z(e),s=d(t).x,c=g(t,i,i)-4,l=s+(t.center.endX>t.cx?-a:a),u=`${s},${c}`,f=`${l},${c}`,p=`${t.center.endX},${t.center.endY}`;return o?`M${u} Q${f} ${p}`:`M${u} ${f} ${p}`}function Ne(e,t){let n=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Q(e,t),i=[];return t.forEach((t,a)=>{if(!X(e,t))return;let o=r[a],s=Me(e,t,o);s&&(i.push(C(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":b(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(C(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??g(t)-3.5,r:b(n.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1})))}),i.length?j(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Pe(e,t,r){let i=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!X(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(C(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":b(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(C(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:b(i.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1}))}),a.length?j(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:M(e,{"text-anchor":`middle`,...t})}function Fe(e,n,r){if(T(e.config,`type`,`classic`)!==`classic`||B(e.config)||!n)return``;let i=x(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=b(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+b(a.offsetY,0),l=a.value??{},u=b(l.fontSize,r),d=f(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:b(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:O(a.color,A(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+b(l.offsetY,0),fill:O(l.color,O(a.color,A(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=b(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=b(u.fontSize,i),p=f(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:b(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+b(o.offsetY,0),fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+b(u.offsetY,0),fill:O(u.color,O(o.color,A(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?j(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Ie(e,n){let{config:r,center:i}=e,a=x(r,`layout.donut.labels.total`,x(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=x(r,`layout.labels.dataLabels`,{}),s=b(a.fontSize,20),c=O(a.color,A(r)),l=f(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:b(a.rounding,0)}),{total:n});return M(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Le(e,t){let n=R(L(e));return n?b(t.value,0)/n*100:0}function Re(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:b(r.roundingValue,o.rounding??0)});return f(o.formatter,n.value,s,{datapoint:n,serie:n})}function ze(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}).percentage??{},a=Le(e,n),o=t({v:a,s:`%`,r:b(r.roundingPercentage,i.rounding??0)});return f(i.formatter,a,o,{datapoint:n,serie:n})}function Be(e,t){let n=x(e.config,`legend`,{}),r=[],i=n.showPercentage?ze(e,t):``,a=n.showValue?Re(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function Ve(e,t){let n=x(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=z(e,t),i=O(n.color,A(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(C(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(M(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),j(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function He(e){return j(`g`,{"data-layer":`no-data`},[C(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:O(x(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function Ue(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function We(e,t,n){let r=`${T(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return j(`title`,{},_(r))}async function Ge(e){let t=e.config,n=b(e.width,x(t,`width`,512)),r=b(e.height,x(t,`height`,512)),i=L(e),a=R(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=T(t,`type`,`classic`),u=a>0&&s.some(e=>b(e.proportion,0)>0);return`
|
|
2
2
|
<svg
|
|
3
3
|
xmlns="${v}"
|
|
4
4
|
width="100%"
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,$t as r,At as i,D as a,Ht as o,It as ee,J as s,Jt as c,Kt as te,S as ne,X as re,_ as ie,at as ae,f as oe,h as se,i as ce,in as le,nn as ue,nt as de,p as fe,t as pe,tt as me,w as he,y as ge,yt as _e,zt as ve}from"./lib-rPeBMZrn.js";import{n as ye,t as be}from"./BaseScanner-8NdoBs7B.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as we}from"./useNestedProp-DnGoh-XS.js";import{t as Te}from"./useThemeCheck-BKNRbGeC.js";import{t as Ee}from"./chartImage-DPGnEuYM.js";import{n as De}from"./Title-BliHuXfT.js";import{t as Oe}from"./useChartExport-BZts4KFb.js";import{n as ke,t as Ae}from"./tableIntegration-CNoJ1CIY.js";import{n as je,t as Me}from"./annotationSlots-RvQBEO9-.js";import{n as Ne,t as Pe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Fe}from"./useTimeLabels-Das5O74F.js";import{t as Ie}from"./usePrinter-DVf3YcG5.js";import{t as Le}from"./useTransitions-ChGGrtrv.js";import{t as Re}from"./useStableElementSize-CegFbRlF.js";import{t as ze}from"./useSvgLabelLayout-42Kats14.js";import{t as Be}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Ve}from"./useResponsive-CENUxfEL.js";import{t as He}from"./DefGrad-DKMq1REY.js";import{t as Ue}from"./SlicerPreview-DYuyE9u9.js";import{t as We}from"./BaseLegendToggle-aT9fOoGO.js";import{t as Ge}from"./A11yDataTable-DWNlWXzs.js";import{t as Ke}from"./useUserOptionState-CXlFnwPv.js";import{t as qe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Je}from"./annotationViewport-X8fvs7pz.js";import{t as Ye}from"./Legend-DM0ClX3D.js";import{t as Xe}from"./vue_ui_donut_evolution-CVoh3twl.js";import{Fragment as l,Teleport as Ze,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Qe,createTextVNode as $e,createVNode as et,defineAsyncComponent as tt,guardReactiveProps as nt,mergeProps as rt,nextTick as it,normalizeClass as h,normalizeProps as at,normalizeStyle as ot,onBeforeUnmount as st,onMounted as ct,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as lt,shallowRef as ut,toDisplayString as b,toRefs as dt,unref as x,watch as ft,watchEffect as pt,withCtx as S}from"vue";var mt=/* @__PURE__ */ e({default:()=>rn}),ht=[`id`],gt=[`id`],_t=[`id`],vt={style:{position:`relative`}},yt=[`xmlns`,`aria-describedby`,`viewBox`],bt=[`x`,`y`,`width`,`height`],xt={key:1},St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt={key:0},Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`font-size`,`fill`,`transform`],Dt=[`x`,`y`,`font-size`,`fill`],Ot=[`d`,`stroke`,`stroke-width`],kt=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],At={key:0},jt=[`text-anchor`,`font-size`,`fill`,`transform`],Mt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Nt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Pt={key:1},Ft=[`cx`,`cy`,`r`,`fill`],It={key:0},Lt={key:0},Rt=[`d`,`stroke`],zt=[`text-anchor`,`x`,`y`,`fill`],Bt=[`cx`,`cy`,`r`,`fill`],Vt={key:0},Ht=[`cx`,`cy`,`fill`],Ut={key:1},Wt=[`d`,`fill`,`stroke`],Gt={key:2},Kt=[`d`,`fill`,`stroke`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`width`,`height`,`fill`],Yt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Xt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Zt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Qt={key:5,class:`vue-data-ui-watermark`},$t=[`id`],en=[`onClick`],tn={key:0},nn={key:1},rn=/*#__PURE__*/ Ce({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Ce,emit:mt}){let rn=tt(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),an=tt(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),on=tt(()=>import(`./DataTable-5Ug6gMAX.js`)),sn=tt(()=>import(`./PackageVersion-DWlHsdPa.js`).then(e=>e.t)),cn=tt(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),ln=tt(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),un=tt(()=>import(`./vue-ui-donut-CU-L5W3v.js`).then(e=>e.n)),dn=tt(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_donut_evolution:fn}=t(),{isThemeValid:pn,warnInvalidTheme:mn}=Te(),C=e,w=_(re()),T=_([]),E=_(null),hn=_(null),gn=_(!1),D=_(null),O=_(null),_n=_(null),vn=_(0),yn=_(0),bn=_(0),xn=_(0),Sn=_(0),Cn=_(null),wn=_(null),Tn=_(null),En=_(null),Dn=_(!1),On=_(null),kn=_(null),An=ut(null),jn=_(0),Mn=_(0),Nn=_(!1);function Pn(){An.value=O.value?.parentNode??null}function Fn(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function In(){let e=++Mn.value;await it(),await Fn(),await Fn(),e===Mn.value&&(jn.value+=1)}function Ln(){Nn.value||(Nn.value=!0,it(()=>{Nn.value=!1,Pn(),In()}))}let Rn=Re({elementRef:An,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{In()}}),zn=_(null),Bn=_(null),Vn=_(null),Hn=_(null),Un=_(null),Wn=_(!1),k=ut(null),Gn=ut(null),Kn=_(null),A=_(null),qn=_(!1),j=mt,Jn=u(()=>!!C.dataset&&C.dataset.length),Yn=_(!1),Xn=0;ct(()=>{Dn.value=!0,Pn(),Rn.start(),Qn(),In()});let Zn=u(()=>M.value.debug);function Qn(){ve(C.dataset)?(ae({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:Zn.value}),ir.value=!0):C.dataset.length&&C.dataset.forEach((e,t)=>{_e({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ae({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:Zn.value}),ir.value=!0})}),ve(C.dataset)||(ir.value=M.value.loading),setTimeout(()=>{Wn.value=!0},10),xr(),M.value.responsive&&(k.value&&(Gn.value&&k.value.unobserve(Gn.value),k.value.disconnect()),k.value=new ResizeObserver(()=>{Wn.value=!1;let{width:e,height:t}=Ve({chart:O.value,title:M.value.style.chart.title.text?zn.value:null,legend:M.value.style.chart.legend.show?Bn.value:null,slicer:M.value.style.chart.zoom.show&&ar.value>1?Un.value:null,source:Vn.value});cancelAnimationFrame(Xn),Xn=requestAnimationFrame(()=>{L.value.width=e,L.value.height=t-12,Yn.value=!0,Ln(),clearTimeout(Kn.value),Kn.value=setTimeout(()=>{Wn.value=!0},10)})}),Gn.value=O.value.parentNode,k.value.observe(Gn.value)),Ln()}let M=_(kr()),N=u(()=>P.value.grid),P=u(()=>M.value.style.chart.layout),$n=u(()=>M.value.style.chart.dialog),F=u(()=>M.value.style.chart);xe({config:()=>M.value,dataset:()=>C.dataset,component:`VueUiDonutEvolution`,rules:[Se.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. 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.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:er}=Le({config:()=>M.value.transitions,dataset:()=>C.dataset}),I=u(()=>M.value.userOptions.useCursorPointer),tr=u(()=>le({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:M.value.skeletonConfig??{}})),{loading:nr,FINAL_DATASET:rr,manualLoading:ir}=ye({...dt(C),FINAL_CONFIG:M,prepareConfig:kr,callback:()=>{Promise.resolve().then(async()=>{await xr()})},skeletonDataset:C.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:le({defaultConfig:M.value,userConfig:tr.value})}),L=_({width:P.value.width,height:P.value.height}),ar=u(()=>Math.max(...rr.value.map(e=>e.values.length))),R=_({start:0,end:ar.value}),z=_(!1),or=_(!1),B=_(null),V=_(null),H=_(null),sr=_(!1),cr=_({time:0,x:0,y:0,pointerType:null}),lr=u(()=>M.value.style.chart.zoom?.dragToZoom),U=u(()=>lr.value.show&&Jn.value&&dr.value&&Y.value>1&&!nr.value),ur=_(!1),dr=_(!1),fr=_(!1),pr=null,W={};function mr(e,t=R.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function hr(e){let t=mr(e);t&&j(`update:zoomState`,t)}function gr(){pr&&=(cancelAnimationFrame(pr),null),W={}}function _r(e,t=R.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function vr(){let e=Y.value;if(!Number.isFinite(e)||e<=0){R.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(R.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(R.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),R.value={start:t,end:n},Hn.value&&Hn.value.setRangeValues(t,n)}function yr(e){let t=mr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(R.value.start)||r!==Number(R.value.end))&&(gr(),R.value={start:n,end:r},vr(),Ln()),{start:Number(R.value.start),end:Number(R.value.end)}}function br(e){let t=yr(e);return t?(hr(t),t):null}async function xr(e=!0){if(!ur.value){ur.value=!0;try{await it(),await it();let{startIndex:t,endIndex:n}=F.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){R.value={start:0,end:0},dr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:_r(Number(n)+1,i);fr.value=!0,R.value={start:i,end:a},vr(),dr.value=!0,e&&C.zoomState&&yr(C.zoomState)}finally{queueMicrotask(()=>{fr.value=!1}),ur.value=!1,Ln()}}}async function Sr({force:e=!1,publish:t=!1}={}){await xr(!e),t&&(hr({start:Number(R.value.start),end:Number(R.value.end)}),j(`zoomReset`))}ft([()=>C.zoomState,dr],([e,t])=>{t&&e&&yr(e)},{deep:!0,immediate:!0});function Cr(e){W={...W,...e},pr&&cancelAnimationFrame(pr),pr=requestAnimationFrame(()=>{let e={...R.value,...W};W={},pr=null,R.value=e,vr(),Ln(),hr({start:Number(R.value.start),end:Number(R.value.end)})})}function wr(e){if(ur.value||fr.value)return;let t=Number(e);Number.isFinite(t)&&(j(`zoomStart`,{index:t,isZoom:t!==0}),t!==R.value.start&&Cr({start:t}))}function Tr(e){if(ur.value||fr.value)return;let t=W.start===void 0?R.value.start:W.start,n=_r(Number(e),t);Number.isFinite(n)&&(j(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==R.value.end||W.start!==void 0)&&Cr({end:n}))}let{userOptionsVisible:Er,setUserOptionsVisibility:Dr,keepUserOptionState:Or}=Ke({config:M.value}),{svgRef:G}=qe({config:F.value.title});function kr(){let e=we({userConfig:C.config,defaultConfig:fn}),t={},n=e.theme;if(n){if(!pn.value(e))mn(e),t=e;else{let r=we({userConfig:Xe[n]||C.config,defaultConfig:e});t={...we({userConfig:C.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:ue[n]||o}}}else t=e;return t}ft(()=>C.config,e=>{nr.value||(M.value=kr()),Er.value=!M.value.userOptions.showOnChartHover,Qn(),bn.value+=1,xn.value+=1,Sn.value+=1,Ir.value.showTable=M.value.table.show},{deep:!0}),ft(()=>C.dataset,e=>{Array.isArray(e)&&e.length>0&&(ir.value=!1),Sr()},{deep:!0});let{isPrinting:Ar,isImaging:jr,generatePdf:Mr,generateImage:Nr}=Ie({elementId:w.value,fileName:F.value.title.text||`vue-ui-donut-evolution`,options:M.value.userOptions.print}),Pr=u(()=>M.value.userOptions.show&&!F.value.title.text),Fr=u(()=>he(M.value.customPalette)),Ir=_({showTable:M.value.table.show});ft(M,()=>{Ir.value={showTable:M.value.table.show}},{immediate:!0});let Lr=u(()=>({top:P.value.padding.top,right:P.value.padding.right,bottom:P.value.padding.bottom,left:P.value.padding.left})),K=u(()=>N.value.yAxis.position===`right`),{metrics:Rr,ready:zr,settling:Br,update:Vr}=ze({svgRef:G,canMeasure:()=>(!M.value.responsive||Yn.value)&&(!N.value.xAxis.dataLabels.show||Gr.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(Cn.value).textWidth,yAxisLabelWidth:e(En.value).rotatedWidth,xAxisLabelHeight:e(Tn.value).height,timeLabelsHeight:e(wn.value).height})});function Hr(){let e=Rr.value.scaleLabelsWidth,t=En.value?Rr.value.yAxisLabelWidth+N.value.axis.yLabelOffsetX+N.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}st(()=>{cancelAnimationFrame(Xn),Rn.stop(),clearTimeout(Kn.value),gr(),vi(),ii(),k.value&&(Gn.value&&k.value.unobserve(Gn.value),k.value.disconnect(),k.value=null,Gn.value=null)});let Ur=u(()=>Rr.value.xAxisLabelHeight+Rr.value.timeLabelsHeight+N.value.axis.fontSize+N.value.xAxis.dataLabels.offsetY),q=u(()=>{let e=Hr(),t=P.value.dataLabels.fontSize*3,n=L.value.width,r=L.value.height,i=Lr.value.left+e.left,a=n-Lr.value.right-e.right,o=n-i-Lr.value.right-e.right,ee=r-Lr.value.top-Lr.value.bottom-t-Ur.value,s=Lr.value.top+t;return{top:s,left:i,right:a,bottom:r-Lr.value.bottom-Ur.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:s+Math.max(10,ee)/2,width:Math.max(10,o),height:Math.max(10,ee),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>(Zn.value&&rr.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ae({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&ae({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),rr.value.map((e,t)=>({...e,values:te(e.values),color:ne(e.color)||Fr.value[t]||o[t]||o[t%o.length],length:(e.values||[]).length,uid:re()})))),Wr=u(()=>J.value.filter(e=>!T.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=R.value.start&&t<=R.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=_([]),Gr=_(!1),Kr=0;pt(()=>{let e=++Kr;(async()=>{let t=await Fe({values:N.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:N.value.xAxis.dataLabels.datetimeFormatter,start:R.value.start,end:R.value.end});e===Kr&&(X.value=t,Gr.value=!0)})()});let Z=u(()=>q.value.width/(R.value.end-R.value.start)),qr=u(()=>{let e=[];for(let t=0;t<R.value.end-R.value.start;t+=1){let n=Wr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Jr=u(()=>{let e=Math.max(...qr.value.map(e=>e.subtotal).filter(e=>i(e)))??1,t=Math.min(...qr.value.map(e=>e.subtotal).filter(e=>i(e)))??0,n=Math.max(N.value.yAxis.scaleMax??0,e),r;return r=N.value.yAxis.scaleMin==null?0:Math.min(t,N.value.yAxis.scaleMin),N.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=qr.value.length===1?Jr.value.max*2:Jr.value.max;return ie(Jr.value.min,e,N.value.yAxis.dataLabels.steps)});ft(()=>Q.value.ticks.join(`|`),()=>{Ln()},{flush:`post`});function Yr(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Xr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Yr(e),value:e}))),$=u(()=>{let e=qr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=E.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Yr(t.subtotal),c=Wr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:ee({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:ee({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:ee({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function Zr(e,t,r){return ce(P.value.dataLabels.formatter,e,n({p:P.value.dataLabels.prefix,v:e,s:P.value.dataLabels.suffix,r:P.value.dataLabels.rounding}),{datapoint:t,index:r})}function Qr(e,t){return isNaN(e.value/r(t,`value`))?0:(e.value/r(t,`value`)*100).toFixed(0)+`%`}function $r(e){let t=G.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,ee=(n.width-a)/2,s=(n.height-o)/2;return{x:(e.clientX-n.left-ee)/i+r.x,y:(e.clientY-n.top-s)/i+r.y}}let ei=u(()=>!z.value||B.value==null||V.value==null?null:{x:Math.min(B.value,V.value),y:q.value.top,width:Math.abs(V.value-B.value),height:q.value.height}),ti=u(()=>dr.value?Number(R.value.start)!==0||Number(R.value.end)!==Number(Y.value):!1);function ni(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function ri(){E.value=null,hn.value=null,A.value=null}function ii(e){let t=e?.pointerId==null?H.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),z.value=!1,B.value=null,V.value=null,H.value=null}function ai(){sr.value=!0,setTimeout(()=>{sr.value=!1},0)}function oi(e){sr.value&&(sr.value=!1,e.preventDefault(),e.stopPropagation())}function si(e){if(!U.value||!ti.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=cr.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(cr.value={time:0,x:0,y:0,pointerType:null},ai(),vi(),ii(e),Vi(),Sr({force:!0,publish:!0}),!0):(cr.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function ci(e){let t=Number(R.value.end)-Number(R.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((ni(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function li(e,t){let n=ci(e),r=ci(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(R.value.start)+i,end:Number(R.value.start)+a+1}}function ui(e){let t=br(e);return t?(j(`zoomStart`,{index:t.start,isZoom:t.start!==0}),j(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function di(e){if(!U.value||Fi.value||e.button!==void 0&&e.button!==0||H.value!=null&&e.pointerId!==H.value)return;let t=$r(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(R.value.end)-Number(R.value.start)<=1)return;or.value=!0,G.value?.focus?.({preventScroll:!0}),vi(),ri();let n=ni(t.x);H.value=e.pointerId,z.value=!0,B.value=n,V.value=n}function fi(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=$r(e);t&&(V.value=ni(t.x),ri(),B.value!=null&&Math.abs(V.value-B.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function pi(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=$r(e);t&&(V.value=ni(t.x));let n=B.value,r=V.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(si(e))return;ii(e);return}let i=li(Math.min(n,r),Math.max(n,r));i?(ii(e),ui(i)&&(cr.value={time:0,x:0,y:0,pointerType:null},ri(),ai())):ii(e)}function mi(e){z.value||(E.value=null,hn.value=null,A.value=null,M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+R.value.start}))}function hi(e){z.value||(M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+R.value.start}),E.value=e.index,hn.value=e,A.value=e.index)}let gi=_(null),_i=null;function vi(){_i&&=(clearTimeout(_i),null)}function yi(e,t){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:e.index+R.value.start}),e.subtotal&&$n.value.show&&(hn.value=null,E.value=null,gn.value=!0,D.value=e,Hi(e),[null,void 0].includes(t)||(gi.value=t))}function bi(e,t){if(vi(),!U.value||!ti.value){yi(e,t);return}let n=cr.value.pointerType===`touch`?480:380;_i=setTimeout(()=>{_i=null,yi(e,t)},n)}let xi=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(R.value.start,R.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:T.value.includes(e.uid)?.5:1,segregate:()=>Ti(e.uid),isSegregated:T.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${F.value.legend.showValue?ce(P.value.dataLabels.formatter,e.value,n({p:P.value.dataLabels.prefix,v:e.value,s:P.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${F.value.legend.showPercentage?T.value.includes(e.uid)?`${F.value.legend.showValue?` (`:``}- %${F.value.legend.showValue?`)`:``}`:`${F.value.legend.showValue?` (`:``}${isNaN(e.value/Si.value)?`-`:n({v:e.value/Si.value*100,s:`%`,r:F.value.legend.roundingPercentage})}${F.value.legend.showValue?`)`:``}`:``}`}))),Si=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),Ci=u(()=>({cy:`donut-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`:``}));function wi(){T.value.length?T.value=[]:xi.value.forEach(e=>{T.value.push(e.uid)}),j(`selectLegend`,Wr.value)}function Ti(e){if(T.value.includes(e))T.value=T.value.filter(t=>t!==e),j(`selectLegend`,Wr.value);else{if(T.value.length===J.value.length-1)return;T.value.push(e),j(`selectLegend`,Wr.value)}D.value&&yi($.value.find((e,t)=>t===gi.value))}function Ei(e){return J.value.length?J.value.find(t=>t.name===e)||(Zn.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):(Zn.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function Di(e){let t=Ei(e);t!==null&&T.value.includes(t.uid)&&Ti(t.uid)}function Oi(e){let t=Ei(e);t!==null&&(T.value.includes(t.uid)||Ti(t.uid))}let ki=u(()=>{let e=[``].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!T.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${P.value.dataLabels.prefix}${Number(n.toFixed(M.value.table.td.roundingValue))}${P.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${Zr(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:[M.value.table.columnNames.period].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(e=>e.name),M.value.table.columnNames.total)}});function Ai(){return J.value}function ji(e=null){it(()=>{let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=[...ki.value.head.map(e=>e.name??e)],r=[...ki.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),o=a(i);e?e(o):de({csvContent:o,title:F.value.title.text||`vue-ui-donut-evolution`})})}let Mi=_(!1);function Ni(e){Mi.value=e,vn.value+=1}function Pi(){Ir.value.showTable=!Ir.value.showTable}let Fi=_(!1);function Ii(){Fi.value=!Fi.value}function Li(e){return e.proportion*100>F.value.donuts.hover.hideLabelsUnderValue}let Ri=_([]),zi=_({}),Bi=_(null);function Vi(){Bi.value?.close?.(),D.value=null,gi.value=null,gn.value=!1,hn.value=null,E.value=null,A.value=null}function Hi(e){Ri.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),zi.value=me({...$n.value.donutChart,responsive:!0,theme:M.value.theme}),Bi.value&&Bi.value.open()}let Ui=Ee(O,()=>F.value.title.text),Wi=u(()=>L.value.width),Gi=u(()=>L.value.height);Be({timeLabelsEls:wn,timeLabels:X,slicer:R,configRef:M,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Wi,height:Gi,rotation:N.value.xAxis.dataLabels.autoRotate.angle});let Ki=u(()=>Ae({config:M,style:F,mutableConfig:Ir,dialog:dn,accordion:rn,isFullscreen:Mi,parent:O,maxWidth:800,isCursorPointer:I}));ft(()=>Ir.value.showTable,e=>ke(e,M,On));function qi(){Ir.value.showTable=!1,kn.value&&kn.value.setTableIconState(!1)}let Ji=u(()=>xi.value.map(e=>({...e,name:e.display}))),Yi=u(()=>F.value.backgroundColor),Xi=u(()=>F.value.legend),Zi=u(()=>F.value.title),{isCallbackImaging:Qi,isCallbackSvg:$i,generateSvg:ea,onGenerateImage:ta}=Oe({svg:G,title:Zi,legend:Xi,legendItems:Ji,backgroundColor:Yi,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Nr});async function na(){j(`copyAlt`,{config:M.value,dataset:$.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ra(){A.value=null,qn.value=!0}function ia(){or.value=!1,A.value=null,E.value=null,hn.value=null,qn.value=!1}function aa(e){if(!G.value||Fi.value||document.activeElement!==G.value||(or.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(U.value&&(ti.value||z.value)){vi(),ii(),Vi(),Sr({force:!0,publish:!0});return}A.value=null,E.value=null,hn.value=null;return}if(r){if(A.value===null)return;let e=$.value[A.value];if(!e)return;yi(e,A.value);return}let a=A.value,o=E.value,ee=a!==null&&a>=0&&a<$.value.length,s=o!==null&&o>=0&&o<$.value.length;ee?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):s?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let c=$.value[a];c&&hi(c)}let oa=u(()=>({headers:ki.value?.colNames??[],rows:ki.value?.bodyA11y??[]}));Ce({getData:Ai,getImage:Ui,generatePdf:Mr,generateCsv:ji,generateImage:Nr,generateSvg:ea,hideSeries:Oi,showSeries:Di,toggleTable:Pi,toggleAnnotator:Ii,toggleFullscreen:Ni,copyAlt:na,resetZoom:()=>Sr({force:!0,publish:!0}),setZoomState:br}),ft(()=>[L.value.width,L.value.height,jn.value,X.value,Gr.value,R.value.start,R.value.end,N.value,P.value,M.value.style.fontFamily,C.dataset,Yn.value,Cn.value,wn.value,Tn.value,En.value],Vr,{flush:`post`,deep:!0});let sa=u(()=>Je({enabled:M.value.userOptions?.annotator?.followZoom,area:q.value,range:R.value,ticks:Xr.value}));return(e,t)=>(g(),p(`div`,{ref_key:`donutEvolutionChart`,ref:O,class:h(`vue-data-ui-component vue-ui-donut-evolution ${Mi.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),style:ot(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor}`),id:w.value,onMouseenter:t[4]||=()=>x(Dr)(!0),onMouseleave:t[5]||=()=>x(Dr)(!1)},[m(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[m(`p`,null,b(M.value.a11y.translations.keyboardNavigation),1)],8,gt),oa.value?.rows?.length?(g(),d(Ge,{key:0,uid:w.value,head:oa.value.headers,body:oa.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),M.value.userOptions.buttons.annotator?(g(),d(x(cn),{key:1,showGroupActions:M.value.userOptions.annotator?.showGroupActions??!0,svgRef:x(G),followZoom:M.value.userOptions?.annotator?.followZoom,annotationViewport:sa.value,backgroundColor:F.value.backgroundColor,color:F.value.color,active:Fi.value,isCursorPointer:I.value,palette:M.value.userOptions.annotatorPalette,onClose:Ii},Qe({_:2},[v(x(Me),t=>({name:t,fn:S(n=>[y(e.$slots,t,at(nt(x(je)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Pr.value?(g(),p(`div`,{key:2,ref_key:`noTitle`,ref:_n,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),F.value.title.text?(g(),p(`div`,{key:3,ref_key:`chartTitle`,ref:zn,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:mi},[(g(),d(De,{key:`title_${bn.value}`,config:{title:{cy:`donut-evolution-div-title`,...F.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${w.value}`},null,8,_t),M.value.userOptions.show&&Jn.value&&(x(Or)||x(Er))?(g(),d(x(ln),{ref_key:`userOptionsRef`,ref:kn,key:`user_options_${vn.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:x(Ar),isImaging:x(jr),uid:w.value,hasPdf:M.value.userOptions.buttons.pdf,hasImg:M.value.userOptions.buttons.img,hasSvg:M.value.userOptions.buttons.svg,hasXls:M.value.userOptions.buttons.csv,hasTable:M.value.userOptions.buttons.table,hasFullscreen:M.value.userOptions.buttons.fullscreen,hasAltCopy:M.value.userOptions.buttons.altCopy,isFullscreen:Mi.value,titles:{...M.value.userOptions.buttonTitles},chartElement:O.value,position:M.value.userOptions.position,hasAnnotator:M.value.userOptions.buttons.annotator,isAnnotation:Fi.value,callbacks:M.value.userOptions.callbacks,printScale:M.value.userOptions.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Ni,onGeneratePdf:x(Mr),onGenerateCsv:ji,onGenerateImage:x(ta),onGenerateSvg:x(ea),onToggleTable:Pi,onToggleAnnotator:Ii,onCopyAlt:na,style:ot({visibility:x(Or)?x(Er)?`visible`:`hidden`:`visible`})},Qe({_:2},[v(x(Ne)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,at(nt(x(Pe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,vt,[(g(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:x(pe),"aria-describedby":`chart-instructions-${w.value}`,class:h({"vue-data-ui-fullscreen--on":Mi.value,"vue-data-ui-fulscreen--off":!Mi.value,"vue-data-ui-no-transition":!x(er)||x(Br),"vue-ui-donut-evolution-chart-zoom-pointer-focus":U.value&&or.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:ot({maxWidth:`100%`,visibility:x(zr)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:F.value.color,cursor:U.value?z.value?`col-resize`:`crosshair`:void 0,touchAction:U.value?`pan-y`:void 0,userSelect:U.value?`none`:void 0}),tabindex:`0`,onFocus:ra,onBlur:ia,onKeydown:aa,onPointerdown:di,onPointermove:fi,onPointerup:pi,onPointercancel:ii,onClickCapture:oi},[et(x(sn)),y(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:x(Ar)||x(jr)||x(Qi),isPrintingSvg:x($i)}},void 0,!0),e.$slots[`chart-background`]?(g(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,bt)):f(``,!0),m(`defs`,null,[et(He,{t:`linear`,id:`hover_${w.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,x(c)(F.value.backgroundColor,P.value.highlighter.opacity),1],[`100%`,x(c)(P.value.highlighter.color,P.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),et(He,{t:`radial`,id:`focus_${w.value}`,stops:[[`0%`,x(c)(x(ne)(F.value.backgroundColor),0),1],[`77%`,x(c)(`#FFFFFF`,30),1],[`100%`,x(c)(x(ne)(F.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),N.value.show?(g(),p(`g`,xt,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,St),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,Ct),N.value.showVerticalLines?(g(),p(`g`,wt,[(g(!0),p(l,null,v(R.value.end-R.value.start,(e,t)=>(g(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,Tt))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[N.value.axis.yLabel?(g(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:En,"font-size":N.value.axis.fontSize,fill:N.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-N.value.axis.fontSize/2-N.value.axis.yLabelOffsetX:N.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},b(N.value.axis.yLabel),9,Et)):f(``,!0),N.value.axis.xLabel?(g(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:Tn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":N.value.axis.fontSize,fill:N.value.axis.color},b(N.value.axis.xLabel),9,Dt)):f(``,!0)]),N.value.yAxis.dataLabels.show?(g(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:Cn,class:h({"donut-opacity":!0,"donut-behind":E.value!==null})},[(g(!0),p(l,null,v(Xr.value,(e,t)=>(g(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(g(),p(`path`,{key:0,class:h({"vue-data-ui-transition":x(er)&&!x(Br)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,10,Ot)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(g(),p(`text`,{key:1,class:h({"vue-data-ui-transition":x(er)&&!x(Br)}),transform:`translate(${K.value?q.value.right-N.value.yAxis.dataLabels.offsetX+7:q.value.left+N.value.yAxis.dataLabels.offsetX-7}, ${e.y+N.value.yAxis.dataLabels.fontSize/3})`,"font-size":N.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:N.value.yAxis.dataLabels.color,"font-weight":N.value.yAxis.dataLabels.bold?`bold`:`normal`},b(x(ge)(e.value)?x(ce)(P.value.dataLabels.formatter,e.value,x(n)({p:P.value.dataLabels.prefix,v:e.value,s:P.value.dataLabels.suffix,r:P.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,kt)):f(``,!0)]))),128))],2)):f(``,!0),N.value.xAxis.dataLabels.show?(g(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:wn,class:h({"donut-opacity":!0})},[(g(!0),p(l,null,v(R.value.end-R.value.start,(e,t)=>(g(),p(`g`,null,[(N.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!N.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(g(),p(`g`,At,[String(X.value[t].text).includes(`
|
|
2
|
+
`)?(g(),p(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":N.value.xAxis.dataLabels.rotation>0?`start`:N.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":N.value.xAxis.dataLabels.fontSize,fill:N.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+N.value.xAxis.dataLabels.fontSize+N.value.xAxis.dataLabels.offsetY}), rotate(${N.value.xAxis.dataLabels.rotation})`,innerHTML:x(s)({content:String(X.value[t].text),fontSize:N.value.xAxis.dataLabels.fontSize,fill:P.value.grid.xAxis.dataLabels.color,x:0,y:0})},null,8,Mt)):(g(),p(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":N.value.xAxis.dataLabels.rotation>0?`start`:N.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":N.value.xAxis.dataLabels.fontSize,fill:N.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+N.value.xAxis.dataLabels.fontSize+N.value.xAxis.dataLabels.offsetY}), rotate(${N.value.xAxis.dataLabels.rotation})`},b(X.value[t].text||``),9,jt))])):f(``,!0)]))),256))],512)):f(``,!0),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,null,[P.value.line.show&&t<$.value.length-1&&![e.subtotal,$.value[t+1].subtotal].includes(null)?(g(),p(`line`,{key:0,class:h({"donut-opacity":!0,"donut-behind":E.value!==null}),x1:e.x,y1:e.y,x2:$.value[t+1].x,y2:$.value[t+1].y,stroke:P.value.line.stroke,"stroke-width":P.value.line.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Nt)):f(``,!0),e.subtotal===null?f(``,!0):(g(),p(`g`,Pt,[e.subtotal?(g(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:e.activeRadius,fill:F.value.backgroundColor},null,8,Ft)):f(``,!0)]))]))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,{class:h({"donut-opacity":!0,"donut-behind":t!==E.value&&E.value!==null})},[e.subtotal?(g(),p(`g`,It,[E.value!==null&&E.value===t?(g(),p(`g`,Lt,[(g(!0),p(l,null,v(e.donutHover,t=>(g(),p(`g`,null,[Li(t)?(g(),p(`path`,{key:0,d:x(se)(t,{x:t.center.endX,y:t.center.endY},12,12,{x:e.x,y:e.y},!1,20),stroke:t.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Rt)):f(``,!0)]))),256)),(g(!0),p(l,null,v(e.donutHover,(t,n)=>(g(),p(`g`,null,[Li(t)?(g(),p(`text`,{key:0,"data-cy-hover-label":``,"text-anchor":x(oe)(t,!0,0).anchor,x:x(oe)(t,!0,9).x,y:x(fe)(t,14,10),fill:N.value.yAxis.dataLabels.color,"font-size":8,"font-weight":`bold`},b(t.name)+`: `+b(Qr(t,e.donut))+` (`+b(t.value===null?`-`:Zr(t.value,t,n))+`) `,9,zt)):f(``,!0)]))),256)),m(`g`,null,[m(`circle`,{cx:e.x,cy:e.y,r:e.hoverRadius,fill:F.value.backgroundColor},null,8,Bt)])])):f(``,!0)])):f(``,!0)],2))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,{class:h({"donut-opacity":!0,"donut-behind":t!==E.value&&E.value!==null})},[e.subtotal===null?f(``,!0):(g(),p(`g`,Vt,[e.subtotal===0?(g(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:3,fill:F.value.color},null,8,Ht)):E.value!==null&&E.value===t?(g(),p(`g`,Ut,[(g(!0),p(l,null,v(e.donutHover,(e,t)=>(g(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":1,stroke:F.value.backgroundColor},null,8,Wt))),256))])):(g(),p(`g`,Gt,[(g(!0),p(l,null,v(e.donut,(e,t)=>(g(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":.5,stroke:F.value.backgroundColor},null,8,Kt))),256))]))]))],2))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,{class:h({"donut-opacity":!0,"donut-behind":t!==E.value&&E.value!==null||gn.value&&t!==D.value.index})},[e.subtotal!==null&&P.value.dataLabels.show?(g(),p(`text`,{key:0,"text-anchor":`middle`,x:e.x,y:E.value===e.index&&e.subtotal?e.y+P.value.dataLabels.fontSize/3:e.y-e.radius-P.value.dataLabels.fontSize+P.value.dataLabels.offsetY,"font-size":P.value.dataLabels.fontSize,"font-weight":`bold`,fill:P.value.dataLabels.color},b(Zr(e.subtotal,e,t)),9,qt)):f(``,!0)],2))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`rect`,{x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:[E.value,gi.value].includes(e.index)?`url(#hover_${w.value})`:`transparent`,class:h({"donut-hover":I.value&&e.subtotal&&[E.value,gi.value].includes(e.index)}),style:{pointerEvents:`none`}},null,10,Jt))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`rect`,{"data-cy-trap":``,x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:`transparent`,onMouseenter:t=>hi(e),onMouseleave:t=>mi(e),onClick:n=>bi(e,t),style:ot({cursor:U.value?z.value?`col-resize`:`crosshair`:void 0}),class:h({"donut-hover":I.value&&E.value===e.index&&e.subtotal})},null,46,Yt))),256)),ei.value?(g(),p(`rect`,{key:4,x:ei.value.x,y:ei.value.y,width:ei.value.width,height:ei.value.height,fill:lr.value.selection.fill,"fill-opacity":lr.value.selection.fillOpacity,stroke:lr.value.selection.stroke,"stroke-opacity":lr.value.selection.strokeOpacity,"stroke-width":lr.value.selection.strokeWidth,"stroke-dasharray":lr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Xt)):f(``,!0),y(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:x(Ar)||x(jr)||x(Qi),isPrintingSvg:x($i)}},void 0,!0)],46,yt)),e.$slots.hint?(g(),p(`div`,Zt,[y(e.$slots,`hint`,at(nt({hint:M.value.a11y.translations.keyboardNavigation,isVisible:qn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(g(),p(`div`,Qt,[y(e.$slots,`watermark`,at(nt({isPrinting:x(Ar)||x(jr)||x(Qi)||x($i)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartSlicer`,ref:Un,style:ot(`width:100%;background:${F.value.backgroundColor}`),"data-dom-to-png-ignore":``},[Y.value>1&&F.value.zoom.show?(g(),d(Ue,{ref_key:`slicerComponent`,ref:Hn,key:`slicer_${yn.value}`,background:F.value.zoom.color,borderColor:F.value.backgroundColor,fontSize:F.value.zoom.fontSize,useResetSlot:F.value.zoom.useResetSlot,timeLabels:X.value,textColor:F.value.color,inputColor:F.value.zoom.color,selectColor:F.value.zoom.highlightColor,max:Y.value,min:0,valueStart:R.value.start,valueEnd:R.value.end,refreshStartPoint:F.value.zoom.startIndex===null?0:F.value.zoom.startIndex,refreshEndPoint:F.value.zoom.endIndex===null?Y.value:F.value.zoom.endIndex+1,enableRangeHandles:F.value.zoom.enableRangeHandles,enableSelectionDrag:F.value.zoom.enableSelectionDrag,focusOnDrag:F.value.zoom.focusOnDrag,focusRangeRatio:F.value.zoom.focusRangeRatio,isCursorPointer:I.value,maxWidth:F.value.zoom.maxWidth,minimapLeftInsetRatio:q.value.absoluteWidth>0&&F.value.zoom.autoFit?q.value.left/q.value.absoluteWidth:null,minimapRightInsetRatio:q.value.absoluteWidth>0&&F.value.zoom.autoFit?(q.value.absoluteWidth-q.value.right)/q.value.absoluteWidth:null,"onUpdate:start":wr,"onUpdate:end":Tr,onReset:t[0]||=()=>Sr({force:!0,publish:!0})},{"reset-action":S(({reset:t})=>[y(e.$slots,`reset-action`,at(nt({reset:t})),void 0,!0)]),_:3},8,[`background`,`borderColor`,`fontSize`,`useResetSlot`,`timeLabels`,`textColor`,`inputColor`,`selectColor`,`max`,`valueStart`,`valueEnd`,`refreshStartPoint`,`refreshEndPoint`,`enableRangeHandles`,`enableSelectionDrag`,`focusOnDrag`,`focusRangeRatio`,`isCursorPointer`,`maxWidth`,`minimapLeftInsetRatio`,`minimapRightInsetRatio`])):f(``,!0)],4),m(`div`,{id:`legend-bottom-${w.value}`},null,8,$t),Dn.value&&(F.value.legend.show||e.$slots.legend)?(g(),d(Ze,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[m(`div`,{ref_key:`chartLegend`,ref:Bn},[y(e.$slots,`legend`,{legend:xi.value},()=>[F.value.legend.show?(g(),d(Ye,{key:`legend_${Sn.value}`,legendSet:xi.value,config:Ci.value,onClickMarker:t[1]||=({legend:e})=>Ti(e.uid)},{item:S(({legend:e,index:t})=>[m(`div`,{onClick:t=>Ti(e.uid),style:ot(`opacity:${T.value.includes(e.uid)?.5:1}`)},b(e.display),13,en)]),legendToggle:S(()=>[xi.value.length>2&&F.value.legend.selectAllToggle.show&&!x(nr)?(g(),d(We,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:T.value.length>0,onToggle:wi},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):f(``,!0)]),_:1},8,[`legendSet`,`config`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(g(),p(`div`,{key:7,ref_key:`source`,ref:Vn,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Jn.value&&M.value.userOptions.buttons.table?(g(),d(lt(Ki.value.component),rt({key:8},Ki.value.props,{ref_key:`tableUnit`,ref:On,onClose:qi}),Qe({content:S(()=>[(g(),d(x(on),{key:`table_${xn.value}`,colNames:ki.value.colNames,head:ki.value.head,body:ki.value.body,config:ki.value.config,title:M.value.table.useDialog?``:Ki.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:I.value,onClose:qi},{th:S(({th:e})=>[$e(b(e.name??e),1)]),td:S(({td:e})=>[e.value===null?(g(),p(`span`,tn,`-`)):(g(),p(`b`,nn,b(isNaN(e.value)?``:P.value.dataLabels.prefix)+b(!isNaN(e.value)&&e.value!==null?Number(e.value.toFixed(M.value.table.td.roundingValue)).toLocaleString():e)+b(isNaN(e.value)?``:P.value.dataLabels.suffix),1)),m(`span`,null,b(e.percentage&&!isNaN(e.percentage)?`(${Number(e.percentage.toFixed(M.value.table.td.roundingPercentage)).toLocaleString()}%)`:``),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:S(()=>[$e(b(Ki.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:S(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[2]||=e=>ji(M.value.userOptions.callbacks.csv),style:ot({cursor:I.value?`cursor`:`default`})},[et(x(an),{name:`fileCsv`,stroke:Ki.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),$n.value.show?(g(),d(x(dn),{key:9,ref_key:`dialog`,ref:Bi,onClose:t[3]||=e=>{D.value=null,gn.value=!1,hn.value=null,E.value=null,gi.value=null},backgroundColor:$n.value.backgroundColor,color:$n.value.color,headerBg:$n.value.header.backgroundColor,headerColor:$n.value.header.color,isFullscreen:Mi.value,fullscreenParent:O.value},{title:S(()=>[$e(b(X.value[Number(D.value.index)]?X.value[Number(D.value.index)].text:``),1)]),content:S(()=>[D.value?(g(),d(x(un),{key:0,config:zi.value,dataset:Ri.value},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`])):f(``,!0),x(nr)?(g(),d(be,{key:10})):f(``,!0)],46,ht))}},[[`__scopeId`,`data-v-801bea8c`]]);export{mt as n,rn as t};
|