1function marqueeAnimation(){gsap.registerPlugin(Draggable);gsap.registerPlugin(ScrollTrigger);let loops=gsap.utils.toArray('.items-module-marquee').map((line,i)=>{const links=line.querySelectorAll(".item-module-marquee"),tl=horizontalLoop(links,{repeat:-1,speed:1+i*0.5,draggable:!0,reversed:!1,paddingRight:parseFloat(gsap.getProperty(links[0],"marginRight","px"))});links.forEach(link=>{link.addEventListener("mouseenter",()=>gsap.to(tl,{timeScale:i?1:1,overwrite:!0}));link.addEventListener("mouseleave",()=>gsap.to(tl,{timeScale:i?1:1,overwrite:!0}))})})} 2function horizontalLoop(items,config){items=gsap.utils.toArray(items);config=config||{};let tl=gsap.timeline({repeat:config.repeat,paused:!0,defaults:{ease:"none"},onReverseComplete:()=>tl.totalTime(tl.rawTime()+tl.duration()*100)}),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),populateWidths=()=>items.forEach((el,i)=>{widths[i]=parseFloat(gsap.getProperty(el,"width","px"));xPercents[i]=snap(parseFloat(gsap.getProperty(el,"x","px"))/widths[i]*100+gsap.getProperty(el,"xPercent"))}),getTotalWidth=()=>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),totalWidth,curX,distanceToStart,distanceToLoop,item,i;populateWidths();gsap.set(items,{xPercent:i=>xPercents[i]});gsap.set(items,{x:0});totalWidth=getTotalWidth();for(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} 3function 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];if(time>tl.time()!==index>curIndex){vars.modifiers={time:gsap.utils.wrap(0,tl.duration())};time+=tl.duration()*(index>curIndex?1:-1)} 4curIndex=newIndex;vars.overwrite=!0;return tl.tweenTo(time,vars)} 5tl.next=vars=>toIndex(curIndex+1,vars);tl.previous=vars=>toIndex(curIndex-1,vars);tl.current=()=>curIndex;tl.toIndex=(index,vars)=>toIndex(index,vars);tl.updateIndex=()=>curIndex=Math.round(tl.progress()*(items.length-1));tl.times=times;if(config.draggable&&typeof(Draggable)==="function"){let proxy=document.createElement("div"),wrap=gsap.utils.wrap(0,1),ratio,startProgress,draggable,dragSnap,roundFactor,align=()=>tl.progress(wrap(startProgress+(draggable.startX-draggable.x)*ratio)),syncIndex=()=>tl.updateIndex();typeof(InertiaPlugin)==="undefined"&&console.warn("InertiaPlugin required for momentum-based scrolling and snapping. https://greensock.com/club");draggable=Draggable.create(proxy,{trigger:items[0].parentNode,type:"x",onPress(){startProgress=tl.progress();tl.progress(0);populateWidths();totalWidth=getTotalWidth();ratio=1/totalWidth;dragSnap=totalWidth/items.length;roundFactor=Math.pow(10,((dragSnap+"").split(".")[1]||"").length);tl.progress(startProgress)},onDrag:align,onThrowUpdate:align,inertia:!0,snap:value=>{let n=Math.round(parseFloat(value)/dragSnap)*dragSnap*roundFactor;return(n-n%1)/roundFactor},onRelease:syncIndex,onThrowComplete:()=>gsap.set(proxy,{x:0})&&syncIndex()})[0]} 6return tl} 7marqueeAnimation()
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.