(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[72],{18:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return r}));const c=t=>!(t=>null===t)(t)&&t instanceof Object&&t.constructor===Object;function r(t,e){return c(t)&&e in t}},214:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n(100);var c=n(44);const r=()=>c.m>1},215:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var c=n(28),r=n(18);const s=t=>Object(c.a)(t)?JSON.parse(t)||{}:Object(r.a)(t)?t:{}},291:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var c=n(108),r=n(214),s=n(18),o=n(215);const a=t=>{if(!Object(r.a)())return{className:"",style:{}};const e=Object(s.a)(t)?t:{},n=Object(o.a)(e.style);return Object(c.__experimentalUseColorProps)({...e,style:n})}},299:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var c=n(18),r=n(215);const s=t=>{const e=Object(c.a)(t)?t:{},n=Object(r.a)(e.style),s=Object(c.a)(n.typography)?n.typography:{};return{style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:s.fontSize,lineHeight:s.lineHeight,fontWeight:s.fontWeight,textTransform:s.textTransform,fontFamily:e.fontFamily}}}},324:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var c=n(108),r=n(214),s=n(18),o=n(215);const a=t=>{if(!Object(r.a)()||"function"!=typeof c.__experimentalGetSpacingClassesAndStyles)return{style:{}};const e=Object(s.a)(t)?t:{},n=Object(o.a)(e.style);return Object(c.__experimentalGetSpacingClassesAndStyles)({...e,style:n})}},340:function(t,e){},360:function(t,e,n){"use strict";n.r(e),n.d(e,"Block",(function(){return f}));var c=n(0),r=n(1),s=n(5),o=n.n(s),a=n(47),i=n(291),u=n(299),l=n(324),b=n(132);n(340);const f=t=>{const{parentClassName:e}=Object(a.useInnerBlockLayoutContext)(),{product:n}=Object(a.useProductDataContext)(),s=p(n),b=Object(i.a)(t),f=Object(u.a)(t),O=Object(l.a)(t);if(!s)return null;const j={width:s/5*100+"%"},g=Object(r.sprintf)(
/* translators: %f is referring to the average rating value */
Object(r.__)("Rated %f out of 5","woocommerce"),s),m=d(n),y={__html:Object(r.sprintf)(
/* translators: %1$s is referring to the average rating value, %2$s is referring to the number of ratings */
Object(r._n)("Rated %1$s out of 5 based on %2$s customer rating","Rated %1$s out of 5 based on %2$s customer ratings",m,"woocommerce"),Object(r.sprintf)('<strong class="rating">%f</strong>',s),Object(r.sprintf)('<span class="rating">%d</span>',m))};return Object(c.createElement)("div",{className:o()(b.className,"wc-block-components-product-rating",{[e+"__product-rating"]:e}),style:{...b.style,...f.style,...O.style}},Object(c.createElement)("div",{className:o()("wc-block-components-product-rating__stars",e+"__product-rating__stars"),role:"img","aria-label":g},Object(c.createElement)("span",{style:j,dangerouslySetInnerHTML:y})))},p=t=>{const e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0},d=t=>{const e=parseInt(t.review_count,10);return Number.isFinite(e)&&e>0?e:0};e.default=Object(b.withProductDataContext)(f)}}]);