1function generateStarsSVG(rating){const fullStars=Math.floor(rating),hasHalfStar=rating%1>=.3&&rating%1<=.7,adjustedFull=rating%1>.7?fullStars+1:fullStars;let html="";for(let i=0;i<5;i++)i<adjustedFull?html+='<svg class="kr-star" width="16" height="16" viewBox="0 0 12 12" fill="none"><path d="M2.826 11.514C2.45 11.752 1.974 11.418 2.07 10.984L2.806 7.633C2.844 7.459 2.786 7.277 2.654 7.157L0.163 4.882C-0.158 4.59 0.022 4.055 0.455 4.015L3.7 3.718C3.887 3.701 4.049 3.581 4.119 3.407L5.36 0.314C5.528-0.105 6.12-0.105 6.288 0.314L7.53 3.407C7.6 3.581 7.761 3.701 7.948 3.718L11.193 4.015C11.626 4.055 11.806 4.59 11.485 4.882L8.994 7.157C8.862 7.277 8.804 7.459 8.843 7.633L9.579 10.984C9.674 11.418 9.198 11.752 8.822 11.514L6.092 9.779C5.929 9.675 5.72 9.675 5.556 9.779L2.826 11.514Z" fill="#1DACD6"/></svg>':i===adjustedFull&&hasHalfStar?html+=`<svg class="kr-star" width="16" height="16" viewBox="0 0 12 12" fill="none"><defs><clipPath id="half-${i}"><rect x="0" y="0" width="6" height="12"/></clipPath></defs><path d="M2.826 11.514C2.45 11.752 1.974 11.418 2.07 10.984L2.806 7.633C2.844 7.459 2.786 7.277 2.654 7.157L0.163 4.882C-0.158 4.59 0.022 4.055 0.455 4.015L3.7 3.718C3.887 3.701 4.049 3.581 4.119 3.407L5.36 0.314C5.528-0.105 6.12-0.105 6.288 0.314L7.53 3.407C7.6 3.581 7.761 3.701 7.948 3.718L11.193 4.015C11.626 4.055 11.806 4.59 11.485 4.882L8.994 7.157C8.862 7.277 8.804 7.459 8.843 7.633L9.579 10.984C9.674 11.418 9.198 11.752 8.822 11.514L6.092 9.779C5.929 9.675 5.72 9.675 5.556 9.779L2.826 11.514Z" fill="#1DACD6" clip-path="url(#half-${i})"/><path d="M2.826 11.514C2.45 11.752 1.974 11.418 2.07 10.984L2.806 7.633C2.844 7.459 2.786 7.277 2.654 7.157L0.163 4.882C-0.158 4.59 0.022 4.055 0.455 4.015L3.7 3.718C3.887 3.701 4.049 3.581 4.119 3.407L5.36 0.314C5.528-0.105 6.12-0.105 6.288 0.314L7.53 3.407C7.6 3.581 7.761 3.701 7.948 3.718L11.193 4.015C11.626 4.055 11.806 4.59 11.485 4.882L8.994 7.157C8.862 7.277 8.804 7.459 8.843 7.633L9.579 10.984C9.674 11.418 9.198 11.752 8.822 11.514L6.092 9.779C5.929 9.675 5.72 9.675 5.556 9.779L2.826 11.514Z" fill="none" stroke="#1DACD6" stroke-width="0.5"/></svg>`:html+='<svg class="kr-star" width="16" height="16" viewBox="0 0 12 12" fill="none"><path d="M2.826 11.514C2.45 11.752 1.974 11.418 2.07 10.984L2.806 7.633C2.844 7.459 2.786 7.277 2.654 7.157L0.163 4.882C-0.158 4.59 0.022 4.055 0.455 4.015L3.7 3.718C3.887 3.701 4.049 3.581 4.119 3.407L5.36 0.314C5.528-0.105 6.12-0.105 6.288 0.314L7.53 3.407C7.6 3.581 7.761 3.701 7.948 3.718L11.193 4.015C11.626 4.055 11.806 4.59 11.485 4.882L8.994 7.157C8.862 7.277 8.804 7.459 8.843 7.633L9.579 10.984C9.674 11.418 9.198 11.752 8.822 11.514L6.092 9.779C5.929 9.675 5.72 9.675 5.556 9.779L2.826 11.514Z" stroke="#1DACD6" stroke-width="1" fill="none"/></svg>';return html}function formatReviewDate(dateString){return new Date(dateString).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}async function loadProductRating(overrideProductId){const companyId="SEVKDs";try{const productId=overrideProductId||window.klaviyoProductId||window.configuratorData?.childProductId;if(!productId){console.warn("No product ID available for reviews");return}let allReviews=[],summary=null,offset=0,hasMore=!0;for(;hasMore;){const url=`https://fast.a.klaviyo.com/reviews/api/client_reviews/${productId}/?product_id=${productId}&company_id=${companyId}&limit=200&offset=${offset}&sort=3&filter=&type=reviews&media=false&kl_review_uuid=&preferred_country=US`,response=await fetch(url,{method:"GET",headers:{Accept:"application/json"}});if(!response.ok)throw new Error(`HTTP error! status: ${response.status}`);const data=await response.json();summary||(summary=data.summary||null),allReviews=allReviews.concat(data.reviews||[]),hasMore=data.has_more===!0,offset+=200}window.product=window.product||{},window.product.starReview={summary,reviews:allReviews,starRating:summary?.star_rating||0,reviewCount:summary?.review_count||0,ratingHistogram:summary?.rating_histogram||[0,0,0,0,0],reviewImages:summary?.review_images||[]},document.dispatchEvent(new CustomEvent("klaviyo:reviews-loaded")),updateContinueBarReviews()}catch(error){console.error("Error fetching Klaviyo reviews:",error)}}function updateContinueBarReviews(){var data=window.product&&window.product.starReview;if(!(!data||!data.reviewCount)){var el=document.getElementById("continue-bar-reviews");el&&(el.innerHTML='<span class="continue-bar__reviews-stars">'+generateStarsSVG(data.starRating)+`</span><a class="continue-bar__reviews-count" onclick="var s=document.getElementById('klaviyo-product-reviews');
1if(s&&s.classList.contains('kpr--visible'))s.scrollIntoView({behavior:'smooth'})">`+data.reviewCount+(data.reviewCount===1?" Review":" Reviews")+"</a>",el.style.display="flex")}} 2//# sourceMappingURL=/cdn/shop/t/130/assets/FetchKlaviyoReview.js.map?v=114453090226179426451790277981
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.