animejs 4.2.0 → 4.2.2
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/bundles/anime.esm.js +103 -48
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +103 -48
- package/dist/bundles/anime.umd.min.js +2 -2
- package/dist/modules/animatable/animatable.cjs +2 -2
- package/dist/modules/animatable/animatable.js +2 -2
- package/dist/modules/animatable/index.cjs +1 -1
- package/dist/modules/animatable/index.js +1 -1
- package/dist/modules/animation/additive.cjs +1 -1
- package/dist/modules/animation/additive.js +1 -1
- package/dist/modules/animation/animation.cjs +7 -3
- package/dist/modules/animation/animation.d.ts +8 -3
- package/dist/modules/animation/animation.js +7 -3
- package/dist/modules/animation/composition.cjs +1 -1
- package/dist/modules/animation/composition.js +1 -1
- package/dist/modules/animation/index.cjs +1 -1
- package/dist/modules/animation/index.js +1 -1
- package/dist/modules/core/clock.cjs +1 -1
- package/dist/modules/core/clock.js +1 -1
- package/dist/modules/core/colors.cjs +1 -1
- package/dist/modules/core/colors.js +1 -1
- package/dist/modules/core/consts.cjs +1 -1
- package/dist/modules/core/consts.js +1 -1
- package/dist/modules/core/globals.cjs +2 -2
- package/dist/modules/core/globals.js +2 -2
- package/dist/modules/core/helpers.cjs +1 -1
- package/dist/modules/core/helpers.js +1 -1
- package/dist/modules/core/render.cjs +1 -1
- package/dist/modules/core/render.js +1 -1
- package/dist/modules/core/styles.cjs +1 -1
- package/dist/modules/core/styles.js +1 -1
- package/dist/modules/core/targets.cjs +1 -1
- package/dist/modules/core/targets.js +1 -1
- package/dist/modules/core/transforms.cjs +1 -1
- package/dist/modules/core/transforms.js +1 -1
- package/dist/modules/core/units.cjs +1 -1
- package/dist/modules/core/units.js +1 -1
- package/dist/modules/core/values.cjs +1 -1
- package/dist/modules/core/values.js +1 -1
- package/dist/modules/draggable/draggable.cjs +17 -4
- package/dist/modules/draggable/draggable.d.ts +2 -0
- package/dist/modules/draggable/draggable.js +18 -5
- package/dist/modules/draggable/index.cjs +1 -1
- package/dist/modules/draggable/index.js +1 -1
- package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
- package/dist/modules/easings/cubic-bezier/index.js +1 -1
- package/dist/modules/easings/eases/index.cjs +1 -1
- package/dist/modules/easings/eases/index.js +1 -1
- package/dist/modules/easings/eases/parser.cjs +1 -1
- package/dist/modules/easings/eases/parser.js +1 -1
- package/dist/modules/easings/index.cjs +1 -1
- package/dist/modules/easings/index.js +1 -1
- package/dist/modules/easings/irregular/index.cjs +1 -1
- package/dist/modules/easings/irregular/index.js +1 -1
- package/dist/modules/easings/linear/index.cjs +1 -1
- package/dist/modules/easings/linear/index.js +1 -1
- package/dist/modules/easings/none.cjs +1 -1
- package/dist/modules/easings/none.js +1 -1
- package/dist/modules/easings/spring/index.cjs +1 -1
- package/dist/modules/easings/spring/index.js +1 -1
- package/dist/modules/easings/steps/index.cjs +1 -1
- package/dist/modules/easings/steps/index.js +1 -1
- package/dist/modules/engine/engine.cjs +1 -1
- package/dist/modules/engine/engine.js +1 -1
- package/dist/modules/engine/index.cjs +1 -1
- package/dist/modules/engine/index.js +1 -1
- package/dist/modules/events/index.cjs +1 -1
- package/dist/modules/events/index.js +1 -1
- package/dist/modules/events/scroll.cjs +7 -3
- package/dist/modules/events/scroll.d.ts +2 -0
- package/dist/modules/events/scroll.js +7 -3
- package/dist/modules/index.cjs +1 -1
- package/dist/modules/index.js +1 -1
- package/dist/modules/scope/index.cjs +1 -1
- package/dist/modules/scope/index.js +1 -1
- package/dist/modules/scope/scope.cjs +1 -1
- package/dist/modules/scope/scope.js +1 -1
- package/dist/modules/svg/drawable.cjs +1 -1
- package/dist/modules/svg/drawable.js +1 -1
- package/dist/modules/svg/helpers.cjs +1 -1
- package/dist/modules/svg/helpers.js +1 -1
- package/dist/modules/svg/index.cjs +1 -1
- package/dist/modules/svg/index.js +1 -1
- package/dist/modules/svg/morphto.cjs +12 -2
- package/dist/modules/svg/morphto.js +12 -2
- package/dist/modules/svg/motionpath.cjs +23 -12
- package/dist/modules/svg/motionpath.d.ts +1 -1
- package/dist/modules/svg/motionpath.js +23 -12
- package/dist/modules/text/index.cjs +1 -1
- package/dist/modules/text/index.js +1 -1
- package/dist/modules/text/split.cjs +1 -1
- package/dist/modules/text/split.js +1 -1
- package/dist/modules/timeline/index.cjs +1 -1
- package/dist/modules/timeline/index.js +1 -1
- package/dist/modules/timeline/position.cjs +1 -1
- package/dist/modules/timeline/position.js +1 -1
- package/dist/modules/timeline/timeline.cjs +9 -5
- package/dist/modules/timeline/timeline.d.ts +8 -3
- package/dist/modules/timeline/timeline.js +9 -5
- package/dist/modules/timer/index.cjs +1 -1
- package/dist/modules/timer/index.js +1 -1
- package/dist/modules/timer/timer.cjs +17 -14
- package/dist/modules/timer/timer.d.ts +12 -7
- package/dist/modules/timer/timer.js +17 -14
- package/dist/modules/types/index.d.ts +7 -3
- package/dist/modules/utils/chainable.cjs +1 -1
- package/dist/modules/utils/chainable.js +1 -1
- package/dist/modules/utils/index.cjs +1 -1
- package/dist/modules/utils/index.js +1 -1
- package/dist/modules/utils/number.cjs +1 -1
- package/dist/modules/utils/number.js +1 -1
- package/dist/modules/utils/random.cjs +1 -1
- package/dist/modules/utils/random.js +1 -1
- package/dist/modules/utils/stagger.cjs +1 -1
- package/dist/modules/utils/stagger.js +1 -1
- package/dist/modules/utils/target.cjs +1 -1
- package/dist/modules/utils/target.js +1 -1
- package/dist/modules/utils/time.cjs +1 -1
- package/dist/modules/utils/time.js +1 -1
- package/dist/modules/waapi/composition.cjs +1 -1
- package/dist/modules/waapi/composition.js +1 -1
- package/dist/modules/waapi/index.cjs +1 -1
- package/dist/modules/waapi/index.js +1 -1
- package/dist/modules/waapi/waapi.cjs +8 -5
- package/dist/modules/waapi/waapi.d.ts +8 -5
- package/dist/modules/waapi/waapi.js +8 -5
- package/package.json +3 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - UMD minified bundle
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
7
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).anime={})}(this,function(t){"use strict";const e="undefined"!=typeof window,s=e?window:null,i=e?document:null,r={replace:0,none:1,blend:2},n=Symbol(),o=Symbol(),a=Symbol(),h=Symbol(),l=Symbol(),c=Symbol(),d=1e-11,u=1e12,p=1e3,m="",f=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),g=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],_=g.reduce((t,e)=>({...t,[e]:e+"("}),{}),y=()=>{},v=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,b=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,S=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,T=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,w=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,x=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,$=/([a-z])([A-Z])/g,E=/(\w+)(\([^)]+\)+)/g,C=/(\*=|\+=|-=)/,D=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,B={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:p,delay:0,loopDelay:0,ease:"out(2)",composition:r.replace,modifier:t=>t,onBegin:y,onBeforeUpdate:y,onUpdate:y,onLoop:y,onPause:y,onComplete:y,onRender:y},L={current:null,root:i},A={defaults:B,precision:4,timeScale:1,tickThreshold:200},N={version:"4.2.0",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(N));const F=t=>t.replace($,"$1-$2").toLowerCase(),P=(t,e)=>0===t.indexOf(e),O=Date.now,R=Array.isArray,M=t=>t&&t.constructor===Object,z=t=>"number"==typeof t&&!isNaN(t),I=t=>"string"==typeof t,Y=t=>"function"==typeof t,X=t=>void 0===t,W=t=>X(t)||null===t,V=t=>e&&t instanceof SVGElement,H=t=>v.test(t),U=t=>P(t,"rgb"),q=t=>P(t,"hsl"),j=t=>!A.defaults.hasOwnProperty(t),Q=["opacity","rotate","overflow","color"],G=t=>I(t)?parseFloat(t):t,Z=Math.pow,J=Math.sqrt,K=Math.sin,tt=Math.cos,et=Math.abs,st=Math.exp,it=Math.ceil,rt=Math.floor,nt=Math.asin,ot=Math.max,at=Math.atan2,ht=Math.PI,lt=Math.round,ct=(t,e,s)=>t<e?e:t>s?s:t,dt={},ut=(t,e)=>{if(e<0)return t;if(!e)return lt(t);let s=dt[e];return s||(s=dt[e]=10**e),lt(t*s)/s},pt=(t,e)=>R(e)?e.reduce((e,s)=>et(s-t)<et(e-t)?s:e):e?lt(t/e)*e:t,mt=(t,e,s)=>t+(e-t)*s,ft=t=>t===1/0?u:t===-1/0?-u:t,gt=t=>t<=d?d:ft(ut(t,11)),_t=t=>R(t)?[...t]:t,yt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=X(r)?e[i]:r}return s},vt=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},bt=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},St=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o},Tt=(t,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t),wt=(t,e)=>X(t)?e:t,xt=(t,e,s,i,r)=>{let n;if(Y(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!I(t)||!P(t,"var("))return t;n=()=>{const s=t.match(D),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==m||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},kt=(t,e)=>t[o]?t[a]&&((t,e)=>{if(Q.includes(e))return!1;if(t.getAttribute(e)||e in t){if("scale"===e){const e=t.parentNode;return e&&"filter"===e.tagName}return!0}})(t,e)?1:g.includes(e)||f.get(e)?3:P(e,"--")?4:e in t.style?2:e in t?0:1:0,$t=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[c]||t).getPropertyValue(e);return"auto"===r?"0":r},Et=(t,e,s,i)=>{const r=X(s)?kt(t,e):s;return 0===r?t[e]||0:1===r?t.getAttribute(e):3===r?((t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[h];let o;for(;o=E.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!X(r)?r:P(e,"scale")?"1":P(e,"rotate")||P(e,"skew")?"0deg":"0px"})(t,e,i):4===r?$t(t,e,i).trimStart():$t(t,e,i)},Ct=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Dt=(t,e)=>{if(e.t=0,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const n=!s.includes(" ")&&k.exec(s);if(n)return e.t=1,e.n=+n[1],e.u=n[2],e;if(e.o)return e.n=+s,e;if(H(r=s)||U(r)||q(r))return e.t=2,e.d=U(i=s)?(t=>{const e=b.exec(t)||S.exec(t),s=X(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):H(i)?(t=>{const e=t.length,s=4===e||5===e;return[+("0x"+t[1]+t[s?1:2]),+("0x"+t[s?2:3]+t[s?2:4]),+("0x"+t[s?3:5]+t[s?3:6]),5===e||9===e?+(+("0x"+t[s?4:7]+t[s?4:8])/255).toFixed(3):1]})(i):q(i)?(t=>{const e=T.exec(t)||w.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=X(e[4])?1:+e[4];let o,a,h;if(0===i)o=a=h=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=ut(255*Tt(e,t,s+1/3),0),a=ut(255*Tt(e,t,s),0),h=ut(255*Tt(e,t,s-1/3),0)}return[o,a,h,n]})(i):[0,0,0,1],e;{const t=s.match(x);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(x)||[],e}}var i,r;return e.n=s,e},Bt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=_t(t._toNumbers),e.s=_t(t._strings),e),Lt={t:0,n:0,u:null,o:null,d:null,s:null},At=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,l=t.completed,c=t.iterationDuration,u=t.iterationCount,p=t._currentIteration,f=t._loopDelay,g=t._reversed,y=t._alternate,v=t._hasChildren,b=t._delay,S=t._currentTime,T=b+c,w=e-b,x=ct(S,-b,a),k=ct(w,-b,a),$=w-S,E=k>0,C=k>=a,D=a<=d,B=2===n;let L=0,N=w,F=0;if(u>1){const e=~~(k/(c+(C?0:f)));t._currentIteration=ct(e,0,u),C&&t._currentIteration--,L=t._currentIteration%2,N=k%(c+f)||0}const P=g^(y&&L),O=t._ease;let R=C?P?0:a:P?c-N:N;O&&(R=c*O(R/c)||0);const M=(o?o.backwards:w<S)?!P:!!P;if(t._currentTime=w,t._iterationTime=R,t.backwards=M,E&&!t.began?(t.began=!0,s||o&&(M||!o.began)||t.onBegin(t)):w<=0&&(t.began=!1),s||v||!E||t._currentIteration===p||t.onLoop(t),B||1===n&&(e>=b&&e<=T||e<=b&&x>b||e>=T&&x!==a)||R>=T&&x!==a||R<=b&&x>0||e<=x&&x===a&&l||C&&!l&&D){if(E&&(t.computeDeltaTime(x),s||t.onBeforeUpdate(t)),!v){const e=B||(M?-1*$:$)>=A.tickThreshold,n=t._offset+(o?o._offset:0)+b+R;let a,l,c,d,u=t._head,p=0;for(;u;){const t=u._composition,s=u._currentTime,o=u._changeDuration,f=u._absoluteStartTime+u._changeDuration,g=u._nextRep,y=u._prevRep,v=t!==r.none;if((e||(s!==o||n<=f+(g?g._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!v||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!g||g._isOverridden||n<=g._absoluteStartTime)&&(!y||y._isOverridden||n>=y._absoluteStartTime+y._changeDuration+u._delay))){const e=u._currentTime=ct(R-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,m=u._valueType,f=u._tweenType,g=0===f,_=0===m,y=_&&g||0===s||1===s?-1:A.precision;let b,S;if(_)b=S=n(ut(mt(u._fromNumber,u._toNumber,s),y));else if(1===m)S=n(ut(mt(u._fromNumber,u._toNumber,s),y)),b=`${S}${u._unit}`;else if(2===m){const t=u._fromNumbers,e=u._toNumbers,i=ut(ct(n(mt(t[0],e[0],s)),0,255),0),r=ut(ct(n(mt(t[1],e[1],s)),0,255),0),o=ut(ct(n(mt(t[2],e[2],s)),0,255),0),a=ct(n(ut(mt(t[3],e[3],s),y)),0,1);if(b=`rgba(${i},${r},${o},${a})`,v){const t=u._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(3===m){b=u._strings[0];for(let t=0,e=u._toNumbers.length;t<e;t++){const e=n(ut(mt(u._fromNumbers[t],u._toNumbers[t],s),y)),i=u._strings[t+1];b+=`${i?e+i:e}`,v&&(u._numbers[t]=e)}}if(v&&(u._number=S),i||t===r.blend)u._value=b;else{const t=u.property;a=u.target,g?a[t]=b:1===f?a.setAttribute(t,b):(l=a.style,3===f?(a!==c&&(c=a,d=a[h]),d[t]=b,p=1):2===f?l[t]=b:4===f&&l.setProperty(t,b)),E&&(F=1)}}if(p&&u._renderTransforms){let t=m;for(let e in d)t+=`${_[e]}${d[e]}) `;l.transform=t,p=0}u=u._next}!s&&F&&t.onRender(t)}!s&&E&&t.onUpdate(t)}return o&&D?!s&&(o.began&&!M&&w>0&&!l||M&&w<=d&&l)&&(t.onComplete(t),t.completed=!M):E&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||v||(t.completed=!0,s||o&&(M||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,F},Nt=(t,e,s,i,r)=>{const n=t._currentIteration;if(At(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,h=i?e:o._iterationTime,l=O();let c=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;vt(o,e=>{if(a){const i=e.duration,r=e._offset+e._delay;s||!(i<=d)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&At(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}vt(o,t=>{const e=ut((h-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;c+=At(t,e,s,i,n),!t.completed&&u&&(u=!1)},a),!s&&c&&o.onRender(o),(u||a)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},Ft={},Pt=(t,e,s)=>{if(3===s)return f.get(t)||t;if(2===s||1===s&&V(e)&&t in e.style){const e=Ft[t];if(e)return e;{const e=t?F(t):t;return Ft[t]=e,e}}return t},Ot=t=>{if(t._hasChildren)vt(t,Ot,!0);else{const e=t;e.pause(),vt(e,t=>{const s=t.property,i=t.target;if(i[o]){const r=i.style,n=t._inlineValue,o=W(n)||n===m;if(3===t._tweenType){const e=i[h];if(o?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=m;for(let s in e)t+=_[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else o?r.removeProperty(F(s)):r[s]=n;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===m&&t.removeAttribute("style")})}})}return t};class Rt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=ut(p/120,0),this._fps=120,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<d?d:s,r=ut(p/i,0);this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<d?d:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return 0;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Mt={animation:null,update:y},zt=(()=>e?requestAnimationFrame:setImmediate)(),It=(()=>e?cancelAnimationFrame:clearImmediate)();class Yt extends Rt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=B,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=O();if(this.requestTick(t)){this.computeDeltaTime(t);const e=this._speed,s=this._fps;let i=this._head;for(;i;){const r=i._next;i.paused?(bt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Nt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}Mt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(O()),this.reqId=zt(Wt)),this}pause(){if(this.reqId)return this.paused=!0,Vt()}resume(){if(this.paused)return this.paused=!1,vt(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===A.timeScale?1:p)}set speed(t){this._speed=t*A.timeScale,vt(this,t=>t.speed=t._speed)}get timeUnit(){return 1===A.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(A.timeScale!==s){A.timeScale=s,A.tickThreshold=200*s;const t=e?.001:p;this.defaults.duration*=t,this._speed*=t}}get precision(){return A.precision}set precision(t){A.precision=t}}const Xt=(()=>{const t=new Yt(O());return e&&(N.engine=t,i.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())})),t})(),Wt=()=>{Xt._head?(Xt.reqId=zt(Wt),Xt.update()):Xt.reqId=0},Vt=()=>(It(Xt.reqId),Xt.reqId=0,Xt),Ht={_rep:new WeakMap,_add:new Map},Ut=(t,e,s="_rep")=>{const i=Ht[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},qt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,jt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=d,t._currentTime=d},Qt=(t,e)=>{const s=t._composition;if(s===r.replace){const s=t._absoluteStartTime;St(e,t,qt,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){jt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)jt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=ut(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<d&&jt(i)}let o=!0;if(vt(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;vt(t,t=>{t!==e&&vt(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===r.blend){const e=Ut(t.target,t.property,"_add"),s=(t=>{let e=Mt.animation;return e||(e={duration:d,computeDeltaTime:y,_offset:0,_delay:0,_head:null,_tail:null},Mt.animation=e,Mt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=3===t||2===t?_t(i._fromNumbers):null;let r=i._fromNumber,n=s._tail;for(;n&&n!==i;){if(e)for(let t=0,s=n._numbers.length;t<s;t++)e[t]+=n._numbers[t];else r+=n._number;n=n._prevAdd}i._toNumber=r,i._toNumbers=e}}}),At(e,1,1,0,2)}),e})(Ht._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=d,i._startTime=0,i._numbers=_t(t._fromNumbers),i._number=0,i._next=null,i._prev=null,St(e,i),St(s,i));const n=t._toNumber;if(t._fromNumber=i._fromNumber-n,t._toNumber=0,t._numbers=_t(t._fromNumbers),t._number=0,i._fromNumber=n,t._toNumbers){const e=_t(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}St(e,t,null,"_prevAdd","_nextAdd")}return t},Gt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=Ht._rep.get(s)[i];if(bt(n,t,"_prevRep","_nextRep"),e===r.blend){const e=Ht._add,r=e.get(s);if(!r)return;const n=r[i],o=Mt.animation;bt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){bt(n,a,"_prevAdd","_nextAdd"),bt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Zt=(t,e,s)=>{let i=!1;return vt(e,r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=Pt(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),bt(e,r),Gt(r),i=!0)}},!0),i},Jt=(t,e,s)=>{const i=e||Xt;let r;if(i._hasChildren){let e=0;vt(i,n=>{if(!n._hasChildren)if(r=Zt(t,n,s),r&&!n._head)n.cancel(),bt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?Jt(t,n,s):n._hasChildren=!1},!0),X(i.iterationDuration)||(i.iterationDuration=e)}else r=Zt(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},Kt=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),te=t=>t._cancelled?(t._hasChildren?vt(t,te):vt(t,t=>{t._composition!==r.none&&Qt(t,Ut(t.target,t.property))}),t._cancelled=0,t):t;let ee=0;class se extends Rt{constructor(t={},e=null,s=0){super(0);const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:h,loopDelay:l,autoplay:c,frameRate:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:b}=t;L.current&&L.current.register(this);const S=e?0:Xt._elapsedTime,T=e?e.defaults:A.defaults,w=Y(r)||X(r)?T.delay:+r,x=Y(n)||X(n)?1/0:+n,k=wt(h,T.loop),$=wt(l,T.loopDelay),E=!0===k||k===1/0||k<0?1/0:k+1;let C=0;e?C=s:(Xt.reqId||Xt.requestTick(O()),C=(Xt._elapsedTime-Xt._startTime)*A.timeScale),this.id=X(i)?++ee:i,this.parent=e,this.duration=ft((x+$)*E-$)||d,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||T.onBegin,this.onBeforeUpdate=v||T.onBeforeUpdate,this.onUpdate=b||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=x,this.iterationCount=E,this._autoplay=!e&&wt(c,T.autoplay),this._offset=C,this._delay=w,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=y,this._running=!1,this._reversed=+wt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=wt(a,T.alternate),this._prev=null,this._next=null,this._elapsedTime=S,this._startTime=S,this._lastTime=S,this._fps=wt(u,T.frameRate),this._speed=wt(p,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(1).play()}get currentTime(){return ct(ut(this._currentTime,A.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return ut(this._iterationTime,A.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ct(ut(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ct(ut(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*ct(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=0){return te(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Nt(this,0,1,t,2),Kt(this),this._hasChildren&&vt(this,Kt),this}init(t=0){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Nt(this,this.duration,1,t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!X(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Xt._speed);return this._startTime=O()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=d&&!this._hasChildren?Nt(this,d,0,0,2):(this._running||(St(Xt,this),Xt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Xt.wake()),this):this}restart(){return this.reset(0).resume()}seek(t,e=0,s=0){te(this),this.completed=!1;const i=this.paused;return this.paused=!0,Nt(this,t+this._delay,~~e,~~s,1),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?rt(u/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?vt(this,t=>t.cancel(),!0):vt(this,Gt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=gt(t);if(e===s)return this;const i=t/e,r=t<=d;return this.duration=r?d:s,this.iterationDuration=r?d:gt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Nt(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=y){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=y};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}function ie(t){const e=I(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function re(t){if(W(t))return[];if(!e)return R(t)&&t.flat(1/0)||[t];if(R(t)){const e=t.flat(1/0),s=[];for(let t=0,i=e.length;t<i;t++){const i=e[t];if(!W(i)){const t=ie(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!W(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=ie(t);return s?Array.from(s):[t]}function ne(t){const e=re(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[n]){s[n]=!0;const t=V(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[h]={})}}return e}const oe={deg:1,rad:180/ht,turn:360},ae={},he=(t,e,s,r=!1)=>{const n=e.u,o=e.n;if(1===e.t&&n===s)return e;const a=o+n+s,h=ae[a];if(X(h)||r){let r;if(n in oe)r=o*oe[n]/oe[s];else{const e=100,a=t.cloneNode(),h=t.parentNode,l=h&&h!==i?h:i.body;l.appendChild(a);const c=a.style;c.width=e+n;const d=a.offsetWidth||e;c.width=e+s;const u=d/(a.offsetWidth||e);l.removeChild(a),r=u*o}e.n=r,ae[a]=r}else e.n=h;return e.t,e.u=s,e},le=t=>t,ce=(t=1.68)=>e=>Z(e,+t),de={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},ue=ht/2,pe=2*ht,me={[m]:ce,Quad:ce(2),Cubic:ce(3),Quart:ce(4),Quint:ce(5),Sine:t=>1-tt(t*ue),Circ:t=>1-J(1-t*t),Expo:t=>t?Z(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=Z(2,--s))-1)/11;);return 1/Z(4,3-s)-7.5625*Z((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=ct(+t,1,10),i=ct(+e,d,2),r=i/pe*nt(1/s),n=pe/i;return t=>0===t||1===t?t:-s*Z(2,-10*(1-t))*K((1-t-r)*n)}},fe=(()=>{const t={linear:le,none:le};for(let e in de)for(let s in me){const i=me[s],r=de[e];t[e+s]=s===m||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ge={linear:le,none:le},_e=t=>{if(ge[t])return ge[t];if(t.indexOf("(")<=-1){const e=de[t]||t.includes("Back")||t.includes("Elastic")?fe[t]():fe[t];return e?ge[t]=e:le}{const e=t.slice(0,-1).split("("),s=fe[e[0]];return s?ge[t]=s(...e[1].split(",")):le}},ye=["steps(","irregular(","linear(","cubicBezier("],ve=t=>{if(I(t))for(let e=0,s=ye.length;e<s;e++)if(P(t,ye[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),le;return Y(t)?t:I(t)?_e(t):le},be={t:0,n:0,u:null,o:null,d:null,s:null},Se={t:0,n:0,u:null,o:null,d:null,s:null},Te={},we={func:null},xe=[null],ke=[null,null],$e={to:null};let Ee,Ce,De=0;class Be extends se{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i);const h=ne(t),l=h.length,c=e.keyframes,u=c?yt(((t,e)=>{const s={};if(R(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(j);for(let i=0,r=e.length;i<r;i++){const r=e[i],n=t.map(t=>{const e={};for(let s in t){const i=t[s];j(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=wt(e.duration,A.defaults.duration),r=Object.keys(t).map(e=>({o:parseFloat(e)/100,p:t[e]})).sort((t,e)=>t.o-e.o);r.forEach(t=>{const e=t.o,r=t.p;for(let t in r)if(j(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,h=n[a-1];const l={to:r[t]};let c=0;for(let t=0;t<a;t++)c+=n[t].duration;1===a&&(l.from=h.to),r.ease&&(l.ease=r.ease),l.duration=o-(a?c:0),n.push(l)}return t});for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s})(c,e),e):e,{delay:m,duration:f,ease:g,playbackEase:_,modifier:y,composition:v,onRender:b}=u,S=s?s.defaults:A.defaults,T=wt(_,S.playbackEase),w=T?ve(T):null,x=!X(g)&&!X(g.ease),k=x?g.ease:wt(g,w?"linear":S.ease),$=x?g.settlingDuration:wt(f,S.duration),E=wt(m,S.delay),C=y||S.modifier,D=X(v)&&l>=p?r.none:X(v)?S.composition:v,B=this._offset+(s?s._offset:0);x&&(g.parent=this);let L=NaN,N=NaN,F=0,P=0;for(let t=0;t<l;t++){const e=h[t],i=o||t,c=a||l;let p=NaN,m=NaN;for(let t in u)if(j(t)){const o=kt(e,t),a=Pt(t,e,o);let h=u[t];const l=R(h);if(n&&!l&&(ke[0]=h,ke[1]=h,h=ke),l){const t=h.length,e=!M(h[0]);2===t&&e?($e.to=h,xe[0]=$e,Ee=xe):t>2&&e?(Ee=[],h.forEach((t,e)=>{e?1===e?(ke[1]=t,Ee.push(ke)):Ee.push(t):ke[0]=t})):Ee=h}else xe[0]=h,Ee=xe;let f=null,g=null,_=NaN,y=0,v=0;for(let t=Ee.length;v<t;v++){const n=Ee[v];M(n)?Ce=n:($e.to=n,Ce=$e),we.func=null;const h=xt(Ce.to,e,i,c,we);let l;M(h)&&!X(h.to)?(Ce=h,l=h.to):l=h;const u=xt(Ce.from,e,i,c),p=Ce.ease,m=!X(p)&&!X(p.ease),b=m?p.ease:p||k,S=m?p.settlingDuration:xt(wt(Ce.duration,t>1?xt($,e,i,c)/t:$),e,i,c),T=xt(wt(Ce.delay,v?0:E),e,i,c),w=xt(wt(Ce.composition,D),e,i,c),x=z(w)?w:r[w],L=Ce.modifier||C,A=!X(u),N=!X(l),O=R(l),I=O||A&&N,Y=g?y+T:T,V=ut(B+Y,12);P||!A&&!O||(P=1);let H=g;if(x!==r.none){f||(f=Ut(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=V;)if(H=t,t=t._nextRep,t&&t._absoluteStartTime>=V)for(;t;)jt(t),t=t._nextRep}if(I?(Dt(O?xt(l[0],e,i,c):u,be),Dt(O?xt(l[1],e,i,c,we):l,Se),0===be.t&&(H?1===H._valueType&&(be.t=1,be.u=H._unit):(Dt(Et(e,a,o,Te),Lt),1===Lt.t&&(be.t=1,be.u=Lt.u)))):(N?Dt(l,Se):g?Bt(g,Se):Dt(s&&H&&H.parent.parent===s?H._value:Et(e,a,o,Te),Se),A?Dt(u,be):g?Bt(g,be):Dt(s&&H&&H.parent.parent===s?H._value:Et(e,a,o,Te),be)),be.o&&(be.n=Ct(H?H._toNumber:Dt(Et(e,a,o,Te),Lt).n,be.n,be.o)),Se.o&&(Se.n=Ct(be.n,Se.n,Se.o)),be.t!==Se.t)if(3===be.t||3===Se.t){const t=3===be.t?be:Se,e=3===be.t?Se:be;e.t=3,e.s=_t(t.s),e.d=t.d.map(()=>e.n)}else if(1===be.t||1===Se.t){const t=1===be.t?be:Se,e=1===be.t?Se:be;e.t=1,e.u=t.u}else if(2===be.t||2===Se.t){const t=2===be.t?be:Se,e=2===be.t?Se:be;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(be.u!==Se.u){let t=Se.u?be:Se;t=he(e,t,Se.u?Se.u:be.u,!1)}if(Se.d&&be.d&&Se.d.length!==be.d.length){const t=be.d.length>Se.d.length?be:Se,e=t===be?Se:be;e.d=t.d.map((t,s)=>X(e.d[s])?0:e.d[s]),e.s=_t(t.s)}const U=ut(+S||d,12);let q=Te[a];W(q)||(Te[a]=null);const j={parent:this,id:De++,property:a,target:e,_value:null,_func:we.func,_ease:ve(b),_fromNumbers:_t(be.d),_toNumbers:_t(Se.d),_strings:_t(Se.s),_fromNumber:be.n,_toNumber:Se.n,_numbers:_t(be.d),_number:be.n,_unit:Se.u,_modifier:L,_currentTime:0,_startTime:Y,_delay:+T,_updateDuration:U,_changeDuration:U,_absoluteStartTime:V,_tweenType:o,_valueType:Se.t,_composition:x,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:q,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};x!==r.none&&Qt(j,f),isNaN(_)&&(_=j._startTime),y=ut(Y+U,12),g=j,F++,St(this,j)}(isNaN(N)||_<N)&&(N=_),(isNaN(L)||y>L)&&(L=y),3===o&&(p=F-v,m=F)}if(!isNaN(p)){let t=0;vt(this,e=>{t>=p&&t<m&&(e._renderTransforms=1,e._composition===r.blend&&vt(Mt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}l||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),N?(vt(this,t=>{t._startTime-t._delay||(t._delay-=N),t._startTime-=N}),L-=N):N=0,L||(L=d,this.iterationCount=0),this.targets=h,this.duration=L===d?d:ft((L+this._loopDelay)*this.iterationCount-this._loopDelay)||d,this.onRender=b||S.onRender,this._ease=w,this._delay=N,this.iterationDuration=L,!this._autoplay&&P&&this.onRender(this)}stretch(t){const e=this.duration;if(e===gt(t))return this;const s=t/e;return vt(this,t=>{t._updateDuration=gt(t._updateDuration*s),t._changeDuration=gt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return vt(this,t=>{const e=t._func;if(e){const s=Et(t.target,t.property,t._tweenType);Dt(s,Lt),Dt(e(),Se),t._fromNumbers=_t(Lt.d),t._fromNumber=Lt.n,t._toNumbers=_t(Se.d),t._strings=_t(Se.s),t._toNumber=Se.o?Ct(Lt.n,Se.n,Se.o):Se.n}}),this.duration===d&&this.restart(),this}revert(){return super.revert(),Ot(this)}then(t){return super.then(t)}}const Le={_head:null,_tail:null},Ae=(t,e,s)=>{let i,r=Le._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,h=!s||r.parent===s;if(o&&a&&h){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),bt(Le,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ne=(t,e,s,i,r)=>{const n=e.animate(i,r),o=r.delay+ +r.duration*r.iterations;n.playbackRate=t._speed,t.paused&&n.pause(),t.duration<o&&(t.duration=o,t.controlAnimation=n),t.animations.push(n),Ae(e,s),St(Le,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Ae(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Fe(t,e,s){const i=ne(t);if(!i.length)return;const[r]=i,n=kt(r,e),o=Pt(e,r,n);let a=Et(r,o);if(X(s))return a;if(Dt(a,Lt),0===Lt.t||1===Lt.t){if(!1===s)return Lt.n;{const t=he(r,Lt,s,!1);return`${ut(t.n,A.precision)}${t.u}`}}}const Pe=(t,e)=>{if(!X(e))return e.duration=d,e.composition=wt(e.composition,r.none),new Be(t,e,null,0,!0).resume()},Oe=(t,e,s)=>{const i=re(t);for(let t=0,r=i.length;t<r;t++)Ae(i[t],s,e&&e.controlAnimation&&e);return Jt(i,e,s),i},Re=(t,e)=>{let s=t.iterationDuration;if(s===d&&(s=0),X(e))return s;if(z(+e))return+e;const i=e,r=t?t.labels:null,n=!W(r),o=((t,e)=>{if(P(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!X(o),h=C.exec(i);if(h){const t=h[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,c=a?o:n?l:s,d=+e[1];return Ct(c,d,t[0])}return a?o:n?X(r[i])?s:r[i]:s};function Me(t,e,s,i,r,n){const o=z(t.duration)&&t.duration<=d?s-d:s;Nt(e,o,1,1,1);const a=i?new Be(i,t,e,o,!1,r,n):new se(t,e,o);return a.init(1),St(e,a),vt(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=function(t){return ft((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||d}(e),e}class ze extends se{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=A.defaults;this.defaults=e?yt(e,s):s,this.onRender=t.onRender||s.onRender;const i=wt(t.playbackEase,s.playbackEase);this._ease=i?ve(i):null,this.iterationDuration=0}add(t,e,s){const i=M(e),r=M(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(Y(s)){const e=s,r=re(t),n=this.duration,o=this.iterationDuration,a=i.id;let h=0;const l=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,X(a)||(s.id=a+"-"+h),Me(s,this,Re(this,e(t,h,l,this)),t,h,l),h++})}else Me(i,this,Re(this,s),t)}else Me(t,this,Re(this,e));return this.init(1)}}sync(t,e){if(X(t)||t&&X(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return this.add(t,{currentTime:[0,s],duration:s,ease:"linear"},e)}set(t,e,s){return X(e)?this:(e.duration=d,e.composition=r.replace,this.add(t,e,s))}call(t,e){return X(t)||t&&!Y(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return X(t)||t&&!I(t)||(this.labels[t]=Re(this,e)),this}remove(t,e){return Jt(re(t),this,e),this}stretch(t){const e=this.duration;if(e===gt(t))return this;const s=t/e,i=this.labels;vt(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return vt(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),vt(this,t=>t.revert,!0),Ot(this)}then(t){return super.then(t)}}class Ie{constructor(t,e){L.current&&L.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!X(t)&&!X(e)){for(let t in e){const s=e[t];j(t)?o[t]=s:P(t,"on")?n[t]=s:i[t]=s}this.callbacks=new Be({v:0},n);for(let e in o){const s=o[e],n=M(s);let a={},h="+=0";if(n){const t=s.unit;I(t)&&(h+=t)}else a.duration=s;a[e]=n?yt({to:h},s):h;const l=yt(i,a);l.composition=r.replace,l.autoplay=!1;const c=this.animations[e]=new Be(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(X(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return vt(c,e=>{if(R(t))for(let s=0,i=t.length;s<i;s++)X(e._numbers[s])||(e._fromNumbers[s]=e._modifier(e._numbers[s]),e._toNumbers[s]=t[s]);else e._fromNumber=e._modifier(e._number),e._toNumber=t;X(s)||(e._ease=ve(s)),e._currentTime=0}),X(e)||c.stretch(e),c.reset(1).resume(),this}}}}revert(){for(let t in this.animations)this[t]=y,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const Ye=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var Xe=Object.freeze({__proto__:null,clamp:ct,damp:(t,e,s,i)=>i?1===i?e:mt(t,e,1-Math.exp(-i*s*.1)):t,degToRad:t=>t*Math.PI/180,lerp:mt,mapRange:Ye,padEnd:(t,e,s)=>`${t}`.padEnd(e,s),padStart:(t,e,s)=>`${t}`.padStart(e,s),radToDeg:t=>180*t/Math.PI,round:ut,roundPad:(t,e)=>(+t).toFixed(e),snap:pt,wrap:(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e});const We=10*p;class Ve{constructor(t={}){const e=!X(t.bounce)||!X(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/p,this.maxIterations=this.maxDuration/this.timeStep/p,this.bn=ct(wt(t.bounce,.5),-1,1),this.pd=ct(wt(t.duration,628),10*A.timeScale,We*A.timeScale),this.m=ct(wt(t.mass,1),1,We),this.s=ct(wt(t.stiffness,100),d,We),this.d=ct(wt(t.damping,10),d,We),this.v=ct(wt(t.velocity,0),-1e4,We),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||y,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),0===t||1===t?t:this.solve(t*this.solverDuration)}}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?st(-n*e*s)*(1*tt(i*n)+r*K(i*n)):1===e?(1+r*n)*st(-n*s):((1+r)*st((-e*s+i)*n)+(1-r)*st((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===A.timeScale?this.pd/p:this.pd;this.m=1,this.v=0,this.s=Z(2*ht/t,2),this.bn>=0?this.d=4*(1-this.bn)*ht/t:this.d=4*ht/(t*(1+this.bn)),this.s=ut(ct(this.s,d,We),3),this.d=ut(ct(this.d,d,300),3)}calculateBDFromSD(){const t=2*ht/J(this.s);this.pd=t*(1===A.timeScale?p:1);const e=this.d/(2*J(this.s));this.bn=e<=1?1-this.d*t/(4*ht):4*ht/(this.d*t)-1,this.bn=ut(ct(this.bn,-1,1),3),this.pd=ut(ct(this.pd,10*A.timeScale,We*A.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=ct(J(o/r),d,p),l=this.zeta=n/(2*J(o*r));l<1?(this.wd=h*J(1-l*l),this.b=(l*h-a)/this.wd):1===l?(this.wd=0,this.b=-a+h):(this.wd=h*J(l*l-1),this.b=(l*h-a)/this.wd);let c=0,u=0,m=0;for(;u<=t&&m<=e;)et(1-this.solve(c))<s?u++:u=0,this.solverDuration=c,c+=i,m++;this.settlingDuration=ut(this.solverDuration*p,0)*A.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=ct(wt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=ct(wt(t,1),10*A.timeScale,We*A.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ct(wt(t,100),d,We),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ct(wt(t,10),d,We),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ct(wt(t,1),1,We),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ct(wt(t,0),-1e4,We),this.compute()}}const He=t=>new Ve(t),Ue=t=>(console.warn("createSpring() is deprecated use spring() instead"),new Ve(t)),qe=t=>{t.cancelable&&t.preventDefault()};class je{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:y,remove:y}}get x(){return this.el.x||0}set x(t){this.el.x=t}get y(){return this.el.y||0}set y(t){this.el.y=t}get width(){return this.el.width||0}set width(t){this.el.width=t}get height(){return this.el.height||0}set height(t){this.el.height=t}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class Qe{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,s=0;for(;e&&e!==i;)t(e,s),e=e.parentElement,s++}getMatrix(){const t=new DOMMatrix;return this.traverseUp(e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}}),t}remove(){this.traverseUp((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"})}revert(){this.traverseUp((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s})}}const Ge=(t,e)=>t&&Y(t)?t(e):t;let Ze=0;class Je{constructor(t,e={}){if(!t)return;L.current&&L.current.register(this);const r=e.x,n=e.y,o=e.trigger,a=e.modifier,h=e.releaseEase,l=h&&ve(h),c=!X(h)&&!X(h.ease),d=M(r)&&!X(r.mapTo)?r.mapTo:"translateX",p=M(n)&&!X(n.mapTo)?n.mapTo:"translateY",m=Ge(e.container,this);this.containerArray=R(m)?m:null,this.$container=m&&!this.containerArray?re(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=M(t)?new je(t):re(t)[0],this.$trigger=re(o||t)[0],this.fixed="fixed"===Fe(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:He({mass:wt(e.releaseMass,1),stiffness:wt(e.releaseStiffness,80),damping:wt(e.releaseDamping,20)}),this.releaseYSpring=c?h:He({mass:wt(e.releaseMass,1),stiffness:wt(e.releaseStiffness,80),damping:wt(e.releaseDamping,20)}),this.releaseEase=l||fe.outQuint,this.hasReleaseSpring=c,this.onGrab=e.onGrab||y,this.onDrag=e.onDrag||y,this.onRelease=e.onRelease||y,this.onUpdate=e.onUpdate||y,this.onSettle=e.onSettle||y,this.onSnap=e.onSnap||y,this.onResize=e.onResize||y,this.onAfterResize=e.onAfterResize||y,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),X(r)||!0===r)f[d]=0;else if(M(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[d]=e}else!1===r&&(f[d]=0,this.disabled[0]=1);if(X(n)||!0===n)f[p]=0;else if(M(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[p]=e}else!1===n&&(f[p]=0,this.disabled[1]=1);this.animate=new Ie(this.$target,f),this.xProp=d,this.yProp=p,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-u,u,u,-u],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=O(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new Qe(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new se({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new se({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!X(m),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?d:p,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=at(n,r)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new se({autoplay:!1,duration:150*A.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=e,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),M(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=O(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,h=this.maxVelocity,l=this.velocityStackIndex;n[l]=ut(ct(J(t*t+e*e)/r*o,a,h),5);const c=ot(n[0],n[1],n[2]);return this.velocity=c,this.velocityStackIndex=(l+1)%3,c}setX(t,e=!1){if(this.disabled[0])return;const s=ut(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=pt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=ut(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=pt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return ut(this.animate[this.xProp](),A.precision)}set x(t){this.setX(t,!1)}get y(){return ut(this.animate[this.yProp](),A.precision)}set y(t){this.setY(t,!1)}get progressX(){return Ye(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(Ye(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return Ye(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(Ye(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=ut(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=ut(this.useWin?s.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=e,this.scrollBounds[0]=e-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=e-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container;if(!t)return;const e=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=s.innerWidth,h=this.window[1]=s.innerHeight,l=this.useWin,c=t.scrollWidth,d=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,_]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?ct(c,a,c):c,this.scrollView[1]=l?ct(d,h,d):d,this.updateScrollCoords();const{width:y,height:v,left:b,top:S,right:T,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=ut(l?ct(y,a,a):y,0),this.dragArea[3]=ut(l?ct(v,h,h):v,0);const x=Fe(t,"overflow"),k="visible"===x,$="hidden"===x;if(this.canScroll=!u&&this.contained&&(t===i.body&&k||!$&&!k)&&(c>this.dragArea[2]+_-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!R(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?l?0:t.scrollLeft:0,o=i?l?0:t.scrollTop:0,c=i?this.scrollView[0]-n-y:0,d=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=ut(r.top+s-(l?0:S),0),this.targetBounds[1]=ut(r.right+e-(l?a:T),0),this.targetBounds[2]=ut(r.bottom+s-(l?h:w),0),this.targetBounds[3]=ut(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+_):(this.containerBounds[0]=-ut(r.top-(u?ct(S,0,h):S)+o-m,0),this.containerBounds[1]=-ut(r.right-(u?ct(T,0,a):T)-c+f,0),this.containerBounds[2]=-ut(r.bottom-(u?ct(w,0,h):w)-d+g,0),this.containerBounds[3]=-ut(r.left-(u?ct(b,0,a):b)+n-_,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(e,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[a,h]=this.disabled,l=!a&&e<o||!a&&e>r,c=!h&&s<i||!h&&s>n;return l&&!c?1:!l&&c?2:l&&c?3:0}refresh(){const t=this.parameters,e=t.x,r=t.y,n=Ge(t.container,this),o=Ge(t.containerPadding,this)||0,a=R(o)?o:[o,o,o,o],h=this.x,l=this.y,c=Ge(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}this.containerArray=R(n)?n:null,this.$container=n&&!this.containerArray?re(n)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=wt(a,[0,0,0,0]),this.containerFriction=ct(wt(Ge(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ct(wt(Ge(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ge(M(e)&&!X(e.snap)?e.snap:t.snap,this),this.snapY=Ge(M(r)&&!X(r.snap)?r.snap:t.snap,this),this.scrollSpeed=wt(Ge(t.scrollSpeed,this),1.5),this.scrollThreshold=wt(Ge(t.scrollThreshold,this),20),this.dragSpeed=wt(Ge(t.dragSpeed,this),1),this.minVelocity=wt(Ge(t.minVelocity,this),0),this.maxVelocity=wt(Ge(t.maxVelocity,this),50),this.velocityMultiplier=wt(Ge(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[u,p,m,f]=this.containerBounds;this.setX(ct(h,f,p),!0),this.setY(ct(l,u,m),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],a=this.dragArea[3],h=this.scroll.x,l=this.scroll.y,c=this.$container.scrollWidth,d=this.$container.scrollHeight,u=this.useWin?ct(c,this.window[0],c):c,p=this.useWin?ct(d,this.window[1],d):d,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,_=this.scrollThreshold,[y,v]=this.coords,[b,S,T,w]=this.scrollBounds,x=ut(ct((v-b+t)/_,-1,0)*g,0),k=ut(ct((y-S-e)/_,0,1)*g,0),$=ut(ct((v-T-s)/_,0,1)*g,0),E=ut(ct((y-w+i)/_,-1,0)*g,0);if(x||$||E||k){const[t,e]=this.disabled;let s=h,i=l;t||(s=ut(ct(h+(E||k),0,r-o),0),this.coords[0]-=h-s),e||(i=ut(ct(l+(x||$),0,n-a),0),this.coords[1]-=l-i),this.useWin?this.$scrollContainer.scrollBy(-(h-s),-(l-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,h,l]=this.pointer;this.coords[0]+=(r-h)*this.dragSpeed,this.coords[1]+=(n-l)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[c,d]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(c>e?e+(c-e)*m:c<i?i+(c-i)*m:c,!1),this.setY(d>s?s+(d-s)*m:d<t?t+(d-t)*m:d,!1),this.computeVelocity(r-h,n-l),this.angle=at(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return Jt([this],null,"x"),Jt([this],null,"y"),Jt([this],null,"progressX"),Jt([this],null,"progressY"),Jt([this.scroll]),Jt([this.overshootCoords]),this}scrollInView(t,e=0,s=fe.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[h,l,c,d]=o,p=ut(ct(r-h,-u,0),0),m=ut(ct(i-l,0,u),0),f=ut(ct(r-c,0,u),0),g=ut(ct(i-d,-u,0),0);new Be(n,{x:ut(n.x+(g?g-e:m?m+e:0),0),y:ut(n.y+(p?p-e:f?f+e:0),0),duration:X(t)?350*A.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Pe(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=fe.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,h]=this.containerPadding,l=this.scroll.y-this.targetBounds[0]+n+e,c=this.scroll.x-this.targetBounds[1]-o-e,d=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+h+e,p=this.isOutOfBounds([l,c,d,u],i,r);if(p){const[e,n]=this.disabled,o=ct(pt(i,this.snapX),u,c),a=ct(pt(r,this.snapY),l,d),h=X(t)?350*A.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,h,s),n||2!==p&&3!==p||this.animate[this.yProp](a,h,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const s=t.changedTouches,r=s?s[0].clientX:t.clientX,n=s?s[0].clientY:t.clientY,{x:o,y:a}=this.transforms.normalizePoint(r,n),[h,l,c,d]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>l?l+(p-l)/u:p<d?d+(p-d)/u:p:p,this.coords[1]=this.coords[3]=u?m>c?c+(m-c)/u:m<h?h+(m-h)/u:m:m,this.pointer[0]=o,this.pointer[1]=a,this.pointer[2]=o,this.pointer[3]=a,this.pointer[4]=o,this.pointer[5]=a,this.pointer[6]=o,this.pointer[7]=a,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=Fe(this.$target,"zIndex",!1);Ze=(f>Ze?f:Ze)+1,this.targetStyles=Pe(this.$target,{zIndex:Ze}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Pe(i.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,fe.out(3)),this.onGrab(this),i.addEventListener("touchmove",this),i.addEventListener("touchend",this),i.addEventListener("touchcancel",this),i.addEventListener("mousemove",this),i.addEventListener("mouseup",this),i.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],a=n-this.pointer[7];let h=t.target,l=!1,c=!1,d=!1;for(;e&&h&&h!==this.$trigger;){const t=Fe(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){d=!0,l=t<=3,c=t>=e-s-3;break}}h=h.parentElement}d&&(!l&&!c||l&&a<0||c&&a>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(qe(t),this.triggerStyles||(this.triggerStyles=Pe(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",qe,{passive:!1}),this.$trigger.addEventListener("touchmove",qe,{passive:!1}),this.$trigger.addEventListener("touchend",qe),(this.dragged||!this.disabled[0]&&et(o)>3||!this.disabled[1]&&et(a)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[s,n,o,a,h,l]=this.pointer,[c,d,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,_=this.releaseYSpring,y=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,S=this.x,T=this.y,w=this.computeVelocity(s-h,n-l),x=this.angle=at(n-a,s-o),k=150*w,$=(1-this.releaseContainerFriction)*this.dragSpeed,E=S+tt(x)*k,C=T+K(x)*k,D=E>d?d+(E-d)*$:E<p?p+(E-p)*$:E,B=C>u?u+(C-u)*$:C<c?c+(C-c)*$:C,L=this.destX=ct(ut(pt(D,this.snapX),5),p,d),N=this.destY=ct(ut(pt(B,this.snapY),5),c,u),F=this.isOutOfBounds(this.containerBounds,E,C);let P=0,O=0,R=y,M=y,z=0;if(b.x=S,b.y=T,!t){const t=L===d?S>d?-1:1:S<p?-1:1,s=ut(S-L,0);g.velocity=e&&v?s?k*t/et(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=g;P=S===L?0:v?r:r-n*A.timeScale,v&&(R=i),P>z&&(z=P)}if(!e){const e=N===u?T>u?-1:1:T<c?-1:1,s=ut(T-N,0);_.velocity=t&&v?s?k*e/et(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=_;O=T===N?0:v?r:r-n*A.timeScale,v&&(M=i),O>z&&(z=O)}if(!v&&F&&$&&(P||O)){const t=r.blend;new Be(b,{x:{to:D,duration:.65*P},y:{to:B,duration:.65*O},ease:y,composition:t}).init(),new Be(b,{x:{to:L,duration:P},y:{to:N,duration:O},ease:y,composition:t}).init(),this.overshootTicker.stretch(ot(P,O)).restart()}else t||this.animate[this.xProp](L,P,R),e||this.animate[this.yProp](N,O,M);this.scrollInView(z,this.scrollThreshold,y);let I=!1;L!==m&&(this.snapped[0]=L,this.snapX&&(I=!0)),N!==f&&this.snapY&&(this.snapped[1]=N,this.snapY&&(I=!0)),I&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",qe),this.$trigger.removeEventListener("touchmove",qe),this.$trigger.removeEventListener("touchend",qe),i.removeEventListener("touchmove",this),i.removeEventListener("touchend",this),i.removeEventListener("touchcancel",this),i.removeEventListener("mousemove",this),i.removeEventListener("mouseup",this),i.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=Pe(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),i.removeEventListener("touchmove",this),i.removeEventListener("touchend",this),i.removeEventListener("touchcancel",this),i.removeEventListener("mousemove",this),i.removeEventListener("mouseup",this),i.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":qe(t)}}}const Ke=(t=y)=>new se({duration:1*A.timeScale,onComplete:t},null,0).resume(),ts=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const a=t(...s);return a&&!Y(a)&&a.revert&&(e=a),X(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||y}};class es{constructor(t={}){L.current&&L.current.register(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||re(e)[0]||i);const n=t.defaults,o=A.defaults,a=t.mediaQueries;if(this.defaults=n?yt(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const e=s.matchMedia(a[t]);this.mediaQueryLists[t]=e,e.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=L.current,s=L.root,i=A.defaults;L.current=this,L.root=this.root,A.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return L.current=e,L.root=s,A.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);Y(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,Y(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);Y(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,Y(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);Y(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(Y(s))return s(this);const i=ts(t);let r;return this.constructorsOnce[e]=i,this.execute(()=>{r=i(this)}),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,a=s.length,h=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;h--;)i[h](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const ss=(t,e)=>t&&Y(t)?t(e):t,is=new Map;class rs{constructor(t){this.element=t,this.useWin=this.element===i.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new se({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;vt(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new se({autoplay:!1,frameRate:30,onUpdate:t=>{const e=t.deltaTime,s=this.prevScrollX,i=this.prevScrollY,r=this.scrollX,n=this.scrollY,o=s-r,a=i-n;this.prevScrollX=r,this.prevScrollY=n,o&&(this.backwardX=s>r),a&&(this.backwardY=i>n),this.velocity=ut(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new se({autoplay:!1,duration:250*A.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new se({autoplay:!1,duration:500*A.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?s:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,e=this.element;this.scrollX=ut(t?s.scrollX:e.scrollLeft,0),this.scrollY=ut(t?s.scrollY:e.scrollTop,0)}updateWindowBounds(){this.winWidth=s.innerWidth,this.winHeight=(()=>{const t=i.createElement("div");i.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return i.body.removeChild(t),e})()}updateBounds(){const t=getComputedStyle(this.element),e=this.element;let s,i;if(this.scrollWidth=e.scrollWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),this.scrollHeight=e.scrollHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom),this.updateWindowBounds(),this.useWin)s=this.winWidth,i=this.winHeight;else{const t=e.getBoundingClientRect();s=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left}this.width=s,this.height=i}refreshScrollObservers(){vt(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),vt(this,t=>{t.refresh(),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?s:this.element).removeEventListener("scroll",this),is.delete(this.element)}}const ns=(t,e,s,i,r)=>{const n="min"===e,o="max"===e,a="top"===e||"left"===e||"start"===e||n?0:"bottom"===e||"right"===e||"end"===e||o?"100%":"center"===e?"50%":e,{n:h,u:l}=Dt(a,Lt);let c=h;return"%"===l?c=h/100*s:l&&(c=he(t,Lt,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},os=(t,e,s,i,r)=>{let n;if(I(e)){const o=C.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),c="min"===l[0],d="max"===l[0],u=ns(t,l[0],s,i,r),p=ns(t,l[1],s,i,r);if(c){const e=Ct(ns(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=Ct(ns(t,"max",s),p,h);n=e>u?u:e}else n=Ct(u,p,h)}else n=ns(t,e,s,i,r)}else n=e;return ut(n,0)},as=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[o]){e=i;break}}return e};let hs=0;const ls=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class cs{constructor(t={}){L.current&&L.current.register(this);const e=wt(t.sync,"play pause"),s=e?ve(e):null,r=e&&("linear"===e||e===le),n=e&&!(s===le&&!r),o=e&&(z(e)||!0===e||r),a=e&&I(e)&&!n&&!o,h=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,l=a&&h.length>2;this.index=hs++,this.id=X(t.id)?this.index:t.id,this.container=(t=>{const e=t&&re(t)[0]||i.body;let s=is.get(e);return s||(s=new rs(e),is.set(e,s)),s})(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!h,this.syncEase=n?s:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=h&&!l&&h[0]?h[0]:y,this.onSyncLeave=h&&!l&&h[1]?h[1]:y,this.onSyncEnterForward=h&&l&&h[0]?h[0]:y,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:y,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:y,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:y,this.onEnter=t.onEnter||y,this.onLeave=t.onLeave||y,this.onEnterForward=t.onEnterForward||y,this.onLeaveForward=t.onLeaveForward||y,this.onEnterBackward=t.onEnterBackward||y,this.onLeaveBackward=t.onLeaveBackward||y,this.onUpdate=t.onUpdate||y,this.onSyncComplete=t.onSyncComplete||y,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=wt(t.debug,!1),this._next=null,this._prev=null,St(this.container,this),Ke(()=>{if(!this.reverted){if(!this.target){const e=re(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,X(t)||(t.persist=!0),!this._params.target)){let e;X(t.targets)?vt(t,t=>{t.targets&&!e&&(e=as(t))}):e=as(t),this.target=e||i.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:ut(ct(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=wt(ss(t.repeat,this),!0),this.horizontal="x"===wt(ss(t.axis,this),"y"),this.enter=wt(ss(t.enter,this),"end start"),this.leave=wt(ss(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,s=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=i.createElement("div"),n=i.createElement("div"),o=i.createElement("div"),a=ls[this.index%ls.length],h=t.useWin,l=h?t.winWidth:t.width,c=h?t.winHeight:t.height,d=t.scrollWidth,u=t.scrollHeight,p=this.container.width>360?320:260,m=e?0:10,f=e?10:0,g=e?24:p/2,_=e?g:15,y=e?60:g,v=e?y:_,b=e?"repeat-x":"repeat-y",S=t=>e?"0px "+t+"px":t+"px 2px",T=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,w=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${w("absolute",m,f,e?d:p,e?p:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${e?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,n.style.cssText=`${w("sticky",0,0,e?l:g,e?g:c)}`,s||(n.style.cssText+=`background:\n ${T("#FFFF")}${S(g-10)} / 100px 100px ${b},\n ${T("#FFF8")}${S(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${w("relative",0,0,e?d:g,e?g:u)}`,s||(o.style.cssText+=`background:\n ${T("#FFFF")}${S(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${T("#FFF8")}${S(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const x=[" enter: "," leave: "];this.coords.forEach((t,s)=>{const r=s>1,h=(r?0:this.offset)+t,m=s%2,f=h<v,g=h>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,S=i.createElement("div"),T=i.createElement("div"),k=e?b?"right":"left":b?"bottom":"top",$=b?(e?y:_)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;T.innerHTML=`${this.id}${x[m]}${this.thresholds[s]}`,S.style.cssText=`${w("absolute",0,0,y,_)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${k}: 2px solid ${a};\n `,T.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${_};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?a:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":a};\n border: 2px solid ${m?a:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,S.appendChild(T);let E=h-$+(e?1:0);S.style[e?"left":"top"]=`${E}px`,(r?n:o).appendChild(S)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Fe(t.element,"position")&&(this.debugStyles=Pe(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,s=this.container,r=this.horizontal,n=this.linked;let o,a=e;for(n&&(o=n.currentTime,n.seek(0,!0)),a.parentElement;a&&a!==s.element&&a!==i.body;){const e="sticky"===Fe(a,"position")&&Pe(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const h=e.getBoundingClientRect(),l=r?h.left+s.scrollX-s.left:h.top+s.scrollY-s.top,c=r?h.width:h.height,d=r?s.width:s.height,u=(r?s.scrollWidth:s.scrollHeight)-d,p=this.enter,m=this.leave;let f="start",g="end",_="end",y="start";if(I(p)){const t=p.split(" ");_=t[0],f=t.length>1?t[1]:f}else if(M(p)){const t=p;X(t.container)||(_=t.container),X(t.target)||(f=t.target)}else z(p)&&(_=p);if(I(m)){const t=m.split(" ");y=t[0],g=t.length>1?t[1]:g}else if(M(m)){const t=m;X(t.container)||(y=t.container),X(t.target)||(g=t.target)}else z(m)&&(y=m);const v=os(e,f,c),b=os(e,g,c),S=v+l-d,T=b+l-u,w=os(e,_,d,S,T),x=os(e,y,d,S,T),k=v+l-w,$=b+l-x,E=$-k;this.offset=l,this.offsetStart=k,this.offsetEnd=$,this.distance=E<=0?0:E,this.thresholds=[f,g,_,y],this.coords=[v,b,w,x],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,l=a>=this.offsetEnd,c=!h&&!l,d=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&d,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(h&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&z(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=ut(mt(e,g,mt(.01,.2,i))+s,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(c&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(c&&(this.isInView=!0),this.forceEnter&&this.hasEntered?c&&(this.forceEnter=!1):(p&&c&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(c||!c&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!c&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return bt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const ds=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,us=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?le:r=>0===r||1===r?r:ds(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=ds(r,e,s)-t,i>0?o=r:n=r}while(et(i)>1e-7&&++a<100);return r})(r,t,s),e,i),ps=(t=10,e)=>{const s=e?it:rt;return e=>s(ct(e,0,1)*t)*(1/t)},ms=(...t)=>{const e=t.length;if(!e)return le;const s=e-1,i=t[0],r=t[s],n=[0],o=[G(i)];for(let e=1;e<s;e++){const i=t[e],r=I(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(X(h)?e/s:G(h)/100),o.push(G(a))}return o.push(G(r)),n.push(1),function(t){for(let e=1,s=n.length;e<s;e++){const s=n[e];if(t<=s){const i=n[e-1],r=o[e-1];return r+(o[e]-r)*(t-i)/(s-i)}}return o[o.length-1]}},fs=(t=10,e=1)=>{const s=[0],i=t-1;for(let t=1;t<i;t++){const r=s[t-1],n=t/i,o=n*(1-e)+(n+((t+1)/i-n)*Math.random())*e;s.push(ct(o,r,1))}return s.push(1),ms(...s)};var gs=Object.freeze({__proto__:null,Spring:Ve,createSpring:Ue,cubicBezier:us,eases:fe,irregular:fs,linear:ms,spring:He,steps:ps});const _s=Xe,ys={},vs=t=>(...e)=>{const s=t(...e);return new Proxy(y,{apply:(t,e,[i])=>s(i),get:(t,e)=>vs((...t)=>{const i=ys[e](...t);return t=>i(s(t))})})},bs=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?vs(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return ys[t]||(ys[t]=i),i},Ss=bs("roundPad",_s.roundPad),Ts=bs("padStart",_s.padStart),ws=bs("padEnd",_s.padEnd),xs=bs("wrap",_s.wrap),ks=bs("mapRange",_s.mapRange),$s=bs("degToRad",_s.degToRad),Es=bs("radToDeg",_s.radToDeg),Cs=bs("snap",_s.snap),Ds=bs("clamp",_s.clamp),Bs=bs("round",_s.round),Ls=bs("lerp",_s.lerp,1),As=bs("damp",_s.damp,1),Ns=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Fs=0;const Ps=(t,e=0,s=1,i=0)=>{let r=void 0===t?Fs++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},Os=t=>t[Ns(0,t.length-1)],Rs=t=>{let e,s,i=t.length;for(;i;)s=Ns(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},Ms=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!X(o),h=a&&!X(o.ease)?o.ease:a?ve(o):null,l=e.grid,c=e.axis,d=e.total,u=X(r)||0===r||"first"===r,p="center"===r,f="last"===r,g="random"===r,_=R(t),y=e.use,v=G(_?t[0]:t),b=_?G(t[1]):0,S=k.exec((_?t[1]:t)+m),T=e.start||0+(_?v:0);let w=u?0:z(r)?r:0;return(t,r,o,a)=>{const[u]=ne(t),m=X(d)?o:d,x=!X(y)&&(Y(y)?y(u,r,m):Et(u,y)),k=z(x)||I(x)&&z(+x)?+x:r;if(p&&(w=(m-1)/2),f&&(w=m-1),!s.length){for(let t=0;t<m;t++){if(l){const e=p?(l[0]-1)/2:w%l[0],i=p?(l[1]-1)/2:rt(w/l[0]),r=e-t%l[0],n=i-rt(t/l[0]);let o=J(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(et(w-t));i=ot(...s)}h&&(s=s.map(t=>h(t/i)*i)),n&&(s=s.map(t=>c?t<0?-1*t:-t:et(i-t))),g&&(s=Rs(s))}const $=_?(b-v)/i:v;let E=(a?Re(a,X(e.start)?a.iterationDuration:T):T)+($*ut(s[k],2)||0);return e.modifier&&(E=e.modifier(E)),S&&(E=`${E}${S[2]}`),E}};var zs=Object.freeze({__proto__:null,$:ne,clamp:Ds,cleanInlineStyles:Ot,createSeededRandom:Ps,damp:As,degToRad:$s,get:Fe,keepTime:ts,lerp:Ls,mapRange:ks,padEnd:ws,padStart:Ts,radToDeg:Es,random:Ns,randomPick:Os,remove:Oe,round:Bs,roundPad:Ss,set:Pe,shuffle:Rs,snap:Cs,stagger:Ms,sync:Ke,wrap:xs});const Is=t=>{const e=re(t)[0];return e&&V(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},Ys=(t,e,s=0)=>t.getPointAtLength(e+s>=1?e+s:0),Xs=(t,e)=>s=>{const i=+t.getTotalLength(),r=s[a],n=t.getCTM();return{from:0,to:i,modifier:s=>{if("a"===e){const e=Ys(t,s,-1),i=Ys(t,s,1);return 180*at(i.y-e.y,i.x-e.x)/ht}{const i=Ys(t,s,0);return"x"===e?r||!n?i.x:i.x*n.a+i.y*n.c+n.e:r||!n?i.y:i.x*n.b+i.y*n.d+n.f}}}},Ws=t=>{const e=Is(t);if(e)return{translateX:Xs(e,"x"),translateY:Xs(e,"y"),rotate:Xs(e,"a")}},Vs=(t,e=0,s=0)=>re(t).map(t=>((t,e,s)=>{const i=p,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const h=new Proxy(t,{get(t,e){const s=t[e];return e===c?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],h=+s[1],l=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(J(s.a*s.a+s.b*s.b)+J(s.c*s.c+s.d*s.d))/2)}return e})(o),c=-1e3*r*l,d=h*i*l+c,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-d;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${c}`),t.setAttribute("stroke-dasharray",`${d} ${u}`)}return Reflect.apply(s,t,e)}:Y(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),h.setAttribute("draw",`${e} ${s}`)),h})(t,e,s)),Hs=(t,e=.33)=>s=>{const i=Is(t);if(!i)return;const r="path"===s.tagName,n=r?" ":",",o=s[l];o&&s.setAttribute(r?"d":"points",o);let a="",h="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),l=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<l;e++){const c=e/(l-1),d=s.getPointAtLength(t*c),u=i.getPointAtLength(o*c),p=r?0===e?"M":"L":"";a+=p+ut(d.x,3)+n+d.y+" ",h+=p+ut(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),h=i.getAttribute(r?"d":"points");return s[l]=h,[a,h]};var Us=Object.freeze({__proto__:null,createDrawable:Vs,createMotionPath:Ws,morphTo:Hs});const qs="undefined"!=typeof Intl&&Intl.Segmenter,js=/\{value\}/g,Qs=/\{i\}/g,Gs=/(\s+)/,Zs=/^\s+$/,Js="line",Ks="word",ti="char",ei="data-line";let si=null,ii=null,ri=null;const ni=t=>t.isWordLike||" "===t.segment||z(+t.segment),oi=t=>t.setAttribute("aria-hidden","true"),ai=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],hi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},li=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&li(e)}},ci=(t,e,s)=>{const i=t.getAttribute(ei);(null!==i&&+i!==e||"BR"===t.tagName)&&s.add(t);let r=t.childElementCount;for(;r--;)ci(t.children[r],e,s);return s},di=(t,e={})=>{let s="";const i=I(e.class)?` class="${e.class}"`:"",r=wt(e.clone,!1),n=wt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},ui=(t,e,s,i,r,n,o,a,h)=>{const l=r===Js,c=r===ti,d=`_${r}_`,u=Y(t)?t(s):t,p=l?"block":"inline-block";ri.innerHTML=u.replace(js,`<i class="${d}"></i>`).replace(Qs,`${c?h:l?o:a}`);const m=ri.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,_=m.querySelectorAll(`i.${d}`),y=_.length;if(y){f.style.display=p,g.style.display=p,g.setAttribute(ei,`${o}`),l||(g.setAttribute("data-word",`${a}`),c&&g.setAttribute("data-char",`${h}`));let t=y;for(;t--;){const e=_[t],i=e.parentElement;i.style.display=p,l?i.innerHTML=s.innerHTML:i.replaceChild(s.cloneNode(!0),e)}e.push(g),i.appendChild(m)}else console.warn('The expression "{value}" is missing from the provided template.');return n&&(f.style.outline=`1px dotted ${hi[r]}`),f};class pi{constructor(t,s={}){si||(si=qs?new qs([],{granularity:Ks}):{segment:t=>{const e=[],s=t.split(Gs);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Zs.test(i)})}return e}}),ii||(ii=qs?new qs([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!ri&&e&&(ri=i.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:h,debug:l}=s,c=(t=R(t)?t[0]:t)&&t.nodeType?t:(ie(t)||[])[0],d=!0===o?{}:o,u=!0===r||X(r)?{}:r,p=!0===n?{}:n;this.debug=wt(l,!1),this.includeSpaces=wt(h,!1),this.accessible=wt(a,!0),this.linesOnly=d&&!u&&!p,this.lineTemplate=M(d)?di(Js,d):d,this.wordTemplate=M(u)||this.linesOnly?di(Ks,u):u,this.charTemplate=M(p)?di(ti,p):p,this.$target=c,this.html=c&&c.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(d||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=c.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?i.fonts.ready.then(m):m(),c?this.resizeObserver.observe(c):console.warn("No Text Splitter target found.")}addEffect(t){if(!Y(t))return console.warn("Effect must return a function.");const e=ts(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(t=>Y(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,s=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],h=this.words,l=this.chars,c=si.segment(o),d=i.createDocumentFragment();let u=null;for(const t of c){const e=t.segment,s=ni(t);if(!u||s&&u&&ni(u))a.push(e);else{const t=a.length-1;a[t].includes(" ")||e.includes(" ")?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const c=a[t+1],u=r&&c&&!c.trim(),p=o,m=s?ii.segment(p):null,f=s?i.createDocumentFragment():i.createTextNode(u?o+" ":o);if(s){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,c=i.createTextNode(a);ui(s,l,c,f,ti,n,-1,h.length,l.length)}}e?ui(e,h,f,d,Ks,n,-1,h.length,l.length):s?d.appendChild(f):d.appendChild(i.createTextNode(o)),u&&t++}else{if(t&&r)continue;d.appendChild(i.createTextNode(o))}}t.parentNode.replaceChild(d,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,s=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==i.fonts.status,h=r&&a;this.ready=!r||a,(h||t)&&this.effectsCleanups.forEach(t=>Y(t)&&t(this)),s||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),h&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=ai(e,Ks))),o&&(h||n)&&(this.chars=ai(e,ti));const l=this.words.length?this.words:this.chars;let c,d=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();c&&s-c>.5*i&&d++,e.setAttribute(ei,`${d}`);const r=e.querySelectorAll(`[${ei}]`);let n=r.length;for(;n--;)r[n].setAttribute(ei,`${d}`);c=s}if(h){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<d+1;t++){const i=e.cloneNode(!0);ci(i,t,new Set).forEach(t=>{const e=t.parentElement;e&&s.add(e),t.remove()}),a.push(i)}s.forEach(li);for(let e=0,s=a.length;e<s;e++)ui(r,this.lines,a[e],t,Js,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=ai(e,Ks)),o&&(this.chars=ai(e,ti))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(h||!s)){const t=i.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(oi),this.words.forEach(oi),this.chars.forEach(oi)}return this.width=e.offsetWidth,(h||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const mi=(t,e)=>new pi(t,e),fi=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new pi(t,e));var gi=Object.freeze({__proto__:null,TextSplitter:pi,split:fi,splitText:mi});const _i=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(ut(t(i/e),4));return`linear(${s.join(", ")})`},yi={},vi=t=>{let e=yi[t];if(e)return e;if(e="linear",I(t)){if(P(t,"linear")||P(t,"cubic-")||P(t,"steps")||P(t,"ease"))e=t;else if(P(t,"cubicB"))e=F(t);else{const s=_e(t);Y(s)&&(e=s===le?"linear":_i(s))}yi[t]=e}else if(Y(t)){const s=_i(t);s&&(e=s)}else t.ease&&(e=_i(t.ease));return e},bi=["x","y","z"],Si=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...bi],Ti=(()=>[...bi,...g.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let wi=null;const xi=(t,e,s,i,r)=>{let n=I(e)?e:xt(e,s,i,r);return z(n)?Si.includes(t)||P(t,"translate")?`${n}px`:P(t,"rotate")||P(t,"skew")?`${n}deg`:`${n}`:n},ki=(t,e,s,i,r,n)=>{let o="0";const a=X(i)?getComputedStyle(t)[e]:xi(e,i,t,r,n);return o=X(s)?R(i)?i.map(s=>xi(e,s,t,r,n)):a:[xi(e,s,t,r,n),a],o};class $i{constructor(t,s){L.current&&L.current.register(this),W(wi)&&(!e||!X(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(g.forEach(t=>{const e=P(t,"skew"),s=P(t,"scale"),i=P(t,"rotate"),r=P(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}}),wi=!0):wi=!1);const i=ne(t),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=wt(s.ease,vi(A.defaults.ease)),o=n.ease&&n,a=wt(s.autoplay,A.defaults.autoplay),l=!(!a||!a.link)&&a,c=s.alternate&&!0===s.alternate,d=s.reversed&&!0===s.reversed,u=wt(s.loop,A.defaults.loop),v=!0===u||u===1/0?1/0:z(u)?u+1:1,b=c?d?"alternate-reverse":"alternate":d?"reverse":"normal",S=vi(n),T=1===A.timeScale?1:p;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||A.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==l,this.reversed=d,this.persist=wt(s.persist,A.defaults.persist),this.autoplay=a,this._speed=wt(s.playbackRate,A.defaults.playbackRate),this._resolve=y,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[h],a=Ti.some(t=>s.hasOwnProperty(t)),l=t.style,c=this._inlineStyles[e]={},d=(o?o.settlingDuration:xt(wt(s.duration,A.defaults.duration),t,e,r))*T,u=xt(wt(s.delay,A.defaults.delay),t,e,r)*T,p=wt(s.composition,"replace");for(let o in s){if(!j(o))continue;const h={},m={iterations:v,direction:b,fill:"both",easing:S,duration:d,delay:u,composite:p},_=s[o],y=!!a&&(g.includes(o)?o:f.get(o)),w=y?"transform":o;let x;if(c[w]||(c[w]=l[w]),M(_)){const s=_,a=wt(s.ease,n),c=a.ease&&a,f=s.to,g=s.from;if(m.duration=(c?c.settlingDuration:xt(wt(s.duration,d),t,e,r))*T,m.delay=xt(wt(s.delay,u),t,e,r)*T,m.composite=wt(s.composition,p),m.easing=vi(a),x=ki(t,o,g,f,e,r),y?(h[`--${y}`]=x,i[y]=x):h[o]=ki(t,o,g,f,e,r),Ne(this,t,o,h,m),!X(g))if(y){const t=`--${y}`;l.setProperty(t,h[t][0])}else l[o]=h[o][0]}else x=R(_)?_.map(s=>xi(o,s,t,e,r)):xi(o,_,t,e,r),y?(h[`--${y}`]=x,i[y]=x):h[o]=x,Ne(this,t,o,h,m)}if(a){let t=m;for(let e in i)t+=`${_[e]}var(--${e})) `;l.transform=t}}),l&&this.autoplay.link(this)}forEach(t){const e=I(t)?e=>e[t]():t;return this.animations.forEach(e),this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach(e=>e.playbackRate=t)}get currentTime(){const t=this.controlAnimation,e=A.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===A.timeScale?1:p);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel")}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let t in i){const e=i[t];X(e)||e===m?s.removeProperty(F(t)):s[t]=e}t.getAttribute("style")===m&&t.removeAttribute("style")}),this}then(t=y){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=y};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const Ei={animate:(t,e)=>new $i(t,e),convertEase:_i};t.$=ne,t.Animatable=Ie,t.Draggable=Je,t.JSAnimation=Be,t.Scope=es,t.ScrollObserver=cs,t.Spring=Ve,t.TextSplitter=pi,t.Timeline=ze,t.Timer=se,t.WAAPIAnimation=$i,t.animate=(t,e)=>new Be(t,e,null,0,!1).init(),t.clamp=Ds,t.cleanInlineStyles=Ot,t.createAnimatable=(t,e)=>new Ie(t,e),t.createDraggable=(t,e)=>new Je(t,e),t.createDrawable=Vs,t.createMotionPath=Ws,t.createScope=t=>new es(t),t.createSeededRandom=Ps,t.createSpring=Ue,t.createTimeline=t=>new ze(t).init(),t.createTimer=t=>new se(t,null,0).init(),t.cubicBezier=us,t.damp=As,t.degToRad=$s,t.eases=fe,t.easings=gs,t.engine=Xt,t.get=Fe,t.irregular=fs,t.keepTime=ts,t.lerp=Ls,t.linear=ms,t.mapRange=ks,t.morphTo=Hs,t.onScroll=(t={})=>new cs(t),t.padEnd=ws,t.padStart=Ts,t.radToDeg=Es,t.random=Ns,t.randomPick=Os,t.remove=Oe,t.round=Bs,t.roundPad=Ss,t.scrollContainers=is,t.set=Pe,t.shuffle=Rs,t.snap=Cs,t.split=fi,t.splitText=mi,t.spring=He,t.stagger=Ms,t.steps=ps,t.svg=Us,t.sync=Ke,t.text=gi,t.utils=zs,t.waapi=Ei,t.wrap=xs});
|
|
7
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).anime={})}(this,function(t){"use strict";const e="undefined"!=typeof window,s=e?window:null,i=e?document:null,r={replace:0,none:1,blend:2},n=Symbol(),o=Symbol(),a=Symbol(),h=Symbol(),l=Symbol(),c=Symbol(),d=1e-11,u=1e12,p=1e3,m="",f=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),g=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],y=g.reduce((t,e)=>({...t,[e]:e+"("}),{}),_=()=>{},v=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,b=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,S=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,w=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,T=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,x=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,$=/([a-z])([A-Z])/g,C=/(\w+)(\([^)]+\)+)/g,E=/(\*=|\+=|-=)/,D=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,B={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:p,delay:0,loopDelay:0,ease:"out(2)",composition:r.replace,modifier:t=>t,onBegin:_,onBeforeUpdate:_,onUpdate:_,onLoop:_,onPause:_,onComplete:_,onRender:_},L={current:null,root:i},N={defaults:B,precision:4,timeScale:1,tickThreshold:200},A={version:"4.2.2",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(A));const F=t=>t.replace($,"$1-$2").toLowerCase(),P=(t,e)=>0===t.indexOf(e),O=Date.now,R=Array.isArray,M=t=>t&&t.constructor===Object,z=t=>"number"==typeof t&&!isNaN(t),I=t=>"string"==typeof t,Y=t=>"function"==typeof t,X=t=>void 0===t,V=t=>X(t)||null===t,W=t=>e&&t instanceof SVGElement,H=t=>v.test(t),U=t=>P(t,"rgb"),q=t=>P(t,"hsl"),j=t=>!N.defaults.hasOwnProperty(t),G=["opacity","rotate","overflow","color"],Q=t=>I(t)?parseFloat(t):t,Z=Math.pow,J=Math.sqrt,K=Math.sin,tt=Math.cos,et=Math.abs,st=Math.exp,it=Math.ceil,rt=Math.floor,nt=Math.asin,ot=Math.max,at=Math.atan2,ht=Math.PI,lt=Math.round,ct=(t,e,s)=>t<e?e:t>s?s:t,dt={},ut=(t,e)=>{if(e<0)return t;if(!e)return lt(t);let s=dt[e];return s||(s=dt[e]=10**e),lt(t*s)/s},pt=(t,e)=>R(e)?e.reduce((e,s)=>et(s-t)<et(e-t)?s:e):e?lt(t/e)*e:t,mt=(t,e,s)=>t+(e-t)*s,ft=t=>t===1/0?u:t===-1/0?-u:t,gt=t=>t<=d?d:ft(ut(t,11)),yt=t=>R(t)?[...t]:t,_t=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=X(r)?e[i]:r}return s},vt=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},bt=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},St=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o},wt=(t,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t),Tt=(t,e)=>X(t)?e:t,xt=(t,e,s,i,r)=>{let n;if(Y(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!I(t)||!P(t,"var("))return t;n=()=>{const s=t.match(D),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==m||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},kt=(t,e)=>t[o]?t[a]&&((t,e)=>{if(G.includes(e))return!1;if(t.getAttribute(e)||e in t){if("scale"===e){const e=t.parentNode;return e&&"filter"===e.tagName}return!0}})(t,e)?1:g.includes(e)||f.get(e)?3:P(e,"--")?4:e in t.style?2:e in t?0:1:0,$t=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[c]||t).getPropertyValue(e);return"auto"===r?"0":r},Ct=(t,e,s,i)=>{const r=X(s)?kt(t,e):s;return 0===r?t[e]||0:1===r?t.getAttribute(e):3===r?((t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[h];let o;for(;o=C.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!X(r)?r:P(e,"scale")?"1":P(e,"rotate")||P(e,"skew")?"0deg":"0px"})(t,e,i):4===r?$t(t,e,i).trimStart():$t(t,e,i)},Et=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Dt=(t,e)=>{if(e.t=0,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const n=!s.includes(" ")&&k.exec(s);if(n)return e.t=1,e.n=+n[1],e.u=n[2],e;if(e.o)return e.n=+s,e;if(H(r=s)||U(r)||q(r))return e.t=2,e.d=U(i=s)?(t=>{const e=b.exec(t)||S.exec(t),s=X(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):H(i)?(t=>{const e=t.length,s=4===e||5===e;return[+("0x"+t[1]+t[s?1:2]),+("0x"+t[s?2:3]+t[s?2:4]),+("0x"+t[s?3:5]+t[s?3:6]),5===e||9===e?+(+("0x"+t[s?4:7]+t[s?4:8])/255).toFixed(3):1]})(i):q(i)?(t=>{const e=w.exec(t)||T.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=X(e[4])?1:+e[4];let o,a,h;if(0===i)o=a=h=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=ut(255*wt(e,t,s+1/3),0),a=ut(255*wt(e,t,s),0),h=ut(255*wt(e,t,s-1/3),0)}return[o,a,h,n]})(i):[0,0,0,1],e;{const t=s.match(x);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(x)||[],e}}var i,r;return e.n=s,e},Bt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=yt(t._toNumbers),e.s=yt(t._strings),e),Lt={t:0,n:0,u:null,o:null,d:null,s:null},Nt=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,l=t.completed,c=t.iterationDuration,u=t.iterationCount,p=t._currentIteration,f=t._loopDelay,g=t._reversed,_=t._alternate,v=t._hasChildren,b=t._delay,S=t._currentTime,w=b+c,T=e-b,x=ct(S,-b,a),k=ct(T,-b,a),$=T-S,C=k>0,E=k>=a,D=a<=d,B=2===n;let L=0,A=T,F=0;if(u>1){const e=~~(k/(c+(E?0:f)));t._currentIteration=ct(e,0,u),E&&t._currentIteration--,L=t._currentIteration%2,A=k%(c+f)||0}const P=g^(_&&L),O=t._ease;let R=E?P?0:a:P?c-A:A;O&&(R=c*O(R/c)||0);const M=(o?o.backwards:T<S)?!P:!!P;if(t._currentTime=T,t._iterationTime=R,t.backwards=M,C&&!t.began?(t.began=!0,s||o&&(M||!o.began)||t.onBegin(t)):T<=0&&(t.began=!1),s||v||!C||t._currentIteration===p||t.onLoop(t),B||1===n&&(e>=b&&e<=w||e<=b&&x>b||e>=w&&x!==a)||R>=w&&x!==a||R<=b&&x>0||e<=x&&x===a&&l||E&&!l&&D){if(C&&(t.computeDeltaTime(x),s||t.onBeforeUpdate(t)),!v){const e=B||(M?-1*$:$)>=N.tickThreshold,n=t._offset+(o?o._offset:0)+b+R;let a,l,c,d,u=t._head,p=0;for(;u;){const t=u._composition,s=u._currentTime,o=u._changeDuration,f=u._absoluteStartTime+u._changeDuration,g=u._nextRep,_=u._prevRep,v=t!==r.none;if((e||(s!==o||n<=f+(g?g._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!v||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!g||g._isOverridden||n<=g._absoluteStartTime)&&(!_||_._isOverridden||n>=_._absoluteStartTime+_._changeDuration+u._delay))){const e=u._currentTime=ct(R-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,m=u._valueType,f=u._tweenType,g=0===f,y=0===m,_=y&&g||0===s||1===s?-1:N.precision;let b,S;if(y)b=S=n(ut(mt(u._fromNumber,u._toNumber,s),_));else if(1===m)S=n(ut(mt(u._fromNumber,u._toNumber,s),_)),b=`${S}${u._unit}`;else if(2===m){const t=u._fromNumbers,e=u._toNumbers,i=ut(ct(n(mt(t[0],e[0],s)),0,255),0),r=ut(ct(n(mt(t[1],e[1],s)),0,255),0),o=ut(ct(n(mt(t[2],e[2],s)),0,255),0),a=ct(n(ut(mt(t[3],e[3],s),_)),0,1);if(b=`rgba(${i},${r},${o},${a})`,v){const t=u._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(3===m){b=u._strings[0];for(let t=0,e=u._toNumbers.length;t<e;t++){const e=n(ut(mt(u._fromNumbers[t],u._toNumbers[t],s),_)),i=u._strings[t+1];b+=`${i?e+i:e}`,v&&(u._numbers[t]=e)}}if(v&&(u._number=S),i||t===r.blend)u._value=b;else{const t=u.property;a=u.target,g?a[t]=b:1===f?a.setAttribute(t,b):(l=a.style,3===f?(a!==c&&(c=a,d=a[h]),d[t]=b,p=1):2===f?l[t]=b:4===f&&l.setProperty(t,b)),C&&(F=1)}}if(p&&u._renderTransforms){let t=m;for(let e in d)t+=`${y[e]}${d[e]}) `;l.transform=t,p=0}u=u._next}!s&&F&&t.onRender(t)}!s&&C&&t.onUpdate(t)}return o&&D?!s&&(o.began&&!M&&T>0&&!l||M&&T<=d&&l)&&(t.onComplete(t),t.completed=!M):C&&E?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||v||(t.completed=!0,s||o&&(M||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,F},At=(t,e,s,i,r)=>{const n=t._currentIteration;if(Nt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,h=i?e:o._iterationTime,l=O();let c=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;vt(o,e=>{if(a){const i=e.duration,r=e._offset+e._delay;s||!(i<=d)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Nt(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}vt(o,t=>{const e=ut((h-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;c+=Nt(t,e,s,i,n),!t.completed&&u&&(u=!1)},a),!s&&c&&o.onRender(o),(u||a)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},Ft={},Pt=(t,e,s)=>{if(3===s)return f.get(t)||t;if(2===s||1===s&&W(e)&&t in e.style){const e=Ft[t];if(e)return e;{const e=t?F(t):t;return Ft[t]=e,e}}return t},Ot=t=>{if(t._hasChildren)vt(t,Ot,!0);else{const e=t;e.pause(),vt(e,t=>{const s=t.property,i=t.target;if(i[o]){const r=i.style,n=t._inlineValue,o=V(n)||n===m;if(3===t._tweenType){const e=i[h];if(o?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=m;for(let s in e)t+=y[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else o?r.removeProperty(F(s)):r[s]=n;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===m&&t.removeAttribute("style")})}})}return t};class Rt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=ut(p/120,0),this._fps=120,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<d?d:s,r=ut(p/i,0);this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<d?d:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return 0;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Mt={animation:null,update:_},zt=(()=>e?requestAnimationFrame:setImmediate)(),It=(()=>e?cancelAnimationFrame:clearImmediate)();class Yt extends Rt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=B,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=O();if(this.requestTick(t)){this.computeDeltaTime(t);const e=this._speed,s=this._fps;let i=this._head;for(;i;){const r=i._next;i.paused?(bt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):At(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}Mt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(O()),this.reqId=zt(Vt)),this}pause(){if(this.reqId)return this.paused=!0,Wt()}resume(){if(this.paused)return this.paused=!1,vt(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===N.timeScale?1:p)}set speed(t){this._speed=t*N.timeScale,vt(this,t=>t.speed=t._speed)}get timeUnit(){return 1===N.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(N.timeScale!==s){N.timeScale=s,N.tickThreshold=200*s;const t=e?.001:p;this.defaults.duration*=t,this._speed*=t}}get precision(){return N.precision}set precision(t){N.precision=t}}const Xt=(()=>{const t=new Yt(O());return e&&(A.engine=t,i.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())})),t})(),Vt=()=>{Xt._head?(Xt.reqId=zt(Vt),Xt.update()):Xt.reqId=0},Wt=()=>(It(Xt.reqId),Xt.reqId=0,Xt),Ht={_rep:new WeakMap,_add:new Map},Ut=(t,e,s="_rep")=>{const i=Ht[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},qt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,jt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=d,t._currentTime=d},Gt=(t,e)=>{const s=t._composition;if(s===r.replace){const s=t._absoluteStartTime;St(e,t,qt,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){jt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)jt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=ut(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<d&&jt(i)}let o=!0;if(vt(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;vt(t,t=>{t!==e&&vt(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===r.blend){const e=Ut(t.target,t.property,"_add"),s=(t=>{let e=Mt.animation;return e||(e={duration:d,computeDeltaTime:_,_offset:0,_delay:0,_head:null,_tail:null},Mt.animation=e,Mt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=3===t||2===t?yt(i._fromNumbers):null;let r=i._fromNumber,n=s._tail;for(;n&&n!==i;){if(e)for(let t=0,s=n._numbers.length;t<s;t++)e[t]+=n._numbers[t];else r+=n._number;n=n._prevAdd}i._toNumber=r,i._toNumbers=e}}}),Nt(e,1,1,0,2)}),e})(Ht._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=d,i._startTime=0,i._numbers=yt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,St(e,i),St(s,i));const n=t._toNumber;if(t._fromNumber=i._fromNumber-n,t._toNumber=0,t._numbers=yt(t._fromNumbers),t._number=0,i._fromNumber=n,t._toNumbers){const e=yt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}St(e,t,null,"_prevAdd","_nextAdd")}return t},Qt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=Ht._rep.get(s)[i];if(bt(n,t,"_prevRep","_nextRep"),e===r.blend){const e=Ht._add,r=e.get(s);if(!r)return;const n=r[i],o=Mt.animation;bt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){bt(n,a,"_prevAdd","_nextAdd"),bt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Zt=(t,e,s)=>{let i=!1;return vt(e,r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=Pt(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),bt(e,r),Qt(r),i=!0)}},!0),i},Jt=(t,e,s)=>{const i=e||Xt;let r;if(i._hasChildren){let e=0;vt(i,n=>{if(!n._hasChildren)if(r=Zt(t,n,s),r&&!n._head)n.cancel(),bt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?Jt(t,n,s):n._hasChildren=!1},!0),X(i.iterationDuration)||(i.iterationDuration=e)}else r=Zt(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},Kt=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),te=t=>t._cancelled?(t._hasChildren?vt(t,te):vt(t,t=>{t._composition!==r.none&&Gt(t,Ut(t.target,t.property))}),t._cancelled=0,t):t;let ee=0;class se extends Rt{constructor(t={},e=null,s=0){super(0);const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:h,loopDelay:l,autoplay:c,frameRate:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:v,onUpdate:b}=t;L.current&&L.current.register(this);const S=e?0:Xt._elapsedTime,w=e?e.defaults:N.defaults,T=Y(r)||X(r)?w.delay:+r,x=Y(n)||X(n)?1/0:+n,k=Tt(h,w.loop),$=Tt(l,w.loopDelay),C=!0===k||k===1/0||k<0?1/0:k+1;let E=0;e?E=s:(Xt.reqId||Xt.requestTick(O()),E=(Xt._elapsedTime-Xt._startTime)*N.timeScale),this.id=X(i)?++ee:i,this.parent=e,this.duration=ft((x+$)*C-$)||d,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||w.onBegin,this.onBeforeUpdate=v||w.onBeforeUpdate,this.onUpdate=b||w.onUpdate,this.onLoop=f||w.onLoop,this.onPause=g||w.onPause,this.onComplete=m||w.onComplete,this.iterationDuration=x,this.iterationCount=C,this._autoplay=!e&&Tt(c,w.autoplay),this._offset=E,this._delay=T,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=_,this._running=!1,this._reversed=+Tt(o,w.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Tt(a,w.alternate),this._prev=null,this._next=null,this._elapsedTime=S,this._startTime=S,this._lastTime=S,this._fps=Tt(u,w.frameRate),this._speed=Tt(p,w.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return ct(ut(this._currentTime,N.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return ut(this._iterationTime,N.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ct(ut(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ct(ut(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*ct(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=!1){return te(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,At(this,0,1,~~t,2),Kt(this),this._hasChildren&&vt(this,Kt),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&At(this,this.duration,1,~~t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!X(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Xt._speed);return this._startTime=O()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=d&&!this._hasChildren?At(this,d,0,0,2):(this._running||(St(Xt,this),Xt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Xt.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){te(this),this.completed=!1;const i=this.paused;return this.paused=!0,At(this,t+this._delay,~~e,~~s,1),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?rt(u/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?vt(this,t=>t.cancel(),!0):vt(this,Qt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=gt(t);if(e===s)return this;const i=t/e,r=t<=d;return this.duration=r?d:s,this.iterationDuration=r?d:gt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){At(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}function ie(t){const e=I(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function re(t){if(V(t))return[];if(!e)return R(t)&&t.flat(1/0)||[t];if(R(t)){const e=t.flat(1/0),s=[];for(let t=0,i=e.length;t<i;t++){const i=e[t];if(!V(i)){const t=ie(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!V(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=ie(t);return s?Array.from(s):[t]}function ne(t){const e=re(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[n]){s[n]=!0;const t=W(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[h]={})}}return e}const oe={deg:1,rad:180/ht,turn:360},ae={},he=(t,e,s,r=!1)=>{const n=e.u,o=e.n;if(1===e.t&&n===s)return e;const a=o+n+s,h=ae[a];if(X(h)||r){let r;if(n in oe)r=o*oe[n]/oe[s];else{const e=100,a=t.cloneNode(),h=t.parentNode,l=h&&h!==i?h:i.body;l.appendChild(a);const c=a.style;c.width=e+n;const d=a.offsetWidth||e;c.width=e+s;const u=d/(a.offsetWidth||e);l.removeChild(a),r=u*o}e.n=r,ae[a]=r}else e.n=h;return e.t,e.u=s,e},le=t=>t,ce=(t=1.68)=>e=>Z(e,+t),de={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},ue=ht/2,pe=2*ht,me={[m]:ce,Quad:ce(2),Cubic:ce(3),Quart:ce(4),Quint:ce(5),Sine:t=>1-tt(t*ue),Circ:t=>1-J(1-t*t),Expo:t=>t?Z(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=Z(2,--s))-1)/11;);return 1/Z(4,3-s)-7.5625*Z((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=ct(+t,1,10),i=ct(+e,d,2),r=i/pe*nt(1/s),n=pe/i;return t=>0===t||1===t?t:-s*Z(2,-10*(1-t))*K((1-t-r)*n)}},fe=(()=>{const t={linear:le,none:le};for(let e in de)for(let s in me){const i=me[s],r=de[e];t[e+s]=s===m||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ge={linear:le,none:le},ye=t=>{if(ge[t])return ge[t];if(t.indexOf("(")<=-1){const e=de[t]||t.includes("Back")||t.includes("Elastic")?fe[t]():fe[t];return e?ge[t]=e:le}{const e=t.slice(0,-1).split("("),s=fe[e[0]];return s?ge[t]=s(...e[1].split(",")):le}},_e=["steps(","irregular(","linear(","cubicBezier("],ve=t=>{if(I(t))for(let e=0,s=_e.length;e<s;e++)if(P(t,_e[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),le;return Y(t)?t:I(t)?ye(t):le},be={t:0,n:0,u:null,o:null,d:null,s:null},Se={t:0,n:0,u:null,o:null,d:null,s:null},we={},Te={func:null},xe=[null],ke=[null,null],$e={to:null};let Ce,Ee,De=0;class Be extends se{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i);const h=ne(t),l=h.length,c=e.keyframes,u=c?_t(((t,e)=>{const s={};if(R(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(j);for(let i=0,r=e.length;i<r;i++){const r=e[i],n=t.map(t=>{const e={};for(let s in t){const i=t[s];j(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Tt(e.duration,N.defaults.duration),r=Object.keys(t).map(e=>({o:parseFloat(e)/100,p:t[e]})).sort((t,e)=>t.o-e.o);r.forEach(t=>{const e=t.o,r=t.p;for(let t in r)if(j(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,h=n[a-1];const l={to:r[t]};let c=0;for(let t=0;t<a;t++)c+=n[t].duration;1===a&&(l.from=h.to),r.ease&&(l.ease=r.ease),l.duration=o-(a?c:0),n.push(l)}return t});for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s})(c,e),e):e,{delay:m,duration:f,ease:g,playbackEase:y,modifier:_,composition:v,onRender:b}=u,S=s?s.defaults:N.defaults,w=Tt(y,S.playbackEase),T=w?ve(w):null,x=!X(g)&&!X(g.ease),k=x?g.ease:Tt(g,T?"linear":S.ease),$=x?g.settlingDuration:Tt(f,S.duration),C=Tt(m,S.delay),E=_||S.modifier,D=X(v)&&l>=p?r.none:X(v)?S.composition:v,B=this._offset+(s?s._offset:0);x&&(g.parent=this);let L=NaN,A=NaN,F=0,P=0;for(let t=0;t<l;t++){const e=h[t],i=o||t,c=a||l;let p=NaN,m=NaN;for(let t in u)if(j(t)){const o=kt(e,t),a=Pt(t,e,o);let h=u[t];const l=R(h);if(n&&!l&&(ke[0]=h,ke[1]=h,h=ke),l){const t=h.length,e=!M(h[0]);2===t&&e?($e.to=h,xe[0]=$e,Ce=xe):t>2&&e?(Ce=[],h.forEach((t,e)=>{e?1===e?(ke[1]=t,Ce.push(ke)):Ce.push(t):ke[0]=t})):Ce=h}else xe[0]=h,Ce=xe;let f=null,g=null,y=NaN,_=0,v=0;for(let t=Ce.length;v<t;v++){const n=Ce[v];M(n)?Ee=n:($e.to=n,Ee=$e),Te.func=null;const h=xt(Ee.to,e,i,c,Te);let l;M(h)&&!X(h.to)?(Ee=h,l=h.to):l=h;const u=xt(Ee.from,e,i,c),p=Ee.ease,m=!X(p)&&!X(p.ease),b=m?p.ease:p||k,S=m?p.settlingDuration:xt(Tt(Ee.duration,t>1?xt($,e,i,c)/t:$),e,i,c),w=xt(Tt(Ee.delay,v?0:C),e,i,c),T=xt(Tt(Ee.composition,D),e,i,c),x=z(T)?T:r[T],L=Ee.modifier||E,N=!X(u),A=!X(l),O=R(l),I=O||N&&A,Y=g?_+w:w,W=ut(B+Y,12);P||!N&&!O||(P=1);let H=g;if(x!==r.none){f||(f=Ut(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=W;)if(H=t,t=t._nextRep,t&&t._absoluteStartTime>=W)for(;t;)jt(t),t=t._nextRep}if(I?(Dt(O?xt(l[0],e,i,c):u,be),Dt(O?xt(l[1],e,i,c,Te):l,Se),0===be.t&&(H?1===H._valueType&&(be.t=1,be.u=H._unit):(Dt(Ct(e,a,o,we),Lt),1===Lt.t&&(be.t=1,be.u=Lt.u)))):(A?Dt(l,Se):g?Bt(g,Se):Dt(s&&H&&H.parent.parent===s?H._value:Ct(e,a,o,we),Se),N?Dt(u,be):g?Bt(g,be):Dt(s&&H&&H.parent.parent===s?H._value:Ct(e,a,o,we),be)),be.o&&(be.n=Et(H?H._toNumber:Dt(Ct(e,a,o,we),Lt).n,be.n,be.o)),Se.o&&(Se.n=Et(be.n,Se.n,Se.o)),be.t!==Se.t)if(3===be.t||3===Se.t){const t=3===be.t?be:Se,e=3===be.t?Se:be;e.t=3,e.s=yt(t.s),e.d=t.d.map(()=>e.n)}else if(1===be.t||1===Se.t){const t=1===be.t?be:Se,e=1===be.t?Se:be;e.t=1,e.u=t.u}else if(2===be.t||2===Se.t){const t=2===be.t?be:Se,e=2===be.t?Se:be;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(be.u!==Se.u){let t=Se.u?be:Se;t=he(e,t,Se.u?Se.u:be.u,!1)}if(Se.d&&be.d&&Se.d.length!==be.d.length){const t=be.d.length>Se.d.length?be:Se,e=t===be?Se:be;e.d=t.d.map((t,s)=>X(e.d[s])?0:e.d[s]),e.s=yt(t.s)}const U=ut(+S||d,12);let q=we[a];V(q)||(we[a]=null);const j={parent:this,id:De++,property:a,target:e,_value:null,_func:Te.func,_ease:ve(b),_fromNumbers:yt(be.d),_toNumbers:yt(Se.d),_strings:yt(Se.s),_fromNumber:be.n,_toNumber:Se.n,_numbers:yt(be.d),_number:be.n,_unit:Se.u,_modifier:L,_currentTime:0,_startTime:Y,_delay:+w,_updateDuration:U,_changeDuration:U,_absoluteStartTime:W,_tweenType:o,_valueType:Se.t,_composition:x,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:q,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};x!==r.none&&Gt(j,f),isNaN(y)&&(y=j._startTime),_=ut(Y+U,12),g=j,F++,St(this,j)}(isNaN(A)||y<A)&&(A=y),(isNaN(L)||_>L)&&(L=_),3===o&&(p=F-v,m=F)}if(!isNaN(p)){let t=0;vt(this,e=>{t>=p&&t<m&&(e._renderTransforms=1,e._composition===r.blend&&vt(Mt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}l||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),A?(vt(this,t=>{t._startTime-t._delay||(t._delay-=A),t._startTime-=A}),L-=A):A=0,L||(L=d,this.iterationCount=0),this.targets=h,this.duration=L===d?d:ft((L+this._loopDelay)*this.iterationCount-this._loopDelay)||d,this.onRender=b||S.onRender,this._ease=T,this._delay=A,this.iterationDuration=L,!this._autoplay&&P&&this.onRender(this)}stretch(t){const e=this.duration;if(e===gt(t))return this;const s=t/e;return vt(this,t=>{t._updateDuration=gt(t._updateDuration*s),t._changeDuration=gt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return vt(this,t=>{const e=t._func;if(e){const s=Ct(t.target,t.property,t._tweenType);Dt(s,Lt),Dt(e(),Se),t._fromNumbers=yt(Lt.d),t._fromNumber=Lt.n,t._toNumbers=yt(Se.d),t._strings=yt(Se.s),t._toNumber=Se.o?Et(Lt.n,Se.n,Se.o):Se.n}}),this.duration===d&&this.restart(),this}revert(){return super.revert(),Ot(this)}then(t){return super.then(t)}}const Le={_head:null,_tail:null},Ne=(t,e,s)=>{let i,r=Le._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,h=!s||r.parent===s;if(o&&a&&h){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),bt(Le,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ae=(t,e,s,i,r)=>{const n=e.animate(i,r),o=r.delay+ +r.duration*r.iterations;n.playbackRate=t._speed,t.paused&&n.pause(),t.duration<o&&(t.duration=o,t.controlAnimation=n),t.animations.push(n),Ne(e,s),St(Le,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Ne(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Fe(t,e,s){const i=ne(t);if(!i.length)return;const[r]=i,n=kt(r,e),o=Pt(e,r,n);let a=Ct(r,o);if(X(s))return a;if(Dt(a,Lt),0===Lt.t||1===Lt.t){if(!1===s)return Lt.n;{const t=he(r,Lt,s,!1);return`${ut(t.n,N.precision)}${t.u}`}}}const Pe=(t,e)=>{if(!X(e))return e.duration=d,e.composition=Tt(e.composition,r.none),new Be(t,e,null,0,!0).resume()},Oe=(t,e,s)=>{const i=re(t);for(let t=0,r=i.length;t<r;t++)Ne(i[t],s,e&&e.controlAnimation&&e);return Jt(i,e,s),i},Re=(t,e)=>{let s=t.iterationDuration;if(s===d&&(s=0),X(e))return s;if(z(+e))return+e;const i=e,r=t?t.labels:null,n=!V(r),o=((t,e)=>{if(P(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!X(o),h=E.exec(i);if(h){const t=h[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,c=a?o:n?l:s,d=+e[1];return Et(c,d,t[0])}return a?o:n?X(r[i])?s:r[i]:s};function Me(t,e,s,i,r,n){const o=z(t.duration)&&t.duration<=d?s-d:s;At(e,o,1,1,1);const a=i?new Be(i,t,e,o,!1,r,n):new se(t,e,o);return a.init(!0),St(e,a),vt(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=function(t){return ft((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||d}(e),e}class ze extends se{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=N.defaults;this.defaults=e?_t(e,s):s,this.onRender=t.onRender||s.onRender;const i=Tt(t.playbackEase,s.playbackEase);this._ease=i?ve(i):null,this.iterationDuration=0}add(t,e,s){const i=M(e),r=M(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(Y(s)){const e=s,r=re(t),n=this.duration,o=this.iterationDuration,a=i.id;let h=0;const l=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,X(a)||(s.id=a+"-"+h),Me(s,this,Re(this,e(t,h,l,this)),t,h,l),h++})}else Me(i,this,Re(this,s),t)}else Me(t,this,Re(this,e));return this.init(!0)}}sync(t,e){if(X(t)||t&&X(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return this.add(t,{currentTime:[0,s],duration:s,ease:"linear"},e)}set(t,e,s){return X(e)?this:(e.duration=d,e.composition=r.replace,this.add(t,e,s))}call(t,e){return X(t)||t&&!Y(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return X(t)||t&&!I(t)||(this.labels[t]=Re(this,e)),this}remove(t,e){return Jt(re(t),this,e),this}stretch(t){const e=this.duration;if(e===gt(t))return this;const s=t/e,i=this.labels;vt(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return vt(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),vt(this,t=>t.revert,!0),Ot(this)}then(t){return super.then(t)}}class Ie{constructor(t,e){L.current&&L.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!X(t)&&!X(e)){for(let t in e){const s=e[t];j(t)?o[t]=s:P(t,"on")?n[t]=s:i[t]=s}this.callbacks=new Be({v:0},n);for(let e in o){const s=o[e],n=M(s);let a={},h="+=0";if(n){const t=s.unit;I(t)&&(h+=t)}else a.duration=s;a[e]=n?_t({to:h},s):h;const l=_t(i,a);l.composition=r.replace,l.autoplay=!1;const c=this.animations[e]=new Be(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(X(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return vt(c,e=>{if(R(t))for(let s=0,i=t.length;s<i;s++)X(e._numbers[s])||(e._fromNumbers[s]=e._modifier(e._numbers[s]),e._toNumbers[s]=t[s]);else e._fromNumber=e._modifier(e._number),e._toNumber=t;X(s)||(e._ease=ve(s)),e._currentTime=0}),X(e)||c.stretch(e),c.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=_,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const Ye=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var Xe=Object.freeze({__proto__:null,clamp:ct,damp:(t,e,s,i)=>i?1===i?e:mt(t,e,1-Math.exp(-i*s*.1)):t,degToRad:t=>t*Math.PI/180,lerp:mt,mapRange:Ye,padEnd:(t,e,s)=>`${t}`.padEnd(e,s),padStart:(t,e,s)=>`${t}`.padStart(e,s),radToDeg:t=>180*t/Math.PI,round:ut,roundPad:(t,e)=>(+t).toFixed(e),snap:pt,wrap:(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e});const Ve=10*p;class We{constructor(t={}){const e=!X(t.bounce)||!X(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/p,this.maxIterations=this.maxDuration/this.timeStep/p,this.bn=ct(Tt(t.bounce,.5),-1,1),this.pd=ct(Tt(t.duration,628),10*N.timeScale,Ve*N.timeScale),this.m=ct(Tt(t.mass,1),1,Ve),this.s=ct(Tt(t.stiffness,100),d,Ve),this.d=ct(Tt(t.damping,10),d,Ve),this.v=ct(Tt(t.velocity,0),-1e4,Ve),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||_,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),0===t||1===t?t:this.solve(t*this.solverDuration)}}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?st(-n*e*s)*(1*tt(i*n)+r*K(i*n)):1===e?(1+r*n)*st(-n*s):((1+r)*st((-e*s+i)*n)+(1-r)*st((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===N.timeScale?this.pd/p:this.pd;this.m=1,this.v=0,this.s=Z(2*ht/t,2),this.bn>=0?this.d=4*(1-this.bn)*ht/t:this.d=4*ht/(t*(1+this.bn)),this.s=ut(ct(this.s,d,Ve),3),this.d=ut(ct(this.d,d,300),3)}calculateBDFromSD(){const t=2*ht/J(this.s);this.pd=t*(1===N.timeScale?p:1);const e=this.d/(2*J(this.s));this.bn=e<=1?1-this.d*t/(4*ht):4*ht/(this.d*t)-1,this.bn=ut(ct(this.bn,-1,1),3),this.pd=ut(ct(this.pd,10*N.timeScale,Ve*N.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=ct(J(o/r),d,p),l=this.zeta=n/(2*J(o*r));l<1?(this.wd=h*J(1-l*l),this.b=(l*h-a)/this.wd):1===l?(this.wd=0,this.b=-a+h):(this.wd=h*J(l*l-1),this.b=(l*h-a)/this.wd);let c=0,u=0,m=0;for(;u<=t&&m<=e;)et(1-this.solve(c))<s?u++:u=0,this.solverDuration=c,c+=i,m++;this.settlingDuration=ut(this.solverDuration*p,0)*N.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=ct(Tt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=ct(Tt(t,1),10*N.timeScale,Ve*N.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ct(Tt(t,100),d,Ve),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ct(Tt(t,10),d,Ve),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ct(Tt(t,1),1,Ve),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ct(Tt(t,0),-1e4,Ve),this.compute()}}const He=t=>new We(t),Ue=t=>(console.warn("createSpring() is deprecated use spring() instead"),new We(t)),qe=t=>{t.cancelable&&t.preventDefault()};class je{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:_,remove:_}}get x(){return this.el.x||0}set x(t){this.el.x=t}get y(){return this.el.y||0}set y(t){this.el.y=t}get width(){return this.el.width||0}set width(t){this.el.width=t}get height(){return this.el.height||0}set height(t){this.el.height=t}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class Ge{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,s=0;for(;e&&e!==i;)t(e,s),e=e.parentElement,s++}getMatrix(){const t=new DOMMatrix;return this.traverseUp(e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}}),t}remove(){this.traverseUp((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"})}revert(){this.traverseUp((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s})}}const Qe=(t,e)=>t&&Y(t)?t(e):t;let Ze=0;class Je{constructor(t,e={}){if(!t)return;L.current&&L.current.register(this);const r=e.x,n=e.y,o=e.trigger,a=e.modifier,h=e.releaseEase,l=h&&ve(h),c=!X(h)&&!X(h.ease),d=M(r)&&!X(r.mapTo)?r.mapTo:"translateX",p=M(n)&&!X(n.mapTo)?n.mapTo:"translateY",m=Qe(e.container,this);this.containerArray=R(m)?m:null,this.$container=m&&!this.containerArray?re(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=M(t)?new je(t):re(t)[0],this.$trigger=re(o||t)[0],this.fixed="fixed"===Fe(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:He({mass:Tt(e.releaseMass,1),stiffness:Tt(e.releaseStiffness,80),damping:Tt(e.releaseDamping,20)}),this.releaseYSpring=c?h:He({mass:Tt(e.releaseMass,1),stiffness:Tt(e.releaseStiffness,80),damping:Tt(e.releaseDamping,20)}),this.releaseEase=l||fe.outQuint,this.hasReleaseSpring=c,this.onGrab=e.onGrab||_,this.onDrag=e.onDrag||_,this.onRelease=e.onRelease||_,this.onUpdate=e.onUpdate||_,this.onSettle=e.onSettle||_,this.onSnap=e.onSnap||_,this.onResize=e.onResize||_,this.onAfterResize=e.onAfterResize||_,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),X(r)||!0===r)f[d]=0;else if(M(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[d]=e}else!1===r&&(f[d]=0,this.disabled[0]=1);if(X(n)||!0===n)f[p]=0;else if(M(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[p]=e}else!1===n&&(f[p]=0,this.disabled[1]=1);this.animate=new Ie(this.$target,f),this.xProp=d,this.yProp=p,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-u,u,u,-u],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=O(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new Ge(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new se({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new se({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!X(m),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?d:p,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=at(n,r)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new se({autoplay:!1,duration:150*N.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=e,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),M(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=O(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,h=this.maxVelocity,l=this.velocityStackIndex;n[l]=ut(ct(J(t*t+e*e)/r*o,a,h),5);const c=ot(n[0],n[1],n[2]);return this.velocity=c,this.velocityStackIndex=(l+1)%3,c}setX(t,e=!1){if(this.disabled[0])return;const s=ut(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=pt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=ut(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=pt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return ut(this.animate[this.xProp](),N.precision)}set x(t){this.setX(t,!1)}get y(){return ut(this.animate[this.yProp](),N.precision)}set y(t){this.setY(t,!1)}get progressX(){return Ye(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(Ye(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return Ye(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(Ye(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=ut(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=ut(this.useWin?s.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=e,this.scrollBounds[0]=e-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=e-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container;if(!t)return;const e=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=s.innerWidth,h=this.window[1]=s.innerHeight,l=this.useWin,c=t.scrollWidth,d=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?ct(c,a,c):c,this.scrollView[1]=l?ct(d,h,d):d,this.updateScrollCoords();const{width:_,height:v,left:b,top:S,right:w,bottom:T}=t.getBoundingClientRect();this.dragArea[2]=ut(l?ct(_,a,a):_,0),this.dragArea[3]=ut(l?ct(v,h,h):v,0);const x=Fe(t,"overflow"),k="visible"===x,$="hidden"===x;if(this.canScroll=!u&&this.contained&&(t===i.body&&k||!$&&!k)&&(c>this.dragArea[2]+y-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!R(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?l?0:t.scrollLeft:0,o=i?l?0:t.scrollTop:0,c=i?this.scrollView[0]-n-_:0,d=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=ut(r.top+s-(l?0:S),0),this.targetBounds[1]=ut(r.right+e-(l?a:w),0),this.targetBounds[2]=ut(r.bottom+s-(l?h:T),0),this.targetBounds[3]=ut(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+y):(this.containerBounds[0]=-ut(r.top-(u?ct(S,0,h):S)+o-m,0),this.containerBounds[1]=-ut(r.right-(u?ct(w,0,a):w)-c+f,0),this.containerBounds[2]=-ut(r.bottom-(u?ct(T,0,h):T)-d+g,0),this.containerBounds[3]=-ut(r.left-(u?ct(b,0,a):b)+n-y,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(e,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[a,h]=this.disabled,l=!a&&e<o||!a&&e>r,c=!h&&s<i||!h&&s>n;return l&&!c?1:!l&&c?2:l&&c?3:0}refresh(){const t=this.parameters,e=t.x,r=t.y,n=Qe(t.container,this),o=Qe(t.containerPadding,this)||0,a=R(o)?o:[o,o,o,o],h=this.x,l=this.y,c=Qe(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}const u=Qe(t.dragThreshold,this),p={mouse:3,touch:7};if(z(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;X(t)||(p.mouse=t),X(e)||(p.touch=e)}this.containerArray=R(n)?n:null,this.$container=n&&!this.containerArray?re(n)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=Tt(a,[0,0,0,0]),this.containerFriction=ct(Tt(Qe(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ct(Tt(Qe(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Qe(M(e)&&!X(e.snap)?e.snap:t.snap,this),this.snapY=Qe(M(r)&&!X(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Tt(Qe(t.scrollSpeed,this),1.5),this.scrollThreshold=Tt(Qe(t.scrollThreshold,this),20),this.dragSpeed=Tt(Qe(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Tt(Qe(t.minVelocity,this),0),this.maxVelocity=Tt(Qe(t.maxVelocity,this),50),this.velocityMultiplier=Tt(Qe(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(ct(h,y,f),!0),this.setY(ct(l,m,g),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],a=this.dragArea[3],h=this.scroll.x,l=this.scroll.y,c=this.$container.scrollWidth,d=this.$container.scrollHeight,u=this.useWin?ct(c,this.window[0],c):c,p=this.useWin?ct(d,this.window[1],d):d,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,y=this.scrollThreshold,[_,v]=this.coords,[b,S,w,T]=this.scrollBounds,x=ut(ct((v-b+t)/y,-1,0)*g,0),k=ut(ct((_-S-e)/y,0,1)*g,0),$=ut(ct((v-w-s)/y,0,1)*g,0),C=ut(ct((_-T+i)/y,-1,0)*g,0);if(x||$||C||k){const[t,e]=this.disabled;let s=h,i=l;t||(s=ut(ct(h+(C||k),0,r-o),0),this.coords[0]-=h-s),e||(i=ut(ct(l+(x||$),0,n-a),0),this.coords[1]-=l-i),this.useWin?this.$scrollContainer.scrollBy(-(h-s),-(l-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,h,l]=this.pointer;this.coords[0]+=(r-h)*this.dragSpeed,this.coords[1]+=(n-l)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[c,d]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(c>e?e+(c-e)*m:c<i?i+(c-i)*m:c,!1),this.setY(d>s?s+(d-s)*m:d<t?t+(d-t)*m:d,!1),this.computeVelocity(r-h,n-l),this.angle=at(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return Jt([this],null,"x"),Jt([this],null,"y"),Jt([this],null,"progressX"),Jt([this],null,"progressY"),Jt([this.scroll]),Jt([this.overshootCoords]),this}scrollInView(t,e=0,s=fe.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[h,l,c,d]=o,p=ut(ct(r-h,-u,0),0),m=ut(ct(i-l,0,u),0),f=ut(ct(r-c,0,u),0),g=ut(ct(i-d,-u,0),0);new Be(n,{x:ut(n.x+(g?g-e:m?m+e:0),0),y:ut(n.y+(p?p-e:f?f+e:0),0),duration:X(t)?350*N.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Pe(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=fe.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,h]=this.containerPadding,l=this.scroll.y-this.targetBounds[0]+n+e,c=this.scroll.x-this.targetBounds[1]-o-e,d=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+h+e,p=this.isOutOfBounds([l,c,d,u],i,r);if(p){const[e,n]=this.disabled,o=ct(pt(i,this.snapX),u,c),a=ct(pt(r,this.snapY),l,d),h=X(t)?350*N.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,h,s),n||2!==p&&3!==p||this.animate[this.yProp](a,h,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const s=t.changedTouches,r=s?s[0].clientX:t.clientX,n=s?s[0].clientY:t.clientY,{x:o,y:a}=this.transforms.normalizePoint(r,n),[h,l,c,d]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>l?l+(p-l)/u:p<d?d+(p-d)/u:p:p,this.coords[1]=this.coords[3]=u?m>c?c+(m-c)/u:m<h?h+(m-h)/u:m:m,this.pointer[0]=o,this.pointer[1]=a,this.pointer[2]=o,this.pointer[3]=a,this.pointer[4]=o,this.pointer[5]=a,this.pointer[6]=o,this.pointer[7]=a,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=Fe(this.$target,"zIndex",!1);Ze=(f>Ze?f:Ze)+1,this.targetStyles=Pe(this.$target,{zIndex:Ze}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Pe(i.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,fe.out(3)),this.onGrab(this),i.addEventListener("touchmove",this),i.addEventListener("touchend",this),i.addEventListener("touchcancel",this),i.addEventListener("mousemove",this),i.addEventListener("mouseup",this),i.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],a=n-this.pointer[7];let h=t.target,l=!1,c=!1,d=!1;for(;e&&h&&h!==this.$trigger;){const t=Fe(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){d=!0,l=t<=3,c=t>=e-s-3;break}}h=h.parentElement}d&&(!l&&!c||l&&a<0||c&&a>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(qe(t),this.triggerStyles||(this.triggerStyles=Pe(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",qe,{passive:!1}),this.$trigger.addEventListener("touchmove",qe,{passive:!1}),this.$trigger.addEventListener("touchend",qe),(this.dragged||!this.disabled[0]&&et(o)>this.dragThreshold||!this.disabled[1]&&et(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[s,n,o,a,h,l]=this.pointer,[c,d,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,_=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,S=this.x,w=this.y,T=this.computeVelocity(s-h,n-l),x=this.angle=at(n-a,s-o),k=150*T,$=(1-this.releaseContainerFriction)*this.dragSpeed,C=S+tt(x)*k,E=w+K(x)*k,D=C>d?d+(C-d)*$:C<p?p+(C-p)*$:C,B=E>u?u+(E-u)*$:E<c?c+(E-c)*$:E,L=this.destX=ct(ut(pt(D,this.snapX),5),p,d),A=this.destY=ct(ut(pt(B,this.snapY),5),c,u),F=this.isOutOfBounds(this.containerBounds,C,E);let P=0,O=0,R=_,M=_,z=0;if(b.x=S,b.y=w,!t){const t=L===d?S>d?-1:1:S<p?-1:1,s=ut(S-L,0);g.velocity=e&&v?s?k*t/et(s):0:T;const{ease:i,settlingDuration:r,restDuration:n}=g;P=S===L?0:v?r:r-n*N.timeScale,v&&(R=i),P>z&&(z=P)}if(!e){const e=A===u?w>u?-1:1:w<c?-1:1,s=ut(w-A,0);y.velocity=t&&v?s?k*e/et(s):0:T;const{ease:i,settlingDuration:r,restDuration:n}=y;O=w===A?0:v?r:r-n*N.timeScale,v&&(M=i),O>z&&(z=O)}if(!v&&F&&$&&(P||O)){const t=r.blend;new Be(b,{x:{to:D,duration:.65*P},y:{to:B,duration:.65*O},ease:_,composition:t}).init(),new Be(b,{x:{to:L,duration:P},y:{to:A,duration:O},ease:_,composition:t}).init(),this.overshootTicker.stretch(ot(P,O)).restart()}else t||this.animate[this.xProp](L,P,R),e||this.animate[this.yProp](A,O,M);this.scrollInView(z,this.scrollThreshold,_);let I=!1;L!==m&&(this.snapped[0]=L,this.snapX&&(I=!0)),A!==f&&this.snapY&&(this.snapped[1]=A,this.snapY&&(I=!0)),I&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",qe),this.$trigger.removeEventListener("touchmove",qe),this.$trigger.removeEventListener("touchend",qe),i.removeEventListener("touchmove",this),i.removeEventListener("touchend",this),i.removeEventListener("touchcancel",this),i.removeEventListener("mousemove",this),i.removeEventListener("mouseup",this),i.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=Pe(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),i.removeEventListener("touchmove",this),i.removeEventListener("touchend",this),i.removeEventListener("touchcancel",this),i.removeEventListener("mousemove",this),i.removeEventListener("mouseup",this),i.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":qe(t)}}}const Ke=(t=_)=>new se({duration:1*N.timeScale,onComplete:t},null,0).resume(),ts=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const a=t(...s);return a&&!Y(a)&&a.revert&&(e=a),X(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||_}};class es{constructor(t={}){L.current&&L.current.register(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||re(e)[0]||i);const n=t.defaults,o=N.defaults,a=t.mediaQueries;if(this.defaults=n?_t(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const e=s.matchMedia(a[t]);this.mediaQueryLists[t]=e,e.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=L.current,s=L.root,i=N.defaults;L.current=this,L.root=this.root,N.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return L.current=e,L.root=s,N.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);Y(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,Y(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);Y(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,Y(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);Y(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(Y(s))return s(this);const i=ts(t);let r;return this.constructorsOnce[e]=i,this.execute(()=>{r=i(this)}),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,a=s.length,h=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;h--;)i[h](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const ss=(t,e)=>t&&Y(t)?t(e):t,is=new Map;class rs{constructor(t){this.element=t,this.useWin=this.element===i.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new se({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;vt(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new se({autoplay:!1,frameRate:30,onUpdate:t=>{const e=t.deltaTime,s=this.prevScrollX,i=this.prevScrollY,r=this.scrollX,n=this.scrollY,o=s-r,a=i-n;this.prevScrollX=r,this.prevScrollY=n,o&&(this.backwardX=s>r),a&&(this.backwardY=i>n),this.velocity=ut(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new se({autoplay:!1,duration:250*N.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new se({autoplay:!1,duration:500*N.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?s:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,e=this.element;this.scrollX=ut(t?s.scrollX:e.scrollLeft,0),this.scrollY=ut(t?s.scrollY:e.scrollTop,0)}updateWindowBounds(){this.winWidth=s.innerWidth,this.winHeight=(()=>{const t=i.createElement("div");i.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return i.body.removeChild(t),e})()}updateBounds(){const t=getComputedStyle(this.element),e=this.element;let s,i;if(this.scrollWidth=e.scrollWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),this.scrollHeight=e.scrollHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom),this.updateWindowBounds(),this.useWin)s=this.winWidth,i=this.winHeight;else{const t=e.getBoundingClientRect();s=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){vt(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),vt(this,t=>{t.refresh(),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?s:this.element).removeEventListener("scroll",this),is.delete(this.element)}}const ns=(t,e,s,i,r)=>{const n="min"===e,o="max"===e,a="top"===e||"left"===e||"start"===e||n?0:"bottom"===e||"right"===e||"end"===e||o?"100%":"center"===e?"50%":e,{n:h,u:l}=Dt(a,Lt);let c=h;return"%"===l?c=h/100*s:l&&(c=he(t,Lt,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},os=(t,e,s,i,r)=>{let n;if(I(e)){const o=E.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),c="min"===l[0],d="max"===l[0],u=ns(t,l[0],s,i,r),p=ns(t,l[1],s,i,r);if(c){const e=Et(ns(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=Et(ns(t,"max",s),p,h);n=e>u?u:e}else n=Et(u,p,h)}else n=ns(t,e,s,i,r)}else n=e;return ut(n,0)},as=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[o]){e=i;break}}return e};let hs=0;const ls=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class cs{constructor(t={}){L.current&&L.current.register(this);const e=Tt(t.sync,"play pause"),s=e?ve(e):null,r=e&&("linear"===e||e===le),n=e&&!(s===le&&!r),o=e&&(z(e)||!0===e||r),a=e&&I(e)&&!n&&!o,h=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,l=a&&h.length>2;this.index=hs++,this.id=X(t.id)?this.index:t.id,this.container=(t=>{const e=t&&re(t)[0]||i.body;let s=is.get(e);return s||(s=new rs(e),is.set(e,s)),s})(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!h,this.syncEase=n?s:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=h&&!l&&h[0]?h[0]:_,this.onSyncLeave=h&&!l&&h[1]?h[1]:_,this.onSyncEnterForward=h&&l&&h[0]?h[0]:_,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:_,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:_,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:_,this.onEnter=t.onEnter||_,this.onLeave=t.onLeave||_,this.onEnterForward=t.onEnterForward||_,this.onLeaveForward=t.onLeaveForward||_,this.onEnterBackward=t.onEnterBackward||_,this.onLeaveBackward=t.onLeaveBackward||_,this.onUpdate=t.onUpdate||_,this.onSyncComplete=t.onSyncComplete||_,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=Tt(t.debug,!1),this._next=null,this._prev=null,St(this.container,this),Ke(()=>{if(!this.reverted){if(!this.target){const e=re(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,X(t)||(t.persist=!0),!this._params.target)){let e;X(t.targets)?vt(t,t=>{t.targets&&!e&&(e=as(t))}):e=as(t),this.target=e||i.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:ut(ct(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Tt(ss(t.repeat,this),!0),this.horizontal="x"===Tt(ss(t.axis,this),"y"),this.enter=Tt(ss(t.enter,this),"end start"),this.leave=Tt(ss(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,s=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=i.createElement("div"),n=i.createElement("div"),o=i.createElement("div"),a=ls[this.index%ls.length],h=t.useWin,l=h?t.winWidth:t.width,c=h?t.winHeight:t.height,d=t.scrollWidth,u=t.scrollHeight,p=this.container.width>360?320:260,m=e?0:10,f=e?10:0,g=e?24:p/2,y=e?g:15,_=e?60:g,v=e?_:y,b=e?"repeat-x":"repeat-y",S=t=>e?"0px "+t+"px":t+"px 2px",w=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,T=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${T("absolute",m,f,e?d:p,e?p:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${e?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,n.style.cssText=`${T("sticky",0,0,e?l:g,e?g:c)}`,s||(n.style.cssText+=`background:\n ${w("#FFFF")}${S(g-10)} / 100px 100px ${b},\n ${w("#FFF8")}${S(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${T("relative",0,0,e?d:g,e?g:u)}`,s||(o.style.cssText+=`background:\n ${w("#FFFF")}${S(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${w("#FFF8")}${S(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const x=[" enter: "," leave: "];this.coords.forEach((t,s)=>{const r=s>1,h=(r?0:this.offset)+t,m=s%2,f=h<v,g=h>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,S=i.createElement("div"),w=i.createElement("div"),k=e?b?"right":"left":b?"bottom":"top",$=b?(e?_:y)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;w.innerHTML=`${this.id}${x[m]}${this.thresholds[s]}`,S.style.cssText=`${T("absolute",0,0,_,y)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${k}: 2px solid ${a};\n `,w.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${y};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?a:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":a};\n border: 2px solid ${m?a:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,S.appendChild(w);let C=h-$+(e?1:0);S.style[e?"left":"top"]=`${C}px`,(r?n:o).appendChild(S)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Fe(t.element,"position")&&(this.debugStyles=Pe(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,s=this.container,r=this.horizontal,n=this.linked;let o,a=e;for(n&&(o=n.currentTime,n.seek(0,!0)),a.parentElement;a&&a!==s.element&&a!==i.body;){const e="sticky"===Fe(a,"position")&&Pe(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const h=e.getBoundingClientRect(),l=s.scale,c=(r?h.left+s.scrollX-s.left:h.top+s.scrollY-s.top)*l,d=(r?h.width:h.height)*l,u=r?s.width:s.height,p=(r?s.scrollWidth:s.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",_="end",v="start";if(I(m)){const t=m.split(" ");_=t[0],g=t.length>1?t[1]:g}else if(M(m)){const t=m;X(t.container)||(_=t.container),X(t.target)||(g=t.target)}else z(m)&&(_=m);if(I(f)){const t=f.split(" ");v=t[0],y=t.length>1?t[1]:y}else if(M(f)){const t=f;X(t.container)||(v=t.container),X(t.target)||(y=t.target)}else z(f)&&(v=f);const b=os(e,g,d),S=os(e,y,d),w=b+c-u,T=S+c-p,x=os(e,_,u,w,T),k=os(e,v,u,w,T),$=b+c-x,C=S+c-k,E=C-$;this.offset=c,this.offsetStart=$,this.offsetEnd=C,this.distance=E<=0?0:E,this.thresholds=[g,y,_,v],this.coords=[b,S,x,k],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,l=a>=this.offsetEnd,c=!h&&!l,d=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&d,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(h&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&z(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=ut(mt(e,g,mt(.01,.2,i))+s,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(c&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(c&&(this.isInView=!0),this.forceEnter&&this.hasEntered?c&&(this.forceEnter=!1):(p&&c&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(c||!c&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!c&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return bt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const ds=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,us=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?le:r=>0===r||1===r?r:ds(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=ds(r,e,s)-t,i>0?o=r:n=r}while(et(i)>1e-7&&++a<100);return r})(r,t,s),e,i),ps=(t=10,e)=>{const s=e?it:rt;return e=>s(ct(e,0,1)*t)*(1/t)},ms=(...t)=>{const e=t.length;if(!e)return le;const s=e-1,i=t[0],r=t[s],n=[0],o=[Q(i)];for(let e=1;e<s;e++){const i=t[e],r=I(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(X(h)?e/s:Q(h)/100),o.push(Q(a))}return o.push(Q(r)),n.push(1),function(t){for(let e=1,s=n.length;e<s;e++){const s=n[e];if(t<=s){const i=n[e-1],r=o[e-1];return r+(o[e]-r)*(t-i)/(s-i)}}return o[o.length-1]}},fs=(t=10,e=1)=>{const s=[0],i=t-1;for(let t=1;t<i;t++){const r=s[t-1],n=t/i,o=n*(1-e)+(n+((t+1)/i-n)*Math.random())*e;s.push(ct(o,r,1))}return s.push(1),ms(...s)};var gs=Object.freeze({__proto__:null,Spring:We,createSpring:Ue,cubicBezier:us,eases:fe,irregular:fs,linear:ms,spring:He,steps:ps});const ys=Xe,_s={},vs=t=>(...e)=>{const s=t(...e);return new Proxy(_,{apply:(t,e,[i])=>s(i),get:(t,e)=>vs((...t)=>{const i=_s[e](...t);return t=>i(s(t))})})},bs=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?vs(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return _s[t]||(_s[t]=i),i},Ss=bs("roundPad",ys.roundPad),ws=bs("padStart",ys.padStart),Ts=bs("padEnd",ys.padEnd),xs=bs("wrap",ys.wrap),ks=bs("mapRange",ys.mapRange),$s=bs("degToRad",ys.degToRad),Cs=bs("radToDeg",ys.radToDeg),Es=bs("snap",ys.snap),Ds=bs("clamp",ys.clamp),Bs=bs("round",ys.round),Ls=bs("lerp",ys.lerp,1),Ns=bs("damp",ys.damp,1),As=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Fs=0;const Ps=(t,e=0,s=1,i=0)=>{let r=void 0===t?Fs++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},Os=t=>t[As(0,t.length-1)],Rs=t=>{let e,s,i=t.length;for(;i;)s=As(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},Ms=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!X(o),h=a&&!X(o.ease)?o.ease:a?ve(o):null,l=e.grid,c=e.axis,d=e.total,u=X(r)||0===r||"first"===r,p="center"===r,f="last"===r,g="random"===r,y=R(t),_=e.use,v=Q(y?t[0]:t),b=y?Q(t[1]):0,S=k.exec((y?t[1]:t)+m),w=e.start||0+(y?v:0);let T=u?0:z(r)?r:0;return(t,r,o,a)=>{const[u]=ne(t),m=X(d)?o:d,x=!X(_)&&(Y(_)?_(u,r,m):Ct(u,_)),k=z(x)||I(x)&&z(+x)?+x:r;if(p&&(T=(m-1)/2),f&&(T=m-1),!s.length){for(let t=0;t<m;t++){if(l){const e=p?(l[0]-1)/2:T%l[0],i=p?(l[1]-1)/2:rt(T/l[0]),r=e-t%l[0],n=i-rt(t/l[0]);let o=J(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(et(T-t));i=ot(...s)}h&&(s=s.map(t=>h(t/i)*i)),n&&(s=s.map(t=>c?t<0?-1*t:-t:et(i-t))),g&&(s=Rs(s))}const $=y?(b-v)/i:v;let C=(a?Re(a,X(e.start)?a.iterationDuration:w):w)+($*ut(s[k],2)||0);return e.modifier&&(C=e.modifier(C)),S&&(C=`${C}${S[2]}`),C}};var zs=Object.freeze({__proto__:null,$:ne,clamp:Ds,cleanInlineStyles:Ot,createSeededRandom:Ps,damp:Ns,degToRad:$s,get:Fe,keepTime:ts,lerp:Ls,mapRange:ks,padEnd:Ts,padStart:ws,radToDeg:Cs,random:As,randomPick:Os,remove:Oe,round:Bs,roundPad:Ss,set:Pe,shuffle:Rs,snap:Es,stagger:Ms,sync:Ke,wrap:xs});const Is=t=>{const e=re(t)[0];return e&&W(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},Ys=(t,e,s,i,r)=>{const n=s+i,o=r?Math.max(0,Math.min(n,e)):(n%e+e)%e;return t.getPointAtLength(o)},Xs=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[a],o=t.getCTM(),h=0===s;return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=Ys(t,r,a,-1,h),s=Ys(t,r,a,1,h);return 180*at(s.y-e.y,s.x-e.x)/ht}{const s=Ys(t,r,a,0,h);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},Vs=(t,e=0)=>{const s=Is(t);if(s)return{translateX:Xs(s,"x",e),translateY:Xs(s,"y",e),rotate:Xs(s,"a",e)}},Ws=(t,e=0,s=0)=>re(t).map(t=>((t,e,s)=>{const i=p,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const h=new Proxy(t,{get(t,e){const s=t[e];return e===c?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],h=+s[1],l=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(J(s.a*s.a+s.b*s.b)+J(s.c*s.c+s.d*s.d))/2)}return e})(o),c=-1e3*r*l,d=h*i*l+c,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-d;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${c}`),t.setAttribute("stroke-dasharray",`${d} ${u}`)}return Reflect.apply(s,t,e)}:Y(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),h.setAttribute("draw",`${e} ${s}`)),h})(t,e,s)),Hs=(t,e=.33)=>s=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const i=Is(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[l];o&&s.setAttribute(r?"d":"points",o);let a="",h="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),l=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<l;e++){const c=e/(l-1),d=s.getPointAtLength(t*c),u=i.getPointAtLength(o*c),p=r?0===e?"M":"L":"";a+=p+ut(d.x,3)+n+d.y+" ",h+=p+ut(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),h=i.getAttribute(r?"d":"points");return s[l]=h,[a,h]};var Us=Object.freeze({__proto__:null,createDrawable:Ws,createMotionPath:Vs,morphTo:Hs});const qs="undefined"!=typeof Intl&&Intl.Segmenter,js=/\{value\}/g,Gs=/\{i\}/g,Qs=/(\s+)/,Zs=/^\s+$/,Js="line",Ks="word",ti="char",ei="data-line";let si=null,ii=null,ri=null;const ni=t=>t.isWordLike||" "===t.segment||z(+t.segment),oi=t=>t.setAttribute("aria-hidden","true"),ai=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],hi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},li=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&li(e)}},ci=(t,e,s)=>{const i=t.getAttribute(ei);(null!==i&&+i!==e||"BR"===t.tagName)&&s.add(t);let r=t.childElementCount;for(;r--;)ci(t.children[r],e,s);return s},di=(t,e={})=>{let s="";const i=I(e.class)?` class="${e.class}"`:"",r=Tt(e.clone,!1),n=Tt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},ui=(t,e,s,i,r,n,o,a,h)=>{const l=r===Js,c=r===ti,d=`_${r}_`,u=Y(t)?t(s):t,p=l?"block":"inline-block";ri.innerHTML=u.replace(js,`<i class="${d}"></i>`).replace(Gs,`${c?h:l?o:a}`);const m=ri.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${d}`),_=y.length;if(_){f.style.display=p,g.style.display=p,g.setAttribute(ei,`${o}`),l||(g.setAttribute("data-word",`${a}`),c&&g.setAttribute("data-char",`${h}`));let t=_;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,l?i.innerHTML=s.innerHTML:i.replaceChild(s.cloneNode(!0),e)}e.push(g),i.appendChild(m)}else console.warn('The expression "{value}" is missing from the provided template.');return n&&(f.style.outline=`1px dotted ${hi[r]}`),f};class pi{constructor(t,s={}){si||(si=qs?new qs([],{granularity:Ks}):{segment:t=>{const e=[],s=t.split(Qs);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Zs.test(i)})}return e}}),ii||(ii=qs?new qs([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!ri&&e&&(ri=i.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:h,debug:l}=s,c=(t=R(t)?t[0]:t)&&t.nodeType?t:(ie(t)||[])[0],d=!0===o?{}:o,u=!0===r||X(r)?{}:r,p=!0===n?{}:n;this.debug=Tt(l,!1),this.includeSpaces=Tt(h,!1),this.accessible=Tt(a,!0),this.linesOnly=d&&!u&&!p,this.lineTemplate=M(d)?di(Js,d):d,this.wordTemplate=M(u)||this.linesOnly?di(Ks,u):u,this.charTemplate=M(p)?di(ti,p):p,this.$target=c,this.html=c&&c.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(d||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=c.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?i.fonts.ready.then(m):m(),c?this.resizeObserver.observe(c):console.warn("No Text Splitter target found.")}addEffect(t){if(!Y(t))return console.warn("Effect must return a function.");const e=ts(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(t=>Y(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,s=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],h=this.words,l=this.chars,c=si.segment(o),d=i.createDocumentFragment();let u=null;for(const t of c){const e=t.segment,s=ni(t);if(!u||s&&u&&ni(u))a.push(e);else{const t=a.length-1;a[t].includes(" ")||e.includes(" ")?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const c=a[t+1],u=r&&c&&!c.trim(),p=o,m=s?ii.segment(p):null,f=s?i.createDocumentFragment():i.createTextNode(u?o+" ":o);if(s){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,c=i.createTextNode(a);ui(s,l,c,f,ti,n,-1,h.length,l.length)}}e?ui(e,h,f,d,Ks,n,-1,h.length,l.length):s?d.appendChild(f):d.appendChild(i.createTextNode(o)),u&&t++}else{if(t&&r)continue;d.appendChild(i.createTextNode(o))}}t.parentNode.replaceChild(d,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,s=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==i.fonts.status,h=r&&a;this.ready=!r||a,(h||t)&&this.effectsCleanups.forEach(t=>Y(t)&&t(this)),s||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),h&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=ai(e,Ks))),o&&(h||n)&&(this.chars=ai(e,ti));const l=this.words.length?this.words:this.chars;let c,d=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();c&&s-c>.5*i&&d++,e.setAttribute(ei,`${d}`);const r=e.querySelectorAll(`[${ei}]`);let n=r.length;for(;n--;)r[n].setAttribute(ei,`${d}`);c=s}if(h){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<d+1;t++){const i=e.cloneNode(!0);ci(i,t,new Set).forEach(t=>{const e=t.parentElement;e&&s.add(e),t.remove()}),a.push(i)}s.forEach(li);for(let e=0,s=a.length;e<s;e++)ui(r,this.lines,a[e],t,Js,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=ai(e,Ks)),o&&(this.chars=ai(e,ti))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(h||!s)){const t=i.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(oi),this.words.forEach(oi),this.chars.forEach(oi)}return this.width=e.offsetWidth,(h||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const mi=(t,e)=>new pi(t,e),fi=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new pi(t,e));var gi=Object.freeze({__proto__:null,TextSplitter:pi,split:fi,splitText:mi});const yi=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(ut(t(i/e),4));return`linear(${s.join(", ")})`},_i={},vi=t=>{let e=_i[t];if(e)return e;if(e="linear",I(t)){if(P(t,"linear")||P(t,"cubic-")||P(t,"steps")||P(t,"ease"))e=t;else if(P(t,"cubicB"))e=F(t);else{const s=ye(t);Y(s)&&(e=s===le?"linear":yi(s))}_i[t]=e}else if(Y(t)){const s=yi(t);s&&(e=s)}else t.ease&&(e=yi(t.ease));return e},bi=["x","y","z"],Si=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...bi],wi=(()=>[...bi,...g.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let Ti=null;const xi=(t,e,s,i,r)=>{let n=I(e)?e:xt(e,s,i,r);return z(n)?Si.includes(t)||P(t,"translate")?`${n}px`:P(t,"rotate")||P(t,"skew")?`${n}deg`:`${n}`:n},ki=(t,e,s,i,r,n)=>{let o="0";const a=X(i)?getComputedStyle(t)[e]:xi(e,i,t,r,n);return o=X(s)?R(i)?i.map(s=>xi(e,s,t,r,n)):a:[xi(e,s,t,r,n),a],o};class $i{constructor(t,s){L.current&&L.current.register(this),V(Ti)&&(!e||!X(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(g.forEach(t=>{const e=P(t,"skew"),s=P(t,"scale"),i=P(t,"rotate"),r=P(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}}),Ti=!0):Ti=!1);const i=ne(t),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=Tt(s.ease,vi(N.defaults.ease)),o=n.ease&&n,a=Tt(s.autoplay,N.defaults.autoplay),l=!(!a||!a.link)&&a,c=s.alternate&&!0===s.alternate,d=s.reversed&&!0===s.reversed,u=Tt(s.loop,N.defaults.loop),v=!0===u||u===1/0?1/0:z(u)?u+1:1,b=c?d?"alternate-reverse":"alternate":d?"reverse":"normal",S=vi(n),w=1===N.timeScale?1:p;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||N.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==l,this.reversed=d,this.persist=Tt(s.persist,N.defaults.persist),this.autoplay=a,this._speed=Tt(s.playbackRate,N.defaults.playbackRate),this._resolve=_,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[h],a=wi.some(t=>s.hasOwnProperty(t)),l=t.style,c=this._inlineStyles[e]={},d=(o?o.settlingDuration:xt(Tt(s.duration,N.defaults.duration),t,e,r))*w,u=xt(Tt(s.delay,N.defaults.delay),t,e,r)*w,p=Tt(s.composition,"replace");for(let o in s){if(!j(o))continue;const h={},m={iterations:v,direction:b,fill:"both",easing:S,duration:d,delay:u,composite:p},y=s[o],_=!!a&&(g.includes(o)?o:f.get(o)),T=_?"transform":o;let x;if(c[T]||(c[T]=l[T]),M(y)){const s=y,a=Tt(s.ease,n),c=a.ease&&a,f=s.to,g=s.from;if(m.duration=(c?c.settlingDuration:xt(Tt(s.duration,d),t,e,r))*w,m.delay=xt(Tt(s.delay,u),t,e,r)*w,m.composite=Tt(s.composition,p),m.easing=vi(a),x=ki(t,o,g,f,e,r),_?(h[`--${_}`]=x,i[_]=x):h[o]=ki(t,o,g,f,e,r),Ae(this,t,o,h,m),!X(g))if(_){const t=`--${_}`;l.setProperty(t,h[t][0])}else l[o]=h[o][0]}else x=R(y)?y.map(s=>xi(o,s,t,e,r)):xi(o,y,t,e,r),_?(h[`--${_}`]=x,i[_]=x):h[o]=x,Ae(this,t,o,h,m)}if(a){let t=m;for(let e in i)t+=`${y[e]}var(--${e})) `;l.transform=t}}),l&&this.autoplay.link(this)}forEach(t){const e=I(t)?e=>e[t]():t;return this.animations.forEach(e),this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach(e=>e.playbackRate=t)}get currentTime(){const t=this.controlAnimation,e=N.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===N.timeScale?1:p);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel")}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let t in i){const e=i[t];X(e)||e===m?s.removeProperty(F(t)):s[t]=e}t.getAttribute("style")===m&&t.removeAttribute("style")}),this}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const Ci={animate:(t,e)=>new $i(t,e),convertEase:yi};t.$=ne,t.Animatable=Ie,t.Draggable=Je,t.JSAnimation=Be,t.Scope=es,t.ScrollObserver=cs,t.Spring=We,t.TextSplitter=pi,t.Timeline=ze,t.Timer=se,t.WAAPIAnimation=$i,t.animate=(t,e)=>new Be(t,e,null,0,!1).init(),t.clamp=Ds,t.cleanInlineStyles=Ot,t.createAnimatable=(t,e)=>new Ie(t,e),t.createDraggable=(t,e)=>new Je(t,e),t.createDrawable=Ws,t.createMotionPath=Vs,t.createScope=t=>new es(t),t.createSeededRandom=Ps,t.createSpring=Ue,t.createTimeline=t=>new ze(t).init(),t.createTimer=t=>new se(t,null,0).init(),t.cubicBezier=us,t.damp=Ns,t.degToRad=$s,t.eases=fe,t.easings=gs,t.engine=Xt,t.get=Fe,t.irregular=fs,t.keepTime=ts,t.lerp=Ls,t.linear=ms,t.mapRange=ks,t.morphTo=Hs,t.onScroll=(t={})=>new cs(t),t.padEnd=Ts,t.padStart=ws,t.radToDeg=Cs,t.random=As,t.randomPick=Os,t.remove=Oe,t.round=Bs,t.roundPad=Ss,t.scrollContainers=is,t.set=Pe,t.shuffle=Rs,t.snap=Es,t.split=fi,t.splitText=mi,t.spring=He,t.stagger=Ms,t.steps=ps,t.svg=Us,t.sync=Ke,t.text=gi,t.utils=zs,t.waapi=Ci,t.wrap=xs});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - animatable - CJS
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -120,7 +120,7 @@ class Animatable {
|
|
|
120
120
|
tween._currentTime = 0;
|
|
121
121
|
});
|
|
122
122
|
if (!helpers.isUnd(duration)) animation$1.stretch(duration);
|
|
123
|
-
animation$1.reset(
|
|
123
|
+
animation$1.reset(true).resume();
|
|
124
124
|
return this;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - animatable - ESM
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -118,7 +118,7 @@ class Animatable {
|
|
|
118
118
|
tween._currentTime = 0;
|
|
119
119
|
});
|
|
120
120
|
if (!isUnd(duration)) animation.stretch(duration);
|
|
121
|
-
animation.reset(
|
|
121
|
+
animation.reset(true).resume();
|
|
122
122
|
return this;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - animation - CJS
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -647,8 +647,12 @@ class JSAnimation extends timer.Timer {
|
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
/**
|
|
650
|
-
* @
|
|
651
|
-
|
|
650
|
+
* @typedef {this & {then: null}} ResolvedJSAnimation
|
|
651
|
+
*/
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* @param {Callback<ResolvedJSAnimation>} [callback]
|
|
655
|
+
* @return Promise<this>
|
|
652
656
|
*/
|
|
653
657
|
then(callback) {
|
|
654
658
|
return super.then(callback);
|
|
@@ -30,10 +30,15 @@ export class JSAnimation extends Timer {
|
|
|
30
30
|
*/
|
|
31
31
|
revert(): this;
|
|
32
32
|
/**
|
|
33
|
-
* @
|
|
34
|
-
* @return {Promise}
|
|
33
|
+
* @typedef {this & {then: null}} ResolvedJSAnimation
|
|
35
34
|
*/
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @param {Callback<ResolvedJSAnimation>} [callback]
|
|
37
|
+
* @return Promise<this>
|
|
38
|
+
*/
|
|
39
|
+
then(callback?: Callback<this & {
|
|
40
|
+
then: null;
|
|
41
|
+
}>): Promise<any>;
|
|
37
42
|
}
|
|
38
43
|
export function animate(targets: TargetsParam, parameters: AnimationParams): JSAnimation;
|
|
39
44
|
import { Timer } from '../timer/timer.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - animation - ESM
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -645,8 +645,12 @@ class JSAnimation extends Timer {
|
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
/**
|
|
648
|
-
* @
|
|
649
|
-
|
|
648
|
+
* @typedef {this & {then: null}} ResolvedJSAnimation
|
|
649
|
+
*/
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* @param {Callback<ResolvedJSAnimation>} [callback]
|
|
653
|
+
* @return Promise<this>
|
|
650
654
|
*/
|
|
651
655
|
then(callback) {
|
|
652
656
|
return super.then(callback);
|