1document.documentElement.classList.add("product-tabs-loading");const tabsLoadingStartedAt=Date.now(),MIN_TABS_LOADING_MS=0,initProductInfoTabs=()=>{const tabs=document.querySelectorAll(".product-info-tabs [data-tab-trigger]"),buyTriggers=document.querySelectorAll("[data-buy-trigger]");if(!tabs.length&&!buyTriggers.length){document.documentElement.classList.remove("product-tabs-loading");return}const tabContainers=document.querySelectorAll(".product-info-tabs");tabContainers.forEach(container=>{container.classList.add("is-loading"),container.classList.remove("is-ready")});const escapeAttr=value=>typeof CSS<"u"&&CSS.escape?CSS.escape(value):String(value).replace(/\\/g,"\\\\").replace(/"/g,'\\"'),findSection=id=>document.querySelector(`[data-id="${escapeAttr(id)}"]:not(button[data-tab-trigger]):not([data-buy-trigger])`),MAX_HEADING_DEPTH=3,getSectionHeading=section=>{const heading=Array.from(section.querySelectorAll("h1, h2, h3, h4, h5, h6")).find(el=>{if(el.textContent.trim()==="")return!1;let depth=0,parent=el.parentElement;for(;parent&&parent!==section&&depth<MAX_HEADING_DEPTH;)depth+=1,parent=parent.parentElement;return parent===section});return heading?heading.textContent.replace(/\s+/g," ").trim():""},applyAutoLabel=(tab,section)=>{if(!("autoLabel"in tab.dataset))return;const heading=getSectionHeading(section);if(!heading)return;const label=tab.querySelector(".nav-item-label")||tab;label.textContent=heading},scrollToTarget=id=>{const target=findSection(id);if(!target)return;const tabsBar=document.querySelector(".product-info-tabs"),offset=tabsBar?tabsBar.offsetHeight:0,top=target.getBoundingClientRect().top+window.scrollY-offset;window.scrollTo({top,behavior:"smooth"})},sections=[];tabs.forEach(tab=>{const id=tab.dataset.id;if(!id)return;const section=findSection(id);if(section)applyAutoLabel(tab,section),sections.push(section),tab.addEventListener("click",()=>scrollToTarget(id));else{const parentLi=tab.closest("li");parentLi?parentLi.remove():tab.remove()}}),buyTriggers.forEach(el=>{const id=el.dataset.id;id&&(el.addEventListener("click",()=>scrollToTarget(id)),el.setAttribute("role","button"),el.setAttribute("tabindex","0"),el.addEventListener("keydown",e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),scrollToTarget(id))}))});const finalizeTabsLoading=()=>{const elapsed=Date.now()-tabsLoadingStartedAt,wait=Math.max(0,MIN_TABS_LOADING_MS-elapsed);window.setTimeout(()=>{requestAnimationFrame(()=>{tabContainers.forEach(container=>{container.classList.remove("is-loading"),container.classList.add("is-ready")}),document.documentElement.classList.remove("product-tabs-loading")})},wait)};if(!sections.length){finalizeTabsLoading();return}const setActive=id=>{tabs.forEach(tab=>{tab.classList.toggle("is-active",tab.dataset.id===id)})},ratios=new Map,observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{ratios.set(entry.target,entry.intersectionRatio)});let mostVisible=null,highestRatio=0;ratios.forEach((ratio,section)=>{ratio>highestRatio&&(highestRatio=ratio,mostVisible=section)}),mostVisible&&highestRatio>0&&setActive(mostVisible.dataset.id)},{threshold:[0,.25,.5,.75,1],rootMargin:"-20% 0px -20% 0px"});sections.forEach(section=>observer.observe(section));const setupStickyRange=container=>{const host=container.closest(".shopify-section")||container;if("stickyRange"in host.dataset)return;const targets=[];if(container.querySelectorAll("[data-tab-trigger]").forEach(tab=>{const section=tab.dataset.id?findSection(tab.dataset.id):null;section&&!targets.includes(section)&&targets.push(section)}),!targets.length)return;host.dataset.stickyRange="";let isSticky=!1,stickyTop=0,hostHeight=0,shift=0,frame=null;const measure=()=>{const styles=window.getComputedStyle(host);isSticky=styles.position==="sticky",stickyTop=parseFloat(styles.top)||0,hostHeight=host.offsetHeight},setShift=value=>{value!==shift&&(shift=value,host.style.transform=value>0?`translate3d(0, ${-value}px, 0)`:""),host.classList.toggle("product-info-tabs--unpinned",hostHeight>0&&value>=hostHeight)},update=()=>{if(frame=null,!isSticky||!hostHeight){setShift(0);return}let end=null;
1if(targets.forEach(section=>{if(!section.getClientRects().length)return;const bottom=section.getBoundingClientRect().bottom;(end===null||bottom>end)&&(end=bottom)}),end===null){setShift(0);return}const overrun=Math.round(stickyTop+hostHeight-end);setShift(Math.min(Math.max(overrun,0),hostHeight))},requestUpdate=()=>{frame===null&&(frame=requestAnimationFrame(update))},remeasure=()=>{measure(),requestUpdate()};if(measure(),update(),window.addEventListener("scroll",requestUpdate,{passive:!0}),window.addEventListener("resize",remeasure),window.addEventListener("load",remeasure),typeof ResizeObserver<"u"){const resizeObserver=new ResizeObserver(remeasure);resizeObserver.observe(host),resizeObserver.observe(document.documentElement)}};document.querySelectorAll(".product-info-tabs").forEach(setupStickyRange),document.querySelectorAll(".product-info-tabs").forEach(container=>{const prevBtn=container.querySelector(".product-info-tabs__prev"),nextBtn=container.querySelector(".product-info-tabs__next"),navScroll=container.querySelector(".product-info-tabs__nav-scroll"),navItems=container.querySelectorAll(".product-info-tabs__nav > li");if(!prevBtn&&!nextBtn||!navScroll||!navItems.length)return;const updateNavBtns=()=>{const scrollRect=navScroll.getBoundingClientRect();let hasHiddenLeft=!1,hasHiddenRight=!1;navItems.forEach(item=>{const itemRect=item.getBoundingClientRect();itemRect.left<scrollRect.left-1&&(hasHiddenLeft=!0),itemRect.right>scrollRect.right+1&&(hasHiddenRight=!0)}),prevBtn&&(prevBtn.style.display=hasHiddenLeft?"flex":""),nextBtn&&(nextBtn.style.display=hasHiddenRight?"flex":"")};updateNavBtns(),prevBtn&&prevBtn.addEventListener("click",()=>{navScroll.scrollBy({left:-navScroll.clientWidth,behavior:"smooth"})}),nextBtn&&nextBtn.addEventListener("click",()=>{navScroll.scrollBy({left:navScroll.clientWidth,behavior:"smooth"})}),window.addEventListener("resize",updateNavBtns),navScroll.addEventListener("scroll",updateNavBtns,{passive:!0}),typeof ResizeObserver<"u"&&new ResizeObserver(updateNavBtns).observe(navScroll)}),finalizeTabsLoading()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initProductInfoTabs):initProductInfoTabs(); 2//# sourceMappingURL=/cdn/shop/t/28/assets/product-info-tabs.js.map?v=55067817694992292851786967237
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.