"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[29],{683:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RatingStar=void 0;const a=r(0),s=r(153),i=r(4);e.RatingStar=({starType:t,isLarge:e})=>({[s.EStar.Full]:(0,a.jsx)(i.Icons.FullRatingStarIcon,{width:e?"14px":"11px",height:e?"14px":"11px",color:"#F6C74A"}),[s.EStar.Half]:(0,a.jsx)(i.Icons.HalfRatingStarIcon,{width:e?"14px":"11px",height:e?"14px":"11px",color:"#F6C74A"}),[s.EStar.Empty]:(0,a.jsx)(i.Icons.EmptyRatingStarIcon,{width:e?"14px":"11px",height:e?"14px":"11px",color:"#F6C74A"})}[t])},74:function(t,e,r){var a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Rating=void 0;const s=r(0),i=r(2),n=r(682),o=r(683),l=a(r(108)),{wrapper:p,wrapperStars:c,wrapperStarsShorter:u,wrapperRaters:d}=l.default;e.Rating=({rating:t,raters:e,shorterRaters:r=!1,largeStars:a=!1})=>{const l=(0,n.getStars)(t),g=e.toString(),S=r?(0,n.getShorterRaters)(e):(0,i.getPreparedRaters)(g),h=l.map(((t,e)=>(0,s.jsx)(o.RatingStar,{starType:t,isLarge:a},e)));return(0,s.jsxs)("div",Object.assign({className:p},{children:[(0,s.jsx)("div",Object.assign({className:(0,i.cx)(c,r&&u)},{children:h})),(0,s.jsxs)("span",Object.assign({"aria-hidden":"true",className:(0,i.cx)(d,"no-translate")},{children:["(",S,")"]}))]}))}},153:(t,e)=>{var r;Object.defineProperty(e,"__esModule",{value:!0}),e.EStar=void 0,(r=e.EStar||(e.EStar={})).Full="full",r.Half="half",r.Empty="empty"},682:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShorterRaters=e.getStars=void 0;const a=r(153);e.getStars=t=>{const e=Math.ceil(2*t)/2;return Array.from(Array(5)).map(((t,r)=>{const s=r+1<=e+.5;return r+1<=e?a.EStar.Full:s?a.EStar.Half:a.EStar.Empty}))},e.getShorterRaters=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}}]);