(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[72],{20: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}},216:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n(100);var c=n(46);const r=()=>c.m>1},217:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var c=n(30),r=n(20);const s=t=>Object(c.a)(t)?JSON.parse(t)||{}:Object(r.a)(t)?t:{}},292:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var c=n(111),r=n(216),s=n(20),o=n(217);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})}},301:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var c=n(20),r=n(217);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}}}},326:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var c=n(111),r=n(216),s=n(20),o=n(217);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})}},342:function(t,e){},362:function(t,e,n){"use strict";n.r(e),n.d(e,"Block",(function(){return p}));var c=n(0),r=n(1),s=n(4),o=n.n(s),a=n(50),i=n(292),u=n(301),l=n(326),b=n(134),f=n(94);n(342);const p=t=>{const{parentClassName:e}=Object(a.useInnerBlockLayoutContext)(),{product:n}=Object(a.useProductDataContext)(),s=(t=>{const e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0})(n),b=Object(i.a)(t),p=Object(u.a)(t),d=Object(l.a)(t);if(!s)return null;const O={width:s/5*100+"%"},j=Object(r.sprintf)(
/* translators: %f is referring to the average rating value */
Object(r.__)("Rated %f out of 5","woocommerce"),s),g=(t=>{const e=Object(f.a)(t.review_count)?t.review_count:parseInt(t.review_count,10);return Number.isFinite(e)&&e>0?e:0})(n),m={__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",g,"woocommerce"),Object(r.sprintf)('<strong class="rating">%f</strong>',s),Object(r.sprintf)('<span class="rating">%d</span>',g))};return Object(c.createElement)("div",{className:o()(b.className,"wc-block-components-product-rating",{[e+"__product-rating"]:e}),style:{...b.style,...p.style,...d.style}},Object(c.createElement)("div",{className:o()("wc-block-components-product-rating__stars",e+"__product-rating__stars"),role:"img","aria-label":j},Object(c.createElement)("span",{style:O,dangerouslySetInnerHTML:m})))};e.default=Object(b.withProductDataContext)(p)}}]);