z-flux-react 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import r,{useRef as n,useState as i,useEffect as s,useLayoutEffect as a,Fragment as o}from"react";import{countNumbers as l,overlay_text_animations as u,getLayerWidth as c,randomizeArray as h,findScrollingElement as f,build_extend_animation as d,
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import r,{useRef as n,useState as i,useEffect as s,useLayoutEffect as a,Fragment as o}from"react";import{countNumbers as l,overlay_text_animations as u,getLayerWidth as c,randomizeArray as h,findScrollingElement as f,build_extend_animation as d,animation_list as p,getProgressionData as g}from"z-flux-utils";function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}
|
|
2
2
|
/*!
|
|
3
3
|
* GSAP 3.15.0
|
|
4
4
|
* https://gsap.com
|
|
@@ -33,7 +33,7 @@ var gi,mi,_i,vi,yi,xi,bi,wi,Ti,Oi,Ci,ki,Ei,Si=function(){return gi||"undefined"!
|
|
|
33
33
|
* Subject to the terms at https://gsap.com/standard-license
|
|
34
34
|
* @author: Jack Doyle, jack@greensock.com
|
|
35
35
|
*/
|
|
36
|
-
var Ji,ts,es,rs,ns,is,ss,as,os,ls,us,cs,hs,fs,ds,ps,gs,ms,_s,vs,ys,xs,bs,ws,Ts,Os,Cs,ks,Es,Ss,Ms,As,Ps,Rs,Ds,zs,Fs,Ns,Is=1,Bs=Date.now,Ls=Bs(),js=0,Ys=0,Ws=function(t,e,r){var n=ra(t)&&("clamp("===t.substr(0,6)||t.indexOf("max")>-1);return r["_"+e+"Clamp"]=n,n?t.substr(6,t.length-7):t},Xs=function(t,e){return!e||ra(t)&&"clamp("===t.substr(0,6)?t:"clamp("+t+")"},qs=function t(){return Ys&&requestAnimationFrame(t)},Hs=function(){return fs=1},Us=function(){return fs=0},Vs=function(t){return t},Gs=function(t){return Math.round(1e5*t)/1e5||0},$s=function(){return"undefined"!=typeof window},Zs=function(){return Ji||$s()&&(Ji=window.gsap)&&Ji.registerPlugin&&Ji},Qs=function(t){return!!~ss.indexOf(t)},Ks=function(t){return("Height"===t?Ms:es["inner"+t])||ns["client"+t]||is["client"+t]},Js=function(t){return Fi(t,"getBoundingClientRect")||(Qs(t)?function(){return po.width=es.innerWidth,po.height=Ms,po}:function(){return Ca(t)})},ta=function(t,e){var r=e.s,n=e.d2,i=e.d,s=e.a;return Math.max(0,(r="scroll"+n)&&(s=Fi(t,r))?s()-Js(t)()[i]:Qs(t)?(ns[r]||is[r])-Ks(n):t[r]-t["offset"+n])},ea=function(t,e){for(var r=0;r<_s.length;r+=3)(!e||~e.indexOf(_s[r+1]))&&t(_s[r],_s[r+1],_s[r+2])},ra=function(t){return"string"==typeof t},na=function(t){return"function"==typeof t},ia=function(t){return"number"==typeof t},sa=function(t){return"object"==typeof t},aa=function(t,e,r){return t&&t.progress(e?0:1)&&r&&t.pause()},oa=function(t,e,r){if(t.enabled){var n=t._ctx?t._ctx.add(function(){return e(t,r)}):e(t,r);n&&n.totalTime&&(t.callbackAnimation=n)}},la=Math.abs,ua="left",ca="right",ha="bottom",fa="width",da="height",pa="Right",ga="Left",ma="Top",_a="Bottom",va="padding",ya="margin",xa="Width",ba="Height",wa="px",Ta=function(t){return es.getComputedStyle(t.nodeType===Node.DOCUMENT_NODE?t.scrollingElement:t)},Oa=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},Ca=function(t,e){var r=e&&"matrix(1, 0, 0, 1, 0, 0)"!==Ta(t)[ds]&&Ji.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),n=t.getBoundingClientRect?t.getBoundingClientRect():t.scrollingElement.getBoundingClientRect();return r&&r.progress(0).kill(),n},ka=function(t,e){var r=e.d2;return t["offset"+r]||t["client"+r]||0},Ea=function(t){var e,r=[],n=t.labels,i=t.duration();for(e in n)r.push(n[e]/i);return r},Sa=function(t){var e=Ji.utils.snap(t),r=Array.isArray(t)&&t.slice(0).sort(function(t,e){return t-e});return r?function(t,n,i){var s;if(void 0===i&&(i=.001),!n)return e(t);if(n>0){for(t-=i,s=0;s<r.length;s++)if(r[s]>=t)return r[s];return r[s-1]}for(s=r.length,t+=i;s--;)if(r[s]<=t)return r[s];return r[0]}:function(r,n,i){void 0===i&&(i=.001);var s=e(r);return!n||Math.abs(s-r)<i||s-r<0==n<0?s:e(n<0?r-t:r+t)}},Ma=function(t,e,r,n){return r.split(",").forEach(function(r){return t(e,r,n)})},Aa=function(t,e,r,n,i){return t.addEventListener(e,r,{passive:!n,capture:!!i})},Pa=function(t,e,r,n){return t.removeEventListener(e,r,!!n)},Ra=function(t,e,r){(r=r&&r.wheelHandler)&&(t(e,"wheel",r),t(e,"touchmove",r))},Da={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},za={toggleActions:"play",anticipatePin:0},Fa={top:0,left:0,center:.5,bottom:1,right:1},Na=function(t,e){if(ra(t)){var r=t.indexOf("="),n=~r?+(t.charAt(r-1)+1)*parseFloat(t.substr(r+1)):0;~r&&(t.indexOf("%")>r&&(n*=e/100),t=t.substr(0,r-1)),t=n+(t in Fa?Fa[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},Ia=function(t,e,r,n,i,s,a,o){var l=i.startColor,u=i.endColor,c=i.fontSize,h=i.indent,f=i.fontWeight,d=rs.createElement("div"),p=Qs(r)||"fixed"===Fi(r,"pinType"),g=-1!==t.indexOf("scroller"),m=p?is:"IFRAME"===r.tagName?r.contentDocument.body:r,_=-1!==t.indexOf("start"),v=_?l:u,y="border-color:"+v+";font-size:"+c+";color:"+v+";font-weight:"+f+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return y+="position:"+((g||o)&&p?"fixed;":"absolute;"),(g||o||!p)&&(y+=(n===qi?ca:ha)+":"+(s+parseFloat(h))+"px;"),a&&(y+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),d._isStart=_,d.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),d.style.cssText=y,d.innerText=e||0===e?t+"-"+e:t,m.children[0]?m.insertBefore(d,m.children[0]):m.appendChild(d),d._offset=d["offset"+n.op.d2],Ba(d,0,n,_),d},Ba=function(t,e,r,n){var i={display:"block"},s=r[n?"os2":"p2"],a=r[n?"p2":"os2"];t._isFlipped=n,i[r.a+"Percent"]=n?-100:0,i[r.a]=n?"1px":0,i["border"+s+xa]=1,i["border"+a+xa]=0,i[r.p]=e+"px",Ji.set(t,i)},La=[],ja={},Ya=function(){return Bs()-js>34&&(Ds||(Ds=requestAnimationFrame(ao)))},Wa=function(){(!bs||!bs.isPressed||bs.startX>is.clientWidth)&&(Pi.cache++,bs?Ds||(Ds=requestAnimationFrame(ao)):ao(),js||Ga("scrollStart"),js=Bs())},Xa=function(){Os=es.innerWidth,Ts=es.innerHeight},qa=function(t){Pi.cache++,(!0===t||!hs&&!xs&&!rs.fullscreenElement&&!rs.webkitFullscreenElement&&(!ws||Os!==es.innerWidth||Math.abs(es.innerHeight-Ts)>.25*es.innerHeight))&&as.restart(!0)},Ha={},Ua=[],Va=function t(){return Pa(bo,"scrollEnd",t)||no(!0)},Ga=function(t){return Ha[t]&&Ha[t].map(function(t){return t()})||Ua},$a=[],Za=function(t){for(var e=0;e<$a.length;e+=5)(!t||$a[e+4]&&$a[e+4].query===t)&&($a[e].style.cssText=$a[e+1],$a[e].getBBox&&$a[e].setAttribute("transform",$a[e+2]||""),$a[e+3].uncache=1)},Qa=function(){return Pi.forEach(function(t){return na(t)&&++t.cacheID&&(t.rec=t())})},Ka=function(t,e){var r;for(ps=0;ps<La.length;ps++)!(r=La[ps])||e&&r._ctx!==e||(t?r.kill(1):r.revert(!0,!0));As=!0,e&&Za(e),e||Ga("revert")},Ja=function(t,e){Pi.cache++,(e||!zs)&&Pi.forEach(function(t){return na(t)&&t.cacheID++&&(t.rec=0)}),ra(t)&&(es.history.scrollRestoration=Es=t)},to=0,eo=function(){is.appendChild(Ss),Ms=!bs&&Ss.offsetHeight||es.innerHeight,is.removeChild(Ss)},ro=function(t){return os(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},no=function(t,e){if(ns=rs.documentElement,is=rs.body,ss=[es,rs,ns,is],!js||t||As){eo(),zs=bo.isRefreshing=!0,As||Qa();var r=Ga("refreshInit");vs&&bo.sort(),e||Ka(),Pi.forEach(function(t){na(t)&&(t.smooth&&(t.target.style.scrollBehavior="auto"),t(0))}),La.slice(0).forEach(function(t){return t.refresh()}),As=!1,La.forEach(function(t){if(t._subPinOffset&&t.pin){var e=t.vars.horizontal?"offsetWidth":"offsetHeight",r=t.pin[e];t.revert(!0,1),t.adjustPinSpacing(t.pin[e]-r),t.refresh()}}),Ps=1,ro(!0),La.forEach(function(t){var e=ta(t.scroller,t._dir),r="max"===t.vars.end||t._endClamp&&t.end>e,n=t._startClamp&&t.start>=e;(r||n)&&t.setPositions(n?e-1:t.start,r?Math.max(n?e:t.start+1,e):t.end,!0)}),ro(!1),Ps=0,r.forEach(function(t){return t&&t.render&&t.render(-1)}),Pi.forEach(function(t){na(t)&&(t.smooth&&requestAnimationFrame(function(){return t.target.style.scrollBehavior="smooth"}),t.rec&&t(t.rec))}),Ja(Es,1),as.pause(),to++,zs=2,ao(2),La.forEach(function(t){return na(t.vars.onRefresh)&&t.vars.onRefresh(t)}),zs=bo.isRefreshing=!1,Ga("refresh")}else Aa(bo,"scrollEnd",Va)},io=0,so=1,ao=function(t){if(2===t||!zs&&!As){bo.isUpdating=!0,Ns&&Ns.update(0);var e=La.length,r=Bs(),n=r-Ls>=50,i=e&&La[0].scroll();if(so=io>i?-1:1,zs||(io=i),n&&(js&&!fs&&r-js>200&&(js=0,Ga("scrollEnd")),us=Ls,Ls=r),so<0){for(ps=e;ps-- >0;)La[ps]&&La[ps].update(0,n);so=1}else for(ps=0;ps<e;ps++)La[ps]&&La[ps].update(0,n);bo.isUpdating=!1}Ds=0},oo=[ua,"top",ha,ca,ya+_a,ya+pa,ya+ma,ya+ga,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],lo=oo.concat([fa,da,"boxSizing","max"+xa,"max"+ba,"position",ya,va,va+ma,va+pa,va+_a,va+ga]),uo=function(t,e,r,n){if(!t._gsap.swappedIn){for(var i,s=oo.length,a=e.style,o=t.style;s--;)a[i=oo[s]]=r[i];a.position="absolute"===r.position?"absolute":"relative","inline"===r.display&&(a.display="inline-block"),o[ha]=o[ca]="auto",a.flexBasis=r.flexBasis||"auto",a.overflow="visible",a.boxSizing="border-box",a[fa]=ka(t,Xi)+wa,a[da]=ka(t,qi)+wa,a[va]=o[ya]=o.top=o[ua]="0",ho(n),o[fa]=o["max"+xa]=r[fa],o[da]=o["max"+ba]=r[da],o[va]=r[va],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},co=/([A-Z])/g,ho=function(t){if(t){var e,r,n=t.t.style,i=t.length,s=0;for((t.t._gsap||Ji.core.getCache(t.t)).uncache=1;s<i;s+=2)r=t[s+1],e=t[s],r?n[e]=r:n[e]&&n.removeProperty(e.replace(co,"-$1").toLowerCase())}},fo=function(t){for(var e=lo.length,r=t.style,n=[],i=0;i<e;i++)n.push(lo[i],r[lo[i]]);return n.t=t,n},po={left:0,top:0},go=function(t,e,r,n,i,s,a,o,l,u,c,h,f,d){na(t)&&(t=t(o)),ra(t)&&"max"===t.substr(0,3)&&(t=h+("="===t.charAt(4)?Na("0"+t.substr(3),r):0));var p,g,m,_=f?f.time():0;if(f&&f.seek(0),isNaN(t)||(t=+t),ia(t))f&&(t=Ji.utils.mapRange(f.scrollTrigger.start,f.scrollTrigger.end,0,h,t)),a&&Ba(a,r,n,!0);else{na(e)&&(e=e(o));var v,y,x,b,w=(t||"0").split(" ");m=Hi(e,o)||is,(v=Ca(m)||{})&&(v.left||v.top)||"none"!==Ta(m).display||(b=m.style.display,m.style.display="block",v=Ca(m),b?m.style.display=b:m.style.removeProperty("display")),y=Na(w[0],v[n.d]),x=Na(w[1]||"0",r),t=v[n.p]-l[n.p]-u+y+i-x,a&&Ba(a,x,n,r-x<20||a._isStart&&x>20),r-=r-x}if(d&&(o[d]=t||-.001,t<0&&(t=0)),s){var T=t+r,O=s._isStart;p="scroll"+n.d2,Ba(s,T,n,O&&T>20||!O&&(c?Math.max(is[p],ns[p]):s.parentNode[p])<=T+1),c&&(l=Ca(a),c&&(s.style[n.op.p]=l[n.op.p]-n.op.m-s._offset+wa))}return f&&m&&(p=Ca(m),f.seek(h),g=Ca(m),f._caScrollDist=p[n.p]-g[n.p],t=t/f._caScrollDist*h),f&&f.seek(_),f?t:Math.round(t)},mo=/(webkit|moz|length|cssText|inset)/i,_o=function(t,e,r,n){if(t.parentNode!==e){var i,s,a=t.style;if(e===is){for(i in t._stOrig=a.cssText,s=Ta(t))+i||mo.test(i)||!s[i]||"string"!=typeof a[i]||"0"===i||(a[i]=s[i]);a.top=r,a.left=n}else a.cssText=t._stOrig;Ji.core.getCache(t).uncache=1,e.appendChild(t)}},vo=function(t,e,r){var n=e,i=n;return function(e){var s=Math.round(t());return s!==n&&s!==i&&Math.abs(s-n)>3&&Math.abs(s-i)>3&&(e=s,r&&r()),i=n,n=Math.round(e)}},yo=function(t,e,r){var n={};n[e.p]="+="+r,Ji.set(t,n)},xo=function(t,e){var r=Ui(t,e),n="_scroll"+e.p2,i=function e(i,s,a,o,l){var u=e.tween,c=s.onComplete,h={};a=a||r();var f=vo(r,a,function(){u.kill(),e.tween=0});return l=o&&l||0,o=o||i-a,u&&u.kill(),s[n]=i,s.inherit=!1,s.modifiers=h,h[n]=function(){return f(a+o*u.ratio+l*u.ratio*u.ratio)},s.onUpdate=function(){Pi.cache++,e.tween&&ao()},s.onComplete=function(){e.tween=0,c&&c.call(u)},u=e.tween=Ji.to(t,s)};return t[n]=r,r.wheelHandler=function(){return i.tween&&i.tween.kill()&&(i.tween=0)},Aa(t,"wheel",r.wheelHandler),bo.isTouch&&Aa(t,"touchmove",r.wheelHandler),i},bo=function(){function t(e,r){ts||t.register(Ji)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),ks(this),this.init(e,r)}return t.prototype.init=function(e,r){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),Ys){var n,i,s,a,o,l,u,c,h,f,d,p,g,m,_,v,y,x,b,w,T,O,C,k,E,S,M,A,P,R,D,z,F,N,I,B,L,j,Y,W,X,q,H=e=Oa(ra(e)||ia(e)||e.nodeType?{trigger:e}:e,za),U=H.onUpdate,V=H.toggleClass,G=H.id,$=H.onToggle,Z=H.onRefresh,Q=H.scrub,K=H.trigger,J=H.pin,tt=H.pinSpacing,et=H.invalidateOnRefresh,rt=H.anticipatePin,nt=H.onScrubComplete,it=H.onSnapComplete,st=H.once,at=H.snap,ot=H.pinReparent,lt=H.pinSpacer,ut=H.containerAnimation,ct=H.fastScrollEnd,ht=H.preventOverlaps,ft=e.horizontal||e.containerAnimation&&!1!==e.horizontal?Xi:qi,dt=!Q&&0!==Q,pt=Hi(e.scroller||es),gt=Ji.core.getCache(pt),mt=Qs(pt),_t="fixed"===("pinType"in e?e.pinType:Fi(pt,"pinType")||mt&&"fixed"),vt=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],yt=dt&&e.toggleActions.split(" "),xt="markers"in e?e.markers:za.markers,bt=mt?0:parseFloat(Ta(pt)["border"+ft.p2+xa])||0,wt=this,Tt=e.onRefreshInit&&function(){return e.onRefreshInit(wt)},Ot=function(t,e,r){var n=r.d,i=r.d2,s=r.a;return(s=Fi(t,"getBoundingClientRect"))?function(){return s()[n]}:function(){return(e?Ks(i):t["client"+i])||0}}(pt,mt,ft),Ct=function(t,e){return!e||~Ri.indexOf(t)?Js(t):function(){return po}}(pt,mt),kt=0,Et=0,St=0,Mt=Ui(pt,ft);if(wt._startClamp=wt._endClamp=!1,wt._dir=ft,rt*=45,wt.scroller=pt,wt.scroll=ut?ut.time.bind(ut):Mt,a=Mt(),wt.vars=e,r=r||e.animation,"refreshPriority"in e&&(vs=1,-9999===e.refreshPriority&&(Ns=wt)),gt.tweenScroll=gt.tweenScroll||{top:xo(pt,qi),left:xo(pt,Xi)},wt.tweenTo=n=gt.tweenScroll[ft.p],wt.scrubDuration=function(t){(F=ia(t)&&t)?z?z.duration(t):z=Ji.to(r,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:F,paused:!0,onComplete:function(){return nt&&nt(wt)}}):(z&&z.progress(1).kill(),z=0)},r&&(r.vars.lazy=!1,r._initted&&!wt.isReverted||!1!==r.vars.immediateRender&&!1!==e.immediateRender&&r.duration()&&r.render(0,!0,!0),wt.animation=r.pause(),r.scrollTrigger=wt,wt.scrubDuration(Q),R=0,G||(G=r.vars.id)),at&&(sa(at)&&!at.push||(at={snapTo:at}),"scrollBehavior"in is.style&&Ji.set(mt?[is,ns]:pt,{scrollBehavior:"auto"}),Pi.forEach(function(t){return na(t)&&t.target===(mt?rs.scrollingElement||ns:pt)&&(t.smooth=!1)}),s=na(at.snapTo)?at.snapTo:"labels"===at.snapTo?function(t){return function(e){return Ji.utils.snap(Ea(t),e)}}(r):"labelsDirectional"===at.snapTo?(W=r,function(t,e){return Sa(Ea(W))(t,e.direction)}):!1!==at.directional?function(t,e){return Sa(at.snapTo)(t,Bs()-Et<500?0:e.direction)}:Ji.utils.snap(at.snapTo),N=at.duration||{min:.1,max:2},N=sa(N)?ls(N.min,N.max):ls(N,N),I=Ji.delayedCall(at.delay||F/2||.1,function(){var t=Mt(),e=Bs()-Et<500,i=n.tween;if(!(e||Math.abs(wt.getVelocity())<10)||i||fs||kt===t)wt.isActive&&kt!==t&&I.restart(!0);else{var a,o,c=(t-l)/m,h=r&&!dt?r.totalProgress():c,f=e?0:(h-D)/(Bs()-us)*1e3||0,d=Ji.utils.clamp(-c,1-c,la(f/2)*f/.185),p=c+(!1===at.inertia?0:d),g=at,_=g.onStart,v=g.onInterrupt,y=g.onComplete;if(a=s(p,wt),ia(a)||(a=p),o=Math.max(0,Math.round(l+a*m)),t<=u&&t>=l&&o!==t){if(i&&!i._initted&&i.data<=la(o-t))return;!1===at.inertia&&(d=a-c),n(o,{duration:N(la(.185*Math.max(la(p-h),la(a-h))/f/.05||0)),ease:at.ease||"power3",data:la(o-t),onInterrupt:function(){return I.restart(!0)&&v&&oa(wt,v)},onComplete:function(){wt.update(),kt=Mt(),r&&!dt&&(z?z.resetTo("totalProgress",a,r._tTime/r._tDur):r.progress(a)),R=D=r&&!dt?r.totalProgress():wt.progress,it&&it(wt),y&&oa(wt,y)}},t,d*m,o-t-d*m),_&&oa(wt,_,n.tween)}}}).pause()),G&&(ja[G]=wt),(Y=(K=wt.trigger=Hi(K||!0!==J&&J))&&K._gsap&&K._gsap.stRevert)&&(Y=Y(wt)),J=!0===J?K:Hi(J),ra(V)&&(V={targets:K,className:V}),J&&(!1===tt||tt===ya||(tt=!(!tt&&J.parentNode&&J.parentNode.style&&"flex"===Ta(J.parentNode).display)&&va),wt.pin=J,(i=Ji.core.getCache(J)).spacer?_=i.pinState:(lt&&((lt=Hi(lt))&&!lt.nodeType&&(lt=lt.current||lt.nativeElement),i.spacerIsNative=!!lt,lt&&(i.spacerState=fo(lt))),i.spacer=x=lt||rs.createElement("div"),x.classList.add("pin-spacer"),G&&x.classList.add("pin-spacer-"+G),i.pinState=_=fo(J)),!1!==e.force3D&&Ji.set(J,{force3D:!0}),wt.spacer=x=i.spacer,P=Ta(J),k=P[tt+ft.os2],w=Ji.getProperty(J),T=Ji.quickSetter(J,ft.a,wa),uo(J,x,P),y=fo(J)),xt){p=sa(xt)?Oa(xt,Da):Da,f=Ia("scroller-start",G,pt,ft,p,0),d=Ia("scroller-end",G,pt,ft,p,0,f),b=f["offset"+ft.op.d2];var At=Hi(Fi(pt,"content")||pt);c=this.markerStart=Ia("start",G,At,ft,p,b,0,ut),h=this.markerEnd=Ia("end",G,At,ft,p,b,0,ut),ut&&(j=Ji.quickSetter([c,h],ft.a,wa)),_t||Ri.length&&!0===Fi(pt,"fixedMarkers")||(q=Ta(X=mt?is:pt).position,X.style.position="absolute"===q||"fixed"===q?q:"relative",Ji.set([f,d],{force3D:!0}),S=Ji.quickSetter(f,ft.a,wa),A=Ji.quickSetter(d,ft.a,wa))}if(ut){var Pt=ut.vars.onUpdate,Rt=ut.vars.onUpdateParams;ut.eventCallback("onUpdate",function(){wt.update(0,0,1),Pt&&Pt.apply(ut,Rt||[])})}if(wt.previous=function(){return La[La.indexOf(wt)-1]},wt.next=function(){return La[La.indexOf(wt)+1]},wt.revert=function(t,e){if(!e)return wt.kill(!0);var n=!1!==t||!wt.enabled,i=hs;n!==wt.isReverted&&(n&&(B=Math.max(Mt(),wt.scroll.rec||0),St=wt.progress,L=r&&r.progress()),c&&[c,h,f,d].forEach(function(t){return t.style.display=n?"none":"block"}),n&&(hs=wt,wt.update(n)),!J||ot&&wt.isActive||(n?function(t,e,r){ho(r);var n=t._gsap;if(n.spacerIsNative)ho(n.spacerState);else if(t._gsap.swappedIn){var i=e.parentNode;i&&(i.insertBefore(t,e),i.removeChild(e))}t._gsap.swappedIn=!1}(J,x,_):uo(J,x,Ta(J),E)),n||wt.update(n),hs=i,wt.isReverted=n)},wt.refresh=function(i,s,p,b){if(!hs&&wt.enabled||s)if(J&&i&&js)Aa(t,"scrollEnd",Va);else{!zs&&Tt&&Tt(wt),hs=wt,n.tween&&!p&&(n.tween.kill(),n.tween=0),z&&z.pause(),et&&r&&(r.revert({kill:!1}).invalidate(),r.getChildren?r.getChildren(!0,!0,!1).forEach(function(t){return t.vars.immediateRender&&t.render(0,!0,!0)}):r.vars.immediateRender&&r.render(0,!0,!0)),wt.isReverted||wt.revert(!0,!0),wt._subPinOffset=!1;var T,k,S,A,P,R,D,F,N,j,Y,W,X,q=Ot(),H=Ct(),U=ut?ut.duration():ta(pt,ft),V=m<=.01||!m,G=0,$=b||0,Q=sa(p)?p.end:e.end,rt=e.endTrigger||K,nt=sa(p)?p.start:e.start||(0!==e.start&&K?J?"0 0":"0 100%":0),it=wt.pinnedContainer=e.pinnedContainer&&Hi(e.pinnedContainer,wt),st=K&&Math.max(0,La.indexOf(wt))||0,at=st;for(xt&&sa(p)&&(W=Ji.getProperty(f,ft.p),X=Ji.getProperty(d,ft.p));at-- >0;)(R=La[at]).end||R.refresh(0,1)||(hs=wt),!(D=R.pin)||D!==K&&D!==J&&D!==it||R.isReverted||(j||(j=[]),j.unshift(R),R.revert(!0,!0)),R!==La[at]&&(st--,at--);for(na(nt)&&(nt=nt(wt)),nt=Ws(nt,"start",wt),l=go(nt,K,q,ft,Mt(),c,f,wt,H,bt,_t,U,ut,wt._startClamp&&"_startClamp")||(J?-.001:0),na(Q)&&(Q=Q(wt)),ra(Q)&&!Q.indexOf("+=")&&(~Q.indexOf(" ")?Q=(ra(nt)?nt.split(" ")[0]:"")+Q:(G=Na(Q.substr(2),q),Q=ra(nt)?nt:(ut?Ji.utils.mapRange(0,ut.duration(),ut.scrollTrigger.start,ut.scrollTrigger.end,l):l)+G,rt=K)),Q=Ws(Q,"end",wt),u=Math.max(l,go(Q||(rt?"100% 0":U),rt,q,ft,Mt()+G,h,d,wt,H,bt,_t,U,ut,wt._endClamp&&"_endClamp"))||-.001,G=0,at=st;at--;)(D=(R=La[at]||{}).pin)&&R.start-R._pinPush<=l&&!ut&&R.end>0&&(T=R.end-(wt._startClamp?Math.max(0,R.start):R.start),(D===K&&R.start-R._pinPush<l||D===it)&&isNaN(nt)&&(G+=T*(1-R.progress)),D===J&&($+=T));if(l+=G,u+=G,wt._startClamp&&(wt._startClamp+=G),wt._endClamp&&!zs&&(wt._endClamp=u||-.001,u=Math.min(u,ta(pt,ft))),m=u-l||(l-=.01)&&.001,V&&(St=Ji.utils.clamp(0,1,Ji.utils.normalize(l,u,B))),wt._pinPush=$,c&&G&&((T={})[ft.a]="+="+G,it&&(T[ft.p]="-="+Mt()),Ji.set([c,h],T)),!J||Ps&&wt.end>=ta(pt,ft)){if(K&&Mt()&&!ut)for(k=K.parentNode;k&&k!==is;)k._pinOffset&&(l-=k._pinOffset,u-=k._pinOffset),k=k.parentNode}else T=Ta(J),A=ft===qi,S=Mt(),O=parseFloat(w(ft.a))+$,!U&&u>1&&(Y={style:Y=(mt?rs.scrollingElement||ns:pt).style,value:Y["overflow"+ft.a.toUpperCase()]},mt&&"scroll"!==Ta(is)["overflow"+ft.a.toUpperCase()]&&(Y.style["overflow"+ft.a.toUpperCase()]="scroll")),uo(J,x,T),y=fo(J),k=Ca(J,!0),F=_t&&Ui(pt,A?Xi:qi)(),tt?((E=[tt+ft.os2,m+$+wa]).t=x,(at=tt===va?ka(J,ft)+m+$:0)&&(E.push(ft.d,at+wa),"auto"!==x.style.flexBasis&&(x.style.flexBasis=at+wa)),ho(E),it&&La.forEach(function(t){t.pin===it&&!1!==t.vars.pinSpacing&&(t._subPinOffset=!0)}),_t&&Mt(B)):(at=ka(J,ft))&&"auto"!==x.style.flexBasis&&(x.style.flexBasis=at+wa),_t&&((P={top:k.top+(A?S-l:F)+wa,left:k.left+(A?F:S-l)+wa,boxSizing:"border-box",position:"fixed"})[fa]=P["max"+xa]=Math.ceil(k.width)+wa,P[da]=P["max"+ba]=Math.ceil(k.height)+wa,P[ya]=P[ya+ma]=P[ya+pa]=P[ya+_a]=P[ya+ga]="0",P[va]=T[va],P[va+ma]=T[va+ma],P[va+pa]=T[va+pa],P[va+_a]=T[va+_a],P[va+ga]=T[va+ga],v=function(t,e,r){for(var n,i=[],s=t.length,a=r?8:0;a<s;a+=2)n=t[a],i.push(n,n in e?e[n]:t[a+1]);return i.t=t.t,i}(_,P,ot),zs&&Mt(0)),r?(N=r._initted,ys(1),r.render(r.duration(),!0,!0),C=w(ft.a)-O+m+$,M=Math.abs(m-C)>1,_t&&M&&v.splice(v.length-2,2),r.render(0,!0,!0),N||r.invalidate(!0),r.parent||r.totalTime(r.totalTime()),ys(0)):C=m,Y&&(Y.value?Y.style["overflow"+ft.a.toUpperCase()]=Y.value:Y.style.removeProperty("overflow-"+ft.a));j&&j.forEach(function(t){return t.revert(!1,!0)}),wt.start=l,wt.end=u,a=o=zs?B:Mt(),ut||zs||(a<B&&Mt(B),wt.scroll.rec=0),wt.revert(!1,!0),Et=Bs(),I&&(kt=-1,I.restart(!0)),hs=0,r&&dt&&(r._initted||L)&&r.progress()!==L&&r.progress(L||0,!0).render(r.time(),!0,!0),(V||St!==wt.progress||ut||et||r&&!r._initted)&&(r&&!dt&&(r._initted||St||!1!==r.vars.immediateRender)&&r.totalProgress(ut&&l<-.001&&!St?Ji.utils.normalize(l,u,0):St,!0),wt.progress=V||(a-l)/m===St?0:St),J&&tt&&(x._pinOffset=Math.round(wt.progress*C)),z&&z.invalidate(),isNaN(W)||(W-=Ji.getProperty(f,ft.p),X-=Ji.getProperty(d,ft.p),yo(f,ft,W),yo(c,ft,W-(b||0)),yo(d,ft,X),yo(h,ft,X-(b||0))),V&&!zs&&wt.update(),!Z||zs||g||(g=!0,Z(wt),g=!1)}},wt.getVelocity=function(){return(Mt()-o)/(Bs()-us)*1e3||0},wt.endAnimation=function(){aa(wt.callbackAnimation),r&&(z?z.progress(1):r.paused()?dt||aa(r,wt.direction<0,1):aa(r,r.reversed()))},wt.labelToScroll=function(t){return r&&r.labels&&(l||wt.refresh()||l)+r.labels[t]/r.duration()*m||0},wt.getTrailing=function(t){var e=La.indexOf(wt),r=wt.direction>0?La.slice(0,e).reverse():La.slice(e+1);return(ra(t)?r.filter(function(e){return e.vars.preventOverlaps===t}):r).filter(function(t){return wt.direction>0?t.end<=l:t.start>=u})},wt.update=function(t,e,i){if(!ut||i||t){var s,c,h,d,p,g,_,b=!0===zs?B:wt.scroll(),w=t?0:(b-l)/m,E=w<0?0:w>1?1:w||0,P=wt.progress;if(e&&(o=a,a=ut?Mt():b,at&&(D=R,R=r&&!dt?r.totalProgress():E)),rt&&J&&!hs&&!Is&&js&&(!E&&l<b+(b-o)/(Bs()-us)*rt?E=1e-4:1===E&&u>b+(b-o)/(Bs()-us)*rt&&(E=.9999)),E!==P&&wt.enabled){if(d=(p=(s=wt.isActive=!!E&&E<1)!==(!!P&&P<1))||!!E!=!!P,wt.direction=E>P?1:-1,wt.progress=E,d&&!hs&&(c=E&&!P?0:1===E?1:1===P?2:3,dt&&(h=!p&&"none"!==yt[c+1]&&yt[c+1]||yt[c],_=r&&("complete"===h||"reset"===h||h in r))),ht&&(p||_)&&(_||Q||!r)&&(na(ht)?ht(wt):wt.getTrailing(ht).forEach(function(t){return t.endAnimation()})),dt||(!z||hs||Is?r&&r.totalProgress(E,!(!hs||!Et&&!t)):(z._dp._time-z._start!==z._time&&z.render(z._dp._time-z._start),z.resetTo?z.resetTo("totalProgress",E,r._tTime/r._tDur):(z.vars.totalProgress=E,z.invalidate().restart()))),J)if(t&&tt&&(x.style[tt+ft.os2]=k),_t){if(d){if(g=!t&&E>P&&u+1>b&&b+1>=ta(pt,ft),ot)if(t||!s&&!g)_o(J,x);else{var F=Ca(J,!0),N=b-l;_o(J,is,F.top+(ft===qi?N:0)+wa,F.left+(ft===qi?0:N)+wa)}ho(s||g?v:y),M&&E<1&&s||T(O+(1!==E||g?0:C))}}else T(Gs(O+C*E));at&&!n.tween&&!hs&&!Is&&I.restart(!0),V&&(p||st&&E&&(E<1||!Rs))&&os(V.targets).forEach(function(t){return t.classList[s||st?"add":"remove"](V.className)}),U&&!dt&&!t&&U(wt),d&&!hs?(dt&&(_&&("complete"===h?r.pause().totalProgress(1):"reset"===h?r.restart(!0).pause():"restart"===h?r.restart(!0):r[h]()),U&&U(wt)),!p&&Rs||($&&p&&oa(wt,$),vt[c]&&oa(wt,vt[c]),st&&(1===E?wt.kill(!1,1):vt[c]=0),p||vt[c=1===E?1:3]&&oa(wt,vt[c])),ct&&!s&&Math.abs(wt.getVelocity())>(ia(ct)?ct:2500)&&(aa(wt.callbackAnimation),z?z.progress(1):aa(r,"reverse"===h?1:!E,1))):dt&&U&&!hs&&U(wt)}if(A){var L=ut?b/ut.duration()*(ut._caScrollDist||0):b;S(L+(f._isFlipped?1:0)),A(L)}j&&j(-b/ut.duration()*(ut._caScrollDist||0))}},wt.enable=function(e,r){wt.enabled||(wt.enabled=!0,Aa(pt,"resize",qa),mt||Aa(pt,"scroll",Wa),Tt&&Aa(t,"refreshInit",Tt),!1!==e&&(wt.progress=St=0,a=o=kt=Mt()),!1!==r&&wt.refresh())},wt.getTween=function(t){return t&&n?n.tween:z},wt.setPositions=function(t,e,r,n){if(ut){var i=ut.scrollTrigger,s=ut.duration(),a=i.end-i.start;t=i.start+a*t/s,e=i.start+a*e/s}wt.refresh(!1,!1,{start:Xs(t,r&&!!wt._startClamp),end:Xs(e,r&&!!wt._endClamp)},n),wt.update()},wt.adjustPinSpacing=function(t){if(E&&t){var e=E.indexOf(ft.d)+1;E[e]=parseFloat(E[e])+t+wa,E[1]=parseFloat(E[1])+t+wa,ho(E)}},wt.disable=function(e,r){if(!1!==e&&wt.revert(!0,!0),wt.enabled&&(wt.enabled=wt.isActive=!1,r||z&&z.pause(),B=0,i&&(i.uncache=1),Tt&&Pa(t,"refreshInit",Tt),I&&(I.pause(),n.tween&&n.tween.kill()&&(n.tween=0)),!mt)){for(var s=La.length;s--;)if(La[s].scroller===pt&&La[s]!==wt)return;Pa(pt,"resize",qa),mt||Pa(pt,"scroll",Wa)}},wt.kill=function(t,n){wt.disable(t,n),z&&!n&&z.kill(),G&&delete ja[G];var s=La.indexOf(wt);s>=0&&La.splice(s,1),s===ps&&so>0&&ps--,s=0,La.forEach(function(t){return t.scroller===wt.scroller&&(s=1)}),s||zs||(wt.scroll.rec=0),r&&(r.scrollTrigger=null,t&&r.revert({kill:!1}),n||r.kill()),c&&[c,h,f,d].forEach(function(t){return t.parentNode&&t.parentNode.removeChild(t)}),Ns===wt&&(Ns=0),J&&(i&&(i.uncache=1),s=0,La.forEach(function(t){return t.pin===J&&s++}),s||(i.spacer=0)),e.onKill&&e.onKill(wt)},La.push(wt),wt.enable(!1,!1),Y&&Y(wt),r&&r.add&&!m){var Dt=wt.update;wt.update=function(){wt.update=Dt,Pi.cache++,l||u||wt.refresh()},Ji.delayedCall(.01,wt.update),m=.01,l=u=0}else wt.refresh();J&&function(){if(Fs!==to){var t=Fs=to;requestAnimationFrame(function(){return t===to&&no(!0)})}}()}else this.update=this.refresh=this.kill=Vs},t.register=function(e){return ts||(Ji=e||Zs(),$s()&&window.document&&t.enable(),ts=Ys),ts},t.defaults=function(t){if(t)for(var e in t)za[e]=t[e];return za},t.disable=function(t,e){Ys=0,La.forEach(function(r){return r[e?"kill":"disable"](t)}),Pa(es,"wheel",Wa),Pa(rs,"scroll",Wa),clearInterval(cs),Pa(rs,"touchcancel",Vs),Pa(is,"touchstart",Vs),Ma(Pa,rs,"pointerdown,touchstart,mousedown",Hs),Ma(Pa,rs,"pointerup,touchend,mouseup",Us),as.kill(),ea(Pa);for(var r=0;r<Pi.length;r+=3)Ra(Pa,Pi[r],Pi[r+1]),Ra(Pa,Pi[r],Pi[r+2])},t.enable=function(){if(es=window,rs=document,ns=rs.documentElement,is=rs.body,Ji)if(os=Ji.utils.toArray,ls=Ji.utils.clamp,ks=Ji.core.context||Vs,ys=Ji.core.suppressOverwrites||Vs,Es=es.history.scrollRestoration||"auto",io=es.pageYOffset||0,Ji.core.globals("ScrollTrigger",t),is){Ys=1,(Ss=document.createElement("div")).style.height="100vh",Ss.style.position="absolute",eo(),qs(),Ki.register(Ji),t.isTouch=Ki.isTouch,Cs=Ki.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),ws=1===Ki.isTouch,Aa(es,"wheel",Wa),ss=[es,rs,ns,is],Ji.matchMedia?(t.matchMedia=function(t){var e,r=Ji.matchMedia();for(e in t)r.add(e,t[e]);return r},Ji.addEventListener("matchMediaInit",function(){Qa(),Ka()}),Ji.addEventListener("matchMediaRevert",function(){return Za()}),Ji.addEventListener("matchMedia",function(){no(0,1),Ga("matchMedia")}),Ji.matchMedia().add("(orientation: portrait)",function(){return Xa(),Xa})):console.warn("Requires GSAP 3.11.0 or later"),Xa(),Aa(rs,"scroll",Wa);var e,r,n=is.hasAttribute("style"),i=is.style,s=i.borderTopStyle,a=Ji.core.Animation.prototype;for(a.revert||Object.defineProperty(a,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",e=Ca(is),qi.m=Math.round(e.top+qi.sc())||0,Xi.m=Math.round(e.left+Xi.sc())||0,s?i.borderTopStyle=s:i.removeProperty("border-top-style"),n||(is.setAttribute("style",""),is.removeAttribute("style")),cs=setInterval(Ya,250),Ji.delayedCall(.5,function(){return Is=0}),Aa(rs,"touchcancel",Vs),Aa(is,"touchstart",Vs),Ma(Aa,rs,"pointerdown,touchstart,mousedown",Hs),Ma(Aa,rs,"pointerup,touchend,mouseup",Us),ds=Ji.utils.checkPrefix("transform"),lo.push(ds),ts=Bs(),as=Ji.delayedCall(.2,no).pause(),_s=[rs,"visibilitychange",function(){var t=es.innerWidth,e=es.innerHeight;rs.hidden?(gs=t,ms=e):gs===t&&ms===e||qa()},rs,"DOMContentLoaded",no,es,"load",no,es,"resize",qa],ea(Aa),La.forEach(function(t){return t.enable(0,1)}),r=0;r<Pi.length;r+=3)Ra(Pa,Pi[r],Pi[r+1]),Ra(Pa,Pi[r],Pi[r+2])}else if(rs){rs.addEventListener("DOMContentLoaded",function e(){t.enable(),rs.removeEventListener("DOMContentLoaded",e)})}},t.config=function(e){"limitCallbacks"in e&&(Rs=!!e.limitCallbacks);var r=e.syncInterval;r&&clearInterval(cs)||(cs=r)&&setInterval(Ya,r),"ignoreMobileResize"in e&&(ws=1===t.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(ea(Pa)||ea(Aa,e.autoRefreshEvents||"none"),xs=-1===(e.autoRefreshEvents+"").indexOf("resize"))},t.scrollerProxy=function(t,e){var r=Hi(t),n=Pi.indexOf(r),i=Qs(r);~n&&Pi.splice(n,i?6:2),e&&(i?Ri.unshift(es,e,is,e,ns,e):Ri.unshift(r,e))},t.clearMatchMedia=function(t){La.forEach(function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)})},t.isInViewport=function(t,e,r){var n=(ra(t)?Hi(t):t).getBoundingClientRect(),i=n[r?fa:da]*e||0;return r?n.right-i>0&&n.left+i<es.innerWidth:n.bottom-i>0&&n.top+i<es.innerHeight},t.positionInViewport=function(t,e,r){ra(t)&&(t=Hi(t));var n=t.getBoundingClientRect(),i=n[r?fa:da],s=null==e?i/2:e in Fa?Fa[e]*i:~e.indexOf("%")?parseFloat(e)*i/100:parseFloat(e)||0;return r?(n.left+s)/es.innerWidth:(n.top+s)/es.innerHeight},t.killAll=function(t){if(La.slice(0).forEach(function(t){return"ScrollSmoother"!==t.vars.id&&t.kill()}),!0!==t){var e=Ha.killAll||[];Ha={},e.forEach(function(t){return t()})}},t}();bo.version="3.15.0",bo.saveStyles=function(t){return t?os(t).forEach(function(t){if(t&&t.style){var e=$a.indexOf(t);e>=0&&$a.splice(e,5),$a.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),Ji.core.getCache(t),ks())}}):$a},bo.revert=function(t,e){return Ka(!t,e)},bo.create=function(t,e){return new bo(t,e)},bo.refresh=function(t){return t?qa(!0):(ts||bo.register())&&no(!0)},bo.update=function(t){return++Pi.cache&&ao(!0===t?2:0)},bo.clearScrollMemory=Ja,bo.maxScroll=function(t,e){return ta(t,e?Xi:qi)},bo.getScrollFunc=function(t,e){return Ui(Hi(t),e?Xi:qi)},bo.getById=function(t){return ja[t]},bo.getAll=function(){return La.filter(function(t){return"ScrollSmoother"!==t.vars.id})},bo.isScrolling=function(){return!!js},bo.snapDirectional=Sa,bo.addEventListener=function(t,e){var r=Ha[t]||(Ha[t]=[]);~r.indexOf(e)||r.push(e)},bo.removeEventListener=function(t,e){var r=Ha[t],n=r&&r.indexOf(e);n>=0&&r.splice(n,1)},bo.batch=function(t,e){var r,n=[],i={},s=e.interval||.016,a=e.batchMax||1e9,o=function(t,e){var r=[],n=[],i=Ji.delayedCall(s,function(){e(r,n),r=[],n=[]}).pause();return function(t){r.length||i.restart(!0),r.push(t.trigger),n.push(t),a<=r.length&&i.progress(1)}};for(r in e)i[r]="on"===r.substr(0,2)&&na(e[r])&&"onRefreshInit"!==r?o(0,e[r]):e[r];return na(a)&&(a=a(),Aa(bo,"refresh",function(){return a=e.batchMax()})),os(t).forEach(function(t){var e={};for(r in i)e[r]=i[r];e.trigger=t,n.push(bo.create(e))}),n};var wo,To=function(t,e,r,n){return e>n?t(n):e<0&&t(0),r>n?(n-e)/(r-e):r<0?e/(e-r):1},Oo=function t(e,r){!0===r?e.style.removeProperty("touch-action"):e.style.touchAction=!0===r?"auto":r?"pan-"+r+(Ki.isTouch?" pinch-zoom":""):"none",e===ns&&t(is,r)},Co={auto:1,scroll:1},ko=function(t){var e,r=t.event,n=t.target,i=t.axis,s=(r.changedTouches?r.changedTouches[0]:r).target,a=s._gsap||Ji.core.getCache(s),o=Bs();if(!a._isScrollT||o-a._isScrollT>2e3){for(;s&&s!==is&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!Co[(e=Ta(s)).overflowY]&&!Co[e.overflowX]);)s=s.parentNode;a._isScroll=s&&s!==n&&!Qs(s)&&(Co[(e=Ta(s)).overflowY]||Co[e.overflowX]),a._isScrollT=o}(a._isScroll||"x"===i)&&(r.stopPropagation(),r._gsapAllow=!0)},Eo=function(t,e,r,n){return Ki.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:n=n&&ko,onPress:n,onDrag:n,onScroll:n,onEnable:function(){return r&&Aa(rs,Ki.eventTypes[0],Mo,!1,!0)},onDisable:function(){return Pa(rs,Ki.eventTypes[0],Mo,!0)}})},So=/(input|label|select|textarea)/i,Mo=function(t){var e=So.test(t.target.tagName);(e||wo)&&(t._gsapAllow=!0,wo=e)},Ao=function(t){sa(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e,r,n,i,s,a,o,l,u=t,c=u.normalizeScrollX,h=u.momentum,f=u.allowNestedScroll,d=u.onRelease,p=Hi(t.target)||ns,g=Ji.core.globals().ScrollSmoother,m=g&&g.get(),_=Cs&&(t.content&&Hi(t.content)||m&&!1!==t.content&&!m.smooth()&&m.content()),v=Ui(p,qi),y=Ui(p,Xi),x=1,b=(Ki.isTouch&&es.visualViewport?es.visualViewport.scale*es.visualViewport.width:es.outerWidth)/es.innerWidth,w=0,T=na(h)?function(){return h(e)}:function(){return h||2.8},O=Eo(p,t.type,!0,f),C=function(){return i=!1},k=Vs,E=Vs,S=function(){r=ta(p,qi),E=ls(Cs?1:0,r),c&&(k=ls(0,ta(p,Xi))),n=to},M=function(){_._gsap.y=Gs(parseFloat(_._gsap.y)+v.offset)+"px",_.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(_._gsap.y)+", 0, 1)",v.offset=v.cacheID=0},A=function(){S(),s.isActive()&&s.vars.scrollY>r&&(v()>r?s.progress(1)&&v(r):s.resetTo("scrollY",r))};return _&&Ji.set(_,{y:"+=0"}),t.ignoreCheck=function(t){return Cs&&"touchmove"===t.type&&function(){if(i){requestAnimationFrame(C);var t=Gs(e.deltaY/2),r=E(v.v-t);if(_&&r!==v.v+v.offset){v.offset=r-v.v;var n=Gs((parseFloat(_&&_._gsap.y)||0)-v.offset);_.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+n+", 0, 1)",_._gsap.y=n+"px",v.cacheID=Pi.cache,ao()}return!0}v.offset&&M(),i=!0}()||x>1.05&&"touchstart"!==t.type||e.isGesturing||t.touches&&t.touches.length>1},t.onPress=function(){i=!1;var t=x;x=Gs((es.visualViewport&&es.visualViewport.scale||1)/b),s.pause(),t!==x&&Oo(p,x>1.01||!c&&"x"),a=y(),o=v(),S(),n=to},t.onRelease=t.onGestureStart=function(t,e){if(v.offset&&M(),e){Pi.cache++;var n,i,a=T();c&&(i=(n=y())+.05*a*-t.velocityX/.227,a*=To(y,n,i,ta(p,Xi)),s.vars.scrollX=k(i)),i=(n=v())+.05*a*-t.velocityY/.227,a*=To(v,n,i,ta(p,qi)),s.vars.scrollY=E(i),s.invalidate().duration(a).play(.01),(Cs&&s.vars.scrollY>=r||n>=r-1)&&Ji.to({},{onUpdate:A,duration:a})}else l.restart(!0);d&&d(t)},t.onWheel=function(){s._ts&&s.pause(),Bs()-w>1e3&&(n=0,w=Bs())},t.onChange=function(t,e,r,i,s){if(to!==n&&S(),e&&c&&y(k(i[2]===e?a+(t.startX-t.x):y()+e-i[1])),r){v.offset&&M();var l=s[2]===r,u=l?o+t.startY-t.y:v()+r-s[1],h=E(u);l&&u!==h&&(o+=h-u),v(h)}(r||e)&&ao()},t.onEnable=function(){Oo(p,!c&&"x"),bo.addEventListener("refresh",A),Aa(es,"resize",A),v.smooth&&(v.target.style.scrollBehavior="auto",v.smooth=y.smooth=!1),O.enable()},t.onDisable=function(){Oo(p,!0),Pa(es,"resize",A),bo.removeEventListener("refresh",A),O.kill()},t.lockAxis=!1!==t.lockAxis,(e=new Ki(t)).iOS=Cs,Cs&&!v()&&v(1),Cs&&Ji.ticker.add(Vs),l=e._dc,s=Ji.to(e,{ease:"power4",paused:!0,inherit:!1,scrollX:c?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:vo(v,v(),function(){return s.pause()})},onUpdate:ao,onComplete:l.vars.onComplete}),e};function Po({data:t,index:r}){return e("div",{className:""})}function Ro({scrollingElement:t,direction:l="normal",children:u=e("div",{children:"Nothing to Display, Please add some properly styled content"}),style:c,className:h,startAnimation:d="bottom",gsapScrollTrigger:p,scrollSpeed:g=1}){const m=n(),[_,v]=i(!1),[y,x]=i(0);return s(()=>{!function(){if(_)return;const t=function(){const t=m.current;if(!t)return;const e=t.children,r=e[0].getBoundingClientRect().width;let n=0;for(let t=0;t<e.length;t++)n+=e[t].getBoundingClientRect().width;return n-r}();t&&x(t),v(!0)}()},[]),a(()=>{const e=m.current;if(!e||!y)return;let r=di.context(()=>{var r,n;const i=t?document.querySelector(`${t}`):f(e,!0),s=null!==(r={normal:-y,reverse:y,backward:y}[l])&&void 0!==r?r:-y,a=null!==(n={top:"top top",within:`top ${(window.innerHeight-e.getBoundingClientRect().height)/2}px`,bottom:"bottom bottom"}[d])&&void 0!==n?n:d,o=di.quickTo(e,"x",{ease:"power3.out",duration:.2});bo.create(Object.assign({trigger:e,scroller:i,start:a,end:`+=${y/g}px`,pin:!0,scrub:!0,invalidateOnRefresh:!0,onUpdate:t=>{o(s*t.progress)}},p))},m);return()=>r.revert()},[y,l,d,g,t,p]),e("div",{ref:m,style:Object.assign({width:"100%",height:"auto",position:"relative",display:"flex",alignItems:"flex-start",justifyContent:""+("backward"==l?"flex-end":"flex-start"),flexDirection:""+("reverse"==l?"row-reverse":"row")},c),className:`${h} scroll_container`,children:r.Children.map(u,(t,r)=>e(o,{children:t},r))})}function Do(t,e,r,n){return new(r||(r=Promise))(function(i,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function o(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(a,o)}l((n=n.apply(t,e||[])).next())})}bo.sort=function(t){if(na(t))return La.sort(t);var e=es.pageYOffset||0;return bo.getAll().forEach(function(t){return t._sortY=t.trigger?e+t.trigger.getBoundingClientRect().top:t.start+es.innerHeight}),La.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+(t.vars.containerAnimation?1e6:t._sortY)-((e.vars.containerAnimation?1e6:e._sortY)+-1e6*(e.vars.refreshPriority||0))})},bo.observe=function(t){return new Ki(t)},bo.normalizeScroll=function(t){if(void 0===t)return bs;if(!0===t&&bs)return bs.enable();if(!1===t)return bs&&bs.kill(),void(bs=t);var e=t instanceof Ki?t:Ao(t);return bs&&bs.target===e.target&&bs.kill(),Qs(e.target)&&(bs=e),e},bo.core={_getVelocityProp:Vi,_inputObserver:Eo,_scrollers:Pi,_proxies:Ri,bridge:{ss:function(){js||Ga("scrollStart"),js=Bs()},ref:function(){return hs}}},Zs()&&Ji.registerPlugin(bo),di.registerPlugin(bo),di.registerPlugin(bo),"function"==typeof SuppressedError&&SuppressedError;
|
|
36
|
+
var Ji,ts,es,rs,ns,is,ss,as,os,ls,us,cs,hs,fs,ds,ps,gs,ms,_s,vs,ys,xs,bs,ws,Ts,Os,Cs,ks,Es,Ss,Ms,As,Ps,Rs,Ds,zs,Fs,Ns,Is=1,Bs=Date.now,Ls=Bs(),js=0,Ys=0,Ws=function(t,e,r){var n=ra(t)&&("clamp("===t.substr(0,6)||t.indexOf("max")>-1);return r["_"+e+"Clamp"]=n,n?t.substr(6,t.length-7):t},Xs=function(t,e){return!e||ra(t)&&"clamp("===t.substr(0,6)?t:"clamp("+t+")"},qs=function t(){return Ys&&requestAnimationFrame(t)},Hs=function(){return fs=1},Us=function(){return fs=0},Vs=function(t){return t},Gs=function(t){return Math.round(1e5*t)/1e5||0},$s=function(){return"undefined"!=typeof window},Zs=function(){return Ji||$s()&&(Ji=window.gsap)&&Ji.registerPlugin&&Ji},Qs=function(t){return!!~ss.indexOf(t)},Ks=function(t){return("Height"===t?Ms:es["inner"+t])||ns["client"+t]||is["client"+t]},Js=function(t){return Fi(t,"getBoundingClientRect")||(Qs(t)?function(){return po.width=es.innerWidth,po.height=Ms,po}:function(){return Ca(t)})},ta=function(t,e){var r=e.s,n=e.d2,i=e.d,s=e.a;return Math.max(0,(r="scroll"+n)&&(s=Fi(t,r))?s()-Js(t)()[i]:Qs(t)?(ns[r]||is[r])-Ks(n):t[r]-t["offset"+n])},ea=function(t,e){for(var r=0;r<_s.length;r+=3)(!e||~e.indexOf(_s[r+1]))&&t(_s[r],_s[r+1],_s[r+2])},ra=function(t){return"string"==typeof t},na=function(t){return"function"==typeof t},ia=function(t){return"number"==typeof t},sa=function(t){return"object"==typeof t},aa=function(t,e,r){return t&&t.progress(e?0:1)&&r&&t.pause()},oa=function(t,e,r){if(t.enabled){var n=t._ctx?t._ctx.add(function(){return e(t,r)}):e(t,r);n&&n.totalTime&&(t.callbackAnimation=n)}},la=Math.abs,ua="left",ca="right",ha="bottom",fa="width",da="height",pa="Right",ga="Left",ma="Top",_a="Bottom",va="padding",ya="margin",xa="Width",ba="Height",wa="px",Ta=function(t){return es.getComputedStyle(t.nodeType===Node.DOCUMENT_NODE?t.scrollingElement:t)},Oa=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},Ca=function(t,e){var r=e&&"matrix(1, 0, 0, 1, 0, 0)"!==Ta(t)[ds]&&Ji.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),n=t.getBoundingClientRect?t.getBoundingClientRect():t.scrollingElement.getBoundingClientRect();return r&&r.progress(0).kill(),n},ka=function(t,e){var r=e.d2;return t["offset"+r]||t["client"+r]||0},Ea=function(t){var e,r=[],n=t.labels,i=t.duration();for(e in n)r.push(n[e]/i);return r},Sa=function(t){var e=Ji.utils.snap(t),r=Array.isArray(t)&&t.slice(0).sort(function(t,e){return t-e});return r?function(t,n,i){var s;if(void 0===i&&(i=.001),!n)return e(t);if(n>0){for(t-=i,s=0;s<r.length;s++)if(r[s]>=t)return r[s];return r[s-1]}for(s=r.length,t+=i;s--;)if(r[s]<=t)return r[s];return r[0]}:function(r,n,i){void 0===i&&(i=.001);var s=e(r);return!n||Math.abs(s-r)<i||s-r<0==n<0?s:e(n<0?r-t:r+t)}},Ma=function(t,e,r,n){return r.split(",").forEach(function(r){return t(e,r,n)})},Aa=function(t,e,r,n,i){return t.addEventListener(e,r,{passive:!n,capture:!!i})},Pa=function(t,e,r,n){return t.removeEventListener(e,r,!!n)},Ra=function(t,e,r){(r=r&&r.wheelHandler)&&(t(e,"wheel",r),t(e,"touchmove",r))},Da={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},za={toggleActions:"play",anticipatePin:0},Fa={top:0,left:0,center:.5,bottom:1,right:1},Na=function(t,e){if(ra(t)){var r=t.indexOf("="),n=~r?+(t.charAt(r-1)+1)*parseFloat(t.substr(r+1)):0;~r&&(t.indexOf("%")>r&&(n*=e/100),t=t.substr(0,r-1)),t=n+(t in Fa?Fa[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},Ia=function(t,e,r,n,i,s,a,o){var l=i.startColor,u=i.endColor,c=i.fontSize,h=i.indent,f=i.fontWeight,d=rs.createElement("div"),p=Qs(r)||"fixed"===Fi(r,"pinType"),g=-1!==t.indexOf("scroller"),m=p?is:"IFRAME"===r.tagName?r.contentDocument.body:r,_=-1!==t.indexOf("start"),v=_?l:u,y="border-color:"+v+";font-size:"+c+";color:"+v+";font-weight:"+f+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return y+="position:"+((g||o)&&p?"fixed;":"absolute;"),(g||o||!p)&&(y+=(n===qi?ca:ha)+":"+(s+parseFloat(h))+"px;"),a&&(y+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),d._isStart=_,d.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),d.style.cssText=y,d.innerText=e||0===e?t+"-"+e:t,m.children[0]?m.insertBefore(d,m.children[0]):m.appendChild(d),d._offset=d["offset"+n.op.d2],Ba(d,0,n,_),d},Ba=function(t,e,r,n){var i={display:"block"},s=r[n?"os2":"p2"],a=r[n?"p2":"os2"];t._isFlipped=n,i[r.a+"Percent"]=n?-100:0,i[r.a]=n?"1px":0,i["border"+s+xa]=1,i["border"+a+xa]=0,i[r.p]=e+"px",Ji.set(t,i)},La=[],ja={},Ya=function(){return Bs()-js>34&&(Ds||(Ds=requestAnimationFrame(ao)))},Wa=function(){(!bs||!bs.isPressed||bs.startX>is.clientWidth)&&(Pi.cache++,bs?Ds||(Ds=requestAnimationFrame(ao)):ao(),js||Ga("scrollStart"),js=Bs())},Xa=function(){Os=es.innerWidth,Ts=es.innerHeight},qa=function(t){Pi.cache++,(!0===t||!hs&&!xs&&!rs.fullscreenElement&&!rs.webkitFullscreenElement&&(!ws||Os!==es.innerWidth||Math.abs(es.innerHeight-Ts)>.25*es.innerHeight))&&as.restart(!0)},Ha={},Ua=[],Va=function t(){return Pa(bo,"scrollEnd",t)||no(!0)},Ga=function(t){return Ha[t]&&Ha[t].map(function(t){return t()})||Ua},$a=[],Za=function(t){for(var e=0;e<$a.length;e+=5)(!t||$a[e+4]&&$a[e+4].query===t)&&($a[e].style.cssText=$a[e+1],$a[e].getBBox&&$a[e].setAttribute("transform",$a[e+2]||""),$a[e+3].uncache=1)},Qa=function(){return Pi.forEach(function(t){return na(t)&&++t.cacheID&&(t.rec=t())})},Ka=function(t,e){var r;for(ps=0;ps<La.length;ps++)!(r=La[ps])||e&&r._ctx!==e||(t?r.kill(1):r.revert(!0,!0));As=!0,e&&Za(e),e||Ga("revert")},Ja=function(t,e){Pi.cache++,(e||!zs)&&Pi.forEach(function(t){return na(t)&&t.cacheID++&&(t.rec=0)}),ra(t)&&(es.history.scrollRestoration=Es=t)},to=0,eo=function(){is.appendChild(Ss),Ms=!bs&&Ss.offsetHeight||es.innerHeight,is.removeChild(Ss)},ro=function(t){return os(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},no=function(t,e){if(ns=rs.documentElement,is=rs.body,ss=[es,rs,ns,is],!js||t||As){eo(),zs=bo.isRefreshing=!0,As||Qa();var r=Ga("refreshInit");vs&&bo.sort(),e||Ka(),Pi.forEach(function(t){na(t)&&(t.smooth&&(t.target.style.scrollBehavior="auto"),t(0))}),La.slice(0).forEach(function(t){return t.refresh()}),As=!1,La.forEach(function(t){if(t._subPinOffset&&t.pin){var e=t.vars.horizontal?"offsetWidth":"offsetHeight",r=t.pin[e];t.revert(!0,1),t.adjustPinSpacing(t.pin[e]-r),t.refresh()}}),Ps=1,ro(!0),La.forEach(function(t){var e=ta(t.scroller,t._dir),r="max"===t.vars.end||t._endClamp&&t.end>e,n=t._startClamp&&t.start>=e;(r||n)&&t.setPositions(n?e-1:t.start,r?Math.max(n?e:t.start+1,e):t.end,!0)}),ro(!1),Ps=0,r.forEach(function(t){return t&&t.render&&t.render(-1)}),Pi.forEach(function(t){na(t)&&(t.smooth&&requestAnimationFrame(function(){return t.target.style.scrollBehavior="smooth"}),t.rec&&t(t.rec))}),Ja(Es,1),as.pause(),to++,zs=2,ao(2),La.forEach(function(t){return na(t.vars.onRefresh)&&t.vars.onRefresh(t)}),zs=bo.isRefreshing=!1,Ga("refresh")}else Aa(bo,"scrollEnd",Va)},io=0,so=1,ao=function(t){if(2===t||!zs&&!As){bo.isUpdating=!0,Ns&&Ns.update(0);var e=La.length,r=Bs(),n=r-Ls>=50,i=e&&La[0].scroll();if(so=io>i?-1:1,zs||(io=i),n&&(js&&!fs&&r-js>200&&(js=0,Ga("scrollEnd")),us=Ls,Ls=r),so<0){for(ps=e;ps-- >0;)La[ps]&&La[ps].update(0,n);so=1}else for(ps=0;ps<e;ps++)La[ps]&&La[ps].update(0,n);bo.isUpdating=!1}Ds=0},oo=[ua,"top",ha,ca,ya+_a,ya+pa,ya+ma,ya+ga,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],lo=oo.concat([fa,da,"boxSizing","max"+xa,"max"+ba,"position",ya,va,va+ma,va+pa,va+_a,va+ga]),uo=function(t,e,r,n){if(!t._gsap.swappedIn){for(var i,s=oo.length,a=e.style,o=t.style;s--;)a[i=oo[s]]=r[i];a.position="absolute"===r.position?"absolute":"relative","inline"===r.display&&(a.display="inline-block"),o[ha]=o[ca]="auto",a.flexBasis=r.flexBasis||"auto",a.overflow="visible",a.boxSizing="border-box",a[fa]=ka(t,Xi)+wa,a[da]=ka(t,qi)+wa,a[va]=o[ya]=o.top=o[ua]="0",ho(n),o[fa]=o["max"+xa]=r[fa],o[da]=o["max"+ba]=r[da],o[va]=r[va],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},co=/([A-Z])/g,ho=function(t){if(t){var e,r,n=t.t.style,i=t.length,s=0;for((t.t._gsap||Ji.core.getCache(t.t)).uncache=1;s<i;s+=2)r=t[s+1],e=t[s],r?n[e]=r:n[e]&&n.removeProperty(e.replace(co,"-$1").toLowerCase())}},fo=function(t){for(var e=lo.length,r=t.style,n=[],i=0;i<e;i++)n.push(lo[i],r[lo[i]]);return n.t=t,n},po={left:0,top:0},go=function(t,e,r,n,i,s,a,o,l,u,c,h,f,d){na(t)&&(t=t(o)),ra(t)&&"max"===t.substr(0,3)&&(t=h+("="===t.charAt(4)?Na("0"+t.substr(3),r):0));var p,g,m,_=f?f.time():0;if(f&&f.seek(0),isNaN(t)||(t=+t),ia(t))f&&(t=Ji.utils.mapRange(f.scrollTrigger.start,f.scrollTrigger.end,0,h,t)),a&&Ba(a,r,n,!0);else{na(e)&&(e=e(o));var v,y,x,b,w=(t||"0").split(" ");m=Hi(e,o)||is,(v=Ca(m)||{})&&(v.left||v.top)||"none"!==Ta(m).display||(b=m.style.display,m.style.display="block",v=Ca(m),b?m.style.display=b:m.style.removeProperty("display")),y=Na(w[0],v[n.d]),x=Na(w[1]||"0",r),t=v[n.p]-l[n.p]-u+y+i-x,a&&Ba(a,x,n,r-x<20||a._isStart&&x>20),r-=r-x}if(d&&(o[d]=t||-.001,t<0&&(t=0)),s){var T=t+r,O=s._isStart;p="scroll"+n.d2,Ba(s,T,n,O&&T>20||!O&&(c?Math.max(is[p],ns[p]):s.parentNode[p])<=T+1),c&&(l=Ca(a),c&&(s.style[n.op.p]=l[n.op.p]-n.op.m-s._offset+wa))}return f&&m&&(p=Ca(m),f.seek(h),g=Ca(m),f._caScrollDist=p[n.p]-g[n.p],t=t/f._caScrollDist*h),f&&f.seek(_),f?t:Math.round(t)},mo=/(webkit|moz|length|cssText|inset)/i,_o=function(t,e,r,n){if(t.parentNode!==e){var i,s,a=t.style;if(e===is){for(i in t._stOrig=a.cssText,s=Ta(t))+i||mo.test(i)||!s[i]||"string"!=typeof a[i]||"0"===i||(a[i]=s[i]);a.top=r,a.left=n}else a.cssText=t._stOrig;Ji.core.getCache(t).uncache=1,e.appendChild(t)}},vo=function(t,e,r){var n=e,i=n;return function(e){var s=Math.round(t());return s!==n&&s!==i&&Math.abs(s-n)>3&&Math.abs(s-i)>3&&(e=s,r&&r()),i=n,n=Math.round(e)}},yo=function(t,e,r){var n={};n[e.p]="+="+r,Ji.set(t,n)},xo=function(t,e){var r=Ui(t,e),n="_scroll"+e.p2,i=function e(i,s,a,o,l){var u=e.tween,c=s.onComplete,h={};a=a||r();var f=vo(r,a,function(){u.kill(),e.tween=0});return l=o&&l||0,o=o||i-a,u&&u.kill(),s[n]=i,s.inherit=!1,s.modifiers=h,h[n]=function(){return f(a+o*u.ratio+l*u.ratio*u.ratio)},s.onUpdate=function(){Pi.cache++,e.tween&&ao()},s.onComplete=function(){e.tween=0,c&&c.call(u)},u=e.tween=Ji.to(t,s)};return t[n]=r,r.wheelHandler=function(){return i.tween&&i.tween.kill()&&(i.tween=0)},Aa(t,"wheel",r.wheelHandler),bo.isTouch&&Aa(t,"touchmove",r.wheelHandler),i},bo=function(){function t(e,r){ts||t.register(Ji)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),ks(this),this.init(e,r)}return t.prototype.init=function(e,r){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),Ys){var n,i,s,a,o,l,u,c,h,f,d,p,g,m,_,v,y,x,b,w,T,O,C,k,E,S,M,A,P,R,D,z,F,N,I,B,L,j,Y,W,X,q,H=e=Oa(ra(e)||ia(e)||e.nodeType?{trigger:e}:e,za),U=H.onUpdate,V=H.toggleClass,G=H.id,$=H.onToggle,Z=H.onRefresh,Q=H.scrub,K=H.trigger,J=H.pin,tt=H.pinSpacing,et=H.invalidateOnRefresh,rt=H.anticipatePin,nt=H.onScrubComplete,it=H.onSnapComplete,st=H.once,at=H.snap,ot=H.pinReparent,lt=H.pinSpacer,ut=H.containerAnimation,ct=H.fastScrollEnd,ht=H.preventOverlaps,ft=e.horizontal||e.containerAnimation&&!1!==e.horizontal?Xi:qi,dt=!Q&&0!==Q,pt=Hi(e.scroller||es),gt=Ji.core.getCache(pt),mt=Qs(pt),_t="fixed"===("pinType"in e?e.pinType:Fi(pt,"pinType")||mt&&"fixed"),vt=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],yt=dt&&e.toggleActions.split(" "),xt="markers"in e?e.markers:za.markers,bt=mt?0:parseFloat(Ta(pt)["border"+ft.p2+xa])||0,wt=this,Tt=e.onRefreshInit&&function(){return e.onRefreshInit(wt)},Ot=function(t,e,r){var n=r.d,i=r.d2,s=r.a;return(s=Fi(t,"getBoundingClientRect"))?function(){return s()[n]}:function(){return(e?Ks(i):t["client"+i])||0}}(pt,mt,ft),Ct=function(t,e){return!e||~Ri.indexOf(t)?Js(t):function(){return po}}(pt,mt),kt=0,Et=0,St=0,Mt=Ui(pt,ft);if(wt._startClamp=wt._endClamp=!1,wt._dir=ft,rt*=45,wt.scroller=pt,wt.scroll=ut?ut.time.bind(ut):Mt,a=Mt(),wt.vars=e,r=r||e.animation,"refreshPriority"in e&&(vs=1,-9999===e.refreshPriority&&(Ns=wt)),gt.tweenScroll=gt.tweenScroll||{top:xo(pt,qi),left:xo(pt,Xi)},wt.tweenTo=n=gt.tweenScroll[ft.p],wt.scrubDuration=function(t){(F=ia(t)&&t)?z?z.duration(t):z=Ji.to(r,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:F,paused:!0,onComplete:function(){return nt&&nt(wt)}}):(z&&z.progress(1).kill(),z=0)},r&&(r.vars.lazy=!1,r._initted&&!wt.isReverted||!1!==r.vars.immediateRender&&!1!==e.immediateRender&&r.duration()&&r.render(0,!0,!0),wt.animation=r.pause(),r.scrollTrigger=wt,wt.scrubDuration(Q),R=0,G||(G=r.vars.id)),at&&(sa(at)&&!at.push||(at={snapTo:at}),"scrollBehavior"in is.style&&Ji.set(mt?[is,ns]:pt,{scrollBehavior:"auto"}),Pi.forEach(function(t){return na(t)&&t.target===(mt?rs.scrollingElement||ns:pt)&&(t.smooth=!1)}),s=na(at.snapTo)?at.snapTo:"labels"===at.snapTo?function(t){return function(e){return Ji.utils.snap(Ea(t),e)}}(r):"labelsDirectional"===at.snapTo?(W=r,function(t,e){return Sa(Ea(W))(t,e.direction)}):!1!==at.directional?function(t,e){return Sa(at.snapTo)(t,Bs()-Et<500?0:e.direction)}:Ji.utils.snap(at.snapTo),N=at.duration||{min:.1,max:2},N=sa(N)?ls(N.min,N.max):ls(N,N),I=Ji.delayedCall(at.delay||F/2||.1,function(){var t=Mt(),e=Bs()-Et<500,i=n.tween;if(!(e||Math.abs(wt.getVelocity())<10)||i||fs||kt===t)wt.isActive&&kt!==t&&I.restart(!0);else{var a,o,c=(t-l)/m,h=r&&!dt?r.totalProgress():c,f=e?0:(h-D)/(Bs()-us)*1e3||0,d=Ji.utils.clamp(-c,1-c,la(f/2)*f/.185),p=c+(!1===at.inertia?0:d),g=at,_=g.onStart,v=g.onInterrupt,y=g.onComplete;if(a=s(p,wt),ia(a)||(a=p),o=Math.max(0,Math.round(l+a*m)),t<=u&&t>=l&&o!==t){if(i&&!i._initted&&i.data<=la(o-t))return;!1===at.inertia&&(d=a-c),n(o,{duration:N(la(.185*Math.max(la(p-h),la(a-h))/f/.05||0)),ease:at.ease||"power3",data:la(o-t),onInterrupt:function(){return I.restart(!0)&&v&&oa(wt,v)},onComplete:function(){wt.update(),kt=Mt(),r&&!dt&&(z?z.resetTo("totalProgress",a,r._tTime/r._tDur):r.progress(a)),R=D=r&&!dt?r.totalProgress():wt.progress,it&&it(wt),y&&oa(wt,y)}},t,d*m,o-t-d*m),_&&oa(wt,_,n.tween)}}}).pause()),G&&(ja[G]=wt),(Y=(K=wt.trigger=Hi(K||!0!==J&&J))&&K._gsap&&K._gsap.stRevert)&&(Y=Y(wt)),J=!0===J?K:Hi(J),ra(V)&&(V={targets:K,className:V}),J&&(!1===tt||tt===ya||(tt=!(!tt&&J.parentNode&&J.parentNode.style&&"flex"===Ta(J.parentNode).display)&&va),wt.pin=J,(i=Ji.core.getCache(J)).spacer?_=i.pinState:(lt&&((lt=Hi(lt))&&!lt.nodeType&&(lt=lt.current||lt.nativeElement),i.spacerIsNative=!!lt,lt&&(i.spacerState=fo(lt))),i.spacer=x=lt||rs.createElement("div"),x.classList.add("pin-spacer"),G&&x.classList.add("pin-spacer-"+G),i.pinState=_=fo(J)),!1!==e.force3D&&Ji.set(J,{force3D:!0}),wt.spacer=x=i.spacer,P=Ta(J),k=P[tt+ft.os2],w=Ji.getProperty(J),T=Ji.quickSetter(J,ft.a,wa),uo(J,x,P),y=fo(J)),xt){p=sa(xt)?Oa(xt,Da):Da,f=Ia("scroller-start",G,pt,ft,p,0),d=Ia("scroller-end",G,pt,ft,p,0,f),b=f["offset"+ft.op.d2];var At=Hi(Fi(pt,"content")||pt);c=this.markerStart=Ia("start",G,At,ft,p,b,0,ut),h=this.markerEnd=Ia("end",G,At,ft,p,b,0,ut),ut&&(j=Ji.quickSetter([c,h],ft.a,wa)),_t||Ri.length&&!0===Fi(pt,"fixedMarkers")||(q=Ta(X=mt?is:pt).position,X.style.position="absolute"===q||"fixed"===q?q:"relative",Ji.set([f,d],{force3D:!0}),S=Ji.quickSetter(f,ft.a,wa),A=Ji.quickSetter(d,ft.a,wa))}if(ut){var Pt=ut.vars.onUpdate,Rt=ut.vars.onUpdateParams;ut.eventCallback("onUpdate",function(){wt.update(0,0,1),Pt&&Pt.apply(ut,Rt||[])})}if(wt.previous=function(){return La[La.indexOf(wt)-1]},wt.next=function(){return La[La.indexOf(wt)+1]},wt.revert=function(t,e){if(!e)return wt.kill(!0);var n=!1!==t||!wt.enabled,i=hs;n!==wt.isReverted&&(n&&(B=Math.max(Mt(),wt.scroll.rec||0),St=wt.progress,L=r&&r.progress()),c&&[c,h,f,d].forEach(function(t){return t.style.display=n?"none":"block"}),n&&(hs=wt,wt.update(n)),!J||ot&&wt.isActive||(n?function(t,e,r){ho(r);var n=t._gsap;if(n.spacerIsNative)ho(n.spacerState);else if(t._gsap.swappedIn){var i=e.parentNode;i&&(i.insertBefore(t,e),i.removeChild(e))}t._gsap.swappedIn=!1}(J,x,_):uo(J,x,Ta(J),E)),n||wt.update(n),hs=i,wt.isReverted=n)},wt.refresh=function(i,s,p,b){if(!hs&&wt.enabled||s)if(J&&i&&js)Aa(t,"scrollEnd",Va);else{!zs&&Tt&&Tt(wt),hs=wt,n.tween&&!p&&(n.tween.kill(),n.tween=0),z&&z.pause(),et&&r&&(r.revert({kill:!1}).invalidate(),r.getChildren?r.getChildren(!0,!0,!1).forEach(function(t){return t.vars.immediateRender&&t.render(0,!0,!0)}):r.vars.immediateRender&&r.render(0,!0,!0)),wt.isReverted||wt.revert(!0,!0),wt._subPinOffset=!1;var T,k,S,A,P,R,D,F,N,j,Y,W,X,q=Ot(),H=Ct(),U=ut?ut.duration():ta(pt,ft),V=m<=.01||!m,G=0,$=b||0,Q=sa(p)?p.end:e.end,rt=e.endTrigger||K,nt=sa(p)?p.start:e.start||(0!==e.start&&K?J?"0 0":"0 100%":0),it=wt.pinnedContainer=e.pinnedContainer&&Hi(e.pinnedContainer,wt),st=K&&Math.max(0,La.indexOf(wt))||0,at=st;for(xt&&sa(p)&&(W=Ji.getProperty(f,ft.p),X=Ji.getProperty(d,ft.p));at-- >0;)(R=La[at]).end||R.refresh(0,1)||(hs=wt),!(D=R.pin)||D!==K&&D!==J&&D!==it||R.isReverted||(j||(j=[]),j.unshift(R),R.revert(!0,!0)),R!==La[at]&&(st--,at--);for(na(nt)&&(nt=nt(wt)),nt=Ws(nt,"start",wt),l=go(nt,K,q,ft,Mt(),c,f,wt,H,bt,_t,U,ut,wt._startClamp&&"_startClamp")||(J?-.001:0),na(Q)&&(Q=Q(wt)),ra(Q)&&!Q.indexOf("+=")&&(~Q.indexOf(" ")?Q=(ra(nt)?nt.split(" ")[0]:"")+Q:(G=Na(Q.substr(2),q),Q=ra(nt)?nt:(ut?Ji.utils.mapRange(0,ut.duration(),ut.scrollTrigger.start,ut.scrollTrigger.end,l):l)+G,rt=K)),Q=Ws(Q,"end",wt),u=Math.max(l,go(Q||(rt?"100% 0":U),rt,q,ft,Mt()+G,h,d,wt,H,bt,_t,U,ut,wt._endClamp&&"_endClamp"))||-.001,G=0,at=st;at--;)(D=(R=La[at]||{}).pin)&&R.start-R._pinPush<=l&&!ut&&R.end>0&&(T=R.end-(wt._startClamp?Math.max(0,R.start):R.start),(D===K&&R.start-R._pinPush<l||D===it)&&isNaN(nt)&&(G+=T*(1-R.progress)),D===J&&($+=T));if(l+=G,u+=G,wt._startClamp&&(wt._startClamp+=G),wt._endClamp&&!zs&&(wt._endClamp=u||-.001,u=Math.min(u,ta(pt,ft))),m=u-l||(l-=.01)&&.001,V&&(St=Ji.utils.clamp(0,1,Ji.utils.normalize(l,u,B))),wt._pinPush=$,c&&G&&((T={})[ft.a]="+="+G,it&&(T[ft.p]="-="+Mt()),Ji.set([c,h],T)),!J||Ps&&wt.end>=ta(pt,ft)){if(K&&Mt()&&!ut)for(k=K.parentNode;k&&k!==is;)k._pinOffset&&(l-=k._pinOffset,u-=k._pinOffset),k=k.parentNode}else T=Ta(J),A=ft===qi,S=Mt(),O=parseFloat(w(ft.a))+$,!U&&u>1&&(Y={style:Y=(mt?rs.scrollingElement||ns:pt).style,value:Y["overflow"+ft.a.toUpperCase()]},mt&&"scroll"!==Ta(is)["overflow"+ft.a.toUpperCase()]&&(Y.style["overflow"+ft.a.toUpperCase()]="scroll")),uo(J,x,T),y=fo(J),k=Ca(J,!0),F=_t&&Ui(pt,A?Xi:qi)(),tt?((E=[tt+ft.os2,m+$+wa]).t=x,(at=tt===va?ka(J,ft)+m+$:0)&&(E.push(ft.d,at+wa),"auto"!==x.style.flexBasis&&(x.style.flexBasis=at+wa)),ho(E),it&&La.forEach(function(t){t.pin===it&&!1!==t.vars.pinSpacing&&(t._subPinOffset=!0)}),_t&&Mt(B)):(at=ka(J,ft))&&"auto"!==x.style.flexBasis&&(x.style.flexBasis=at+wa),_t&&((P={top:k.top+(A?S-l:F)+wa,left:k.left+(A?F:S-l)+wa,boxSizing:"border-box",position:"fixed"})[fa]=P["max"+xa]=Math.ceil(k.width)+wa,P[da]=P["max"+ba]=Math.ceil(k.height)+wa,P[ya]=P[ya+ma]=P[ya+pa]=P[ya+_a]=P[ya+ga]="0",P[va]=T[va],P[va+ma]=T[va+ma],P[va+pa]=T[va+pa],P[va+_a]=T[va+_a],P[va+ga]=T[va+ga],v=function(t,e,r){for(var n,i=[],s=t.length,a=r?8:0;a<s;a+=2)n=t[a],i.push(n,n in e?e[n]:t[a+1]);return i.t=t.t,i}(_,P,ot),zs&&Mt(0)),r?(N=r._initted,ys(1),r.render(r.duration(),!0,!0),C=w(ft.a)-O+m+$,M=Math.abs(m-C)>1,_t&&M&&v.splice(v.length-2,2),r.render(0,!0,!0),N||r.invalidate(!0),r.parent||r.totalTime(r.totalTime()),ys(0)):C=m,Y&&(Y.value?Y.style["overflow"+ft.a.toUpperCase()]=Y.value:Y.style.removeProperty("overflow-"+ft.a));j&&j.forEach(function(t){return t.revert(!1,!0)}),wt.start=l,wt.end=u,a=o=zs?B:Mt(),ut||zs||(a<B&&Mt(B),wt.scroll.rec=0),wt.revert(!1,!0),Et=Bs(),I&&(kt=-1,I.restart(!0)),hs=0,r&&dt&&(r._initted||L)&&r.progress()!==L&&r.progress(L||0,!0).render(r.time(),!0,!0),(V||St!==wt.progress||ut||et||r&&!r._initted)&&(r&&!dt&&(r._initted||St||!1!==r.vars.immediateRender)&&r.totalProgress(ut&&l<-.001&&!St?Ji.utils.normalize(l,u,0):St,!0),wt.progress=V||(a-l)/m===St?0:St),J&&tt&&(x._pinOffset=Math.round(wt.progress*C)),z&&z.invalidate(),isNaN(W)||(W-=Ji.getProperty(f,ft.p),X-=Ji.getProperty(d,ft.p),yo(f,ft,W),yo(c,ft,W-(b||0)),yo(d,ft,X),yo(h,ft,X-(b||0))),V&&!zs&&wt.update(),!Z||zs||g||(g=!0,Z(wt),g=!1)}},wt.getVelocity=function(){return(Mt()-o)/(Bs()-us)*1e3||0},wt.endAnimation=function(){aa(wt.callbackAnimation),r&&(z?z.progress(1):r.paused()?dt||aa(r,wt.direction<0,1):aa(r,r.reversed()))},wt.labelToScroll=function(t){return r&&r.labels&&(l||wt.refresh()||l)+r.labels[t]/r.duration()*m||0},wt.getTrailing=function(t){var e=La.indexOf(wt),r=wt.direction>0?La.slice(0,e).reverse():La.slice(e+1);return(ra(t)?r.filter(function(e){return e.vars.preventOverlaps===t}):r).filter(function(t){return wt.direction>0?t.end<=l:t.start>=u})},wt.update=function(t,e,i){if(!ut||i||t){var s,c,h,d,p,g,_,b=!0===zs?B:wt.scroll(),w=t?0:(b-l)/m,E=w<0?0:w>1?1:w||0,P=wt.progress;if(e&&(o=a,a=ut?Mt():b,at&&(D=R,R=r&&!dt?r.totalProgress():E)),rt&&J&&!hs&&!Is&&js&&(!E&&l<b+(b-o)/(Bs()-us)*rt?E=1e-4:1===E&&u>b+(b-o)/(Bs()-us)*rt&&(E=.9999)),E!==P&&wt.enabled){if(d=(p=(s=wt.isActive=!!E&&E<1)!==(!!P&&P<1))||!!E!=!!P,wt.direction=E>P?1:-1,wt.progress=E,d&&!hs&&(c=E&&!P?0:1===E?1:1===P?2:3,dt&&(h=!p&&"none"!==yt[c+1]&&yt[c+1]||yt[c],_=r&&("complete"===h||"reset"===h||h in r))),ht&&(p||_)&&(_||Q||!r)&&(na(ht)?ht(wt):wt.getTrailing(ht).forEach(function(t){return t.endAnimation()})),dt||(!z||hs||Is?r&&r.totalProgress(E,!(!hs||!Et&&!t)):(z._dp._time-z._start!==z._time&&z.render(z._dp._time-z._start),z.resetTo?z.resetTo("totalProgress",E,r._tTime/r._tDur):(z.vars.totalProgress=E,z.invalidate().restart()))),J)if(t&&tt&&(x.style[tt+ft.os2]=k),_t){if(d){if(g=!t&&E>P&&u+1>b&&b+1>=ta(pt,ft),ot)if(t||!s&&!g)_o(J,x);else{var F=Ca(J,!0),N=b-l;_o(J,is,F.top+(ft===qi?N:0)+wa,F.left+(ft===qi?0:N)+wa)}ho(s||g?v:y),M&&E<1&&s||T(O+(1!==E||g?0:C))}}else T(Gs(O+C*E));at&&!n.tween&&!hs&&!Is&&I.restart(!0),V&&(p||st&&E&&(E<1||!Rs))&&os(V.targets).forEach(function(t){return t.classList[s||st?"add":"remove"](V.className)}),U&&!dt&&!t&&U(wt),d&&!hs?(dt&&(_&&("complete"===h?r.pause().totalProgress(1):"reset"===h?r.restart(!0).pause():"restart"===h?r.restart(!0):r[h]()),U&&U(wt)),!p&&Rs||($&&p&&oa(wt,$),vt[c]&&oa(wt,vt[c]),st&&(1===E?wt.kill(!1,1):vt[c]=0),p||vt[c=1===E?1:3]&&oa(wt,vt[c])),ct&&!s&&Math.abs(wt.getVelocity())>(ia(ct)?ct:2500)&&(aa(wt.callbackAnimation),z?z.progress(1):aa(r,"reverse"===h?1:!E,1))):dt&&U&&!hs&&U(wt)}if(A){var L=ut?b/ut.duration()*(ut._caScrollDist||0):b;S(L+(f._isFlipped?1:0)),A(L)}j&&j(-b/ut.duration()*(ut._caScrollDist||0))}},wt.enable=function(e,r){wt.enabled||(wt.enabled=!0,Aa(pt,"resize",qa),mt||Aa(pt,"scroll",Wa),Tt&&Aa(t,"refreshInit",Tt),!1!==e&&(wt.progress=St=0,a=o=kt=Mt()),!1!==r&&wt.refresh())},wt.getTween=function(t){return t&&n?n.tween:z},wt.setPositions=function(t,e,r,n){if(ut){var i=ut.scrollTrigger,s=ut.duration(),a=i.end-i.start;t=i.start+a*t/s,e=i.start+a*e/s}wt.refresh(!1,!1,{start:Xs(t,r&&!!wt._startClamp),end:Xs(e,r&&!!wt._endClamp)},n),wt.update()},wt.adjustPinSpacing=function(t){if(E&&t){var e=E.indexOf(ft.d)+1;E[e]=parseFloat(E[e])+t+wa,E[1]=parseFloat(E[1])+t+wa,ho(E)}},wt.disable=function(e,r){if(!1!==e&&wt.revert(!0,!0),wt.enabled&&(wt.enabled=wt.isActive=!1,r||z&&z.pause(),B=0,i&&(i.uncache=1),Tt&&Pa(t,"refreshInit",Tt),I&&(I.pause(),n.tween&&n.tween.kill()&&(n.tween=0)),!mt)){for(var s=La.length;s--;)if(La[s].scroller===pt&&La[s]!==wt)return;Pa(pt,"resize",qa),mt||Pa(pt,"scroll",Wa)}},wt.kill=function(t,n){wt.disable(t,n),z&&!n&&z.kill(),G&&delete ja[G];var s=La.indexOf(wt);s>=0&&La.splice(s,1),s===ps&&so>0&&ps--,s=0,La.forEach(function(t){return t.scroller===wt.scroller&&(s=1)}),s||zs||(wt.scroll.rec=0),r&&(r.scrollTrigger=null,t&&r.revert({kill:!1}),n||r.kill()),c&&[c,h,f,d].forEach(function(t){return t.parentNode&&t.parentNode.removeChild(t)}),Ns===wt&&(Ns=0),J&&(i&&(i.uncache=1),s=0,La.forEach(function(t){return t.pin===J&&s++}),s||(i.spacer=0)),e.onKill&&e.onKill(wt)},La.push(wt),wt.enable(!1,!1),Y&&Y(wt),r&&r.add&&!m){var Dt=wt.update;wt.update=function(){wt.update=Dt,Pi.cache++,l||u||wt.refresh()},Ji.delayedCall(.01,wt.update),m=.01,l=u=0}else wt.refresh();J&&function(){if(Fs!==to){var t=Fs=to;requestAnimationFrame(function(){return t===to&&no(!0)})}}()}else this.update=this.refresh=this.kill=Vs},t.register=function(e){return ts||(Ji=e||Zs(),$s()&&window.document&&t.enable(),ts=Ys),ts},t.defaults=function(t){if(t)for(var e in t)za[e]=t[e];return za},t.disable=function(t,e){Ys=0,La.forEach(function(r){return r[e?"kill":"disable"](t)}),Pa(es,"wheel",Wa),Pa(rs,"scroll",Wa),clearInterval(cs),Pa(rs,"touchcancel",Vs),Pa(is,"touchstart",Vs),Ma(Pa,rs,"pointerdown,touchstart,mousedown",Hs),Ma(Pa,rs,"pointerup,touchend,mouseup",Us),as.kill(),ea(Pa);for(var r=0;r<Pi.length;r+=3)Ra(Pa,Pi[r],Pi[r+1]),Ra(Pa,Pi[r],Pi[r+2])},t.enable=function(){if(es=window,rs=document,ns=rs.documentElement,is=rs.body,Ji)if(os=Ji.utils.toArray,ls=Ji.utils.clamp,ks=Ji.core.context||Vs,ys=Ji.core.suppressOverwrites||Vs,Es=es.history.scrollRestoration||"auto",io=es.pageYOffset||0,Ji.core.globals("ScrollTrigger",t),is){Ys=1,(Ss=document.createElement("div")).style.height="100vh",Ss.style.position="absolute",eo(),qs(),Ki.register(Ji),t.isTouch=Ki.isTouch,Cs=Ki.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),ws=1===Ki.isTouch,Aa(es,"wheel",Wa),ss=[es,rs,ns,is],Ji.matchMedia?(t.matchMedia=function(t){var e,r=Ji.matchMedia();for(e in t)r.add(e,t[e]);return r},Ji.addEventListener("matchMediaInit",function(){Qa(),Ka()}),Ji.addEventListener("matchMediaRevert",function(){return Za()}),Ji.addEventListener("matchMedia",function(){no(0,1),Ga("matchMedia")}),Ji.matchMedia().add("(orientation: portrait)",function(){return Xa(),Xa})):console.warn("Requires GSAP 3.11.0 or later"),Xa(),Aa(rs,"scroll",Wa);var e,r,n=is.hasAttribute("style"),i=is.style,s=i.borderTopStyle,a=Ji.core.Animation.prototype;for(a.revert||Object.defineProperty(a,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",e=Ca(is),qi.m=Math.round(e.top+qi.sc())||0,Xi.m=Math.round(e.left+Xi.sc())||0,s?i.borderTopStyle=s:i.removeProperty("border-top-style"),n||(is.setAttribute("style",""),is.removeAttribute("style")),cs=setInterval(Ya,250),Ji.delayedCall(.5,function(){return Is=0}),Aa(rs,"touchcancel",Vs),Aa(is,"touchstart",Vs),Ma(Aa,rs,"pointerdown,touchstart,mousedown",Hs),Ma(Aa,rs,"pointerup,touchend,mouseup",Us),ds=Ji.utils.checkPrefix("transform"),lo.push(ds),ts=Bs(),as=Ji.delayedCall(.2,no).pause(),_s=[rs,"visibilitychange",function(){var t=es.innerWidth,e=es.innerHeight;rs.hidden?(gs=t,ms=e):gs===t&&ms===e||qa()},rs,"DOMContentLoaded",no,es,"load",no,es,"resize",qa],ea(Aa),La.forEach(function(t){return t.enable(0,1)}),r=0;r<Pi.length;r+=3)Ra(Pa,Pi[r],Pi[r+1]),Ra(Pa,Pi[r],Pi[r+2])}else if(rs){rs.addEventListener("DOMContentLoaded",function e(){t.enable(),rs.removeEventListener("DOMContentLoaded",e)})}},t.config=function(e){"limitCallbacks"in e&&(Rs=!!e.limitCallbacks);var r=e.syncInterval;r&&clearInterval(cs)||(cs=r)&&setInterval(Ya,r),"ignoreMobileResize"in e&&(ws=1===t.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(ea(Pa)||ea(Aa,e.autoRefreshEvents||"none"),xs=-1===(e.autoRefreshEvents+"").indexOf("resize"))},t.scrollerProxy=function(t,e){var r=Hi(t),n=Pi.indexOf(r),i=Qs(r);~n&&Pi.splice(n,i?6:2),e&&(i?Ri.unshift(es,e,is,e,ns,e):Ri.unshift(r,e))},t.clearMatchMedia=function(t){La.forEach(function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)})},t.isInViewport=function(t,e,r){var n=(ra(t)?Hi(t):t).getBoundingClientRect(),i=n[r?fa:da]*e||0;return r?n.right-i>0&&n.left+i<es.innerWidth:n.bottom-i>0&&n.top+i<es.innerHeight},t.positionInViewport=function(t,e,r){ra(t)&&(t=Hi(t));var n=t.getBoundingClientRect(),i=n[r?fa:da],s=null==e?i/2:e in Fa?Fa[e]*i:~e.indexOf("%")?parseFloat(e)*i/100:parseFloat(e)||0;return r?(n.left+s)/es.innerWidth:(n.top+s)/es.innerHeight},t.killAll=function(t){if(La.slice(0).forEach(function(t){return"ScrollSmoother"!==t.vars.id&&t.kill()}),!0!==t){var e=Ha.killAll||[];Ha={},e.forEach(function(t){return t()})}},t}();bo.version="3.15.0",bo.saveStyles=function(t){return t?os(t).forEach(function(t){if(t&&t.style){var e=$a.indexOf(t);e>=0&&$a.splice(e,5),$a.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),Ji.core.getCache(t),ks())}}):$a},bo.revert=function(t,e){return Ka(!t,e)},bo.create=function(t,e){return new bo(t,e)},bo.refresh=function(t){return t?qa(!0):(ts||bo.register())&&no(!0)},bo.update=function(t){return++Pi.cache&&ao(!0===t?2:0)},bo.clearScrollMemory=Ja,bo.maxScroll=function(t,e){return ta(t,e?Xi:qi)},bo.getScrollFunc=function(t,e){return Ui(Hi(t),e?Xi:qi)},bo.getById=function(t){return ja[t]},bo.getAll=function(){return La.filter(function(t){return"ScrollSmoother"!==t.vars.id})},bo.isScrolling=function(){return!!js},bo.snapDirectional=Sa,bo.addEventListener=function(t,e){var r=Ha[t]||(Ha[t]=[]);~r.indexOf(e)||r.push(e)},bo.removeEventListener=function(t,e){var r=Ha[t],n=r&&r.indexOf(e);n>=0&&r.splice(n,1)},bo.batch=function(t,e){var r,n=[],i={},s=e.interval||.016,a=e.batchMax||1e9,o=function(t,e){var r=[],n=[],i=Ji.delayedCall(s,function(){e(r,n),r=[],n=[]}).pause();return function(t){r.length||i.restart(!0),r.push(t.trigger),n.push(t),a<=r.length&&i.progress(1)}};for(r in e)i[r]="on"===r.substr(0,2)&&na(e[r])&&"onRefreshInit"!==r?o(0,e[r]):e[r];return na(a)&&(a=a(),Aa(bo,"refresh",function(){return a=e.batchMax()})),os(t).forEach(function(t){var e={};for(r in i)e[r]=i[r];e.trigger=t,n.push(bo.create(e))}),n};var wo,To=function(t,e,r,n){return e>n?t(n):e<0&&t(0),r>n?(n-e)/(r-e):r<0?e/(e-r):1},Oo=function t(e,r){!0===r?e.style.removeProperty("touch-action"):e.style.touchAction=!0===r?"auto":r?"pan-"+r+(Ki.isTouch?" pinch-zoom":""):"none",e===ns&&t(is,r)},Co={auto:1,scroll:1},ko=function(t){var e,r=t.event,n=t.target,i=t.axis,s=(r.changedTouches?r.changedTouches[0]:r).target,a=s._gsap||Ji.core.getCache(s),o=Bs();if(!a._isScrollT||o-a._isScrollT>2e3){for(;s&&s!==is&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!Co[(e=Ta(s)).overflowY]&&!Co[e.overflowX]);)s=s.parentNode;a._isScroll=s&&s!==n&&!Qs(s)&&(Co[(e=Ta(s)).overflowY]||Co[e.overflowX]),a._isScrollT=o}(a._isScroll||"x"===i)&&(r.stopPropagation(),r._gsapAllow=!0)},Eo=function(t,e,r,n){return Ki.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:n=n&&ko,onPress:n,onDrag:n,onScroll:n,onEnable:function(){return r&&Aa(rs,Ki.eventTypes[0],Mo,!1,!0)},onDisable:function(){return Pa(rs,Ki.eventTypes[0],Mo,!0)}})},So=/(input|label|select|textarea)/i,Mo=function(t){var e=So.test(t.target.tagName);(e||wo)&&(t._gsapAllow=!0,wo=e)},Ao=function(t){sa(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e,r,n,i,s,a,o,l,u=t,c=u.normalizeScrollX,h=u.momentum,f=u.allowNestedScroll,d=u.onRelease,p=Hi(t.target)||ns,g=Ji.core.globals().ScrollSmoother,m=g&&g.get(),_=Cs&&(t.content&&Hi(t.content)||m&&!1!==t.content&&!m.smooth()&&m.content()),v=Ui(p,qi),y=Ui(p,Xi),x=1,b=(Ki.isTouch&&es.visualViewport?es.visualViewport.scale*es.visualViewport.width:es.outerWidth)/es.innerWidth,w=0,T=na(h)?function(){return h(e)}:function(){return h||2.8},O=Eo(p,t.type,!0,f),C=function(){return i=!1},k=Vs,E=Vs,S=function(){r=ta(p,qi),E=ls(Cs?1:0,r),c&&(k=ls(0,ta(p,Xi))),n=to},M=function(){_._gsap.y=Gs(parseFloat(_._gsap.y)+v.offset)+"px",_.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(_._gsap.y)+", 0, 1)",v.offset=v.cacheID=0},A=function(){S(),s.isActive()&&s.vars.scrollY>r&&(v()>r?s.progress(1)&&v(r):s.resetTo("scrollY",r))};return _&&Ji.set(_,{y:"+=0"}),t.ignoreCheck=function(t){return Cs&&"touchmove"===t.type&&function(){if(i){requestAnimationFrame(C);var t=Gs(e.deltaY/2),r=E(v.v-t);if(_&&r!==v.v+v.offset){v.offset=r-v.v;var n=Gs((parseFloat(_&&_._gsap.y)||0)-v.offset);_.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+n+", 0, 1)",_._gsap.y=n+"px",v.cacheID=Pi.cache,ao()}return!0}v.offset&&M(),i=!0}()||x>1.05&&"touchstart"!==t.type||e.isGesturing||t.touches&&t.touches.length>1},t.onPress=function(){i=!1;var t=x;x=Gs((es.visualViewport&&es.visualViewport.scale||1)/b),s.pause(),t!==x&&Oo(p,x>1.01||!c&&"x"),a=y(),o=v(),S(),n=to},t.onRelease=t.onGestureStart=function(t,e){if(v.offset&&M(),e){Pi.cache++;var n,i,a=T();c&&(i=(n=y())+.05*a*-t.velocityX/.227,a*=To(y,n,i,ta(p,Xi)),s.vars.scrollX=k(i)),i=(n=v())+.05*a*-t.velocityY/.227,a*=To(v,n,i,ta(p,qi)),s.vars.scrollY=E(i),s.invalidate().duration(a).play(.01),(Cs&&s.vars.scrollY>=r||n>=r-1)&&Ji.to({},{onUpdate:A,duration:a})}else l.restart(!0);d&&d(t)},t.onWheel=function(){s._ts&&s.pause(),Bs()-w>1e3&&(n=0,w=Bs())},t.onChange=function(t,e,r,i,s){if(to!==n&&S(),e&&c&&y(k(i[2]===e?a+(t.startX-t.x):y()+e-i[1])),r){v.offset&&M();var l=s[2]===r,u=l?o+t.startY-t.y:v()+r-s[1],h=E(u);l&&u!==h&&(o+=h-u),v(h)}(r||e)&&ao()},t.onEnable=function(){Oo(p,!c&&"x"),bo.addEventListener("refresh",A),Aa(es,"resize",A),v.smooth&&(v.target.style.scrollBehavior="auto",v.smooth=y.smooth=!1),O.enable()},t.onDisable=function(){Oo(p,!0),Pa(es,"resize",A),bo.removeEventListener("refresh",A),O.kill()},t.lockAxis=!1!==t.lockAxis,(e=new Ki(t)).iOS=Cs,Cs&&!v()&&v(1),Cs&&Ji.ticker.add(Vs),l=e._dc,s=Ji.to(e,{ease:"power4",paused:!0,inherit:!1,scrollX:c?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:vo(v,v(),function(){return s.pause()})},onUpdate:ao,onComplete:l.vars.onComplete}),e};function Po({data:t,index:r}){return e("div",{className:""})}function Ro({scrollingElement:t,direction:l="normal",children:u=e("div",{children:"Nothing to Display, Please add some properly styled content"}),style:c,className:h,startAnimation:d="bottom",gsapScrollTrigger:p,scrollSpeed:g=1}){const m=n(),[_,v]=i(!1),[y,x]=i(0);return s(()=>{!function(){if(_)return;const t=function(){const t=m.current;if(!t)return;const e=t.children,r=e[0].getBoundingClientRect().width;let n=0;for(let t=0;t<e.length;t++)n+=e[t].getBoundingClientRect().width;return n-r}();t&&x(t),v(!0)}()},[]),a(()=>{const e=m.current;if(!e||!y)return;let r=di.context(()=>{var r,n;const i=t?document.querySelector(`${t}`):f(e,!0),s=null!==(r={normal:-y,reverse:y,backward:y}[l])&&void 0!==r?r:-y,a=null!==(n={top:"top top",within:`top ${(window.innerHeight-e.getBoundingClientRect().height)/2}px`,bottom:"bottom bottom"}[d])&&void 0!==n?n:d,o=di.quickTo(e,"x",{ease:"power3.out",duration:.2});bo.create(Object.assign({trigger:e,scroller:i,start:a,end:`+=${y/g}px`,pin:!0,scrub:!0,invalidateOnRefresh:!0,onUpdate:t=>{o(s*t.progress)}},p))},m);return()=>r.revert()},[y,l,d,g,t,p]),e("div",{ref:m,style:Object.assign({width:"100%",height:"auto",position:"relative",display:"flex",alignItems:"flex-start",justifyContent:""+("backward"==l?"flex-end":"flex-start"),flexDirection:""+("reverse"==l?"row-reverse":"row")},c),className:`${h} scroll_container`,children:r.Children.map(u,(t,r)=>e(o,{children:t},r))})}
|
|
37
37
|
/*!
|
|
38
38
|
* @gsap/react 2.1.2
|
|
39
39
|
* https://gsap.com
|
|
@@ -42,8 +42,7 @@ var Ji,ts,es,rs,ns,is,ss,as,os,ls,us,cs,hs,fs,ds,ps,gs,ms,_s,vs,ys,xs,bs,ws,Ts,O
|
|
|
42
42
|
* Subject to the terms at https://gsap.com/standard-license or for
|
|
43
43
|
* Club GSAP members, the agreement issued with that membership.
|
|
44
44
|
* @author: Jack Doyle, jack@greensock.com
|
|
45
|
-
*/
|
|
46
|
-
let zo="undefined"!=typeof document?a:s,Fo=t=>t&&!Array.isArray(t)&&"object"==typeof t,No=[],Io={},Bo=di;const Lo=(t,e=No)=>{let r=Io;Fo(t)?(r=t,t=null,e="dependencies"in r?r.dependencies:No):Fo(e)&&(r=e,e="dependencies"in r?r.dependencies:No),t&&"function"!=typeof t&&console.warn("First parameter must be a function or config object");const{scope:i,revertOnUpdate:s}=r,a=n(!1),o=n(Bo.context(()=>{},i)),l=n(t=>o.current.add(null,t)),u=e&&e.length&&!s;return u&&zo(()=>(a.current=!0,()=>o.current.revert()),No),zo(()=>{if(t&&o.current.add(t,i),!u||!a.current)return()=>o.current.revert()},e),{context:o.current,contextSafe:l.current}};Lo.register=t=>{Bo=t},Lo.headless=!0;
|
|
45
|
+
*/bo.sort=function(t){if(na(t))return La.sort(t);var e=es.pageYOffset||0;return bo.getAll().forEach(function(t){return t._sortY=t.trigger?e+t.trigger.getBoundingClientRect().top:t.start+es.innerHeight}),La.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+(t.vars.containerAnimation?1e6:t._sortY)-((e.vars.containerAnimation?1e6:e._sortY)+-1e6*(e.vars.refreshPriority||0))})},bo.observe=function(t){return new Ki(t)},bo.normalizeScroll=function(t){if(void 0===t)return bs;if(!0===t&&bs)return bs.enable();if(!1===t)return bs&&bs.kill(),void(bs=t);var e=t instanceof Ki?t:Ao(t);return bs&&bs.target===e.target&&bs.kill(),Qs(e.target)&&(bs=e),e},bo.core={_getVelocityProp:Vi,_inputObserver:Eo,_scrollers:Pi,_proxies:Ri,bridge:{ss:function(){js||Ga("scrollStart"),js=Bs()},ref:function(){return hs}}},Zs()&&Ji.registerPlugin(bo),di.registerPlugin(bo),di.registerPlugin(bo);let Do="undefined"!=typeof document?a:s,zo=t=>t&&!Array.isArray(t)&&"object"==typeof t,Fo=[],No={},Io=di;const Bo=(t,e=Fo)=>{let r=No;zo(t)?(r=t,t=null,e="dependencies"in r?r.dependencies:Fo):zo(e)&&(r=e,e="dependencies"in r?r.dependencies:Fo),t&&"function"!=typeof t&&console.warn("First parameter must be a function or config object");const{scope:i,revertOnUpdate:s}=r,a=n(!1),o=n(Io.context(()=>{},i)),l=n(t=>o.current.add(null,t)),u=e&&e.length&&!s;return u&&Do(()=>(a.current=!0,()=>o.current.revert()),Fo),Do(()=>{if(t&&o.current.add(t,i),!u||!a.current)return()=>o.current.revert()},e),{context:o.current,contextSafe:l.current}};Bo.register=t=>{Io=t},Bo.headless=!0;
|
|
47
46
|
/*!
|
|
48
47
|
* SplitText 3.15.0
|
|
49
48
|
* https://gsap.com
|
|
@@ -51,5 +50,5 @@ let zo="undefined"!=typeof document?a:s,Fo=t=>t&&!Array.isArray(t)&&"object"==ty
|
|
|
51
50
|
* @license Copyright 2026, GreenSock. All rights reserved. Subject to the terms at https://gsap.com/standard-license.
|
|
52
51
|
* @author: Jack Doyle
|
|
53
52
|
*/
|
|
54
|
-
let jo,Yo,Wo,Xo="function"==typeof Symbol?Symbol():"_split",qo="undefined"!=typeof Intl&&"Segmenter"in Intl?new Intl.Segmenter:0,Ho=t=>t?"string"==typeof t?Ho(document.querySelectorAll(t)):"length"in t?Array.from(t).reduce((t,e)=>("string"==typeof e?t.push(...Ho(e)):t.push(e),t),[]):[t]:[],Uo=t=>Ho(t).filter(t=>t&&1===t.nodeType),Vo=[],Go=function(){},$o={add:t=>t()},Zo=/\s+/g,Qo=new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.","gu"),Ko={left:0,top:0,width:0,height:0},Jo=(t,e)=>{for(;++e<t.length&&t[e]===Ko;);return t[e]||Ko},tl=({element:t,html:e,ariaL:r,ariaH:n})=>{t.innerHTML=e,r?t.setAttribute("aria-label",r):t.removeAttribute("aria-label"),n?t.setAttribute("aria-hidden",n):t.removeAttribute("aria-hidden")},el=(t,e)=>{if(e){let r,n,i,s,a=new Set(t.join("").match(e)||Vo),o=t.length;if(a.size)for(;--o>-1;)for(i of(n=t[o],a))if(i.startsWith(n)&&i.length>n.length){for(r=0,s=n;i.startsWith(s+=t[o+ ++r])&&s.length<i.length;);if(r&&s.length===i.length){t[o]=i,t.splice(o+1,r);break}}}return t},rl=t=>"inline"===window.getComputedStyle(t).display&&(t.style.display="inline-block"),nl=(t,e,r)=>e.insertBefore("string"==typeof t?document.createTextNode(t):t,r),il=(t,e,r)=>{let n=e[t+"sClass"]||"",{tag:i="div",aria:s="auto",propIndex:a=!1}=e,o="line"===t?"block":"inline-block",l=n.indexOf("++")>-1,u=e=>{let u=document.createElement(i),c=r.length+1;return n&&(u.className=n+(l?" "+n+c:"")),a&&u.style.setProperty("--"+t,c+""),"none"!==s&&u.setAttribute("aria-hidden","true"),"span"!==i&&(u.style.position="relative",u.style.display=o),u.textContent=e,r.push(u),u};return l&&(n=n.replace("++","")),u.collection=r,u},sl=(t,e,r,n,i,s,a,o,l,u)=>{var c;let h,f,d,p,g,m,_,v,y,x,b,w,T,O,C,k,E,S,M=Array.from(t.childNodes),A=0,{wordDelimiter:P,reduceWhiteSpace:R=!0,prepareText:D}=e,z=t.getBoundingClientRect(),F=z,N=!R&&"pre"===window.getComputedStyle(t).whiteSpace.substring(0,3),I=0,B=r.collection;for("object"==typeof P?(d=P.delimiter||P,f=P.replaceWith||""):f=""===P?"":P||" ",h=" "!==f;A<M.length;A++)if(p=M[A],3===p.nodeType){for(C=p.textContent||"",R?C=C.replace(Zo," "):N&&(C=C.replace(/\n/g,f+"\n")),D&&(C=D(C,t)),p.textContent=C,g=f||d?C.split(d||f):C.match(o)||Vo,E=g[g.length-1],v=h?" "===E.slice(-1):!E,E||g.pop(),F=z,_=h?" "===g[0].charAt(0):!g[0],_&&nl(" ",t,p),g[0]||g.shift(),el(g,l),s&&u||(p.textContent=""),y=1;y<=g.length;y++)if(k=g[y-1],!R&&N&&"\n"===k.charAt(0)&&(null==(c=p.previousSibling)||c.remove(),nl(document.createElement("br"),t,p),k=k.slice(1)),R||""!==k)if(" "===k)t.insertBefore(document.createTextNode(" "),p);else{if(h&&" "===k.charAt(0)&&nl(" ",t,p),I&&1===y&&!_&&B.indexOf(I.parentNode)>-1?(m=B[B.length-1],m.appendChild(document.createTextNode(n?"":k))):(m=r(n?"":k),nl(m,t,p),I&&1===y&&!_&&m.insertBefore(I,m.firstChild)),n)for(b=qo?el([...qo.segment(k)].map(t=>t.segment),l):k.match(o)||Vo,S=0;S<b.length;S++)m.appendChild(" "===b[S]?document.createTextNode(" "):n(b[S]));if(s&&u){if(C=p.textContent=C.substring(k.length+1,C.length),x=m.getBoundingClientRect(),x.top>F.top&&x.left<=F.left){for(w=t.cloneNode(),T=t.childNodes[0];T&&T!==m;)O=T,T=T.nextSibling,w.appendChild(O);t.parentNode.insertBefore(w,t),i&&rl(w)}F=x}(y<g.length||v)&&nl(y>=g.length?" ":h&&" "===k.slice(-1)?" "+f:f,t,p)}else nl(f,t,p);t.removeChild(p),I=0}else 1===p.nodeType&&(a&&a.indexOf(p)>-1?(B.indexOf(p.previousSibling)>-1&&B[B.length-1].appendChild(p),I=p):(sl(p,e,r,n,i,s,a,o,l,!0),I=0),i&&rl(p))};const al=class t{constructor(t,e){this.isSplit=!1,Wo||ol.register(window.gsap),this.elements=Uo(t),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=e,this.elements.forEach(t=>{var r;!1!==e.overwrite&&(null==(r=t[Xo])||r._data.orig.filter(({element:e})=>e===t).forEach(tl)),t[Xo]=this}),this._split=()=>this.isSplit&&this.split(this.vars);let r,n=[],i=()=>{let t,e=n.length;for(;e--;){t=n[e];let r=t.element.offsetWidth;if(r!==t.width)return t.width=r,void this._split()}};this._data={orig:n,obs:"undefined"!=typeof ResizeObserver&&new ResizeObserver(()=>{clearTimeout(r),r=setTimeout(i,200)})},Go(this),this.split(e)}split(t){return(this._ctx||$o).add(()=>{this.isSplit&&this.revert(),this.vars=t=t||this.vars||{};let e,{type:r="chars,words,lines",aria:n="auto",deepSlice:i=!0,smartWrap:s,onSplit:a,autoSplit:o=!1,specialChars:l,mask:u}=this.vars,c=r.indexOf("lines")>-1,h=r.indexOf("chars")>-1,f=r.indexOf("words")>-1,d=h&&!f&&!c,p=l&&("push"in l?new RegExp("(?:"+l.join("|")+")","gu"):l),g=p?new RegExp(p.source+"|"+Qo.source,"gu"):Qo,m=!!t.ignore&&Uo(t.ignore),{orig:_,animTime:v,obs:y}=this._data;(h||f||c)&&(this.elements.forEach((e,r)=>{_[r]={element:e,html:e.innerHTML,ariaL:e.getAttribute("aria-label"),ariaH:e.getAttribute("aria-hidden")},"auto"===n?e.setAttribute("aria-label",(e.textContent||"").trim()):"hidden"===n&&e.setAttribute("aria-hidden","true");let a,o,l,u,v=[],y=[],x=[],b=h?il("char",t,v):null,w=il("word",t,y);if(sl(e,t,w,b,d,i&&(c||d),m,g,p,!1),c){let r,n,i=Ho(e.childNodes),s=((t,e,r,n)=>{let i=il("line",r,n),s=window.getComputedStyle(t).textAlign||"left";return(r,n)=>{let a=i("");for(a.style.textAlign=s,t.insertBefore(a,e[r]);r<n;r++)a.appendChild(e[r]);a.normalize()}})(e,i,t,x),o=[],l=0,u=i.map(t=>1===t.nodeType?t.getBoundingClientRect():Ko),c=Ko;for(a=0;a<i.length;a++)r=i[a],1===r.nodeType&&("BR"===r.nodeName?(a&&"BR"===i[a-1].nodeName||(o.push(r),s(l,a+1)),l=a+1,c=Jo(u,a)):(n=u[a],a&&n.top>c.top&&n.left<c.left+c.width-1&&(s(l,a),l=a),c=n));l<a&&s(l,a),o.forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)})}if(!f){for(a=0;a<y.length;a++)if(o=y[a],h||!o.nextSibling||3!==o.nextSibling.nodeType)if(s&&!c){for(l=document.createElement("span"),l.style.whiteSpace="nowrap";o.firstChild;)l.appendChild(o.firstChild);o.replaceWith(l)}else o.replaceWith(...o.childNodes);else u=o.nextSibling,u&&3===u.nodeType&&(u.textContent=(o.textContent||"")+(u.textContent||""),o.remove());y.length=0,e.normalize()}this.lines.push(...x),this.words.push(...y),this.chars.push(...v)}),u&&this[u]&&this.masks.push(...this[u].map(t=>{let e=t.cloneNode();return t.replaceWith(e),e.appendChild(t),t.className&&(e.className=t.className.trim().split(" ").map(t=>t+"-mask").join(" ")),e.style.overflow="clip",e}))),this.isSplit=!0,Yo&&c&&o&&Yo.addEventListener("loadingdone",this._split),(e=a&&a(this))&&e.totalTime&&(this._data.anim=v?e.totalTime(v):e),c&&o&&this.elements.forEach((t,e)=>{_[e].width=t.offsetWidth,y&&y.observe(t)})}),this}kill(){let{obs:t}=this._data;t&&t.disconnect(),null==Yo||Yo.removeEventListener("loadingdone",this._split)}revert(){var t,e;if(this.isSplit){let{orig:r,anim:n}=this._data;this.kill(),r.forEach(tl),this.chars.length=this.words.length=this.lines.length=r.length=this.masks.length=0,this.isSplit=!1,n&&(this._data.animTime=n.totalTime(),n.revert()),null==(e=(t=this.vars).onRevert)||e.call(t,this)}return this}static create(e,r){return new t(e,r)}static register(t){jo=jo||t||window.gsap,jo&&(Ho=jo.utils.toArray,Go=jo.core.context||Go),!Wo&&window.innerWidth>0&&(Yo=document.fonts,Wo=!0)}};al.version="3.15.0";let ol=al;di.registerPlugin(ol,bo);const ll={Z_Text:function(t){const{text:a,scrollingElement:o,progression:l="char",animation:u="Fade",trigger:c,controllerRef:h=null,style:m,className:_,children:v,delay:y=0,timeline:x,speed:b,gsapScrollTrigger:w,extendAnimation:T,watch:O=!1}=t,C=n(null),[k,E]=i(!1),[S,M]=i(0),A="onscroll"===c,P="inview"===c,R=A||P,D=null!=x?x:di.timeline({paused:R,delay:y});return h&&(h.current=D),s(()=>function(){if(!O)return;const t="string"==typeof O?document.querySelector(O):window;if(!t)return;const e=()=>M(t=>t+1);return t.addEventListener("resize",e),()=>{t.removeEventListener("resize",e)}}(),[O]),s(()=>{let t=!0;return function(){Do(this,void 0,void 0,function*(){yield document.fonts.ready,t&&E(!0)})}(),()=>t=!1},[]),Lo(function(){if("none"===c)return;const t=C.current;if(!t||!k)return;const e=di.context(()=>{var e;const r=o?document.querySelector(`${o}`):f(t,!0),n=ol.create(t,{type:"lines,words,chars",autoSplit:!0,linesClass:"line",wordsClass:"word",charsClass:"char"}),{chars:i,words:s,lines:a}=n,c=p(l,i,s,a,b,A),h=null!==(e=g[u])&&void 0!==e?e:g.Fade,m=Object.assign(Object.assign({},d(h,"from")),d(T,"from")),_=Object.assign(Object.assign({},d(h,"to")),d(T,"to"));D.set(c.set,m);"char_line"===l||"word_line"===l?c.animate.forEach(t=>{D.to(t.char,_,t.charIndexInLine*c.speed)}):D.to(c.animate,Object.assign(Object.assign({},_),{stagger:c.speed}),0);const v="function"==typeof w?w(D)||{}:w||{};A?bo.create(Object.assign({trigger:t,scroller:r,start:"top 85%",end:"top 35%",scrub:!0,animation:D},v)):P&&bo.create(Object.assign({trigger:t,scroller:r,start:"top bottom",animation:D,onEnter:()=>D.restart(),onLeaveBack:()=>D.pause()},v))},C);return()=>e.revert()},{scope:C,dependencies:[k,S,c]}),r.isValidElement(v)?r.cloneElement(v,{ref:C,style:Object.assign(Object.assign({visibility:k?"visible":"hidden"},m),v.props.style),className:["fade_textation_x",v.props.className,_].filter(Boolean).join(" ")}):e("p",{className:`fade_textation_x ${_}`,style:Object.assign({visibility:k?"visible":"hidden"},m),ref:C,children:a})},VerticalScroll:Ro,Overlay_Text:function(o){const{text:p,children:g,textClass:m,textStyle:_,layerStyle:v,layerClass:y,containerStyle:x,containerClass:b,scrollingElement:w,trigger:T,timeline:O,stagger:C=.2,duration:k=1.5,layers:E=1,layerColor:S="white",RenderLayer:M=Po,animationOrder:A="normal",animation:P="VerticalReveal",animationDimension:R="y",extendAnimation:D,gsapScrollTrigger:z,controllerRef:F=null,useOpacity:N,animationDirection:I=0}=o,B=n(null),L=n(null),j=l(E),[Y,W]=i({eachWidth:"100%",lastWidth:"100%"}),[X,q]=i({eachWidth:"100%",lastWidth:"100%"}),H=O||di.timeline({});F&&(F.current=H);const U=u[P],{defaultGsap:V,animation_origins:G,animationStyles:$}=U;return s(()=>{if("y"==R){const{eachWidth:t,lastWidth:e}=c(L,j.length,"width");W({eachWidth:t,lastWidth:e})}else{const{eachWidth:t,lastWidth:e}=c(L,j.length,"height");q({eachWidth:t,lastWidth:e})}},[]),a(()=>function(){if("none"==T)return;const t=L.current;if(!t)return;const e=[...t.children],r="reverse"===A?[...e].reverse():"random"===A?h(e):e,n=di.context(()=>{const e=w?document.querySelector(`${w}`):f(t,!0);H.set(r,Object.assign(Object.assign({opacity:1},d(V,"from")),d(D,"from"))),H.to(r,Object.assign(Object.assign(Object.assign({opacity:N?0:1,stagger:C},d(V,"to")),{duration:k}),d(D,"to")));const n="function"==typeof z?z(H)||{}:z||{};"onscroll"===T&&bo.create(Object.assign({trigger:r,start:"top 65%",end:"top 30%",animation:H,scrub:!0,scroller:e},n)),"inview"===T&&bo.create(Object.assign({trigger:r,start:"top bottom",onEnter:()=>H.restart(),onLeaveBack:()=>H.pause(),animation:H,scroller:e},n))},e);return()=>{n.revert()}}(),[P,A,w,D,z,C,I,u,H,T]),t("div",{style:Object.assign({width:"auto",height:"auto",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",position:"relative"},x),className:`overlay_text_container ${b}`,children:[p?e("p",{ref:B,className:`text-parentz ${m}`,style:Object.assign({},_),children:p}):r.cloneElement(g,{ref:B,style:Object.assign(Object.assign({},g.props.style),_),className:[g.props.className,"text-parentz",m].filter(Boolean).join(" ")}),e("div",{ref:L,className:"text_overlay_container",style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,display:"flex",flexDirection:"y"==R?"row":"column",justifyContent:"flex-start",alignItems:"flex-start"},children:j.map((t,r)=>{const n=j.length-1===r,{eachWidth:i,lastWidth:s}=Y,a=X.eachWidth,o=X.lastWidth;return e("div",{className:`each-overlay-block ${y}`,style:Object.assign(Object.assign({height:"y"==R?"100%":n?o:a,width:"x"==R?"100%":n?s:i,willChange:"transform",background:S,transformOrigin:"number"==typeof I?G[I]||"center":I,display:"flex",justifyContent:"center",alignItems:"center"},$),v),children:e(M,{data:t,index:r})},r)})})]})}};function ul(t){const{text:a,scrollingElement:o,progression:l="char",style:u,className:c,children:h,playOnScroll:f=!1,playInView:d=!1,delay:p=0,timeline:g,speed:m,gsapScrollTrigger:_,defaultAnimation:v,extendAnimation:y,watch:x=!1}=t,b=n(null),[w,T]=i(0),[O,C]=i(!1);return s(()=>{!function(){if(!x)return;("string"==typeof x?document.querySelector(x):window).addEventListener("resize",()=>{T(t=>t+1)})}()},[]),s(()=>{if("loaded"===document.fonts.status)C(!0);else{function t(){return Do(this,void 0,void 0,function*(){yield document.fonts.ready.then(()=>{C(!0)}).catch(()=>{C(!0)})})}t()}},[]),Lo(function(){const t=b.current;if(!t||!O)return;const e=o?document.querySelector(`${o}`):function(t){let e=document.querySelector(t);for(;e;){const{overflowY:t}=getComputedStyle(e);if(("auto"===t||"scroll"===t)&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.scrollingElement}(".fade_textation_x"),r=ol.create(t,{type:"lines,words,chars",linesClass:"line",wordsClass:"word",charsClass:"char",autoSplit:!0}),{chars:n,lines:i,words:s}=r,a=function(){let t=n;if("char_line"===l){const e=i.flatMap(t=>{const e=n.filter(e=>t.contains(e));return e.map((t,e)=>({char:t,charIndexInLine:e}))});t=e}else if("word_line"===l){const e=i.flatMap((t,e)=>{const r=s.filter(e=>t.contains(e));return r.map((t,e)=>({char:t,charIndexInLine:e}))});t=e}else t="char"==l?n:"word"==l?s:"line"==l?i:n;return{set:"char"==l?n:"word"==l?s:"line"==l?i:"char_line"==l?n:"word_line"==l?s:n,animate:t,speed_0:m||("char"==l?f?.005:.1:"word"==l?.35:"line"==l?.9:"char_line"==l?.08:"word_line"==l?.5:.08)}}();function u(t,e){const r="object"==typeof t?t:{},n=Object.entries(r).map(t=>{const[e,r]=t;return{key:e,val:r}}),i={};for(let t=0;t<n.length;t++){const r=n[t].key,s=n[t].val,a="from"==e?s[0]:"to"==e?s[1]:"";null!==a&&(i[r]=a)}return i}const c=!(!f&&!d),h=g||di.timeline({paused:c,delay:p});h.set(a.set,Object.assign(Object.assign({opacity:0},u(v,"from")),u(y,"from")));const x=function(){if("object"==typeof _)return _;if("function"==typeof _)return _(h)||{};return{}}();return(t=>{t&&a.animate.forEach((e,r)=>{let n="char_line"===l||"word_line"===l,i=n?e.char:e;const s=n?e.charIndexInLine:r;t.to(i,Object.assign(Object.assign({opacity:1,ease:"power3.out"},u(v,"to")),u(y,"to")),s*a.speed_0)})})(h),f?bo.create(Object.assign({trigger:t,scroller:e,start:"top 85%",end:"top 35%",scrub:f,animation:h},x)):d&&bo.create(Object.assign({trigger:t,scroller:e,start:"top bottom",onEnter:()=>h.restart(),onLeaveBack:()=>h.pause()},x)),()=>{r.revert(),h.kill(),bo.getAll().forEach(e=>{e.trigger===t&&e.kill()})}},{dependencies:[O,w],scope:b}),r.isValidElement(h)?r.cloneElement(h,{ref:b,style:Object.assign(Object.assign({visibility:O?"visible":"hidden"},u),h.props.style),className:["fade_textation_x",h.props.className,c].filter(Boolean).join(" ")}):e("p",{className:`fade_textation_x ${c}`,style:Object.assign({visibility:O?"visible":"hidden"},u),ref:b,children:a})}di.registerPlugin(ol,bo);const cl={TextEngine:ul,TextFade:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1]}},t))},TextFadeSkew:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1],x:[100,0],skewX:[100,0]}},t))},TextFadeSkew_2:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1],x:[100,0],y:[100,0],skewX:[-100,0]}},t))},TextFadeDown:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1],y:["100%","0%"],duration:[null,1],stagger:[null,.1]}},t))},TextFadeOverlay:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[.2,1]}},t))},VerticalScroll:Ro};function hl({name:t}){console.log("Hey!!! Hello ",t,". Package is updated!!!")}const{TextEngine:fl,TextFade:dl,TextFadeDown:pl,TextFadeSkew:gl,TextFadeSkew_2:ml,TextFadeOverlay:_l}=cl,{Z_Text:vl,VerticalScroll:yl,Overlay_Text:xl}=ll;export{xl as Overlay_Text,fl as TextEngine,dl as TextFade,pl as TextFadeDown,_l as TextFadeOverlay,gl as TextFadeSkew,ml as TextFadeSkew_2,yl as VerticalScroll,vl as Z_Text,hl as justSayHello};
|
|
53
|
+
let Lo,jo,Yo,Wo="function"==typeof Symbol?Symbol():"_split",Xo="undefined"!=typeof Intl&&"Segmenter"in Intl?new Intl.Segmenter:0,qo=t=>t?"string"==typeof t?qo(document.querySelectorAll(t)):"length"in t?Array.from(t).reduce((t,e)=>("string"==typeof e?t.push(...qo(e)):t.push(e),t),[]):[t]:[],Ho=t=>qo(t).filter(t=>t&&1===t.nodeType),Uo=[],Vo=function(){},Go={add:t=>t()},$o=/\s+/g,Zo=new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.","gu"),Qo={left:0,top:0,width:0,height:0},Ko=(t,e)=>{for(;++e<t.length&&t[e]===Qo;);return t[e]||Qo},Jo=({element:t,html:e,ariaL:r,ariaH:n})=>{t.innerHTML=e,r?t.setAttribute("aria-label",r):t.removeAttribute("aria-label"),n?t.setAttribute("aria-hidden",n):t.removeAttribute("aria-hidden")},tl=(t,e)=>{if(e){let r,n,i,s,a=new Set(t.join("").match(e)||Uo),o=t.length;if(a.size)for(;--o>-1;)for(i of(n=t[o],a))if(i.startsWith(n)&&i.length>n.length){for(r=0,s=n;i.startsWith(s+=t[o+ ++r])&&s.length<i.length;);if(r&&s.length===i.length){t[o]=i,t.splice(o+1,r);break}}}return t},el=t=>"inline"===window.getComputedStyle(t).display&&(t.style.display="inline-block"),rl=(t,e,r)=>e.insertBefore("string"==typeof t?document.createTextNode(t):t,r),nl=(t,e,r)=>{let n=e[t+"sClass"]||"",{tag:i="div",aria:s="auto",propIndex:a=!1}=e,o="line"===t?"block":"inline-block",l=n.indexOf("++")>-1,u=e=>{let u=document.createElement(i),c=r.length+1;return n&&(u.className=n+(l?" "+n+c:"")),a&&u.style.setProperty("--"+t,c+""),"none"!==s&&u.setAttribute("aria-hidden","true"),"span"!==i&&(u.style.position="relative",u.style.display=o),u.textContent=e,r.push(u),u};return l&&(n=n.replace("++","")),u.collection=r,u},il=(t,e,r,n,i,s,a,o,l,u)=>{var c;let h,f,d,p,g,m,_,v,y,x,b,w,T,O,C,k,E,S,M=Array.from(t.childNodes),A=0,{wordDelimiter:P,reduceWhiteSpace:R=!0,prepareText:D}=e,z=t.getBoundingClientRect(),F=z,N=!R&&"pre"===window.getComputedStyle(t).whiteSpace.substring(0,3),I=0,B=r.collection;for("object"==typeof P?(d=P.delimiter||P,f=P.replaceWith||""):f=""===P?"":P||" ",h=" "!==f;A<M.length;A++)if(p=M[A],3===p.nodeType){for(C=p.textContent||"",R?C=C.replace($o," "):N&&(C=C.replace(/\n/g,f+"\n")),D&&(C=D(C,t)),p.textContent=C,g=f||d?C.split(d||f):C.match(o)||Uo,E=g[g.length-1],v=h?" "===E.slice(-1):!E,E||g.pop(),F=z,_=h?" "===g[0].charAt(0):!g[0],_&&rl(" ",t,p),g[0]||g.shift(),tl(g,l),s&&u||(p.textContent=""),y=1;y<=g.length;y++)if(k=g[y-1],!R&&N&&"\n"===k.charAt(0)&&(null==(c=p.previousSibling)||c.remove(),rl(document.createElement("br"),t,p),k=k.slice(1)),R||""!==k)if(" "===k)t.insertBefore(document.createTextNode(" "),p);else{if(h&&" "===k.charAt(0)&&rl(" ",t,p),I&&1===y&&!_&&B.indexOf(I.parentNode)>-1?(m=B[B.length-1],m.appendChild(document.createTextNode(n?"":k))):(m=r(n?"":k),rl(m,t,p),I&&1===y&&!_&&m.insertBefore(I,m.firstChild)),n)for(b=Xo?tl([...Xo.segment(k)].map(t=>t.segment),l):k.match(o)||Uo,S=0;S<b.length;S++)m.appendChild(" "===b[S]?document.createTextNode(" "):n(b[S]));if(s&&u){if(C=p.textContent=C.substring(k.length+1,C.length),x=m.getBoundingClientRect(),x.top>F.top&&x.left<=F.left){for(w=t.cloneNode(),T=t.childNodes[0];T&&T!==m;)O=T,T=T.nextSibling,w.appendChild(O);t.parentNode.insertBefore(w,t),i&&el(w)}F=x}(y<g.length||v)&&rl(y>=g.length?" ":h&&" "===k.slice(-1)?" "+f:f,t,p)}else rl(f,t,p);t.removeChild(p),I=0}else 1===p.nodeType&&(a&&a.indexOf(p)>-1?(B.indexOf(p.previousSibling)>-1&&B[B.length-1].appendChild(p),I=p):(il(p,e,r,n,i,s,a,o,l,!0),I=0),i&&el(p))};const sl=class t{constructor(t,e){this.isSplit=!1,Yo||al.register(window.gsap),this.elements=Ho(t),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=e,this.elements.forEach(t=>{var r;!1!==e.overwrite&&(null==(r=t[Wo])||r._data.orig.filter(({element:e})=>e===t).forEach(Jo)),t[Wo]=this}),this._split=()=>this.isSplit&&this.split(this.vars);let r,n=[],i=()=>{let t,e=n.length;for(;e--;){t=n[e];let r=t.element.offsetWidth;if(r!==t.width)return t.width=r,void this._split()}};this._data={orig:n,obs:"undefined"!=typeof ResizeObserver&&new ResizeObserver(()=>{clearTimeout(r),r=setTimeout(i,200)})},Vo(this),this.split(e)}split(t){return(this._ctx||Go).add(()=>{this.isSplit&&this.revert(),this.vars=t=t||this.vars||{};let e,{type:r="chars,words,lines",aria:n="auto",deepSlice:i=!0,smartWrap:s,onSplit:a,autoSplit:o=!1,specialChars:l,mask:u}=this.vars,c=r.indexOf("lines")>-1,h=r.indexOf("chars")>-1,f=r.indexOf("words")>-1,d=h&&!f&&!c,p=l&&("push"in l?new RegExp("(?:"+l.join("|")+")","gu"):l),g=p?new RegExp(p.source+"|"+Zo.source,"gu"):Zo,m=!!t.ignore&&Ho(t.ignore),{orig:_,animTime:v,obs:y}=this._data;(h||f||c)&&(this.elements.forEach((e,r)=>{_[r]={element:e,html:e.innerHTML,ariaL:e.getAttribute("aria-label"),ariaH:e.getAttribute("aria-hidden")},"auto"===n?e.setAttribute("aria-label",(e.textContent||"").trim()):"hidden"===n&&e.setAttribute("aria-hidden","true");let a,o,l,u,v=[],y=[],x=[],b=h?nl("char",t,v):null,w=nl("word",t,y);if(il(e,t,w,b,d,i&&(c||d),m,g,p,!1),c){let r,n,i=qo(e.childNodes),s=((t,e,r,n)=>{let i=nl("line",r,n),s=window.getComputedStyle(t).textAlign||"left";return(r,n)=>{let a=i("");for(a.style.textAlign=s,t.insertBefore(a,e[r]);r<n;r++)a.appendChild(e[r]);a.normalize()}})(e,i,t,x),o=[],l=0,u=i.map(t=>1===t.nodeType?t.getBoundingClientRect():Qo),c=Qo;for(a=0;a<i.length;a++)r=i[a],1===r.nodeType&&("BR"===r.nodeName?(a&&"BR"===i[a-1].nodeName||(o.push(r),s(l,a+1)),l=a+1,c=Ko(u,a)):(n=u[a],a&&n.top>c.top&&n.left<c.left+c.width-1&&(s(l,a),l=a),c=n));l<a&&s(l,a),o.forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)})}if(!f){for(a=0;a<y.length;a++)if(o=y[a],h||!o.nextSibling||3!==o.nextSibling.nodeType)if(s&&!c){for(l=document.createElement("span"),l.style.whiteSpace="nowrap";o.firstChild;)l.appendChild(o.firstChild);o.replaceWith(l)}else o.replaceWith(...o.childNodes);else u=o.nextSibling,u&&3===u.nodeType&&(u.textContent=(o.textContent||"")+(u.textContent||""),o.remove());y.length=0,e.normalize()}this.lines.push(...x),this.words.push(...y),this.chars.push(...v)}),u&&this[u]&&this.masks.push(...this[u].map(t=>{let e=t.cloneNode();return t.replaceWith(e),e.appendChild(t),t.className&&(e.className=t.className.trim().split(" ").map(t=>t+"-mask").join(" ")),e.style.overflow="clip",e}))),this.isSplit=!0,jo&&c&&o&&jo.addEventListener("loadingdone",this._split),(e=a&&a(this))&&e.totalTime&&(this._data.anim=v?e.totalTime(v):e),c&&o&&this.elements.forEach((t,e)=>{_[e].width=t.offsetWidth,y&&y.observe(t)})}),this}kill(){let{obs:t}=this._data;t&&t.disconnect(),null==jo||jo.removeEventListener("loadingdone",this._split)}revert(){var t,e;if(this.isSplit){let{orig:r,anim:n}=this._data;this.kill(),r.forEach(Jo),this.chars.length=this.words.length=this.lines.length=r.length=this.masks.length=0,this.isSplit=!1,n&&(this._data.animTime=n.totalTime(),n.revert()),null==(e=(t=this.vars).onRevert)||e.call(t,this)}return this}static create(e,r){return new t(e,r)}static register(t){Lo=Lo||t||window.gsap,Lo&&(qo=Lo.utils.toArray,Vo=Lo.core.context||Vo),!Yo&&window.innerWidth>0&&(jo=document.fonts,Yo=!0)}};sl.version="3.15.0";let al=sl;di.registerPlugin(al,bo);const ol={Z_Text:function(t){var a;const{text:o,scrollingElement:l,progression:u="char",animation:c,trigger:h,controllerRef:m=null,style:_,className:v,children:y,delay:x=0,timeline:b,speed:w,gsapScrollTrigger:T,extendAnimation:O,watch:C=!1}=t,k=n(null),[E,S]=i(0),M="onscroll"===h,A="inview"===h,P=M||A,R=null!=b?b:di.timeline({paused:P,delay:x}),D=null!==(a=p[c])&&void 0!==a?a:p.Fade;return m&&(m.current=R),s(()=>function(){if(!C)return;const t="string"==typeof C?document.querySelector(C):window;if(!t)return;const e=()=>S(t=>t+1);return t.addEventListener("resize",e),()=>{t.removeEventListener("resize",e)}}(),[C]),Bo(function(){if("none"===h)return;const t=k.current;if(!t)return;const e=di.context(()=>{const e=l?document.querySelector(`${l}`):f(t,!0),r=al.create(t,{type:"lines,words,chars",autoSplit:!0,linesClass:"line",wordsClass:"word",charsClass:"char"}),{chars:n,words:i,lines:s}=r,a=g(u,n,i,s,w,M),o=Object.assign(Object.assign({visibility:"visible"},d(D,"from")),d(O,"from")),c=Object.assign(Object.assign({},d(D,"to")),d(O,"to"));R.set(a.set,o);"char_line"===u||"word_line"===u?a.animate.forEach(t=>{R.to(t.char,c,t.charIndexInLine*a.speed)}):R.to(a.animate,Object.assign(Object.assign({},c),{stagger:a.speed}),0);const h="function"==typeof T?T(R)||{}:T||{};M?bo.create(Object.assign({trigger:t,scroller:e,start:"top 85%",end:"top 35%",scrub:!0,animation:R},h)):A&&bo.create(Object.assign({trigger:t,scroller:e,start:"top bottom",animation:R,onEnter:()=>R.restart(),onLeaveBack:()=>R.pause()},h))},k);return()=>e.revert()},{scope:k,dependencies:[E,t]}),r.isValidElement(y)?r.cloneElement(y,{ref:k,style:Object.assign(Object.assign({visibility:"hidden"},_),y.props.style),className:["fade_textation_x",y.props.className,v].filter(Boolean).join(" ")}):e("p",{className:`fade_textation_x ${v}`,style:Object.assign({visibility:"hidden"},_),ref:k,children:o})},VerticalScroll:Ro,Overlay_Text:function(o){const{text:p,children:g,textClass:m,textStyle:_,layerStyle:v,layerClass:y,containerStyle:x,containerClass:b,scrollingElement:w,trigger:T,timeline:O,stagger:C=.2,duration:k=1.5,layers:E=1,layerColor:S="white",RenderLayer:M=Po,animationOrder:A="normal",animation:P,animationDimension:R="y",extendAnimation:D,gsapScrollTrigger:z,controllerRef:F=null,useOpacity:N,animationDirection:I=0,onClick:B}=o,L=n(null),j=n(null),Y=l(E),[W,X]=i({eachWidth:"100%",lastWidth:"100%"}),[q,H]=i({eachWidth:"100%",lastWidth:"100%"}),U=O||di.timeline({});F&&(F.current=U);const V=u[P]||u.VerticalReveal,{defaultGsap:G,animation_origins:$,animationStyles:Z}=V;return s(()=>{if("y"==R){const{eachWidth:t,lastWidth:e}=c(j,Y.length,"width");X({eachWidth:t,lastWidth:e})}else{const{eachWidth:t,lastWidth:e}=c(j,Y.length,"height");H({eachWidth:t,lastWidth:e})}},[]),a(()=>function(){if("none"==T)return;const t=j.current;if(!t)return;const e=[...t.children],r="reverse"===A?[...e].reverse():"random"===A?h(e):e,n=di.context(()=>{const e=w?document.querySelector(`${w}`):f(t,!0);U.set(r,Object.assign(Object.assign({opacity:1},d(G,"from")),d(D,"from"))),U.to(r,Object.assign(Object.assign(Object.assign({opacity:N?0:1,stagger:C},d(G,"to")),{duration:k}),d(D,"to")));const n="function"==typeof z?z(U)||{}:z||{};"onscroll"===T&&bo.create(Object.assign({trigger:r,start:"top 65%",end:"top 30%",animation:U,scrub:!0,scroller:e},n)),"inview"===T&&bo.create(Object.assign({trigger:r,start:"top bottom",onEnter:()=>U.restart(),onLeaveBack:()=>U.pause(),animation:U,scroller:e},n))},e);return()=>{n.revert()}}(),[o]),t("div",{style:Object.assign({width:"auto",height:"auto",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",position:"relative"},x),onClick:B,className:`overlay_text_container ${b}`,children:[p?e("p",{ref:L,className:`text-parentz ${m}`,style:Object.assign({},_),children:p}):r.cloneElement(g,{ref:L,style:Object.assign(Object.assign({},g.props.style),_),className:[g.props.className,"text-parentz",m].filter(Boolean).join(" ")}),e("div",{ref:j,className:"text_overlay_container",style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,display:"flex",flexDirection:"y"==R?"row":"column",justifyContent:"flex-start",alignItems:"flex-start"},children:Y.map((t,r)=>{const n=Y.length-1===r,{eachWidth:i,lastWidth:s}=W,a=q.eachWidth,o=q.lastWidth;return e("div",{className:`each-overlay-block ${y}`,style:Object.assign(Object.assign({height:"y"==R?"100%":n?o:a,width:"x"==R?"100%":n?s:i,willChange:"transform",background:S,transformOrigin:"number"==typeof I?$[I]||"center":I,display:"flex",justifyContent:"center",alignItems:"center"},Z),v),children:e(M,{data:t,index:r})},r)})})]})}};function ll(t,e,r,n){return new(r||(r=Promise))(function(i,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function o(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(a,o)}l((n=n.apply(t,e||[])).next())})}function ul(t){const{text:a,scrollingElement:o,progression:l="char",style:u,className:c,children:h,playOnScroll:f=!1,playInView:d=!1,delay:p=0,timeline:g,speed:m,gsapScrollTrigger:_,defaultAnimation:v,extendAnimation:y,watch:x=!1}=t,b=n(null),[w,T]=i(0),[O,C]=i(!1);return s(()=>{!function(){if(!x)return;("string"==typeof x?document.querySelector(x):window).addEventListener("resize",()=>{T(t=>t+1)})}()},[]),s(()=>{if("loaded"===document.fonts.status)C(!0);else{function t(){return ll(this,void 0,void 0,function*(){yield document.fonts.ready.then(()=>{C(!0)}).catch(()=>{C(!0)})})}t()}},[]),Bo(function(){const t=b.current;if(!t||!O)return;const e=o?document.querySelector(`${o}`):function(t){let e=document.querySelector(t);for(;e;){const{overflowY:t}=getComputedStyle(e);if(("auto"===t||"scroll"===t)&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.scrollingElement}(".fade_textation_x"),r=al.create(t,{type:"lines,words,chars",linesClass:"line",wordsClass:"word",charsClass:"char",autoSplit:!0}),{chars:n,lines:i,words:s}=r,a=function(){let t=n;if("char_line"===l){const e=i.flatMap(t=>{const e=n.filter(e=>t.contains(e));return e.map((t,e)=>({char:t,charIndexInLine:e}))});t=e}else if("word_line"===l){const e=i.flatMap((t,e)=>{const r=s.filter(e=>t.contains(e));return r.map((t,e)=>({char:t,charIndexInLine:e}))});t=e}else t="char"==l?n:"word"==l?s:"line"==l?i:n;return{set:"char"==l?n:"word"==l?s:"line"==l?i:"char_line"==l?n:"word_line"==l?s:n,animate:t,speed_0:m||("char"==l?f?.005:.1:"word"==l?.35:"line"==l?.9:"char_line"==l?.08:"word_line"==l?.5:.08)}}();function u(t,e){const r="object"==typeof t?t:{},n=Object.entries(r).map(t=>{const[e,r]=t;return{key:e,val:r}}),i={};for(let t=0;t<n.length;t++){const r=n[t].key,s=n[t].val,a="from"==e?s[0]:"to"==e?s[1]:"";null!==a&&(i[r]=a)}return i}const c=!(!f&&!d),h=g||di.timeline({paused:c,delay:p});h.set(a.set,Object.assign(Object.assign({opacity:0},u(v,"from")),u(y,"from")));const x=function(){if("object"==typeof _)return _;if("function"==typeof _)return _(h)||{};return{}}();return(t=>{t&&a.animate.forEach((e,r)=>{let n="char_line"===l||"word_line"===l,i=n?e.char:e;const s=n?e.charIndexInLine:r;t.to(i,Object.assign(Object.assign({opacity:1,ease:"power3.out"},u(v,"to")),u(y,"to")),s*a.speed_0)})})(h),f?bo.create(Object.assign({trigger:t,scroller:e,start:"top 85%",end:"top 35%",scrub:f,animation:h},x)):d&&bo.create(Object.assign({trigger:t,scroller:e,start:"top bottom",onEnter:()=>h.restart(),onLeaveBack:()=>h.pause()},x)),()=>{r.revert(),h.kill(),bo.getAll().forEach(e=>{e.trigger===t&&e.kill()})}},{dependencies:[O,w],scope:b}),r.isValidElement(h)?r.cloneElement(h,{ref:b,style:Object.assign(Object.assign({visibility:O?"visible":"hidden"},u),h.props.style),className:["fade_textation_x",h.props.className,c].filter(Boolean).join(" ")}):e("p",{className:`fade_textation_x ${c}`,style:Object.assign({visibility:O?"visible":"hidden"},u),ref:b,children:a})}"function"==typeof SuppressedError&&SuppressedError,di.registerPlugin(al,bo);const cl={TextEngine:ul,TextFade:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1]}},t))},TextFadeSkew:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1],x:[100,0],skewX:[100,0]}},t))},TextFadeSkew_2:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1],x:[100,0],y:[100,0],skewX:[-100,0]}},t))},TextFadeDown:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[0,1],y:["100%","0%"],duration:[null,1],stagger:[null,.1]}},t))},TextFadeOverlay:function(t){return e(ul,Object.assign({defaultAnimation:{opacity:[.2,1]}},t))},VerticalScroll:Ro};function hl({name:t}){console.log("Hey!!! Hello ",t,". Package is updated!!!")}const{TextEngine:fl,TextFade:dl,TextFadeDown:pl,TextFadeSkew:gl,TextFadeSkew_2:ml,TextFadeOverlay:_l}=cl,{Z_Text:vl,VerticalScroll:yl,Overlay_Text:xl}=ol;export{xl as Overlay_Text,fl as TextEngine,dl as TextFade,pl as TextFadeDown,_l as TextFadeOverlay,gl as TextFadeSkew,ml as TextFadeSkew_2,yl as VerticalScroll,vl as Z_Text,hl as justSayHello};
|
|
55
54
|
//# sourceMappingURL=index.mjs.map
|