| 1 |
(()=>{"use strict";var t={5338:(t,e,n)=>{var r=n(5795);e.H=r.createRoot,r.hydrateRoot},5795:t=>{t.exports=window.ReactDOM}},e={};const n=window.React;var r=function n(r){var a=e[r];if(void 0!==a)return a.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,n),s.exports}(5338);const a=(t,e,n=!1)=>{return null==(r=e)||""===r||Array.isArray(r)&&0===r.length||"object"==typeof r&&0===Object.keys(r).length||"string"==typeof r&&""===r.trim()||"number"==typeof r&&0===r?"":`${t}: ${e}${n?" !important":""};`;var r},s=(t,e="box")=>{let n="";return t?.map(((r,a)=>{const{hOffset:s="0px",vOffset:o="0px",blur:i="0px",spreed:l="0px",color:c="#e7f0fe",isInset:$=!1}=r||{},p=$?"inset":"",m=`${s} ${o} ${i}`,g=a+1>=t.length?"":", ";n+="text"===e?`${m} ${c}${g}`:`${m} ${l} ${c} ${p}${g}`})),n||""},o=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:s="sans-serif",fontVariant:o=400,fontWeight:i,isUploadFont:l=!0,fontSize:c={desktop:null,tablet:null,mobile:null},fontStyle:$,textTransform:p,textDecoration:m,lineHeight:g,letterSpace:d}=e||{},u=!n||!r||"Default"===r,f=c?.desktop||c,h=c?.tablet||f,x=c?.mobile||h,w=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},y=`\n\t\t${u?"":`font-family: '${r}', ${s};`}\n\t\t${a("font-weight",i)}\n\t\t${a("font-size",w(f))}\n\t\t${a("font-style",$)}\n\t\t${a("text-transform",p)}\n\t\t${a("text-decoration",m)}\n\t\t${a("line-height",g)}\n\t\t${a("letter-spacing",d)}\n\t`,v=o&&400!==o?"400i"===o?":ital@1":o?.includes("00i")?`: ital, wght@1, ${o?.replace("00i","00")} `:`: wght@${o} `:"",b=u?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${v.replace(/ /g,"")}&display=swap`;return{googleFontLink:!l||u?"":`@import url(${b});`,styles:`${t}{\n\t\t\t${y}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${a("font-size",w(h))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${a("font-size",w(x))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},i=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},l=t=>Array.from({length:t},((t,e)=>e+1)),c="bBlocksRating",$=({attributes:t,id:e})=>{const{rating:r,gap:$,alignment:p,margin:m,textTypo:g,textColor:d,textShadow:u,iconColor:f="#f0ad4e",iconSize:h="20px",unmarkedColor:x="#ccd6df"}=t,w=`#${e} .${c}`,y=`${w} .stars .star`,v=(r+"").split("."),b=parseInt(v[0]),L=parseInt(v[1]||0);return(0,n.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o("",g)?.googleFontLink}\n\t\t${o(`${w} .ratingPrefix`,g)?.styles}\n\n\t\t${w} {\n\t\t\tjustify-content: ${p};\n\t\t\tgap: ${$};\n\t\t\tcolor: ${d};\n\t\t\t${a("margin",i(m))}\n\t\t}\n\n\t\t${w} .ratingPrefix{\n\t\t\ttext-shadow: ${s(u,"text")}\n\t\t}\n\n\t\t${w} .stars{\n\t\t\t${a("gap",$)}\n\t\t}\n\n\t\t${y}>.starFill>svg{\n\t\t\t${a("fill",f)}\n\t\t\t${a("width",h)}\n\t\t\t${a("height",h)}\n\t\t}\n\n\t\t${y}>svg{\n\t\t\t${a("fill",x)}\n\t\t\t${a("width",h)}\n\t\t\t${a("height",h)}\n\t\t}\n\n\t\t${y}{\n\t\t\t${a("width",h)}\n\t\t\t${a("height",h)}\n\t\t}\n\n\t\t${l(b).map((t=>`${y}:nth-child(${t}) .starFill`)).join(", ")}{\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t${y}:nth-child(${b+1}) .starFill{\n\t\t\twidth: ${(()=>{switch(L){case 1:return 25;case 2:return 30;case 3:return 35;case 4:return 42.5;case 5:return 50;case 6:return 57.5;case 7:return 65;case 8:return 70;case 9:return 75;default:return 0}})()}%;\n\t\t}\n\t`}})},p=((0,n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)("polygon",{points:"12 4 9.22 9.27 3 10.11 7.5 14.21 6.44 20 12 17.27 17.56 20 16.5 14.21 21 10.11 14.78 9.27 12 4",style:{fill:"none",stroke:"rgb(0, 0, 0)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}})),(0,n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},(0,n.createElement)("path",{d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"}))),m=(0,n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},(0,n.createElement)("path",{d:"M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.6 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"})),g=({attributes:t})=>{const{ratingScale:e,iconStyle:r,prefix:a}=t;return(0,n.createElement)("div",{className:c},(0,n.createElement)("span",{className:"ratingPrefix"},a),(0,n.createElement)("div",{className:"stars"},l(e).map((t=>(0,n.createElement)("span",{key:t,className:"star"},"solid"===r?p:m,(0,n.createElement)("span",{className:"starFill"},p))))))};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-star-rating").forEach((t=>{const e=JSON.parse(t.dataset.attributes);(0,r.H)(t).render((0,n.createElement)(n.Fragment,null,(0,n.createElement)($,{attributes:e,id:t.id}),(0,n.createElement)(g,{attributes:e}))),t?.removeAttribute("data-attributes")}))}))})(); |