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