1function initializeGSAPScripts(){gsap.registerPlugin(ScrollTrigger,SplitText,ScrollSmoother,Flip,ScrollToPlugin,Draggable,InertiaPlugin),ScrollTrigger.config({ignoreMobileResize:!0});const e={start:"top bottom",endTrigger:"html",end:"bottom top"};let t,r=[];function o(){gsap.utils.toArray("[data-image-parallax]").forEach(e=>{const t=e.querySelectorAll(":scope > img, :scope > picture, :scope > [data-image-parallax-element]");t&&t.forEach(t=>{const o=e.offsetHeight,a=t.offsetHeight-o,n="reverse"===e.getAttribute("data-image-parallax")?a/2:-a/2,i=gsap.fromTo(t,{y:n},{scrollTrigger:{trigger:t,scrub:1,start:()=>"top bottom",end:()=>"bottom top",invalidateOnRefresh:!0},y:0,ease:"none"});r.push(i.scrollTrigger)})})}function a(){r.forEach(e=>{e.kill()}),r=[]}function n(e,t){const r=e.getBoundingClientRect();r.width&&r.height&&t.forEach(e=>{const t=e.querySelector(".split-text__inner");let o=null;if(t&&"text"===getComputedStyle(t).webkitBackgroundClip?o=t:"text"===getComputedStyle(e).webkitBackgroundClip&&(o=e),!o)return;const a=e.getBoundingClientRect();o.style.backgroundSize=`${r.width}px ${r.height}px`,o.style.backgroundPosition=`${-(a.left-r.left)}px ${-(a.top-r.top)}px`})}window.onWidthResize(()=>{clearTimeout(t),t=setTimeout(()=>{a(),o()},200)}),a(),o(),document.querySelectorAll("[data-inview],.data-inview").length&&ScrollTrigger.batch("[data-inview],.data-inview",{...e,onEnter:e=>{e.forEach(e=>{e.classList.add("is-inview")})},onLeaveBack:e=>{}}),window.initInview=(t,{noScrollTrigger:r=!1}=!1)=>{const o="string"==typeof t?document.querySelectorAll(normalizeScopedSelector(t)):t;r?t.classList.add("is-inview"):ScrollTrigger.batch(o,{...e,start:"top 90%",onEnter:e=>{e.forEach(e=>{e.classList.add("is-inview")})},onLeaveBack:e=>{}})},window.initStaggerInview=(t,{noScrollTrigger:r}=!1)=>{const o="string"==typeof t?document.querySelectorAll(normalizeScopedSelector(t)):t;o&&(r?[o].forEach(e=>{const t=e.dataset.staggerInview??"> *",r=e.querySelectorAll(normalizeScopedSelector(t));window.innerWidth;r.length&&gsap.to(r,{stagger:{each:.1,onComplete(){this.targets()[0].classList.add("is-inview")}},immediateRender:!0,overwrite:!0})}):ScrollTrigger.batch(o,{...e,onEnter:e=>{e.forEach(e=>{const t=e.dataset.staggerInview??"> *",r=e.querySelectorAll(normalizeScopedSelector(t));window.innerWidth;r.length&&gsap.to(r,{stagger:{each:.1,onComplete(){this.targets()[0].classList.add("is-inview")}},immediateRender:!0,overwrite:!0})})},onLeaveBack:e=>{}}))},window.initStaggerInview("[data-stagger-inview]"),window.initStaggerInview(document.querySelectorAll(".stagger-immediate-children")),window.onWidthResize(()=>{window.initStaggerInview("[data-stagger-inview]"),window.initStaggerInview(document.querySelectorAll(".stagger-immediate-children"))});const i=[];document.querySelectorAll("[data-split-text]").forEach((t,r)=>{t.classList.add("split-text--rendered");const o="chars"===t.getAttribute("data-split-type")?"chars":"words",a=null!==t.querySelector("span.shortcode-trademark.shortcode-trademark--large");t.querySelectorAll("span.shortcode-trademark").forEach(e=>{e.replaceWith(document.createTextNode(e.textContent))});const s=new SplitText(t,{type:o,wordsClass:"split-text",charsClass:"split-text"}),l=gsap.utils.toArray("chars"===o?s.chars:s.words),c=[];l.forEach(e=>{if("®"===e.textContent){const t=a?'<span class="shortcode-trademark shortcode-trademark--large">®</span>':'<span class="shortcode-trademark">®</span>';return void(c.length?(c[c.length-1].innerHTML+=t,e.remove()):(e.innerHTML=t,c.push(e)))}c.push(e)}),c.forEach(e=>{const t=document.createElement("span");t.className="split-text__inner",t.innerHTML=e.innerHTML,e.innerHTML="",e.appendChild(t)}),n(t,c),i.push(()=>n(t,c)),document.fonts&&document.fonts.ready&&document.fonts.ready.then(()=>n(t,c));const g=t.getAttribute("data-split-text");"colorAnimation"===g?ScrollTrigger.batch(c,{start:"top 70%",end:"bottom 70%",onEnter:e=>{e.forEach(e=>e.classList.add("is-inview"))},onLeaveBack:e=>{}}):"fadeUp"===g&&ScrollTrigger.create({trigger:t,...e,onEnter:()=>{gsap.to(c,{duration:.15,stagger:{delay:0,each:.05,onComplete(){this.targets()[0].classList.add("is-inview")}},immediateRender:!0})},onLeaveBack:()=>{}})}),window.onWidthResize(()=>
1{i.forEach(e=>e())}),document.querySelectorAll("[data-accent-graphic-parallax]").forEach((e,t)=>{const r=e.closest(".shopify-section"),o=document.querySelector("header.header");o&&o.offsetHeight;let a;ScrollTrigger.create({trigger:r,start:()=>"top 50%",end:()=>"bottom 25%",scrub:!0,onUpdate:t=>{a&&cancelAnimationFrame(a),a=requestAnimationFrame(()=>{const r=t.progress,o=e.getAttribute("data-accent-graphic-parallax")??-100;gsap.set(e,{yPercent:o*r})})}})});const s=document.querySelectorAll("[data-mfr-parallax]");s.length&&(gsap.utils.toArray(s).forEach(e=>{if(e.classList.contains("has-gsap-function"))return;const t=e.getAttribute("data-mfr-parallax"),r=""===t?50:parseFloat(t);gsap.to(e,{yPercent:-1*r,ease:"none",scrollTrigger:{trigger:e,start:()=>"top 75%",end:()=>"bottom top",scrub:.5}}),e.classList.add("has-gsap-function")}),ScrollTrigger.addEventListener("refreshInit",()=>{gsap.set("[data-mfr-parallax]",{yPercent:0})}));const l=document.querySelectorAll("[data-animated-number]");l.length>0&&(l.forEach(e=>{e.style.display="inline-block",e.style.width=e.offsetWidth+"px",e.dataset.target=e.textContent,e.textContent="0"}),ScrollTrigger.batch("[data-animated-number]",{...e,onEnter:e=>{e.forEach(e=>{gsap.to(e,{duration:1,innerHTML:e.dataset.target,roundProps:"innerHTML",ease:"power1.out",onUpdate:function(){e.textContent=parseInt(e.innerHTML)},onUpdateParams:["{self}"]})})},onLeaveBack:e=>{e.forEach(e=>{e.style.display="inline-block",e.style.width=e.offsetWidth+"px",e.textContent="0"})}})),ScrollTrigger.refresh()}function stickyElementFunction(){window.innerWidth<=1023||document.querySelectorAll("[data-mfr-sticky-container]").forEach((e,t)=>{let r=e.querySelector("[data-mfr-sticky]");const o=e.getAttribute("data-mfr-sticky-container");o&&""!==o.trim()&&(r=e.querySelector(o));const a=document.querySelector("header.header"),n=a?a.offsetHeight:0;let i;if(r){i=ScrollTrigger.create({trigger:r,start:()=>`top top+=${Number.isFinite(r.getAttribute("data-mfr-sticky"))?r.getAttribute("data-mfr-sticky"):n}px`,end:()=>`+=${e.offsetHeight-r.offsetHeight}px`,pin:!0,pinSpacing:!0});new ResizeObserver(()=>{i&&i.refresh()}).observe(e)}})}function autoPlayVideoFunction(){const e=document.querySelectorAll('video[data-autoplay="true"]');e.length&&ScrollTrigger.batch(e,{start:"top bottom",end:"bottom top",onEnter:e=>{e.forEach(e=>{e.paused&&e.play()})},onEnterBack:e=>{e.forEach(e=>{e.paused&&e.play()})},onLeave:e=>{e.forEach(e=>{e.paused||e.pause()})},onLeaveBack:e=>{e.forEach(e=>{e.paused||e.pause()})}})}function stickyMainOnFooterAppearance(){if(!gsap||!ScrollTrigger)return;let e;ScrollTrigger.create({trigger:"footer",start:"top bottom",end:"bottom top",onToggle:({isActive:t})=>{t?e=ScrollTrigger.create({trigger:"main",start:"bottom bottom",endTrigger:"footer",end:"bottom top",pin:!0,pinSpacing:!1}):e.kill({revert:!0,allowAnimation:!1})}})}function initRevealingSection(){document.querySelectorAll("[data-revealing-section]").forEach(e=>{const t=e.closest(".shopify-section");new ResizeObserver(()=>{t.style.height=`${Math.min(1.5*e.clientHeight,1800)}px`,gsap&&ScrollTrigger&&ScrollTrigger.refresh()}).observe(e),t.style.zIndex=0,ScrollTrigger.create({trigger:e.closest(".shopify-section"),enter:"top bottom",bottom:"bottom top",onToggle:t=>{e.classList.toggle("show",t.isActive)}})})}function shopifyEventsRefresh(){document.addEventListener("shopify:section:load",e=>{const t=e.detail.sectionId;console.log("Section loaded:",t),e.target.querySelector("[x-data]")&&Alpine.initTree(e.target),e.target.querySelectorAll("[data-inview]").length&&e.target.querySelectorAll("[data-inview]").forEach(e=>{window.initInview(e)}),e.target.querySelectorAll("[data-stagger-inview]").length&&e.target.querySelectorAll("[data-stagger-inview]").forEach(e=>{window.initStaggerInview(e)})})}onReady(initializeGSAPScripts),onReady(stickyElementFunction),onReady(autoPlayVideoFunction),onReady(initRevealingSection),onReady(shopifyEventsRefresh); 2//# sourceMappingURL=mfr-gsap-scripts.min.js.map
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.