function u(n,e,a,r){if(e===null)return[];const l=r.findIndex(t=>t===e);return n.filter(t=>t.stack===a).map(t=>({data:t.data.find((o,i)=>i===l),color:t.backgroundColor,label:t.label}))}function s(n){return new Set(n.map(e=>e.stack)).size>1}function c(n){return{animation:{duration:0},maintainAspectRatio:!0,radius:"90%",plugins:{tooltip:{callbacks:{label:a=>{const r=Number(a.raw||0),l=a.dataset.data.map(o=>Number(o||0)).reduce((o,i)=>o+i,0),t=(r*100/l).toFixed(2);return`${a.dataset.label}: ${a.formattedValue}${n} (${t}%)`}}},legend:{position:"top"}}}}export{u as a,c as g,s as h};
