mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2024-12-22 08:04:10 +01:00
12 lines
35 KiB
JavaScript
12 lines
35 KiB
JavaScript
|
/*!
|
||
|
* ScrollTrigger 3.10.2
|
||
|
* https://greensock.com
|
||
|
*
|
||
|
* @license Copyright 2022, GreenSock. All rights reserved.
|
||
|
* Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership.
|
||
|
* @author: Jack Doyle, jack@greensock.com
|
||
|
*/
|
||
|
|
||
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(){return he||"undefined"!=typeof window&&(he=window.gsap)&&he.registerPlugin&&he}function x(e,t){return~Ye.indexOf(e)&&Ye[Ye.indexOf(e)+1][t]}function y(e){return!!~t.indexOf(e)}function z(e,t,r,n){return e.addEventListener(t,r,{passive:!n})}function A(e,t,r){return e.removeEventListener(t,r)}function D(){return Pe&&Pe.isPressed||ze.cache++}function E(t){return function(e){return e||0===e?(r&&(ve.history.scrollRestoration="manual"),t(e),t.v=e,t.c=ze.cache,Pe&&Pe.isPressed&&Re("ss",e)):ze.cache===t.c&&!Re("ref")||(t.c=ze.cache,t.v=t()),t.v}}function H(e){return he.utils.toArray(e)[0]||("string"==typeof e&&!1!==he.config().nullTargetWarn?console.warn("Element not found:",e):null)}function I(t,e){var r=e.s,n=e.sc,i=ze.indexOf(t),o=n===Xe.sc?1:2;return~i||(i=ze.push(t)-1),ze[i+o]||(ze[i+o]=x(t,r)||(y(t)?n:function(e){return arguments.length?t[r]=e:t[r]}))}function J(e,t,i){function _c(e,t){var r=u();t||n<r-s?(a=o,o=e,l=s,s=r):i?o+=e:o=a+(e-a)/(r-l)*(s-l)}var o=e,a=e,s=u(),l=s,n=t||50,c=Math.max(500,3*n);return{update:_c,reset:function reset(){a=o=i?0:o,l=s=0},getVelocity:function getVelocity(e){var t=l,r=a,n=u();return!e&&0!==e||e===o||_c(e),s===l||c<n-l?0:(o+(i?r:-r))/((i?n:s)-t)*1e3}}}function K(e,t){return t&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e}function L(e){var t=Math.max.apply(Math,e),r=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(r)?t:r}function M(e){return(he=e||p())&&!be&&"undefined"!=typeof document&&document.body&&(ve=window,Se=(me=document).documentElement,_e=me.body,t=[ve,me,Se,_e],he.utils.clamp,ke="onpointerenter"in _e?"pointer":"mouse",Te=w.isTouch=ve.matchMedia&&ve.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in ve||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints?2:0,setTimeout(function(){return r=0},500),be=1),be}var he,be,ve,me,Se,_e,Te,ke,Me,t,Pe,r=1,Oe=[],ze=[],Ye=[],u=Date.now,Re=function _bridge(e,t){return t},n="scrollLeft",i="scrollTop",Le={s:n,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:E(function(e){return arguments.length?ve.scrollTo(e,Xe.sc()):ve.pageXOffset||me[n]||Se[n]||_e[n]||0})},Xe={s:i,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:Le,sc:E(function(e){return arguments.length?ve.scrollTo(Le.sc(),e):ve.pageYOffset||me[i]||Se[i]||_e[i]||0})};Le.op=Xe,ze.cache=0;var w=(Observer.prototype.init=function init(e){be||M(he)||console.warn("Please gsap.registerPlugin(Observer)"),Me||(Me=he.core.globals().ScrollTrigger)&&Me.core&&function _integrate(){var e=Me.core,r=e.bridge||{},t=e._scrollers,n=e._proxies;t.push.apply(t,ze),n.push.apply(n,Ye),ze=t,Ye=n,Re=function _bridge(e,t){return r[e](t)}}();var i=e.tolerance,a=e.dragMinimum,t=e.type,r=e.target,n=e.lineHeight,o=e.debounce,s=e.preventDefault,l=e.onStop,c=e.onStopDelay,u=e.ignore,f=e.wheelSpeed,d=e.event,p=e.onDragStart,g=e.onDragEnd,h=e.onDrag,b=e.onPress,v=e.onRelease,m=e.onRight,x=e.onLeft,w=e.onUp,S=e.onDown,_=e.onChangeX,T=e.onChangeY,k=e.onChange,E=e.onToggleX,C=e.onToggleY,P=e.onHover,O=e.onHoverEnd,F=e.onMove,Y=e.ignoreCheck,R=e.isNormalizer,B=e.onGestureStart,X=e.onGestureEnd,j=e.onWheel,V=e.onEnable,G=e.onDisable,N=e.onClick,W=e.scrollSpeed;function ue(e,t){return(ee.event=e)&&u&&~u.indexOf(e.target)||t&&le&&"touch"!==e.pointerType||Y&&Y(e)}function we(){var e=ee.deltaX=L(de),t=ee.deltaY=L(pe),r=Math.abs(e)>=i,n=Math.abs(t)>=i;k&&(r||n)&&k(ee,e,t,de,pe),r&&(m&&0<ee.deltaX&&m(ee),x&&ee.deltaX<0&&x(ee),_&&_(ee),E&&ee.deltaX<0!=te<0&&E(ee),te=ee.deltaX,de[0]=de[1]=de[2]=0),n&&(S&&0<ee.deltaY&&S(ee),w&&ee.deltaY<0&&w(ee),T&&T(ee),C&&ee.deltaY<0!=re<0&&C(ee),re=ee.deltaY,pe[0]=pe[1]=pe[2]=0),$&&(F(ee),$=!1),Z&&(h(ee),Z=!1),Q&&(j(ee),Q=
|
||
|
|