1import{t as e}from"./jsx-runtime-DUAcabCT.js";var t=e(),n={sm:12,md:14,lg:18};function r({stats:e,size:r=`sm`,showCount:a=!0,showValue:o=!1,className:s=``,onClick:c,showEmpty:l=!1}){if(!e&&!l||e&&e.count===0&&!l)return null;let u=e?.average??0,d=e?.count??0,f=n[r];return(0,t.jsxs)(c?`button`:`div`,{type:c?`button`:void 0,onClick:c,className:`inline-flex items-center gap-1.5 ${c?`hover:opacity-80 transition-opacity cursor-pointer`:``} ${s}`,"aria-label":d>0?`${u.toFixed(1)} su 5 stelle, ${d} recensioni`:`Nessuna recensione`,children:[(0,t.jsx)(`span`,{className:`inline-flex`,"aria-hidden":!0,children:[0,1,2,3,4].map(e=>{let n=Math.max(0,Math.min(1,u-e));return(0,t.jsxs)(`span`,{className:`relative inline-block`,style:{width:f,height:f},children:[(0,t.jsx)(i,{px:f,className:`text-black/20`,filled:!1}),n>0&&(0,t.jsx)(`span`,{className:`absolute inset-0 overflow-hidden`,style:{width:`${n*100}%`},children:(0,t.jsx)(i,{px:f,className:`text-black`,filled:!0})})]},e)})}),o&&d>0&&(0,t.jsx)(`span`,{className:`text-xs font-medium text-black`,children:u.toFixed(1)}),a&&(0,t.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d===0?`Nessuna recensione`:`(${d})`})]})}function i({px:e,filled:n,className:r=``}){return(0,t.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:r,fill:n?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:1.8,strokeLinejoin:`round`,children:(0,t.jsx)(`polygon`,{points:`12 2 15 8.5 22 9.3 17 14 18.2 21 12 17.8 5.8 21 7 14 2 9.3 9 8.5 12 2`})})}export{r as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.