1(function(){"use strict";function horizontalLoop(items,config){items=gsap.utils.toArray(items),config=config||{};let tl=gsap.timeline({repeat:config.repeat,paused:config.paused,defaults:{ease:"none"}}),length=items.length,startX=items[0].offsetLeft,times=[],widths=[],xPercents=[],curIndex=0,pixelsPerSecond=(config.speed||1)*100,snap=config.snap===!1?v=>v:gsap.utils.snap(config.snap||1),totalWidth,curX,distanceToStart,distanceToLoop,item,i;for(gsap.set(items,{xPercent:(i2,el)=>{let w=widths[i2]=parseFloat(gsap.getProperty(el,"width","px"));return xPercents[i2]=snap(parseFloat(gsap.getProperty(el,"x","px"))/w*100+gsap.getProperty(el,"xPercent")),xPercents[i2]}}),gsap.set(items,{x:0}),totalWidth=items[length-1].offsetLeft+xPercents[length-1]/100*widths[length-1]-startX+items[length-1].offsetWidth*gsap.getProperty(items[length-1],"scaleX")+(parseFloat(config.paddingRight)||0),i=0;i<length;i++)item=items[i],curX=xPercents[i]/100*widths[i],distanceToStart=item.offsetLeft+curX-startX,distanceToLoop=distanceToStart+widths[i]*gsap.getProperty(item,"scaleX"),tl.to(item,{xPercent:snap((curX-distanceToLoop)/widths[i]*100),duration:distanceToLoop/pixelsPerSecond},0).fromTo(item,{xPercent:snap((curX-distanceToLoop+totalWidth)/widths[i]*100)},{xPercent:xPercents[i],duration:(curX-distanceToLoop+totalWidth-curX)/pixelsPerSecond,immediateRender:!1},distanceToLoop/pixelsPerSecond).add("label"+i,distanceToStart/pixelsPerSecond),times[i]=distanceToStart/pixelsPerSecond;function toIndex(index,vars){vars=vars||{},Math.abs(index-curIndex)>length/2&&(index+=index>curIndex?-length:length);let newIndex=gsap.utils.wrap(0,length,index),time=times[newIndex];return time>tl.time()!=index>curIndex&&(vars.modifiers={time:gsap.utils.wrap(0,tl.duration())},time+=tl.duration()*(index>
1curIndex?1:-1)),curIndex=newIndex,vars.overwrite=!0,tl.tweenTo(time,vars)}return tl.next=vars=>toIndex(curIndex+1,vars),tl.previous=vars=>toIndex(curIndex-1,vars),tl.current=()=>curIndex,tl.toIndex=(index,vars)=>toIndex(index,vars),tl.times=times,tl}function initAnnouncementBars(){if(typeof gsap>"u"){console.warn("GSAP is not loaded. Announcement bar animation will not work.");return}const announcementBars=document.querySelectorAll(".announcement-bar-moving .stb_line_single");announcementBars.length!==0&&announcementBars.forEach((line,index)=>{const items=line.querySelectorAll(".stb-item");if(items.length===0){console.warn("No items found in announcement bar:",line);return}const tl=horizontalLoop(items,{repeat:-1,speed:1,paddingRight:parseFloat(gsap.getProperty(items[0],"marginRight","px"))||0});items.forEach(item=>{item.addEventListener("mouseenter",()=>tl.pause()),item.addEventListener("mouseleave",()=>tl.resume())})})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initAnnouncementBars):initAnnouncementBars(),document.addEventListener("shopify:section:load",function(event){event.target.querySelector(".announcement-bar-moving")&&setTimeout(initAnnouncementBars,100)})})(); 2//# sourceMappingURL=/cdn/shop/t/123/assets/announcement-bar-moving.js.map?v=319984012470460961770643655
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.