PageSourceSearch

https://www.thestacksystem.com/cdn/shop/t/60/assets/homepage-reviews.js?v=30752778072249161101783375119

js thestacksystem.com collected 2026-10-01 14:34:43 UTC 3,792 bytes, 2 lines download raw bytes

1(function(){const LOAD_MORE_PATTERN=/load more|show more|view more/i,REVIEW_LIST_SELECTORS=['[class*="alr-wh"][class*="review-list"]','[class*="alr-wh"][class*="reviews-list"]','[class*="alr-wh"][class*="review-box-list"]'],REVIEW_ITEM_SELECTORS=['[class*="alr-wh"][class*="review-item"]','[class*="alr-wh"][class*="review-card"]'],EXCLUDED_ANCESTOR_PATTERN=/summary|distribution|media|filter|search|header|toolbar|sort|question|qa/i;function collectRoots(node,roots=[]){return node&&(roots.push(node),node.querySelectorAll("*").forEach(el=>{el.shadowRoot&&collectRoots(el.shadowRoot,roots)})),roots}function queryAllDeep(container,selectors){const matches=[],seen=new Set;return collectRoots(container).forEach(root=>{selectors.forEach(selector=>{root.querySelectorAll(selector).forEach(el=>{seen.has(el)||(seen.add(el),matches.push(el))})})}),matches}function isExcludedList(list){const classNames=`${list.className} ${list.parentElement?.className||""}`;return!!(EXCLUDED_ANCESTOR_PATTERN.test(classNames)||list.closest('[class*="summary"], [class*="distribution"], [class*="media-section"], [class*="search"]')||list.children.length<=5&&list.closest('[class*="summary"]'))}function getTopLevelReviewItems(items){return items.filter(item=>!items.some(other=>other!==item&&other.contains(item)))}function getReviewItems(widgetRoot){const box=widgetRoot.querySelector(".alireviews-review-box")||widgetRoot,lists=queryAllDeep(box,REVIEW_LIST_SELECTORS).filter(list=>!isExcludedList(list));let bestList=null,bestCount=0;return lists.forEach(list=>{const childCount=list.children.length;childCount>bestCount&&(bestCount=childCount,bestList=list)}),bestList&&bestCount>0?[...bestList.children].filter(child=>child.nodeType===1):getTopLevelReviewItems(queryAllDeep(box,REVIEW_ITEM_SELECTORS))}function clearLimited(section){section.querySelectorAll(".homepage-reviews__item--limited").forEach(item=>{item.classList.remove("homepage-reviews__item--limited")})}function applyReviewLimit(section){if(section.classList.contains("homepage-reviews--expanded"))return;const maxVisible=parseInt(section.dataset.initialReviews,10)||10,widgetRoot=section.querySelector(".homepage-reviews__widget")||section,items=getReviewItems(widgetRoot);clearLimited(section),!(items.length<=maxVisible)&&items.forEach((item,index)=>{item.classList.toggle("homepage-reviews__item--limited",index>=maxVisible)})}function bindLoadMore(section){section.dataset.loadMoreBound!=="true"&&(section.dataset.loadMoreBound="true",section.addEventListener("click",event=>{const trigger=event.target.closest('button, a, [role="button"]');!trigger||!LOAD_MORE_PATTERN.test(trigger.textContent||"")||(section.classList.add("homepage-reviews--expanded"),clearLimited(section))}))}function initSection(section){bindLoadMore(section);const scheduleApply=()=>{window.clearTimeout(section._homepageReviewsApplyTimer),section._homepageReviewsApplyTimer=window.setTimeout(()=>{applyReviewLimit(section)},120)};if(scheduleApply(),section._homepageReviewsObserver)return;section._homepageReviewsObserver=new MutationObserver(scheduleApply);const widgetRoot=section.querySelector(".homepage-reviews__widget")||section;section._homepageReviewsObserver.observe(widgetRoot,{childList:!0,subtree:!0}),window.setTimeout(scheduleApply,800),window.setTimeout(scheduleApply,2e3)}function init(){document.querySelectorAll(".homepage-reviews[data-initial-reviews]").forEach(initSection)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init(),document.addEventListener("shopify:section:load",event=>{const section=event.target.querySelector(".homepage-reviews[data-initial-reviews]");section&&initSection(section)})})();
2//# sourceMappingURL=/cdn/shop/t/60/assets/homepage-reviews.js.map?v=30752778072249161101783375119

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.